Light

Light

A plain light source in the scene, to be handled by shaders

Constructor

new Light(coloropt)

Parameters:
Name Type Attributes Default Description
color Vector3 <optional>
(1, 1, 1)

The color of the light

Members

color :Vector3

The color of the light

intensity :number

The intensity of the light (typically between 0 and 1)

lightCookie :null

By default lights shine a single color on surfaces. If however this parameter is used then the light will project a texture (called 'light cookie') on surfaces. The light cookie will be multiplied with the color of the light

shadowCaster :boolean

Dictates wether this light will 'cast' shadows or not

shadowSettings :Object

Properties:
Name Type Description
size number

2000

near number

1

far number

1000

resolution Array.<number>

512x512

upVector Vector3

UNIT_Y

darkness number

Shadow contribution

shadowType string

Possible values 'VSM' = Variance Shadow Maps, 'PCF' = Percentage Closer Filtering, 'Basic' = No filtering

specularIntensity :number

The specular intensity of the light (typically between 0 and 1)

translation :Vector3

The light's translation in world space