Class: PointLight
Point light source. A single point light source that illuminates all directions. A common example is to simulate the light emitted by a light bulb, where a point light source cannot create shadows.
Hierarchy
LightBase
↳
PointLight
Constructors
Properties
Accessors
- eventDispatcher
- isStart
- transform
- enable
- iesProfiles
- iesProfile
- r
- g
- b
- lightColor
- color
- intensity
- castShadow
- shadowIndex
- castGI
- direction
- range
- at
- radius
- quadratic
Methods
- stop
- onLateUpdate
- onBeforeUpdate
- onCompute
- onParentChange
- onAddChild
- onRemoveChild
- cloneTo
- copyComponent
- beforeDestroy
- onEnable
- onDisable
- destroy
- init
- start
- onUpdate
- onGraphic
- debug
- debugDraw
Constructors
constructor
• new PointLight(): PointLight
Returns
Overrides
LightBase.constructor
Defined in
src/components/lights/PointLight.ts:16
Properties
object3D
• object3D: Object3D
= null
owner object3D
Inherited from
LightBase.object3D
Defined in
src/components/ComponentBase.ts:17
isDestroyed
• Optional
isDestroyed: boolean
Inherited from
LightBase.isDestroyed
Defined in
src/components/ComponentBase.ts:38
name
• name: string
light name
Inherited from
LightBase.name
Defined in
src/components/lights/LightBase.ts:22
size
• size: number
= 1
light size
Inherited from
LightBase.size
Defined in
src/components/lights/LightBase.ts:26
lightData
• lightData: LightData
light source data
Inherited from
LightBase.lightData
Defined in
src/components/lights/LightBase.ts:31
dirFix
• dirFix: number
= 1
fix light direction
Inherited from
LightBase.dirFix
Defined in
src/components/lights/LightBase.ts:36
bindOnChange
• bindOnChange: () => void
Callback function when binding changes
Type declaration
▸ (): void
Callback function when binding changes
Returns
void
Inherited from
LightBase.bindOnChange
Defined in
src/components/lights/LightBase.ts:41
needUpdateShadow
• needUpdateShadow: boolean
= true
Inherited from
LightBase.needUpdateShadow
Defined in
src/components/lights/LightBase.ts:43
realTimeShadow
• realTimeShadow: boolean
= true
Whether to enable real-time rendering of shadows
Inherited from
LightBase.realTimeShadow
Defined in
src/components/lights/LightBase.ts:48
Accessors
eventDispatcher
• get
eventDispatcher(): CEventDispatcher
Returns
Inherited from
LightBase.eventDispatcher
Defined in
src/components/ComponentBase.ts:23
• set
eventDispatcher(value
): void
Parameters
Name | Type |
---|---|
value | CEventDispatcher |
Returns
void
Inherited from
LightBase.eventDispatcher
Defined in
src/components/ComponentBase.ts:28
isStart
• get
isStart(): boolean
Returns
boolean
Inherited from
LightBase.isStart
Defined in
src/components/ComponentBase.ts:40
transform
• get
transform(): Transform
Return the Transform component attached to the Object3D.
Returns
Inherited from
LightBase.transform
Defined in
src/components/ComponentBase.ts:47
enable
• get
enable(): boolean
Enable/disable components. The enabled components can be updated, while the disabled components cannot be updated.
Returns
boolean
Inherited from
LightBase.enable
Defined in
src/components/ComponentBase.ts:68
• set
enable(value
): void
Enable/disable components. The enabled components can be updated, while the disabled components cannot be updated.
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
LightBase.enable
Defined in
src/components/ComponentBase.ts:54
iesProfiles
• set
iesProfiles(iesProfiles
): void
Parameters
Name | Type |
---|---|
iesProfiles | IESProfiles |
Returns
void
Inherited from
LightBase.iesProfiles
Defined in
src/components/lights/LightBase.ts:125
iesProfile
• get
iesProfile(): IESProfiles
Returns
Inherited from
LightBase.iesProfile
Defined in
src/components/lights/LightBase.ts:132
r
• get
r(): number
Get the red component of the lighting color
Returns
number
Inherited from
LightBase.r
Defined in
src/components/lights/LightBase.ts:139
• set
r(value
): void
Set the red component of the lighting color
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
LightBase.r
Defined in
src/components/lights/LightBase.ts:146
g
• get
g(): number
Get the green component of the lighting color
Returns
number
Inherited from
LightBase.g
Defined in
src/components/lights/LightBase.ts:154
• set
g(value
): void
Set the green component of the lighting color
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
LightBase.g
Defined in
src/components/lights/LightBase.ts:161
b
• get
b(): number
Get the blue component of the lighting color
Returns
number
Inherited from
LightBase.b
Defined in
src/components/lights/LightBase.ts:169
• set
b(value
): void
Set the blue component of the lighting color
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
LightBase.b
Defined in
src/components/lights/LightBase.ts:175
lightColor
• get
lightColor(): Color
Get light source color
Returns
Color
Inherited from
LightBase.lightColor
Defined in
src/components/lights/LightBase.ts:183
• set
lightColor(value
): void
Set light source color
Parameters
Name | Type |
---|---|
value | Color |
Returns
void
Inherited from
LightBase.lightColor
Defined in
src/components/lights/LightBase.ts:190
color
• get
color(): Color
Get light source color
Returns
Color
Inherited from
LightBase.color
Defined in
src/components/lights/LightBase.ts:199
• set
color(value
): void
Set light source color
Parameters
Name | Type |
---|---|
value | Color |
Returns
void
Inherited from
LightBase.color
Defined in
src/components/lights/LightBase.ts:207
intensity
• get
intensity(): number
Get Illumination intensity of light source
Returns
number
number
Inherited from
LightBase.intensity
Defined in
src/components/lights/LightBase.ts:216
• set
intensity(value
): void
Set Illumination intensity of light source
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
LightBase.intensity
Defined in
src/components/lights/LightBase.ts:224
castShadow
• get
castShadow(): boolean
Returns
boolean
Inherited from
LightBase.castShadow
Defined in
src/components/lights/LightBase.ts:240
• set
castShadow(value
): void
Cast Light Shadow
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
LightBase.castShadow
Defined in
src/components/lights/LightBase.ts:233
shadowIndex
• get
shadowIndex(): number
get shadow index at shadow map list
Returns
number
Inherited from
LightBase.shadowIndex
Defined in
src/components/lights/LightBase.ts:247
castGI
• get
castGI(): boolean
get gi is enable
Returns
boolean
boolean
Inherited from
LightBase.castGI
Defined in
src/components/lights/LightBase.ts:256
• set
castGI(value
): void
set gi is enable
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
LightBase.castGI
Defined in
src/components/lights/LightBase.ts:263
direction
• get
direction(): Vector3
light source direction
Returns
Vector3
Inherited from
LightBase.direction
Defined in
src/components/lights/LightBase.ts:277
range
• get
range(): number
Get the range of the light source
Returns
number
Defined in
src/components/lights/PointLight.ts:34
• set
range(value
): void
Set the range of the light source
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Defined in
src/components/lights/PointLight.ts:42
at
• get
at(): number
Get the illumination distance of the light source
Returns
number
Memberof
PointLight
Defined in
src/components/lights/PointLight.ts:53
• set
at(value
): void
Set the illumination distance of the light source
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Memberof
PointLight
Defined in
src/components/lights/PointLight.ts:64
radius
• get
radius(): number
Get the radius to control the light
Returns
number
Defined in
src/components/lights/PointLight.ts:72
• set
radius(value
): void
Set the radius of the control light
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Defined in
src/components/lights/PointLight.ts:79
quadratic
• get
quadratic(): number
Get the radius to control the light
Returns
number
Defined in
src/components/lights/PointLight.ts:87
• set
quadratic(value
): void
Set the radius of the control light
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Defined in
src/components/lights/PointLight.ts:94
Methods
stop
▸ stop(): void
Returns
void
Inherited from
LightBase.stop
Defined in
src/components/ComponentBase.ts:114
onLateUpdate
▸ onLateUpdate(view?
): any
Parameters
Name | Type |
---|---|
view? | View3D |
Returns
any
Inherited from
LightBase.onLateUpdate
Defined in
src/components/ComponentBase.ts:118
onBeforeUpdate
▸ onBeforeUpdate(view?
): any
Parameters
Name | Type |
---|---|
view? | View3D |
Returns
any
Inherited from
LightBase.onBeforeUpdate
Defined in
src/components/ComponentBase.ts:119
onCompute
▸ onCompute(view?
, command?
): any
Parameters
Name | Type |
---|---|
view? | View3D |
command? | GPUCommandEncoder |
Returns
any
Inherited from
LightBase.onCompute
Defined in
src/components/ComponentBase.ts:120
onParentChange
▸ onParentChange(lastParent?
, currentParent?
): any
Parameters
Name | Type |
---|---|
lastParent? | Object3D |
currentParent? | Object3D |
Returns
any
Inherited from
LightBase.onParentChange
Defined in
src/components/ComponentBase.ts:122
onAddChild
▸ onAddChild(child
): any
Parameters
Name | Type |
---|---|
child | Object3D |
Returns
any
Inherited from
LightBase.onAddChild
Defined in
src/components/ComponentBase.ts:123
onRemoveChild
▸ onRemoveChild(child
): any
Parameters
Name | Type |
---|---|
child | Object3D |
Returns
any
Inherited from
LightBase.onRemoveChild
Defined in
src/components/ComponentBase.ts:124
cloneTo
▸ cloneTo(obj
): void
clone component data to target object3D
Parameters
Name | Type | Description |
---|---|---|
obj | Object3D | target object3D |
Returns
void
Inherited from
LightBase.cloneTo
Defined in
src/components/ComponentBase.ts:131
copyComponent
▸ copyComponent(from
): this
Parameters
Name | Type |
---|---|
from | this |
Returns
this
Inherited from
LightBase.copyComponent
Defined in
src/components/ComponentBase.ts:133
beforeDestroy
▸ beforeDestroy(force?
): void
before release this component, object refrences are not be set null now.
Parameters
Name | Type |
---|---|
force? | boolean |
Returns
void
Inherited from
LightBase.beforeDestroy
Defined in
src/components/ComponentBase.ts:200
onEnable
▸ onEnable(): void
Returns
void
Inherited from
LightBase.onEnable
Defined in
src/components/lights/LightBase.ts:114
onDisable
▸ onDisable(): void
Returns
void
Inherited from
LightBase.onDisable
Defined in
src/components/lights/LightBase.ts:119
destroy
▸ destroy(force?
): void
Parameters
Name | Type |
---|---|
force? | boolean |
Returns
void
Inherited from
LightBase.destroy
Defined in
src/components/lights/LightBase.ts:281
init
▸ init(): void
Returns
void
Overrides
LightBase.init
Defined in
src/components/lights/PointLight.ts:20
start
▸ start(): void
Returns
void
Overrides
LightBase.start
Defined in
src/components/lights/PointLight.ts:101
onUpdate
▸ onUpdate(): void
Returns
void
Overrides
LightBase.onUpdate
Defined in
src/components/lights/PointLight.ts:106
onGraphic
▸ onGraphic(view?
): void
Parameters
Name | Type |
---|---|
view? | View3D |
Returns
void
Overrides
LightBase.onGraphic
Defined in
src/components/lights/PointLight.ts:110
debug
▸ debug(): void
enable GUI debug
Returns
void
Defined in
src/components/lights/PointLight.ts:127
debugDraw
▸ debugDraw(show
): void
Parameters
Name | Type |
---|---|
show | boolean |
Returns
void