Particles
Extends:
Particles renderer.
Example:
const component = new Particles();
component.deserialize({ shader: 'shaders/particles.json', processor: 'particles/fire.ps' });
Static Member Summary
| Static Public Members | ||
| public static get |
propsTypes: * |
|
Static Method Summary
| Static Public Methods | ||
| public static |
Component factory. |
|
| public static |
registerProcessor(id: string, contents: string) Register new particles processor. |
|
| public static |
Unregister existing processor. |
|
Constructor Summary
| Public Constructor | ||
| public |
Constructor. |
|
Member Summary
| Public Members | ||
| public get |
|
|
| public get |
|
|
| public set |
|
|
| public get |
|
|
| public set |
|
|
| public get |
|
|
| public set |
|
|
| public get |
|
|
| public set |
|
|
| public get |
|
|
| public set |
|
|
| public |
indices: * |
|
| public get |
|
|
| public set |
|
|
| public get |
|
|
| public set |
|
|
| public |
|
|
Method Summary
| Public Methods | ||
| public |
dispose() |
|
| public |
Emit burst of particles using burst generator function. |
|
| public |
emitParticle(life: number, timeScale: number, size: number, args: *): boolean Emit single particle. |
|
| public |
onAction(name: *, args: ...*): * |
|
| public |
onUpdate(deltaTime: *) |
|
| public |
Set particles parameter. |
|
Inherited Summary
| From class Component | ||
| public static get |
propsTypes: * |
|
| public static |
Component factory. |
|
| public get |
|
|
| public |
[name]: * |
|
| public |
deserialize(json: *) Deserialize JSON properties into this component. |
|
| public |
dispose() Destructor (dispose internal resources and detach from entity). |
|
| public |
Called when action arrived. |
|
| public |
onAlterActionArguments(name: string, args: *): array | undefined Called when asked to alter arrived action parameters. |
|
| public |
onAttach() Called after attached to entity. |
|
| public |
onDetach() Called before detached from entity. |
|
| public |
onPropertySerialize(name: string, value: *): * Called when property is serialized. |
|
| public |
onPropertySetup(name: string, value: *) Called when given property is deserialized. |
|
| public |
serialize(): * Serialize component into JSON data. |
|
| From class VerticesRenderer | ||
| public static get |
BufferUsage: * |
|
| public static get |
RenderMode: * |
|
| public static get |
propsTypes: {"visible": string, "shader": string, "vertices": string, "indices": string, "verticesUsage": string, "indicesUsage": string, "overrideUniforms": string, "overrideSamplers": string, "renderMode": string, "layers": string} |
|
| public static |
factory(): * |
|
| public get |
indices: * |
|
| public set |
|
|
| public get |
indicesUsage: * |
|
| public set |
|
|
| public get |
|
|
| public set |
|
|
| public get |
|
|
| public set |
|
|
| public get |
|
|
| public set |
|
|
| public get |
renderMode: * |
|
| public set |
|
|
| public get |
shader: * |
|
| public set |
|
|
| public get |
vertices: * |
|
| public set |
|
|
| public get |
|
|
| public set |
|
|
| public get |
visible: * |
|
| public set |
|
|
| public |
dispose() |
|
| public |
onAction(name: *, args: ...*): * |
|
| public |
onPreview(gl: *, renderer: *, deltaTime: *) |
|
| public |
onPropertySerialize(name: *, value: *): * |
|
| public |
onRender(gl: *, renderer: *, deltaTime: *, layer: *) |
|
| public |
onRenderLayer(gl: *, renderer: *, deltaTime: *, layer: *) |
|
| public |
|
|
| public |
updateIndicesChunk(data: *, offset: *, size: number) |
|
| public |
updateVerticesChunk(data: *, offset: *, size: number) |
|
Static Public Members
Static Public Methods
Public Constructors
Public Methods
public dispose() source
Destructor (dispose internal resources and detach from entity).
Override:
VerticesRenderer#disposepublic emitBurst(count: number, args: *) source
Emit burst of particles using burst generator function.
Params:
| Name | Type | Attribute | Description |
| count | number | Number of particles to emit. |
|
| args | * | Particles attributes. |
Example:
component.emitBurst(100);
public emitParticle(life: number, timeScale: number, size: number, args: *): boolean source
Emit single particle.
Example:
component.emitParticle(1, 0.5, 10);
public onAction(name: *, args: ...*): * source
Called when action arrived.
Override:
VerticesRenderer#onActionParams:
| Name | Type | Attribute | Description |
| name | * | ||
| args | ...* |
Return:
| * |
public onUpdate(deltaTime: *) source
Params:
| Name | Type | Attribute | Description |
| deltaTime | * |
