LightComponent
Native light component.
Provides access to a native light component instance.
Static Members
Properties
- .cascadeCount
- .color
- .innerAngle
- .intensity
- .lightType
- .outerAngle
- .shadowBias
- .shadowNormalBias
- .shadowRange
- .shadowTexelSize
- .shadows
Methods
Static Members
.TypeName: string
Properties
.cascadeCount: number
1.0.0+
Cascade count for Sun shadows.
.cascadeCount
1.0.0+
Set cascade count for Sun shadows.
.color: Float32Array
View on the light color.
Note: Prefer to use getColor in performance-critical code.
.color
Set light color.
Note: Prefer to use setColor in performance-critical code.
.innerAngle: number
1.0.0+
Inner angle for spot lights, in degrees.
.innerAngle
1.0.0+
Set inner angle for spot lights.
.intensity: number
1.0.0+
Light intensity.
.intensity
1.0.0+
Set light intensity.
.lightType: LightType
Light type.
.lightType
Set light type.
.outerAngle: number
1.0.0+
Outer angle for spot lights, in degrees.
.outerAngle
1.0.0+
Set outer angle for spot lights.
.shadowBias: number
1.0.0+
Bias value for shadows.
.shadowBias
1.0.0+
Set bias value for shadows.
.shadowNormalBias: number
1.0.0+
Normal bias value for shadows.
.shadowNormalBias
1.0.0+
Set normal bias value for shadows.
.shadowRange: number
1.0.0+
Range for shadows.
.shadowRange
1.0.0+
Set range for shadows.
.shadowTexelSize: number
1.0.0+
Texel size for shadows.
.shadowTexelSize
1.0.0+
Set texel size for shadows.
.shadows: boolean
1.0.0+
Whether the light casts shadows.
.shadows
1.0.0+
Set whether the light casts shadows.
Methods
.getColor<T>(out: T) ⇒ T
.getColor() ⇒ Float32Array
1.0.0+
Get light color.
Returns: The out parameter.
| Param | Type | Description |
|---|---|---|
out | T | Destination array/vector, expected to have at least 3 elements. |
| Template Param | Type Definition |
|---|---|
T | extends NumberArray |
.setColor(c: Readonly<NumberArray>) ⇒ void
1.0.0+
Set light color.
| Param | Type | Description |
|---|---|---|
c | Readonly<NumberArray> | New color array/vector, expected to have at least 3 elements. |