Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

building-blocks v0.3.0

Compare
Choose a tag to compare
@bonsairobo bonsairobo released this 04 Dec 05:59
· 1025 commits to main since this release

This is a major version release with some breaking changes, but nothing groundbreaking in terms of new functionality.

If it seems like there is a lull in new features, that's because I'm currently focusing on building new applications on top of building-blocks, which is just one of the fundamental layer of a full stack the comprises a voxel game. Most of these changes were required by a map editor prototype I'm working on. As the applications get more complex, they will inform the design of building-blocks, and that's what drives new features.

Breaking changes:

  • The building_blocks_partition crate has been removed! I decided that it made more sense to keep the OctreeSet type in the building_blocks_storage crate. Everything else, including collision algorithms and the OctreeDBVT have moved to the building_blocks_search crate.
  • Several APIs from the compressible-map crate have been exposed as methods directly on the ChunkMap, some have been renamed.
  • Some ChunkMap methods now return MaybeCompressedChunk instead of decompressing the chunk for you inline. Just call the as_decompressed method to get the Chunk.
  • Renamed Quad to UnorientedQuad.

Additions:

  • Added the Snappy compression backend for ChunkMap. To use it, enable the "snappy" feature (and probably disable the "lz4" feature as well). Thanks to @indiv0, who wanted an alternative to LZ4 which works with the wasm target. LZ4 is still recommended as the default for best compression ratios.
  • Turned on LTO for release builds and benchmarks, showing a 2x speedup for meshing algorithms. You need to add lto = true to your Cargo.toml to see the improvements.
  • Added the Axis2, Axis3, SignedAxis2, and SignedAxis3 types. These get a lot of use in the quad meshing code, where we want to access specific components of Points by indexing instead of doing a dot product.
  • Added the ExtentN::from_corners constructor.
  • Added the glam feature for easy type conversions between PointN and glam::Vec2 and glam::Vec3.

Other changes:

  • Made the code in building_blocks_mesh::quad more reusable for cases outside of the greedy_quads algorithm. Now there is an OrientedCubeFace type and an UnorientedQuad that work together to provide generic quad meshing.