Skip to content

Documentation / @ripl/3d / HemisphereLight

Class: HemisphereLight ​

Defined in: 3d/src/core/lights.ts:179

A two-colour light that fades from Light.color overhead to groundColor underfoot.

Cheaper than a pair of opposed directional lights and reads as bounced daylight, which is what a flat ambient term cannot give you.

Extends ​

Constructors ​

Constructor ​

new HemisphereLight(options?): HemisphereLight

Defined in: 3d/src/core/lights.ts:193

Parameters ​

ParameterType
options?HemisphereLightOptions

Returns ​

HemisphereLight

Overrides ​

Light.constructor

Properties ​

PropertyModifierTypeDescriptionInherited fromDefined in
_colorprotectedstring-Light._color3d/src/core/lights.ts:108
_enabledprotectedboolean-Light._enabled3d/src/core/lights.ts:110
_intensityprotectednumber-Light._intensity3d/src/core/lights.ts:109
typereadonlyLightTypeThe kind of illumination this light contributes.Light.type3d/src/core/lights.ts:106

Accessors ​

color ​

Get Signature ​

get color(): string

Defined in: 3d/src/core/lights.ts:116

The light's colour.

Returns ​

string

Set Signature ​

set color(value): void

Defined in: 3d/src/core/lights.ts:120

Parameters ​
ParameterType
valuestring
Returns ​

void

Inherited from ​

Light.color


enabled ​

Get Signature ​

get enabled(): boolean

Defined in: 3d/src/core/lights.ts:136

Whether the light contributes at all.

Returns ​

boolean

Set Signature ​

set enabled(value): void

Defined in: 3d/src/core/lights.ts:140

Parameters ​
ParameterType
valueboolean
Returns ​

void

Inherited from ​

Light.enabled


groundColor ​

Get Signature ​

get groundColor(): string

Defined in: 3d/src/core/lights.ts:184

The colour reaching surfaces that face downwards.

Returns ​

string

Set Signature ​

set groundColor(value): void

Defined in: 3d/src/core/lights.ts:188

Parameters ​
ParameterType
valuestring
Returns ​

void


intensity ​

Get Signature ​

get intensity(): number

Defined in: 3d/src/core/lights.ts:126

How strongly the light contributes.

Returns ​

number

Set Signature ​

set intensity(value): void

Defined in: 3d/src/core/lights.ts:130

Parameters ​
ParameterType
valuenumber
Returns ​

void

Inherited from ​

Light.intensity

Methods ​

invalidate() ​

invalidate(): void

Defined in: 3d/src/core/lights.ts:158

Requests a repaint of whatever this light is attached to. Call after mutating derived state.

Returns ​

void

Inherited from ​

Light.invalidate