This repository has been archived by the owner on Nov 13, 2023. It is now read-only.
building-blocks v0.3.0
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 theOctreeSet
type in thebuilding_blocks_storage
crate. Everything else, including collision algorithms and theOctreeDBVT
have moved to thebuilding_blocks_search
crate. - Several APIs from the
compressible-map
crate have been exposed as methods directly on theChunkMap
, some have been renamed. - Some
ChunkMap
methods now returnMaybeCompressedChunk
instead of decompressing the chunk for you inline. Just call theas_decompressed
method to get theChunk
. - Renamed
Quad
toUnorientedQuad
.
Additions:
- Added the
Snappy
compression backend forChunkMap
. 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 yourCargo.toml
to see the improvements. - Added the
Axis2
,Axis3
,SignedAxis2
, andSignedAxis3
types. These get a lot of use in the quad meshing code, where we want to access specific components ofPoint
s by indexing instead of doing a dot product. - Added the
ExtentN::from_corners
constructor. - Added the
glam
feature for easy type conversions betweenPointN
andglam::Vec2
andglam::Vec3
.
Other changes:
- Made the code in
building_blocks_mesh::quad
more reusable for cases outside of thegreedy_quads
algorithm. Now there is anOrientedCubeFace
type and anUnorientedQuad
that work together to provide generic quad meshing.