CLASSES
TagsA - Z

DirectionalLight

NodeLight

Description

class DirectionalLight extends ShadowLight

A directional light is defined by a direction.

The light is emitted from everywhere with a specific direction and has an infinite range.

Constructor

new DirectionalLight(name, direction, scene)

Creates a DirectionalLight object in the scene, oriented towards the passed direction (Vector3).

The directional light is emitted from everywhere in the given direction.

It can cast shawdows.

Documentation : http://doc.babylonjs.com/tutorials/lights

Parameters

Name Type Description
name string The name of the object
direction Vector3 The direction of the light
scene Scene The scene to create the light into

Members

shadowFrustumSize : number

Fix frustum size for the shadow generation. This is disabled if the value is 0.

Specifies a fix frustum size for the shadow generation.

shadowOrthoScale : number

autoUpdateExtends : boolean

Methods

getClassName() → string

Returns the string "DirectionalLight".

getTypeID() → number

Returns the integer 1.

transferToEffect(effect, lightIndex) → DirectionalLight

Sets the passed Effect object with the DirectionalLight transformed position (or position if not parented) and the passed name.

Returns the DirectionalLight.

Parameters

Name Type Description
effect Effect The given effect
lightIndex string