Function: initBodySimulation()
ts
function initBodySimulation(
tiles,
config,
atmoTiles?): BodySimulation;Deterministically derives a BodySimulation from a seed/config and a pre-generated tile mesh.
Three-step pipeline:
- Sample seeded simplex noise for every tile.
- Rank tiles into
Nequal-frequency bands (elevation 0..N-1), whereNis derived from(radius, coreRadiusRatio)viaresolveTerrainLevelCount(render layer). - Resolve liquid coverage → a band-space sea waterline + assemble the immutable
TileStatemap.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
tiles | Tile[] | undefined | Hexasphere tiles produced by generateHexasphere. |
config | BodyConfig | undefined | Full body physics/visual configuration. |
atmoTiles | readonly Tile[] | [] | - |