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.

Example

lights / hemisphere
controls / pointerlock
decals
loader / collada / kinematics
materials / lightmap
shaders / ocean
var light = new v3d.HemisphereLight(0xffffbb, 0x080820, 1); scene.add(light);

Constructor

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

skyColor - (optional) hexadecimal color of the sky. Default is 0xffffff.
groundColor - (optional) hexadecimal color of the ground. Default is 0xffffff.
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.

.castShadow : Boolean

This is set to undefined in the constructor as hemisphere lights cannot cast shadows.

.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

Used to check whether this or derived classes are hemisphere lights. Default is true.

You should not change this, as it used internally for optimisation.

.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) : HemisphereLight

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

Source

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