mesh generation

This commit is contained in:
2024-03-26 19:30:28 -04:00
parent aada52a45b
commit ad1c3e5370
11 changed files with 218 additions and 64 deletions

View File

@@ -1,9 +1,38 @@
pub mod prelude {
use bevy::math::IVec2;
use noise::{NoiseFn, SuperSimplex};
pub struct GenerationConfig {
pub noise_scale: f64,
pub sea_level: f64,
pub layers: Vec<GeneratorLayer>,
}
pub struct GeneratorLayer {
pub strength: f64,
pub min_value: f64,
pub base_roughness: f64,
pub roughness: f64,
pub persistence: f64,
pub is_rigid: bool,
pub weight: f64,
pub weight_multi: f64,
pub layers: usize,
pub first_layer_mask: bool,
}
pub struct Chunk {
pub points: Vec<f32>,
pub size: usize,
pub chunk_offset: IVec2,
}
pub struct Map {
pub chunks: Vec<Chunk>,
pub height: usize,
pub width: usize,
}
}
pub mod heightmap;
pub mod hex_utils;
pub mod mesh_generator;
#[cfg(test)]
mod tests {