Expand description
Unified ops facade: algorithms, effects, and grid combine.
Use this module for name-based execution with optional JSON params.
use terrain_forge::{Grid, ops};
use terrain_forge::ops::Params;
use serde_json::json;
let mut grid = Grid::new(80, 60);
let mut params = Params::new();
params.insert("min_room_size".to_string(), json!(6));
params.insert("max_depth".to_string(), json!(5));
params.insert("room_padding".to_string(), json!(1));
ops::generate("bsp", &mut grid, Some(12345), Some(¶ms)).unwrap();Re-exports§
pub use crate::compose::BlendMode as CombineMode;
Structs§
Functions§
- build_
algorithm - Build an algorithm instance from a name + optional params.
- combine
- Combine another grid into the current grid using a mode.
- effect
- Apply a named effect with optional params.
- generate
- Generate using a named algorithm with optional seed and params.
- generate_
with_ semantic - Generate using a named algorithm with optional semantic output.