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

PointLightObject

What a PointLight’s ref holds: the light in the scene, which a game moves and writes each frame as it would three’s, whether or not it holds one of the pool’s slots. A prop that changes writes its field; a field a frame writes holds until the next.

  • Object3D

new PointLightObject(): PointLightObject

This creates a new Object3D object.

PointLightObject

Object3D.constructor

readonly color: Color

Its colour, linear, as three’s.


dayShare: number = 1

The share of intensity it burns at by day, 0 to 1.


decay: number = 2

How its light falls off with distance, three’s: 2 is physical.


distance: number = 1

Metres at which its light reaches zero.


flicker: number = 0

How much it flickers, 0 to 1.


flickerFactor: number = 1

The factor its flicker multiplies it by this frame, 1 when still. Read it, never write it.


intensity: number = 1

Candela, three’s unit.


isDrawn: boolean = false

Whether it holds a slot and lights the scene this frame. Read it, never write it.


readonly isPointLightObject: true = true


priority: number = 3

Which light keeps a slot when more are in view than the pool holds: each step down counts as 1.5 m nearer.


seed: number = 0

What its flicker’s noise starts from. Read it, never write it.


readonly worldPosition: Vector3

Where it stands in the world this frame. Read it, never write it.