SpotLight

NodeLight

Description

class SpotLight extends ShadowLight

Constructor

new SpotLight(name, position, direction, angle, exponent, scene)

Creates a SpotLight object in the scene with the passed parameters :

A spot light is a simply light oriented cone.

It can cast shadows.

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

Parameters

Name Type Description
name string
position Vector3
direction Vector3
angle number
exponent number

Members

angle : number

shadowAngleScale : number

Allows scaling the angle of the light for shadow generation only.

exponent : number

Methods

getClassName() string

Returns the string "SpotLight".

getTypeID() number

Returns the integer 2.

transferToEffect(effect, lightIndex) SpotLight

Sets the passed Effect object with the SpotLight transfomed position (or position if not parented) and normalized direction.

Return the SpotLight.

Parameters

Name Type Description
effect Effect
lightIndex string