Skip to main content

bevy_voxel_world/
lib.rs

1mod chunk;
2mod chunk_map;
3mod configuration;
4mod debug_draw;
5mod mesh_cache;
6mod meshing;
7mod plugin;
8mod voxel;
9mod voxel_material;
10mod voxel_traversal;
11mod voxel_world;
12mod voxel_world_internal;
13
14pub mod prelude {
15    pub use crate::chunk::{Chunk, NeedsDespawn};
16    pub use crate::configuration::*;
17    pub use crate::plugin::VoxelWorldPlugin;
18    pub use crate::voxel::{VoxelFace, WorldVoxel, VOXEL_SIZE};
19    pub use crate::voxel_world::{
20        get_chunk_voxel_position, VoxelRaycastResult, VoxelWorld, VoxelWorldCamera,
21    };
22    pub use crate::voxel_world::{
23        ChunkWillChangeLod, ChunkWillDespawn, ChunkWillRemesh, ChunkWillSpawn,
24        ChunkWillUpdate,
25    };
26}
27
28pub mod custom_meshing {
29    pub use crate::chunk::PaddedChunkShape;
30    pub use crate::chunk::VoxelArray;
31    pub use crate::chunk::CHUNK_SIZE_F;
32    pub use crate::chunk::CHUNK_SIZE_I;
33    pub use crate::chunk::CHUNK_SIZE_U;
34    pub use crate::meshing::generate_chunk_mesh;
35    pub use crate::meshing::generate_chunk_mesh_for_shape;
36    pub use crate::meshing::mesh_from_quads;
37}
38
39pub mod debug {
40    pub use crate::debug_draw::*;
41}
42
43pub mod rendering {
44    pub use crate::plugin::VoxelWorldMaterialHandle;
45    pub use crate::voxel_material::vertex_layout;
46    pub use crate::voxel_material::ATTRIBUTE_TEX_INDEX;
47    pub use crate::voxel_material::VOXEL_TEXTURE_SHADER_HANDLE;
48}
49
50pub mod traversal_alg {
51    pub use crate::voxel_traversal::*;
52}
53
54#[cfg(test)]
55mod test;