WorldOptions
What World takes beside its lighting.
Extends
Section titled “Extends”PropsWithChildren
Properties
Section titled “Properties”| Property | Type | Default value | Description |
|---|---|---|---|
dayLengthSeconds? |
number |
1200 |
Real seconds a whole day-night cycle takes. The engine’s own when left out. Anything but a finite number above zero logs a warning, and the clock keeps its last valid length, which on mount is the default. |
grass? |
false | GrassShader |
the blades each material's cover grows |
The game’s own shaping of the grass its materials grow, in GLSL: where it thins and what colour it takes, for a game that paints its own ground over the engine’s. false grows none, for a ground the game draws or dresses itself. |
ground? |
false | ModelMaterial |
the engine's painted ground |
The ground’s material: a function handed the engine’s, which returns it patched, such as with an onBeforeCompile of the game’s, or a material of the game’s in its place. A patched one keeps the engine’s paint, and the quality level’s changes reach it. false draws no ground, for a game that draws its own: the engine’s ground still answers a ray, holds the walkers up and bakes the navmesh, unseen. Define the function once, outside the component; what it returns is the game’s to dispose. |
hitZones? |
boolean |
false |
Draws each entity’s hit zones over its model, to size them; a development page’s tool turns them on with window.__GAME_HIT_ZONES__(true) too. |
look? |
LookPick |
undefined |
A look: the sky its models light from, fog, exposure, grading and a post-processing stack, which picking one opts in to. A look imported from looks/, or { base, ...values } to override any of its values. |
map? |
string |
"grid" |
The name of a registered map. The engine registers grid, a flat 8 m floor with a line every metre and nothing on it, and meadow, 100 m of hills, scatter and grass. |
navmesh? |
boolean |
false |
Draws the navmesh’s wireframe. |
scatter? |
false | ModelMaterial |
the kit's materials |
The scatter’s material, as ground takes it: a function handed each kind’s material, the one its file gave it, and for a bush or a tuft the engine’s copy that shrinks it with distance; one of the game’s in its place draws at every distance. false draws none of the map’s scatter, nor its props of a scatter kind, for a game that draws its own from the ground’s ScatterTrait: a tree still blocks where it stands. The grass is the grass prop’s. |
scatterShare? |
number |
the quality level’s scatter |
The share of the decorative scatter to stand, 0 to 1: what blocks always stands; this thins what only decorates. A weak device may draw less grass, and a player still meets every rock and tree the room and every other player meet. When left out, the quality level in force sets it, and changes it as the player does. |
sea? |
false | ModelMaterial |
the engine's water |
The sea’s material, as ground takes it: a function handed the engine’s water, or false for none, for a game that draws its own water at the map’s sea height. |
startHour? |
number |
10 |
The hour this World opens on, from 0 up to 24, an hour past either end wrapped into the day. The look’s, or the engine’s own, when left out. The step walks the clock on from there, on the room alone in a game with a room; findTimeOfDay reads it. |