Renderer · interface
FogOptions
Explained in Hello world.
interface FogOptionsimport type { FogOptions } from '@driftengine/core';Properties
| Name | Type | Description |
|---|---|---|
colourreadonly | Rgb | |
densityreadonly | number | Extinction per metre at the camera's own height, not at the base. |
heightFalloffreadonly | number | Reciprocal scale height of the haze, per metre. 0 is a uniform medium. |
eyeYreadonly | number | The camera's height, so a fragment's own height is one subtraction away. |
underwaterColourreadonly | Rgb | |
underwaterDensityreadonly | number | |
underwaterFactorreadonly | number | |
modereadonly | number | MEDIUM_FOG integrates a medium; LINEAR_FOG ramps between near and far. |
nearreadonly | number | Where haze begins: the ramp's start in linear mode, and in the medium the distance along the
ray it is integrated from (Atmosphere.fogStart), 0 at the camera. |
farreadonly | number | |
density2readonlyoptional | number | The medium's second layer: its extinction per metre at the camera's height. Absent, none. |
heightFalloff2readonlyoptional | number | And its reciprocal scale height. |
floorreadonlyoptional | number | The least of a surface the haze must leave, Atmosphere.fogMaxOpacity's complement. Absent or 0,
no floor. |
cutoffreadonlyoptional | number | Metres past which the haze hides nothing. Absent or 0, none. |
glowColourreadonlyoptional | Rgb | The sun's glow in the haze: its colour. Absent or black, none. |
glowExponentreadonlyoptional | number | The glow's lobe: the cosine of the angle from its light, to this power. |
glowDirectionreadonlyoptional | Rgb | Surface → the glow's light, a unit vector. |
glowStartreadonlyoptional | number | Metres past the haze's start before the glow begins. |