Renderer · interface
FogLayer
A layer of haze: how thick it is where it is thickest, and how fast it thins above that.
Explained in Hello world.
interface FogLayerimport type { FogLayer } from '@driftengine/core';In depth
In natural units, as fogDensity is: a haze authored in base two, its surviving light
2^(−∫ρ) and its density falling as 2^(−f·Δy), is the layer density: ρ · (ln 2)²,
heightFalloff: f · ln 2 here — the integral of base two's exponential carries one ln 2 of its
own, and the transmittance's base the other.
Properties
| Name | Type | Description |
|---|---|---|
density | number | Extinction per metre at baseY. |
heightFalloff | number | Reciprocal scale height, per metre: 0 is a layer of even density. |
baseY | number | The height it is thickest at. |