ParticleEmitter
ecs.ParticleEmitter
Description
Add a particle system to an entity. Intended for rendering common visual effects found in games and animations.
Functions
See component schema.
Schema
Property | Type | Description |
---|---|---|
stopped | boolean | Switching states will reset emitterLife. |
emitterLife | number | The life of the emitter in seconds |
particlesPerShot | number | Particles each emission |
emitDelay | number | Delay between emissions |
minimumLifespan | number | Min. range for particle lifetime |
maximumLifespan | number | Max. range for particle lifetime |
mass | number | Mass of the entity |
gravity | number | Gravity |
scale | number | Scale in every dimension |
forceX | number | Force applied to particle in X |
forceY | number | Force applied to particle in Y |
forceZ | number | Force applied to particle in Z |
spread | number | Area and direction where the particle spawns relative to its origin |
radialVelocity | number | Can be set to 0, else changes the force type applied to each particle to radial velocity |
spawnAreaType | string | Point: from origin. Choose from point (from origin), box , and sphere |
spawnAreaWidth | number | SpawnArea width for box type |
spawnAreaHeight | number | Spawn Area Height for box type |
spawnAreaDepth | number | Spawn Area Depth for box type |
spawnAreaRadius | number | Spawn Area radius for sphere type |
boundingZoneType | string | Bounding Zone type. Choose from none , box , and sphere |
boundingZoneWidth | number | Bounding Zone width for box type |
boundingZoneHeight | number | Bounding Zone height for box type |
boundingZoneDepth | number | Bounding Zone depth for box type |
boundingZoneRadius | number | Bounding Zone radius for sphere type |
resourceType | string | Choose from sprite (image) or model (3d model) |
resourceUrl | string | URL |
blendingMode | string | Only works for sprite. Choose from none , normal , add , multiply , and subtract . See examples here |
animateColor | boolean | Enables color animation |
colorStart | hex color | Starting color (ex: #fcba03 ) |
colorEnd | hex color | Ending color (ex: #fcba03 ) |
randomDrift | boolean | Enable Drift |
randomDriftRange | number | Drift range and speed |
collisions | boolean | Enable collisions |