Tracing and Performance improvements

tracing
chunk rebuild testing
speed up world gen by moving collider creation to thread pool
This commit is contained in:
2024-05-07 23:26:13 -04:00
parent 58a9f62dca
commit 4e9a35adc6
11 changed files with 206 additions and 46 deletions

View File

@@ -144,6 +144,10 @@ pub mod prelude {
pub fn get_world_size(&self) -> Vec2 {
return Vec2::new(self.get_world_width(), self.get_world_height());
}
pub fn set_height(&mut self, pos: &HexCoord, height: f32) {
self.chunks[pos.to_chunk_index(self.width)].heights[pos.to_chunk_local_index()] = height;
}
}
pub const ATTRIBUTE_PACKED_VERTEX_DATA: MeshVertexAttribute =
MeshVertexAttribute::new("PackedVertexData", 988540817, VertexFormat::Uint32);