Creates a world; anything not given uses DEFAULT_WORLD.
Local flat frame used by World.height on planets (identity on flat worlds).
Resolved settings. Change them with World.set / World.reset.
Bumped on every change; caches compare it.
Adds height modifiers (e.g. from a city) and notifies listeners with the region they touch.
A local flat frame centred at a planet position given in degrees (or the world itself on a flat
world). Packages that think in (x, z) => y — grass, scatter, water, cities — work in frames.
Ground material weights (in GROUND_MATERIALS order, summing to 1) and the blended ground
colour (sRGB) for a sample. slope is rise/run (0 = flat); pass it from your mesh normals.
Apply the slope/cold/waterline/river overrides (rock, snow, sand, mud). The terrain
shader applies those per pixel itself, so chunks pass false and get the biome soil colour only.
Height function (x, z) => y: the flat world itself, or a local flat frame around origin on a planet.
Calls listener after every change. region is set when only that box (base-surface coordinates)
changed — e.g. a modifier was added — so caches can rebuild just what it touches. Returns an
unsubscribe function.
Replaces all settings: anything not in input goes back to the defaults.
Everything about local position (x, z) (flat world, or the origin frame on a planet).
Optionalout: WorldSampleSamples everything at a base-surface position (see the class docs for what that means).
Skip noise detail smaller than this many metres (pass a LOD's vertex spacing ×2).
Merges input into the current settings (nested objects merge; arrays replace) and notifies listeners.
A procedural world: climate, height, rivers, volcanoes, 20 blended biomes and their ground, as deterministic functions of
seedand position. Works as an infinite flat world or as a planet, and is cheap enough to query per vertex, per blade of grass or per tree.Positions on the base surface are 3D metres:
(x, ·, z)on a flat world (y is ignored), or any point on a planet (it is projected onto the sphere). Use World.height for a classic(x, z) => yheight function — on a planet it works in a local flat frame aroundorigin.Example