Skip to main content

DirectionalLight

Represents a directional light source in the scene.

TypeNameInterface Description
VariablescastShadow: boolean

Function: Gets whether this light casts shadows.

VariablesshadowAutoFrustum: boolean

Function: Gets whether the shadow frustum should be calculated automatically.

VariablesshadowBias: number

Function: Gets the shadow bias to prevent shadow acne (self-shadowing artifacts).

VariablesshadowColor: Color

Function: Gets the color of the shadows cast by this light.

VariablesshadowFrustumArea: number

Function: Gets the area of the shadow frustum.

VariablesshadowFrustumFar: number

Function: Gets the far plane of the shadow frustum.

VariablesshadowFrustumNear: number

Function: Gets the near plane of the shadow frustum.

VariablesshadowResolution: Vector2f

Function: Gets the resolution of the shadow map.

VariablesshadowSoftness: number

Function: Gets the softness of the shadows when soft shadows are enabled.

VariablesshadowStrength: number

Function: Gets the strength of the shadows.

VariablessoftShadow: boolean

Function: Gets whether to use soft shadows.

Functionsconstructor()

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) {
}
}
Copyright © 2026 TikTok. All rights reserved.
About TikTokHelp CenterCareersContactLegalTerms of ServicePrivacy PolicyCookies