Renderer · interface
FlameOptions
Explained in Hello world.
interface FlameOptionsimport type { FlameOptions } from '@driftengine/core';Properties
| Name | Type | Description |
|---|---|---|
xreadonly | number | Where the fire burns from, world space: the wick's tip, the top of the coals. |
yreadonly | number | |
zreadonly | number | |
diameterMreadonly | number | How wide the burning area is, metres: a candle 0.01, a lantern 0.03, a brazier's bowl 0.4. |
colorreadonly | Vec3 | The light's colour at its mean brightness, in the caller's light units. |
radiusreadonly | number | Metres at which the light ends. |
flickerreadonlyoptional | number | How far the brightness swings either side of its mean, 0 to 1. Defaults to 0.18. |
seedreadonlyoptional | number | Keeps two flames of one size out of step. Defaults to 0. |
castsShadowreadonlyoptional | boolean | Whether the light may take a shadow slot. Defaults to true, as PointLightSource does. |
swayreadonlyoptional | number | How far the light wanders on each axis, as a share of the flame's height. Defaults to 0.06.More0 holds it still. A point light's static shadow map is baked from where the light stood, so a light that wanders reads that map from a few centimetres off. What would make the default wrong is a flame near a surface it shadows, where that offset shows as a band. |