Three.V8

3D rendering engine using JavaScript as user script.

View on GitHub

<–Home

class Light

Abstract class for all direct lights.

No contructor, never used directly.

class Light extends Object3D

Inheritance Object3D –> Light

Name Description
Properties  
color Color of the light object.
intensity Intensity of the light object.
Methods  
getColor Get the value of .color
setColor Set the value of .color

Properties

See the base Object3D class for common properties.

color

.color: Object

Color of the light object.

Read-only. Use the method .setColor to modify this property.

intensity

Intensity of the light object.

Readable and writable.

Methods

See the base Object3D class for common methods.

getColor()

.getColor(color: Vector3) : Vector3

Copy the value of .color into color.

setColor()

.setColor(color: Vector3): undefined

Set the value of .color according to color.

.setColor(r: Number, g: Number, b: Number ): undefined

Set the value of .color according to the r, g, b values.