CLASSES
TagsA - Z

PointLight

NodeLight

Description

class PointLight extends Light

A point light is a light defined by an unique point in world space.

The light is emitted in every direction from this point. A good example of a point light is the sun.

A tutorial about lights can be found here : https://doc.babylonjs.com/tutorials/lights

Constructor

new PointLight(name, position, scene)

Creates a new PointLight object

Parameters

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

Members

transformedPosition : Vector3

position : Vector3

The position of the emitting point

Methods

getAbsolutePosition() → Vector3

computeTransformedPosition() → boolean

transferToEffect(effect, positionUniformName) → void

Gives the light to position with the given effect with given position name

Parameters

Name Type Description
effect Effect The given effect
positionUniformName string The uniform name

needCube() → boolean

supportsVSM() → boolean

needRefreshPerFrame() → boolean

getShadowDirection(faceIndex) → Vector3

Parameters

Name Type Description
optional faceIndex number

setShadowProjectionMatrix(matrix, viewMatrix, renderList) → void

Parameters

Name Type Description
matrix Matrix
viewMatrix Matrix
renderList Array<AbstractMesh>

getTypeID() → number