Documentation / @ripl/3d / PointLight
Class: PointLight ​
Defined in: 3d/src/core/lights.ts:284
A light radiating equally in every direction from a point.
Extends ​
Constructors ​
Constructor ​
new PointLight(
options?):PointLight
Defined in: 3d/src/core/lights.ts:286
Parameters ​
| Parameter | Type |
|---|---|
options? | PositionalLightOptions |
Returns ​
PointLight
Overrides ​
Properties ​
| Property | Modifier | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|---|
_color | protected | string | - | PositionalLight._color | 3d/src/core/lights.ts:108 |
_decay | protected | number | - | PositionalLight._decay | 3d/src/core/lights.ts:241 |
_distance | protected | number | - | PositionalLight._distance | 3d/src/core/lights.ts:240 |
_enabled | protected | boolean | - | PositionalLight._enabled | 3d/src/core/lights.ts:110 |
_intensity | protected | number | - | PositionalLight._intensity | 3d/src/core/lights.ts:109 |
_position | protected | Vector3 | - | PositionalLight._position | 3d/src/core/lights.ts:239 |
type | readonly | LightType | The kind of illumination this light contributes. | PositionalLight.type | 3d/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 ​
| Parameter | Type |
|---|---|
value | string |
Returns ​
void
Inherited from ​
decay ​
Get Signature ​
get decay():
number
Defined in: 3d/src/core/lights.ts:264
The exponent of the inverse-distance falloff.
Returns ​
number
Set Signature ​
set decay(
value):void
Defined in: 3d/src/core/lights.ts:268
Parameters ​
| Parameter | Type |
|---|---|
value | number |
Returns ​
void
Inherited from ​
distance ​
Get Signature ​
get distance():
number
Defined in: 3d/src/core/lights.ts:254
The distance at which the light falls to zero. 0 means it never does.
Returns ​
number
Set Signature ​
set distance(
value):void
Defined in: 3d/src/core/lights.ts:258
Parameters ​
| Parameter | Type |
|---|---|
value | number |
Returns ​
void
Inherited from ​
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 ​
| Parameter | Type |
|---|---|
value | boolean |
Returns ​
void
Inherited from ​
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 ​
| Parameter | Type |
|---|---|
value | number |
Returns ​
void
Inherited from ​
position ​
Get Signature ​
get position():
Vector3
Defined in: 3d/src/core/lights.ts:244
The light's world-space position.
Returns ​
Set Signature ​
set position(
value):void
Defined in: 3d/src/core/lights.ts:248
Parameters ​
| Parameter | Type |
|---|---|
value | Vector3 |
Returns ​
void
Inherited from ​
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