Object3DLight

HemisphereLight

A light source positioned directly above the scene, with color fading from the sky color to the ground color.

This light cannot be used to cast shadows.

Code Example

const light = new v3d.HemisphereLight(0xffffbb, 0x080820, 1); scene.add(light);

Examples

animation / skinning / blending
lights / hemisphere
controls / pointerlock
loader / collada / kinematics
loader / stl

Constructor

HemisphereLight(skyColor : Integer, groundColor : Integer, intensity : Float)

skyColor — (optional) hexadecimal color of the sky. Default is 0xffffff (white).
groundColor — (optional) hexadecimal color of the ground. Default is 0xffffff (white).
intensity — (optional) numeric value of the light's strength/intensity. Default is 1.

Creates a new HemisphereLight.

Properties

See the base Light class for common properties.

.color : Float

The light's sky color, as passed in the constructor. Default is a new Color set to white (0xffffff).

.groundColor : Float

The light's ground color, as passed in the constructor. Default is a new Color set to white (0xffffff).

.isHemisphereLight : Boolean

Read-only flag to check if a given object is of type HemisphereLight.

.position : Vector3

This is set equal to Object3D.DefaultUp (0, 1, 0), so that the light shines from the top down.

Methods

See the base Light class for common methods.

.copy(source : HemisphereLight) → this

Copies the value of color, intensity and groundColor from the source light into this one.

Puzzles

The following puzzles work with the hemisphere lights:

Source

For more info on how to obtain the source code of this module see this page.