This commit is contained in:
griffi-gh 2023-01-20 20:40:08 +01:00
parent cc08456b39
commit 10faee215f
5 changed files with 5 additions and 2 deletions

View file

@ -18,6 +18,7 @@ pub(crate) mod rendering;
pub(crate) mod player; pub(crate) mod player;
pub(crate) mod world; pub(crate) mod world;
pub(crate) mod prefabs; pub(crate) mod prefabs;
pub(crate) mod transform;
use rendering::{Rederer, RenderTarget, BackgroundColor, clear_background}; use rendering::{Rederer, RenderTarget, BackgroundColor, clear_background};
use world::GameWorld; use world::GameWorld;

3
src/transform.rs Normal file
View file

@ -0,0 +1,3 @@
use glam::Mat4;
pub struct Transform(Mat4);

View file

@ -5,10 +5,10 @@ use hashbrown::HashMap;
pub mod chunk; pub mod chunk;
pub mod block; pub mod block;
pub mod render; pub mod render;
pub mod tasks;
use chunk::Chunk; use chunk::Chunk;
//TODO separate world struct for render data //TODO separate world struct for render data
// because this is not send-sync // because this is not send-sync

View file

@ -5,7 +5,6 @@ use super::{block::Block, render::ChunkVertex};
pub const CHUNK_SIZE: usize = 32; pub const CHUNK_SIZE: usize = 32;
type ChunkBlockData = Box<[[[Block; CHUNK_SIZE]; CHUNK_SIZE]; CHUNK_SIZE]>; type ChunkBlockData = Box<[[[Block; CHUNK_SIZE]; CHUNK_SIZE]; CHUNK_SIZE]>;
pub struct ChunkData { pub struct ChunkData {
pub blocks: ChunkBlockData, pub blocks: ChunkBlockData,
pub has_renderable_blocks: bool, pub has_renderable_blocks: bool,

0
src/world/tasks.rs Normal file
View file