Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

LocalLightOptions

A local light: a lamp, a torch, a forge or a flash that lights what is round it, as three’s point light does. The engine lights the ones that light the view most with a fixed pool of point lights, the quality level’s localLights, so a light that comes or goes compiles no shader. The engine reads the record each frame, so a game moves or changes the light by writing it.

Property Type Default value Description
color? ColorRepresentation white, #ffffff, as three’s point light The light’s colour: a CSS colour, a number, or a Color the game may change in place.
decay? number 2 How fast its light falls off with distance, as three’s point light’s decay: 2 is the physical inverse square.
distance? number 0 Metres past which it lights nothing, as three’s point light’s distance; 0 for no cut-off, where its light fades with decay alone.
intensity? number 1 As three’s point light’s intensity, in candela: 0 or more. 0 puts the light out for a while and frees its place in the pool.
position Vector3Like undefined Where it shines from, in the world, in metres: a Vector3 the game moves in place, or any { x, y, z }.