LightDef beta
Interface of @v12-engine/client
export interface LightDefA light of the scene: a lamp, a torch, a glowing rune. Only drawn: what other players must see is the game's to say through the simulation, and its view to light
Members
angle
angle?: number;How wide its cone is, in radians: 0.8 when left out
color
color?: Rgb;Its colour, 0..1 (a warm white when left out)
direction
direction?: Rgb;For a spot: which way it shines (down when left out), and how wide its cone is, in radians (0.8)
flicker
flicker?: number | {
amount: number;
speed?: number;
};How much it flickers, 0..1, and how fast (a torch: 0.25): steady when left out
focus
focus?: number;For a spot: how its light falls off from the middle of the cone to its edge, 0 even to 10 and more tight (2)
halo
halo?: number;A glowing ball where it is, in its colour, this wide in cells: the light seen, not only what it lights (a rune, a will-o'-wisp, a lamp with no model). Brighter and bigger as the light is, flickering with it, glowing past its edges where the scene glows (WorldGlow). None when left out
intensity
intensity?: number;How bright, about 0..3 (1)
kind
kind?: 'point' | 'spot';All around it (point, the default), or a cone (spot)
name
name?: string;What it is called: code finds it by it (WorldLights.named); a map's light has its own
on
on?: boolean;Off, whatever when says: a lamp put out (handle.set({ on: false })). On when left out
priority
priority?: number;Which are drawn first where not all are (quality low, a renderer that cannot draw them together): higher first, then the nearest
range
range?: number;How far it reaches, in cells (8): nothing past it is lit
specular
specular?: number;How much it shines on what is smooth, 0..1, of its colour (0.25)
when
when?: LightWhen;When it is on: at night (the default: it comes up as the sun goes down), always, or as a function says
x
x: number;Where it is, in the world; or, with follow, from that node, in its own units
y
y: number;The light's height in the world
z
z: number;The light's z position in the world