Class: ParticleSystem
A particle system can simulate and render many small images or geometries, it called particles to produce visual effects
Hierarchy
RenderNode
↳
ParticleSystem
Constructors
Properties
- autoPlay
- particleSimulator
- playing
- playSpeed
- object3D
- isDestroyed
- instanceCount
- lodLevel
- alwaysRender
- instanceID
- drawType
- isRenderOrderChange
- needSortOnCameraZ
- isRecievePostEffectUI
Accessors
- material
- geometry
- preheatTime
- looping
- eventDispatcher
- isStart
- transform
- enable
- renderLayer
- rendererMask
- renderOrder
- materials
- castShadow
- castGI
- castReflection
Methods
- init
- useSimulator
- play
- stop
- start
- onCompute
- onUpdate
- onLateUpdate
- onBeforeUpdate
- onGraphic
- onParentChange
- onAddChild
- onRemoveChild
- cloneTo
- attachSceneOctree
- detachSceneOctree
- copyComponent
- addMask
- removeMask
- hasMask
- addRendererMask
- removeRendererMask
- onEnable
- onDisable
- selfCloneMaterials
- renderPass
- renderPass2
- recordRenderPass2
- preInit
- nodeUpdate
- beforeDestroy
- destroy
Constructors
constructor
• new ParticleSystem(): ParticleSystem
Returns
Overrides
RenderNode.constructor
Defined in
packages/particle/ParticleSystem.ts:31
Properties
autoPlay
• autoPlay: boolean
= true
whether the animation will auto play
Defined in
packages/particle/ParticleSystem.ts:14
particleSimulator
• particleSimulator: ParticleSimulator
the simulator of particle.
Defined in
packages/particle/ParticleSystem.ts:19
playing
• playing: boolean
= false
playing status
Defined in
packages/particle/ParticleSystem.ts:24
playSpeed
• playSpeed: number
= 1.0
animation playing speed
Defined in
packages/particle/ParticleSystem.ts:29
object3D
• object3D: Object3D
= null
owner object3D
Inherited from
RenderNode.object3D
Defined in
src/components/ComponentBase.ts:17
isDestroyed
• Optional
isDestroyed: boolean
Inherited from
RenderNode.isDestroyed
Defined in
src/components/ComponentBase.ts:38
instanceCount
• instanceCount: number
= 0
Inherited from
RenderNode.instanceCount
Defined in
src/components/renderer/RenderNode.ts:35
lodLevel
• lodLevel: number
= 0
Inherited from
RenderNode.lodLevel
Defined in
src/components/renderer/RenderNode.ts:36
alwaysRender
• alwaysRender: boolean
= false
Inherited from
RenderNode.alwaysRender
Defined in
src/components/renderer/RenderNode.ts:37
instanceID
• instanceID: string
Inherited from
RenderNode.instanceID
Defined in
src/components/renderer/RenderNode.ts:38
drawType
• drawType: number
= 0
Inherited from
RenderNode.drawType
Defined in
src/components/renderer/RenderNode.ts:39
isRenderOrderChange
• Optional
isRenderOrderChange: boolean
Inherited from
RenderNode.isRenderOrderChange
Defined in
src/components/renderer/RenderNode.ts:55
needSortOnCameraZ
• Optional
needSortOnCameraZ: boolean
Inherited from
RenderNode.needSortOnCameraZ
Defined in
src/components/renderer/RenderNode.ts:56
isRecievePostEffectUI
• Optional
isRecievePostEffectUI: boolean
Inherited from
RenderNode.isRecievePostEffectUI
Defined in
src/components/renderer/RenderNode.ts:57
Accessors
material
• get
material(): Material
material
Returns
Material
Defined in
packages/particle/ParticleSystem.ts:42
• set
material(value
): void
Parameters
Name | Type |
---|---|
value | Material |
Returns
void
Defined in
packages/particle/ParticleSystem.ts:46
geometry
• get
geometry(): GeometryBase
The geometry of the mesh determines its shape
Returns
GeometryBase
Overrides
RenderNode.geometry
Defined in
packages/particle/ParticleSystem.ts:53
• set
geometry(value
): void
Parameters
Name | Type |
---|---|
value | GeometryBase |
Returns
void
Overrides
RenderNode.geometry
Defined in
packages/particle/ParticleSystem.ts:57
preheatTime
• get
preheatTime(): number
Get preheat time(second)
Returns
number
Defined in
packages/particle/ParticleSystem.ts:76
• set
preheatTime(value
): void
Set preheat time(second)
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Defined in
packages/particle/ParticleSystem.ts:69
looping
• get
looping(): boolean
Get particle simulator's looping
Returns
boolean
Defined in
packages/particle/ParticleSystem.ts:90
• set
looping(value
): void
Set particle simulator's looping
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Defined in
packages/particle/ParticleSystem.ts:83
eventDispatcher
• get
eventDispatcher(): CEventDispatcher
Returns
CEventDispatcher
Inherited from
RenderNode.eventDispatcher
Defined in
src/components/ComponentBase.ts:23
• set
eventDispatcher(value
): void
Parameters
Name | Type |
---|---|
value | CEventDispatcher |
Returns
void
Inherited from
RenderNode.eventDispatcher
Defined in
src/components/ComponentBase.ts:28
isStart
• get
isStart(): boolean
Returns
boolean
Inherited from
RenderNode.isStart
Defined in
src/components/ComponentBase.ts:40
transform
• get
transform(): Transform
Return the Transform component attached to the Object3D.
Returns
Transform
Inherited from
RenderNode.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
RenderNode.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
RenderNode.enable
Defined in
src/components/ComponentBase.ts:54
renderLayer
• get
renderLayer(): RenderLayer
Returns
RenderLayer
Inherited from
RenderNode.renderLayer
Defined in
src/components/renderer/RenderNode.ts:110
• set
renderLayer(value
): void
Parameters
Name | Type |
---|---|
value | RenderLayer |
Returns
void
Inherited from
RenderNode.renderLayer
Defined in
src/components/renderer/RenderNode.ts:114
rendererMask
• get
rendererMask(): number
Returns
number
Inherited from
RenderNode.rendererMask
Defined in
src/components/renderer/RenderNode.ts:152
• set
rendererMask(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
RenderNode.rendererMask
Defined in
src/components/renderer/RenderNode.ts:156
renderOrder
• get
renderOrder(): number
Returns
number
Inherited from
RenderNode.renderOrder
Defined in
src/components/renderer/RenderNode.ts:160
• set
renderOrder(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
RenderNode.renderOrder
Defined in
src/components/renderer/RenderNode.ts:164
materials
• get
materials(): Material
[]
Returns
Material
[]
Inherited from
RenderNode.materials
Defined in
src/components/renderer/RenderNode.ts:173
• set
materials(value
): void
Parameters
Name | Type |
---|---|
value | Material [] |
Returns
void
Inherited from
RenderNode.materials
Defined in
src/components/renderer/RenderNode.ts:177
castShadow
• get
castShadow(): boolean
Returns
boolean
Inherited from
RenderNode.castShadow
Defined in
src/components/renderer/RenderNode.ts:345
• set
castShadow(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
RenderNode.castShadow
Defined in
src/components/renderer/RenderNode.ts:349
castGI
• get
castGI(): boolean
Returns
boolean
Inherited from
RenderNode.castGI
Defined in
src/components/renderer/RenderNode.ts:354
• set
castGI(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
RenderNode.castGI
Defined in
src/components/renderer/RenderNode.ts:358
castReflection
• get
castReflection(): boolean
Returns
boolean
Inherited from
RenderNode.castReflection
Defined in
src/components/renderer/RenderNode.ts:362
• set
castReflection(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
RenderNode.castReflection
Defined in
src/components/renderer/RenderNode.ts:366
Methods
init
▸ init(): void
Returns
void
Overrides
RenderNode.init
Defined in
packages/particle/ParticleSystem.ts:94
useSimulator
▸ useSimulator<T
>(c
): ParticleSimulator
Set to use the specified particle emulator
Type parameters
Name | Type |
---|---|
T | extends ParticleSimulator |
Parameters
Name | Type | Description |
---|---|---|
c | Ctor <T > | class of particle emulator |
Returns
ParticleSimulator
Defined in
packages/particle/ParticleSystem.ts:102
play
▸ play(speed?
): void
start to play animation, with a speed value
Parameters
Name | Type | Default value | Description |
---|---|---|---|
speed | number | 1.0 | playSpeed, seeplaySpeed |
Returns
void
Defined in
packages/particle/ParticleSystem.ts:112
stop
▸ stop(): void
stop playing
Returns
void
Overrides
RenderNode.stop
Defined in
packages/particle/ParticleSystem.ts:120
start
▸ start(): void
Returns
void
Overrides
RenderNode.start
Defined in
packages/particle/ParticleSystem.ts:124
onCompute
▸ onCompute(view
, command
): void
Parameters
Name | Type |
---|---|
view | View3D |
command | GPUCommandEncoder |
Returns
void
Overrides
RenderNode.onCompute
Defined in
packages/particle/ParticleSystem.ts:147
onUpdate
▸ onUpdate(view?
): any
Parameters
Name | Type |
---|---|
view? | View3D |
Returns
any
Inherited from
RenderNode.onUpdate
Defined in
src/components/ComponentBase.ts:117
onLateUpdate
▸ onLateUpdate(view?
): any
Parameters
Name | Type |
---|---|
view? | View3D |
Returns
any
Inherited from
RenderNode.onLateUpdate
Defined in
src/components/ComponentBase.ts:118
onBeforeUpdate
▸ onBeforeUpdate(view?
): any
Parameters
Name | Type |
---|---|
view? | View3D |
Returns
any
Inherited from
RenderNode.onBeforeUpdate
Defined in
src/components/ComponentBase.ts:119
onGraphic
▸ onGraphic(view?
): any
Parameters
Name | Type |
---|---|
view? | View3D |
Returns
any
Inherited from
RenderNode.onGraphic
Defined in
src/components/ComponentBase.ts:121
onParentChange
▸ onParentChange(lastParent?
, currentParent?
): any
Parameters
Name | Type |
---|---|
lastParent? | Object3D |
currentParent? | Object3D |
Returns
any
Inherited from
RenderNode.onParentChange
Defined in
src/components/ComponentBase.ts:122
onAddChild
▸ onAddChild(child
): any
Parameters
Name | Type |
---|---|
child | Object3D |
Returns
any
Inherited from
RenderNode.onAddChild
Defined in
src/components/ComponentBase.ts:123
onRemoveChild
▸ onRemoveChild(child
): any
Parameters
Name | Type |
---|---|
child | Object3D |
Returns
any
Inherited from
RenderNode.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
RenderNode.cloneTo
Defined in
src/components/ComponentBase.ts:131
attachSceneOctree
▸ attachSceneOctree(octree
): void
Parameters
Name | Type |
---|---|
octree | Octree |
Returns
void
Inherited from
RenderNode.attachSceneOctree
Defined in
src/components/renderer/RenderNode.ts:78
detachSceneOctree
▸ detachSceneOctree(): void
Returns
void
Inherited from
RenderNode.detachSceneOctree
Defined in
src/components/renderer/RenderNode.ts:83
copyComponent
▸ copyComponent(from
): this
Parameters
Name | Type |
---|---|
from | this |
Returns
this
Inherited from
RenderNode.copyComponent
Defined in
src/components/renderer/RenderNode.ts:95
addMask
▸ addMask(mask
): void
Parameters
Name | Type |
---|---|
mask | RendererMask |
Returns
void
Inherited from
RenderNode.addMask
Defined in
src/components/renderer/RenderNode.ts:140
removeMask
▸ removeMask(mask
): void
Parameters
Name | Type |
---|---|
mask | RendererMask |
Returns
void
Inherited from
RenderNode.removeMask
Defined in
src/components/renderer/RenderNode.ts:144
hasMask
▸ hasMask(mask
): boolean
Parameters
Name | Type |
---|---|
mask | RendererMask |
Returns
boolean
Inherited from
RenderNode.hasMask
Defined in
src/components/renderer/RenderNode.ts:148
addRendererMask
▸ addRendererMask(tag
): void
Parameters
Name | Type |
---|---|
tag | RendererMask |
Returns
void
Inherited from
RenderNode.addRendererMask
Defined in
src/components/renderer/RenderNode.ts:228
removeRendererMask
▸ removeRendererMask(tag
): void
Parameters
Name | Type |
---|---|
tag | RendererMask |
Returns
void
Inherited from
RenderNode.removeRendererMask
Defined in
src/components/renderer/RenderNode.ts:232
onEnable
▸ onEnable(): void
Returns
void
Inherited from
RenderNode.onEnable
Defined in
src/components/renderer/RenderNode.ts:236
onDisable
▸ onDisable(): void
Returns
void
Inherited from
RenderNode.onDisable
Defined in
src/components/renderer/RenderNode.ts:246
selfCloneMaterials
▸ selfCloneMaterials(key
): this
Parameters
Name | Type |
---|---|
key | string |
Returns
this
Inherited from
RenderNode.selfCloneMaterials
Defined in
src/components/renderer/RenderNode.ts:252
renderPass
▸ renderPass(view
, passType
, renderContext
): void
Parameters
Name | Type |
---|---|
view | View3D |
passType | PassType |
renderContext | RenderContext |
Returns
void
Inherited from
RenderNode.renderPass
Defined in
src/components/renderer/RenderNode.ts:370
renderPass2
▸ renderPass2(view
, passType
, rendererPassState
, clusterLightingBuffer
, encoder
, useBundle?
): void
render pass at passType
Parameters
Name | Type | Default value |
---|---|---|
view | View3D | undefined |
passType | PassType | undefined |
rendererPassState | RendererPassState | undefined |
clusterLightingBuffer | ClusterLightingBuffer | undefined |
encoder | GPURenderPassEncoder | undefined |
useBundle | boolean | false |
Returns
void
Inherited from
RenderNode.renderPass2
Defined in
src/components/renderer/RenderNode.ts:438
recordRenderPass2
▸ recordRenderPass2(view
, passType
, rendererPassState
, clusterLightingBuffer
, encoder
, useBundle?
): void
Parameters
Name | Type | Default value |
---|---|---|
view | View3D | undefined |
passType | PassType | undefined |
rendererPassState | RendererPassState | undefined |
clusterLightingBuffer | ClusterLightingBuffer | undefined |
encoder | GPURenderPassEncoder | undefined |
useBundle | boolean | false |
Returns
void
Inherited from
RenderNode.recordRenderPass2
Defined in
src/components/renderer/RenderNode.ts:486
preInit
▸ preInit(_rendererType
): boolean
Parameters
Name | Type |
---|---|
_rendererType | PassType |
Returns
boolean
Inherited from
RenderNode.preInit
Defined in
src/components/renderer/RenderNode.ts:519
nodeUpdate
▸ nodeUpdate(view
, passType
, renderPassState
, clusterLightingBuffer?
): void
Parameters
Name | Type |
---|---|
view | View3D |
passType | PassType |
renderPassState | RendererPassState |
clusterLightingBuffer? | ClusterLightingBuffer |
Returns
void
Inherited from
RenderNode.nodeUpdate
Defined in
src/components/renderer/RenderNode.ts:523
beforeDestroy
▸ beforeDestroy(force?
): void
Parameters
Name | Type |
---|---|
force? | boolean |
Returns
void
Inherited from
RenderNode.beforeDestroy
Defined in
src/components/renderer/RenderNode.ts:609
destroy
▸ destroy(force?
): void
Parameters
Name | Type |
---|---|
force? | boolean |
Returns
void
Inherited from
RenderNode.destroy