Class particleEmitter2D
Extends
entity.
particleEmitter2D
Defined in: particleEmitter.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Particle emitters are a means of producing particle effects
that are both more efficiently rendered and rendered with relatively
few configurations.
|
Field Attributes | Field Name and Description |
---|---|
Enable texture filtering for each particle emitted.
|
|
Enable translucency for each each particle drawn.
|
Method Attributes | Method Name and Description |
---|---|
emitParticle(p, count)
Instantiates a particle in 2D space based on a stored design.
|
- Methods borrowed from class entity:
- addComponent, attach, contains, createChild, detach, draw, drawDuration, findChildByName, getAllSubEntities, getChildren, getComponents, getNumChildren, getParent, getPriority, hasParent, queryComponent, remove, removeComponent, setPriority, setPriorityFirst, setPriorityLast, step, stepDuration, valid
Class Detail
particleEmitter2D()
Particle emitters are a means of producing particle effects
that are both more efficiently rendered and rendered with relatively
few configurations. By importing a particle specification file to
define a particle (sandboxe.assets.load), you can instantiate
a pseudorandomixed effect with a single call.
Field Detail
filtered
Enable texture filtering for each particle emitted.
It is enabled by default.
translucent
Enable translucency for each each particle drawn.
It is enabled by default.
Method Detail
emitParticle(p, count)
Instantiates a particle in 2D space based on a stored design.
- Parameters:
- {asset} p
- The name of the particle design to emit. If p does not refer to a stored particle, then no particle is emitted and the reference returned is invalid.
- {Number} count
- number of these particles to emit.