light_2d
2D: a light in a 2D scene (lane 2d/light). kind "point" (a lantern: round, fading over radius), "spot" (a cone aimed along direction), "directional" (moon or sun over everything) or "ambient" (adds base light). Lights material_2d objects (everything with lighting_2d lit_by_default) that share its mask; with shadows, occluder_2d objects cast hard shadows. Flicker for torches. Scripts: self.setField("light_2d.intensity", 2).
In scene text
light_2d { kind "…" color (1, 0.8, 0.6) intensity 1 }Add it in the Inspector (Add Component), in scene text as above, or ask your AI. Fields you leave out keep their defaults.
Fields 18
| Field | Type | Unit / range | What it does |
|---|---|---|---|
kind | text | — | point |
color | colour (r, g, b) | — | The light's colour. |
intensity | number | 0 … 64 | How strong (1: the colour at full). |
radius | number | units, 1 … 100000 | Point and spot: how far it reaches. |
falloff | number | 0.1 … 16 | How it fades toward the radius: 1 linear, 2 soft, 4 a tight pool. |
height | number | units, 0 … 100000 | Point and spot: how high above the picture it hangs (low lights rake across normal maps). |
direction | (x, y, z) | — | Spot: where it aims (x right, y up). Directional: the direction toward the light. |
elevation | number | deg, 1 … 90 | Directional: degrees above the picture (90 straight on, 20 raking). |
cone | number | deg, 1 … 360 | Spot: the cone's full angle. |
softness | number | 0 … 1 | Spot: how soft the cone's edge is. |
flicker | number | 0 … 1 | Flicker: 0 steady ... 1 wild (torches, candles). |
flicker_speed | number | Hz, 0 … 60 | Flickers per second. |
shadows | true / false | — | Casts hard shadows from occluder_2d objects (at most lighting_2d max_shadowed on screen). |
priority | number | -1000 … 1000 | Over the light budget, higher priority stays. |
critical | true / false | — | Never dropped by the light budget. |
mask | number | 1 … 65535 | Light layers (bit mask): lights materials and is blocked by occluders sharing a bit. |
offset | (x, y, z) | units | Where the light sits from the object's position (a torch's flame). |
enabled | true / false | — | On. |
Arcwright Beta 2 (0.4.0) · generated from the engine source (25e375c86)Something wrong or missing? Tell us