Fork me on GitHub
View source

package haxepunk.graphics.emitter

class Emitter


extends BaseEmitter_haxepunk_graphics_Spritemap

Particle emitter used for emitting and rendering particle sprites. Good rendering performance with large amounts of particles.

Constructor

View source

new (source : TileType, frameWidth : Int = 0, frameHeight : Int = 0) : Void

Constructor. Sets the source image to use for newly added particle types.


Parameters:
source   

Source image.

frameWidth   

Frame width.

frameHeight   

Frame height.

Functions

View source

newType (name : String, frames : Array<Int>, blendMode : BlendMode) : ParticleType

Creates a new Particle type for this Emitter.


Parameters:
name   

Name of the particle type.

frames   

Array of frame indices for the particles to animate.


Returns:

A new ParticleType object.