LightOptions
Defined in: server/api.d.ts:2570
A light’s settings, for Light.create and light.set. Every field is optional; numbers are clamped to their ranges.
Properties
Section titled “Properties”color?
Section titled “color?”
optionalcolor?:string| {b:number;g:number;r:number; }
Defined in: server/api.d.ts:2609
Linear color 0-1, or a “#RRGGBB” sRGB string. Default white.
drawDistance?
Section titled “drawDistance?”
optionaldrawDistance?:number
Defined in: server/api.d.ts:2664
Distance in cm from the camera beyond which clients stop drawing the light (default 4000, the game’s own); 0 never culls. Changing it re-creates the light on clients.
enabled?
Section titled “enabled?”
optionalenabled?:boolean
Defined in: server/api.d.ts:2674
Whether the light is on (default true).
fadeRange?
Section titled “fadeRange?”
optionalfadeRange?:number
Defined in: server/api.d.ts:2669
Distance in cm over which the light fades out before drawDistance (default 300).
innerCone?
Section titled “innerCone?”
optionalinnerCone?:number
Defined in: server/api.d.ts:2644
Spot: the cone, in degrees from the axis, inside which the light is at full strength (default 0).
intensity?
Section titled “intensity?”
optionalintensity?:number
Defined in: server/api.d.ts:2619
Brightness in candelas, 0-100000 (default 8). HL’s own fixtures run from a candle’s 1 to a street lamp’s 60.
optionalmap?:string
Defined in: server/api.d.ts:2709
Light.create only: a location().areaId; “Overland” or “” (the default) is the shared map.
outerCone?
Section titled “outerCone?”
optionalouterCone?:number
Defined in: server/api.d.ts:2649
Spot: the cone, in degrees from the axis, at whose edge the light falls to nothing (default 44).
pitch?
Section titled “pitch?”
optionalpitch?:number
Defined in: server/api.d.ts:2594
Rotation in degrees. A light shines along its forward axis; one left out counts as 0.
preset?
Section titled “preset?”
optionalpreset?:string
Defined in: server/api.d.ts:2574
A Light.presets() name, applied before the other fields: HL’s own fixture values for intensity, radius, temperature and source radius.
priority?
Section titled “priority?”
optionalpriority?:"always"|"low"|"high"|"normal"
Defined in: server/api.d.ts:2689
Its rank in the game’s render-side light budget, as the game’s own fixtures carry one; “always” exempts it from that budget (default “normal”).
radius?
Section titled “radius?”
optionalradius?:number
Defined in: server/api.d.ts:2624
How far the light reaches, in cm (its attenuation radius), 1-100000 (default 1000).
optionalroll?:number
Defined in: server/api.d.ts:2604
Rotation in degrees.
shadowQuality?
Section titled “shadowQuality?”
optionalshadowQuality?:"medium"|"low"|"high"|"epic"|"cinematic"
Defined in: server/api.d.ts:2684
The lowest shadow quality setting at which a player sees its shadows (default “low”: everyone).
shadows?
Section titled “shadows?”
optionalshadows?:boolean
Defined in: server/api.d.ts:2679
Whether it casts shadows (default false). Shadowed lights cost the most to draw: give shadows to few.
softSourceRadius?
Section titled “softSourceRadius?”
optionalsoftSourceRadius?:number
Defined in: server/api.d.ts:2634
In cm; widens only the shadow penumbra.
sourceLength?
Section titled “sourceLength?”
optionalsourceLength?:number
Defined in: server/api.d.ts:2639
In cm; stretches a point or spot source into a tube along its forward axis.
sourceRadius?
Section titled “sourceRadius?”
optionalsourceRadius?:number
Defined in: server/api.d.ts:2629
Radius of the emitting sphere in cm; a wider source softens shadows and highlights.
specular?
Section titled “specular?”
optionalspecular?:number
Defined in: server/api.d.ts:2659
Strength of its specular highlights, 0-1 (default 1); 0 lights diffuse only.
streamRange?
Section titled “streamRange?”
optionalstreamRange?:number
Defined in: server/api.d.ts:2699
Interest radius in cm: only players this close receive the light. 100-100000, default 10000 (100 m).
temperature?
Section titled “temperature?”
optionaltemperature?:number
Defined in: server/api.d.ts:2614
Color temperature in Kelvin, 1700-12000, which tints the color; 0 (default) leaves it untinted. HL’s flames sit at 1850-2300.
optionalttl?:number
Defined in: server/api.d.ts:2694
Light.create only: seconds until the server destroys it; 0 or omitted lives until destroy.
virtualWorld?
Section titled “virtualWorld?”
optionalvirtualWorld?:number
Defined in: server/api.d.ts:2704
Light.create only: the virtual world it is placed in (default 0).
volumetric?
Section titled “volumetric?”
optionalvolumetric?:number
Defined in: server/api.d.ts:2654
How strongly it lights volumetric fog, 0-100 (default 1).
optionalx?:number
Defined in: server/api.d.ts:2579
World position in cm.
optionaly?:number
Defined in: server/api.d.ts:2584
World position in cm.
optionalyaw?:number
Defined in: server/api.d.ts:2599
Rotation in degrees.
optionalz?:number
Defined in: server/api.d.ts:2589
World position in cm.