DirectionalLight
Represents a directional light source in the scene.
| Type | Name | Interface Description |
|---|---|---|
| Variables | castShadow: boolean | • Function: Gets whether this light casts shadows. |
| Variables | shadowAutoFrustum: boolean | • Function: Gets whether the shadow frustum should be calculated automatically. |
| Variables | shadowBias: number | • Function: Gets the shadow bias to prevent shadow acne (self-shadowing artifacts). |
| Variables | shadowColor: Color | • Function: Gets the color of the shadows cast by this light. |
| Variables | shadowFrustumArea: number | • Function: Gets the area of the shadow frustum. |
| Variables | shadowFrustumFar: number | • Function: Gets the far plane of the shadow frustum. |
| Variables | shadowFrustumNear: number | • Function: Gets the near plane of the shadow frustum. |
| Variables | shadowResolution: Vector2f | • Function: Gets the resolution of the shadow map. |
| Variables | shadowSoftness: number | • Function: Gets the softness of the shadows when soft shadows are enabled. |
| Variables | shadowStrength: number | • Function: Gets the strength of the shadows. |
| Variables | softShadow: boolean | • Function: Gets whether to use soft shadows. |
| Functions | constructor() |
Examples
constructor()
let obj = new APJS.DirectionalLight();
Use Case
@component()
export class NewBehaviourScript extends APJS.BasicScriptComponent {
onStart() {
// TODO: instantiate / use DirectionalLight here
}
onUpdate(deltaTime: number) {
}
}