MapLightSource beta
Interface of @v12-engine/client
export interface MapLightSourceA light that stands at a place of the map: a lamp with no model, a glowing rune, the light of a cave's mouth, a campfire's glow. Only drawn (the client's WorldLights): the rules do not see it. MapLight is the map's sunlight
Members
angle
angle?: number;How wide a spot's cone is, in radians; 0.8 when left out
color
color?: [number, number, number];Its colour, 0..1 (a warm white when left out)
direction
direction?: [number, number, number];For a spot: which way it shines (down), how wide its cone is in radians (0.8), how its light falls to the cone's edge (2)
flicker
flicker?: number | {
amount: number;
speed?: number;
};How much it flickers, 0..1, and how fast (a fire: 0.3)
focus
focus?: number;How its light falls from the cone's middle to its edge; 2 when left out
halo
halo?: number;A glowing ball where it is, in its colour, this wide in cells: the light itself seen, by day too. None when left out
height
height?: number;How high over the ground (1.5 when left out)
id
id: number;Its own, among the map's lights: what the editor and the map's names know it by
intensity
intensity?: number;How bright, about 0..3 (1)
kind
kind?: 'point' | 'spot';All around it, or a cone (spot, with direction, angle and focus)
name
name?: string;What it is called: code finds it by it (client.lights, the map's names)
on
on?: boolean;Put out: drawn by nothing until it is put on (false); on when left out
priority
priority?: number;Which are drawn first where not all are: higher first, then the nearest
range
range?: number;How far it reaches, in cells (8)
specular
specular?: number;How much it shines on what is smooth, 0..1 (0.25)
when
when?: 'night' | 'always' | {
from: number;
to: number;
};When it is on: at night (the default), always, or between two hours of the day ({ from: 20, to: 6 })
x
x: number;The light's x position in cells
z
z: number;The light's z position in cells