WorldLighting
The engine’s lighting, which a World mounts unless told not to: its
sky, its sun and its fog each replaceable, as Lighting takes them.
Extends
Section titled “Extends”Pick<LightingProps,"sky"|"sun"|"fog"|"shadowBox">
Properties
Section titled “Properties”| Property | Type | Default value | Description |
|---|---|---|---|
focus? |
Vector3 |
undefined |
Where the sun’s shadow box stands, for a scene with no player character or a camera far from her, such as a strategy view. The player character when left out. |
fog? |
false | Fog | FogExp2 |
the look's fog |
The scene’s fog, in place of the look’s: a three.js Fog, linear between two distances, or FogExp2, which thickens with distance, as under water. Made once, outside the component. The rig dims only the look’s own fog with the hour. false sets none. Left out, the look’s fog, or none without a look. |
lighting? |
true |
true |
Mounts the engine’s lighting: the sun, the sky, their fill light, the exposure that follows the hour, and the look’s fog and stack. false mounts none of it, for a game that lights the scene itself, with its own <Lighting> or its own lights; a look then sets only the hour the World opens on. |
shadowBox? |
Partial<ShadowBox> |
{ halfWidth: 14, depth: 40 } |
The shadow box’s half width and depth in metres. |
shadowMapSize? |
number |
the quality level’s shadowMapSize |
The side of the sun’s shadow map in texels; 0 casts none. When left out, the quality level in force sizes it. |
sky? |
false | LookBackground |
the engine's scattering sky |
The sky behind the scene. Left out, the engine’s own: a scattering sky with clouds that follows the hour. An equirectangular image in its place, { file, sunU }, with sunU the column its sun stands in, 0 to 1 across, which the rig turns onto its sun. false draws none, for a game that draws its own sky or sets scene.background itself. |
sun? |
boolean |
true |
Whether the sun lights the scene by day, and the moon by night: one directional light, which casts the shadow. false leaves it out, as in a cave; the sky’s fill light stays. |