VaelisDocs
v1.0.0
Components · v1.0.0

Light

Vaelis 1.0.0 Light component reference: fields, script API, behavior and examples.

View as Markdownllms.txt
ScopeThis page documents the Light component in Vaelis 1.0.0. Runtime fields are serialized scene data; the Script API section lists only members intentionally exposed to game scripts.
Where to find it in the editorTop GameObject → Light → Directional/Point/Spot/Area/God Rays/Freeform. Existing lights expose their settings in the Inspector.

#What it does

2D light source supporting Directional, Point, Spot, Area, GodRays and Freeform light shapes.

Component setup & editor toolsLight adds the engine’s 2D lighting source and exposes a viewport gizmo for spatial editing.

#How to add and use Light

Editor path: Select the target entity in the Hierarchy (left side) → look at the Inspector (right side) → click Add Component at the bottom of the Inspector → search for Light → click the component row. The Add Component picker is a centered modal with a search box; it only lists components not already attached.

For components with a dedicated editor tool, the tool is opened or activated from the location described below. Do not assume that adding the component alone activates its editor; some systems require a separate window, panel, or viewport tool.

#Component setup & editor tools

  • Select entity → Inspector → Add Component → Light. The Light gizmo appears in the Scene viewport; use it to position/edit freeform geometry where supported.

#What you should see after adding it

The component appears as its own section in the Inspector. Its serialized settings are listed in the Component data table below. If a field is conditional, it appears only when the relevant mode/type is selected. If a field is a runtime state field (for example grounded or resolved velocity), treat it as read-only diagnostic state unless the API reference explicitly documents it as writable.

#How to read the settings

For every setting below, the documentation distinguishes type, default, meaning, and tuning direction where behavior is known. When a value represents a direction, use the engine's coordinate convention documented in Coordinate system; do not substitute Unity/Godot conventions.

#Component data

FieldTypePurposeDefault
typeenumDirectional | Point | Spot | Area | GodRays | Freeform.Point
colorhex stringLight color.#ffffff
intensitynumberLight intensity.1
radiusnumberReach for Point/Spot/GodRays.200
anglenumberCone angle for Spot/GodRays.45
widthnumberArea-light width.200
heightnumberArea-light height.200
castsOnWorldbooleanLight the world.true
castShadowsbooleanCast shadows.false
shadowColorhex stringShadow color.#000000
shadowStrengthnumberShadow strength.1
flickerbooleanFlicker enabled.false
flickerSpeednumberFlicker speed.8
flickerDurationnumberFlicker duration.0
coreSizenumberVisible light-core size.0.22
coreVisiblebooleanShow visible light core.true
pointsarray|nullFreeform local polygon points.null

#Tuning behavior

These are the practical direction-of-change rules for the most important controls on this component.

SettingWhat changing it does
intensity0 is off; 1 is the normal baseline; >1 produces stronger/brighter illumination.
radiusLarger values extend point/spot/area reach. Smaller values concentrate the light.
angleFor Spot/God Rays, larger values widen the cone; 0 is very narrow.
shadowStrength0 removes visible shadow contribution; 1 gives full light-side shadow strength.
flickerSpeedHigher = faster flicker cycles.
flickerDuration0 = indefinite flicker when enabled; positive values stop the flicker after that many seconds.

#Script API

MemberKindDescription
typePropertyLight type.
colorPropertyLight color.
intensityPropertyIntensity.
radiusPropertyLight radius.
anglePropertySpot/GodRays cone angle.
widthPropertyArea width.
heightPropertyArea height.
castsOnWorldPropertyAffects world lighting.
castShadowsPropertyShadow casting.
shadowColorPropertyShadow color.
shadowStrengthPropertyShadow strength.
flickerPropertyFlicker toggle.
flickerSpeedPropertyFlicker speed.
flickerDurationPropertyFlicker duration.
coreSizePropertyLight core size.
coreVisiblePropertyShow light core.

#Examples

js
this.light.intensity = 1.5;
js
this.light.castShadows = true;
Need the full workflow?Components: complete workflow covers adding, configuring, testing, combining, and removing components.