increase chunk size

This commit is contained in:
2024-09-15 12:14:24 -04:00
parent 177d7c6379
commit 3d0267f775
4 changed files with 47 additions and 40 deletions

View File

@@ -8,7 +8,8 @@ use bevy_derive::{Deref, DerefMut};
use bevy_ecs::{bundle::Bundle, component::Component, entity::Entity, system::Resource};
use nalgebra::Vector3;
pub const SIDE_LENGTH: usize = 16 * 16;
pub const SIDE_POW: u32 = 10;
pub const SIDE_LENGTH: usize = 2usize.pow(SIDE_POW);
pub const SHAPE: (usize, usize, usize) = (SIDE_LENGTH, SIDE_LENGTH, SIDE_LENGTH);
pub const DIMENSIONS: Vector3<usize> = Vector3::new(SIDE_LENGTH, SIDE_LENGTH, SIDE_LENGTH);
pub const LEN: usize = SHAPE.0 * SHAPE.1 * SHAPE.2;
@@ -25,7 +26,7 @@ impl ChunkData {
}
pub fn empty() -> Self {
Self {
data: OctTree::from_leaf(0, 8),
data: OctTree::from_leaf(0, SIDE_POW),
}
}
}