Renderer · interface

FlameOptions

Explained in Hello world.

interface FlameOptions
import type { FlameOptions } from '@driftengine/core';

Properties

NameTypeDescription
xreadonlynumberWhere the fire burns from, world space: the wick's tip, the top of the coals.
yreadonlynumber
zreadonlynumber
diameterMreadonlynumberHow wide the burning area is, metres: a candle 0.01, a lantern 0.03, a brazier's bowl 0.4.
colorreadonlyVec3The light's colour at its mean brightness, in the caller's light units.
radiusreadonlynumberMetres at which the light ends.
flickerreadonlyoptionalnumberHow far the brightness swings either side of its mean, 0 to 1. Defaults to 0.18.
seedreadonlyoptionalnumberKeeps two flames of one size out of step. Defaults to 0.
castsShadowreadonlyoptionalbooleanWhether the light may take a shadow slot. Defaults to true, as PointLightSource does.
swayreadonlyoptionalnumberHow far the light wanders on each axis, as a share of the flame's height. Defaults to 0.06.
More

0 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.