This repository has been archived by the owner on Nov 13, 2023. It is now read-only.
building-blocks v0.2.0
Building Blocks v0.2.0
This release is all about improving what we already had in v0.1.0, and several breaking changes were necessary. Most notably:
- There is an important bug fix for
Octree::from_array3
. - We've added a
voxel_sphere_cast
function that's similar tovoxel_ray_cast
. - All of the meshing functions now support
TransformMap
. - We've made several API ergonomics improvements.
Most of these changes have been driven by the effort to port the voxel-mapper project from ilattice3 to building-blocks. The completion of that effort confirms that building-blocks is viable for an application which enables interactive voxel terraforming.
What's Next
We will shift focus to adding new features in the next release. The choice and design of the features will be driven by real use cases. We expect to work on:
- procedurally generating large voxel terrains
- procedurally generating large height map terrains
- real-time voxel editing in a Bevy application
Detailed notes
Meta
- started using Github Actions for CI
Core
- add the
Point::at
trait method for indexing scalar components - add the
Point::map_components
method for transforming points component-wise - add
PointN
methods:- round
- floor
- as_2i and as_3i
- in_pixel and in_voxel
Storage
- remove
GetRef
andForEachRef
, instead relying onGet
andForEach
, which copy
values instead of borrowing. This had no noticeable performance impact. - impl
Deref
forChunkMapReader
so it has access to the methods ofChunkMap
- make
ChunkMap::from_serializable
and to_serializable async so chunk compression can happen in parallel - improve
copy_extent
performance when copying large extents between two chunk maps - rename
ChunkMap::key_iter
tochunk_keys_for_extent
- rename
ChunkMap::chunk_key
tochunk_key_containing_point
- cleaned up the
Array
trait by extract anArrayIndexer
trait - rename
Chunk::map
toChunk::array
- export type aliases for chunk map with default empty metadata type
()
Mesh
- make all meshing algorithms compatible with
TransformMap<Array>
- replace
pos_norm_tex_meshes_from_material_quads
function with more focused
methods on theQuadGroupMeta
object - remove the
material_weights
function, this was very application-specific and
relatively trivial to implement
Partition
- fixed a bug with
Octree::from_array3
that produced incorrect octants; regression test was added - add a
voxel_sphere_cast
function, similar tovoxel_ray_cast
but with a sphere
traveling along the ray - add the "partition" feature to the list of default features
- remove "ncollide" features from the list of default features
- rename
nearest_voxel_ray_cast
tovoxel_ray_cast
and adjust the API parameters - add
OctreeDBVT::remove
Octree::from_array3
now takes an extent instead of forcing the input array to
be the correct shape