HemisphericLight

NodeLight

Description

class HemisphericLight extends Light

Constructor

new HemisphericLight(name, direction, scene)

Creates a HemisphericLight object in the scene according to the passed direction (Vector3).

The HemisphericLight simulates the ambient environment light, so the passed direction is the light reflection direction, not the incoming direction.

The HemisphericLight can't cast shadows.

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

Parameters

Name Type Description
name string
direction Vector3
scene Scene

Members

groundColor : Color3

direction : Vector3

Methods

getClassName() string

Returns the string "HemisphericLight".

setDirectionToTarget(target) Vector3

Sets the HemisphericLight direction towards the passed target (Vector3).

Returns the updated direction.

Parameters

Name Type Description
target Vector3

getShadowGenerator() Nullable<ShadowGenerator>

transferToEffect(effect, lightIndex) HemisphericLight

Sets the passed Effect object with the HemisphericLight normalized direction and color and the passed name (string).

Returns the HemisphericLight.

Parameters

Name Type Description
effect Effect
lightIndex string

getTypeID() number

Returns the integer 3.