mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-11-22 06:48:43 -06:00
move more things
This commit is contained in:
parent
db6c50ad8d
commit
5b93fa7639
|
@ -6,4 +6,6 @@ edition = "2021"
|
|||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
glam = { version = "0.22", features = ["debug-glam-assert", "mint", "fast-math"] }
|
||||
strum = { version = "0.24", features = ["derive"] }
|
||||
bracket-noise = "0.8"
|
||||
|
|
4
kubi-shared/src/chunk.rs
Normal file
4
kubi-shared/src/chunk.rs
Normal file
|
@ -0,0 +1,4 @@
|
|||
use crate::blocks::Block;
|
||||
|
||||
pub const CHUNK_SIZE: usize = 32;
|
||||
pub type BlockData = Box<[[[Block; CHUNK_SIZE]; CHUNK_SIZE]; CHUNK_SIZE]>;
|
|
@ -1 +1,4 @@
|
|||
pub mod blocks;
|
||||
pub mod networking;
|
||||
pub mod worldgen;
|
||||
pub mod chunk;
|
||||
|
|
2
kubi-shared/src/networking.rs
Normal file
2
kubi-shared/src/networking.rs
Normal file
|
@ -0,0 +1,2 @@
|
|||
pub mod client;
|
||||
pub mod server;
|
0
kubi-shared/src/networking/client.rs
Normal file
0
kubi-shared/src/networking/client.rs
Normal file
0
kubi-shared/src/networking/server.rs
Normal file
0
kubi-shared/src/networking/server.rs
Normal file
|
@ -1,8 +1,8 @@
|
|||
use glam::{IVec3, ivec3};
|
||||
use bracket_noise::prelude::*;
|
||||
use super::{
|
||||
use crate::{
|
||||
chunk::{BlockData, CHUNK_SIZE},
|
||||
block::Block
|
||||
blocks::Block
|
||||
};
|
||||
|
||||
pub fn generate_world(chunk_position: IVec3, seed: u64) -> BlockData {
|
|
@ -6,16 +6,15 @@ edition = "2021"
|
|||
[dependencies]
|
||||
kubi-shared = { path = "../kubi-shared" }
|
||||
glium = "0.32"
|
||||
glam = { version = "0.22", features = ["debug-glam-assert", "mint", "fast-math"] }
|
||||
image = { version = "0.24", default_features = false, features = ["png"] }
|
||||
log = "0.4"
|
||||
env_logger = "0.10"
|
||||
strum = { version = "0.24", features = ["derive"] }
|
||||
glam = { version = "0.22", features = ["debug-glam-assert", "mint", "fast-math"] }
|
||||
hashbrown = "0.13"
|
||||
rayon = "1.6"
|
||||
shipyard = { version = "0.6", features = ["thread_local"] }
|
||||
nohash-hasher = "0.2.0"
|
||||
anyhow = "1.0"
|
||||
flume = "0.10"
|
||||
bracket-noise = "0.8"
|
||||
#rkyv = "0.7"
|
||||
|
|
|
@ -4,13 +4,14 @@ use glam::IVec3;
|
|||
use hashbrown::HashMap;
|
||||
use anyhow::{Result, Context};
|
||||
|
||||
pub use kubi_shared::worldgen;
|
||||
|
||||
pub mod chunk;
|
||||
pub mod block;
|
||||
pub mod tasks;
|
||||
pub mod loading;
|
||||
pub mod mesh;
|
||||
pub mod neighbors;
|
||||
pub mod worldgen;
|
||||
pub mod raycast;
|
||||
|
||||
use chunk::{Chunk, ChunkMesh};
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
use glam::IVec3;
|
||||
use glium::{VertexBuffer, IndexBuffer};
|
||||
use super::block::Block;
|
||||
use crate::rendering::world::ChunkVertex;
|
||||
|
||||
pub const CHUNK_SIZE: usize = 32;
|
||||
|
||||
pub type BlockData = Box<[[[Block; CHUNK_SIZE]; CHUNK_SIZE]; CHUNK_SIZE]>;
|
||||
pub use kubi_shared::chunk::{CHUNK_SIZE, BlockData};
|
||||
|
||||
pub struct ChunkData {
|
||||
pub blocks: BlockData,
|
||||
|
|
Loading…
Reference in a new issue