World gen stuff

This commit is contained in:
2026-11-13 00:01:59 -03:00
parent e013fbe550
commit e8ca9753f5
25 changed files with 645 additions and 162 deletions
+5
View File
@@ -90,6 +90,11 @@ function compile_condition(json: SurfaceConditionJson, terrain: NoiseTerrain): C
const at = terrain.compiler.compile(json.function);
return (context) => context.y >= at(context.x, context.y, context.z);
}
case "density": {
const value = terrain.compiler.compile(json.function);
const test = range_test(json);
return (context) => test(value(context.x, context.y, context.z));
}
case "biome": {
const biomes = new Set(json.biome_is);
return (context) => biomes.has(context.biome);