world structure

This commit is contained in:
griffi-gh 2023-01-20 03:08:09 +01:00
parent 000e1c341a
commit d96e99fd0e
3 changed files with 11 additions and 1 deletions

View file

@ -80,7 +80,7 @@ fn main() {
//Run update workflow //Run update workflow
world.run_workload(update).unwrap(); world.run_workload(update).unwrap();
//Start rendering //Start rendering (maybe use custom views for this?)
let mut target = { let mut target = {
let renderer = world.borrow::<NonSendSync<UniqueView<Rederer>>>().unwrap(); let renderer = world.borrow::<NonSendSync<UniqueView<Rederer>>>().unwrap();
renderer.display.draw() renderer.display.draw()

View file

@ -1,2 +1,11 @@
use glam::IVec2;
use hashbrown::HashMap;
pub mod chunk; pub mod chunk;
pub mod block; pub mod block;
use chunk::Chunk;
pub struct World {
pub chunks: HashMap<IVec2, Chunk>
}

View file

@ -0,0 +1 @@
pub struct Chunk;