LightComponent

Native light component.

Provides access to a native light component instance.

.TypeName: string 

.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.

.getColor<T>(out: T) ⇒ T 

.getColor() ⇒ Float32Array

1.0.0+

Get light color.

Returns: The out parameter.

ParamTypeDescription
outTDestination array/vector, expected to have at least 3 elements.
Template ParamType Definition
Textends NumberArray

.setColor(c: Readonly<NumberArray>) ⇒ void 

1.0.0+

Set light color.

ParamTypeDescription
cReadonly<NumberArray>New color array/vector, expected to have at least 3 elements.