New modular biomes system and updated world generator

This commit is contained in:
2024-07-06 20:41:50 -04:00
parent e6e969f053
commit 97f2497940
16 changed files with 341 additions and 190 deletions

View File

@@ -7,12 +7,13 @@ use super::chunk::Chunk;
#[derive(Resource, Reflect, Default)]
#[reflect(Resource)]
pub struct GenerationConfig {
pub noise_scale: f64,
pub sea_level: f64,
pub border_size: f32,
pub biome_blend: usize,
pub moisture_layer: NoiseConfig,
pub temperature_layer: NoiseConfig,
pub continent_layer: NoiseConfig,
pub size: UVec2,
pub layers: Vec<GeneratorLayer>,
}
impl GenerationConfig {
@@ -24,7 +25,13 @@ impl GenerationConfig {
}
}
#[derive(Reflect, InspectorOptions, Serialize, Deserialize, Debug, Clone)]
#[derive(Serialize, Deserialize, Default, Reflect, Clone, Debug)]
pub struct NoiseConfig {
pub scale: f64,
pub layers: Vec<GeneratorLayer>,
}
#[derive(Reflect, InspectorOptions, Serialize, Deserialize, Debug, Clone, Default)]
pub struct GeneratorLayer {
pub strength: f64,
pub min_value: f64,