CLASSES
TagsA - Z

HemisphericLight

NodeLight

Description

class HemisphericLight extends Light

Hemispheric light represents a simple and easy way to simulate realistic ambient light.

An hemispheric light is defined by a direction to the sky and by 3 colors: one for the diffuse (the sky color), one for the ground (the color when the pixel is not towards the sky) and one for the specular.

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

Constructor

new HemisphericLight(name, direction, scene)

Creates a new HemisphericLight object

Parameters

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

Members

groundColor : Color3

The ground color

direction : Vector3

The direction of the light

Methods

setDirectionToTarget(target) → Vector3

Sets the direction of the light using the given target

Parameters

Name Type Description
target Vector3 The given target to lighten

getShadowGenerator() → ShadowGenerator

Returns null

transferToEffect(effect, directionUniformName, groundColorUniformName) → void

Parameters

Name Type Description
effect Effect The given effect
directionUniformName string The direction uniform name
groundColorUniformName string The groundColor uniform name

getTypeID() → number