From ad69a857f904b9c63b9e34a92fb42f260467bd57 Mon Sep 17 00:00:00 2001 From: andrewstart Date: Tue, 14 Mar 2017 18:09:01 -0400 Subject: [PATCH] 2.1.5 --- ambient.d.ts | 2 +- bower.json | 2 +- dist/pixi-particles.js | 33 ++++++++++++++++++++++++++++++--- dist/pixi-particles.js.map | 2 +- dist/pixi-particles.min.js | 6 +++--- dist/pixi-particles.min.js.map | 2 +- index.d.ts | 2 +- package.json | 2 +- 8 files changed, 39 insertions(+), 12 deletions(-) diff --git a/ambient.d.ts b/ambient.d.ts index 8c1473a2..5be7f3f9 100644 --- a/ambient.d.ts +++ b/ambient.d.ts @@ -1,4 +1,4 @@ -// Typings for pixi-particles 2.1.4, requires Pixi.js typings +// Typings for pixi-particles 2.1.5, requires Pixi.js typings declare namespace PIXI.particles { type TexSrc = string|PIXI.Texture; diff --git a/bower.json b/bower.json index 60eb7720..7085939b 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pixi-particles", - "version": "2.1.4", + "version": "2.1.5", "main": "dist/pixi-particles.min.js", "dependencies": { "pixi.js": "*" diff --git a/dist/pixi-particles.js b/dist/pixi-particles.js index a6891435..2e097fbd 100644 --- a/dist/pixi-particles.js +++ b/dist/pixi-particles.js @@ -1,6 +1,6 @@ /*! - * pixi-particles - v2.1.4 - * Compiled Sat, 04 Mar 2017 20:58:06 UTC + * pixi-particles - v2.1.5 + * Compiled Tue, 14 Mar 2017 22:08:59 UTC * * pixi-particles is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license @@ -594,6 +594,13 @@ var Emitter = function(particleParent, particleImages, config) * @private */ this._autoUpdate = false; + /** + * If the emitter should destroy itself when all particles have died out. This is set by + * playOnceAndDestroy(); + * @property {Boolean} _destroyWhenComplete + * @private + */ + this._destroyWhenComplete = false; //set the initial parent this.parent = particleParent; @@ -999,6 +1006,18 @@ Object.defineProperty(p, "autoUpdate", } }); +/** + * Starts emitting particles, sets autoUpdate to true, and sets up the Emitter to destroy itself + * when particle emission is complete. + * @method PIXI.particles.Emitter#playOnceAndDestroy + */ +p.playOnceAndDestroy = function() +{ + this.autoUpdate = true; + this.emit = true; + this._destroyWhenComplete = true; +}; + /** * Updates all particles spawned by this emitter and emits new ones. * @method PIXI.particles.Emitter#update @@ -1032,7 +1051,7 @@ p.update = function(delta) var curX = this.ownerPos.x + this.spawnPos.x; var curY = this.ownerPos.y + this.spawnPos.y; //spawn new particles - if (this.emit) + if (this._emit) { //decrease spawn timer this._spawnTimer -= delta; @@ -1213,6 +1232,12 @@ p.update = function(delta) this._prevPosIsValid = true; this._posChanged = false; } + + //if we are all done and should destroy ourselves, take care of that + if (this._destroyWhenComplete && !this._emit && !this._activeParticlesFirst) + { + this.destroy(); + } }; /** @@ -1386,6 +1411,8 @@ p.cleanup = function() */ p.destroy = function() { + //make sure we aren't still listening to any tickers + this.autoUpdate = false; //puts all active particles in the pool, and removes them from the particle parent this.cleanup(); //wipe the pool clean diff --git a/dist/pixi-particles.js.map b/dist/pixi-particles.js.map index 3f1a2da7..23850a63 100644 --- a/dist/pixi-particles.js.map +++ b/dist/pixi-particles.js.map @@ -1 +1 @@ -{"version":3,"sources":["node_modules/browser-pack/_prelude.js","src/AnimatedParticle.js","src/Emitter.js","src/Particle.js","src/ParticleUtils.js","src/PathParticle.js","src/deprecation.js","src/particles.js","src/polyfills.js","src"],"names":[],"mappings":";;;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACndA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvOA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"pixi-particles.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o= 0)\n\t{\n\t\tthis.elapsed += delta;\n\t\tif(this.elapsed > this.duration)\n\t\t{\n\t\t\t//loop elapsed back around\n\t\t\tif(this.loop)\n\t\t\t\tthis.elapsed = this.elapsed % this.duration;\n\t\t\t//subtract a small amount to prevent attempting to go past the end of the animation\n\t\t\telse\n\t\t\t\tthis.elapsed = this.duration - 0.000001;\n\t\t}\n\t\tvar frame = (this.elapsed * this.framerate + 0.0000001) | 0;\n\t\tthis.texture = this.textures[frame] || ParticleUtils.EMPTY_TEXTURE;\n\t}\n};\n\np.Particle_destroy = Particle.prototype.destroy;\n/**\n * Destroys the particle, removing references and preventing future use.\n * @method PIXI.particles.AnimatedParticle#destroy\n */\np.destroy = function()\n{\n\tthis.Particle_destroy();\n\tthis.textures = null;\n};\n\n/**\n * Checks over the art that was passed to the Emitter's init() function, to do any special\n * modifications to prepare it ahead of time.\n * @method PIXI.particles.AnimatedParticle.parseArt\n * @static\n * @param {Array} art The array of art data, properly formatted for AnimatedParticle.\n * @return {Array} The art, after any needed modifications.\n */\nAnimatedParticle.parseArt = function(art)\n{\n\tvar i, data, output = [], j, textures, tex, outTextures;\n\tfor(i = 0; i < art.length; ++i)\n\t{\n\t\tdata = art[i];\n\t\tart[i] = output = {};\n\t\toutput.textures = outTextures = [];\n\t\ttextures = data.textures;\n\t\tfor(j = 0; j < textures.length; ++j)\n\t\t{\n\t\t\ttex = textures[j];\n\t\t\tif(typeof tex == \"string\")\n\t\t\t\toutTextures.push(Texture.fromImage(tex));\n\t\t\telse if(tex instanceof Texture)\n\t\t\t\toutTextures.push(tex);\n\t\t\t//assume an object with extra data determining duplicate frame data\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar dupe = tex.count || 1;\n\t\t\t\tif(typeof tex.texture == \"string\")\n\t\t\t\t\ttex = Texture.fromImage(tex.texture);\n\t\t\t\telse// if(tex.texture instanceof Texture)\n\t\t\t\t\ttex = tex.texture;\n\t\t\t\tfor(; dupe > 0; --dupe)\n\t\t\t\t{\n\t\t\t\t\toutTextures.push(tex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//use these values to signify that the animation should match the particle life time.\n\t\tif(data.framerate == \"matchLife\")\n\t\t{\n\t\t\t//-1 means that it should be calculated\n\t\t\toutput.framerate = -1;\n\t\t\toutput.duration = 0;\n\t\t\toutput.loop = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//determine if the animation should loop\n\t\t\toutput.loop = !!data.loop;\n\t\t\t//get the framerate, default to 60\n\t\t\toutput.framerate = data.framerate > 0 ? data.framerate : 60;\n\t\t\t//determine the duration\n\t\t\toutput.duration = outTextures.length / output.framerate;\n\t\t}\n\t}\n\n\treturn art;\n};\n\nmodule.exports = AnimatedParticle;","\"use strict\";\n\nvar ParticleUtils = require(\"./ParticleUtils\"),\n\tParticle = require(\"./Particle\"),\n\tParticleContainer = PIXI.particles.ParticleContainer || PIXI.ParticleContainer,\n\tticker = PIXI.ticker.shared;\n\n/**\n * A particle emitter.\n * @memberof PIXI.particles\n * @class Emitter\n * @constructor\n * @param {PIXI.DisplayObjectContainer} particleParent The display object to add the\n * particles to.\n * @param {Array|PIXI.Texture|String} [particleImages] A texture or array of textures to use\n * for the particles. Strings will be turned\n * into textures via Texture.fromImage().\n * @param {Object} [config] A configuration object containing settings for the emitter.\n * @param {Boolean} [config.emit=true] If config.emit is explicitly passed as false, the Emitter\n * will start disabled.\n * @param {Boolean} [config.autoUpdate=false] If config.emit is explicitly passed as true, the Emitter\n * will automatically call update via the PIXI shared ticker.\n */\nvar Emitter = function(particleParent, particleImages, config)\n{\n\t/**\n\t * The constructor used to create new particles. The default is\n\t * the built in particle class.\n\t * @property {Function} _particleConstructor\n\t * @private\n\t */\n\tthis._particleConstructor = Particle;\n\t//properties for individual particles\n\t/**\n\t * An array of PIXI Texture objects.\n\t * @property {Array} particleImages\n\t */\n\tthis.particleImages = null;\n\t/**\n\t * The starting alpha of all particles.\n\t * @property {Number} startAlpha\n\t * @default 1\n\t */\n\tthis.startAlpha = 1;\n\t/**\n\t * The ending alpha of all particles.\n\t * @property {Number} endAlpha\n\t * @default 1\n\t */\n\tthis.endAlpha = 1;\n\t/**\n\t * The starting speed of all particles.\n\t * @property {Number} startSpeed\n\t * @default 0\n\t */\n\tthis.startSpeed = 0;\n\t/**\n\t * The ending speed of all particles.\n\t * @property {Number} endSpeed\n\t * @default 0\n\t */\n\tthis.endSpeed = 0;\n\t/**\n\t * A minimum multiplier for the speed of a particle at both start and\n\t * end. A value between minimumSpeedMultiplier and 1 is randomly generated\n\t * and multiplied with startSpeed and endSpeed to provide the actual\n\t * startSpeed and endSpeed for each particle.\n\t * @property {Number} minimumSpeedMultiplier\n\t * @default 1\n\t */\n\tthis.minimumSpeedMultiplier = 1;\n\t/**\n\t * Acceleration to apply to particles. Using this disables\n\t * any interpolation of particle speed. If the particles do\n\t * not have a rotation speed, then they will be rotated to\n\t * match the direction of travel.\n\t * @property {PIXI.Point} acceleration\n\t * @default null\n\t */\n\tthis.acceleration = null;\n\t/**\n\t * The maximum speed allowed for accelerating particles. Negative values, values of 0 or NaN\n\t * will disable the maximum speed.\n\t * @property {Number} maxSpeed\n\t * @default NaN\n\t */\n\tthis.maxSpeed = NaN;\n\t/**\n\t * The starting scale of all particles.\n\t * @property {Number} startScale\n\t * @default 1\n\t */\n\tthis.startScale = 1;\n\t/**\n\t * The ending scale of all particles.\n\t * @property {Number} endScale\n\t * @default 1\n\t */\n\tthis.endScale = 1;\n\t/**\n\t * A minimum multiplier for the scale of a particle at both start and\n\t * end. A value between minimumScaleMultiplier and 1 is randomly generated\n\t * and multiplied with startScale and endScale to provide the actual\n\t * startScale and endScale for each particle.\n\t * @property {Number} minimumScaleMultiplier\n\t * @default 1\n\t */\n\tthis.minimumScaleMultiplier = 1;\n\t/**\n\t * The starting color of all particles, as red, green, and blue uints from 0-255.\n\t * @property {Array} startColor\n\t */\n\tthis.startColor = null;\n\t/**\n\t * The ending color of all particles, as red, green, and blue uints from 0-255.\n\t * @property {Array} endColor\n\t */\n\tthis.endColor = null;\n\t/**\n\t * The minimum lifetime for a particle, in seconds.\n\t * @property {Number} minLifetime\n\t */\n\tthis.minLifetime = 0;\n\t/**\n\t * The maximum lifetime for a particle, in seconds.\n\t * @property {Number} maxLifetime\n\t */\n\tthis.maxLifetime = 0;\n\t/**\n\t * The minimum start rotation for a particle, in degrees. This value\n\t * is ignored if the spawn type is \"burst\" or \"arc\".\n\t * @property {Number} minStartRotation\n\t */\n\tthis.minStartRotation = 0;\n\t/**\n\t * The maximum start rotation for a particle, in degrees. This value\n\t * is ignored if the spawn type is \"burst\" or \"arc\".\n\t * @property {Number} maxStartRotation\n\t */\n\tthis.maxStartRotation = 0;\n\t/**\n\t * If no particle rotation should occur. Starting rotation will still\n\t * affect the direction in which particles move. If the rotation speed\n\t * is set, then this will be ignored.\n\t * @property {Boolean} maxStartRotation\n\t */\n\tthis.noRotation = false;\n\t/**\n\t * The minimum rotation speed for a particle, in degrees per second.\n\t * This only visually spins the particle, it does not change direction\n\t * of movement.\n\t * @property {Number} minRotationSpeed\n\t */\n\tthis.minRotationSpeed = 0;\n\t/**\n\t * The maximum rotation speed for a particle, in degrees per second.\n\t * This only visually spins the particle, it does not change direction\n\t * of movement.\n\t * @property {Number} maxRotationSpeed\n\t */\n\tthis.maxRotationSpeed = 0;\n\t/**\n\t * The blend mode for all particles, as named by PIXI.blendModes.\n\t * @property {int} particleBlendMode\n\t */\n\tthis.particleBlendMode = 0;\n\t/**\n\t * An easing function for nonlinear interpolation of values. Accepts a single\n\t * parameter of time as a value from 0-1, inclusive. Expected outputs are values\n\t * from 0-1, inclusive.\n\t * @property {Function} customEase\n\t */\n\tthis.customEase = null;\n\t/**\n\t *\tExtra data for use in custom particles. The emitter doesn't look inside, but\n\t *\tpasses it on to the particle to use in init().\n\t *\t@property {Object} extraData\n\t */\n\tthis.extraData = null;\n\t//properties for spawning particles\n\t/**\n\t * Time between particle spawns in seconds.\n\t * @property {Number} _frequency\n\t * @private\n\t */\n\tthis._frequency = 1;\n\t/**\n\t * Maximum number of particles to keep alive at a time. If this limit\n\t * is reached, no more particles will spawn until some have died.\n\t * @property {int} maxParticles\n\t * @default 1000\n\t */\n\tthis.maxParticles = 1000;\n\t/**\n\t * The amount of time in seconds to emit for before setting emit to false.\n\t * A value of -1 is an unlimited amount of time.\n\t * @property {Number} emitterLifetime\n\t * @default -1\n\t */\n\tthis.emitterLifetime = -1;\n\t/**\n\t * Position at which to spawn particles, relative to the emitter's owner's origin.\n\t * For example, the flames of a rocket travelling right might have a spawnPos\n\t * of {x:-50, y:0}.\n\t * to spawn at the rear of the rocket.\n\t * To change this, use updateSpawnPos().\n\t * @property {PIXI.Point} spawnPos\n\t * @readOnly\n\t */\n\tthis.spawnPos = null;\n\t/**\n\t * How the particles will be spawned. Valid types are \"point\", \"rectangle\",\n\t * \"circle\", \"burst\", \"ring\".\n\t * @property {String} spawnType\n\t * @readOnly\n\t */\n\tthis.spawnType = null;\n\t/**\n\t * A reference to the emitter function specific to the spawn type.\n\t * @property {Function} _spawnFunc\n\t * @private\n\t */\n\tthis._spawnFunc = null;\n\t/**\n\t * A rectangle relative to spawnPos to spawn particles inside if the spawn type is \"rect\".\n\t * @property {PIXI.Rectangle} spawnRect\n\t */\n\tthis.spawnRect = null;\n\t/**\n\t * A circle relative to spawnPos to spawn particles inside if the spawn type is \"circle\".\n\t * @property {PIXI.Circle} spawnCircle\n\t */\n\tthis.spawnCircle = null;\n\t/**\n\t * Number of particles to spawn each wave in a burst.\n\t * @property {int} particlesPerWave\n\t * @default 1\n\t */\n\tthis.particlesPerWave = 1;\n\t/**\n\t * Spacing between particles in a burst. 0 gives a random angle for each particle.\n\t * @property {Number} particleSpacing\n\t * @default 0\n\t */\n\tthis.particleSpacing = 0;\n\t/**\n\t * Angle at which to start spawning particles in a burst.\n\t * @property {Number} angleStart\n\t * @default 0\n\t */\n\tthis.angleStart = 0;\n\t/**\n\t * Rotation of the emitter or emitter's owner in degrees. This is added to\n\t * the calculated spawn angle.\n\t * To change this, use rotate().\n\t * @property {Number} rotation\n\t * @default 0\n\t * @readOnly\n\t */\n\tthis.rotation = 0;\n\t/**\n\t * The world position of the emitter's owner, to add spawnPos to when\n\t * spawning particles. To change this, use updateOwnerPos().\n\t * @property {PIXI.Point} ownerPos\n\t * @default {x:0, y:0}\n\t * @readOnly\n\t */\n\tthis.ownerPos = null;\n\t/**\n\t * The origin + spawnPos in the previous update, so that the spawn position\n\t * can be interpolated to space out particles better.\n\t * @property {PIXI.Point} _prevEmitterPos\n\t * @private\n\t */\n\tthis._prevEmitterPos = null;\n\t/**\n\t * If _prevEmitterPos is valid, to prevent interpolation on the first update\n\t * @property {Boolean} _prevPosIsValid\n\t * @private\n\t * @default false\n\t */\n\tthis._prevPosIsValid = false;\n\t/**\n\t * If either ownerPos or spawnPos has changed since the previous update.\n\t * @property {Boolean} _posChanged\n\t * @private\n\t */\n\tthis._posChanged = false;\n\t/**\n\t * If the parent is a ParticleContainer from Pixi V3\n\t * @property {Boolean} _parentIsPC\n\t * @private\n\t */\n\tthis._parentIsPC = false;\n\t/**\n\t * The display object to add particles to.\n\t * @property {PIXI.DisplayObjectContainer} _parent\n\t * @private\n\t */\n\tthis._parent = null;\n\t/**\n\t * If particles should be added at the back of the display list instead of the front.\n\t * @property {Boolean} addAtBack\n\t */\n\tthis.addAtBack = false;\n\t/**\n\t * The current number of active particles.\n\t * @property {Number} particleCount\n\t * @readOnly\n\t */\n\tthis.particleCount = 0;\n\t/**\n\t * If particles should be emitted during update() calls. Setting this to false\n\t * stops new particles from being created, but allows existing ones to die out.\n\t * @property {Boolean} _emit\n\t * @private\n\t */\n\tthis._emit = false;\n\t/**\n\t * The timer for when to spawn particles in seconds, where numbers less\n\t * than 0 mean that particles should be spawned.\n\t * @property {Number} _spawnTimer\n\t * @private\n\t */\n\tthis._spawnTimer = 0;\n\t/**\n\t * The life of the emitter in seconds.\n\t * @property {Number} _emitterLife\n\t * @private\n\t */\n\tthis._emitterLife = -1;\n\t/**\n\t * The particles that are active and on the display list. This is the first particle in a\n\t * linked list.\n\t * @property {Particle} _activeParticlesFirst\n\t * @private\n\t */\n\tthis._activeParticlesFirst = null;\n\t/**\n\t * The particles that are active and on the display list. This is the last particle in a\n\t * linked list.\n\t * @property {Particle} _activeParticlesLast\n\t * @private\n\t */\n\tthis._activeParticlesLast = null;\n\t/**\n\t * The particles that are not currently being used. This is the first particle in a\n\t * linked list.\n\t * @property {Particle} _poolFirst\n\t * @private\n\t */\n\tthis._poolFirst = null;\n\t/**\n\t * The original config object that this emitter was initialized with.\n\t * @property {Object} _origConfig\n\t * @private\n\t */\n\tthis._origConfig = null;\n\t/**\n\t * The original particle image data that this emitter was initialized with.\n\t * @property {PIXI.Texture|Array|String} _origArt\n\t * @private\n\t */\n\tthis._origArt = null;\n\t/**\n\t * If the update function is called automatically from the shared ticker.\n\t * Setting this to false requires calling the update function manually.\n\t * @property {Boolean} _autoUpdate\n\t * @private\n\t */\n\tthis._autoUpdate = false;\n\n\t//set the initial parent\n\tthis.parent = particleParent;\n\n\tif(particleImages && config)\n\t\tthis.init(particleImages, config);\n\n\t//save often used functions on the instance instead of the prototype for better speed\n\tthis.recycle = this.recycle;\n\tthis.update = this.update;\n\tthis.rotate = this.rotate;\n\tthis.updateSpawnPos = this.updateSpawnPos;\n\tthis.updateOwnerPos = this.updateOwnerPos;\n};\n\n// Reference to the prototype\nvar p = Emitter.prototype = {};\n\nvar helperPoint = new PIXI.Point();\n\n/**\n * Time between particle spawns in seconds. If this value is not a number greater than 0,\n * it will be set to 1 (particle per second) to prevent infinite loops.\n * @member {Number} PIXI.particles.Emitter#frequency\n */\nObject.defineProperty(p, \"frequency\",\n{\n\tget: function() { return this._frequency; },\n\tset: function(value)\n\t{\n\t\t//do some error checking to prevent infinite loops\n\t\tif(typeof value == \"number\" && value > 0)\n\t\t\tthis._frequency = value;\n\t\telse\n\t\t\tthis._frequency = 1;\n\t}\n});\n\n/**\n * The constructor used to create new particles. The default is\n * the built in Particle class. Setting this will dump any active or\n * pooled particles, if the emitter has already been used.\n * @member {Function} PIXI.particles.Emitter#particleConstructor\n */\nObject.defineProperty(p, \"particleConstructor\",\n{\n\tget: function() { return this._particleConstructor; },\n\tset: function(value)\n\t{\n\t\tif(value != this._particleConstructor)\n\t\t{\n\t\t\tthis._particleConstructor = value;\n\t\t\t//clean up existing particles\n\t\t\tthis.cleanup();\n\t\t\t//scrap all the particles\n\t\t\tfor (var particle = this._poolFirst; particle; particle = particle.next)\n\t\t\t{\n\t\t\t\tparticle.destroy();\n\t\t\t}\n\t\t\tthis._poolFirst = null;\n\t\t\t//re-initialize the emitter so that the new constructor can do anything it needs to\n\t\t\tif(this._origConfig && this._origArt)\n\t\t\t\tthis.init(this._origArt, this._origConfig);\n\t\t}\n\t}\n});\n\n/**\n* The display object to add particles to. Settings this will dump any active particles.\n* @member {PIXI.DisplayObjectContainer} PIXI.particles.Emitter#parent\n*/\nObject.defineProperty(p, \"parent\",\n{\n\tget: function() { return this._parent; },\n\tset: function(value)\n\t{\n\t\t//if our previous parent was a ParticleContainer, then we need to remove\n\t\t//pooled particles from it\n\t\tif (this._parentIsPC) {\n\t\t\tfor (var particle = this._poolFirst; particle; particle = particle.next)\n\t\t\t{\n\t\t\t\tif(particle.parent)\n\t\t\t\t\tparticle.parent.removeChild(particle);\n\t\t\t}\n\t\t}\n\t\tthis.cleanup();\n\t\tthis._parent = value;\n\t\tthis._parentIsPC = ParticleContainer && value && value instanceof ParticleContainer;\n\t}\n});\n\n/**\n * Sets up the emitter based on the config settings.\n * @method PIXI.particles.Emitter#init\n * @param {Array|PIXI.Texture} art A texture or array of textures to use for the particles.\n * @param {Object} config A configuration object containing settings for the emitter.\n */\np.init = function(art, config)\n{\n\tif(!art || !config)\n\t\treturn;\n\t//clean up any existing particles\n\tthis.cleanup();\n\n\t//store the original config and particle images, in case we need to re-initialize\n\t//when the particle constructor is changed\n\tthis._origConfig = config;\n\tthis._origArt = art;\n\n\t//set up the array of data, also ensuring that it is an array\n\tart = Array.isArray(art) ? art.slice() : [art];\n\t//run the art through the particle class's parsing function\n\tvar partClass = this._particleConstructor;\n\tthis.particleImages = partClass.parseArt ? partClass.parseArt(art) : art;\n\t///////////////////////////\n\t// Particle Properties //\n\t///////////////////////////\n\t//set up the alpha\n\tif (config.alpha)\n\t{\n\t\tthis.startAlpha = config.alpha.start;\n\t\tthis.endAlpha = config.alpha.end;\n\t}\n\telse\n\t\tthis.startAlpha = this.endAlpha = 1;\n\t//set up the speed\n\tif (config.speed)\n\t{\n\t\tthis.startSpeed = config.speed.start;\n\t\tthis.endSpeed = config.speed.end;\n\t\tthis.minimumSpeedMultiplier = config.speed.minimumSpeedMultiplier || 1;\n\t}\n\telse\n\t{\n\t\tthis.minimumSpeedMultiplier = 1;\n\t\tthis.startSpeed = this.endSpeed = 0;\n\t}\n\t//set up acceleration\n\tvar acceleration = config.acceleration;\n\tif(acceleration && (acceleration.x || acceleration.y))\n\t{\n\t\tthis.endSpeed = this.startSpeed;\n\t\tthis.acceleration = new PIXI.Point(acceleration.x, acceleration.y);\n\t\tthis.maxSpeed = config.maxSpeed || NaN;\n\t}\n\telse\n\t\tthis.acceleration = new PIXI.Point();\n\t//set up the scale\n\tif (config.scale)\n\t{\n\t\tthis.startScale = config.scale.start;\n\t\tthis.endScale = config.scale.end;\n\t\tthis.minimumScaleMultiplier = config.scale.minimumScaleMultiplier || 1;\n\t}\n\telse\n\t\tthis.startScale = this.endScale = this.minimumScaleMultiplier = 1;\n\t//set up the color\n\tif (config.color)\n\t{\n\t\tthis.startColor = ParticleUtils.hexToRGB(config.color.start);\n\t\t//if it's just one color, only use the start color\n\t\tif (config.color.start != config.color.end)\n\t\t{\n\t\t\tthis.endColor = ParticleUtils.hexToRGB(config.color.end);\n\t\t}\n\t\telse\n\t\t\tthis.endColor = null;\n\t}\n\t//set up the start rotation\n\tif (config.startRotation)\n\t{\n\t\tthis.minStartRotation = config.startRotation.min;\n\t\tthis.maxStartRotation = config.startRotation.max;\n\t}\n\telse\n\t\tthis.minStartRotation = this.maxStartRotation = 0;\n\tif (config.noRotation &&\n\t\t(this.minStartRotation || this.maxStartRotation))\n\t{\n\t\tthis.noRotation = !!config.noRotation;\n\t}\n\telse\n\t\tthis.noRotation = false;\n\t//set up the rotation speed\n\tif (config.rotationSpeed)\n\t{\n\t\tthis.minRotationSpeed = config.rotationSpeed.min;\n\t\tthis.maxRotationSpeed = config.rotationSpeed.max;\n\t}\n\telse\n\t\tthis.minRotationSpeed = this.maxRotationSpeed = 0;\n\t//set up the lifetime\n\tthis.minLifetime = config.lifetime.min;\n\tthis.maxLifetime = config.lifetime.max;\n\t//get the blend mode\n\tthis.particleBlendMode = ParticleUtils.getBlendMode(config.blendMode);\n\t//use the custom ease if provided\n\tif (config.ease)\n\t{\n\t\tthis.customEase = typeof config.ease == \"function\" ?\n\t\t\t\t\t\t\t\t\t\t\t\t\tconfig.ease :\n\t\t\t\t\t\t\t\t\t\t\t\t\tParticleUtils.generateEase(config.ease);\n\t}\n\telse\n\t\tthis.customEase = null;\n\t//set up the extra data, running it through the particle class's parseData function.\n\tif(partClass.parseData)\n\t\tthis.extraData = partClass.parseData(config.extraData);\n\telse\n\t\tthis.extraData = config.extraData || null;\n\t//////////////////////////\n\t// Emitter Properties //\n\t//////////////////////////\n\t//reset spawn type specific settings\n\tthis.spawnRect = this.spawnCircle = null;\n\tthis.particlesPerWave = 1;\n\tthis.particleSpacing = 0;\n\tthis.angleStart = 0;\n\tvar spawnCircle;\n\t//determine the spawn function to use\n\tswitch(config.spawnType)\n\t{\n\t\tcase \"rect\":\n\t\t\tthis.spawnType = \"rect\";\n\t\t\tthis._spawnFunc = this._spawnRect;\n\t\t\tvar spawnRect = config.spawnRect;\n\t\t\tthis.spawnRect = new PIXI.Rectangle(spawnRect.x, spawnRect.y, spawnRect.w, spawnRect.h);\n\t\t\tbreak;\n\t\tcase \"circle\":\n\t\t\tthis.spawnType = \"circle\";\n\t\t\tthis._spawnFunc = this._spawnCircle;\n\t\t\tspawnCircle = config.spawnCircle;\n\t\t\tthis.spawnCircle = new PIXI.Circle(spawnCircle.x, spawnCircle.y, spawnCircle.r);\n\t\t\tbreak;\n\t\tcase \"ring\":\n\t\t\tthis.spawnType = \"ring\";\n\t\t\tthis._spawnFunc = this._spawnRing;\n\t\t\tspawnCircle = config.spawnCircle;\n\t\t\tthis.spawnCircle = new PIXI.Circle(spawnCircle.x, spawnCircle.y, spawnCircle.r);\n\t\t\tthis.spawnCircle.minRadius = spawnCircle.minR;\n\t\t\tbreak;\n\t\tcase \"burst\":\n\t\t\tthis.spawnType = \"burst\";\n\t\t\tthis._spawnFunc = this._spawnBurst;\n\t\t\tthis.particlesPerWave = config.particlesPerWave;\n\t\t\tthis.particleSpacing = config.particleSpacing;\n\t\t\tthis.angleStart = config.angleStart ? config.angleStart : 0;\n\t\t\tbreak;\n\t\tcase \"point\":\n\t\t\tthis.spawnType = \"point\";\n\t\t\tthis._spawnFunc = this._spawnPoint;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthis.spawnType = \"point\";\n\t\t\tthis._spawnFunc = this._spawnPoint;\n\t\t\tbreak;\n\t}\n\t//set the spawning frequency\n\tthis.frequency = config.frequency;\n\t//set the emitter lifetime\n\tthis.emitterLifetime = config.emitterLifetime || -1;\n\t//set the max particles\n\tthis.maxParticles = config.maxParticles > 0 ? config.maxParticles : 1000;\n\t//determine if we should add the particle at the back of the list or not\n\tthis.addAtBack = !!config.addAtBack;\n\t//reset the emitter position and rotation variables\n\tthis.rotation = 0;\n\tthis.ownerPos = new PIXI.Point();\n\tthis.spawnPos = new PIXI.Point(config.pos.x, config.pos.y);\n\tthis._prevEmitterPos = this.spawnPos.clone();\n\t//previous emitter position is invalid and should not be used for interpolation\n\tthis._prevPosIsValid = false;\n\t//start emitting\n\tthis._spawnTimer = 0;\n\tthis.emit = config.emit === undefined ? true : !!config.emit;\n\tthis.autoUpdate = config.autoUpdate === undefined ? false : !!config.autoUpdate;\n};\n\n/**\n * Recycles an individual particle.\n * @method PIXI.particles.Emitter#recycle\n * @param {Particle} particle The particle to recycle.\n * @private\n */\np.recycle = function(particle)\n{\n\tif(particle.next)\n\t\tparticle.next.prev = particle.prev;\n\tif(particle.prev)\n\t\tparticle.prev.next = particle.next;\n\tif(particle == this._activeParticlesLast)\n\t\tthis._activeParticlesLast = particle.prev;\n\tif(particle == this._activeParticlesFirst)\n\t\tthis._activeParticlesFirst = particle.next;\n\t//add to pool\n\tparticle.prev = null;\n\tparticle.next = this._poolFirst;\n\tthis._poolFirst = particle;\n\t//remove child from display, or make it invisible if it is in a ParticleContainer\n\tif(this._parentIsPC)\n\t{\n\t\tparticle.alpha = 0;\n\t\tparticle.visible = false;\n\t}\n\telse\n\t{\n\t\tif(particle.parent)\n\t\t\tparticle.parent.removeChild(particle);\n\t}\n\t//decrease count\n\t--this.particleCount;\n};\n\n/**\n * Sets the rotation of the emitter to a new value.\n * @method PIXI.particles.Emitter#rotate\n * @param {Number} newRot The new rotation, in degrees.\n */\np.rotate = function(newRot)\n{\n\tif (this.rotation == newRot) return;\n\t//caclulate the difference in rotation for rotating spawnPos\n\tvar diff = newRot - this.rotation;\n\tthis.rotation = newRot;\n\t//rotate spawnPos\n\tParticleUtils.rotatePoint(diff, this.spawnPos);\n\t//mark the position as having changed\n\tthis._posChanged = true;\n};\n\n/**\n * Changes the spawn position of the emitter.\n * @method PIXI.particles.Emitter#updateSpawnPos\n * @param {Number} x The new x value of the spawn position for the emitter.\n * @param {Number} y The new y value of the spawn position for the emitter.\n */\np.updateSpawnPos = function(x, y)\n{\n\tthis._posChanged = true;\n\tthis.spawnPos.x = x;\n\tthis.spawnPos.y = y;\n};\n\n/**\n * Changes the position of the emitter's owner. You should call this if you are adding\n * particles to the world display object that your emitter's owner is moving around in.\n * @method PIXI.particles.Emitter#updateOwnerPos\n * @param {Number} x The new x value of the emitter's owner.\n * @param {Number} y The new y value of the emitter's owner.\n */\np.updateOwnerPos = function(x, y)\n{\n\tthis._posChanged = true;\n\tthis.ownerPos.x = x;\n\tthis.ownerPos.y = y;\n};\n\n/**\n * Prevents emitter position interpolation in the next update.\n * This should be used if you made a major position change of your emitter's owner\n * that was not normal movement.\n * @method PIXI.particles.Emitter#resetPositionTracking\n */\np.resetPositionTracking = function()\n{\n\tthis._prevPosIsValid = false;\n};\n\n/**\n * If particles should be emitted during update() calls. Setting this to false\n * stops new particles from being created, but allows existing ones to die out.\n * @member {Boolean} PIXI.particles.Emitter#emit\n */\nObject.defineProperty(p, \"emit\",\n{\n\tget: function() { return this._emit; },\n\tset: function(value)\n\t{\n\t\tthis._emit = !!value;\n\t\tthis._emitterLife = this.emitterLifetime;\n\t}\n});\n\n/**\n * If the update function is called automatically from the shared ticker.\n * Setting this to false requires calling the update function manually.\n * @member {Boolean} PIXI.particles.Emitter#autoUpdate\n */\nObject.defineProperty(p, \"autoUpdate\",\n{\n\tget: function() { return this._autoUpdate; },\n\tset: function(value)\n\t{\n\t\tif (this._autoUpdate && !value)\n\t\t{\n\t\t\tticker.remove(this.update, this);\n\t\t}\n\t\telse if (!this._autoUpdate && value)\n\t\t{\n\t\t\tticker.add(this.update, this);\n\t\t}\n\t\tthis._autoUpdate = !!value;\n\t}\n});\n\n/**\n * Updates all particles spawned by this emitter and emits new ones.\n * @method PIXI.particles.Emitter#update\n * @param {Number} delta Time elapsed since the previous frame, in __seconds__.\n */\np.update = function(delta)\n{\n\tif (this._autoUpdate)\n\t{\n\t\tdelta = delta / PIXI.settings.TARGET_FPMS / 1000;\n\t}\n\n\t//if we don't have a parent to add particles to, then don't do anything.\n\t//this also works as a isDestroyed check\n\tif (!this._parent) return;\n\t//update existing particles\n\tvar i, particle, next;\n\tfor (particle = this._activeParticlesFirst; particle; particle = next)\n\t{\n\t\tnext = particle.next;\n\t\tparticle.update(delta);\n\t}\n\tvar prevX, prevY;\n\t//if the previous position is valid, store these for later interpolation\n\tif(this._prevPosIsValid)\n\t{\n\t\tprevX = this._prevEmitterPos.x;\n\t\tprevY = this._prevEmitterPos.y;\n\t}\n\t//store current position of the emitter as local variables\n\tvar curX = this.ownerPos.x + this.spawnPos.x;\n\tvar curY = this.ownerPos.y + this.spawnPos.y;\n\t//spawn new particles\n\tif (this.emit)\n\t{\n\t\t//decrease spawn timer\n\t\tthis._spawnTimer -= delta;\n\t\t//while _spawnTimer < 0, we have particles to spawn\n\t\twhile(this._spawnTimer <= 0)\n\t\t{\n\t\t\t//determine if the emitter should stop spawning\n\t\t\tif(this._emitterLife > 0)\n\t\t\t{\n\t\t\t\tthis._emitterLife -= this._frequency;\n\t\t\t\tif(this._emitterLife <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis._spawnTimer = 0;\n\t\t\t\t\tthis._emitterLife = 0;\n\t\t\t\t\tthis.emit = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//determine if we have hit the particle limit\n\t\t\tif(this.particleCount >= this.maxParticles)\n\t\t\t{\n\t\t\t\tthis._spawnTimer += this._frequency;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//determine the particle lifetime\n\t\t\tvar lifetime;\n\t\t\tif (this.minLifetime == this.maxLifetime)\n\t\t\t\tlifetime = this.minLifetime;\n\t\t\telse\n\t\t\t\tlifetime = Math.random() * (this.maxLifetime - this.minLifetime) + this.minLifetime;\n\t\t\t//only make the particle if it wouldn't immediately destroy itself\n\t\t\tif(-this._spawnTimer < lifetime)\n\t\t\t{\n\t\t\t\t//If the position has changed and this isn't the first spawn,\n\t\t\t\t//interpolate the spawn position\n\t\t\t\tvar emitPosX, emitPosY;\n\t\t\t\tif (this._prevPosIsValid && this._posChanged)\n\t\t\t\t{\n\t\t\t\t\t//1 - _spawnTimer / delta, but _spawnTimer is negative\n\t\t\t\t\tvar lerp = 1 + this._spawnTimer / delta;\n\t\t\t\t\temitPosX = (curX - prevX) * lerp + prevX;\n\t\t\t\t\temitPosY = (curY - prevY) * lerp + prevY;\n\t\t\t\t}\n\t\t\t\telse//otherwise just set to the spawn position\n\t\t\t\t{\n\t\t\t\t\temitPosX = curX;\n\t\t\t\t\temitPosY = curY;\n\t\t\t\t}\n\t\t\t\t//create enough particles to fill the wave (non-burst types have a wave of 1)\n\t\t\t\ti = 0;\n\t\t\t\tfor(var len = Math.min(this.particlesPerWave, this.maxParticles - this.particleCount); i < len; ++i)\n\t\t\t\t{\n\t\t\t\t\t//create particle\n\t\t\t\t\tvar p, rand;\n\t\t\t\t\tif(this._poolFirst)\n\t\t\t\t\t{\n\t\t\t\t\t\tp = this._poolFirst;\n\t\t\t\t\t\tthis._poolFirst = this._poolFirst.next;\n\t\t\t\t\t\tp.next = null;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tp = new this.particleConstructor(this);\n\t\t\t\t\t}\n\n\t\t\t\t\t//set a random texture if we have more than one\n\t\t\t\t\tif(this.particleImages.length > 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tp.applyArt(this.particleImages.random());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//if they are actually the same texture, a standard particle\n\t\t\t\t\t\t//will quit early from the texture setting in setTexture().\n\t\t\t\t\t\tp.applyArt(this.particleImages[0]);\n\t\t\t\t\t}\n\t\t\t\t\t//set up the start and end values\n\t\t\t\t\tp.startAlpha = this.startAlpha;\n\t\t\t\t\tp.endAlpha = this.endAlpha;\n\t\t\t\t\tif(this.minimumSpeedMultiplier != 1)\n\t\t\t\t\t{\n\t\t\t\t\t\trand = Math.random() * (1 - this.minimumSpeedMultiplier) + this.minimumSpeedMultiplier;\n\t\t\t\t\t\tp.startSpeed = this.startSpeed * rand;\n\t\t\t\t\t\tp.endSpeed = this.endSpeed * rand;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tp.startSpeed = this.startSpeed;\n\t\t\t\t\t\tp.endSpeed = this.endSpeed;\n\t\t\t\t\t}\n\t\t\t\t\tp.acceleration.x = this.acceleration.x;\n\t\t\t\t\tp.acceleration.y = this.acceleration.y;\n\t\t\t\t\tp.maxSpeed = this.maxSpeed;\n\t\t\t\t\tif(this.minimumScaleMultiplier != 1)\n\t\t\t\t\t{\n\t\t\t\t\t\trand = Math.random() * (1 - this.minimumScaleMultiplier) + this.minimumScaleMultiplier;\n\t\t\t\t\t\tp.startScale = this.startScale * rand;\n\t\t\t\t\t\tp.endScale = this.endScale * rand;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tp.startScale = this.startScale;\n\t\t\t\t\t\tp.endScale = this.endScale;\n\t\t\t\t\t}\n\t\t\t\t\tp.startColor = this.startColor;\n\t\t\t\t\tp.endColor = this.endColor;\n\t\t\t\t\t//randomize the rotation speed\n\t\t\t\t\tif(this.minRotationSpeed == this.maxRotationSpeed)\n\t\t\t\t\t\tp.rotationSpeed = this.minRotationSpeed;\n\t\t\t\t\telse\n\t\t\t\t\t\tp.rotationSpeed = Math.random() * (this.maxRotationSpeed - this.minRotationSpeed) + this.minRotationSpeed;\n\t\t\t\t\tp.noRotation = this.noRotation;\n\t\t\t\t\t//set up the lifetime\n\t\t\t\t\tp.maxLife = lifetime;\n\t\t\t\t\t//set the blend mode\n\t\t\t\t\tp.blendMode = this.particleBlendMode;\n\t\t\t\t\t//set the custom ease, if any\n\t\t\t\t\tp.ease = this.customEase;\n\t\t\t\t\t//set the extra data, if any\n\t\t\t\t\tp.extraData = this.extraData;\n\t\t\t\t\t//call the proper function to handle rotation and position of particle\n\t\t\t\t\tthis._spawnFunc(p, emitPosX, emitPosY, i);\n\t\t\t\t\t//initialize particle\n\t\t\t\t\tp.init();\n\t\t\t\t\t//update the particle by the time passed, so the particles are spread out properly\n\t\t\t\t\tp.update(-this._spawnTimer);//we want a positive delta, because a negative delta messes things up\n\t\t\t\t\t//add the particle to the display list\n\t\t\t\t\tif(!this._parentIsPC || !p.parent)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (this.addAtBack)\n\t\t\t\t\t\t\tthis._parent.addChildAt(p, 0);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthis._parent.addChild(p);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//kind of hacky, but performance friendly\n\t\t\t\t\t\t//shuffle children to correct place\n\t\t\t\t\t\tvar children = this._parent.children;\n\t\t\t\t\t\t//avoid using splice if possible\n\t\t\t\t\t\tif(children[0] == p)\n\t\t\t\t\t\t\tchildren.shift();\n\t\t\t\t\t\telse if(children[children.length-1] == p)\n\t\t\t\t\t\t\tchildren.pop();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar index = children.indexOf(p);\n\t\t\t\t\t\t\tchildren.splice(index, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(this.addAtBack)\n\t\t\t\t\t\t\tchildren.unshift(p);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tchildren.push(p);\n\t\t\t\t\t}\n\t\t\t\t\t//add particle to list of active particles\n\t\t\t\t\tif(this._activeParticlesLast)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis._activeParticlesLast.next = p;\n\t\t\t\t\t\tp.prev = this._activeParticlesLast;\n\t\t\t\t\t\tthis._activeParticlesLast = p;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tthis._activeParticlesLast = this._activeParticlesFirst = p;\n\t\t\t\t\t}\n\t\t\t\t\t++this.particleCount;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//increase timer and continue on to any other particles that need to be created\n\t\t\tthis._spawnTimer += this._frequency;\n\t\t}\n\t}\n\t//if the position changed before this update, then keep track of that\n\tif(this._posChanged)\n\t{\n\t\tthis._prevEmitterPos.x = curX;\n\t\tthis._prevEmitterPos.y = curY;\n\t\tthis._prevPosIsValid = true;\n\t\tthis._posChanged = false;\n\t}\n};\n\n/**\n * Positions a particle for a point type emitter.\n * @method PIXI.particles.Emitter#_spawnPoint\n * @private\n * @param {Particle} p The particle to position and rotate.\n * @param {Number} emitPosX The emitter's x position\n * @param {Number} emitPosY The emitter's y position\n * @param {int} i The particle number in the current wave. Not used for this function.\n */\np._spawnPoint = function(p, emitPosX, emitPosY)\n{\n\t//set the initial rotation/direction of the particle based on\n\t//starting particle angle and rotation of emitter\n\tif (this.minStartRotation == this.maxStartRotation)\n\t\tp.rotation = this.minStartRotation + this.rotation;\n\telse\n\t\tp.rotation = Math.random() * (this.maxStartRotation - this.minStartRotation) + this.minStartRotation + this.rotation;\n\t//drop the particle at the emitter's position\n\tp.position.x = emitPosX;\n\tp.position.y = emitPosY;\n};\n\n/**\n * Positions a particle for a rectangle type emitter.\n * @method PIXI.particles.Emitter#_spawnRect\n * @private\n * @param {Particle} p The particle to position and rotate.\n * @param {Number} emitPosX The emitter's x position\n * @param {Number} emitPosY The emitter's y position\n * @param {int} i The particle number in the current wave. Not used for this function.\n */\np._spawnRect = function(p, emitPosX, emitPosY)\n{\n\t//set the initial rotation/direction of the particle based on starting\n\t//particle angle and rotation of emitter\n\tif (this.minStartRotation == this.maxStartRotation)\n\t\tp.rotation = this.minStartRotation + this.rotation;\n\telse\n\t\tp.rotation = Math.random() * (this.maxStartRotation - this.minStartRotation) + this.minStartRotation + this.rotation;\n\t//place the particle at a random point in the rectangle\n\thelperPoint.x = Math.random() * this.spawnRect.width + this.spawnRect.x;\n\thelperPoint.y = Math.random() * this.spawnRect.height + this.spawnRect.y;\n\tif(this.rotation !== 0)\n\t\tParticleUtils.rotatePoint(this.rotation, helperPoint);\n\tp.position.x = emitPosX + helperPoint.x;\n\tp.position.y = emitPosY + helperPoint.y;\n};\n\n/**\n * Positions a particle for a circle type emitter.\n * @method PIXI.particles.Emitter#_spawnCircle\n * @private\n * @param {Particle} p The particle to position and rotate.\n * @param {Number} emitPosX The emitter's x position\n * @param {Number} emitPosY The emitter's y position\n * @param {int} i The particle number in the current wave. Not used for this function.\n */\np._spawnCircle = function(p, emitPosX, emitPosY)\n{\n\t//set the initial rotation/direction of the particle based on starting\n\t//particle angle and rotation of emitter\n\tif (this.minStartRotation == this.maxStartRotation)\n\t\tp.rotation = this.minStartRotation + this.rotation;\n\telse\n\t\tp.rotation = Math.random() * (this.maxStartRotation - this.minStartRotation) +\n\t\t\t\t\tthis.minStartRotation + this.rotation;\n\t//place the particle at a random radius in the circle\n\thelperPoint.x = Math.random() * this.spawnCircle.radius;\n\thelperPoint.y = 0;\n\t//rotate the point to a random angle in the circle\n\tParticleUtils.rotatePoint(Math.random() * 360, helperPoint);\n\t//offset by the circle's center\n\thelperPoint.x += this.spawnCircle.x;\n\thelperPoint.y += this.spawnCircle.y;\n\t//rotate the point by the emitter's rotation\n\tif(this.rotation !== 0)\n\t\tParticleUtils.rotatePoint(this.rotation, helperPoint);\n\t//set the position, offset by the emitter's position\n\tp.position.x = emitPosX + helperPoint.x;\n\tp.position.y = emitPosY + helperPoint.y;\n};\n\n/**\n * Positions a particle for a ring type emitter.\n * @method PIXI.particles.Emitter#_spawnRing\n * @private\n * @param {Particle} p The particle to position and rotate.\n * @param {Number} emitPosX The emitter's x position\n * @param {Number} emitPosY The emitter's y position\n * @param {int} i The particle number in the current wave. Not used for this function.\n */\np._spawnRing = function(p, emitPosX, emitPosY)\n{\n\tvar spawnCircle = this.spawnCircle;\n\t//set the initial rotation/direction of the particle based on starting\n\t//particle angle and rotation of emitter\n\tif (this.minStartRotation == this.maxStartRotation)\n\t\tp.rotation = this.minStartRotation + this.rotation;\n\telse\n\t\tp.rotation = Math.random() * (this.maxStartRotation - this.minStartRotation) +\n\t\t\t\t\tthis.minStartRotation + this.rotation;\n\t//place the particle at a random radius in the ring\n\tif(spawnCircle.minRadius == spawnCircle.radius)\n\t{\n\t\thelperPoint.x = Math.random() * (spawnCircle.radius - spawnCircle.minRadius) +\n\t\t\t\t\t\tspawnCircle.minRadius;\n\t}\n\telse\n\t\thelperPoint.x = spawnCircle.radius;\n\thelperPoint.y = 0;\n\t//rotate the point to a random angle in the circle\n\tvar angle = Math.random() * 360;\n\tp.rotation += angle;\n\tParticleUtils.rotatePoint(angle, helperPoint);\n\t//offset by the circle's center\n\thelperPoint.x += this.spawnCircle.x;\n\thelperPoint.y += this.spawnCircle.y;\n\t//rotate the point by the emitter's rotation\n\tif(this.rotation !== 0)\n\t\tParticleUtils.rotatePoint(this.rotation, helperPoint);\n\t//set the position, offset by the emitter's position\n\tp.position.x = emitPosX + helperPoint.x;\n\tp.position.y = emitPosY + helperPoint.y;\n};\n\n/**\n * Positions a particle for a burst type emitter.\n * @method PIXI.particles.Emitter#_spawnBurst\n * @private\n * @param {Particle} p The particle to position and rotate.\n * @param {Number} emitPosX The emitter's x position\n * @param {Number} emitPosY The emitter's y position\n * @param {int} i The particle number in the current wave.\n */\np._spawnBurst = function(p, emitPosX, emitPosY, i)\n{\n\t//set the initial rotation/direction of the particle based on spawn\n\t//angle and rotation of emitter\n\tif(this.particleSpacing === 0)\n\t\tp.rotation = Math.random() * 360;\n\telse\n\t\tp.rotation = this.angleStart + (this.particleSpacing * i) + this.rotation;\n\t//drop the particle at the emitter's position\n\tp.position.x = emitPosX;\n\tp.position.y = emitPosY;\n};\n\n/**\n * Kills all active particles immediately.\n * @method PIXI.particles.Emitter#cleanup\n */\np.cleanup = function()\n{\n\tvar particle, next;\n\tfor (particle = this._activeParticlesFirst; particle; particle = next)\n\t{\n\t\tnext = particle.next;\n\t\tthis.recycle(particle);\n\t\tif(particle.parent)\n\t\t\tparticle.parent.removeChild(particle);\n\t}\n\tthis._activeParticlesFirst = this._activeParticlesLast = null;\n\tthis.particleCount = 0;\n};\n\n/**\n * Destroys the emitter and all of its particles.\n * @method PIXI.particles.Emitter#destroy\n */\np.destroy = function()\n{\n\t//puts all active particles in the pool, and removes them from the particle parent\n\tthis.cleanup();\n\t//wipe the pool clean\n\tvar next;\n\tfor (var particle = this._poolFirst; particle; particle = next)\n\t{\n\t\t//store next value so we don't lose it in our destroy call\n\t\tnext = particle.next;\n\t\tparticle.destroy();\n\t}\n\tthis._poolFirst = this._parent = this.particleImages = this.spawnPos = this.ownerPos =\n\t\tthis.startColor = this.endColor = this.customEase = null;\n};\n\nmodule.exports = Emitter;","var ParticleUtils = require(\"./ParticleUtils\");\nvar Sprite = PIXI.Sprite;\n\n/**\n * An individual particle image. You shouldn't have to deal with these.\n * @memberof PIXI.particles\n * @class Particle\n * @extends PIXI.Sprite\n * @constructor\n * @param {PIXI.particles.Emitter} emitter The emitter that controls this particle.\n */\nvar Particle = function(emitter)\n{\n\t//start off the sprite with a blank texture, since we are going to replace it\n\t//later when the particle is initialized.\n\tSprite.call(this);\n\n\t/**\n\t * The emitter that controls this particle.\n\t * @property {Emitter} emitter\n\t */\n\tthis.emitter = emitter;\n\t//particles should be centered\n\tthis.anchor.x = this.anchor.y = 0.5;\n\t/**\n\t * The velocity of the particle. Speed may change, but the angle also\n\t * contained in velocity is constant.\n\t * @property {PIXI.Point} velocity\n\t */\n\tthis.velocity = new PIXI.Point();\n\t/**\n\t * The maximum lifetime of this particle, in seconds.\n\t * @property {Number} maxLife\n\t */\n\tthis.maxLife = 0;\n\t/**\n\t * The current age of the particle, in seconds.\n\t * @property {Number} age\n\t */\n\tthis.age = 0;\n\t/**\n\t * A simple easing function to be applied to all properties that\n\t * are being interpolated.\n\t * @property {Function} ease\n\t */\n\tthis.ease = null;\n\t/**\n\t * Extra data that the emitter passes along for custom particles.\n\t * @property {Object} extraData\n\t */\n\tthis.extraData = null;\n\t/**\n\t * The alpha of the particle at the start of its life.\n\t * @property {Number} startAlpha\n\t */\n\tthis.startAlpha = 0;\n\t/**\n\t * The alpha of the particle at the end of its life.\n\t * @property {Number} endAlpha\n\t */\n\tthis.endAlpha = 0;\n\t/**\n\t * The speed of the particle at the start of its life.\n\t * @property {Number} startSpeed\n\t */\n\tthis.startSpeed = 0;\n\t/**\n\t * The speed of the particle at the end of its life.\n\t * @property {Number} endSpeed\n\t */\n\tthis.endSpeed = 0;\n\t/**\n\t * Acceleration to apply to the particle.\n\t * @property {PIXI.Point} accleration\n\t */\n\tthis.acceleration = new PIXI.Point();\n\t/**\n\t * The maximum speed allowed for accelerating particles. Negative values, values of 0 or NaN\n\t * will disable the maximum speed.\n\t * @property {Number} maxSpeed\n\t * @default NaN\n\t */\n\tthis.maxSpeed = NaN;\n\t/**\n\t * The scale of the particle at the start of its life.\n\t * @property {Number} startScale\n\t */\n\tthis.startScale = 0;\n\t/**\n\t * The scale of the particle at the start of its life.\n\t * @property {Number} endScale\n\t */\n\tthis.endScale = 0;\n\t/**\n\t * The tint of the particle at the start of its life.\n\t * @property {Array} startColor\n\t */\n\tthis.startColor = null;\n\t/**\n\t * The red tint of the particle at the start of its life.\n\t * This is pulled from startColor in init().\n\t * @property {uint} _sR\n\t * @private\n\t */\n\tthis._sR = 0;\n\t/**\n\t * The green tint of the particle at the start of its life.\n\t * This is pulled from startColor in init().\n\t * @property {uint} _sG\n\t * @private\n\t */\n\tthis._sG = 0;\n\t/**\n\t * The blue tint of the particle at the start of its life.\n\t * This is pulled from startColor in init().\n\t * @property {uint} _sB\n\t * @private\n\t */\n\tthis._sB = 0;\n\t/**\n\t * The tint of the particle at the start of its life.\n\t * @property {Array} endColor\n\t */\n\tthis.endColor = null;\n\t/**\n\t * The red tint of the particle at the end of its life.\n\t * This is pulled from endColor in init().\n\t * @property {uint} _eR\n\t * @private\n\t */\n\tthis._eR = 0;\n\t/**\n\t * The green tint of the particle at the end of its life.\n\t * This is pulled from endColor in init().\n\t * @property {uint} _sG\n\t * @private\n\t */\n\tthis._eG = 0;\n\t/**\n\t * The blue tint of the particle at the end of its life.\n\t * This is pulled from endColor in init().\n\t * @property {uint} _sB\n\t * @private\n\t */\n\tthis._eB = 0;\n\t/**\n\t * If alpha should be interpolated at all.\n\t * @property {Boolean} _doAlpha\n\t * @private\n\t */\n\tthis._doAlpha = false;\n\t/**\n\t * If scale should be interpolated at all.\n\t * @property {Boolean} _doScale\n\t * @private\n\t */\n\tthis._doScale = false;\n\t/**\n\t * If speed should be interpolated at all.\n\t * @property {Boolean} _doSpeed\n\t * @private\n\t */\n\tthis._doSpeed = false;\n\t/**\n\t * If acceleration should be handled at all. _doSpeed is mutually exclusive with this,\n\t * and _doSpeed gets priority.\n\t * @property {Boolean} _doAcceleration\n\t * @private\n\t */\n\tthis._doAcceleration = false;\n\t/**\n\t * If color should be interpolated at all.\n\t * @property {Boolean} _doColor\n\t * @private\n\t */\n\tthis._doColor = false;\n\t/**\n\t * If normal movement should be handled. Subclasses wishing to override movement\n\t * can set this to false in init().\n\t * @property {Boolean} _doNormalMovement\n\t * @private\n\t */\n\tthis._doNormalMovement = false;\n\t/**\n\t * One divided by the max life of the particle, saved for slightly faster math.\n\t * @property {Number} _oneOverLife\n\t * @private\n\t */\n\tthis._oneOverLife = 0;\n\n\t/**\n\t * Reference to the next particle in the list.\n\t * @property {Particle} next\n\t * @private\n\t */\n\tthis.next = null;\n\n\t/**\n\t * Reference to the previous particle in the list.\n\t * @property {Particle} prev\n\t * @private\n\t */\n\tthis.prev = null;\n\n\t//save often used functions on the instance instead of the prototype for better speed\n\tthis.init = this.init;\n\tthis.Particle_init = this.Particle_init;\n\tthis.update = this.update;\n\tthis.Particle_update = this.Particle_update;\n\tthis.applyArt = this.applyArt;\n\tthis.kill = this.kill;\n};\n\n// Reference to the prototype\nvar p = Particle.prototype = Object.create(Sprite.prototype);\n\n/**\n * Initializes the particle for use, based on the properties that have to\n * have been set already on the particle.\n * @method PIXI.particles.Particle#init\n */\n/**\n * A reference to init, so that subclasses can access it without the penalty of Function.call()\n * @method PIXI.particles.Particle#Particle_init\n * @protected\n */\np.init = p.Particle_init = function()\n{\n\t//reset the age\n\tthis.age = 0;\n\t//set up the velocity based on the start speed and rotation\n\tthis.velocity.x = this.startSpeed;\n\tthis.velocity.y = 0;\n\tParticleUtils.rotatePoint(this.rotation, this.velocity);\n\tif (this.noRotation)\n\t{\n\t\tthis.rotation = 0;\n\t}\n\telse\n\t{\n\t\t//convert rotation to Radians from Degrees\n\t\tthis.rotation *= ParticleUtils.DEG_TO_RADS;\n\t}\n\t//convert rotation speed to Radians from Degrees\n\tthis.rotationSpeed *= ParticleUtils.DEG_TO_RADS;\n\t//set alpha to inital alpha\n\tthis.alpha = this.startAlpha;\n\t//set scale to initial scale\n\tthis.scale.x = this.scale.y = this.startScale;\n\t//determine start and end color values\n\tif (this.startColor)\n\t{\n\t\tthis._sR = this.startColor[0];\n\t\tthis._sG = this.startColor[1];\n\t\tthis._sB = this.startColor[2];\n\t\tif(this.endColor)\n\t\t{\n\t\t\tthis._eR = this.endColor[0];\n\t\t\tthis._eG = this.endColor[1];\n\t\t\tthis._eB = this.endColor[2];\n\t\t}\n\t}\n\t//figure out what we need to interpolate\n\tthis._doAlpha = this.startAlpha != this.endAlpha;\n\tthis._doSpeed = this.startSpeed != this.endSpeed;\n\tthis._doScale = this.startScale != this.endScale;\n\tthis._doColor = !!this.endColor;\n\tthis._doAcceleration = this.acceleration.x !== 0 || this.acceleration.y !== 0;\n\t//_doNormalMovement can be cancelled by subclasses\n\tthis._doNormalMovement = this._doSpeed || this.startSpeed !== 0 || this._doAcceleration;\n\t//save our lerp helper\n\tthis._oneOverLife = 1 / this.maxLife;\n\t//set the inital color\n\tthis.tint = ParticleUtils.combineRGBComponents(this._sR, this._sG, this._sB);\n\t//ensure visibility\n\tthis.visible = true;\n};\n\n/**\n * Sets the texture for the particle. This can be overridden to allow\n * for an animated particle.\n * @method PIXI.particles.Particle#applyArt\n * @param {PIXI.Texture} art The texture to set.\n */\np.applyArt = function(art)\n{\n\tthis.texture = art || ParticleUtils.EMPTY_TEXTURE;\n};\n\n/**\n * Updates the particle.\n * @method PIXI.particles.Particle#update\n * @param {Number} delta Time elapsed since the previous frame, in __seconds__.\n * @return {Number} The standard interpolation multiplier (0-1) used for all relevant particle\n * properties. A value of -1 means the particle died of old age instead.\n */\n/**\n * A reference to update so that subclasses can access the original without the overhead\n * of Function.call().\n * @method PIXI.particles.Particle#Particle_update\n * @param {Number} delta Time elapsed since the previous frame, in __seconds__.\n * @return {Number} The standard interpolation multiplier (0-1) used for all relevant particle\n * properties. A value of -1 means the particle died of old age instead.\n * @protected\n */\np.update = p.Particle_update = function(delta)\n{\n\t//increase age\n\tthis.age += delta;\n\t//recycle particle if it is too old\n\tif(this.age >= this.maxLife)\n\t{\n\t\tthis.kill();\n\t\treturn -1;\n\t}\n\n\t//determine our interpolation value\n\tvar lerp = this.age * this._oneOverLife;//lifetime / maxLife;\n\tif (this.ease)\n\t{\n\t\tif(this.ease.length == 4)\n\t\t{\n\t\t\t//the t, b, c, d parameters that some tween libraries use\n\t\t\t//(time, initial value, end value, duration)\n\t\t\tlerp = this.ease(lerp, 0, 1, 1);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//the simplified version that we like that takes\n\t\t\t//one parameter, time from 0-1. TweenJS eases provide this usage.\n\t\t\tlerp = this.ease(lerp);\n\t\t}\n\t}\n\n\t//interpolate alpha\n\tif (this._doAlpha)\n\t\tthis.alpha = (this.endAlpha - this.startAlpha) * lerp + this.startAlpha;\n\t//interpolate scale\n\tif (this._doScale)\n\t{\n\t\tvar scale = (this.endScale - this.startScale) * lerp + this.startScale;\n\t\tthis.scale.x = this.scale.y = scale;\n\t}\n\t//handle movement\n\tif(this._doNormalMovement)\n\t{\n\t\t//interpolate speed\n\t\tif (this._doSpeed)\n\t\t{\n\t\t\tvar speed = (this.endSpeed - this.startSpeed) * lerp + this.startSpeed;\n\t\t\tParticleUtils.normalize(this.velocity);\n\t\t\tParticleUtils.scaleBy(this.velocity, speed);\n\t\t}\n\t\telse if(this._doAcceleration)\n\t\t{\n\t\t\tthis.velocity.x += this.acceleration.x * delta;\n\t\t\tthis.velocity.y += this.acceleration.y * delta;\n\t\t\tif (this.maxSpeed)\n\t\t\t{\n\t\t\t\tvar currentSpeed = ParticleUtils.length(this.velocity);\n\t\t\t\t//if we are going faster than we should, clamp at the max speed\n\t\t\t\t//DO NOT recalculate vector length\n\t\t\t\tif (currentSpeed > this.maxSpeed)\n\t\t\t\t{\n\t\t\t\t\tParticleUtils.scaleBy(this.velocity, this.maxSpeed / currentSpeed);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//adjust position based on velocity\n\t\tthis.position.x += this.velocity.x * delta;\n\t\tthis.position.y += this.velocity.y * delta;\n\t}\n\t//interpolate color\n\tif (this._doColor)\n\t{\n\t\tvar r = (this._eR - this._sR) * lerp + this._sR;\n\t\tvar g = (this._eG - this._sG) * lerp + this._sG;\n\t\tvar b = (this._eB - this._sB) * lerp + this._sB;\n\t\tthis.tint = ParticleUtils.combineRGBComponents(r, g, b);\n\t}\n\t//update rotation\n\tif(this.rotationSpeed !== 0)\n\t{\n\t\tthis.rotation += this.rotationSpeed * delta;\n\t}\n\telse if(this.acceleration && !this.noRotation)\n\t{\n\t\tthis.rotation = Math.atan2(this.velocity.y, this.velocity.x);// + Math.PI / 2;\n\t}\n\treturn lerp;\n};\n\n/**\n * Kills the particle, removing it from the display list\n * and telling the emitter to recycle it.\n * @method PIXI.particles.Particle#kill\n */\np.kill = function()\n{\n\tthis.emitter.recycle(this);\n};\n\np.Sprite_Destroy = Sprite.prototype.destroy;\n/**\n * Destroys the particle, removing references and preventing future use.\n * @method PIXI.particles.Particle#destroy\n */\np.destroy = function()\n{\n\tif (this.parent)\n\t\tthis.parent.removeChild(this);\n\tif (this.Sprite_Destroy)\n\t\tthis.Sprite_Destroy();\n\tthis.emitter = this.velocity = this.startColor = this.endColor = this.ease =\n\t\tthis.next = this.prev = null;\n};\n\n/**\n * Checks over the art that was passed to the Emitter's init() function, to do any special\n * modifications to prepare it ahead of time.\n * @method PIXI.particles.Particle.parseArt\n * @static\n * @param {Array} art The array of art data. For Particle, it should be an array of Textures.\n * Any strings in the array will be converted to Textures via\n * Texture.fromImage().\n * @return {Array} The art, after any needed modifications.\n */\nParticle.parseArt = function(art)\n{\n\t//convert any strings to Textures.\n\tvar i;\n\tfor(i = art.length; i >= 0; --i)\n\t{\n\t\tif(typeof art[i] == \"string\")\n\t\t\tart[i] = PIXI.Texture.fromImage(art[i]);\n\t}\n\t//particles from different base textures will be slower in WebGL than if they\n\t//were from one spritesheet\n\tif(ParticleUtils.verbose)\n\t{\n\t\tfor(i = art.length - 1; i > 0; --i)\n\t\t{\n\t\t\tif(art[i].baseTexture != art[i - 1].baseTexture)\n\t\t\t{\n\t\t\t\tif (window.console)\n\t\t\t\t\tconsole.warn(\"PixiParticles: using particle textures from different images may hinder performance in WebGL\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn art;\n};\n\n/**\n * Parses extra emitter data to ensure it is set up for this particle class.\n * Particle does nothing to the extra data.\n * @method PIXI.particles.Particle.parseData\n * @static\n * @param {Object} extraData The extra data from the particle config.\n * @return {Object} The parsed extra data.\n */\nParticle.parseData = function(extraData)\n{\n\treturn extraData;\n};\n\nmodule.exports = Particle;","\"use strict\";\n\nvar BLEND_MODES = PIXI.BLEND_MODES || PIXI.blendModes;\nvar Texture = PIXI.Texture;\n\n/**\n * Contains helper functions for particles and emitters to use.\n * @memberof PIXI.particles\n * @class ParticleUtils\n * @static\n */\nvar ParticleUtils = {};\n\n/**\n * If errors and warnings should be logged within the library.\n * @name PIXI.particles.ParticleUtils.verbose\n * @default false\n * @static\n */\nParticleUtils.verbose = false;\n\nvar DEG_TO_RADS = ParticleUtils.DEG_TO_RADS = Math.PI / 180;\n\nvar empty = ParticleUtils.EMPTY_TEXTURE = Texture.EMPTY;\n//prevent any events from being used on the empty texture, as well as destruction of it\n//v4 of Pixi does this, but doing it again won't hurt\nempty.on = empty.destroy = empty.once = empty.emit = function() {};\n\n/**\n * Rotates a point by a given angle.\n * @method PIXI.particles.ParticleUtils.rotatePoint\n * @param {Number} angle The angle to rotate by in degrees\n * @param {PIXI.Point} p The point to rotate around 0,0.\n * @static\n */\nParticleUtils.rotatePoint = function(angle, p)\n{\n\tif(!angle) return;\n\tangle *= DEG_TO_RADS;\n\tvar s = Math.sin(angle);\n\tvar c = Math.cos(angle);\n\tvar xnew = p.x * c - p.y * s;\n\tvar ynew = p.x * s + p.y * c;\n\tp.x = xnew;\n\tp.y = ynew;\n};\n\n/**\n * Combines separate color components (0-255) into a single uint color.\n * @method PIXI.particles.ParticleUtils.combineRGBComponents\n * @param {uint} r The red value of the color\n * @param {uint} g The green value of the color\n * @param {uint} b The blue value of the color\n * @return {uint} The color in the form of 0xRRGGBB\n * @static\n */\nParticleUtils.combineRGBComponents = function(r, g, b/*, a*/)\n{\n\treturn /*a << 24 |*/ r << 16 | g << 8 | b;\n};\n\n/**\n * Reduces the point to a length of 1.\n * @method PIXI.particles.ParticleUtils.normalize\n * @static\n * @param {PIXI.Point} point The point to normalize\n */\nParticleUtils.normalize = function(point)\n{\n\tvar oneOverLen = 1 / ParticleUtils.length(point);\n\tpoint.x *= oneOverLen;\n\tpoint.y *= oneOverLen;\n};\n\n/**\n * Multiplies the x and y values of this point by a value.\n * @method PIXI.particles.ParticleUtils.scaleBy\n * @static\n * @param {PIXI.Point} point The point to scaleBy\n * @param value {Number} The value to scale by.\n */\nParticleUtils.scaleBy = function(point, value)\n{\n\tpoint.x *= value;\n\tpoint.y *= value;\n};\n\n/**\n * Returns the length (or magnitude) of this point.\n * @method PIXI.particles.ParticleUtils.length\n * @static\n * @param {PIXI.Point} point The point to measure length\n * @return The length of this point.\n */\nParticleUtils.length = function(point)\n{\n\treturn Math.sqrt(point.x * point.x + point.y * point.y);\n};\n\n/**\n * Converts a hex string from \"#AARRGGBB\", \"#RRGGBB\", \"0xAARRGGBB\", \"0xRRGGBB\",\n * \"AARRGGBB\", or \"RRGGBB\" to an array of ints of 0-255 or Numbers from 0-1, as\n * [r, g, b, (a)].\n * @method PIXI.particles.ParticleUtils.hexToRGB\n * @param {String} color The input color string.\n * @param {Array} output An array to put the output in. If omitted, a new array is created.\n * @return The array of numeric color values.\n * @static\n */\nParticleUtils.hexToRGB = function(color, output)\n{\n\tif (output)\n\t\toutput.length = 0;\n\telse\n\t\toutput = [];\n\tif (color.charAt(0) == \"#\")\n\t\tcolor = color.substr(1);\n\telse if (color.indexOf(\"0x\") === 0)\n\t\tcolor = color.substr(2);\n\tvar alpha;\n\tif (color.length == 8)\n\t{\n\t\talpha = color.substr(0, 2);\n\t\tcolor = color.substr(2);\n\t}\n\toutput.push(parseInt(color.substr(0, 2), 16));//Red\n\toutput.push(parseInt(color.substr(2, 2), 16));//Green\n\toutput.push(parseInt(color.substr(4, 2), 16));//Blue\n\tif (alpha)\n\t\toutput.push(parseInt(alpha, 16));\n\treturn output;\n};\n\n/**\n * Generates a custom ease function, based on the GreenSock custom ease, as demonstrated\n * by the related tool at http://www.greensock.com/customease/.\n * @method PIXI.particles.ParticleUtils.generateEase\n * @param {Array} segments An array of segments, as created by\n * http://www.greensock.com/customease/.\n * @return {Function} A function that calculates the percentage of change at\n * a given point in time (0-1 inclusive).\n * @static\n */\nParticleUtils.generateEase = function(segments)\n{\n\tvar qty = segments.length;\n\tvar oneOverQty = 1 / qty;\n\t/*\n\t * Calculates the percentage of change at a given point in time (0-1 inclusive).\n\t * @param {Number} time The time of the ease, 0-1 inclusive.\n\t * @return {Number} The percentage of the change, 0-1 inclusive (unless your\n\t * ease goes outside those bounds).\n\t */\n\tvar simpleEase = function(time)\n\t{\n\t\tvar t, s;\n\t\tvar i = (qty * time) | 0;//do a quick floor operation\n\t\tt = (time - (i * oneOverQty)) * qty;\n\t\ts = segments[i] || segments[qty - 1];\n\t\treturn (s.s + t * (2 * (1 - t) * (s.cp - s.s) + t * (s.e - s.s)));\n\t};\n\treturn simpleEase;\n};\n\n/**\n * Gets a blend mode, ensuring that it is valid.\n * @method PIXI.particles.ParticleUtils.getBlendMode\n * @param {String} name The name of the blend mode to get.\n * @return {int} The blend mode as specified in the PIXI.blendModes enumeration.\n * @static\n */\nParticleUtils.getBlendMode = function(name)\n{\n\tif (!name) return BLEND_MODES.NORMAL;\n\tname = name.toUpperCase();\n\twhile (name.indexOf(\" \") >= 0)\n\t\tname = name.replace(\" \", \"_\");\n\treturn BLEND_MODES[name] || BLEND_MODES.NORMAL;\n};\n\nmodule.exports = ParticleUtils;","\"use strict\";\n\nvar ParticleUtils = require(\"./ParticleUtils\"),\n\tParticle = require(\"./Particle\");\n\n/**\n * An particle that follows a path defined by an algebraic expression, e.g. \"sin(x)\" or\n * \"5x + 3\".\n * To use this class, the particle config must have a \"path\" string in the\n * \"extraData\" parameter. This string should have \"x\" in it to represent movement (from the\n * speed settings of the particle). It may have numbers, parentheses, the four basic\n * operations, and the following Math functions or properties (without the preceding \"Math.\"):\n * \"pow\", \"sqrt\", \"abs\", \"floor\", \"round\", \"ceil\", \"E\", \"PI\", \"sin\", \"cos\", \"tan\", \"asin\",\n * \"acos\", \"atan\", \"atan2\", \"log\".\n * The overall movement of the particle and the expression value become x and y positions for\n * the particle, respectively. The final position is rotated by the spawn rotation/angle of\n * the particle.\n *\n * Some example paths:\n *\n * \t\"sin(x/10) * 20\" // A sine wave path.\n * \t\"cos(x/100) * 30\" // Particles curve counterclockwise (for medium speed/low lifetime particles)\n * \t\"pow(x/10, 2) / 2\" // Particles curve clockwise (remember, +y is down).\n *\n * @memberof PIXI.particles\n * @class PathParticle\n * @extends PIXI.particles.Particle\n * @constructor\n * @param {PIXI.particles.Emitter} emitter The emitter that controls this PathParticle.\n */\nvar PathParticle = function(emitter)\n{\n\tParticle.call(this, emitter);\n\t/**\n\t * The function representing the path the particle should take.\n\t * @property {Function} path\n\t */\n\tthis.path = null;\n\t/**\n\t * The initial rotation in degrees of the particle, because the direction of the path\n\t * is based on that.\n\t * @property {Number} initialRotation\n\t */\n\tthis.initialRotation = 0;\n\t/**\n\t * The initial position of the particle, as all path movement is added to that.\n\t * @property {PIXI.Point} initialPosition\n\t */\n\tthis.initialPosition = new PIXI.Point();\n\t/**\n\t * Total single directional movement, due to speed.\n\t * @property {Number} movement\n\t */\n\tthis.movement = 0;\n};\n\n// Reference to the super class\nvar s = Particle.prototype;\n// Reference to the prototype\nvar p = PathParticle.prototype = Object.create(s);\n\n/**\n * A helper point for math things.\n * @property {Function} helperPoint\n * @private\n * @static\n */\nvar helperPoint = new PIXI.Point();\n\n/**\n * Initializes the particle for use, based on the properties that have to\n * have been set already on the particle.\n * @method PIXI.particles.PathParticle#init\n */\np.init = function()\n{\n\t//get initial rotation before it is converted to radians\n\tthis.initialRotation = this.rotation;\n\t//standard init\n\tthis.Particle_init();\n\n\t//set the path for the particle\n\tthis.path = this.extraData.path;\n\t//cancel the normal movement behavior\n\tthis._doNormalMovement = !this.path;\n\t//reset movement\n\tthis.movement = 0;\n\t//grab position\n\tthis.initialPosition.x = this.position.x;\n\tthis.initialPosition.y = this.position.y;\n};\n\n//a hand picked list of Math functions (and a couple properties) that are allowable.\n//they should be used without the preceding \"Math.\"\nvar MATH_FUNCS =\n[\n\t\"pow\",\n\t\"sqrt\",\n\t\"abs\",\n\t\"floor\",\n\t\"round\",\n\t\"ceil\",\n\t\"E\",\n\t\"PI\",\n\t\"sin\",\n\t\"cos\",\n\t\"tan\",\n\t\"asin\",\n\t\"acos\",\n\t\"atan\",\n\t\"atan2\",\n\t\"log\"\n];\n//Allow the 4 basic operations, parentheses and all numbers/decimals, as well\n//as 'x', for the variable usage.\nvar WHITELISTER = \"[01234567890\\\\.\\\\*\\\\-\\\\+\\\\/\\\\(\\\\)x ,]\";\n//add the math functions to the regex string.\nfor(var index = MATH_FUNCS.length - 1; index >= 0; --index)\n{\n\tWHITELISTER += \"|\" + MATH_FUNCS[index];\n}\n//create an actual regular expression object from the string\nWHITELISTER = new RegExp(WHITELISTER, \"g\");\n\n/**\n * Parses a string into a function for path following.\n * This involves whitelisting the string for safety, inserting \"Math.\" to math function\n * names, and using eval() to generate a function.\n * @method PIXI.particles.PathParticle~parsePath\n * @private\n * @static\n * @param {String} pathString The string to parse.\n * @return {Function} The path function - takes x, outputs y.\n */\nvar parsePath = function(pathString)\n{\n\tvar rtn;\n\tvar matches = pathString.match(WHITELISTER);\n\tfor(var i = matches.length - 1; i >= 0; --i)\n\t{\n\t\tif(MATH_FUNCS.indexOf(matches[i]) >= 0)\n\t\t\tmatches[i] = \"Math.\" + matches[i];\n\t}\n\tpathString = matches.join(\"\");\n\teval(\"rtn = function(x){ return \" + pathString + \"; };\");// jshint ignore:line\n\treturn rtn;\n};\n\n/**\n * Updates the particle.\n * @method PIXI.particles.PathParticle#update\n * @param {Number} delta Time elapsed since the previous frame, in __seconds__.\n */\np.update = function(delta)\n{\n\tvar lerp = this.Particle_update(delta);\n\t//if the particle died during the update, then don't bother\n\tif(lerp >= 0 && this.path)\n\t{\n\t\t//increase linear movement based on speed\n\t\tvar speed = (this.endSpeed - this.startSpeed) * lerp + this.startSpeed;\n\t\tthis.movement += speed * delta;\n\t\t//set up the helper point for rotation\n\t\thelperPoint.x = this.movement;\n\t\thelperPoint.y = this.path(this.movement);\n\t\tParticleUtils.rotatePoint(this.initialRotation, helperPoint);\n\t\tthis.position.x = this.initialPosition.x + helperPoint.x;\n\t\tthis.position.y = this.initialPosition.y + helperPoint.y;\n\t}\n};\n\np.Particle_destroy = Particle.prototype.destroy;\n/**\n * Destroys the particle, removing references and preventing future use.\n * @method PIXI.particles.PathParticle#destroy\n */\np.destroy = function()\n{\n\tthis.Particle_destroy();\n\tthis.path = this.initialPosition = null;\n};\n\n/**\n * Checks over the art that was passed to the Emitter's init() function, to do any special\n * modifications to prepare it ahead of time. This just runs Particle.parseArt().\n * @method PIXI.particles.PathParticle.parseArt\n * @static\n * @param {Array} art The array of art data. For Particle, it should be an array of Textures.\n * Any strings in the array will be converted to Textures via\n * Texture.fromImage().\n * @return {Array} The art, after any needed modifications.\n */\nPathParticle.parseArt = function(art)\n{\n\treturn Particle.parseArt(art);\n};\n\n/**\n * Parses extra emitter data to ensure it is set up for this particle class.\n * PathParticle checks for the existence of path data, and parses the path data for use\n * by particle instances.\n * @method PIXI.particles.PathParticle.parseData\n * @static\n * @param {Object} extraData The extra data from the particle config.\n * @return {Object} The parsed extra data.\n */\nPathParticle.parseData = function(extraData)\n{\n\tvar output = {};\n\tif(extraData && extraData.path)\n\t{\n\t\ttry\n\t\t{\n\t\t\toutput.path = parsePath(extraData.path);\n\t\t}\n\t\tcatch(e)\n\t\t{\n\t\t\tif(ParticleUtils.verbose)\n\t\t\t\tconsole.error(\"PathParticle: error in parsing path expression\");\n\t\t\toutput.path = null;\n\t\t}\n\t}\n\telse\n\t{\n\t\tif(ParticleUtils.verbose)\n\t\t\tconsole.error(\"PathParticle requires a path string in extraData!\");\n\t\toutput.path = null;\n\t}\n\treturn output;\n};\n\nmodule.exports = PathParticle;","//Nothing to deprecate right now!","require(\"./polyfills.js\");\nexports.ParticleUtils = require(\"./ParticleUtils.js\");\nexports.Particle = require(\"./Particle.js\");\nexports.Emitter = require(\"./Emitter.js\");\nexports.PathParticle = require(\"./PathParticle.js\");\nexports.AnimatedParticle = require(\"./AnimatedParticle.js\");\nrequire(\"./deprecation.js\");","/**\n * Add methods to Array\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty\n * @class Array\n */\n\n/**\n * Shuffles the array\n * @method shuffle\n * @return {Array} The array, for chaining calls.\n */\nif(!Array.prototype.shuffle)\n{\n\t// In EcmaScript 5 specs and browsers that support it you can use the Object.defineProperty\n\t// to make it not enumerable set the enumerable property to false\n\tObject.defineProperty(Array.prototype, 'shuffle', {\n\t\tenumerable: false,\n\t\twritable:false,\n\t\tvalue: function() {\n\t\t\tfor(var j, x, i = this.length; i; j = Math.floor(Math.random() * i), x = this[--i], this[i] = this[j], this[j] = x);\n\t\t\treturn this;\n\t\t}\n\t});\n}\n\n/**\n * Get a random item from an array\n * @method random\n * @return {*} The random item\n */\nif(!Array.prototype.random)\n{\n\tObject.defineProperty(Array.prototype, 'random', {\n\t\tenumerable: false,\n\t\twritable: false,\n\t\tvalue: function() {\n\t\t\treturn this[Math.floor(Math.random() * this.length)];\n\t\t}\n\t});\n}","\"use strict\";\n\n// Check for window, fallback to global\nvar global = typeof window !== 'undefined' ? window : GLOBAL;\n\n//ensure that the particles namespace exist - PIXI 4 creates it itself, PIXI 3 does not\nif (!global.PIXI.particles) {\n\tglobal.PIXI.particles = {};\n}\n\n// Export for Node-compatible environments like Electron\nif (typeof module !== 'undefined' && module.exports)\n{\n\t// Attempt to require the pixi module\n\tif (typeof PIXI === 'undefined')\n\t{\n\t\t// Include the Pixi.js module\n\t\trequire('pixi.js');\n\t}\n\n\t// Export the module\n\tmodule.exports = global.PIXI.particles || particles;\n}\n// If we're in the browser make sure PIXI is available\nelse if (typeof PIXI === 'undefined')\n{\n\tthrow \"pixi-particles requires pixi.js to be loaded first\";\n}\n\n// get the library itself\nvar particles = require('./particles');\n\n// insert the lirbary into the particles namespace on PIXI\nfor (var prop in particles) {\n\tglobal.PIXI.particles[prop] = particles[prop];\n}"],"sourceRoot":"."} \ No newline at end of file +{"version":3,"sources":["node_modules/browser-pack/_prelude.js","src/AnimatedParticle.js","src/Emitter.js","src/Particle.js","src/ParticleUtils.js","src/PathParticle.js","src/deprecation.js","src/particles.js","src/polyfills.js","src"],"names":[],"mappings":";;;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACprCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACndA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvOA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"pixi-particles.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o= 0)\n\t{\n\t\tthis.elapsed += delta;\n\t\tif(this.elapsed > this.duration)\n\t\t{\n\t\t\t//loop elapsed back around\n\t\t\tif(this.loop)\n\t\t\t\tthis.elapsed = this.elapsed % this.duration;\n\t\t\t//subtract a small amount to prevent attempting to go past the end of the animation\n\t\t\telse\n\t\t\t\tthis.elapsed = this.duration - 0.000001;\n\t\t}\n\t\tvar frame = (this.elapsed * this.framerate + 0.0000001) | 0;\n\t\tthis.texture = this.textures[frame] || ParticleUtils.EMPTY_TEXTURE;\n\t}\n};\n\np.Particle_destroy = Particle.prototype.destroy;\n/**\n * Destroys the particle, removing references and preventing future use.\n * @method PIXI.particles.AnimatedParticle#destroy\n */\np.destroy = function()\n{\n\tthis.Particle_destroy();\n\tthis.textures = null;\n};\n\n/**\n * Checks over the art that was passed to the Emitter's init() function, to do any special\n * modifications to prepare it ahead of time.\n * @method PIXI.particles.AnimatedParticle.parseArt\n * @static\n * @param {Array} art The array of art data, properly formatted for AnimatedParticle.\n * @return {Array} The art, after any needed modifications.\n */\nAnimatedParticle.parseArt = function(art)\n{\n\tvar i, data, output = [], j, textures, tex, outTextures;\n\tfor(i = 0; i < art.length; ++i)\n\t{\n\t\tdata = art[i];\n\t\tart[i] = output = {};\n\t\toutput.textures = outTextures = [];\n\t\ttextures = data.textures;\n\t\tfor(j = 0; j < textures.length; ++j)\n\t\t{\n\t\t\ttex = textures[j];\n\t\t\tif(typeof tex == \"string\")\n\t\t\t\toutTextures.push(Texture.fromImage(tex));\n\t\t\telse if(tex instanceof Texture)\n\t\t\t\toutTextures.push(tex);\n\t\t\t//assume an object with extra data determining duplicate frame data\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar dupe = tex.count || 1;\n\t\t\t\tif(typeof tex.texture == \"string\")\n\t\t\t\t\ttex = Texture.fromImage(tex.texture);\n\t\t\t\telse// if(tex.texture instanceof Texture)\n\t\t\t\t\ttex = tex.texture;\n\t\t\t\tfor(; dupe > 0; --dupe)\n\t\t\t\t{\n\t\t\t\t\toutTextures.push(tex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//use these values to signify that the animation should match the particle life time.\n\t\tif(data.framerate == \"matchLife\")\n\t\t{\n\t\t\t//-1 means that it should be calculated\n\t\t\toutput.framerate = -1;\n\t\t\toutput.duration = 0;\n\t\t\toutput.loop = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//determine if the animation should loop\n\t\t\toutput.loop = !!data.loop;\n\t\t\t//get the framerate, default to 60\n\t\t\toutput.framerate = data.framerate > 0 ? data.framerate : 60;\n\t\t\t//determine the duration\n\t\t\toutput.duration = outTextures.length / output.framerate;\n\t\t}\n\t}\n\n\treturn art;\n};\n\nmodule.exports = AnimatedParticle;","\"use strict\";\n\nvar ParticleUtils = require(\"./ParticleUtils\"),\n\tParticle = require(\"./Particle\"),\n\tParticleContainer = PIXI.particles.ParticleContainer || PIXI.ParticleContainer,\n\tticker = PIXI.ticker.shared;\n\n/**\n * A particle emitter.\n * @memberof PIXI.particles\n * @class Emitter\n * @constructor\n * @param {PIXI.DisplayObjectContainer} particleParent The display object to add the\n * particles to.\n * @param {Array|PIXI.Texture|String} [particleImages] A texture or array of textures to use\n * for the particles. Strings will be turned\n * into textures via Texture.fromImage().\n * @param {Object} [config] A configuration object containing settings for the emitter.\n * @param {Boolean} [config.emit=true] If config.emit is explicitly passed as false, the Emitter\n * will start disabled.\n * @param {Boolean} [config.autoUpdate=false] If config.emit is explicitly passed as true, the Emitter\n * will automatically call update via the PIXI shared ticker.\n */\nvar Emitter = function(particleParent, particleImages, config)\n{\n\t/**\n\t * The constructor used to create new particles. The default is\n\t * the built in particle class.\n\t * @property {Function} _particleConstructor\n\t * @private\n\t */\n\tthis._particleConstructor = Particle;\n\t//properties for individual particles\n\t/**\n\t * An array of PIXI Texture objects.\n\t * @property {Array} particleImages\n\t */\n\tthis.particleImages = null;\n\t/**\n\t * The starting alpha of all particles.\n\t * @property {Number} startAlpha\n\t * @default 1\n\t */\n\tthis.startAlpha = 1;\n\t/**\n\t * The ending alpha of all particles.\n\t * @property {Number} endAlpha\n\t * @default 1\n\t */\n\tthis.endAlpha = 1;\n\t/**\n\t * The starting speed of all particles.\n\t * @property {Number} startSpeed\n\t * @default 0\n\t */\n\tthis.startSpeed = 0;\n\t/**\n\t * The ending speed of all particles.\n\t * @property {Number} endSpeed\n\t * @default 0\n\t */\n\tthis.endSpeed = 0;\n\t/**\n\t * A minimum multiplier for the speed of a particle at both start and\n\t * end. A value between minimumSpeedMultiplier and 1 is randomly generated\n\t * and multiplied with startSpeed and endSpeed to provide the actual\n\t * startSpeed and endSpeed for each particle.\n\t * @property {Number} minimumSpeedMultiplier\n\t * @default 1\n\t */\n\tthis.minimumSpeedMultiplier = 1;\n\t/**\n\t * Acceleration to apply to particles. Using this disables\n\t * any interpolation of particle speed. If the particles do\n\t * not have a rotation speed, then they will be rotated to\n\t * match the direction of travel.\n\t * @property {PIXI.Point} acceleration\n\t * @default null\n\t */\n\tthis.acceleration = null;\n\t/**\n\t * The maximum speed allowed for accelerating particles. Negative values, values of 0 or NaN\n\t * will disable the maximum speed.\n\t * @property {Number} maxSpeed\n\t * @default NaN\n\t */\n\tthis.maxSpeed = NaN;\n\t/**\n\t * The starting scale of all particles.\n\t * @property {Number} startScale\n\t * @default 1\n\t */\n\tthis.startScale = 1;\n\t/**\n\t * The ending scale of all particles.\n\t * @property {Number} endScale\n\t * @default 1\n\t */\n\tthis.endScale = 1;\n\t/**\n\t * A minimum multiplier for the scale of a particle at both start and\n\t * end. A value between minimumScaleMultiplier and 1 is randomly generated\n\t * and multiplied with startScale and endScale to provide the actual\n\t * startScale and endScale for each particle.\n\t * @property {Number} minimumScaleMultiplier\n\t * @default 1\n\t */\n\tthis.minimumScaleMultiplier = 1;\n\t/**\n\t * The starting color of all particles, as red, green, and blue uints from 0-255.\n\t * @property {Array} startColor\n\t */\n\tthis.startColor = null;\n\t/**\n\t * The ending color of all particles, as red, green, and blue uints from 0-255.\n\t * @property {Array} endColor\n\t */\n\tthis.endColor = null;\n\t/**\n\t * The minimum lifetime for a particle, in seconds.\n\t * @property {Number} minLifetime\n\t */\n\tthis.minLifetime = 0;\n\t/**\n\t * The maximum lifetime for a particle, in seconds.\n\t * @property {Number} maxLifetime\n\t */\n\tthis.maxLifetime = 0;\n\t/**\n\t * The minimum start rotation for a particle, in degrees. This value\n\t * is ignored if the spawn type is \"burst\" or \"arc\".\n\t * @property {Number} minStartRotation\n\t */\n\tthis.minStartRotation = 0;\n\t/**\n\t * The maximum start rotation for a particle, in degrees. This value\n\t * is ignored if the spawn type is \"burst\" or \"arc\".\n\t * @property {Number} maxStartRotation\n\t */\n\tthis.maxStartRotation = 0;\n\t/**\n\t * If no particle rotation should occur. Starting rotation will still\n\t * affect the direction in which particles move. If the rotation speed\n\t * is set, then this will be ignored.\n\t * @property {Boolean} maxStartRotation\n\t */\n\tthis.noRotation = false;\n\t/**\n\t * The minimum rotation speed for a particle, in degrees per second.\n\t * This only visually spins the particle, it does not change direction\n\t * of movement.\n\t * @property {Number} minRotationSpeed\n\t */\n\tthis.minRotationSpeed = 0;\n\t/**\n\t * The maximum rotation speed for a particle, in degrees per second.\n\t * This only visually spins the particle, it does not change direction\n\t * of movement.\n\t * @property {Number} maxRotationSpeed\n\t */\n\tthis.maxRotationSpeed = 0;\n\t/**\n\t * The blend mode for all particles, as named by PIXI.blendModes.\n\t * @property {int} particleBlendMode\n\t */\n\tthis.particleBlendMode = 0;\n\t/**\n\t * An easing function for nonlinear interpolation of values. Accepts a single\n\t * parameter of time as a value from 0-1, inclusive. Expected outputs are values\n\t * from 0-1, inclusive.\n\t * @property {Function} customEase\n\t */\n\tthis.customEase = null;\n\t/**\n\t *\tExtra data for use in custom particles. The emitter doesn't look inside, but\n\t *\tpasses it on to the particle to use in init().\n\t *\t@property {Object} extraData\n\t */\n\tthis.extraData = null;\n\t//properties for spawning particles\n\t/**\n\t * Time between particle spawns in seconds.\n\t * @property {Number} _frequency\n\t * @private\n\t */\n\tthis._frequency = 1;\n\t/**\n\t * Maximum number of particles to keep alive at a time. If this limit\n\t * is reached, no more particles will spawn until some have died.\n\t * @property {int} maxParticles\n\t * @default 1000\n\t */\n\tthis.maxParticles = 1000;\n\t/**\n\t * The amount of time in seconds to emit for before setting emit to false.\n\t * A value of -1 is an unlimited amount of time.\n\t * @property {Number} emitterLifetime\n\t * @default -1\n\t */\n\tthis.emitterLifetime = -1;\n\t/**\n\t * Position at which to spawn particles, relative to the emitter's owner's origin.\n\t * For example, the flames of a rocket travelling right might have a spawnPos\n\t * of {x:-50, y:0}.\n\t * to spawn at the rear of the rocket.\n\t * To change this, use updateSpawnPos().\n\t * @property {PIXI.Point} spawnPos\n\t * @readOnly\n\t */\n\tthis.spawnPos = null;\n\t/**\n\t * How the particles will be spawned. Valid types are \"point\", \"rectangle\",\n\t * \"circle\", \"burst\", \"ring\".\n\t * @property {String} spawnType\n\t * @readOnly\n\t */\n\tthis.spawnType = null;\n\t/**\n\t * A reference to the emitter function specific to the spawn type.\n\t * @property {Function} _spawnFunc\n\t * @private\n\t */\n\tthis._spawnFunc = null;\n\t/**\n\t * A rectangle relative to spawnPos to spawn particles inside if the spawn type is \"rect\".\n\t * @property {PIXI.Rectangle} spawnRect\n\t */\n\tthis.spawnRect = null;\n\t/**\n\t * A circle relative to spawnPos to spawn particles inside if the spawn type is \"circle\".\n\t * @property {PIXI.Circle} spawnCircle\n\t */\n\tthis.spawnCircle = null;\n\t/**\n\t * Number of particles to spawn each wave in a burst.\n\t * @property {int} particlesPerWave\n\t * @default 1\n\t */\n\tthis.particlesPerWave = 1;\n\t/**\n\t * Spacing between particles in a burst. 0 gives a random angle for each particle.\n\t * @property {Number} particleSpacing\n\t * @default 0\n\t */\n\tthis.particleSpacing = 0;\n\t/**\n\t * Angle at which to start spawning particles in a burst.\n\t * @property {Number} angleStart\n\t * @default 0\n\t */\n\tthis.angleStart = 0;\n\t/**\n\t * Rotation of the emitter or emitter's owner in degrees. This is added to\n\t * the calculated spawn angle.\n\t * To change this, use rotate().\n\t * @property {Number} rotation\n\t * @default 0\n\t * @readOnly\n\t */\n\tthis.rotation = 0;\n\t/**\n\t * The world position of the emitter's owner, to add spawnPos to when\n\t * spawning particles. To change this, use updateOwnerPos().\n\t * @property {PIXI.Point} ownerPos\n\t * @default {x:0, y:0}\n\t * @readOnly\n\t */\n\tthis.ownerPos = null;\n\t/**\n\t * The origin + spawnPos in the previous update, so that the spawn position\n\t * can be interpolated to space out particles better.\n\t * @property {PIXI.Point} _prevEmitterPos\n\t * @private\n\t */\n\tthis._prevEmitterPos = null;\n\t/**\n\t * If _prevEmitterPos is valid, to prevent interpolation on the first update\n\t * @property {Boolean} _prevPosIsValid\n\t * @private\n\t * @default false\n\t */\n\tthis._prevPosIsValid = false;\n\t/**\n\t * If either ownerPos or spawnPos has changed since the previous update.\n\t * @property {Boolean} _posChanged\n\t * @private\n\t */\n\tthis._posChanged = false;\n\t/**\n\t * If the parent is a ParticleContainer from Pixi V3\n\t * @property {Boolean} _parentIsPC\n\t * @private\n\t */\n\tthis._parentIsPC = false;\n\t/**\n\t * The display object to add particles to.\n\t * @property {PIXI.DisplayObjectContainer} _parent\n\t * @private\n\t */\n\tthis._parent = null;\n\t/**\n\t * If particles should be added at the back of the display list instead of the front.\n\t * @property {Boolean} addAtBack\n\t */\n\tthis.addAtBack = false;\n\t/**\n\t * The current number of active particles.\n\t * @property {Number} particleCount\n\t * @readOnly\n\t */\n\tthis.particleCount = 0;\n\t/**\n\t * If particles should be emitted during update() calls. Setting this to false\n\t * stops new particles from being created, but allows existing ones to die out.\n\t * @property {Boolean} _emit\n\t * @private\n\t */\n\tthis._emit = false;\n\t/**\n\t * The timer for when to spawn particles in seconds, where numbers less\n\t * than 0 mean that particles should be spawned.\n\t * @property {Number} _spawnTimer\n\t * @private\n\t */\n\tthis._spawnTimer = 0;\n\t/**\n\t * The life of the emitter in seconds.\n\t * @property {Number} _emitterLife\n\t * @private\n\t */\n\tthis._emitterLife = -1;\n\t/**\n\t * The particles that are active and on the display list. This is the first particle in a\n\t * linked list.\n\t * @property {Particle} _activeParticlesFirst\n\t * @private\n\t */\n\tthis._activeParticlesFirst = null;\n\t/**\n\t * The particles that are active and on the display list. This is the last particle in a\n\t * linked list.\n\t * @property {Particle} _activeParticlesLast\n\t * @private\n\t */\n\tthis._activeParticlesLast = null;\n\t/**\n\t * The particles that are not currently being used. This is the first particle in a\n\t * linked list.\n\t * @property {Particle} _poolFirst\n\t * @private\n\t */\n\tthis._poolFirst = null;\n\t/**\n\t * The original config object that this emitter was initialized with.\n\t * @property {Object} _origConfig\n\t * @private\n\t */\n\tthis._origConfig = null;\n\t/**\n\t * The original particle image data that this emitter was initialized with.\n\t * @property {PIXI.Texture|Array|String} _origArt\n\t * @private\n\t */\n\tthis._origArt = null;\n\t/**\n\t * If the update function is called automatically from the shared ticker.\n\t * Setting this to false requires calling the update function manually.\n\t * @property {Boolean} _autoUpdate\n\t * @private\n\t */\n\tthis._autoUpdate = false;\n\t/**\n\t * If the emitter should destroy itself when all particles have died out. This is set by\n\t * playOnceAndDestroy();\n\t * @property {Boolean} _destroyWhenComplete\n\t * @private\n\t */\n\tthis._destroyWhenComplete = false;\n\n\t//set the initial parent\n\tthis.parent = particleParent;\n\n\tif(particleImages && config)\n\t\tthis.init(particleImages, config);\n\n\t//save often used functions on the instance instead of the prototype for better speed\n\tthis.recycle = this.recycle;\n\tthis.update = this.update;\n\tthis.rotate = this.rotate;\n\tthis.updateSpawnPos = this.updateSpawnPos;\n\tthis.updateOwnerPos = this.updateOwnerPos;\n};\n\n// Reference to the prototype\nvar p = Emitter.prototype = {};\n\nvar helperPoint = new PIXI.Point();\n\n/**\n * Time between particle spawns in seconds. If this value is not a number greater than 0,\n * it will be set to 1 (particle per second) to prevent infinite loops.\n * @member {Number} PIXI.particles.Emitter#frequency\n */\nObject.defineProperty(p, \"frequency\",\n{\n\tget: function() { return this._frequency; },\n\tset: function(value)\n\t{\n\t\t//do some error checking to prevent infinite loops\n\t\tif(typeof value == \"number\" && value > 0)\n\t\t\tthis._frequency = value;\n\t\telse\n\t\t\tthis._frequency = 1;\n\t}\n});\n\n/**\n * The constructor used to create new particles. The default is\n * the built in Particle class. Setting this will dump any active or\n * pooled particles, if the emitter has already been used.\n * @member {Function} PIXI.particles.Emitter#particleConstructor\n */\nObject.defineProperty(p, \"particleConstructor\",\n{\n\tget: function() { return this._particleConstructor; },\n\tset: function(value)\n\t{\n\t\tif(value != this._particleConstructor)\n\t\t{\n\t\t\tthis._particleConstructor = value;\n\t\t\t//clean up existing particles\n\t\t\tthis.cleanup();\n\t\t\t//scrap all the particles\n\t\t\tfor (var particle = this._poolFirst; particle; particle = particle.next)\n\t\t\t{\n\t\t\t\tparticle.destroy();\n\t\t\t}\n\t\t\tthis._poolFirst = null;\n\t\t\t//re-initialize the emitter so that the new constructor can do anything it needs to\n\t\t\tif(this._origConfig && this._origArt)\n\t\t\t\tthis.init(this._origArt, this._origConfig);\n\t\t}\n\t}\n});\n\n/**\n* The display object to add particles to. Settings this will dump any active particles.\n* @member {PIXI.DisplayObjectContainer} PIXI.particles.Emitter#parent\n*/\nObject.defineProperty(p, \"parent\",\n{\n\tget: function() { return this._parent; },\n\tset: function(value)\n\t{\n\t\t//if our previous parent was a ParticleContainer, then we need to remove\n\t\t//pooled particles from it\n\t\tif (this._parentIsPC) {\n\t\t\tfor (var particle = this._poolFirst; particle; particle = particle.next)\n\t\t\t{\n\t\t\t\tif(particle.parent)\n\t\t\t\t\tparticle.parent.removeChild(particle);\n\t\t\t}\n\t\t}\n\t\tthis.cleanup();\n\t\tthis._parent = value;\n\t\tthis._parentIsPC = ParticleContainer && value && value instanceof ParticleContainer;\n\t}\n});\n\n/**\n * Sets up the emitter based on the config settings.\n * @method PIXI.particles.Emitter#init\n * @param {Array|PIXI.Texture} art A texture or array of textures to use for the particles.\n * @param {Object} config A configuration object containing settings for the emitter.\n */\np.init = function(art, config)\n{\n\tif(!art || !config)\n\t\treturn;\n\t//clean up any existing particles\n\tthis.cleanup();\n\n\t//store the original config and particle images, in case we need to re-initialize\n\t//when the particle constructor is changed\n\tthis._origConfig = config;\n\tthis._origArt = art;\n\n\t//set up the array of data, also ensuring that it is an array\n\tart = Array.isArray(art) ? art.slice() : [art];\n\t//run the art through the particle class's parsing function\n\tvar partClass = this._particleConstructor;\n\tthis.particleImages = partClass.parseArt ? partClass.parseArt(art) : art;\n\t///////////////////////////\n\t// Particle Properties //\n\t///////////////////////////\n\t//set up the alpha\n\tif (config.alpha)\n\t{\n\t\tthis.startAlpha = config.alpha.start;\n\t\tthis.endAlpha = config.alpha.end;\n\t}\n\telse\n\t\tthis.startAlpha = this.endAlpha = 1;\n\t//set up the speed\n\tif (config.speed)\n\t{\n\t\tthis.startSpeed = config.speed.start;\n\t\tthis.endSpeed = config.speed.end;\n\t\tthis.minimumSpeedMultiplier = config.speed.minimumSpeedMultiplier || 1;\n\t}\n\telse\n\t{\n\t\tthis.minimumSpeedMultiplier = 1;\n\t\tthis.startSpeed = this.endSpeed = 0;\n\t}\n\t//set up acceleration\n\tvar acceleration = config.acceleration;\n\tif(acceleration && (acceleration.x || acceleration.y))\n\t{\n\t\tthis.endSpeed = this.startSpeed;\n\t\tthis.acceleration = new PIXI.Point(acceleration.x, acceleration.y);\n\t\tthis.maxSpeed = config.maxSpeed || NaN;\n\t}\n\telse\n\t\tthis.acceleration = new PIXI.Point();\n\t//set up the scale\n\tif (config.scale)\n\t{\n\t\tthis.startScale = config.scale.start;\n\t\tthis.endScale = config.scale.end;\n\t\tthis.minimumScaleMultiplier = config.scale.minimumScaleMultiplier || 1;\n\t}\n\telse\n\t\tthis.startScale = this.endScale = this.minimumScaleMultiplier = 1;\n\t//set up the color\n\tif (config.color)\n\t{\n\t\tthis.startColor = ParticleUtils.hexToRGB(config.color.start);\n\t\t//if it's just one color, only use the start color\n\t\tif (config.color.start != config.color.end)\n\t\t{\n\t\t\tthis.endColor = ParticleUtils.hexToRGB(config.color.end);\n\t\t}\n\t\telse\n\t\t\tthis.endColor = null;\n\t}\n\t//set up the start rotation\n\tif (config.startRotation)\n\t{\n\t\tthis.minStartRotation = config.startRotation.min;\n\t\tthis.maxStartRotation = config.startRotation.max;\n\t}\n\telse\n\t\tthis.minStartRotation = this.maxStartRotation = 0;\n\tif (config.noRotation &&\n\t\t(this.minStartRotation || this.maxStartRotation))\n\t{\n\t\tthis.noRotation = !!config.noRotation;\n\t}\n\telse\n\t\tthis.noRotation = false;\n\t//set up the rotation speed\n\tif (config.rotationSpeed)\n\t{\n\t\tthis.minRotationSpeed = config.rotationSpeed.min;\n\t\tthis.maxRotationSpeed = config.rotationSpeed.max;\n\t}\n\telse\n\t\tthis.minRotationSpeed = this.maxRotationSpeed = 0;\n\t//set up the lifetime\n\tthis.minLifetime = config.lifetime.min;\n\tthis.maxLifetime = config.lifetime.max;\n\t//get the blend mode\n\tthis.particleBlendMode = ParticleUtils.getBlendMode(config.blendMode);\n\t//use the custom ease if provided\n\tif (config.ease)\n\t{\n\t\tthis.customEase = typeof config.ease == \"function\" ?\n\t\t\t\t\t\t\t\t\t\t\t\t\tconfig.ease :\n\t\t\t\t\t\t\t\t\t\t\t\t\tParticleUtils.generateEase(config.ease);\n\t}\n\telse\n\t\tthis.customEase = null;\n\t//set up the extra data, running it through the particle class's parseData function.\n\tif(partClass.parseData)\n\t\tthis.extraData = partClass.parseData(config.extraData);\n\telse\n\t\tthis.extraData = config.extraData || null;\n\t//////////////////////////\n\t// Emitter Properties //\n\t//////////////////////////\n\t//reset spawn type specific settings\n\tthis.spawnRect = this.spawnCircle = null;\n\tthis.particlesPerWave = 1;\n\tthis.particleSpacing = 0;\n\tthis.angleStart = 0;\n\tvar spawnCircle;\n\t//determine the spawn function to use\n\tswitch(config.spawnType)\n\t{\n\t\tcase \"rect\":\n\t\t\tthis.spawnType = \"rect\";\n\t\t\tthis._spawnFunc = this._spawnRect;\n\t\t\tvar spawnRect = config.spawnRect;\n\t\t\tthis.spawnRect = new PIXI.Rectangle(spawnRect.x, spawnRect.y, spawnRect.w, spawnRect.h);\n\t\t\tbreak;\n\t\tcase \"circle\":\n\t\t\tthis.spawnType = \"circle\";\n\t\t\tthis._spawnFunc = this._spawnCircle;\n\t\t\tspawnCircle = config.spawnCircle;\n\t\t\tthis.spawnCircle = new PIXI.Circle(spawnCircle.x, spawnCircle.y, spawnCircle.r);\n\t\t\tbreak;\n\t\tcase \"ring\":\n\t\t\tthis.spawnType = \"ring\";\n\t\t\tthis._spawnFunc = this._spawnRing;\n\t\t\tspawnCircle = config.spawnCircle;\n\t\t\tthis.spawnCircle = new PIXI.Circle(spawnCircle.x, spawnCircle.y, spawnCircle.r);\n\t\t\tthis.spawnCircle.minRadius = spawnCircle.minR;\n\t\t\tbreak;\n\t\tcase \"burst\":\n\t\t\tthis.spawnType = \"burst\";\n\t\t\tthis._spawnFunc = this._spawnBurst;\n\t\t\tthis.particlesPerWave = config.particlesPerWave;\n\t\t\tthis.particleSpacing = config.particleSpacing;\n\t\t\tthis.angleStart = config.angleStart ? config.angleStart : 0;\n\t\t\tbreak;\n\t\tcase \"point\":\n\t\t\tthis.spawnType = \"point\";\n\t\t\tthis._spawnFunc = this._spawnPoint;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthis.spawnType = \"point\";\n\t\t\tthis._spawnFunc = this._spawnPoint;\n\t\t\tbreak;\n\t}\n\t//set the spawning frequency\n\tthis.frequency = config.frequency;\n\t//set the emitter lifetime\n\tthis.emitterLifetime = config.emitterLifetime || -1;\n\t//set the max particles\n\tthis.maxParticles = config.maxParticles > 0 ? config.maxParticles : 1000;\n\t//determine if we should add the particle at the back of the list or not\n\tthis.addAtBack = !!config.addAtBack;\n\t//reset the emitter position and rotation variables\n\tthis.rotation = 0;\n\tthis.ownerPos = new PIXI.Point();\n\tthis.spawnPos = new PIXI.Point(config.pos.x, config.pos.y);\n\tthis._prevEmitterPos = this.spawnPos.clone();\n\t//previous emitter position is invalid and should not be used for interpolation\n\tthis._prevPosIsValid = false;\n\t//start emitting\n\tthis._spawnTimer = 0;\n\tthis.emit = config.emit === undefined ? true : !!config.emit;\n\tthis.autoUpdate = config.autoUpdate === undefined ? false : !!config.autoUpdate;\n};\n\n/**\n * Recycles an individual particle.\n * @method PIXI.particles.Emitter#recycle\n * @param {Particle} particle The particle to recycle.\n * @private\n */\np.recycle = function(particle)\n{\n\tif(particle.next)\n\t\tparticle.next.prev = particle.prev;\n\tif(particle.prev)\n\t\tparticle.prev.next = particle.next;\n\tif(particle == this._activeParticlesLast)\n\t\tthis._activeParticlesLast = particle.prev;\n\tif(particle == this._activeParticlesFirst)\n\t\tthis._activeParticlesFirst = particle.next;\n\t//add to pool\n\tparticle.prev = null;\n\tparticle.next = this._poolFirst;\n\tthis._poolFirst = particle;\n\t//remove child from display, or make it invisible if it is in a ParticleContainer\n\tif(this._parentIsPC)\n\t{\n\t\tparticle.alpha = 0;\n\t\tparticle.visible = false;\n\t}\n\telse\n\t{\n\t\tif(particle.parent)\n\t\t\tparticle.parent.removeChild(particle);\n\t}\n\t//decrease count\n\t--this.particleCount;\n};\n\n/**\n * Sets the rotation of the emitter to a new value.\n * @method PIXI.particles.Emitter#rotate\n * @param {Number} newRot The new rotation, in degrees.\n */\np.rotate = function(newRot)\n{\n\tif (this.rotation == newRot) return;\n\t//caclulate the difference in rotation for rotating spawnPos\n\tvar diff = newRot - this.rotation;\n\tthis.rotation = newRot;\n\t//rotate spawnPos\n\tParticleUtils.rotatePoint(diff, this.spawnPos);\n\t//mark the position as having changed\n\tthis._posChanged = true;\n};\n\n/**\n * Changes the spawn position of the emitter.\n * @method PIXI.particles.Emitter#updateSpawnPos\n * @param {Number} x The new x value of the spawn position for the emitter.\n * @param {Number} y The new y value of the spawn position for the emitter.\n */\np.updateSpawnPos = function(x, y)\n{\n\tthis._posChanged = true;\n\tthis.spawnPos.x = x;\n\tthis.spawnPos.y = y;\n};\n\n/**\n * Changes the position of the emitter's owner. You should call this if you are adding\n * particles to the world display object that your emitter's owner is moving around in.\n * @method PIXI.particles.Emitter#updateOwnerPos\n * @param {Number} x The new x value of the emitter's owner.\n * @param {Number} y The new y value of the emitter's owner.\n */\np.updateOwnerPos = function(x, y)\n{\n\tthis._posChanged = true;\n\tthis.ownerPos.x = x;\n\tthis.ownerPos.y = y;\n};\n\n/**\n * Prevents emitter position interpolation in the next update.\n * This should be used if you made a major position change of your emitter's owner\n * that was not normal movement.\n * @method PIXI.particles.Emitter#resetPositionTracking\n */\np.resetPositionTracking = function()\n{\n\tthis._prevPosIsValid = false;\n};\n\n/**\n * If particles should be emitted during update() calls. Setting this to false\n * stops new particles from being created, but allows existing ones to die out.\n * @member {Boolean} PIXI.particles.Emitter#emit\n */\nObject.defineProperty(p, \"emit\",\n{\n\tget: function() { return this._emit; },\n\tset: function(value)\n\t{\n\t\tthis._emit = !!value;\n\t\tthis._emitterLife = this.emitterLifetime;\n\t}\n});\n\n/**\n * If the update function is called automatically from the shared ticker.\n * Setting this to false requires calling the update function manually.\n * @member {Boolean} PIXI.particles.Emitter#autoUpdate\n */\nObject.defineProperty(p, \"autoUpdate\",\n{\n\tget: function() { return this._autoUpdate; },\n\tset: function(value)\n\t{\n\t\tif (this._autoUpdate && !value)\n\t\t{\n\t\t\tticker.remove(this.update, this);\n\t\t}\n\t\telse if (!this._autoUpdate && value)\n\t\t{\n\t\t\tticker.add(this.update, this);\n\t\t}\n\t\tthis._autoUpdate = !!value;\n\t}\n});\n\n/**\n * Starts emitting particles, sets autoUpdate to true, and sets up the Emitter to destroy itself\n * when particle emission is complete.\n * @method PIXI.particles.Emitter#playOnceAndDestroy\n */\np.playOnceAndDestroy = function()\n{\n\tthis.autoUpdate = true;\n\tthis.emit = true;\n\tthis._destroyWhenComplete = true;\n};\n\n/**\n * Updates all particles spawned by this emitter and emits new ones.\n * @method PIXI.particles.Emitter#update\n * @param {Number} delta Time elapsed since the previous frame, in __seconds__.\n */\np.update = function(delta)\n{\n\tif (this._autoUpdate)\n\t{\n\t\tdelta = delta / PIXI.settings.TARGET_FPMS / 1000;\n\t}\n\n\t//if we don't have a parent to add particles to, then don't do anything.\n\t//this also works as a isDestroyed check\n\tif (!this._parent) return;\n\t//update existing particles\n\tvar i, particle, next;\n\tfor (particle = this._activeParticlesFirst; particle; particle = next)\n\t{\n\t\tnext = particle.next;\n\t\tparticle.update(delta);\n\t}\n\tvar prevX, prevY;\n\t//if the previous position is valid, store these for later interpolation\n\tif(this._prevPosIsValid)\n\t{\n\t\tprevX = this._prevEmitterPos.x;\n\t\tprevY = this._prevEmitterPos.y;\n\t}\n\t//store current position of the emitter as local variables\n\tvar curX = this.ownerPos.x + this.spawnPos.x;\n\tvar curY = this.ownerPos.y + this.spawnPos.y;\n\t//spawn new particles\n\tif (this._emit)\n\t{\n\t\t//decrease spawn timer\n\t\tthis._spawnTimer -= delta;\n\t\t//while _spawnTimer < 0, we have particles to spawn\n\t\twhile(this._spawnTimer <= 0)\n\t\t{\n\t\t\t//determine if the emitter should stop spawning\n\t\t\tif(this._emitterLife > 0)\n\t\t\t{\n\t\t\t\tthis._emitterLife -= this._frequency;\n\t\t\t\tif(this._emitterLife <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis._spawnTimer = 0;\n\t\t\t\t\tthis._emitterLife = 0;\n\t\t\t\t\tthis.emit = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//determine if we have hit the particle limit\n\t\t\tif(this.particleCount >= this.maxParticles)\n\t\t\t{\n\t\t\t\tthis._spawnTimer += this._frequency;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//determine the particle lifetime\n\t\t\tvar lifetime;\n\t\t\tif (this.minLifetime == this.maxLifetime)\n\t\t\t\tlifetime = this.minLifetime;\n\t\t\telse\n\t\t\t\tlifetime = Math.random() * (this.maxLifetime - this.minLifetime) + this.minLifetime;\n\t\t\t//only make the particle if it wouldn't immediately destroy itself\n\t\t\tif(-this._spawnTimer < lifetime)\n\t\t\t{\n\t\t\t\t//If the position has changed and this isn't the first spawn,\n\t\t\t\t//interpolate the spawn position\n\t\t\t\tvar emitPosX, emitPosY;\n\t\t\t\tif (this._prevPosIsValid && this._posChanged)\n\t\t\t\t{\n\t\t\t\t\t//1 - _spawnTimer / delta, but _spawnTimer is negative\n\t\t\t\t\tvar lerp = 1 + this._spawnTimer / delta;\n\t\t\t\t\temitPosX = (curX - prevX) * lerp + prevX;\n\t\t\t\t\temitPosY = (curY - prevY) * lerp + prevY;\n\t\t\t\t}\n\t\t\t\telse//otherwise just set to the spawn position\n\t\t\t\t{\n\t\t\t\t\temitPosX = curX;\n\t\t\t\t\temitPosY = curY;\n\t\t\t\t}\n\t\t\t\t//create enough particles to fill the wave (non-burst types have a wave of 1)\n\t\t\t\ti = 0;\n\t\t\t\tfor(var len = Math.min(this.particlesPerWave, this.maxParticles - this.particleCount); i < len; ++i)\n\t\t\t\t{\n\t\t\t\t\t//create particle\n\t\t\t\t\tvar p, rand;\n\t\t\t\t\tif(this._poolFirst)\n\t\t\t\t\t{\n\t\t\t\t\t\tp = this._poolFirst;\n\t\t\t\t\t\tthis._poolFirst = this._poolFirst.next;\n\t\t\t\t\t\tp.next = null;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tp = new this.particleConstructor(this);\n\t\t\t\t\t}\n\n\t\t\t\t\t//set a random texture if we have more than one\n\t\t\t\t\tif(this.particleImages.length > 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tp.applyArt(this.particleImages.random());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//if they are actually the same texture, a standard particle\n\t\t\t\t\t\t//will quit early from the texture setting in setTexture().\n\t\t\t\t\t\tp.applyArt(this.particleImages[0]);\n\t\t\t\t\t}\n\t\t\t\t\t//set up the start and end values\n\t\t\t\t\tp.startAlpha = this.startAlpha;\n\t\t\t\t\tp.endAlpha = this.endAlpha;\n\t\t\t\t\tif(this.minimumSpeedMultiplier != 1)\n\t\t\t\t\t{\n\t\t\t\t\t\trand = Math.random() * (1 - this.minimumSpeedMultiplier) + this.minimumSpeedMultiplier;\n\t\t\t\t\t\tp.startSpeed = this.startSpeed * rand;\n\t\t\t\t\t\tp.endSpeed = this.endSpeed * rand;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tp.startSpeed = this.startSpeed;\n\t\t\t\t\t\tp.endSpeed = this.endSpeed;\n\t\t\t\t\t}\n\t\t\t\t\tp.acceleration.x = this.acceleration.x;\n\t\t\t\t\tp.acceleration.y = this.acceleration.y;\n\t\t\t\t\tp.maxSpeed = this.maxSpeed;\n\t\t\t\t\tif(this.minimumScaleMultiplier != 1)\n\t\t\t\t\t{\n\t\t\t\t\t\trand = Math.random() * (1 - this.minimumScaleMultiplier) + this.minimumScaleMultiplier;\n\t\t\t\t\t\tp.startScale = this.startScale * rand;\n\t\t\t\t\t\tp.endScale = this.endScale * rand;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tp.startScale = this.startScale;\n\t\t\t\t\t\tp.endScale = this.endScale;\n\t\t\t\t\t}\n\t\t\t\t\tp.startColor = this.startColor;\n\t\t\t\t\tp.endColor = this.endColor;\n\t\t\t\t\t//randomize the rotation speed\n\t\t\t\t\tif(this.minRotationSpeed == this.maxRotationSpeed)\n\t\t\t\t\t\tp.rotationSpeed = this.minRotationSpeed;\n\t\t\t\t\telse\n\t\t\t\t\t\tp.rotationSpeed = Math.random() * (this.maxRotationSpeed - this.minRotationSpeed) + this.minRotationSpeed;\n\t\t\t\t\tp.noRotation = this.noRotation;\n\t\t\t\t\t//set up the lifetime\n\t\t\t\t\tp.maxLife = lifetime;\n\t\t\t\t\t//set the blend mode\n\t\t\t\t\tp.blendMode = this.particleBlendMode;\n\t\t\t\t\t//set the custom ease, if any\n\t\t\t\t\tp.ease = this.customEase;\n\t\t\t\t\t//set the extra data, if any\n\t\t\t\t\tp.extraData = this.extraData;\n\t\t\t\t\t//call the proper function to handle rotation and position of particle\n\t\t\t\t\tthis._spawnFunc(p, emitPosX, emitPosY, i);\n\t\t\t\t\t//initialize particle\n\t\t\t\t\tp.init();\n\t\t\t\t\t//update the particle by the time passed, so the particles are spread out properly\n\t\t\t\t\tp.update(-this._spawnTimer);//we want a positive delta, because a negative delta messes things up\n\t\t\t\t\t//add the particle to the display list\n\t\t\t\t\tif(!this._parentIsPC || !p.parent)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (this.addAtBack)\n\t\t\t\t\t\t\tthis._parent.addChildAt(p, 0);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthis._parent.addChild(p);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//kind of hacky, but performance friendly\n\t\t\t\t\t\t//shuffle children to correct place\n\t\t\t\t\t\tvar children = this._parent.children;\n\t\t\t\t\t\t//avoid using splice if possible\n\t\t\t\t\t\tif(children[0] == p)\n\t\t\t\t\t\t\tchildren.shift();\n\t\t\t\t\t\telse if(children[children.length-1] == p)\n\t\t\t\t\t\t\tchildren.pop();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar index = children.indexOf(p);\n\t\t\t\t\t\t\tchildren.splice(index, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(this.addAtBack)\n\t\t\t\t\t\t\tchildren.unshift(p);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tchildren.push(p);\n\t\t\t\t\t}\n\t\t\t\t\t//add particle to list of active particles\n\t\t\t\t\tif(this._activeParticlesLast)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis._activeParticlesLast.next = p;\n\t\t\t\t\t\tp.prev = this._activeParticlesLast;\n\t\t\t\t\t\tthis._activeParticlesLast = p;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tthis._activeParticlesLast = this._activeParticlesFirst = p;\n\t\t\t\t\t}\n\t\t\t\t\t++this.particleCount;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//increase timer and continue on to any other particles that need to be created\n\t\t\tthis._spawnTimer += this._frequency;\n\t\t}\n\t}\n\t//if the position changed before this update, then keep track of that\n\tif(this._posChanged)\n\t{\n\t\tthis._prevEmitterPos.x = curX;\n\t\tthis._prevEmitterPos.y = curY;\n\t\tthis._prevPosIsValid = true;\n\t\tthis._posChanged = false;\n\t}\n\n\t//if we are all done and should destroy ourselves, take care of that\n\tif (this._destroyWhenComplete && !this._emit && !this._activeParticlesFirst)\n\t{\n\t\tthis.destroy();\n\t}\n};\n\n/**\n * Positions a particle for a point type emitter.\n * @method PIXI.particles.Emitter#_spawnPoint\n * @private\n * @param {Particle} p The particle to position and rotate.\n * @param {Number} emitPosX The emitter's x position\n * @param {Number} emitPosY The emitter's y position\n * @param {int} i The particle number in the current wave. Not used for this function.\n */\np._spawnPoint = function(p, emitPosX, emitPosY)\n{\n\t//set the initial rotation/direction of the particle based on\n\t//starting particle angle and rotation of emitter\n\tif (this.minStartRotation == this.maxStartRotation)\n\t\tp.rotation = this.minStartRotation + this.rotation;\n\telse\n\t\tp.rotation = Math.random() * (this.maxStartRotation - this.minStartRotation) + this.minStartRotation + this.rotation;\n\t//drop the particle at the emitter's position\n\tp.position.x = emitPosX;\n\tp.position.y = emitPosY;\n};\n\n/**\n * Positions a particle for a rectangle type emitter.\n * @method PIXI.particles.Emitter#_spawnRect\n * @private\n * @param {Particle} p The particle to position and rotate.\n * @param {Number} emitPosX The emitter's x position\n * @param {Number} emitPosY The emitter's y position\n * @param {int} i The particle number in the current wave. Not used for this function.\n */\np._spawnRect = function(p, emitPosX, emitPosY)\n{\n\t//set the initial rotation/direction of the particle based on starting\n\t//particle angle and rotation of emitter\n\tif (this.minStartRotation == this.maxStartRotation)\n\t\tp.rotation = this.minStartRotation + this.rotation;\n\telse\n\t\tp.rotation = Math.random() * (this.maxStartRotation - this.minStartRotation) + this.minStartRotation + this.rotation;\n\t//place the particle at a random point in the rectangle\n\thelperPoint.x = Math.random() * this.spawnRect.width + this.spawnRect.x;\n\thelperPoint.y = Math.random() * this.spawnRect.height + this.spawnRect.y;\n\tif(this.rotation !== 0)\n\t\tParticleUtils.rotatePoint(this.rotation, helperPoint);\n\tp.position.x = emitPosX + helperPoint.x;\n\tp.position.y = emitPosY + helperPoint.y;\n};\n\n/**\n * Positions a particle for a circle type emitter.\n * @method PIXI.particles.Emitter#_spawnCircle\n * @private\n * @param {Particle} p The particle to position and rotate.\n * @param {Number} emitPosX The emitter's x position\n * @param {Number} emitPosY The emitter's y position\n * @param {int} i The particle number in the current wave. Not used for this function.\n */\np._spawnCircle = function(p, emitPosX, emitPosY)\n{\n\t//set the initial rotation/direction of the particle based on starting\n\t//particle angle and rotation of emitter\n\tif (this.minStartRotation == this.maxStartRotation)\n\t\tp.rotation = this.minStartRotation + this.rotation;\n\telse\n\t\tp.rotation = Math.random() * (this.maxStartRotation - this.minStartRotation) +\n\t\t\t\t\tthis.minStartRotation + this.rotation;\n\t//place the particle at a random radius in the circle\n\thelperPoint.x = Math.random() * this.spawnCircle.radius;\n\thelperPoint.y = 0;\n\t//rotate the point to a random angle in the circle\n\tParticleUtils.rotatePoint(Math.random() * 360, helperPoint);\n\t//offset by the circle's center\n\thelperPoint.x += this.spawnCircle.x;\n\thelperPoint.y += this.spawnCircle.y;\n\t//rotate the point by the emitter's rotation\n\tif(this.rotation !== 0)\n\t\tParticleUtils.rotatePoint(this.rotation, helperPoint);\n\t//set the position, offset by the emitter's position\n\tp.position.x = emitPosX + helperPoint.x;\n\tp.position.y = emitPosY + helperPoint.y;\n};\n\n/**\n * Positions a particle for a ring type emitter.\n * @method PIXI.particles.Emitter#_spawnRing\n * @private\n * @param {Particle} p The particle to position and rotate.\n * @param {Number} emitPosX The emitter's x position\n * @param {Number} emitPosY The emitter's y position\n * @param {int} i The particle number in the current wave. Not used for this function.\n */\np._spawnRing = function(p, emitPosX, emitPosY)\n{\n\tvar spawnCircle = this.spawnCircle;\n\t//set the initial rotation/direction of the particle based on starting\n\t//particle angle and rotation of emitter\n\tif (this.minStartRotation == this.maxStartRotation)\n\t\tp.rotation = this.minStartRotation + this.rotation;\n\telse\n\t\tp.rotation = Math.random() * (this.maxStartRotation - this.minStartRotation) +\n\t\t\t\t\tthis.minStartRotation + this.rotation;\n\t//place the particle at a random radius in the ring\n\tif(spawnCircle.minRadius == spawnCircle.radius)\n\t{\n\t\thelperPoint.x = Math.random() * (spawnCircle.radius - spawnCircle.minRadius) +\n\t\t\t\t\t\tspawnCircle.minRadius;\n\t}\n\telse\n\t\thelperPoint.x = spawnCircle.radius;\n\thelperPoint.y = 0;\n\t//rotate the point to a random angle in the circle\n\tvar angle = Math.random() * 360;\n\tp.rotation += angle;\n\tParticleUtils.rotatePoint(angle, helperPoint);\n\t//offset by the circle's center\n\thelperPoint.x += this.spawnCircle.x;\n\thelperPoint.y += this.spawnCircle.y;\n\t//rotate the point by the emitter's rotation\n\tif(this.rotation !== 0)\n\t\tParticleUtils.rotatePoint(this.rotation, helperPoint);\n\t//set the position, offset by the emitter's position\n\tp.position.x = emitPosX + helperPoint.x;\n\tp.position.y = emitPosY + helperPoint.y;\n};\n\n/**\n * Positions a particle for a burst type emitter.\n * @method PIXI.particles.Emitter#_spawnBurst\n * @private\n * @param {Particle} p The particle to position and rotate.\n * @param {Number} emitPosX The emitter's x position\n * @param {Number} emitPosY The emitter's y position\n * @param {int} i The particle number in the current wave.\n */\np._spawnBurst = function(p, emitPosX, emitPosY, i)\n{\n\t//set the initial rotation/direction of the particle based on spawn\n\t//angle and rotation of emitter\n\tif(this.particleSpacing === 0)\n\t\tp.rotation = Math.random() * 360;\n\telse\n\t\tp.rotation = this.angleStart + (this.particleSpacing * i) + this.rotation;\n\t//drop the particle at the emitter's position\n\tp.position.x = emitPosX;\n\tp.position.y = emitPosY;\n};\n\n/**\n * Kills all active particles immediately.\n * @method PIXI.particles.Emitter#cleanup\n */\np.cleanup = function()\n{\n\tvar particle, next;\n\tfor (particle = this._activeParticlesFirst; particle; particle = next)\n\t{\n\t\tnext = particle.next;\n\t\tthis.recycle(particle);\n\t\tif(particle.parent)\n\t\t\tparticle.parent.removeChild(particle);\n\t}\n\tthis._activeParticlesFirst = this._activeParticlesLast = null;\n\tthis.particleCount = 0;\n};\n\n/**\n * Destroys the emitter and all of its particles.\n * @method PIXI.particles.Emitter#destroy\n */\np.destroy = function()\n{\n\t//make sure we aren't still listening to any tickers\n\tthis.autoUpdate = false;\n\t//puts all active particles in the pool, and removes them from the particle parent\n\tthis.cleanup();\n\t//wipe the pool clean\n\tvar next;\n\tfor (var particle = this._poolFirst; particle; particle = next)\n\t{\n\t\t//store next value so we don't lose it in our destroy call\n\t\tnext = particle.next;\n\t\tparticle.destroy();\n\t}\n\tthis._poolFirst = this._parent = this.particleImages = this.spawnPos = this.ownerPos =\n\t\tthis.startColor = this.endColor = this.customEase = null;\n};\n\nmodule.exports = Emitter;","var ParticleUtils = require(\"./ParticleUtils\");\nvar Sprite = PIXI.Sprite;\n\n/**\n * An individual particle image. You shouldn't have to deal with these.\n * @memberof PIXI.particles\n * @class Particle\n * @extends PIXI.Sprite\n * @constructor\n * @param {PIXI.particles.Emitter} emitter The emitter that controls this particle.\n */\nvar Particle = function(emitter)\n{\n\t//start off the sprite with a blank texture, since we are going to replace it\n\t//later when the particle is initialized.\n\tSprite.call(this);\n\n\t/**\n\t * The emitter that controls this particle.\n\t * @property {Emitter} emitter\n\t */\n\tthis.emitter = emitter;\n\t//particles should be centered\n\tthis.anchor.x = this.anchor.y = 0.5;\n\t/**\n\t * The velocity of the particle. Speed may change, but the angle also\n\t * contained in velocity is constant.\n\t * @property {PIXI.Point} velocity\n\t */\n\tthis.velocity = new PIXI.Point();\n\t/**\n\t * The maximum lifetime of this particle, in seconds.\n\t * @property {Number} maxLife\n\t */\n\tthis.maxLife = 0;\n\t/**\n\t * The current age of the particle, in seconds.\n\t * @property {Number} age\n\t */\n\tthis.age = 0;\n\t/**\n\t * A simple easing function to be applied to all properties that\n\t * are being interpolated.\n\t * @property {Function} ease\n\t */\n\tthis.ease = null;\n\t/**\n\t * Extra data that the emitter passes along for custom particles.\n\t * @property {Object} extraData\n\t */\n\tthis.extraData = null;\n\t/**\n\t * The alpha of the particle at the start of its life.\n\t * @property {Number} startAlpha\n\t */\n\tthis.startAlpha = 0;\n\t/**\n\t * The alpha of the particle at the end of its life.\n\t * @property {Number} endAlpha\n\t */\n\tthis.endAlpha = 0;\n\t/**\n\t * The speed of the particle at the start of its life.\n\t * @property {Number} startSpeed\n\t */\n\tthis.startSpeed = 0;\n\t/**\n\t * The speed of the particle at the end of its life.\n\t * @property {Number} endSpeed\n\t */\n\tthis.endSpeed = 0;\n\t/**\n\t * Acceleration to apply to the particle.\n\t * @property {PIXI.Point} accleration\n\t */\n\tthis.acceleration = new PIXI.Point();\n\t/**\n\t * The maximum speed allowed for accelerating particles. Negative values, values of 0 or NaN\n\t * will disable the maximum speed.\n\t * @property {Number} maxSpeed\n\t * @default NaN\n\t */\n\tthis.maxSpeed = NaN;\n\t/**\n\t * The scale of the particle at the start of its life.\n\t * @property {Number} startScale\n\t */\n\tthis.startScale = 0;\n\t/**\n\t * The scale of the particle at the start of its life.\n\t * @property {Number} endScale\n\t */\n\tthis.endScale = 0;\n\t/**\n\t * The tint of the particle at the start of its life.\n\t * @property {Array} startColor\n\t */\n\tthis.startColor = null;\n\t/**\n\t * The red tint of the particle at the start of its life.\n\t * This is pulled from startColor in init().\n\t * @property {uint} _sR\n\t * @private\n\t */\n\tthis._sR = 0;\n\t/**\n\t * The green tint of the particle at the start of its life.\n\t * This is pulled from startColor in init().\n\t * @property {uint} _sG\n\t * @private\n\t */\n\tthis._sG = 0;\n\t/**\n\t * The blue tint of the particle at the start of its life.\n\t * This is pulled from startColor in init().\n\t * @property {uint} _sB\n\t * @private\n\t */\n\tthis._sB = 0;\n\t/**\n\t * The tint of the particle at the start of its life.\n\t * @property {Array} endColor\n\t */\n\tthis.endColor = null;\n\t/**\n\t * The red tint of the particle at the end of its life.\n\t * This is pulled from endColor in init().\n\t * @property {uint} _eR\n\t * @private\n\t */\n\tthis._eR = 0;\n\t/**\n\t * The green tint of the particle at the end of its life.\n\t * This is pulled from endColor in init().\n\t * @property {uint} _sG\n\t * @private\n\t */\n\tthis._eG = 0;\n\t/**\n\t * The blue tint of the particle at the end of its life.\n\t * This is pulled from endColor in init().\n\t * @property {uint} _sB\n\t * @private\n\t */\n\tthis._eB = 0;\n\t/**\n\t * If alpha should be interpolated at all.\n\t * @property {Boolean} _doAlpha\n\t * @private\n\t */\n\tthis._doAlpha = false;\n\t/**\n\t * If scale should be interpolated at all.\n\t * @property {Boolean} _doScale\n\t * @private\n\t */\n\tthis._doScale = false;\n\t/**\n\t * If speed should be interpolated at all.\n\t * @property {Boolean} _doSpeed\n\t * @private\n\t */\n\tthis._doSpeed = false;\n\t/**\n\t * If acceleration should be handled at all. _doSpeed is mutually exclusive with this,\n\t * and _doSpeed gets priority.\n\t * @property {Boolean} _doAcceleration\n\t * @private\n\t */\n\tthis._doAcceleration = false;\n\t/**\n\t * If color should be interpolated at all.\n\t * @property {Boolean} _doColor\n\t * @private\n\t */\n\tthis._doColor = false;\n\t/**\n\t * If normal movement should be handled. Subclasses wishing to override movement\n\t * can set this to false in init().\n\t * @property {Boolean} _doNormalMovement\n\t * @private\n\t */\n\tthis._doNormalMovement = false;\n\t/**\n\t * One divided by the max life of the particle, saved for slightly faster math.\n\t * @property {Number} _oneOverLife\n\t * @private\n\t */\n\tthis._oneOverLife = 0;\n\n\t/**\n\t * Reference to the next particle in the list.\n\t * @property {Particle} next\n\t * @private\n\t */\n\tthis.next = null;\n\n\t/**\n\t * Reference to the previous particle in the list.\n\t * @property {Particle} prev\n\t * @private\n\t */\n\tthis.prev = null;\n\n\t//save often used functions on the instance instead of the prototype for better speed\n\tthis.init = this.init;\n\tthis.Particle_init = this.Particle_init;\n\tthis.update = this.update;\n\tthis.Particle_update = this.Particle_update;\n\tthis.applyArt = this.applyArt;\n\tthis.kill = this.kill;\n};\n\n// Reference to the prototype\nvar p = Particle.prototype = Object.create(Sprite.prototype);\n\n/**\n * Initializes the particle for use, based on the properties that have to\n * have been set already on the particle.\n * @method PIXI.particles.Particle#init\n */\n/**\n * A reference to init, so that subclasses can access it without the penalty of Function.call()\n * @method PIXI.particles.Particle#Particle_init\n * @protected\n */\np.init = p.Particle_init = function()\n{\n\t//reset the age\n\tthis.age = 0;\n\t//set up the velocity based on the start speed and rotation\n\tthis.velocity.x = this.startSpeed;\n\tthis.velocity.y = 0;\n\tParticleUtils.rotatePoint(this.rotation, this.velocity);\n\tif (this.noRotation)\n\t{\n\t\tthis.rotation = 0;\n\t}\n\telse\n\t{\n\t\t//convert rotation to Radians from Degrees\n\t\tthis.rotation *= ParticleUtils.DEG_TO_RADS;\n\t}\n\t//convert rotation speed to Radians from Degrees\n\tthis.rotationSpeed *= ParticleUtils.DEG_TO_RADS;\n\t//set alpha to inital alpha\n\tthis.alpha = this.startAlpha;\n\t//set scale to initial scale\n\tthis.scale.x = this.scale.y = this.startScale;\n\t//determine start and end color values\n\tif (this.startColor)\n\t{\n\t\tthis._sR = this.startColor[0];\n\t\tthis._sG = this.startColor[1];\n\t\tthis._sB = this.startColor[2];\n\t\tif(this.endColor)\n\t\t{\n\t\t\tthis._eR = this.endColor[0];\n\t\t\tthis._eG = this.endColor[1];\n\t\t\tthis._eB = this.endColor[2];\n\t\t}\n\t}\n\t//figure out what we need to interpolate\n\tthis._doAlpha = this.startAlpha != this.endAlpha;\n\tthis._doSpeed = this.startSpeed != this.endSpeed;\n\tthis._doScale = this.startScale != this.endScale;\n\tthis._doColor = !!this.endColor;\n\tthis._doAcceleration = this.acceleration.x !== 0 || this.acceleration.y !== 0;\n\t//_doNormalMovement can be cancelled by subclasses\n\tthis._doNormalMovement = this._doSpeed || this.startSpeed !== 0 || this._doAcceleration;\n\t//save our lerp helper\n\tthis._oneOverLife = 1 / this.maxLife;\n\t//set the inital color\n\tthis.tint = ParticleUtils.combineRGBComponents(this._sR, this._sG, this._sB);\n\t//ensure visibility\n\tthis.visible = true;\n};\n\n/**\n * Sets the texture for the particle. This can be overridden to allow\n * for an animated particle.\n * @method PIXI.particles.Particle#applyArt\n * @param {PIXI.Texture} art The texture to set.\n */\np.applyArt = function(art)\n{\n\tthis.texture = art || ParticleUtils.EMPTY_TEXTURE;\n};\n\n/**\n * Updates the particle.\n * @method PIXI.particles.Particle#update\n * @param {Number} delta Time elapsed since the previous frame, in __seconds__.\n * @return {Number} The standard interpolation multiplier (0-1) used for all relevant particle\n * properties. A value of -1 means the particle died of old age instead.\n */\n/**\n * A reference to update so that subclasses can access the original without the overhead\n * of Function.call().\n * @method PIXI.particles.Particle#Particle_update\n * @param {Number} delta Time elapsed since the previous frame, in __seconds__.\n * @return {Number} The standard interpolation multiplier (0-1) used for all relevant particle\n * properties. A value of -1 means the particle died of old age instead.\n * @protected\n */\np.update = p.Particle_update = function(delta)\n{\n\t//increase age\n\tthis.age += delta;\n\t//recycle particle if it is too old\n\tif(this.age >= this.maxLife)\n\t{\n\t\tthis.kill();\n\t\treturn -1;\n\t}\n\n\t//determine our interpolation value\n\tvar lerp = this.age * this._oneOverLife;//lifetime / maxLife;\n\tif (this.ease)\n\t{\n\t\tif(this.ease.length == 4)\n\t\t{\n\t\t\t//the t, b, c, d parameters that some tween libraries use\n\t\t\t//(time, initial value, end value, duration)\n\t\t\tlerp = this.ease(lerp, 0, 1, 1);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//the simplified version that we like that takes\n\t\t\t//one parameter, time from 0-1. TweenJS eases provide this usage.\n\t\t\tlerp = this.ease(lerp);\n\t\t}\n\t}\n\n\t//interpolate alpha\n\tif (this._doAlpha)\n\t\tthis.alpha = (this.endAlpha - this.startAlpha) * lerp + this.startAlpha;\n\t//interpolate scale\n\tif (this._doScale)\n\t{\n\t\tvar scale = (this.endScale - this.startScale) * lerp + this.startScale;\n\t\tthis.scale.x = this.scale.y = scale;\n\t}\n\t//handle movement\n\tif(this._doNormalMovement)\n\t{\n\t\t//interpolate speed\n\t\tif (this._doSpeed)\n\t\t{\n\t\t\tvar speed = (this.endSpeed - this.startSpeed) * lerp + this.startSpeed;\n\t\t\tParticleUtils.normalize(this.velocity);\n\t\t\tParticleUtils.scaleBy(this.velocity, speed);\n\t\t}\n\t\telse if(this._doAcceleration)\n\t\t{\n\t\t\tthis.velocity.x += this.acceleration.x * delta;\n\t\t\tthis.velocity.y += this.acceleration.y * delta;\n\t\t\tif (this.maxSpeed)\n\t\t\t{\n\t\t\t\tvar currentSpeed = ParticleUtils.length(this.velocity);\n\t\t\t\t//if we are going faster than we should, clamp at the max speed\n\t\t\t\t//DO NOT recalculate vector length\n\t\t\t\tif (currentSpeed > this.maxSpeed)\n\t\t\t\t{\n\t\t\t\t\tParticleUtils.scaleBy(this.velocity, this.maxSpeed / currentSpeed);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//adjust position based on velocity\n\t\tthis.position.x += this.velocity.x * delta;\n\t\tthis.position.y += this.velocity.y * delta;\n\t}\n\t//interpolate color\n\tif (this._doColor)\n\t{\n\t\tvar r = (this._eR - this._sR) * lerp + this._sR;\n\t\tvar g = (this._eG - this._sG) * lerp + this._sG;\n\t\tvar b = (this._eB - this._sB) * lerp + this._sB;\n\t\tthis.tint = ParticleUtils.combineRGBComponents(r, g, b);\n\t}\n\t//update rotation\n\tif(this.rotationSpeed !== 0)\n\t{\n\t\tthis.rotation += this.rotationSpeed * delta;\n\t}\n\telse if(this.acceleration && !this.noRotation)\n\t{\n\t\tthis.rotation = Math.atan2(this.velocity.y, this.velocity.x);// + Math.PI / 2;\n\t}\n\treturn lerp;\n};\n\n/**\n * Kills the particle, removing it from the display list\n * and telling the emitter to recycle it.\n * @method PIXI.particles.Particle#kill\n */\np.kill = function()\n{\n\tthis.emitter.recycle(this);\n};\n\np.Sprite_Destroy = Sprite.prototype.destroy;\n/**\n * Destroys the particle, removing references and preventing future use.\n * @method PIXI.particles.Particle#destroy\n */\np.destroy = function()\n{\n\tif (this.parent)\n\t\tthis.parent.removeChild(this);\n\tif (this.Sprite_Destroy)\n\t\tthis.Sprite_Destroy();\n\tthis.emitter = this.velocity = this.startColor = this.endColor = this.ease =\n\t\tthis.next = this.prev = null;\n};\n\n/**\n * Checks over the art that was passed to the Emitter's init() function, to do any special\n * modifications to prepare it ahead of time.\n * @method PIXI.particles.Particle.parseArt\n * @static\n * @param {Array} art The array of art data. For Particle, it should be an array of Textures.\n * Any strings in the array will be converted to Textures via\n * Texture.fromImage().\n * @return {Array} The art, after any needed modifications.\n */\nParticle.parseArt = function(art)\n{\n\t//convert any strings to Textures.\n\tvar i;\n\tfor(i = art.length; i >= 0; --i)\n\t{\n\t\tif(typeof art[i] == \"string\")\n\t\t\tart[i] = PIXI.Texture.fromImage(art[i]);\n\t}\n\t//particles from different base textures will be slower in WebGL than if they\n\t//were from one spritesheet\n\tif(ParticleUtils.verbose)\n\t{\n\t\tfor(i = art.length - 1; i > 0; --i)\n\t\t{\n\t\t\tif(art[i].baseTexture != art[i - 1].baseTexture)\n\t\t\t{\n\t\t\t\tif (window.console)\n\t\t\t\t\tconsole.warn(\"PixiParticles: using particle textures from different images may hinder performance in WebGL\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn art;\n};\n\n/**\n * Parses extra emitter data to ensure it is set up for this particle class.\n * Particle does nothing to the extra data.\n * @method PIXI.particles.Particle.parseData\n * @static\n * @param {Object} extraData The extra data from the particle config.\n * @return {Object} The parsed extra data.\n */\nParticle.parseData = function(extraData)\n{\n\treturn extraData;\n};\n\nmodule.exports = Particle;","\"use strict\";\n\nvar BLEND_MODES = PIXI.BLEND_MODES || PIXI.blendModes;\nvar Texture = PIXI.Texture;\n\n/**\n * Contains helper functions for particles and emitters to use.\n * @memberof PIXI.particles\n * @class ParticleUtils\n * @static\n */\nvar ParticleUtils = {};\n\n/**\n * If errors and warnings should be logged within the library.\n * @name PIXI.particles.ParticleUtils.verbose\n * @default false\n * @static\n */\nParticleUtils.verbose = false;\n\nvar DEG_TO_RADS = ParticleUtils.DEG_TO_RADS = Math.PI / 180;\n\nvar empty = ParticleUtils.EMPTY_TEXTURE = Texture.EMPTY;\n//prevent any events from being used on the empty texture, as well as destruction of it\n//v4 of Pixi does this, but doing it again won't hurt\nempty.on = empty.destroy = empty.once = empty.emit = function() {};\n\n/**\n * Rotates a point by a given angle.\n * @method PIXI.particles.ParticleUtils.rotatePoint\n * @param {Number} angle The angle to rotate by in degrees\n * @param {PIXI.Point} p The point to rotate around 0,0.\n * @static\n */\nParticleUtils.rotatePoint = function(angle, p)\n{\n\tif(!angle) return;\n\tangle *= DEG_TO_RADS;\n\tvar s = Math.sin(angle);\n\tvar c = Math.cos(angle);\n\tvar xnew = p.x * c - p.y * s;\n\tvar ynew = p.x * s + p.y * c;\n\tp.x = xnew;\n\tp.y = ynew;\n};\n\n/**\n * Combines separate color components (0-255) into a single uint color.\n * @method PIXI.particles.ParticleUtils.combineRGBComponents\n * @param {uint} r The red value of the color\n * @param {uint} g The green value of the color\n * @param {uint} b The blue value of the color\n * @return {uint} The color in the form of 0xRRGGBB\n * @static\n */\nParticleUtils.combineRGBComponents = function(r, g, b/*, a*/)\n{\n\treturn /*a << 24 |*/ r << 16 | g << 8 | b;\n};\n\n/**\n * Reduces the point to a length of 1.\n * @method PIXI.particles.ParticleUtils.normalize\n * @static\n * @param {PIXI.Point} point The point to normalize\n */\nParticleUtils.normalize = function(point)\n{\n\tvar oneOverLen = 1 / ParticleUtils.length(point);\n\tpoint.x *= oneOverLen;\n\tpoint.y *= oneOverLen;\n};\n\n/**\n * Multiplies the x and y values of this point by a value.\n * @method PIXI.particles.ParticleUtils.scaleBy\n * @static\n * @param {PIXI.Point} point The point to scaleBy\n * @param value {Number} The value to scale by.\n */\nParticleUtils.scaleBy = function(point, value)\n{\n\tpoint.x *= value;\n\tpoint.y *= value;\n};\n\n/**\n * Returns the length (or magnitude) of this point.\n * @method PIXI.particles.ParticleUtils.length\n * @static\n * @param {PIXI.Point} point The point to measure length\n * @return The length of this point.\n */\nParticleUtils.length = function(point)\n{\n\treturn Math.sqrt(point.x * point.x + point.y * point.y);\n};\n\n/**\n * Converts a hex string from \"#AARRGGBB\", \"#RRGGBB\", \"0xAARRGGBB\", \"0xRRGGBB\",\n * \"AARRGGBB\", or \"RRGGBB\" to an array of ints of 0-255 or Numbers from 0-1, as\n * [r, g, b, (a)].\n * @method PIXI.particles.ParticleUtils.hexToRGB\n * @param {String} color The input color string.\n * @param {Array} output An array to put the output in. If omitted, a new array is created.\n * @return The array of numeric color values.\n * @static\n */\nParticleUtils.hexToRGB = function(color, output)\n{\n\tif (output)\n\t\toutput.length = 0;\n\telse\n\t\toutput = [];\n\tif (color.charAt(0) == \"#\")\n\t\tcolor = color.substr(1);\n\telse if (color.indexOf(\"0x\") === 0)\n\t\tcolor = color.substr(2);\n\tvar alpha;\n\tif (color.length == 8)\n\t{\n\t\talpha = color.substr(0, 2);\n\t\tcolor = color.substr(2);\n\t}\n\toutput.push(parseInt(color.substr(0, 2), 16));//Red\n\toutput.push(parseInt(color.substr(2, 2), 16));//Green\n\toutput.push(parseInt(color.substr(4, 2), 16));//Blue\n\tif (alpha)\n\t\toutput.push(parseInt(alpha, 16));\n\treturn output;\n};\n\n/**\n * Generates a custom ease function, based on the GreenSock custom ease, as demonstrated\n * by the related tool at http://www.greensock.com/customease/.\n * @method PIXI.particles.ParticleUtils.generateEase\n * @param {Array} segments An array of segments, as created by\n * http://www.greensock.com/customease/.\n * @return {Function} A function that calculates the percentage of change at\n * a given point in time (0-1 inclusive).\n * @static\n */\nParticleUtils.generateEase = function(segments)\n{\n\tvar qty = segments.length;\n\tvar oneOverQty = 1 / qty;\n\t/*\n\t * Calculates the percentage of change at a given point in time (0-1 inclusive).\n\t * @param {Number} time The time of the ease, 0-1 inclusive.\n\t * @return {Number} The percentage of the change, 0-1 inclusive (unless your\n\t * ease goes outside those bounds).\n\t */\n\tvar simpleEase = function(time)\n\t{\n\t\tvar t, s;\n\t\tvar i = (qty * time) | 0;//do a quick floor operation\n\t\tt = (time - (i * oneOverQty)) * qty;\n\t\ts = segments[i] || segments[qty - 1];\n\t\treturn (s.s + t * (2 * (1 - t) * (s.cp - s.s) + t * (s.e - s.s)));\n\t};\n\treturn simpleEase;\n};\n\n/**\n * Gets a blend mode, ensuring that it is valid.\n * @method PIXI.particles.ParticleUtils.getBlendMode\n * @param {String} name The name of the blend mode to get.\n * @return {int} The blend mode as specified in the PIXI.blendModes enumeration.\n * @static\n */\nParticleUtils.getBlendMode = function(name)\n{\n\tif (!name) return BLEND_MODES.NORMAL;\n\tname = name.toUpperCase();\n\twhile (name.indexOf(\" \") >= 0)\n\t\tname = name.replace(\" \", \"_\");\n\treturn BLEND_MODES[name] || BLEND_MODES.NORMAL;\n};\n\nmodule.exports = ParticleUtils;","\"use strict\";\n\nvar ParticleUtils = require(\"./ParticleUtils\"),\n\tParticle = require(\"./Particle\");\n\n/**\n * An particle that follows a path defined by an algebraic expression, e.g. \"sin(x)\" or\n * \"5x + 3\".\n * To use this class, the particle config must have a \"path\" string in the\n * \"extraData\" parameter. This string should have \"x\" in it to represent movement (from the\n * speed settings of the particle). It may have numbers, parentheses, the four basic\n * operations, and the following Math functions or properties (without the preceding \"Math.\"):\n * \"pow\", \"sqrt\", \"abs\", \"floor\", \"round\", \"ceil\", \"E\", \"PI\", \"sin\", \"cos\", \"tan\", \"asin\",\n * \"acos\", \"atan\", \"atan2\", \"log\".\n * The overall movement of the particle and the expression value become x and y positions for\n * the particle, respectively. The final position is rotated by the spawn rotation/angle of\n * the particle.\n *\n * Some example paths:\n *\n * \t\"sin(x/10) * 20\" // A sine wave path.\n * \t\"cos(x/100) * 30\" // Particles curve counterclockwise (for medium speed/low lifetime particles)\n * \t\"pow(x/10, 2) / 2\" // Particles curve clockwise (remember, +y is down).\n *\n * @memberof PIXI.particles\n * @class PathParticle\n * @extends PIXI.particles.Particle\n * @constructor\n * @param {PIXI.particles.Emitter} emitter The emitter that controls this PathParticle.\n */\nvar PathParticle = function(emitter)\n{\n\tParticle.call(this, emitter);\n\t/**\n\t * The function representing the path the particle should take.\n\t * @property {Function} path\n\t */\n\tthis.path = null;\n\t/**\n\t * The initial rotation in degrees of the particle, because the direction of the path\n\t * is based on that.\n\t * @property {Number} initialRotation\n\t */\n\tthis.initialRotation = 0;\n\t/**\n\t * The initial position of the particle, as all path movement is added to that.\n\t * @property {PIXI.Point} initialPosition\n\t */\n\tthis.initialPosition = new PIXI.Point();\n\t/**\n\t * Total single directional movement, due to speed.\n\t * @property {Number} movement\n\t */\n\tthis.movement = 0;\n};\n\n// Reference to the super class\nvar s = Particle.prototype;\n// Reference to the prototype\nvar p = PathParticle.prototype = Object.create(s);\n\n/**\n * A helper point for math things.\n * @property {Function} helperPoint\n * @private\n * @static\n */\nvar helperPoint = new PIXI.Point();\n\n/**\n * Initializes the particle for use, based on the properties that have to\n * have been set already on the particle.\n * @method PIXI.particles.PathParticle#init\n */\np.init = function()\n{\n\t//get initial rotation before it is converted to radians\n\tthis.initialRotation = this.rotation;\n\t//standard init\n\tthis.Particle_init();\n\n\t//set the path for the particle\n\tthis.path = this.extraData.path;\n\t//cancel the normal movement behavior\n\tthis._doNormalMovement = !this.path;\n\t//reset movement\n\tthis.movement = 0;\n\t//grab position\n\tthis.initialPosition.x = this.position.x;\n\tthis.initialPosition.y = this.position.y;\n};\n\n//a hand picked list of Math functions (and a couple properties) that are allowable.\n//they should be used without the preceding \"Math.\"\nvar MATH_FUNCS =\n[\n\t\"pow\",\n\t\"sqrt\",\n\t\"abs\",\n\t\"floor\",\n\t\"round\",\n\t\"ceil\",\n\t\"E\",\n\t\"PI\",\n\t\"sin\",\n\t\"cos\",\n\t\"tan\",\n\t\"asin\",\n\t\"acos\",\n\t\"atan\",\n\t\"atan2\",\n\t\"log\"\n];\n//Allow the 4 basic operations, parentheses and all numbers/decimals, as well\n//as 'x', for the variable usage.\nvar WHITELISTER = \"[01234567890\\\\.\\\\*\\\\-\\\\+\\\\/\\\\(\\\\)x ,]\";\n//add the math functions to the regex string.\nfor(var index = MATH_FUNCS.length - 1; index >= 0; --index)\n{\n\tWHITELISTER += \"|\" + MATH_FUNCS[index];\n}\n//create an actual regular expression object from the string\nWHITELISTER = new RegExp(WHITELISTER, \"g\");\n\n/**\n * Parses a string into a function for path following.\n * This involves whitelisting the string for safety, inserting \"Math.\" to math function\n * names, and using eval() to generate a function.\n * @method PIXI.particles.PathParticle~parsePath\n * @private\n * @static\n * @param {String} pathString The string to parse.\n * @return {Function} The path function - takes x, outputs y.\n */\nvar parsePath = function(pathString)\n{\n\tvar rtn;\n\tvar matches = pathString.match(WHITELISTER);\n\tfor(var i = matches.length - 1; i >= 0; --i)\n\t{\n\t\tif(MATH_FUNCS.indexOf(matches[i]) >= 0)\n\t\t\tmatches[i] = \"Math.\" + matches[i];\n\t}\n\tpathString = matches.join(\"\");\n\teval(\"rtn = function(x){ return \" + pathString + \"; };\");// jshint ignore:line\n\treturn rtn;\n};\n\n/**\n * Updates the particle.\n * @method PIXI.particles.PathParticle#update\n * @param {Number} delta Time elapsed since the previous frame, in __seconds__.\n */\np.update = function(delta)\n{\n\tvar lerp = this.Particle_update(delta);\n\t//if the particle died during the update, then don't bother\n\tif(lerp >= 0 && this.path)\n\t{\n\t\t//increase linear movement based on speed\n\t\tvar speed = (this.endSpeed - this.startSpeed) * lerp + this.startSpeed;\n\t\tthis.movement += speed * delta;\n\t\t//set up the helper point for rotation\n\t\thelperPoint.x = this.movement;\n\t\thelperPoint.y = this.path(this.movement);\n\t\tParticleUtils.rotatePoint(this.initialRotation, helperPoint);\n\t\tthis.position.x = this.initialPosition.x + helperPoint.x;\n\t\tthis.position.y = this.initialPosition.y + helperPoint.y;\n\t}\n};\n\np.Particle_destroy = Particle.prototype.destroy;\n/**\n * Destroys the particle, removing references and preventing future use.\n * @method PIXI.particles.PathParticle#destroy\n */\np.destroy = function()\n{\n\tthis.Particle_destroy();\n\tthis.path = this.initialPosition = null;\n};\n\n/**\n * Checks over the art that was passed to the Emitter's init() function, to do any special\n * modifications to prepare it ahead of time. This just runs Particle.parseArt().\n * @method PIXI.particles.PathParticle.parseArt\n * @static\n * @param {Array} art The array of art data. For Particle, it should be an array of Textures.\n * Any strings in the array will be converted to Textures via\n * Texture.fromImage().\n * @return {Array} The art, after any needed modifications.\n */\nPathParticle.parseArt = function(art)\n{\n\treturn Particle.parseArt(art);\n};\n\n/**\n * Parses extra emitter data to ensure it is set up for this particle class.\n * PathParticle checks for the existence of path data, and parses the path data for use\n * by particle instances.\n * @method PIXI.particles.PathParticle.parseData\n * @static\n * @param {Object} extraData The extra data from the particle config.\n * @return {Object} The parsed extra data.\n */\nPathParticle.parseData = function(extraData)\n{\n\tvar output = {};\n\tif(extraData && extraData.path)\n\t{\n\t\ttry\n\t\t{\n\t\t\toutput.path = parsePath(extraData.path);\n\t\t}\n\t\tcatch(e)\n\t\t{\n\t\t\tif(ParticleUtils.verbose)\n\t\t\t\tconsole.error(\"PathParticle: error in parsing path expression\");\n\t\t\toutput.path = null;\n\t\t}\n\t}\n\telse\n\t{\n\t\tif(ParticleUtils.verbose)\n\t\t\tconsole.error(\"PathParticle requires a path string in extraData!\");\n\t\toutput.path = null;\n\t}\n\treturn output;\n};\n\nmodule.exports = PathParticle;","//Nothing to deprecate right now!","require(\"./polyfills.js\");\nexports.ParticleUtils = require(\"./ParticleUtils.js\");\nexports.Particle = require(\"./Particle.js\");\nexports.Emitter = require(\"./Emitter.js\");\nexports.PathParticle = require(\"./PathParticle.js\");\nexports.AnimatedParticle = require(\"./AnimatedParticle.js\");\nrequire(\"./deprecation.js\");","/**\n * Add methods to Array\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty\n * @class Array\n */\n\n/**\n * Shuffles the array\n * @method shuffle\n * @return {Array} The array, for chaining calls.\n */\nif(!Array.prototype.shuffle)\n{\n\t// In EcmaScript 5 specs and browsers that support it you can use the Object.defineProperty\n\t// to make it not enumerable set the enumerable property to false\n\tObject.defineProperty(Array.prototype, 'shuffle', {\n\t\tenumerable: false,\n\t\twritable:false,\n\t\tvalue: function() {\n\t\t\tfor(var j, x, i = this.length; i; j = Math.floor(Math.random() * i), x = this[--i], this[i] = this[j], this[j] = x);\n\t\t\treturn this;\n\t\t}\n\t});\n}\n\n/**\n * Get a random item from an array\n * @method random\n * @return {*} The random item\n */\nif(!Array.prototype.random)\n{\n\tObject.defineProperty(Array.prototype, 'random', {\n\t\tenumerable: false,\n\t\twritable: false,\n\t\tvalue: function() {\n\t\t\treturn this[Math.floor(Math.random() * this.length)];\n\t\t}\n\t});\n}","\"use strict\";\n\n// Check for window, fallback to global\nvar global = typeof window !== 'undefined' ? window : GLOBAL;\n\n//ensure that the particles namespace exist - PIXI 4 creates it itself, PIXI 3 does not\nif (!global.PIXI.particles) {\n\tglobal.PIXI.particles = {};\n}\n\n// Export for Node-compatible environments like Electron\nif (typeof module !== 'undefined' && module.exports)\n{\n\t// Attempt to require the pixi module\n\tif (typeof PIXI === 'undefined')\n\t{\n\t\t// Include the Pixi.js module\n\t\trequire('pixi.js');\n\t}\n\n\t// Export the module\n\tmodule.exports = global.PIXI.particles || particles;\n}\n// If we're in the browser make sure PIXI is available\nelse if (typeof PIXI === 'undefined')\n{\n\tthrow \"pixi-particles requires pixi.js to be loaded first\";\n}\n\n// get the library itself\nvar particles = require('./particles');\n\n// insert the lirbary into the particles namespace on PIXI\nfor (var prop in particles) {\n\tglobal.PIXI.particles[prop] = particles[prop];\n}"],"sourceRoot":"."} \ No newline at end of file diff --git a/dist/pixi-particles.min.js b/dist/pixi-particles.min.js index 27384b61..c6ad306c 100644 --- a/dist/pixi-particles.min.js +++ b/dist/pixi-particles.min.js @@ -1,9 +1,9 @@ /*! - * pixi-particles - v2.1.4 - * Compiled Sat, 04 Mar 2017 20:58:06 UTC + * pixi-particles - v2.1.5 + * Compiled Tue, 14 Mar 2017 22:08:59 UTC * * pixi-particles is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i;i="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,i.pixiParticles=t()}}(function(){var define,module,exports;return function t(i,e,s){function a(n,o){if(!e[n]){if(!i[n]){var h="function"==typeof require&&require;if(!o&&h)return h(n,!0);if(r)return r(n,!0);var l=new Error("Cannot find module '"+n+"'");throw l.code="MODULE_NOT_FOUND",l}var p=e[n]={exports:{}};i[n][0].call(p.exports,function(t){var e=i[n][1][t];return a(e?e:t)},p,p.exports,t,i,e,s)}return e[n].exports}for(var r="function"==typeof require&&require,n=0;n=0){this.elapsed+=t,this.elapsed>this.duration&&(this.loop?this.elapsed=this.elapsed%this.duration:this.elapsed=this.duration-1e-6);var i=this.elapsed*this.framerate+1e-7|0;this.texture=this.textures[i]||s.EMPTY_TEXTURE}},h.Particle_destroy=a.prototype.destroy,h.destroy=function(){this.Particle_destroy(),this.textures=null},n.parseArt=function(t){var i,e,s,a,n,o,h=[];for(i=0;i0;--l)o.push(n)}"matchLife"==e.framerate?(h.framerate=-1,h.duration=0,h.loop=!1):(h.loop=!!e.loop,h.framerate=e.framerate>0?e.framerate:60,h.duration=o.length/h.framerate)}return t},i.exports=n},{"./Particle":3,"./ParticleUtils":4}],2:[function(t,i,e){"use strict";var s=t("./ParticleUtils"),a=t("./Particle"),r=PIXI.particles.ParticleContainer||PIXI.ParticleContainer,n=PIXI.ticker.shared,o=function(t,i,e){this._particleConstructor=a,this.particleImages=null,this.startAlpha=1,this.endAlpha=1,this.startSpeed=0,this.endSpeed=0,this.minimumSpeedMultiplier=1,this.acceleration=null,this.maxSpeed=NaN,this.startScale=1,this.endScale=1,this.minimumScaleMultiplier=1,this.startColor=null,this.endColor=null,this.minLifetime=0,this.maxLifetime=0,this.minStartRotation=0,this.maxStartRotation=0,this.noRotation=!1,this.minRotationSpeed=0,this.maxRotationSpeed=0,this.particleBlendMode=0,this.customEase=null,this.extraData=null,this._frequency=1,this.maxParticles=1e3,this.emitterLifetime=-1,this.spawnPos=null,this.spawnType=null,this._spawnFunc=null,this.spawnRect=null,this.spawnCircle=null,this.particlesPerWave=1,this.particleSpacing=0,this.angleStart=0,this.rotation=0,this.ownerPos=null,this._prevEmitterPos=null,this._prevPosIsValid=!1,this._posChanged=!1,this._parentIsPC=!1,this._parent=null,this.addAtBack=!1,this.particleCount=0,this._emit=!1,this._spawnTimer=0,this._emitterLife=-1,this._activeParticlesFirst=null,this._activeParticlesLast=null,this._poolFirst=null,this._origConfig=null,this._origArt=null,this._autoUpdate=!1,this.parent=t,i&&e&&this.init(i,e),this.recycle=this.recycle,this.update=this.update,this.rotate=this.rotate,this.updateSpawnPos=this.updateSpawnPos,this.updateOwnerPos=this.updateOwnerPos},h=o.prototype={},l=new PIXI.Point;Object.defineProperty(h,"frequency",{get:function(){return this._frequency},set:function(t){"number"==typeof t&&t>0?this._frequency=t:this._frequency=1}}),Object.defineProperty(h,"particleConstructor",{get:function(){return this._particleConstructor},set:function(t){if(t!=this._particleConstructor){this._particleConstructor=t,this.cleanup();for(var i=this._poolFirst;i;i=i.next)i.destroy();this._poolFirst=null,this._origConfig&&this._origArt&&this.init(this._origArt,this._origConfig)}}}),Object.defineProperty(h,"parent",{get:function(){return this._parent},set:function(t){if(this._parentIsPC)for(var i=this._poolFirst;i;i=i.next)i.parent&&i.parent.removeChild(i);this.cleanup(),this._parent=t,this._parentIsPC=r&&t&&t instanceof r}}),h.init=function(t,i){if(t&&i){this.cleanup(),this._origConfig=i,this._origArt=t,t=Array.isArray(t)?t.slice():[t];var e=this._particleConstructor;this.particleImages=e.parseArt?e.parseArt(t):t,i.alpha?(this.startAlpha=i.alpha.start,this.endAlpha=i.alpha.end):this.startAlpha=this.endAlpha=1,i.speed?(this.startSpeed=i.speed.start,this.endSpeed=i.speed.end,this.minimumSpeedMultiplier=i.speed.minimumSpeedMultiplier||1):(this.minimumSpeedMultiplier=1,this.startSpeed=this.endSpeed=0);var a=i.acceleration;a&&(a.x||a.y)?(this.endSpeed=this.startSpeed,this.acceleration=new PIXI.Point(a.x,a.y),this.maxSpeed=i.maxSpeed||NaN):this.acceleration=new PIXI.Point,i.scale?(this.startScale=i.scale.start,this.endScale=i.scale.end,this.minimumScaleMultiplier=i.scale.minimumScaleMultiplier||1):this.startScale=this.endScale=this.minimumScaleMultiplier=1,i.color&&(this.startColor=s.hexToRGB(i.color.start),i.color.start!=i.color.end?this.endColor=s.hexToRGB(i.color.end):this.endColor=null),i.startRotation?(this.minStartRotation=i.startRotation.min,this.maxStartRotation=i.startRotation.max):this.minStartRotation=this.maxStartRotation=0,i.noRotation&&(this.minStartRotation||this.maxStartRotation)?this.noRotation=!!i.noRotation:this.noRotation=!1,i.rotationSpeed?(this.minRotationSpeed=i.rotationSpeed.min,this.maxRotationSpeed=i.rotationSpeed.max):this.minRotationSpeed=this.maxRotationSpeed=0,this.minLifetime=i.lifetime.min,this.maxLifetime=i.lifetime.max,this.particleBlendMode=s.getBlendMode(i.blendMode),i.ease?this.customEase="function"==typeof i.ease?i.ease:s.generateEase(i.ease):this.customEase=null,e.parseData?this.extraData=e.parseData(i.extraData):this.extraData=i.extraData||null,this.spawnRect=this.spawnCircle=null,this.particlesPerWave=1,this.particleSpacing=0,this.angleStart=0;var r;switch(i.spawnType){case"rect":this.spawnType="rect",this._spawnFunc=this._spawnRect;var n=i.spawnRect;this.spawnRect=new PIXI.Rectangle(n.x,n.y,n.w,n.h);break;case"circle":this.spawnType="circle",this._spawnFunc=this._spawnCircle,r=i.spawnCircle,this.spawnCircle=new PIXI.Circle(r.x,r.y,r.r);break;case"ring":this.spawnType="ring",this._spawnFunc=this._spawnRing,r=i.spawnCircle,this.spawnCircle=new PIXI.Circle(r.x,r.y,r.r),this.spawnCircle.minRadius=r.minR;break;case"burst":this.spawnType="burst",this._spawnFunc=this._spawnBurst,this.particlesPerWave=i.particlesPerWave,this.particleSpacing=i.particleSpacing,this.angleStart=i.angleStart?i.angleStart:0;break;case"point":this.spawnType="point",this._spawnFunc=this._spawnPoint;break;default:this.spawnType="point",this._spawnFunc=this._spawnPoint}this.frequency=i.frequency,this.emitterLifetime=i.emitterLifetime||-1,this.maxParticles=i.maxParticles>0?i.maxParticles:1e3,this.addAtBack=!!i.addAtBack,this.rotation=0,this.ownerPos=new PIXI.Point,this.spawnPos=new PIXI.Point(i.pos.x,i.pos.y),this._prevEmitterPos=this.spawnPos.clone(),this._prevPosIsValid=!1,this._spawnTimer=0,this.emit=void 0===i.emit||!!i.emit,this.autoUpdate=void 0!==i.autoUpdate&&!!i.autoUpdate}},h.recycle=function(t){t.next&&(t.next.prev=t.prev),t.prev&&(t.prev.next=t.next),t==this._activeParticlesLast&&(this._activeParticlesLast=t.prev),t==this._activeParticlesFirst&&(this._activeParticlesFirst=t.next),t.prev=null,t.next=this._poolFirst,this._poolFirst=t,this._parentIsPC?(t.alpha=0,t.visible=!1):t.parent&&t.parent.removeChild(t),--this.particleCount},h.rotate=function(t){if(this.rotation!=t){var i=t-this.rotation;this.rotation=t,s.rotatePoint(i,this.spawnPos),this._posChanged=!0}},h.updateSpawnPos=function(t,i){this._posChanged=!0,this.spawnPos.x=t,this.spawnPos.y=i},h.updateOwnerPos=function(t,i){this._posChanged=!0,this.ownerPos.x=t,this.ownerPos.y=i},h.resetPositionTracking=function(){this._prevPosIsValid=!1},Object.defineProperty(h,"emit",{get:function(){return this._emit},set:function(t){this._emit=!!t,this._emitterLife=this.emitterLifetime}}),Object.defineProperty(h,"autoUpdate",{get:function(){return this._autoUpdate},set:function(t){this._autoUpdate&&!t?n.remove(this.update,this):!this._autoUpdate&&t&&n.add(this.update,this),this._autoUpdate=!!t}}),h.update=function(t){if(this._autoUpdate&&(t=t/PIXI.settings.TARGET_FPMS/1e3),this._parent){var i,e,s;for(e=this._activeParticlesFirst;e;e=s)s=e.next,e.update(t);var a,r;this._prevPosIsValid&&(a=this._prevEmitterPos.x,r=this._prevEmitterPos.y);var n=this.ownerPos.x+this.spawnPos.x,o=this.ownerPos.y+this.spawnPos.y;if(this.emit)for(this._spawnTimer-=t;this._spawnTimer<=0;){if(this._emitterLife>0&&(this._emitterLife-=this._frequency,this._emitterLife<=0)){this._spawnTimer=0,this._emitterLife=0,this.emit=!1;break}if(this.particleCount>=this.maxParticles)this._spawnTimer+=this._frequency;else{var h;if(h=this.minLifetime==this.maxLifetime?this.minLifetime:Math.random()*(this.maxLifetime-this.minLifetime)+this.minLifetime,-this._spawnTimer1?u.applyArt(this.particleImages.random()):u.applyArt(this.particleImages[0]),u.startAlpha=this.startAlpha,u.endAlpha=this.endAlpha,1!=this.minimumSpeedMultiplier?(m=Math.random()*(1-this.minimumSpeedMultiplier)+this.minimumSpeedMultiplier,u.startSpeed=this.startSpeed*m,u.endSpeed=this.endSpeed*m):(u.startSpeed=this.startSpeed,u.endSpeed=this.endSpeed),u.acceleration.x=this.acceleration.x,u.acceleration.y=this.acceleration.y,u.maxSpeed=this.maxSpeed,1!=this.minimumScaleMultiplier?(m=Math.random()*(1-this.minimumScaleMultiplier)+this.minimumScaleMultiplier,u.startScale=this.startScale*m,u.endScale=this.endScale*m):(u.startScale=this.startScale,u.endScale=this.endScale),u.startColor=this.startColor,u.endColor=this.endColor,this.minRotationSpeed==this.maxRotationSpeed?u.rotationSpeed=this.minRotationSpeed:u.rotationSpeed=Math.random()*(this.maxRotationSpeed-this.minRotationSpeed)+this.minRotationSpeed,u.noRotation=this.noRotation,u.maxLife=h,u.blendMode=this.particleBlendMode,u.ease=this.customEase,u.extraData=this.extraData,this._spawnFunc(u,l,p,i),u.init(),u.update(-this._spawnTimer),this._parentIsPC&&u.parent){var f=this._parent.children;if(f[0]==u)f.shift();else if(f[f.length-1]==u)f.pop();else{var P=f.indexOf(u);f.splice(P,1)}this.addAtBack?f.unshift(u):f.push(u)}else this.addAtBack?this._parent.addChildAt(u,0):this._parent.addChild(u);this._activeParticlesLast?(this._activeParticlesLast.next=u,u.prev=this._activeParticlesLast,this._activeParticlesLast=u):this._activeParticlesLast=this._activeParticlesFirst=u,++this.particleCount}}this._spawnTimer+=this._frequency}}this._posChanged&&(this._prevEmitterPos.x=n,this._prevEmitterPos.y=o,this._prevPosIsValid=!0,this._posChanged=!1)}},h._spawnPoint=function(t,i,e){this.minStartRotation==this.maxStartRotation?t.rotation=this.minStartRotation+this.rotation:t.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,t.position.x=i,t.position.y=e},h._spawnRect=function(t,i,e){this.minStartRotation==this.maxStartRotation?t.rotation=this.minStartRotation+this.rotation:t.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,l.x=Math.random()*this.spawnRect.width+this.spawnRect.x,l.y=Math.random()*this.spawnRect.height+this.spawnRect.y,0!==this.rotation&&s.rotatePoint(this.rotation,l),t.position.x=i+l.x,t.position.y=e+l.y},h._spawnCircle=function(t,i,e){this.minStartRotation==this.maxStartRotation?t.rotation=this.minStartRotation+this.rotation:t.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,l.x=Math.random()*this.spawnCircle.radius,l.y=0,s.rotatePoint(360*Math.random(),l),l.x+=this.spawnCircle.x,l.y+=this.spawnCircle.y,0!==this.rotation&&s.rotatePoint(this.rotation,l),t.position.x=i+l.x,t.position.y=e+l.y},h._spawnRing=function(t,i,e){var a=this.spawnCircle;this.minStartRotation==this.maxStartRotation?t.rotation=this.minStartRotation+this.rotation:t.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,a.minRadius==a.radius?l.x=Math.random()*(a.radius-a.minRadius)+a.minRadius:l.x=a.radius,l.y=0;var r=360*Math.random();t.rotation+=r,s.rotatePoint(r,l),l.x+=this.spawnCircle.x,l.y+=this.spawnCircle.y,0!==this.rotation&&s.rotatePoint(this.rotation,l),t.position.x=i+l.x,t.position.y=e+l.y},h._spawnBurst=function(t,i,e,s){0===this.particleSpacing?t.rotation=360*Math.random():t.rotation=this.angleStart+this.particleSpacing*s+this.rotation,t.position.x=i,t.position.y=e},h.cleanup=function(){var t,i;for(t=this._activeParticlesFirst;t;t=i)i=t.next,this.recycle(t),t.parent&&t.parent.removeChild(t);this._activeParticlesFirst=this._activeParticlesLast=null,this.particleCount=0},h.destroy=function(){this.cleanup();for(var t,i=this._poolFirst;i;i=t)t=i.next,i.destroy();this._poolFirst=this._parent=this.particleImages=this.spawnPos=this.ownerPos=this.startColor=this.endColor=this.customEase=null},i.exports=o},{"./Particle":3,"./ParticleUtils":4}],3:[function(t,i,e){var s=t("./ParticleUtils"),a=PIXI.Sprite,r=function(t){a.call(this),this.emitter=t,this.anchor.x=this.anchor.y=.5,this.velocity=new PIXI.Point,this.maxLife=0,this.age=0,this.ease=null,this.extraData=null,this.startAlpha=0,this.endAlpha=0,this.startSpeed=0,this.endSpeed=0,this.acceleration=new PIXI.Point,this.maxSpeed=NaN,this.startScale=0,this.endScale=0,this.startColor=null,this._sR=0,this._sG=0,this._sB=0,this.endColor=null,this._eR=0,this._eG=0,this._eB=0,this._doAlpha=!1,this._doScale=!1,this._doSpeed=!1,this._doAcceleration=!1,this._doColor=!1,this._doNormalMovement=!1,this._oneOverLife=0,this.next=null,this.prev=null,this.init=this.init,this.Particle_init=this.Particle_init,this.update=this.update,this.Particle_update=this.Particle_update,this.applyArt=this.applyArt,this.kill=this.kill},n=r.prototype=Object.create(a.prototype);n.init=n.Particle_init=function(){this.age=0,this.velocity.x=this.startSpeed,this.velocity.y=0,s.rotatePoint(this.rotation,this.velocity),this.noRotation?this.rotation=0:this.rotation*=s.DEG_TO_RADS,this.rotationSpeed*=s.DEG_TO_RADS,this.alpha=this.startAlpha,this.scale.x=this.scale.y=this.startScale,this.startColor&&(this._sR=this.startColor[0],this._sG=this.startColor[1],this._sB=this.startColor[2],this.endColor&&(this._eR=this.endColor[0],this._eG=this.endColor[1],this._eB=this.endColor[2])),this._doAlpha=this.startAlpha!=this.endAlpha,this._doSpeed=this.startSpeed!=this.endSpeed,this._doScale=this.startScale!=this.endScale,this._doColor=!!this.endColor,this._doAcceleration=0!==this.acceleration.x||0!==this.acceleration.y,this._doNormalMovement=this._doSpeed||0!==this.startSpeed||this._doAcceleration,this._oneOverLife=1/this.maxLife,this.tint=s.combineRGBComponents(this._sR,this._sG,this._sB),this.visible=!0},n.applyArt=function(t){this.texture=t||s.EMPTY_TEXTURE},n.update=n.Particle_update=function(t){if(this.age+=t,this.age>=this.maxLife)return this.kill(),-1;var i=this.age*this._oneOverLife;if(this.ease&&(i=4==this.ease.length?this.ease(i,0,1,1):this.ease(i)),this._doAlpha&&(this.alpha=(this.endAlpha-this.startAlpha)*i+this.startAlpha),this._doScale){var e=(this.endScale-this.startScale)*i+this.startScale;this.scale.x=this.scale.y=e}if(this._doNormalMovement){if(this._doSpeed){var a=(this.endSpeed-this.startSpeed)*i+this.startSpeed;s.normalize(this.velocity),s.scaleBy(this.velocity,a)}else if(this._doAcceleration&&(this.velocity.x+=this.acceleration.x*t,this.velocity.y+=this.acceleration.y*t,this.maxSpeed)){var r=s.length(this.velocity);r>this.maxSpeed&&s.scaleBy(this.velocity,this.maxSpeed/r)}this.position.x+=this.velocity.x*t,this.position.y+=this.velocity.y*t}if(this._doColor){var n=(this._eR-this._sR)*i+this._sR,o=(this._eG-this._sG)*i+this._sG,h=(this._eB-this._sB)*i+this._sB;this.tint=s.combineRGBComponents(n,o,h)}return 0!==this.rotationSpeed?this.rotation+=this.rotationSpeed*t:this.acceleration&&!this.noRotation&&(this.rotation=Math.atan2(this.velocity.y,this.velocity.x)),i},n.kill=function(){this.emitter.recycle(this)},n.Sprite_Destroy=a.prototype.destroy,n.destroy=function(){this.parent&&this.parent.removeChild(this),this.Sprite_Destroy&&this.Sprite_Destroy(),this.emitter=this.velocity=this.startColor=this.endColor=this.ease=this.next=this.prev=null},r.parseArt=function(t){var i;for(i=t.length;i>=0;--i)"string"==typeof t[i]&&(t[i]=PIXI.Texture.fromImage(t[i]));if(s.verbose)for(i=t.length-1;i>0;--i)if(t[i].baseTexture!=t[i-1].baseTexture){window.console&&console.warn("PixiParticles: using particle textures from different images may hinder performance in WebGL");break}return t},r.parseData=function(t){return t},i.exports=r},{"./ParticleUtils":4}],4:[function(t,i,e){"use strict";var s=PIXI.BLEND_MODES||PIXI.blendModes,a=PIXI.Texture,r={};r.verbose=!1;var n=r.DEG_TO_RADS=Math.PI/180,o=r.EMPTY_TEXTURE=a.EMPTY;o.on=o.destroy=o.once=o.emit=function(){},r.rotatePoint=function(t,i){if(t){t*=n;var e=Math.sin(t),s=Math.cos(t),a=i.x*s-i.y*e,r=i.x*e+i.y*s;i.x=a,i.y=r}},r.combineRGBComponents=function(t,i,e){return t<<16|i<<8|e},r.normalize=function(t){var i=1/r.length(t);t.x*=i,t.y*=i},r.scaleBy=function(t,i){t.x*=i,t.y*=i},r.length=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},r.hexToRGB=function(t,i){i?i.length=0:i=[],"#"==t.charAt(0)?t=t.substr(1):0===t.indexOf("0x")&&(t=t.substr(2));var e;return 8==t.length&&(e=t.substr(0,2),t=t.substr(2)),i.push(parseInt(t.substr(0,2),16)),i.push(parseInt(t.substr(2,2),16)),i.push(parseInt(t.substr(4,2),16)),e&&i.push(parseInt(e,16)),i},r.generateEase=function(t){var i=t.length,e=1/i,s=function(s){var a,r,n=i*s|0;return a=(s-n*e)*i,r=t[n]||t[i-1],r.s+a*(2*(1-a)*(r.cp-r.s)+a*(r.e-r.s))};return s},r.getBlendMode=function(t){if(!t)return s.NORMAL;for(t=t.toUpperCase();t.indexOf(" ")>=0;)t=t.replace(" ","_");return s[t]||s.NORMAL},i.exports=r},{}],5:[function(require,module,exports){"use strict";var ParticleUtils=require("./ParticleUtils"),Particle=require("./Particle"),PathParticle=function(t){Particle.call(this,t),this.path=null,this.initialRotation=0,this.initialPosition=new PIXI.Point,this.movement=0},s=Particle.prototype,p=PathParticle.prototype=Object.create(s),helperPoint=new PIXI.Point;p.init=function(){this.initialRotation=this.rotation,this.Particle_init(),this.path=this.extraData.path,this._doNormalMovement=!this.path,this.movement=0,this.initialPosition.x=this.position.x,this.initialPosition.y=this.position.y};for(var MATH_FUNCS=["pow","sqrt","abs","floor","round","ceil","E","PI","sin","cos","tan","asin","acos","atan","atan2","log"],WHITELISTER="[01234567890\\.\\*\\-\\+\\/\\(\\)x ,]",index=MATH_FUNCS.length-1;index>=0;--index)WHITELISTER+="|"+MATH_FUNCS[index];WHITELISTER=new RegExp(WHITELISTER,"g");var parsePath=function(pathString){for(var rtn,matches=pathString.match(WHITELISTER),i=matches.length-1;i>=0;--i)MATH_FUNCS.indexOf(matches[i])>=0&&(matches[i]="Math."+matches[i]);return pathString=matches.join(""),eval("rtn = function(x){ return "+pathString+"; };"),rtn};p.update=function(t){var i=this.Particle_update(t);if(i>=0&&this.path){var e=(this.endSpeed-this.startSpeed)*i+this.startSpeed;this.movement+=e*t,helperPoint.x=this.movement,helperPoint.y=this.path(this.movement),ParticleUtils.rotatePoint(this.initialRotation,helperPoint),this.position.x=this.initialPosition.x+helperPoint.x,this.position.y=this.initialPosition.y+helperPoint.y}},p.Particle_destroy=Particle.prototype.destroy,p.destroy=function(){this.Particle_destroy(),this.path=this.initialPosition=null},PathParticle.parseArt=function(t){return Particle.parseArt(t)},PathParticle.parseData=function(t){var i={};if(t&&t.path)try{i.path=parsePath(t.path)}catch(t){ParticleUtils.verbose&&console.error("PathParticle: error in parsing path expression"),i.path=null}else ParticleUtils.verbose&&console.error("PathParticle requires a path string in extraData!"),i.path=null;return i},module.exports=PathParticle},{"./Particle":3,"./ParticleUtils":4}],6:[function(t,i,e){},{}],7:[function(t,i,e){t("./polyfills.js"),e.ParticleUtils=t("./ParticleUtils.js"),e.Particle=t("./Particle.js"),e.Emitter=t("./Emitter.js"),e.PathParticle=t("./PathParticle.js"),e.AnimatedParticle=t("./AnimatedParticle.js"),t("./deprecation.js")},{"./AnimatedParticle.js":1,"./Emitter.js":2,"./Particle.js":3,"./ParticleUtils.js":4,"./PathParticle.js":5,"./deprecation.js":6,"./polyfills.js":8}],8:[function(t,i,e){Array.prototype.shuffle||Object.defineProperty(Array.prototype,"shuffle",{enumerable:!1,writable:!1,value:function(){for(var t,i,e=this.length;e;t=Math.floor(Math.random()*e),i=this[--e],this[e]=this[t],this[t]=i);return this}}),Array.prototype.random||Object.defineProperty(Array.prototype,"random",{enumerable:!1,writable:!1,value:function(){return this[Math.floor(Math.random()*this.length)]}})},{}],9:[function(t,i,e){"use strict";var s="undefined"!=typeof window?window:GLOBAL;if(s.PIXI.particles||(s.PIXI.particles={}),"undefined"!=typeof i&&i.exports)"undefined"==typeof PIXI&&t("pixi.js"),i.exports=s.PIXI.particles||a;else if("undefined"==typeof PIXI)throw"pixi-particles requires pixi.js to be loaded first";var a=t("./particles");for(var r in a)s.PIXI.particles[r]=a[r]},{"./particles":7,"pixi.js":void 0}]},{},[9])(9)}); +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i;i="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,i.pixiParticles=t()}}(function(){var define,module,exports;return function t(i,e,s){function a(n,o){if(!e[n]){if(!i[n]){var h="function"==typeof require&&require;if(!o&&h)return h(n,!0);if(r)return r(n,!0);var l=new Error("Cannot find module '"+n+"'");throw l.code="MODULE_NOT_FOUND",l}var p=e[n]={exports:{}};i[n][0].call(p.exports,function(t){var e=i[n][1][t];return a(e?e:t)},p,p.exports,t,i,e,s)}return e[n].exports}for(var r="function"==typeof require&&require,n=0;n=0){this.elapsed+=t,this.elapsed>this.duration&&(this.loop?this.elapsed=this.elapsed%this.duration:this.elapsed=this.duration-1e-6);var i=this.elapsed*this.framerate+1e-7|0;this.texture=this.textures[i]||s.EMPTY_TEXTURE}},h.Particle_destroy=a.prototype.destroy,h.destroy=function(){this.Particle_destroy(),this.textures=null},n.parseArt=function(t){var i,e,s,a,n,o,h=[];for(i=0;i0;--l)o.push(n)}"matchLife"==e.framerate?(h.framerate=-1,h.duration=0,h.loop=!1):(h.loop=!!e.loop,h.framerate=e.framerate>0?e.framerate:60,h.duration=o.length/h.framerate)}return t},i.exports=n},{"./Particle":3,"./ParticleUtils":4}],2:[function(t,i,e){"use strict";var s=t("./ParticleUtils"),a=t("./Particle"),r=PIXI.particles.ParticleContainer||PIXI.ParticleContainer,n=PIXI.ticker.shared,o=function(t,i,e){this._particleConstructor=a,this.particleImages=null,this.startAlpha=1,this.endAlpha=1,this.startSpeed=0,this.endSpeed=0,this.minimumSpeedMultiplier=1,this.acceleration=null,this.maxSpeed=NaN,this.startScale=1,this.endScale=1,this.minimumScaleMultiplier=1,this.startColor=null,this.endColor=null,this.minLifetime=0,this.maxLifetime=0,this.minStartRotation=0,this.maxStartRotation=0,this.noRotation=!1,this.minRotationSpeed=0,this.maxRotationSpeed=0,this.particleBlendMode=0,this.customEase=null,this.extraData=null,this._frequency=1,this.maxParticles=1e3,this.emitterLifetime=-1,this.spawnPos=null,this.spawnType=null,this._spawnFunc=null,this.spawnRect=null,this.spawnCircle=null,this.particlesPerWave=1,this.particleSpacing=0,this.angleStart=0,this.rotation=0,this.ownerPos=null,this._prevEmitterPos=null,this._prevPosIsValid=!1,this._posChanged=!1,this._parentIsPC=!1,this._parent=null,this.addAtBack=!1,this.particleCount=0,this._emit=!1,this._spawnTimer=0,this._emitterLife=-1,this._activeParticlesFirst=null,this._activeParticlesLast=null,this._poolFirst=null,this._origConfig=null,this._origArt=null,this._autoUpdate=!1,this._destroyWhenComplete=!1,this.parent=t,i&&e&&this.init(i,e),this.recycle=this.recycle,this.update=this.update,this.rotate=this.rotate,this.updateSpawnPos=this.updateSpawnPos,this.updateOwnerPos=this.updateOwnerPos},h=o.prototype={},l=new PIXI.Point;Object.defineProperty(h,"frequency",{get:function(){return this._frequency},set:function(t){"number"==typeof t&&t>0?this._frequency=t:this._frequency=1}}),Object.defineProperty(h,"particleConstructor",{get:function(){return this._particleConstructor},set:function(t){if(t!=this._particleConstructor){this._particleConstructor=t,this.cleanup();for(var i=this._poolFirst;i;i=i.next)i.destroy();this._poolFirst=null,this._origConfig&&this._origArt&&this.init(this._origArt,this._origConfig)}}}),Object.defineProperty(h,"parent",{get:function(){return this._parent},set:function(t){if(this._parentIsPC)for(var i=this._poolFirst;i;i=i.next)i.parent&&i.parent.removeChild(i);this.cleanup(),this._parent=t,this._parentIsPC=r&&t&&t instanceof r}}),h.init=function(t,i){if(t&&i){this.cleanup(),this._origConfig=i,this._origArt=t,t=Array.isArray(t)?t.slice():[t];var e=this._particleConstructor;this.particleImages=e.parseArt?e.parseArt(t):t,i.alpha?(this.startAlpha=i.alpha.start,this.endAlpha=i.alpha.end):this.startAlpha=this.endAlpha=1,i.speed?(this.startSpeed=i.speed.start,this.endSpeed=i.speed.end,this.minimumSpeedMultiplier=i.speed.minimumSpeedMultiplier||1):(this.minimumSpeedMultiplier=1,this.startSpeed=this.endSpeed=0);var a=i.acceleration;a&&(a.x||a.y)?(this.endSpeed=this.startSpeed,this.acceleration=new PIXI.Point(a.x,a.y),this.maxSpeed=i.maxSpeed||NaN):this.acceleration=new PIXI.Point,i.scale?(this.startScale=i.scale.start,this.endScale=i.scale.end,this.minimumScaleMultiplier=i.scale.minimumScaleMultiplier||1):this.startScale=this.endScale=this.minimumScaleMultiplier=1,i.color&&(this.startColor=s.hexToRGB(i.color.start),i.color.start!=i.color.end?this.endColor=s.hexToRGB(i.color.end):this.endColor=null),i.startRotation?(this.minStartRotation=i.startRotation.min,this.maxStartRotation=i.startRotation.max):this.minStartRotation=this.maxStartRotation=0,i.noRotation&&(this.minStartRotation||this.maxStartRotation)?this.noRotation=!!i.noRotation:this.noRotation=!1,i.rotationSpeed?(this.minRotationSpeed=i.rotationSpeed.min,this.maxRotationSpeed=i.rotationSpeed.max):this.minRotationSpeed=this.maxRotationSpeed=0,this.minLifetime=i.lifetime.min,this.maxLifetime=i.lifetime.max,this.particleBlendMode=s.getBlendMode(i.blendMode),i.ease?this.customEase="function"==typeof i.ease?i.ease:s.generateEase(i.ease):this.customEase=null,e.parseData?this.extraData=e.parseData(i.extraData):this.extraData=i.extraData||null,this.spawnRect=this.spawnCircle=null,this.particlesPerWave=1,this.particleSpacing=0,this.angleStart=0;var r;switch(i.spawnType){case"rect":this.spawnType="rect",this._spawnFunc=this._spawnRect;var n=i.spawnRect;this.spawnRect=new PIXI.Rectangle(n.x,n.y,n.w,n.h);break;case"circle":this.spawnType="circle",this._spawnFunc=this._spawnCircle,r=i.spawnCircle,this.spawnCircle=new PIXI.Circle(r.x,r.y,r.r);break;case"ring":this.spawnType="ring",this._spawnFunc=this._spawnRing,r=i.spawnCircle,this.spawnCircle=new PIXI.Circle(r.x,r.y,r.r),this.spawnCircle.minRadius=r.minR;break;case"burst":this.spawnType="burst",this._spawnFunc=this._spawnBurst,this.particlesPerWave=i.particlesPerWave,this.particleSpacing=i.particleSpacing,this.angleStart=i.angleStart?i.angleStart:0;break;case"point":this.spawnType="point",this._spawnFunc=this._spawnPoint;break;default:this.spawnType="point",this._spawnFunc=this._spawnPoint}this.frequency=i.frequency,this.emitterLifetime=i.emitterLifetime||-1,this.maxParticles=i.maxParticles>0?i.maxParticles:1e3,this.addAtBack=!!i.addAtBack,this.rotation=0,this.ownerPos=new PIXI.Point,this.spawnPos=new PIXI.Point(i.pos.x,i.pos.y),this._prevEmitterPos=this.spawnPos.clone(),this._prevPosIsValid=!1,this._spawnTimer=0,this.emit=void 0===i.emit||!!i.emit,this.autoUpdate=void 0!==i.autoUpdate&&!!i.autoUpdate}},h.recycle=function(t){t.next&&(t.next.prev=t.prev),t.prev&&(t.prev.next=t.next),t==this._activeParticlesLast&&(this._activeParticlesLast=t.prev),t==this._activeParticlesFirst&&(this._activeParticlesFirst=t.next),t.prev=null,t.next=this._poolFirst,this._poolFirst=t,this._parentIsPC?(t.alpha=0,t.visible=!1):t.parent&&t.parent.removeChild(t),--this.particleCount},h.rotate=function(t){if(this.rotation!=t){var i=t-this.rotation;this.rotation=t,s.rotatePoint(i,this.spawnPos),this._posChanged=!0}},h.updateSpawnPos=function(t,i){this._posChanged=!0,this.spawnPos.x=t,this.spawnPos.y=i},h.updateOwnerPos=function(t,i){this._posChanged=!0,this.ownerPos.x=t,this.ownerPos.y=i},h.resetPositionTracking=function(){this._prevPosIsValid=!1},Object.defineProperty(h,"emit",{get:function(){return this._emit},set:function(t){this._emit=!!t,this._emitterLife=this.emitterLifetime}}),Object.defineProperty(h,"autoUpdate",{get:function(){return this._autoUpdate},set:function(t){this._autoUpdate&&!t?n.remove(this.update,this):!this._autoUpdate&&t&&n.add(this.update,this),this._autoUpdate=!!t}}),h.playOnceAndDestroy=function(){this.autoUpdate=!0,this.emit=!0,this._destroyWhenComplete=!0},h.update=function(t){if(this._autoUpdate&&(t=t/PIXI.settings.TARGET_FPMS/1e3),this._parent){var i,e,s;for(e=this._activeParticlesFirst;e;e=s)s=e.next,e.update(t);var a,r;this._prevPosIsValid&&(a=this._prevEmitterPos.x,r=this._prevEmitterPos.y);var n=this.ownerPos.x+this.spawnPos.x,o=this.ownerPos.y+this.spawnPos.y;if(this._emit)for(this._spawnTimer-=t;this._spawnTimer<=0;){if(this._emitterLife>0&&(this._emitterLife-=this._frequency,this._emitterLife<=0)){this._spawnTimer=0,this._emitterLife=0,this.emit=!1;break}if(this.particleCount>=this.maxParticles)this._spawnTimer+=this._frequency;else{var h;if(h=this.minLifetime==this.maxLifetime?this.minLifetime:Math.random()*(this.maxLifetime-this.minLifetime)+this.minLifetime,-this._spawnTimer1?u.applyArt(this.particleImages.random()):u.applyArt(this.particleImages[0]),u.startAlpha=this.startAlpha,u.endAlpha=this.endAlpha,1!=this.minimumSpeedMultiplier?(m=Math.random()*(1-this.minimumSpeedMultiplier)+this.minimumSpeedMultiplier,u.startSpeed=this.startSpeed*m,u.endSpeed=this.endSpeed*m):(u.startSpeed=this.startSpeed,u.endSpeed=this.endSpeed),u.acceleration.x=this.acceleration.x,u.acceleration.y=this.acceleration.y,u.maxSpeed=this.maxSpeed,1!=this.minimumScaleMultiplier?(m=Math.random()*(1-this.minimumScaleMultiplier)+this.minimumScaleMultiplier,u.startScale=this.startScale*m,u.endScale=this.endScale*m):(u.startScale=this.startScale,u.endScale=this.endScale),u.startColor=this.startColor,u.endColor=this.endColor,this.minRotationSpeed==this.maxRotationSpeed?u.rotationSpeed=this.minRotationSpeed:u.rotationSpeed=Math.random()*(this.maxRotationSpeed-this.minRotationSpeed)+this.minRotationSpeed,u.noRotation=this.noRotation,u.maxLife=h,u.blendMode=this.particleBlendMode,u.ease=this.customEase,u.extraData=this.extraData,this._spawnFunc(u,l,p,i),u.init(),u.update(-this._spawnTimer),this._parentIsPC&&u.parent){var f=this._parent.children;if(f[0]==u)f.shift();else if(f[f.length-1]==u)f.pop();else{var P=f.indexOf(u);f.splice(P,1)}this.addAtBack?f.unshift(u):f.push(u)}else this.addAtBack?this._parent.addChildAt(u,0):this._parent.addChild(u);this._activeParticlesLast?(this._activeParticlesLast.next=u,u.prev=this._activeParticlesLast,this._activeParticlesLast=u):this._activeParticlesLast=this._activeParticlesFirst=u,++this.particleCount}}this._spawnTimer+=this._frequency}}this._posChanged&&(this._prevEmitterPos.x=n,this._prevEmitterPos.y=o,this._prevPosIsValid=!0,this._posChanged=!1),!this._destroyWhenComplete||this._emit||this._activeParticlesFirst||this.destroy()}},h._spawnPoint=function(t,i,e){this.minStartRotation==this.maxStartRotation?t.rotation=this.minStartRotation+this.rotation:t.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,t.position.x=i,t.position.y=e},h._spawnRect=function(t,i,e){this.minStartRotation==this.maxStartRotation?t.rotation=this.minStartRotation+this.rotation:t.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,l.x=Math.random()*this.spawnRect.width+this.spawnRect.x,l.y=Math.random()*this.spawnRect.height+this.spawnRect.y,0!==this.rotation&&s.rotatePoint(this.rotation,l),t.position.x=i+l.x,t.position.y=e+l.y},h._spawnCircle=function(t,i,e){this.minStartRotation==this.maxStartRotation?t.rotation=this.minStartRotation+this.rotation:t.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,l.x=Math.random()*this.spawnCircle.radius,l.y=0,s.rotatePoint(360*Math.random(),l),l.x+=this.spawnCircle.x,l.y+=this.spawnCircle.y,0!==this.rotation&&s.rotatePoint(this.rotation,l),t.position.x=i+l.x,t.position.y=e+l.y},h._spawnRing=function(t,i,e){var a=this.spawnCircle;this.minStartRotation==this.maxStartRotation?t.rotation=this.minStartRotation+this.rotation:t.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,a.minRadius==a.radius?l.x=Math.random()*(a.radius-a.minRadius)+a.minRadius:l.x=a.radius,l.y=0;var r=360*Math.random();t.rotation+=r,s.rotatePoint(r,l),l.x+=this.spawnCircle.x,l.y+=this.spawnCircle.y,0!==this.rotation&&s.rotatePoint(this.rotation,l),t.position.x=i+l.x,t.position.y=e+l.y},h._spawnBurst=function(t,i,e,s){0===this.particleSpacing?t.rotation=360*Math.random():t.rotation=this.angleStart+this.particleSpacing*s+this.rotation,t.position.x=i,t.position.y=e},h.cleanup=function(){var t,i;for(t=this._activeParticlesFirst;t;t=i)i=t.next,this.recycle(t),t.parent&&t.parent.removeChild(t);this._activeParticlesFirst=this._activeParticlesLast=null,this.particleCount=0},h.destroy=function(){this.autoUpdate=!1,this.cleanup();for(var t,i=this._poolFirst;i;i=t)t=i.next,i.destroy();this._poolFirst=this._parent=this.particleImages=this.spawnPos=this.ownerPos=this.startColor=this.endColor=this.customEase=null},i.exports=o},{"./Particle":3,"./ParticleUtils":4}],3:[function(t,i,e){var s=t("./ParticleUtils"),a=PIXI.Sprite,r=function(t){a.call(this),this.emitter=t,this.anchor.x=this.anchor.y=.5,this.velocity=new PIXI.Point,this.maxLife=0,this.age=0,this.ease=null,this.extraData=null,this.startAlpha=0,this.endAlpha=0,this.startSpeed=0,this.endSpeed=0,this.acceleration=new PIXI.Point,this.maxSpeed=NaN,this.startScale=0,this.endScale=0,this.startColor=null,this._sR=0,this._sG=0,this._sB=0,this.endColor=null,this._eR=0,this._eG=0,this._eB=0,this._doAlpha=!1,this._doScale=!1,this._doSpeed=!1,this._doAcceleration=!1,this._doColor=!1,this._doNormalMovement=!1,this._oneOverLife=0,this.next=null,this.prev=null,this.init=this.init,this.Particle_init=this.Particle_init,this.update=this.update,this.Particle_update=this.Particle_update,this.applyArt=this.applyArt,this.kill=this.kill},n=r.prototype=Object.create(a.prototype);n.init=n.Particle_init=function(){this.age=0,this.velocity.x=this.startSpeed,this.velocity.y=0,s.rotatePoint(this.rotation,this.velocity),this.noRotation?this.rotation=0:this.rotation*=s.DEG_TO_RADS,this.rotationSpeed*=s.DEG_TO_RADS,this.alpha=this.startAlpha,this.scale.x=this.scale.y=this.startScale,this.startColor&&(this._sR=this.startColor[0],this._sG=this.startColor[1],this._sB=this.startColor[2],this.endColor&&(this._eR=this.endColor[0],this._eG=this.endColor[1],this._eB=this.endColor[2])),this._doAlpha=this.startAlpha!=this.endAlpha,this._doSpeed=this.startSpeed!=this.endSpeed,this._doScale=this.startScale!=this.endScale,this._doColor=!!this.endColor,this._doAcceleration=0!==this.acceleration.x||0!==this.acceleration.y,this._doNormalMovement=this._doSpeed||0!==this.startSpeed||this._doAcceleration,this._oneOverLife=1/this.maxLife,this.tint=s.combineRGBComponents(this._sR,this._sG,this._sB),this.visible=!0},n.applyArt=function(t){this.texture=t||s.EMPTY_TEXTURE},n.update=n.Particle_update=function(t){if(this.age+=t,this.age>=this.maxLife)return this.kill(),-1;var i=this.age*this._oneOverLife;if(this.ease&&(i=4==this.ease.length?this.ease(i,0,1,1):this.ease(i)),this._doAlpha&&(this.alpha=(this.endAlpha-this.startAlpha)*i+this.startAlpha),this._doScale){var e=(this.endScale-this.startScale)*i+this.startScale;this.scale.x=this.scale.y=e}if(this._doNormalMovement){if(this._doSpeed){var a=(this.endSpeed-this.startSpeed)*i+this.startSpeed;s.normalize(this.velocity),s.scaleBy(this.velocity,a)}else if(this._doAcceleration&&(this.velocity.x+=this.acceleration.x*t,this.velocity.y+=this.acceleration.y*t,this.maxSpeed)){var r=s.length(this.velocity);r>this.maxSpeed&&s.scaleBy(this.velocity,this.maxSpeed/r)}this.position.x+=this.velocity.x*t,this.position.y+=this.velocity.y*t}if(this._doColor){var n=(this._eR-this._sR)*i+this._sR,o=(this._eG-this._sG)*i+this._sG,h=(this._eB-this._sB)*i+this._sB;this.tint=s.combineRGBComponents(n,o,h)}return 0!==this.rotationSpeed?this.rotation+=this.rotationSpeed*t:this.acceleration&&!this.noRotation&&(this.rotation=Math.atan2(this.velocity.y,this.velocity.x)),i},n.kill=function(){this.emitter.recycle(this)},n.Sprite_Destroy=a.prototype.destroy,n.destroy=function(){this.parent&&this.parent.removeChild(this),this.Sprite_Destroy&&this.Sprite_Destroy(),this.emitter=this.velocity=this.startColor=this.endColor=this.ease=this.next=this.prev=null},r.parseArt=function(t){var i;for(i=t.length;i>=0;--i)"string"==typeof t[i]&&(t[i]=PIXI.Texture.fromImage(t[i]));if(s.verbose)for(i=t.length-1;i>0;--i)if(t[i].baseTexture!=t[i-1].baseTexture){window.console&&console.warn("PixiParticles: using particle textures from different images may hinder performance in WebGL");break}return t},r.parseData=function(t){return t},i.exports=r},{"./ParticleUtils":4}],4:[function(t,i,e){"use strict";var s=PIXI.BLEND_MODES||PIXI.blendModes,a=PIXI.Texture,r={};r.verbose=!1;var n=r.DEG_TO_RADS=Math.PI/180,o=r.EMPTY_TEXTURE=a.EMPTY;o.on=o.destroy=o.once=o.emit=function(){},r.rotatePoint=function(t,i){if(t){t*=n;var e=Math.sin(t),s=Math.cos(t),a=i.x*s-i.y*e,r=i.x*e+i.y*s;i.x=a,i.y=r}},r.combineRGBComponents=function(t,i,e){return t<<16|i<<8|e},r.normalize=function(t){var i=1/r.length(t);t.x*=i,t.y*=i},r.scaleBy=function(t,i){t.x*=i,t.y*=i},r.length=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},r.hexToRGB=function(t,i){i?i.length=0:i=[],"#"==t.charAt(0)?t=t.substr(1):0===t.indexOf("0x")&&(t=t.substr(2));var e;return 8==t.length&&(e=t.substr(0,2),t=t.substr(2)),i.push(parseInt(t.substr(0,2),16)),i.push(parseInt(t.substr(2,2),16)),i.push(parseInt(t.substr(4,2),16)),e&&i.push(parseInt(e,16)),i},r.generateEase=function(t){var i=t.length,e=1/i,s=function(s){var a,r,n=i*s|0;return a=(s-n*e)*i,r=t[n]||t[i-1],r.s+a*(2*(1-a)*(r.cp-r.s)+a*(r.e-r.s))};return s},r.getBlendMode=function(t){if(!t)return s.NORMAL;for(t=t.toUpperCase();t.indexOf(" ")>=0;)t=t.replace(" ","_");return s[t]||s.NORMAL},i.exports=r},{}],5:[function(require,module,exports){"use strict";var ParticleUtils=require("./ParticleUtils"),Particle=require("./Particle"),PathParticle=function(t){Particle.call(this,t),this.path=null,this.initialRotation=0,this.initialPosition=new PIXI.Point,this.movement=0},s=Particle.prototype,p=PathParticle.prototype=Object.create(s),helperPoint=new PIXI.Point;p.init=function(){this.initialRotation=this.rotation,this.Particle_init(),this.path=this.extraData.path,this._doNormalMovement=!this.path,this.movement=0,this.initialPosition.x=this.position.x,this.initialPosition.y=this.position.y};for(var MATH_FUNCS=["pow","sqrt","abs","floor","round","ceil","E","PI","sin","cos","tan","asin","acos","atan","atan2","log"],WHITELISTER="[01234567890\\.\\*\\-\\+\\/\\(\\)x ,]",index=MATH_FUNCS.length-1;index>=0;--index)WHITELISTER+="|"+MATH_FUNCS[index];WHITELISTER=new RegExp(WHITELISTER,"g");var parsePath=function(pathString){for(var rtn,matches=pathString.match(WHITELISTER),i=matches.length-1;i>=0;--i)MATH_FUNCS.indexOf(matches[i])>=0&&(matches[i]="Math."+matches[i]);return pathString=matches.join(""),eval("rtn = function(x){ return "+pathString+"; };"),rtn};p.update=function(t){var i=this.Particle_update(t);if(i>=0&&this.path){var e=(this.endSpeed-this.startSpeed)*i+this.startSpeed;this.movement+=e*t,helperPoint.x=this.movement,helperPoint.y=this.path(this.movement),ParticleUtils.rotatePoint(this.initialRotation,helperPoint),this.position.x=this.initialPosition.x+helperPoint.x,this.position.y=this.initialPosition.y+helperPoint.y}},p.Particle_destroy=Particle.prototype.destroy,p.destroy=function(){this.Particle_destroy(),this.path=this.initialPosition=null},PathParticle.parseArt=function(t){return Particle.parseArt(t)},PathParticle.parseData=function(t){var i={};if(t&&t.path)try{i.path=parsePath(t.path)}catch(t){ParticleUtils.verbose&&console.error("PathParticle: error in parsing path expression"),i.path=null}else ParticleUtils.verbose&&console.error("PathParticle requires a path string in extraData!"),i.path=null;return i},module.exports=PathParticle},{"./Particle":3,"./ParticleUtils":4}],6:[function(t,i,e){},{}],7:[function(t,i,e){t("./polyfills.js"),e.ParticleUtils=t("./ParticleUtils.js"),e.Particle=t("./Particle.js"),e.Emitter=t("./Emitter.js"),e.PathParticle=t("./PathParticle.js"),e.AnimatedParticle=t("./AnimatedParticle.js"),t("./deprecation.js")},{"./AnimatedParticle.js":1,"./Emitter.js":2,"./Particle.js":3,"./ParticleUtils.js":4,"./PathParticle.js":5,"./deprecation.js":6,"./polyfills.js":8}],8:[function(t,i,e){Array.prototype.shuffle||Object.defineProperty(Array.prototype,"shuffle",{enumerable:!1,writable:!1,value:function(){for(var t,i,e=this.length;e;t=Math.floor(Math.random()*e),i=this[--e],this[e]=this[t],this[t]=i);return this}}),Array.prototype.random||Object.defineProperty(Array.prototype,"random",{enumerable:!1,writable:!1,value:function(){return this[Math.floor(Math.random()*this.length)]}})},{}],9:[function(t,i,e){"use strict";var s="undefined"!=typeof window?window:GLOBAL;if(s.PIXI.particles||(s.PIXI.particles={}),"undefined"!=typeof i&&i.exports)"undefined"==typeof PIXI&&t("pixi.js"),i.exports=s.PIXI.particles||a;else if("undefined"==typeof PIXI)throw"pixi-particles requires pixi.js to be loaded first";var a=t("./particles");for(var r in a)s.PIXI.particles[r]=a[r]},{"./particles":7,"pixi.js":void 0}]},{},[9])(9)}); //# sourceMappingURL=pixi-particles.min.js.map diff --git a/dist/pixi-particles.min.js.map b/dist/pixi-particles.min.js.map index 7808deb7..5161e033 100644 --- a/dist/pixi-particles.min.js.map +++ b/dist/pixi-particles.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["node_modules/browser-pack/_prelude.js","src/AnimatedParticle.js","src/Emitter.js","src/Particle.js","src/ParticleUtils.js","src/PathParticle.js","src/particles.js","src/polyfills.js","src"],"names":["f","exports","module","define","amd","g","window","global","self","this","pixiParticles","e","t","n","r","s","o","u","a","require","i","Error","code","l","call","length","1","ParticleUtils","Particle","Texture","PIXI","AnimatedParticle","emitter","textures","duration","framerate","elapsed","loop","prototype","p","Object","create","init","Particle_init","maxLife","applyArt","art","update","delta","Particle_update","frame","texture","EMPTY_TEXTURE","Particle_destroy","destroy","parseArt","data","j","tex","outTextures","output","push","fromImage","dupe","count","ParticleContainer","particles","ticker","shared","Emitter","particleParent","particleImages","config","_particleConstructor","startAlpha","endAlpha","startSpeed","endSpeed","minimumSpeedMultiplier","acceleration","maxSpeed","NaN","startScale","endScale","minimumScaleMultiplier","startColor","endColor","minLifetime","maxLifetime","minStartRotation","maxStartRotation","noRotation","minRotationSpeed","maxRotationSpeed","particleBlendMode","customEase","extraData","_frequency","maxParticles","emitterLifetime","spawnPos","spawnType","_spawnFunc","spawnRect","spawnCircle","particlesPerWave","particleSpacing","angleStart","rotation","ownerPos","_prevEmitterPos","_prevPosIsValid","_posChanged","_parentIsPC","_parent","addAtBack","particleCount","_emit","_spawnTimer","_emitterLife","_activeParticlesFirst","_activeParticlesLast","_poolFirst","_origConfig","_origArt","_autoUpdate","parent","recycle","rotate","updateSpawnPos","updateOwnerPos","helperPoint","Point","defineProperty","get","set","value","cleanup","particle","next","removeChild","Array","isArray","slice","partClass","alpha","start","end","speed","x","y","scale","color","hexToRGB","startRotation","min","max","rotationSpeed","lifetime","getBlendMode","blendMode","ease","generateEase","parseData","_spawnRect","Rectangle","w","h","_spawnCircle","Circle","_spawnRing","minRadius","minR","_spawnBurst","_spawnPoint","frequency","pos","clone","emit","undefined","autoUpdate","prev","visible","newRot","diff","rotatePoint","resetPositionTracking","remove","add","settings","TARGET_FPMS","prevX","prevY","curX","curY","Math","random","emitPosX","emitPosY","lerp","len","rand","particleConstructor","children","shift","pop","index","indexOf","splice","unshift","addChildAt","addChild","position","width","height","radius","angle","Sprite","anchor","velocity","age","_sR","_sG","_sB","_eR","_eG","_eB","_doAlpha","_doScale","_doSpeed","_doAcceleration","_doColor","_doNormalMovement","_oneOverLife","kill","DEG_TO_RADS","tint","combineRGBComponents","normalize","scaleBy","currentSpeed","b","atan2","Sprite_Destroy","verbose","baseTexture","console","warn","BLEND_MODES","blendModes","PI","empty","EMPTY","on","once","sin","c","cos","xnew","ynew","point","oneOverLen","sqrt","charAt","substr","parseInt","segments","qty","oneOverQty","simpleEase","time","cp","name","NORMAL","toUpperCase","replace","PathParticle","path","initialRotation","initialPosition","movement","MATH_FUNCS","WHITELISTER","RegExp","parsePath","pathString","rtn","matches","match","join","eval","error","shuffle","enumerable","writable","floor","GLOBAL","prop"],"mappings":";;;;;;;CAAA,SAAAA,GAAA,GAAA,gBAAAC,UAAA,mBAAAC,QAAAA,OAAAD,QAAAD,QAAA,IAAA,kBAAAG,SAAAA,OAAAC,IAAAD,UAAAH,OAAA,CAAA,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EAAAmR,aAAAjQ,EAAA,qBACAlB,EAAA8B,iBAAAZ,EAAA,yBACAA,EAAA,6LCKA0H,MAAAvG,UAAA8P,SAIA5P,OAAA6F,eAAAQ,MAAAvG,UAAA,WACA+P,YAAA,EACAC,UAAA,EACA9J,MAAA,WACA,IAAA,GAAA/E,GAAA4F,EAAAjI,EAAAX,KAAAgB,OAAAL,EAAAqC,EAAA0I,KAAAoG,MAAApG,KAAAC,SAAAhL,GAAAiI,EAAA5I,OAAAW,GAAAX,KAAAW,GAAAX,KAAAgD,GAAAhD,KAAAgD,GAAA4F,GACA,MAAA5I,SAUAoI,MAAAvG,UAAA8J,QAEA5J,OAAA6F,eAAAQ,MAAAvG,UAAA,UACA+P,YAAA,EACAC,UAAA,EACA9J,MAAA,WACA,MAAA/H,MAAA0L,KAAAoG,MAAApG,KAAAC,SAAA3L,KAAAgB,oCCpCA,YAGA,IAAAlB,GAAA,mBAAAD,QAAAA,OAAAkS,MAQA,IALAjS,EAAAuB,KAAAoC,YACA3D,EAAAuB,KAAAoC,cAIA,mBAAAhE,IAAAA,EAAAD,QAGA,mBAAA6B,OAGAX,EAAA,WAIAjB,EAAAD,QAAAM,EAAAuB,KAAAoC,WAAAA,MAGA,IAAA,mBAAApC,MAEA,KAAA,oDAIA,IAAAoC,GAAA/C,EAAA,cAGA,KAAA,GAAAsR,KAAAvO,GACA3D,EAAAuB,KAAAoC,UAAAuO,GAAAvO,EAAAuO","file":"pixi-particles.min.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o= 0)\n\t{\n\t\tthis.elapsed += delta;\n\t\tif(this.elapsed > this.duration)\n\t\t{\n\t\t\t//loop elapsed back around\n\t\t\tif(this.loop)\n\t\t\t\tthis.elapsed = this.elapsed % this.duration;\n\t\t\t//subtract a small amount to prevent attempting to go past the end of the animation\n\t\t\telse\n\t\t\t\tthis.elapsed = this.duration - 0.000001;\n\t\t}\n\t\tvar frame = (this.elapsed * this.framerate + 0.0000001) | 0;\n\t\tthis.texture = this.textures[frame] || ParticleUtils.EMPTY_TEXTURE;\n\t}\n};\n\np.Particle_destroy = Particle.prototype.destroy;\n/**\n * Destroys the particle, removing references and preventing future use.\n * @method PIXI.particles.AnimatedParticle#destroy\n */\np.destroy = function()\n{\n\tthis.Particle_destroy();\n\tthis.textures = null;\n};\n\n/**\n * Checks over the art that was passed to the Emitter's init() function, to do any special\n * modifications to prepare it ahead of time.\n * @method PIXI.particles.AnimatedParticle.parseArt\n * @static\n * @param {Array} art The array of art data, properly formatted for AnimatedParticle.\n * @return {Array} The art, after any needed modifications.\n */\nAnimatedParticle.parseArt = function(art)\n{\n\tvar i, data, output = [], j, textures, tex, outTextures;\n\tfor(i = 0; i < art.length; ++i)\n\t{\n\t\tdata = art[i];\n\t\tart[i] = output = {};\n\t\toutput.textures = outTextures = [];\n\t\ttextures = data.textures;\n\t\tfor(j = 0; j < textures.length; ++j)\n\t\t{\n\t\t\ttex = textures[j];\n\t\t\tif(typeof tex == \"string\")\n\t\t\t\toutTextures.push(Texture.fromImage(tex));\n\t\t\telse if(tex instanceof Texture)\n\t\t\t\toutTextures.push(tex);\n\t\t\t//assume an object with extra data determining duplicate frame data\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar dupe = tex.count || 1;\n\t\t\t\tif(typeof tex.texture == \"string\")\n\t\t\t\t\ttex = Texture.fromImage(tex.texture);\n\t\t\t\telse// if(tex.texture instanceof Texture)\n\t\t\t\t\ttex = tex.texture;\n\t\t\t\tfor(; dupe > 0; --dupe)\n\t\t\t\t{\n\t\t\t\t\toutTextures.push(tex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//use these values to signify that the animation should match the particle life time.\n\t\tif(data.framerate == \"matchLife\")\n\t\t{\n\t\t\t//-1 means that it should be calculated\n\t\t\toutput.framerate = -1;\n\t\t\toutput.duration = 0;\n\t\t\toutput.loop = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//determine if the animation should loop\n\t\t\toutput.loop = !!data.loop;\n\t\t\t//get the framerate, default to 60\n\t\t\toutput.framerate = data.framerate > 0 ? data.framerate : 60;\n\t\t\t//determine the duration\n\t\t\toutput.duration = outTextures.length / output.framerate;\n\t\t}\n\t}\n\n\treturn art;\n};\n\nmodule.exports = AnimatedParticle;","\"use strict\";\n\nvar ParticleUtils = require(\"./ParticleUtils\"),\n\tParticle = require(\"./Particle\"),\n\tParticleContainer = PIXI.particles.ParticleContainer || PIXI.ParticleContainer,\n\tticker = PIXI.ticker.shared;\n\n/**\n * A particle emitter.\n * @memberof PIXI.particles\n * @class Emitter\n * @constructor\n * @param {PIXI.DisplayObjectContainer} particleParent The display object to add the\n * particles to.\n * @param {Array|PIXI.Texture|String} [particleImages] A texture or array of textures to use\n * for the particles. Strings will be turned\n * into textures via Texture.fromImage().\n * @param {Object} [config] A configuration object containing settings for the emitter.\n * @param {Boolean} [config.emit=true] If config.emit is explicitly passed as false, the Emitter\n * will start disabled.\n * @param {Boolean} [config.autoUpdate=false] If config.emit is explicitly passed as true, the Emitter\n * will automatically call update via the PIXI shared ticker.\n */\nvar Emitter = function(particleParent, particleImages, config)\n{\n\t/**\n\t * The constructor used to create new particles. The default is\n\t * the built in particle class.\n\t * @property {Function} _particleConstructor\n\t * @private\n\t */\n\tthis._particleConstructor = Particle;\n\t//properties for individual particles\n\t/**\n\t * An array of PIXI Texture objects.\n\t * @property {Array} particleImages\n\t */\n\tthis.particleImages = null;\n\t/**\n\t * The starting alpha of all particles.\n\t * @property {Number} startAlpha\n\t * @default 1\n\t */\n\tthis.startAlpha = 1;\n\t/**\n\t * The ending alpha of all particles.\n\t * @property {Number} endAlpha\n\t * @default 1\n\t */\n\tthis.endAlpha = 1;\n\t/**\n\t * The starting speed of all particles.\n\t * @property {Number} startSpeed\n\t * @default 0\n\t */\n\tthis.startSpeed = 0;\n\t/**\n\t * The ending speed of all particles.\n\t * @property {Number} endSpeed\n\t * @default 0\n\t */\n\tthis.endSpeed = 0;\n\t/**\n\t * A minimum multiplier for the speed of a particle at both start and\n\t * end. A value between minimumSpeedMultiplier and 1 is randomly generated\n\t * and multiplied with startSpeed and endSpeed to provide the actual\n\t * startSpeed and endSpeed for each particle.\n\t * @property {Number} minimumSpeedMultiplier\n\t * @default 1\n\t */\n\tthis.minimumSpeedMultiplier = 1;\n\t/**\n\t * Acceleration to apply to particles. Using this disables\n\t * any interpolation of particle speed. If the particles do\n\t * not have a rotation speed, then they will be rotated to\n\t * match the direction of travel.\n\t * @property {PIXI.Point} acceleration\n\t * @default null\n\t */\n\tthis.acceleration = null;\n\t/**\n\t * The maximum speed allowed for accelerating particles. Negative values, values of 0 or NaN\n\t * will disable the maximum speed.\n\t * @property {Number} maxSpeed\n\t * @default NaN\n\t */\n\tthis.maxSpeed = NaN;\n\t/**\n\t * The starting scale of all particles.\n\t * @property {Number} startScale\n\t * @default 1\n\t */\n\tthis.startScale = 1;\n\t/**\n\t * The ending scale of all particles.\n\t * @property {Number} endScale\n\t * @default 1\n\t */\n\tthis.endScale = 1;\n\t/**\n\t * A minimum multiplier for the scale of a particle at both start and\n\t * end. A value between minimumScaleMultiplier and 1 is randomly generated\n\t * and multiplied with startScale and endScale to provide the actual\n\t * startScale and endScale for each particle.\n\t * @property {Number} minimumScaleMultiplier\n\t * @default 1\n\t */\n\tthis.minimumScaleMultiplier = 1;\n\t/**\n\t * The starting color of all particles, as red, green, and blue uints from 0-255.\n\t * @property {Array} startColor\n\t */\n\tthis.startColor = null;\n\t/**\n\t * The ending color of all particles, as red, green, and blue uints from 0-255.\n\t * @property {Array} endColor\n\t */\n\tthis.endColor = null;\n\t/**\n\t * The minimum lifetime for a particle, in seconds.\n\t * @property {Number} minLifetime\n\t */\n\tthis.minLifetime = 0;\n\t/**\n\t * The maximum lifetime for a particle, in seconds.\n\t * @property {Number} maxLifetime\n\t */\n\tthis.maxLifetime = 0;\n\t/**\n\t * The minimum start rotation for a particle, in degrees. This value\n\t * is ignored if the spawn type is \"burst\" or \"arc\".\n\t * @property {Number} minStartRotation\n\t */\n\tthis.minStartRotation = 0;\n\t/**\n\t * The maximum start rotation for a particle, in degrees. This value\n\t * is ignored if the spawn type is \"burst\" or \"arc\".\n\t * @property {Number} maxStartRotation\n\t */\n\tthis.maxStartRotation = 0;\n\t/**\n\t * If no particle rotation should occur. Starting rotation will still\n\t * affect the direction in which particles move. If the rotation speed\n\t * is set, then this will be ignored.\n\t * @property {Boolean} maxStartRotation\n\t */\n\tthis.noRotation = false;\n\t/**\n\t * The minimum rotation speed for a particle, in degrees per second.\n\t * This only visually spins the particle, it does not change direction\n\t * of movement.\n\t * @property {Number} minRotationSpeed\n\t */\n\tthis.minRotationSpeed = 0;\n\t/**\n\t * The maximum rotation speed for a particle, in degrees per second.\n\t * This only visually spins the particle, it does not change direction\n\t * of movement.\n\t * @property {Number} maxRotationSpeed\n\t */\n\tthis.maxRotationSpeed = 0;\n\t/**\n\t * The blend mode for all particles, as named by PIXI.blendModes.\n\t * @property {int} particleBlendMode\n\t */\n\tthis.particleBlendMode = 0;\n\t/**\n\t * An easing function for nonlinear interpolation of values. Accepts a single\n\t * parameter of time as a value from 0-1, inclusive. Expected outputs are values\n\t * from 0-1, inclusive.\n\t * @property {Function} customEase\n\t */\n\tthis.customEase = null;\n\t/**\n\t *\tExtra data for use in custom particles. The emitter doesn't look inside, but\n\t *\tpasses it on to the particle to use in init().\n\t *\t@property {Object} extraData\n\t */\n\tthis.extraData = null;\n\t//properties for spawning particles\n\t/**\n\t * Time between particle spawns in seconds.\n\t * @property {Number} _frequency\n\t * @private\n\t */\n\tthis._frequency = 1;\n\t/**\n\t * Maximum number of particles to keep alive at a time. If this limit\n\t * is reached, no more particles will spawn until some have died.\n\t * @property {int} maxParticles\n\t * @default 1000\n\t */\n\tthis.maxParticles = 1000;\n\t/**\n\t * The amount of time in seconds to emit for before setting emit to false.\n\t * A value of -1 is an unlimited amount of time.\n\t * @property {Number} emitterLifetime\n\t * @default -1\n\t */\n\tthis.emitterLifetime = -1;\n\t/**\n\t * Position at which to spawn particles, relative to the emitter's owner's origin.\n\t * For example, the flames of a rocket travelling right might have a spawnPos\n\t * of {x:-50, y:0}.\n\t * to spawn at the rear of the rocket.\n\t * To change this, use updateSpawnPos().\n\t * @property {PIXI.Point} spawnPos\n\t * @readOnly\n\t */\n\tthis.spawnPos = null;\n\t/**\n\t * How the particles will be spawned. Valid types are \"point\", \"rectangle\",\n\t * \"circle\", \"burst\", \"ring\".\n\t * @property {String} spawnType\n\t * @readOnly\n\t */\n\tthis.spawnType = null;\n\t/**\n\t * A reference to the emitter function specific to the spawn type.\n\t * @property {Function} _spawnFunc\n\t * @private\n\t */\n\tthis._spawnFunc = null;\n\t/**\n\t * A rectangle relative to spawnPos to spawn particles inside if the spawn type is \"rect\".\n\t * @property {PIXI.Rectangle} spawnRect\n\t */\n\tthis.spawnRect = null;\n\t/**\n\t * A circle relative to spawnPos to spawn particles inside if the spawn type is \"circle\".\n\t * @property {PIXI.Circle} spawnCircle\n\t */\n\tthis.spawnCircle = null;\n\t/**\n\t * Number of particles to spawn each wave in a burst.\n\t * @property {int} particlesPerWave\n\t * @default 1\n\t */\n\tthis.particlesPerWave = 1;\n\t/**\n\t * Spacing between particles in a burst. 0 gives a random angle for each particle.\n\t * @property {Number} particleSpacing\n\t * @default 0\n\t */\n\tthis.particleSpacing = 0;\n\t/**\n\t * Angle at which to start spawning particles in a burst.\n\t * @property {Number} angleStart\n\t * @default 0\n\t */\n\tthis.angleStart = 0;\n\t/**\n\t * Rotation of the emitter or emitter's owner in degrees. This is added to\n\t * the calculated spawn angle.\n\t * To change this, use rotate().\n\t * @property {Number} rotation\n\t * @default 0\n\t * @readOnly\n\t */\n\tthis.rotation = 0;\n\t/**\n\t * The world position of the emitter's owner, to add spawnPos to when\n\t * spawning particles. To change this, use updateOwnerPos().\n\t * @property {PIXI.Point} ownerPos\n\t * @default {x:0, y:0}\n\t * @readOnly\n\t */\n\tthis.ownerPos = null;\n\t/**\n\t * The origin + spawnPos in the previous update, so that the spawn position\n\t * can be interpolated to space out particles better.\n\t * @property {PIXI.Point} _prevEmitterPos\n\t * @private\n\t */\n\tthis._prevEmitterPos = null;\n\t/**\n\t * If _prevEmitterPos is valid, to prevent interpolation on the first update\n\t * @property {Boolean} _prevPosIsValid\n\t * @private\n\t * @default false\n\t */\n\tthis._prevPosIsValid = false;\n\t/**\n\t * If either ownerPos or spawnPos has changed since the previous update.\n\t * @property {Boolean} _posChanged\n\t * @private\n\t */\n\tthis._posChanged = false;\n\t/**\n\t * If the parent is a ParticleContainer from Pixi V3\n\t * @property {Boolean} _parentIsPC\n\t * @private\n\t */\n\tthis._parentIsPC = false;\n\t/**\n\t * The display object to add particles to.\n\t * @property {PIXI.DisplayObjectContainer} _parent\n\t * @private\n\t */\n\tthis._parent = null;\n\t/**\n\t * If particles should be added at the back of the display list instead of the front.\n\t * @property {Boolean} addAtBack\n\t */\n\tthis.addAtBack = false;\n\t/**\n\t * The current number of active particles.\n\t * @property {Number} particleCount\n\t * @readOnly\n\t */\n\tthis.particleCount = 0;\n\t/**\n\t * If particles should be emitted during update() calls. Setting this to false\n\t * stops new particles from being created, but allows existing ones to die out.\n\t * @property {Boolean} _emit\n\t * @private\n\t */\n\tthis._emit = false;\n\t/**\n\t * The timer for when to spawn particles in seconds, where numbers less\n\t * than 0 mean that particles should be spawned.\n\t * @property {Number} _spawnTimer\n\t * @private\n\t */\n\tthis._spawnTimer = 0;\n\t/**\n\t * The life of the emitter in seconds.\n\t * @property {Number} _emitterLife\n\t * @private\n\t */\n\tthis._emitterLife = -1;\n\t/**\n\t * The particles that are active and on the display list. This is the first particle in a\n\t * linked list.\n\t * @property {Particle} _activeParticlesFirst\n\t * @private\n\t */\n\tthis._activeParticlesFirst = null;\n\t/**\n\t * The particles that are active and on the display list. This is the last particle in a\n\t * linked list.\n\t * @property {Particle} _activeParticlesLast\n\t * @private\n\t */\n\tthis._activeParticlesLast = null;\n\t/**\n\t * The particles that are not currently being used. This is the first particle in a\n\t * linked list.\n\t * @property {Particle} _poolFirst\n\t * @private\n\t */\n\tthis._poolFirst = null;\n\t/**\n\t * The original config object that this emitter was initialized with.\n\t * @property {Object} _origConfig\n\t * @private\n\t */\n\tthis._origConfig = null;\n\t/**\n\t * The original particle image data that this emitter was initialized with.\n\t * @property {PIXI.Texture|Array|String} _origArt\n\t * @private\n\t */\n\tthis._origArt = null;\n\t/**\n\t * If the update function is called automatically from the shared ticker.\n\t * Setting this to false requires calling the update function manually.\n\t * @property {Boolean} _autoUpdate\n\t * @private\n\t */\n\tthis._autoUpdate = false;\n\n\t//set the initial parent\n\tthis.parent = particleParent;\n\n\tif(particleImages && config)\n\t\tthis.init(particleImages, config);\n\n\t//save often used functions on the instance instead of the prototype for better speed\n\tthis.recycle = this.recycle;\n\tthis.update = this.update;\n\tthis.rotate = this.rotate;\n\tthis.updateSpawnPos = this.updateSpawnPos;\n\tthis.updateOwnerPos = this.updateOwnerPos;\n};\n\n// Reference to the prototype\nvar p = Emitter.prototype = {};\n\nvar helperPoint = new PIXI.Point();\n\n/**\n * Time between particle spawns in seconds. If this value is not a number greater than 0,\n * it will be set to 1 (particle per second) to prevent infinite loops.\n * @member {Number} PIXI.particles.Emitter#frequency\n */\nObject.defineProperty(p, \"frequency\",\n{\n\tget: function() { return this._frequency; },\n\tset: function(value)\n\t{\n\t\t//do some error checking to prevent infinite loops\n\t\tif(typeof value == \"number\" && value > 0)\n\t\t\tthis._frequency = value;\n\t\telse\n\t\t\tthis._frequency = 1;\n\t}\n});\n\n/**\n * The constructor used to create new particles. The default is\n * the built in Particle class. Setting this will dump any active or\n * pooled particles, if the emitter has already been used.\n * @member {Function} PIXI.particles.Emitter#particleConstructor\n */\nObject.defineProperty(p, \"particleConstructor\",\n{\n\tget: function() { return this._particleConstructor; },\n\tset: function(value)\n\t{\n\t\tif(value != this._particleConstructor)\n\t\t{\n\t\t\tthis._particleConstructor = value;\n\t\t\t//clean up existing particles\n\t\t\tthis.cleanup();\n\t\t\t//scrap all the particles\n\t\t\tfor (var particle = this._poolFirst; particle; particle = particle.next)\n\t\t\t{\n\t\t\t\tparticle.destroy();\n\t\t\t}\n\t\t\tthis._poolFirst = null;\n\t\t\t//re-initialize the emitter so that the new constructor can do anything it needs to\n\t\t\tif(this._origConfig && this._origArt)\n\t\t\t\tthis.init(this._origArt, this._origConfig);\n\t\t}\n\t}\n});\n\n/**\n* The display object to add particles to. Settings this will dump any active particles.\n* @member {PIXI.DisplayObjectContainer} PIXI.particles.Emitter#parent\n*/\nObject.defineProperty(p, \"parent\",\n{\n\tget: function() { return this._parent; },\n\tset: function(value)\n\t{\n\t\t//if our previous parent was a ParticleContainer, then we need to remove\n\t\t//pooled particles from it\n\t\tif (this._parentIsPC) {\n\t\t\tfor (var particle = this._poolFirst; particle; particle = particle.next)\n\t\t\t{\n\t\t\t\tif(particle.parent)\n\t\t\t\t\tparticle.parent.removeChild(particle);\n\t\t\t}\n\t\t}\n\t\tthis.cleanup();\n\t\tthis._parent = value;\n\t\tthis._parentIsPC = ParticleContainer && value && value instanceof ParticleContainer;\n\t}\n});\n\n/**\n * Sets up the emitter based on the config settings.\n * @method PIXI.particles.Emitter#init\n * @param {Array|PIXI.Texture} art A texture or array of textures to use for the particles.\n * @param {Object} config A configuration object containing settings for the emitter.\n */\np.init = function(art, config)\n{\n\tif(!art || !config)\n\t\treturn;\n\t//clean up any existing particles\n\tthis.cleanup();\n\n\t//store the original config and particle images, in case we need to re-initialize\n\t//when the particle constructor is changed\n\tthis._origConfig = config;\n\tthis._origArt = art;\n\n\t//set up the array of data, also ensuring that it is an array\n\tart = Array.isArray(art) ? art.slice() : [art];\n\t//run the art through the particle class's parsing function\n\tvar partClass = this._particleConstructor;\n\tthis.particleImages = partClass.parseArt ? partClass.parseArt(art) : art;\n\t///////////////////////////\n\t// Particle Properties //\n\t///////////////////////////\n\t//set up the alpha\n\tif (config.alpha)\n\t{\n\t\tthis.startAlpha = config.alpha.start;\n\t\tthis.endAlpha = config.alpha.end;\n\t}\n\telse\n\t\tthis.startAlpha = this.endAlpha = 1;\n\t//set up the speed\n\tif (config.speed)\n\t{\n\t\tthis.startSpeed = config.speed.start;\n\t\tthis.endSpeed = config.speed.end;\n\t\tthis.minimumSpeedMultiplier = config.speed.minimumSpeedMultiplier || 1;\n\t}\n\telse\n\t{\n\t\tthis.minimumSpeedMultiplier = 1;\n\t\tthis.startSpeed = this.endSpeed = 0;\n\t}\n\t//set up acceleration\n\tvar acceleration = config.acceleration;\n\tif(acceleration && (acceleration.x || acceleration.y))\n\t{\n\t\tthis.endSpeed = this.startSpeed;\n\t\tthis.acceleration = new PIXI.Point(acceleration.x, acceleration.y);\n\t\tthis.maxSpeed = config.maxSpeed || NaN;\n\t}\n\telse\n\t\tthis.acceleration = new PIXI.Point();\n\t//set up the scale\n\tif (config.scale)\n\t{\n\t\tthis.startScale = config.scale.start;\n\t\tthis.endScale = config.scale.end;\n\t\tthis.minimumScaleMultiplier = config.scale.minimumScaleMultiplier || 1;\n\t}\n\telse\n\t\tthis.startScale = this.endScale = this.minimumScaleMultiplier = 1;\n\t//set up the color\n\tif (config.color)\n\t{\n\t\tthis.startColor = ParticleUtils.hexToRGB(config.color.start);\n\t\t//if it's just one color, only use the start color\n\t\tif (config.color.start != config.color.end)\n\t\t{\n\t\t\tthis.endColor = ParticleUtils.hexToRGB(config.color.end);\n\t\t}\n\t\telse\n\t\t\tthis.endColor = null;\n\t}\n\t//set up the start rotation\n\tif (config.startRotation)\n\t{\n\t\tthis.minStartRotation = config.startRotation.min;\n\t\tthis.maxStartRotation = config.startRotation.max;\n\t}\n\telse\n\t\tthis.minStartRotation = this.maxStartRotation = 0;\n\tif (config.noRotation &&\n\t\t(this.minStartRotation || this.maxStartRotation))\n\t{\n\t\tthis.noRotation = !!config.noRotation;\n\t}\n\telse\n\t\tthis.noRotation = false;\n\t//set up the rotation speed\n\tif (config.rotationSpeed)\n\t{\n\t\tthis.minRotationSpeed = config.rotationSpeed.min;\n\t\tthis.maxRotationSpeed = config.rotationSpeed.max;\n\t}\n\telse\n\t\tthis.minRotationSpeed = this.maxRotationSpeed = 0;\n\t//set up the lifetime\n\tthis.minLifetime = config.lifetime.min;\n\tthis.maxLifetime = config.lifetime.max;\n\t//get the blend mode\n\tthis.particleBlendMode = ParticleUtils.getBlendMode(config.blendMode);\n\t//use the custom ease if provided\n\tif (config.ease)\n\t{\n\t\tthis.customEase = typeof config.ease == \"function\" ?\n\t\t\t\t\t\t\t\t\t\t\t\t\tconfig.ease :\n\t\t\t\t\t\t\t\t\t\t\t\t\tParticleUtils.generateEase(config.ease);\n\t}\n\telse\n\t\tthis.customEase = null;\n\t//set up the extra data, running it through the particle class's parseData function.\n\tif(partClass.parseData)\n\t\tthis.extraData = partClass.parseData(config.extraData);\n\telse\n\t\tthis.extraData = config.extraData || null;\n\t//////////////////////////\n\t// Emitter Properties //\n\t//////////////////////////\n\t//reset spawn type specific settings\n\tthis.spawnRect = this.spawnCircle = null;\n\tthis.particlesPerWave = 1;\n\tthis.particleSpacing = 0;\n\tthis.angleStart = 0;\n\tvar spawnCircle;\n\t//determine the spawn function to use\n\tswitch(config.spawnType)\n\t{\n\t\tcase \"rect\":\n\t\t\tthis.spawnType = \"rect\";\n\t\t\tthis._spawnFunc = this._spawnRect;\n\t\t\tvar spawnRect = config.spawnRect;\n\t\t\tthis.spawnRect = new PIXI.Rectangle(spawnRect.x, spawnRect.y, spawnRect.w, spawnRect.h);\n\t\t\tbreak;\n\t\tcase \"circle\":\n\t\t\tthis.spawnType = \"circle\";\n\t\t\tthis._spawnFunc = this._spawnCircle;\n\t\t\tspawnCircle = config.spawnCircle;\n\t\t\tthis.spawnCircle = new PIXI.Circle(spawnCircle.x, spawnCircle.y, spawnCircle.r);\n\t\t\tbreak;\n\t\tcase \"ring\":\n\t\t\tthis.spawnType = \"ring\";\n\t\t\tthis._spawnFunc = this._spawnRing;\n\t\t\tspawnCircle = config.spawnCircle;\n\t\t\tthis.spawnCircle = new PIXI.Circle(spawnCircle.x, spawnCircle.y, spawnCircle.r);\n\t\t\tthis.spawnCircle.minRadius = spawnCircle.minR;\n\t\t\tbreak;\n\t\tcase \"burst\":\n\t\t\tthis.spawnType = \"burst\";\n\t\t\tthis._spawnFunc = this._spawnBurst;\n\t\t\tthis.particlesPerWave = config.particlesPerWave;\n\t\t\tthis.particleSpacing = config.particleSpacing;\n\t\t\tthis.angleStart = config.angleStart ? config.angleStart : 0;\n\t\t\tbreak;\n\t\tcase \"point\":\n\t\t\tthis.spawnType = \"point\";\n\t\t\tthis._spawnFunc = this._spawnPoint;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthis.spawnType = \"point\";\n\t\t\tthis._spawnFunc = this._spawnPoint;\n\t\t\tbreak;\n\t}\n\t//set the spawning frequency\n\tthis.frequency = config.frequency;\n\t//set the emitter lifetime\n\tthis.emitterLifetime = config.emitterLifetime || -1;\n\t//set the max particles\n\tthis.maxParticles = config.maxParticles > 0 ? config.maxParticles : 1000;\n\t//determine if we should add the particle at the back of the list or not\n\tthis.addAtBack = !!config.addAtBack;\n\t//reset the emitter position and rotation variables\n\tthis.rotation = 0;\n\tthis.ownerPos = new PIXI.Point();\n\tthis.spawnPos = new PIXI.Point(config.pos.x, config.pos.y);\n\tthis._prevEmitterPos = this.spawnPos.clone();\n\t//previous emitter position is invalid and should not be used for interpolation\n\tthis._prevPosIsValid = false;\n\t//start emitting\n\tthis._spawnTimer = 0;\n\tthis.emit = config.emit === undefined ? true : !!config.emit;\n\tthis.autoUpdate = config.autoUpdate === undefined ? false : !!config.autoUpdate;\n};\n\n/**\n * Recycles an individual particle.\n * @method PIXI.particles.Emitter#recycle\n * @param {Particle} particle The particle to recycle.\n * @private\n */\np.recycle = function(particle)\n{\n\tif(particle.next)\n\t\tparticle.next.prev = particle.prev;\n\tif(particle.prev)\n\t\tparticle.prev.next = particle.next;\n\tif(particle == this._activeParticlesLast)\n\t\tthis._activeParticlesLast = particle.prev;\n\tif(particle == this._activeParticlesFirst)\n\t\tthis._activeParticlesFirst = particle.next;\n\t//add to pool\n\tparticle.prev = null;\n\tparticle.next = this._poolFirst;\n\tthis._poolFirst = particle;\n\t//remove child from display, or make it invisible if it is in a ParticleContainer\n\tif(this._parentIsPC)\n\t{\n\t\tparticle.alpha = 0;\n\t\tparticle.visible = false;\n\t}\n\telse\n\t{\n\t\tif(particle.parent)\n\t\t\tparticle.parent.removeChild(particle);\n\t}\n\t//decrease count\n\t--this.particleCount;\n};\n\n/**\n * Sets the rotation of the emitter to a new value.\n * @method PIXI.particles.Emitter#rotate\n * @param {Number} newRot The new rotation, in degrees.\n */\np.rotate = function(newRot)\n{\n\tif (this.rotation == newRot) return;\n\t//caclulate the difference in rotation for rotating spawnPos\n\tvar diff = newRot - this.rotation;\n\tthis.rotation = newRot;\n\t//rotate spawnPos\n\tParticleUtils.rotatePoint(diff, this.spawnPos);\n\t//mark the position as having changed\n\tthis._posChanged = true;\n};\n\n/**\n * Changes the spawn position of the emitter.\n * @method PIXI.particles.Emitter#updateSpawnPos\n * @param {Number} x The new x value of the spawn position for the emitter.\n * @param {Number} y The new y value of the spawn position for the emitter.\n */\np.updateSpawnPos = function(x, y)\n{\n\tthis._posChanged = true;\n\tthis.spawnPos.x = x;\n\tthis.spawnPos.y = y;\n};\n\n/**\n * Changes the position of the emitter's owner. You should call this if you are adding\n * particles to the world display object that your emitter's owner is moving around in.\n * @method PIXI.particles.Emitter#updateOwnerPos\n * @param {Number} x The new x value of the emitter's owner.\n * @param {Number} y The new y value of the emitter's owner.\n */\np.updateOwnerPos = function(x, y)\n{\n\tthis._posChanged = true;\n\tthis.ownerPos.x = x;\n\tthis.ownerPos.y = y;\n};\n\n/**\n * Prevents emitter position interpolation in the next update.\n * This should be used if you made a major position change of your emitter's owner\n * that was not normal movement.\n * @method PIXI.particles.Emitter#resetPositionTracking\n */\np.resetPositionTracking = function()\n{\n\tthis._prevPosIsValid = false;\n};\n\n/**\n * If particles should be emitted during update() calls. Setting this to false\n * stops new particles from being created, but allows existing ones to die out.\n * @member {Boolean} PIXI.particles.Emitter#emit\n */\nObject.defineProperty(p, \"emit\",\n{\n\tget: function() { return this._emit; },\n\tset: function(value)\n\t{\n\t\tthis._emit = !!value;\n\t\tthis._emitterLife = this.emitterLifetime;\n\t}\n});\n\n/**\n * If the update function is called automatically from the shared ticker.\n * Setting this to false requires calling the update function manually.\n * @member {Boolean} PIXI.particles.Emitter#autoUpdate\n */\nObject.defineProperty(p, \"autoUpdate\",\n{\n\tget: function() { return this._autoUpdate; },\n\tset: function(value)\n\t{\n\t\tif (this._autoUpdate && !value)\n\t\t{\n\t\t\tticker.remove(this.update, this);\n\t\t}\n\t\telse if (!this._autoUpdate && value)\n\t\t{\n\t\t\tticker.add(this.update, this);\n\t\t}\n\t\tthis._autoUpdate = !!value;\n\t}\n});\n\n/**\n * Updates all particles spawned by this emitter and emits new ones.\n * @method PIXI.particles.Emitter#update\n * @param {Number} delta Time elapsed since the previous frame, in __seconds__.\n */\np.update = function(delta)\n{\n\tif (this._autoUpdate)\n\t{\n\t\tdelta = delta / PIXI.settings.TARGET_FPMS / 1000;\n\t}\n\n\t//if we don't have a parent to add particles to, then don't do anything.\n\t//this also works as a isDestroyed check\n\tif (!this._parent) return;\n\t//update existing particles\n\tvar i, particle, next;\n\tfor (particle = this._activeParticlesFirst; particle; particle = next)\n\t{\n\t\tnext = particle.next;\n\t\tparticle.update(delta);\n\t}\n\tvar prevX, prevY;\n\t//if the previous position is valid, store these for later interpolation\n\tif(this._prevPosIsValid)\n\t{\n\t\tprevX = this._prevEmitterPos.x;\n\t\tprevY = this._prevEmitterPos.y;\n\t}\n\t//store current position of the emitter as local variables\n\tvar curX = this.ownerPos.x + this.spawnPos.x;\n\tvar curY = this.ownerPos.y + this.spawnPos.y;\n\t//spawn new particles\n\tif (this.emit)\n\t{\n\t\t//decrease spawn timer\n\t\tthis._spawnTimer -= delta;\n\t\t//while _spawnTimer < 0, we have particles to spawn\n\t\twhile(this._spawnTimer <= 0)\n\t\t{\n\t\t\t//determine if the emitter should stop spawning\n\t\t\tif(this._emitterLife > 0)\n\t\t\t{\n\t\t\t\tthis._emitterLife -= this._frequency;\n\t\t\t\tif(this._emitterLife <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis._spawnTimer = 0;\n\t\t\t\t\tthis._emitterLife = 0;\n\t\t\t\t\tthis.emit = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//determine if we have hit the particle limit\n\t\t\tif(this.particleCount >= this.maxParticles)\n\t\t\t{\n\t\t\t\tthis._spawnTimer += this._frequency;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//determine the particle lifetime\n\t\t\tvar lifetime;\n\t\t\tif (this.minLifetime == this.maxLifetime)\n\t\t\t\tlifetime = this.minLifetime;\n\t\t\telse\n\t\t\t\tlifetime = Math.random() * (this.maxLifetime - this.minLifetime) + this.minLifetime;\n\t\t\t//only make the particle if it wouldn't immediately destroy itself\n\t\t\tif(-this._spawnTimer < lifetime)\n\t\t\t{\n\t\t\t\t//If the position has changed and this isn't the first spawn,\n\t\t\t\t//interpolate the spawn position\n\t\t\t\tvar emitPosX, emitPosY;\n\t\t\t\tif (this._prevPosIsValid && this._posChanged)\n\t\t\t\t{\n\t\t\t\t\t//1 - _spawnTimer / delta, but _spawnTimer is negative\n\t\t\t\t\tvar lerp = 1 + this._spawnTimer / delta;\n\t\t\t\t\temitPosX = (curX - prevX) * lerp + prevX;\n\t\t\t\t\temitPosY = (curY - prevY) * lerp + prevY;\n\t\t\t\t}\n\t\t\t\telse//otherwise just set to the spawn position\n\t\t\t\t{\n\t\t\t\t\temitPosX = curX;\n\t\t\t\t\temitPosY = curY;\n\t\t\t\t}\n\t\t\t\t//create enough particles to fill the wave (non-burst types have a wave of 1)\n\t\t\t\ti = 0;\n\t\t\t\tfor(var len = Math.min(this.particlesPerWave, this.maxParticles - this.particleCount); i < len; ++i)\n\t\t\t\t{\n\t\t\t\t\t//create particle\n\t\t\t\t\tvar p, rand;\n\t\t\t\t\tif(this._poolFirst)\n\t\t\t\t\t{\n\t\t\t\t\t\tp = this._poolFirst;\n\t\t\t\t\t\tthis._poolFirst = this._poolFirst.next;\n\t\t\t\t\t\tp.next = null;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tp = new this.particleConstructor(this);\n\t\t\t\t\t}\n\n\t\t\t\t\t//set a random texture if we have more than one\n\t\t\t\t\tif(this.particleImages.length > 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tp.applyArt(this.particleImages.random());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//if they are actually the same texture, a standard particle\n\t\t\t\t\t\t//will quit early from the texture setting in setTexture().\n\t\t\t\t\t\tp.applyArt(this.particleImages[0]);\n\t\t\t\t\t}\n\t\t\t\t\t//set up the start and end values\n\t\t\t\t\tp.startAlpha = this.startAlpha;\n\t\t\t\t\tp.endAlpha = this.endAlpha;\n\t\t\t\t\tif(this.minimumSpeedMultiplier != 1)\n\t\t\t\t\t{\n\t\t\t\t\t\trand = Math.random() * (1 - this.minimumSpeedMultiplier) + this.minimumSpeedMultiplier;\n\t\t\t\t\t\tp.startSpeed = this.startSpeed * rand;\n\t\t\t\t\t\tp.endSpeed = this.endSpeed * rand;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tp.startSpeed = this.startSpeed;\n\t\t\t\t\t\tp.endSpeed = this.endSpeed;\n\t\t\t\t\t}\n\t\t\t\t\tp.acceleration.x = this.acceleration.x;\n\t\t\t\t\tp.acceleration.y = this.acceleration.y;\n\t\t\t\t\tp.maxSpeed = this.maxSpeed;\n\t\t\t\t\tif(this.minimumScaleMultiplier != 1)\n\t\t\t\t\t{\n\t\t\t\t\t\trand = Math.random() * (1 - this.minimumScaleMultiplier) + this.minimumScaleMultiplier;\n\t\t\t\t\t\tp.startScale = this.startScale * rand;\n\t\t\t\t\t\tp.endScale = this.endScale * rand;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tp.startScale = this.startScale;\n\t\t\t\t\t\tp.endScale = this.endScale;\n\t\t\t\t\t}\n\t\t\t\t\tp.startColor = this.startColor;\n\t\t\t\t\tp.endColor = this.endColor;\n\t\t\t\t\t//randomize the rotation speed\n\t\t\t\t\tif(this.minRotationSpeed == this.maxRotationSpeed)\n\t\t\t\t\t\tp.rotationSpeed = this.minRotationSpeed;\n\t\t\t\t\telse\n\t\t\t\t\t\tp.rotationSpeed = Math.random() * (this.maxRotationSpeed - this.minRotationSpeed) + this.minRotationSpeed;\n\t\t\t\t\tp.noRotation = this.noRotation;\n\t\t\t\t\t//set up the lifetime\n\t\t\t\t\tp.maxLife = lifetime;\n\t\t\t\t\t//set the blend mode\n\t\t\t\t\tp.blendMode = this.particleBlendMode;\n\t\t\t\t\t//set the custom ease, if any\n\t\t\t\t\tp.ease = this.customEase;\n\t\t\t\t\t//set the extra data, if any\n\t\t\t\t\tp.extraData = this.extraData;\n\t\t\t\t\t//call the proper function to handle rotation and position of particle\n\t\t\t\t\tthis._spawnFunc(p, emitPosX, emitPosY, i);\n\t\t\t\t\t//initialize particle\n\t\t\t\t\tp.init();\n\t\t\t\t\t//update the particle by the time passed, so the particles are spread out properly\n\t\t\t\t\tp.update(-this._spawnTimer);//we want a positive delta, because a negative delta messes things up\n\t\t\t\t\t//add the particle to the display list\n\t\t\t\t\tif(!this._parentIsPC || !p.parent)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (this.addAtBack)\n\t\t\t\t\t\t\tthis._parent.addChildAt(p, 0);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthis._parent.addChild(p);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//kind of hacky, but performance friendly\n\t\t\t\t\t\t//shuffle children to correct place\n\t\t\t\t\t\tvar children = this._parent.children;\n\t\t\t\t\t\t//avoid using splice if possible\n\t\t\t\t\t\tif(children[0] == p)\n\t\t\t\t\t\t\tchildren.shift();\n\t\t\t\t\t\telse if(children[children.length-1] == p)\n\t\t\t\t\t\t\tchildren.pop();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar index = children.indexOf(p);\n\t\t\t\t\t\t\tchildren.splice(index, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(this.addAtBack)\n\t\t\t\t\t\t\tchildren.unshift(p);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tchildren.push(p);\n\t\t\t\t\t}\n\t\t\t\t\t//add particle to list of active particles\n\t\t\t\t\tif(this._activeParticlesLast)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis._activeParticlesLast.next = p;\n\t\t\t\t\t\tp.prev = this._activeParticlesLast;\n\t\t\t\t\t\tthis._activeParticlesLast = p;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tthis._activeParticlesLast = this._activeParticlesFirst = p;\n\t\t\t\t\t}\n\t\t\t\t\t++this.particleCount;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//increase timer and continue on to any other particles that need to be created\n\t\t\tthis._spawnTimer += this._frequency;\n\t\t}\n\t}\n\t//if the position changed before this update, then keep track of that\n\tif(this._posChanged)\n\t{\n\t\tthis._prevEmitterPos.x = curX;\n\t\tthis._prevEmitterPos.y = curY;\n\t\tthis._prevPosIsValid = true;\n\t\tthis._posChanged = false;\n\t}\n};\n\n/**\n * Positions a particle for a point type emitter.\n * @method PIXI.particles.Emitter#_spawnPoint\n * @private\n * @param {Particle} p The particle to position and rotate.\n * @param {Number} emitPosX The emitter's x position\n * @param {Number} emitPosY The emitter's y position\n * @param {int} i The particle number in the current wave. Not used for this function.\n */\np._spawnPoint = function(p, emitPosX, emitPosY)\n{\n\t//set the initial rotation/direction of the particle based on\n\t//starting particle angle and rotation of emitter\n\tif (this.minStartRotation == this.maxStartRotation)\n\t\tp.rotation = this.minStartRotation + this.rotation;\n\telse\n\t\tp.rotation = Math.random() * (this.maxStartRotation - this.minStartRotation) + this.minStartRotation + this.rotation;\n\t//drop the particle at the emitter's position\n\tp.position.x = emitPosX;\n\tp.position.y = emitPosY;\n};\n\n/**\n * Positions a particle for a rectangle type emitter.\n * @method PIXI.particles.Emitter#_spawnRect\n * @private\n * @param {Particle} p The particle to position and rotate.\n * @param {Number} emitPosX The emitter's x position\n * @param {Number} emitPosY The emitter's y position\n * @param {int} i The particle number in the current wave. Not used for this function.\n */\np._spawnRect = function(p, emitPosX, emitPosY)\n{\n\t//set the initial rotation/direction of the particle based on starting\n\t//particle angle and rotation of emitter\n\tif (this.minStartRotation == this.maxStartRotation)\n\t\tp.rotation = this.minStartRotation + this.rotation;\n\telse\n\t\tp.rotation = Math.random() * (this.maxStartRotation - this.minStartRotation) + this.minStartRotation + this.rotation;\n\t//place the particle at a random point in the rectangle\n\thelperPoint.x = Math.random() * this.spawnRect.width + this.spawnRect.x;\n\thelperPoint.y = Math.random() * this.spawnRect.height + this.spawnRect.y;\n\tif(this.rotation !== 0)\n\t\tParticleUtils.rotatePoint(this.rotation, helperPoint);\n\tp.position.x = emitPosX + helperPoint.x;\n\tp.position.y = emitPosY + helperPoint.y;\n};\n\n/**\n * Positions a particle for a circle type emitter.\n * @method PIXI.particles.Emitter#_spawnCircle\n * @private\n * @param {Particle} p The particle to position and rotate.\n * @param {Number} emitPosX The emitter's x position\n * @param {Number} emitPosY The emitter's y position\n * @param {int} i The particle number in the current wave. Not used for this function.\n */\np._spawnCircle = function(p, emitPosX, emitPosY)\n{\n\t//set the initial rotation/direction of the particle based on starting\n\t//particle angle and rotation of emitter\n\tif (this.minStartRotation == this.maxStartRotation)\n\t\tp.rotation = this.minStartRotation + this.rotation;\n\telse\n\t\tp.rotation = Math.random() * (this.maxStartRotation - this.minStartRotation) +\n\t\t\t\t\tthis.minStartRotation + this.rotation;\n\t//place the particle at a random radius in the circle\n\thelperPoint.x = Math.random() * this.spawnCircle.radius;\n\thelperPoint.y = 0;\n\t//rotate the point to a random angle in the circle\n\tParticleUtils.rotatePoint(Math.random() * 360, helperPoint);\n\t//offset by the circle's center\n\thelperPoint.x += this.spawnCircle.x;\n\thelperPoint.y += this.spawnCircle.y;\n\t//rotate the point by the emitter's rotation\n\tif(this.rotation !== 0)\n\t\tParticleUtils.rotatePoint(this.rotation, helperPoint);\n\t//set the position, offset by the emitter's position\n\tp.position.x = emitPosX + helperPoint.x;\n\tp.position.y = emitPosY + helperPoint.y;\n};\n\n/**\n * Positions a particle for a ring type emitter.\n * @method PIXI.particles.Emitter#_spawnRing\n * @private\n * @param {Particle} p The particle to position and rotate.\n * @param {Number} emitPosX The emitter's x position\n * @param {Number} emitPosY The emitter's y position\n * @param {int} i The particle number in the current wave. Not used for this function.\n */\np._spawnRing = function(p, emitPosX, emitPosY)\n{\n\tvar spawnCircle = this.spawnCircle;\n\t//set the initial rotation/direction of the particle based on starting\n\t//particle angle and rotation of emitter\n\tif (this.minStartRotation == this.maxStartRotation)\n\t\tp.rotation = this.minStartRotation + this.rotation;\n\telse\n\t\tp.rotation = Math.random() * (this.maxStartRotation - this.minStartRotation) +\n\t\t\t\t\tthis.minStartRotation + this.rotation;\n\t//place the particle at a random radius in the ring\n\tif(spawnCircle.minRadius == spawnCircle.radius)\n\t{\n\t\thelperPoint.x = Math.random() * (spawnCircle.radius - spawnCircle.minRadius) +\n\t\t\t\t\t\tspawnCircle.minRadius;\n\t}\n\telse\n\t\thelperPoint.x = spawnCircle.radius;\n\thelperPoint.y = 0;\n\t//rotate the point to a random angle in the circle\n\tvar angle = Math.random() * 360;\n\tp.rotation += angle;\n\tParticleUtils.rotatePoint(angle, helperPoint);\n\t//offset by the circle's center\n\thelperPoint.x += this.spawnCircle.x;\n\thelperPoint.y += this.spawnCircle.y;\n\t//rotate the point by the emitter's rotation\n\tif(this.rotation !== 0)\n\t\tParticleUtils.rotatePoint(this.rotation, helperPoint);\n\t//set the position, offset by the emitter's position\n\tp.position.x = emitPosX + helperPoint.x;\n\tp.position.y = emitPosY + helperPoint.y;\n};\n\n/**\n * Positions a particle for a burst type emitter.\n * @method PIXI.particles.Emitter#_spawnBurst\n * @private\n * @param {Particle} p The particle to position and rotate.\n * @param {Number} emitPosX The emitter's x position\n * @param {Number} emitPosY The emitter's y position\n * @param {int} i The particle number in the current wave.\n */\np._spawnBurst = function(p, emitPosX, emitPosY, i)\n{\n\t//set the initial rotation/direction of the particle based on spawn\n\t//angle and rotation of emitter\n\tif(this.particleSpacing === 0)\n\t\tp.rotation = Math.random() * 360;\n\telse\n\t\tp.rotation = this.angleStart + (this.particleSpacing * i) + this.rotation;\n\t//drop the particle at the emitter's position\n\tp.position.x = emitPosX;\n\tp.position.y = emitPosY;\n};\n\n/**\n * Kills all active particles immediately.\n * @method PIXI.particles.Emitter#cleanup\n */\np.cleanup = function()\n{\n\tvar particle, next;\n\tfor (particle = this._activeParticlesFirst; particle; particle = next)\n\t{\n\t\tnext = particle.next;\n\t\tthis.recycle(particle);\n\t\tif(particle.parent)\n\t\t\tparticle.parent.removeChild(particle);\n\t}\n\tthis._activeParticlesFirst = this._activeParticlesLast = null;\n\tthis.particleCount = 0;\n};\n\n/**\n * Destroys the emitter and all of its particles.\n * @method PIXI.particles.Emitter#destroy\n */\np.destroy = function()\n{\n\t//puts all active particles in the pool, and removes them from the particle parent\n\tthis.cleanup();\n\t//wipe the pool clean\n\tvar next;\n\tfor (var particle = this._poolFirst; particle; particle = next)\n\t{\n\t\t//store next value so we don't lose it in our destroy call\n\t\tnext = particle.next;\n\t\tparticle.destroy();\n\t}\n\tthis._poolFirst = this._parent = this.particleImages = this.spawnPos = this.ownerPos =\n\t\tthis.startColor = this.endColor = this.customEase = null;\n};\n\nmodule.exports = Emitter;","var ParticleUtils = require(\"./ParticleUtils\");\nvar Sprite = PIXI.Sprite;\n\n/**\n * An individual particle image. You shouldn't have to deal with these.\n * @memberof PIXI.particles\n * @class Particle\n * @extends PIXI.Sprite\n * @constructor\n * @param {PIXI.particles.Emitter} emitter The emitter that controls this particle.\n */\nvar Particle = function(emitter)\n{\n\t//start off the sprite with a blank texture, since we are going to replace it\n\t//later when the particle is initialized.\n\tSprite.call(this);\n\n\t/**\n\t * The emitter that controls this particle.\n\t * @property {Emitter} emitter\n\t */\n\tthis.emitter = emitter;\n\t//particles should be centered\n\tthis.anchor.x = this.anchor.y = 0.5;\n\t/**\n\t * The velocity of the particle. Speed may change, but the angle also\n\t * contained in velocity is constant.\n\t * @property {PIXI.Point} velocity\n\t */\n\tthis.velocity = new PIXI.Point();\n\t/**\n\t * The maximum lifetime of this particle, in seconds.\n\t * @property {Number} maxLife\n\t */\n\tthis.maxLife = 0;\n\t/**\n\t * The current age of the particle, in seconds.\n\t * @property {Number} age\n\t */\n\tthis.age = 0;\n\t/**\n\t * A simple easing function to be applied to all properties that\n\t * are being interpolated.\n\t * @property {Function} ease\n\t */\n\tthis.ease = null;\n\t/**\n\t * Extra data that the emitter passes along for custom particles.\n\t * @property {Object} extraData\n\t */\n\tthis.extraData = null;\n\t/**\n\t * The alpha of the particle at the start of its life.\n\t * @property {Number} startAlpha\n\t */\n\tthis.startAlpha = 0;\n\t/**\n\t * The alpha of the particle at the end of its life.\n\t * @property {Number} endAlpha\n\t */\n\tthis.endAlpha = 0;\n\t/**\n\t * The speed of the particle at the start of its life.\n\t * @property {Number} startSpeed\n\t */\n\tthis.startSpeed = 0;\n\t/**\n\t * The speed of the particle at the end of its life.\n\t * @property {Number} endSpeed\n\t */\n\tthis.endSpeed = 0;\n\t/**\n\t * Acceleration to apply to the particle.\n\t * @property {PIXI.Point} accleration\n\t */\n\tthis.acceleration = new PIXI.Point();\n\t/**\n\t * The maximum speed allowed for accelerating particles. Negative values, values of 0 or NaN\n\t * will disable the maximum speed.\n\t * @property {Number} maxSpeed\n\t * @default NaN\n\t */\n\tthis.maxSpeed = NaN;\n\t/**\n\t * The scale of the particle at the start of its life.\n\t * @property {Number} startScale\n\t */\n\tthis.startScale = 0;\n\t/**\n\t * The scale of the particle at the start of its life.\n\t * @property {Number} endScale\n\t */\n\tthis.endScale = 0;\n\t/**\n\t * The tint of the particle at the start of its life.\n\t * @property {Array} startColor\n\t */\n\tthis.startColor = null;\n\t/**\n\t * The red tint of the particle at the start of its life.\n\t * This is pulled from startColor in init().\n\t * @property {uint} _sR\n\t * @private\n\t */\n\tthis._sR = 0;\n\t/**\n\t * The green tint of the particle at the start of its life.\n\t * This is pulled from startColor in init().\n\t * @property {uint} _sG\n\t * @private\n\t */\n\tthis._sG = 0;\n\t/**\n\t * The blue tint of the particle at the start of its life.\n\t * This is pulled from startColor in init().\n\t * @property {uint} _sB\n\t * @private\n\t */\n\tthis._sB = 0;\n\t/**\n\t * The tint of the particle at the start of its life.\n\t * @property {Array} endColor\n\t */\n\tthis.endColor = null;\n\t/**\n\t * The red tint of the particle at the end of its life.\n\t * This is pulled from endColor in init().\n\t * @property {uint} _eR\n\t * @private\n\t */\n\tthis._eR = 0;\n\t/**\n\t * The green tint of the particle at the end of its life.\n\t * This is pulled from endColor in init().\n\t * @property {uint} _sG\n\t * @private\n\t */\n\tthis._eG = 0;\n\t/**\n\t * The blue tint of the particle at the end of its life.\n\t * This is pulled from endColor in init().\n\t * @property {uint} _sB\n\t * @private\n\t */\n\tthis._eB = 0;\n\t/**\n\t * If alpha should be interpolated at all.\n\t * @property {Boolean} _doAlpha\n\t * @private\n\t */\n\tthis._doAlpha = false;\n\t/**\n\t * If scale should be interpolated at all.\n\t * @property {Boolean} _doScale\n\t * @private\n\t */\n\tthis._doScale = false;\n\t/**\n\t * If speed should be interpolated at all.\n\t * @property {Boolean} _doSpeed\n\t * @private\n\t */\n\tthis._doSpeed = false;\n\t/**\n\t * If acceleration should be handled at all. _doSpeed is mutually exclusive with this,\n\t * and _doSpeed gets priority.\n\t * @property {Boolean} _doAcceleration\n\t * @private\n\t */\n\tthis._doAcceleration = false;\n\t/**\n\t * If color should be interpolated at all.\n\t * @property {Boolean} _doColor\n\t * @private\n\t */\n\tthis._doColor = false;\n\t/**\n\t * If normal movement should be handled. Subclasses wishing to override movement\n\t * can set this to false in init().\n\t * @property {Boolean} _doNormalMovement\n\t * @private\n\t */\n\tthis._doNormalMovement = false;\n\t/**\n\t * One divided by the max life of the particle, saved for slightly faster math.\n\t * @property {Number} _oneOverLife\n\t * @private\n\t */\n\tthis._oneOverLife = 0;\n\n\t/**\n\t * Reference to the next particle in the list.\n\t * @property {Particle} next\n\t * @private\n\t */\n\tthis.next = null;\n\n\t/**\n\t * Reference to the previous particle in the list.\n\t * @property {Particle} prev\n\t * @private\n\t */\n\tthis.prev = null;\n\n\t//save often used functions on the instance instead of the prototype for better speed\n\tthis.init = this.init;\n\tthis.Particle_init = this.Particle_init;\n\tthis.update = this.update;\n\tthis.Particle_update = this.Particle_update;\n\tthis.applyArt = this.applyArt;\n\tthis.kill = this.kill;\n};\n\n// Reference to the prototype\nvar p = Particle.prototype = Object.create(Sprite.prototype);\n\n/**\n * Initializes the particle for use, based on the properties that have to\n * have been set already on the particle.\n * @method PIXI.particles.Particle#init\n */\n/**\n * A reference to init, so that subclasses can access it without the penalty of Function.call()\n * @method PIXI.particles.Particle#Particle_init\n * @protected\n */\np.init = p.Particle_init = function()\n{\n\t//reset the age\n\tthis.age = 0;\n\t//set up the velocity based on the start speed and rotation\n\tthis.velocity.x = this.startSpeed;\n\tthis.velocity.y = 0;\n\tParticleUtils.rotatePoint(this.rotation, this.velocity);\n\tif (this.noRotation)\n\t{\n\t\tthis.rotation = 0;\n\t}\n\telse\n\t{\n\t\t//convert rotation to Radians from Degrees\n\t\tthis.rotation *= ParticleUtils.DEG_TO_RADS;\n\t}\n\t//convert rotation speed to Radians from Degrees\n\tthis.rotationSpeed *= ParticleUtils.DEG_TO_RADS;\n\t//set alpha to inital alpha\n\tthis.alpha = this.startAlpha;\n\t//set scale to initial scale\n\tthis.scale.x = this.scale.y = this.startScale;\n\t//determine start and end color values\n\tif (this.startColor)\n\t{\n\t\tthis._sR = this.startColor[0];\n\t\tthis._sG = this.startColor[1];\n\t\tthis._sB = this.startColor[2];\n\t\tif(this.endColor)\n\t\t{\n\t\t\tthis._eR = this.endColor[0];\n\t\t\tthis._eG = this.endColor[1];\n\t\t\tthis._eB = this.endColor[2];\n\t\t}\n\t}\n\t//figure out what we need to interpolate\n\tthis._doAlpha = this.startAlpha != this.endAlpha;\n\tthis._doSpeed = this.startSpeed != this.endSpeed;\n\tthis._doScale = this.startScale != this.endScale;\n\tthis._doColor = !!this.endColor;\n\tthis._doAcceleration = this.acceleration.x !== 0 || this.acceleration.y !== 0;\n\t//_doNormalMovement can be cancelled by subclasses\n\tthis._doNormalMovement = this._doSpeed || this.startSpeed !== 0 || this._doAcceleration;\n\t//save our lerp helper\n\tthis._oneOverLife = 1 / this.maxLife;\n\t//set the inital color\n\tthis.tint = ParticleUtils.combineRGBComponents(this._sR, this._sG, this._sB);\n\t//ensure visibility\n\tthis.visible = true;\n};\n\n/**\n * Sets the texture for the particle. This can be overridden to allow\n * for an animated particle.\n * @method PIXI.particles.Particle#applyArt\n * @param {PIXI.Texture} art The texture to set.\n */\np.applyArt = function(art)\n{\n\tthis.texture = art || ParticleUtils.EMPTY_TEXTURE;\n};\n\n/**\n * Updates the particle.\n * @method PIXI.particles.Particle#update\n * @param {Number} delta Time elapsed since the previous frame, in __seconds__.\n * @return {Number} The standard interpolation multiplier (0-1) used for all relevant particle\n * properties. A value of -1 means the particle died of old age instead.\n */\n/**\n * A reference to update so that subclasses can access the original without the overhead\n * of Function.call().\n * @method PIXI.particles.Particle#Particle_update\n * @param {Number} delta Time elapsed since the previous frame, in __seconds__.\n * @return {Number} The standard interpolation multiplier (0-1) used for all relevant particle\n * properties. A value of -1 means the particle died of old age instead.\n * @protected\n */\np.update = p.Particle_update = function(delta)\n{\n\t//increase age\n\tthis.age += delta;\n\t//recycle particle if it is too old\n\tif(this.age >= this.maxLife)\n\t{\n\t\tthis.kill();\n\t\treturn -1;\n\t}\n\n\t//determine our interpolation value\n\tvar lerp = this.age * this._oneOverLife;//lifetime / maxLife;\n\tif (this.ease)\n\t{\n\t\tif(this.ease.length == 4)\n\t\t{\n\t\t\t//the t, b, c, d parameters that some tween libraries use\n\t\t\t//(time, initial value, end value, duration)\n\t\t\tlerp = this.ease(lerp, 0, 1, 1);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//the simplified version that we like that takes\n\t\t\t//one parameter, time from 0-1. TweenJS eases provide this usage.\n\t\t\tlerp = this.ease(lerp);\n\t\t}\n\t}\n\n\t//interpolate alpha\n\tif (this._doAlpha)\n\t\tthis.alpha = (this.endAlpha - this.startAlpha) * lerp + this.startAlpha;\n\t//interpolate scale\n\tif (this._doScale)\n\t{\n\t\tvar scale = (this.endScale - this.startScale) * lerp + this.startScale;\n\t\tthis.scale.x = this.scale.y = scale;\n\t}\n\t//handle movement\n\tif(this._doNormalMovement)\n\t{\n\t\t//interpolate speed\n\t\tif (this._doSpeed)\n\t\t{\n\t\t\tvar speed = (this.endSpeed - this.startSpeed) * lerp + this.startSpeed;\n\t\t\tParticleUtils.normalize(this.velocity);\n\t\t\tParticleUtils.scaleBy(this.velocity, speed);\n\t\t}\n\t\telse if(this._doAcceleration)\n\t\t{\n\t\t\tthis.velocity.x += this.acceleration.x * delta;\n\t\t\tthis.velocity.y += this.acceleration.y * delta;\n\t\t\tif (this.maxSpeed)\n\t\t\t{\n\t\t\t\tvar currentSpeed = ParticleUtils.length(this.velocity);\n\t\t\t\t//if we are going faster than we should, clamp at the max speed\n\t\t\t\t//DO NOT recalculate vector length\n\t\t\t\tif (currentSpeed > this.maxSpeed)\n\t\t\t\t{\n\t\t\t\t\tParticleUtils.scaleBy(this.velocity, this.maxSpeed / currentSpeed);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//adjust position based on velocity\n\t\tthis.position.x += this.velocity.x * delta;\n\t\tthis.position.y += this.velocity.y * delta;\n\t}\n\t//interpolate color\n\tif (this._doColor)\n\t{\n\t\tvar r = (this._eR - this._sR) * lerp + this._sR;\n\t\tvar g = (this._eG - this._sG) * lerp + this._sG;\n\t\tvar b = (this._eB - this._sB) * lerp + this._sB;\n\t\tthis.tint = ParticleUtils.combineRGBComponents(r, g, b);\n\t}\n\t//update rotation\n\tif(this.rotationSpeed !== 0)\n\t{\n\t\tthis.rotation += this.rotationSpeed * delta;\n\t}\n\telse if(this.acceleration && !this.noRotation)\n\t{\n\t\tthis.rotation = Math.atan2(this.velocity.y, this.velocity.x);// + Math.PI / 2;\n\t}\n\treturn lerp;\n};\n\n/**\n * Kills the particle, removing it from the display list\n * and telling the emitter to recycle it.\n * @method PIXI.particles.Particle#kill\n */\np.kill = function()\n{\n\tthis.emitter.recycle(this);\n};\n\np.Sprite_Destroy = Sprite.prototype.destroy;\n/**\n * Destroys the particle, removing references and preventing future use.\n * @method PIXI.particles.Particle#destroy\n */\np.destroy = function()\n{\n\tif (this.parent)\n\t\tthis.parent.removeChild(this);\n\tif (this.Sprite_Destroy)\n\t\tthis.Sprite_Destroy();\n\tthis.emitter = this.velocity = this.startColor = this.endColor = this.ease =\n\t\tthis.next = this.prev = null;\n};\n\n/**\n * Checks over the art that was passed to the Emitter's init() function, to do any special\n * modifications to prepare it ahead of time.\n * @method PIXI.particles.Particle.parseArt\n * @static\n * @param {Array} art The array of art data. For Particle, it should be an array of Textures.\n * Any strings in the array will be converted to Textures via\n * Texture.fromImage().\n * @return {Array} The art, after any needed modifications.\n */\nParticle.parseArt = function(art)\n{\n\t//convert any strings to Textures.\n\tvar i;\n\tfor(i = art.length; i >= 0; --i)\n\t{\n\t\tif(typeof art[i] == \"string\")\n\t\t\tart[i] = PIXI.Texture.fromImage(art[i]);\n\t}\n\t//particles from different base textures will be slower in WebGL than if they\n\t//were from one spritesheet\n\tif(ParticleUtils.verbose)\n\t{\n\t\tfor(i = art.length - 1; i > 0; --i)\n\t\t{\n\t\t\tif(art[i].baseTexture != art[i - 1].baseTexture)\n\t\t\t{\n\t\t\t\tif (window.console)\n\t\t\t\t\tconsole.warn(\"PixiParticles: using particle textures from different images may hinder performance in WebGL\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn art;\n};\n\n/**\n * Parses extra emitter data to ensure it is set up for this particle class.\n * Particle does nothing to the extra data.\n * @method PIXI.particles.Particle.parseData\n * @static\n * @param {Object} extraData The extra data from the particle config.\n * @return {Object} The parsed extra data.\n */\nParticle.parseData = function(extraData)\n{\n\treturn extraData;\n};\n\nmodule.exports = Particle;","\"use strict\";\n\nvar BLEND_MODES = PIXI.BLEND_MODES || PIXI.blendModes;\nvar Texture = PIXI.Texture;\n\n/**\n * Contains helper functions for particles and emitters to use.\n * @memberof PIXI.particles\n * @class ParticleUtils\n * @static\n */\nvar ParticleUtils = {};\n\n/**\n * If errors and warnings should be logged within the library.\n * @name PIXI.particles.ParticleUtils.verbose\n * @default false\n * @static\n */\nParticleUtils.verbose = false;\n\nvar DEG_TO_RADS = ParticleUtils.DEG_TO_RADS = Math.PI / 180;\n\nvar empty = ParticleUtils.EMPTY_TEXTURE = Texture.EMPTY;\n//prevent any events from being used on the empty texture, as well as destruction of it\n//v4 of Pixi does this, but doing it again won't hurt\nempty.on = empty.destroy = empty.once = empty.emit = function() {};\n\n/**\n * Rotates a point by a given angle.\n * @method PIXI.particles.ParticleUtils.rotatePoint\n * @param {Number} angle The angle to rotate by in degrees\n * @param {PIXI.Point} p The point to rotate around 0,0.\n * @static\n */\nParticleUtils.rotatePoint = function(angle, p)\n{\n\tif(!angle) return;\n\tangle *= DEG_TO_RADS;\n\tvar s = Math.sin(angle);\n\tvar c = Math.cos(angle);\n\tvar xnew = p.x * c - p.y * s;\n\tvar ynew = p.x * s + p.y * c;\n\tp.x = xnew;\n\tp.y = ynew;\n};\n\n/**\n * Combines separate color components (0-255) into a single uint color.\n * @method PIXI.particles.ParticleUtils.combineRGBComponents\n * @param {uint} r The red value of the color\n * @param {uint} g The green value of the color\n * @param {uint} b The blue value of the color\n * @return {uint} The color in the form of 0xRRGGBB\n * @static\n */\nParticleUtils.combineRGBComponents = function(r, g, b/*, a*/)\n{\n\treturn /*a << 24 |*/ r << 16 | g << 8 | b;\n};\n\n/**\n * Reduces the point to a length of 1.\n * @method PIXI.particles.ParticleUtils.normalize\n * @static\n * @param {PIXI.Point} point The point to normalize\n */\nParticleUtils.normalize = function(point)\n{\n\tvar oneOverLen = 1 / ParticleUtils.length(point);\n\tpoint.x *= oneOverLen;\n\tpoint.y *= oneOverLen;\n};\n\n/**\n * Multiplies the x and y values of this point by a value.\n * @method PIXI.particles.ParticleUtils.scaleBy\n * @static\n * @param {PIXI.Point} point The point to scaleBy\n * @param value {Number} The value to scale by.\n */\nParticleUtils.scaleBy = function(point, value)\n{\n\tpoint.x *= value;\n\tpoint.y *= value;\n};\n\n/**\n * Returns the length (or magnitude) of this point.\n * @method PIXI.particles.ParticleUtils.length\n * @static\n * @param {PIXI.Point} point The point to measure length\n * @return The length of this point.\n */\nParticleUtils.length = function(point)\n{\n\treturn Math.sqrt(point.x * point.x + point.y * point.y);\n};\n\n/**\n * Converts a hex string from \"#AARRGGBB\", \"#RRGGBB\", \"0xAARRGGBB\", \"0xRRGGBB\",\n * \"AARRGGBB\", or \"RRGGBB\" to an array of ints of 0-255 or Numbers from 0-1, as\n * [r, g, b, (a)].\n * @method PIXI.particles.ParticleUtils.hexToRGB\n * @param {String} color The input color string.\n * @param {Array} output An array to put the output in. If omitted, a new array is created.\n * @return The array of numeric color values.\n * @static\n */\nParticleUtils.hexToRGB = function(color, output)\n{\n\tif (output)\n\t\toutput.length = 0;\n\telse\n\t\toutput = [];\n\tif (color.charAt(0) == \"#\")\n\t\tcolor = color.substr(1);\n\telse if (color.indexOf(\"0x\") === 0)\n\t\tcolor = color.substr(2);\n\tvar alpha;\n\tif (color.length == 8)\n\t{\n\t\talpha = color.substr(0, 2);\n\t\tcolor = color.substr(2);\n\t}\n\toutput.push(parseInt(color.substr(0, 2), 16));//Red\n\toutput.push(parseInt(color.substr(2, 2), 16));//Green\n\toutput.push(parseInt(color.substr(4, 2), 16));//Blue\n\tif (alpha)\n\t\toutput.push(parseInt(alpha, 16));\n\treturn output;\n};\n\n/**\n * Generates a custom ease function, based on the GreenSock custom ease, as demonstrated\n * by the related tool at http://www.greensock.com/customease/.\n * @method PIXI.particles.ParticleUtils.generateEase\n * @param {Array} segments An array of segments, as created by\n * http://www.greensock.com/customease/.\n * @return {Function} A function that calculates the percentage of change at\n * a given point in time (0-1 inclusive).\n * @static\n */\nParticleUtils.generateEase = function(segments)\n{\n\tvar qty = segments.length;\n\tvar oneOverQty = 1 / qty;\n\t/*\n\t * Calculates the percentage of change at a given point in time (0-1 inclusive).\n\t * @param {Number} time The time of the ease, 0-1 inclusive.\n\t * @return {Number} The percentage of the change, 0-1 inclusive (unless your\n\t * ease goes outside those bounds).\n\t */\n\tvar simpleEase = function(time)\n\t{\n\t\tvar t, s;\n\t\tvar i = (qty * time) | 0;//do a quick floor operation\n\t\tt = (time - (i * oneOverQty)) * qty;\n\t\ts = segments[i] || segments[qty - 1];\n\t\treturn (s.s + t * (2 * (1 - t) * (s.cp - s.s) + t * (s.e - s.s)));\n\t};\n\treturn simpleEase;\n};\n\n/**\n * Gets a blend mode, ensuring that it is valid.\n * @method PIXI.particles.ParticleUtils.getBlendMode\n * @param {String} name The name of the blend mode to get.\n * @return {int} The blend mode as specified in the PIXI.blendModes enumeration.\n * @static\n */\nParticleUtils.getBlendMode = function(name)\n{\n\tif (!name) return BLEND_MODES.NORMAL;\n\tname = name.toUpperCase();\n\twhile (name.indexOf(\" \") >= 0)\n\t\tname = name.replace(\" \", \"_\");\n\treturn BLEND_MODES[name] || BLEND_MODES.NORMAL;\n};\n\nmodule.exports = ParticleUtils;","\"use strict\";\n\nvar ParticleUtils = require(\"./ParticleUtils\"),\n\tParticle = require(\"./Particle\");\n\n/**\n * An particle that follows a path defined by an algebraic expression, e.g. \"sin(x)\" or\n * \"5x + 3\".\n * To use this class, the particle config must have a \"path\" string in the\n * \"extraData\" parameter. This string should have \"x\" in it to represent movement (from the\n * speed settings of the particle). It may have numbers, parentheses, the four basic\n * operations, and the following Math functions or properties (without the preceding \"Math.\"):\n * \"pow\", \"sqrt\", \"abs\", \"floor\", \"round\", \"ceil\", \"E\", \"PI\", \"sin\", \"cos\", \"tan\", \"asin\",\n * \"acos\", \"atan\", \"atan2\", \"log\".\n * The overall movement of the particle and the expression value become x and y positions for\n * the particle, respectively. The final position is rotated by the spawn rotation/angle of\n * the particle.\n *\n * Some example paths:\n *\n * \t\"sin(x/10) * 20\" // A sine wave path.\n * \t\"cos(x/100) * 30\" // Particles curve counterclockwise (for medium speed/low lifetime particles)\n * \t\"pow(x/10, 2) / 2\" // Particles curve clockwise (remember, +y is down).\n *\n * @memberof PIXI.particles\n * @class PathParticle\n * @extends PIXI.particles.Particle\n * @constructor\n * @param {PIXI.particles.Emitter} emitter The emitter that controls this PathParticle.\n */\nvar PathParticle = function(emitter)\n{\n\tParticle.call(this, emitter);\n\t/**\n\t * The function representing the path the particle should take.\n\t * @property {Function} path\n\t */\n\tthis.path = null;\n\t/**\n\t * The initial rotation in degrees of the particle, because the direction of the path\n\t * is based on that.\n\t * @property {Number} initialRotation\n\t */\n\tthis.initialRotation = 0;\n\t/**\n\t * The initial position of the particle, as all path movement is added to that.\n\t * @property {PIXI.Point} initialPosition\n\t */\n\tthis.initialPosition = new PIXI.Point();\n\t/**\n\t * Total single directional movement, due to speed.\n\t * @property {Number} movement\n\t */\n\tthis.movement = 0;\n};\n\n// Reference to the super class\nvar s = Particle.prototype;\n// Reference to the prototype\nvar p = PathParticle.prototype = Object.create(s);\n\n/**\n * A helper point for math things.\n * @property {Function} helperPoint\n * @private\n * @static\n */\nvar helperPoint = new PIXI.Point();\n\n/**\n * Initializes the particle for use, based on the properties that have to\n * have been set already on the particle.\n * @method PIXI.particles.PathParticle#init\n */\np.init = function()\n{\n\t//get initial rotation before it is converted to radians\n\tthis.initialRotation = this.rotation;\n\t//standard init\n\tthis.Particle_init();\n\n\t//set the path for the particle\n\tthis.path = this.extraData.path;\n\t//cancel the normal movement behavior\n\tthis._doNormalMovement = !this.path;\n\t//reset movement\n\tthis.movement = 0;\n\t//grab position\n\tthis.initialPosition.x = this.position.x;\n\tthis.initialPosition.y = this.position.y;\n};\n\n//a hand picked list of Math functions (and a couple properties) that are allowable.\n//they should be used without the preceding \"Math.\"\nvar MATH_FUNCS =\n[\n\t\"pow\",\n\t\"sqrt\",\n\t\"abs\",\n\t\"floor\",\n\t\"round\",\n\t\"ceil\",\n\t\"E\",\n\t\"PI\",\n\t\"sin\",\n\t\"cos\",\n\t\"tan\",\n\t\"asin\",\n\t\"acos\",\n\t\"atan\",\n\t\"atan2\",\n\t\"log\"\n];\n//Allow the 4 basic operations, parentheses and all numbers/decimals, as well\n//as 'x', for the variable usage.\nvar WHITELISTER = \"[01234567890\\\\.\\\\*\\\\-\\\\+\\\\/\\\\(\\\\)x ,]\";\n//add the math functions to the regex string.\nfor(var index = MATH_FUNCS.length - 1; index >= 0; --index)\n{\n\tWHITELISTER += \"|\" + MATH_FUNCS[index];\n}\n//create an actual regular expression object from the string\nWHITELISTER = new RegExp(WHITELISTER, \"g\");\n\n/**\n * Parses a string into a function for path following.\n * This involves whitelisting the string for safety, inserting \"Math.\" to math function\n * names, and using eval() to generate a function.\n * @method PIXI.particles.PathParticle~parsePath\n * @private\n * @static\n * @param {String} pathString The string to parse.\n * @return {Function} The path function - takes x, outputs y.\n */\nvar parsePath = function(pathString)\n{\n\tvar rtn;\n\tvar matches = pathString.match(WHITELISTER);\n\tfor(var i = matches.length - 1; i >= 0; --i)\n\t{\n\t\tif(MATH_FUNCS.indexOf(matches[i]) >= 0)\n\t\t\tmatches[i] = \"Math.\" + matches[i];\n\t}\n\tpathString = matches.join(\"\");\n\teval(\"rtn = function(x){ return \" + pathString + \"; };\");// jshint ignore:line\n\treturn rtn;\n};\n\n/**\n * Updates the particle.\n * @method PIXI.particles.PathParticle#update\n * @param {Number} delta Time elapsed since the previous frame, in __seconds__.\n */\np.update = function(delta)\n{\n\tvar lerp = this.Particle_update(delta);\n\t//if the particle died during the update, then don't bother\n\tif(lerp >= 0 && this.path)\n\t{\n\t\t//increase linear movement based on speed\n\t\tvar speed = (this.endSpeed - this.startSpeed) * lerp + this.startSpeed;\n\t\tthis.movement += speed * delta;\n\t\t//set up the helper point for rotation\n\t\thelperPoint.x = this.movement;\n\t\thelperPoint.y = this.path(this.movement);\n\t\tParticleUtils.rotatePoint(this.initialRotation, helperPoint);\n\t\tthis.position.x = this.initialPosition.x + helperPoint.x;\n\t\tthis.position.y = this.initialPosition.y + helperPoint.y;\n\t}\n};\n\np.Particle_destroy = Particle.prototype.destroy;\n/**\n * Destroys the particle, removing references and preventing future use.\n * @method PIXI.particles.PathParticle#destroy\n */\np.destroy = function()\n{\n\tthis.Particle_destroy();\n\tthis.path = this.initialPosition = null;\n};\n\n/**\n * Checks over the art that was passed to the Emitter's init() function, to do any special\n * modifications to prepare it ahead of time. This just runs Particle.parseArt().\n * @method PIXI.particles.PathParticle.parseArt\n * @static\n * @param {Array} art The array of art data. For Particle, it should be an array of Textures.\n * Any strings in the array will be converted to Textures via\n * Texture.fromImage().\n * @return {Array} The art, after any needed modifications.\n */\nPathParticle.parseArt = function(art)\n{\n\treturn Particle.parseArt(art);\n};\n\n/**\n * Parses extra emitter data to ensure it is set up for this particle class.\n * PathParticle checks for the existence of path data, and parses the path data for use\n * by particle instances.\n * @method PIXI.particles.PathParticle.parseData\n * @static\n * @param {Object} extraData The extra data from the particle config.\n * @return {Object} The parsed extra data.\n */\nPathParticle.parseData = function(extraData)\n{\n\tvar output = {};\n\tif(extraData && extraData.path)\n\t{\n\t\ttry\n\t\t{\n\t\t\toutput.path = parsePath(extraData.path);\n\t\t}\n\t\tcatch(e)\n\t\t{\n\t\t\tif(ParticleUtils.verbose)\n\t\t\t\tconsole.error(\"PathParticle: error in parsing path expression\");\n\t\t\toutput.path = null;\n\t\t}\n\t}\n\telse\n\t{\n\t\tif(ParticleUtils.verbose)\n\t\t\tconsole.error(\"PathParticle requires a path string in extraData!\");\n\t\toutput.path = null;\n\t}\n\treturn output;\n};\n\nmodule.exports = PathParticle;","require(\"./polyfills.js\");\nexports.ParticleUtils = require(\"./ParticleUtils.js\");\nexports.Particle = require(\"./Particle.js\");\nexports.Emitter = require(\"./Emitter.js\");\nexports.PathParticle = require(\"./PathParticle.js\");\nexports.AnimatedParticle = require(\"./AnimatedParticle.js\");\nrequire(\"./deprecation.js\");","/**\n * Add methods to Array\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty\n * @class Array\n */\n\n/**\n * Shuffles the array\n * @method shuffle\n * @return {Array} The array, for chaining calls.\n */\nif(!Array.prototype.shuffle)\n{\n\t// In EcmaScript 5 specs and browsers that support it you can use the Object.defineProperty\n\t// to make it not enumerable set the enumerable property to false\n\tObject.defineProperty(Array.prototype, 'shuffle', {\n\t\tenumerable: false,\n\t\twritable:false,\n\t\tvalue: function() {\n\t\t\tfor(var j, x, i = this.length; i; j = Math.floor(Math.random() * i), x = this[--i], this[i] = this[j], this[j] = x);\n\t\t\treturn this;\n\t\t}\n\t});\n}\n\n/**\n * Get a random item from an array\n * @method random\n * @return {*} The random item\n */\nif(!Array.prototype.random)\n{\n\tObject.defineProperty(Array.prototype, 'random', {\n\t\tenumerable: false,\n\t\twritable: false,\n\t\tvalue: function() {\n\t\t\treturn this[Math.floor(Math.random() * this.length)];\n\t\t}\n\t});\n}","\"use strict\";\n\n// Check for window, fallback to global\nvar global = typeof window !== 'undefined' ? window : GLOBAL;\n\n//ensure that the particles namespace exist - PIXI 4 creates it itself, PIXI 3 does not\nif (!global.PIXI.particles) {\n\tglobal.PIXI.particles = {};\n}\n\n// Export for Node-compatible environments like Electron\nif (typeof module !== 'undefined' && module.exports)\n{\n\t// Attempt to require the pixi module\n\tif (typeof PIXI === 'undefined')\n\t{\n\t\t// Include the Pixi.js module\n\t\trequire('pixi.js');\n\t}\n\n\t// Export the module\n\tmodule.exports = global.PIXI.particles || particles;\n}\n// If we're in the browser make sure PIXI is available\nelse if (typeof PIXI === 'undefined')\n{\n\tthrow \"pixi-particles requires pixi.js to be loaded first\";\n}\n\n// get the library itself\nvar particles = require('./particles');\n\n// insert the lirbary into the particles namespace on PIXI\nfor (var prop in particles) {\n\tglobal.PIXI.particles[prop] = particles[prop];\n}"],"sourceRoot":"."} \ No newline at end of file +{"version":3,"sources":["node_modules/browser-pack/_prelude.js","src/AnimatedParticle.js","src/Emitter.js","src/Particle.js","src/ParticleUtils.js","src/PathParticle.js","src/particles.js","src/polyfills.js","src"],"names":["f","exports","module","define","amd","g","window","global","self","this","pixiParticles","e","t","n","r","s","o","u","a","require","i","Error","code","l","call","length","1","ParticleUtils","Particle","Texture","PIXI","AnimatedParticle","emitter","textures","duration","framerate","elapsed","loop","prototype","p","Object","create","init","Particle_init","maxLife","applyArt","art","update","delta","Particle_update","frame","texture","EMPTY_TEXTURE","Particle_destroy","destroy","parseArt","data","j","tex","outTextures","output","push","fromImage","dupe","count","ParticleContainer","particles","ticker","shared","Emitter","particleParent","particleImages","config","_particleConstructor","startAlpha","endAlpha","startSpeed","endSpeed","minimumSpeedMultiplier","acceleration","maxSpeed","NaN","startScale","endScale","minimumScaleMultiplier","startColor","endColor","minLifetime","maxLifetime","minStartRotation","maxStartRotation","noRotation","minRotationSpeed","maxRotationSpeed","particleBlendMode","customEase","extraData","_frequency","maxParticles","emitterLifetime","spawnPos","spawnType","_spawnFunc","spawnRect","spawnCircle","particlesPerWave","particleSpacing","angleStart","rotation","ownerPos","_prevEmitterPos","_prevPosIsValid","_posChanged","_parentIsPC","_parent","addAtBack","particleCount","_emit","_spawnTimer","_emitterLife","_activeParticlesFirst","_activeParticlesLast","_poolFirst","_origConfig","_origArt","_autoUpdate","_destroyWhenComplete","parent","recycle","rotate","updateSpawnPos","updateOwnerPos","helperPoint","Point","defineProperty","get","set","value","cleanup","particle","next","removeChild","Array","isArray","slice","partClass","alpha","start","end","speed","x","y","scale","color","hexToRGB","startRotation","min","max","rotationSpeed","lifetime","getBlendMode","blendMode","ease","generateEase","parseData","_spawnRect","Rectangle","w","h","_spawnCircle","Circle","_spawnRing","minRadius","minR","_spawnBurst","_spawnPoint","frequency","pos","clone","emit","undefined","autoUpdate","prev","visible","newRot","diff","rotatePoint","resetPositionTracking","remove","add","playOnceAndDestroy","settings","TARGET_FPMS","prevX","prevY","curX","curY","Math","random","emitPosX","emitPosY","lerp","len","rand","particleConstructor","children","shift","pop","index","indexOf","splice","unshift","addChildAt","addChild","position","width","height","radius","angle","Sprite","anchor","velocity","age","_sR","_sG","_sB","_eR","_eG","_eB","_doAlpha","_doScale","_doSpeed","_doAcceleration","_doColor","_doNormalMovement","_oneOverLife","kill","DEG_TO_RADS","tint","combineRGBComponents","normalize","scaleBy","currentSpeed","b","atan2","Sprite_Destroy","verbose","baseTexture","console","warn","BLEND_MODES","blendModes","PI","empty","EMPTY","on","once","sin","c","cos","xnew","ynew","point","oneOverLen","sqrt","charAt","substr","parseInt","segments","qty","oneOverQty","simpleEase","time","cp","name","NORMAL","toUpperCase","replace","PathParticle","path","initialRotation","initialPosition","movement","MATH_FUNCS","WHITELISTER","RegExp","parsePath","pathString","rtn","matches","match","join","eval","error","shuffle","enumerable","writable","floor","GLOBAL","prop"],"mappings":";;;;;;;CAAA,SAAAA,GAAA,GAAA,gBAAAC,UAAA,mBAAAC,QAAAA,OAAAD,QAAAD,QAAA,IAAA,kBAAAG,SAAAA,OAAAC,IAAAD,UAAAH,OAAA,CAAA,GAAAK,EAAAA,GAAA,mBAAAC,QAAAA,OAAA,mBAAAC,QAAAA,OAAA,mBAAAC,MAAAA,KAAAC,KAAA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B,EAAA0B,cAAAR,EAAA,sBACAlB,EAAA2B,SAAAT,EAAA,iBACAlB,EAAAoE,QAAAlD,EAAA,gBACAlB,EAAAqR,aAAAnQ,EAAA,qBACAlB,EAAA8B,iBAAAZ,EAAA,yBACAA,EAAA,6LCKA2H,MAAAxG,UAAAgQ,SAIA9P,OAAA8F,eAAAQ,MAAAxG,UAAA,WACAiQ,YAAA,EACAC,UAAA,EACA/J,MAAA,WACA,IAAA,GAAAhF,GAAA6F,EAAAlI,EAAAX,KAAAgB,OAAAL,EAAAqC,EAAA4I,KAAAoG,MAAApG,KAAAC,SAAAlL,GAAAkI,EAAA7I,OAAAW,GAAAX,KAAAW,GAAAX,KAAAgD,GAAAhD,KAAAgD,GAAA6F,GACA,MAAA7I,SAUAqI,MAAAxG,UAAAgK,QAEA9J,OAAA8F,eAAAQ,MAAAxG,UAAA,UACAiQ,YAAA,EACAC,UAAA,EACA/J,MAAA,WACA,MAAAhI,MAAA4L,KAAAoG,MAAApG,KAAAC,SAAA7L,KAAAgB,oCCpCA,YAGA,IAAAlB,GAAA,mBAAAD,QAAAA,OAAAoS,MAQA,IALAnS,EAAAuB,KAAAoC,YACA3D,EAAAuB,KAAAoC,cAIA,mBAAAhE,IAAAA,EAAAD,QAGA,mBAAA6B,OAGAX,EAAA,WAIAjB,EAAAD,QAAAM,EAAAuB,KAAAoC,WAAAA,MAGA,IAAA,mBAAApC,MAEA,KAAA,oDAIA,IAAAoC,GAAA/C,EAAA,cAGA,KAAA,GAAAwR,KAAAzO,GACA3D,EAAAuB,KAAAoC,UAAAyO,GAAAzO,EAAAyO","file":"pixi-particles.min.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o= 0)\n\t{\n\t\tthis.elapsed += delta;\n\t\tif(this.elapsed > this.duration)\n\t\t{\n\t\t\t//loop elapsed back around\n\t\t\tif(this.loop)\n\t\t\t\tthis.elapsed = this.elapsed % this.duration;\n\t\t\t//subtract a small amount to prevent attempting to go past the end of the animation\n\t\t\telse\n\t\t\t\tthis.elapsed = this.duration - 0.000001;\n\t\t}\n\t\tvar frame = (this.elapsed * this.framerate + 0.0000001) | 0;\n\t\tthis.texture = this.textures[frame] || ParticleUtils.EMPTY_TEXTURE;\n\t}\n};\n\np.Particle_destroy = Particle.prototype.destroy;\n/**\n * Destroys the particle, removing references and preventing future use.\n * @method PIXI.particles.AnimatedParticle#destroy\n */\np.destroy = function()\n{\n\tthis.Particle_destroy();\n\tthis.textures = null;\n};\n\n/**\n * Checks over the art that was passed to the Emitter's init() function, to do any special\n * modifications to prepare it ahead of time.\n * @method PIXI.particles.AnimatedParticle.parseArt\n * @static\n * @param {Array} art The array of art data, properly formatted for AnimatedParticle.\n * @return {Array} The art, after any needed modifications.\n */\nAnimatedParticle.parseArt = function(art)\n{\n\tvar i, data, output = [], j, textures, tex, outTextures;\n\tfor(i = 0; i < art.length; ++i)\n\t{\n\t\tdata = art[i];\n\t\tart[i] = output = {};\n\t\toutput.textures = outTextures = [];\n\t\ttextures = data.textures;\n\t\tfor(j = 0; j < textures.length; ++j)\n\t\t{\n\t\t\ttex = textures[j];\n\t\t\tif(typeof tex == \"string\")\n\t\t\t\toutTextures.push(Texture.fromImage(tex));\n\t\t\telse if(tex instanceof Texture)\n\t\t\t\toutTextures.push(tex);\n\t\t\t//assume an object with extra data determining duplicate frame data\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar dupe = tex.count || 1;\n\t\t\t\tif(typeof tex.texture == \"string\")\n\t\t\t\t\ttex = Texture.fromImage(tex.texture);\n\t\t\t\telse// if(tex.texture instanceof Texture)\n\t\t\t\t\ttex = tex.texture;\n\t\t\t\tfor(; dupe > 0; --dupe)\n\t\t\t\t{\n\t\t\t\t\toutTextures.push(tex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//use these values to signify that the animation should match the particle life time.\n\t\tif(data.framerate == \"matchLife\")\n\t\t{\n\t\t\t//-1 means that it should be calculated\n\t\t\toutput.framerate = -1;\n\t\t\toutput.duration = 0;\n\t\t\toutput.loop = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//determine if the animation should loop\n\t\t\toutput.loop = !!data.loop;\n\t\t\t//get the framerate, default to 60\n\t\t\toutput.framerate = data.framerate > 0 ? data.framerate : 60;\n\t\t\t//determine the duration\n\t\t\toutput.duration = outTextures.length / output.framerate;\n\t\t}\n\t}\n\n\treturn art;\n};\n\nmodule.exports = AnimatedParticle;","\"use strict\";\n\nvar ParticleUtils = require(\"./ParticleUtils\"),\n\tParticle = require(\"./Particle\"),\n\tParticleContainer = PIXI.particles.ParticleContainer || PIXI.ParticleContainer,\n\tticker = PIXI.ticker.shared;\n\n/**\n * A particle emitter.\n * @memberof PIXI.particles\n * @class Emitter\n * @constructor\n * @param {PIXI.DisplayObjectContainer} particleParent The display object to add the\n * particles to.\n * @param {Array|PIXI.Texture|String} [particleImages] A texture or array of textures to use\n * for the particles. Strings will be turned\n * into textures via Texture.fromImage().\n * @param {Object} [config] A configuration object containing settings for the emitter.\n * @param {Boolean} [config.emit=true] If config.emit is explicitly passed as false, the Emitter\n * will start disabled.\n * @param {Boolean} [config.autoUpdate=false] If config.emit is explicitly passed as true, the Emitter\n * will automatically call update via the PIXI shared ticker.\n */\nvar Emitter = function(particleParent, particleImages, config)\n{\n\t/**\n\t * The constructor used to create new particles. The default is\n\t * the built in particle class.\n\t * @property {Function} _particleConstructor\n\t * @private\n\t */\n\tthis._particleConstructor = Particle;\n\t//properties for individual particles\n\t/**\n\t * An array of PIXI Texture objects.\n\t * @property {Array} particleImages\n\t */\n\tthis.particleImages = null;\n\t/**\n\t * The starting alpha of all particles.\n\t * @property {Number} startAlpha\n\t * @default 1\n\t */\n\tthis.startAlpha = 1;\n\t/**\n\t * The ending alpha of all particles.\n\t * @property {Number} endAlpha\n\t * @default 1\n\t */\n\tthis.endAlpha = 1;\n\t/**\n\t * The starting speed of all particles.\n\t * @property {Number} startSpeed\n\t * @default 0\n\t */\n\tthis.startSpeed = 0;\n\t/**\n\t * The ending speed of all particles.\n\t * @property {Number} endSpeed\n\t * @default 0\n\t */\n\tthis.endSpeed = 0;\n\t/**\n\t * A minimum multiplier for the speed of a particle at both start and\n\t * end. A value between minimumSpeedMultiplier and 1 is randomly generated\n\t * and multiplied with startSpeed and endSpeed to provide the actual\n\t * startSpeed and endSpeed for each particle.\n\t * @property {Number} minimumSpeedMultiplier\n\t * @default 1\n\t */\n\tthis.minimumSpeedMultiplier = 1;\n\t/**\n\t * Acceleration to apply to particles. Using this disables\n\t * any interpolation of particle speed. If the particles do\n\t * not have a rotation speed, then they will be rotated to\n\t * match the direction of travel.\n\t * @property {PIXI.Point} acceleration\n\t * @default null\n\t */\n\tthis.acceleration = null;\n\t/**\n\t * The maximum speed allowed for accelerating particles. Negative values, values of 0 or NaN\n\t * will disable the maximum speed.\n\t * @property {Number} maxSpeed\n\t * @default NaN\n\t */\n\tthis.maxSpeed = NaN;\n\t/**\n\t * The starting scale of all particles.\n\t * @property {Number} startScale\n\t * @default 1\n\t */\n\tthis.startScale = 1;\n\t/**\n\t * The ending scale of all particles.\n\t * @property {Number} endScale\n\t * @default 1\n\t */\n\tthis.endScale = 1;\n\t/**\n\t * A minimum multiplier for the scale of a particle at both start and\n\t * end. A value between minimumScaleMultiplier and 1 is randomly generated\n\t * and multiplied with startScale and endScale to provide the actual\n\t * startScale and endScale for each particle.\n\t * @property {Number} minimumScaleMultiplier\n\t * @default 1\n\t */\n\tthis.minimumScaleMultiplier = 1;\n\t/**\n\t * The starting color of all particles, as red, green, and blue uints from 0-255.\n\t * @property {Array} startColor\n\t */\n\tthis.startColor = null;\n\t/**\n\t * The ending color of all particles, as red, green, and blue uints from 0-255.\n\t * @property {Array} endColor\n\t */\n\tthis.endColor = null;\n\t/**\n\t * The minimum lifetime for a particle, in seconds.\n\t * @property {Number} minLifetime\n\t */\n\tthis.minLifetime = 0;\n\t/**\n\t * The maximum lifetime for a particle, in seconds.\n\t * @property {Number} maxLifetime\n\t */\n\tthis.maxLifetime = 0;\n\t/**\n\t * The minimum start rotation for a particle, in degrees. This value\n\t * is ignored if the spawn type is \"burst\" or \"arc\".\n\t * @property {Number} minStartRotation\n\t */\n\tthis.minStartRotation = 0;\n\t/**\n\t * The maximum start rotation for a particle, in degrees. This value\n\t * is ignored if the spawn type is \"burst\" or \"arc\".\n\t * @property {Number} maxStartRotation\n\t */\n\tthis.maxStartRotation = 0;\n\t/**\n\t * If no particle rotation should occur. Starting rotation will still\n\t * affect the direction in which particles move. If the rotation speed\n\t * is set, then this will be ignored.\n\t * @property {Boolean} maxStartRotation\n\t */\n\tthis.noRotation = false;\n\t/**\n\t * The minimum rotation speed for a particle, in degrees per second.\n\t * This only visually spins the particle, it does not change direction\n\t * of movement.\n\t * @property {Number} minRotationSpeed\n\t */\n\tthis.minRotationSpeed = 0;\n\t/**\n\t * The maximum rotation speed for a particle, in degrees per second.\n\t * This only visually spins the particle, it does not change direction\n\t * of movement.\n\t * @property {Number} maxRotationSpeed\n\t */\n\tthis.maxRotationSpeed = 0;\n\t/**\n\t * The blend mode for all particles, as named by PIXI.blendModes.\n\t * @property {int} particleBlendMode\n\t */\n\tthis.particleBlendMode = 0;\n\t/**\n\t * An easing function for nonlinear interpolation of values. Accepts a single\n\t * parameter of time as a value from 0-1, inclusive. Expected outputs are values\n\t * from 0-1, inclusive.\n\t * @property {Function} customEase\n\t */\n\tthis.customEase = null;\n\t/**\n\t *\tExtra data for use in custom particles. The emitter doesn't look inside, but\n\t *\tpasses it on to the particle to use in init().\n\t *\t@property {Object} extraData\n\t */\n\tthis.extraData = null;\n\t//properties for spawning particles\n\t/**\n\t * Time between particle spawns in seconds.\n\t * @property {Number} _frequency\n\t * @private\n\t */\n\tthis._frequency = 1;\n\t/**\n\t * Maximum number of particles to keep alive at a time. If this limit\n\t * is reached, no more particles will spawn until some have died.\n\t * @property {int} maxParticles\n\t * @default 1000\n\t */\n\tthis.maxParticles = 1000;\n\t/**\n\t * The amount of time in seconds to emit for before setting emit to false.\n\t * A value of -1 is an unlimited amount of time.\n\t * @property {Number} emitterLifetime\n\t * @default -1\n\t */\n\tthis.emitterLifetime = -1;\n\t/**\n\t * Position at which to spawn particles, relative to the emitter's owner's origin.\n\t * For example, the flames of a rocket travelling right might have a spawnPos\n\t * of {x:-50, y:0}.\n\t * to spawn at the rear of the rocket.\n\t * To change this, use updateSpawnPos().\n\t * @property {PIXI.Point} spawnPos\n\t * @readOnly\n\t */\n\tthis.spawnPos = null;\n\t/**\n\t * How the particles will be spawned. Valid types are \"point\", \"rectangle\",\n\t * \"circle\", \"burst\", \"ring\".\n\t * @property {String} spawnType\n\t * @readOnly\n\t */\n\tthis.spawnType = null;\n\t/**\n\t * A reference to the emitter function specific to the spawn type.\n\t * @property {Function} _spawnFunc\n\t * @private\n\t */\n\tthis._spawnFunc = null;\n\t/**\n\t * A rectangle relative to spawnPos to spawn particles inside if the spawn type is \"rect\".\n\t * @property {PIXI.Rectangle} spawnRect\n\t */\n\tthis.spawnRect = null;\n\t/**\n\t * A circle relative to spawnPos to spawn particles inside if the spawn type is \"circle\".\n\t * @property {PIXI.Circle} spawnCircle\n\t */\n\tthis.spawnCircle = null;\n\t/**\n\t * Number of particles to spawn each wave in a burst.\n\t * @property {int} particlesPerWave\n\t * @default 1\n\t */\n\tthis.particlesPerWave = 1;\n\t/**\n\t * Spacing between particles in a burst. 0 gives a random angle for each particle.\n\t * @property {Number} particleSpacing\n\t * @default 0\n\t */\n\tthis.particleSpacing = 0;\n\t/**\n\t * Angle at which to start spawning particles in a burst.\n\t * @property {Number} angleStart\n\t * @default 0\n\t */\n\tthis.angleStart = 0;\n\t/**\n\t * Rotation of the emitter or emitter's owner in degrees. This is added to\n\t * the calculated spawn angle.\n\t * To change this, use rotate().\n\t * @property {Number} rotation\n\t * @default 0\n\t * @readOnly\n\t */\n\tthis.rotation = 0;\n\t/**\n\t * The world position of the emitter's owner, to add spawnPos to when\n\t * spawning particles. To change this, use updateOwnerPos().\n\t * @property {PIXI.Point} ownerPos\n\t * @default {x:0, y:0}\n\t * @readOnly\n\t */\n\tthis.ownerPos = null;\n\t/**\n\t * The origin + spawnPos in the previous update, so that the spawn position\n\t * can be interpolated to space out particles better.\n\t * @property {PIXI.Point} _prevEmitterPos\n\t * @private\n\t */\n\tthis._prevEmitterPos = null;\n\t/**\n\t * If _prevEmitterPos is valid, to prevent interpolation on the first update\n\t * @property {Boolean} _prevPosIsValid\n\t * @private\n\t * @default false\n\t */\n\tthis._prevPosIsValid = false;\n\t/**\n\t * If either ownerPos or spawnPos has changed since the previous update.\n\t * @property {Boolean} _posChanged\n\t * @private\n\t */\n\tthis._posChanged = false;\n\t/**\n\t * If the parent is a ParticleContainer from Pixi V3\n\t * @property {Boolean} _parentIsPC\n\t * @private\n\t */\n\tthis._parentIsPC = false;\n\t/**\n\t * The display object to add particles to.\n\t * @property {PIXI.DisplayObjectContainer} _parent\n\t * @private\n\t */\n\tthis._parent = null;\n\t/**\n\t * If particles should be added at the back of the display list instead of the front.\n\t * @property {Boolean} addAtBack\n\t */\n\tthis.addAtBack = false;\n\t/**\n\t * The current number of active particles.\n\t * @property {Number} particleCount\n\t * @readOnly\n\t */\n\tthis.particleCount = 0;\n\t/**\n\t * If particles should be emitted during update() calls. Setting this to false\n\t * stops new particles from being created, but allows existing ones to die out.\n\t * @property {Boolean} _emit\n\t * @private\n\t */\n\tthis._emit = false;\n\t/**\n\t * The timer for when to spawn particles in seconds, where numbers less\n\t * than 0 mean that particles should be spawned.\n\t * @property {Number} _spawnTimer\n\t * @private\n\t */\n\tthis._spawnTimer = 0;\n\t/**\n\t * The life of the emitter in seconds.\n\t * @property {Number} _emitterLife\n\t * @private\n\t */\n\tthis._emitterLife = -1;\n\t/**\n\t * The particles that are active and on the display list. This is the first particle in a\n\t * linked list.\n\t * @property {Particle} _activeParticlesFirst\n\t * @private\n\t */\n\tthis._activeParticlesFirst = null;\n\t/**\n\t * The particles that are active and on the display list. This is the last particle in a\n\t * linked list.\n\t * @property {Particle} _activeParticlesLast\n\t * @private\n\t */\n\tthis._activeParticlesLast = null;\n\t/**\n\t * The particles that are not currently being used. This is the first particle in a\n\t * linked list.\n\t * @property {Particle} _poolFirst\n\t * @private\n\t */\n\tthis._poolFirst = null;\n\t/**\n\t * The original config object that this emitter was initialized with.\n\t * @property {Object} _origConfig\n\t * @private\n\t */\n\tthis._origConfig = null;\n\t/**\n\t * The original particle image data that this emitter was initialized with.\n\t * @property {PIXI.Texture|Array|String} _origArt\n\t * @private\n\t */\n\tthis._origArt = null;\n\t/**\n\t * If the update function is called automatically from the shared ticker.\n\t * Setting this to false requires calling the update function manually.\n\t * @property {Boolean} _autoUpdate\n\t * @private\n\t */\n\tthis._autoUpdate = false;\n\t/**\n\t * If the emitter should destroy itself when all particles have died out. This is set by\n\t * playOnceAndDestroy();\n\t * @property {Boolean} _destroyWhenComplete\n\t * @private\n\t */\n\tthis._destroyWhenComplete = false;\n\n\t//set the initial parent\n\tthis.parent = particleParent;\n\n\tif(particleImages && config)\n\t\tthis.init(particleImages, config);\n\n\t//save often used functions on the instance instead of the prototype for better speed\n\tthis.recycle = this.recycle;\n\tthis.update = this.update;\n\tthis.rotate = this.rotate;\n\tthis.updateSpawnPos = this.updateSpawnPos;\n\tthis.updateOwnerPos = this.updateOwnerPos;\n};\n\n// Reference to the prototype\nvar p = Emitter.prototype = {};\n\nvar helperPoint = new PIXI.Point();\n\n/**\n * Time between particle spawns in seconds. If this value is not a number greater than 0,\n * it will be set to 1 (particle per second) to prevent infinite loops.\n * @member {Number} PIXI.particles.Emitter#frequency\n */\nObject.defineProperty(p, \"frequency\",\n{\n\tget: function() { return this._frequency; },\n\tset: function(value)\n\t{\n\t\t//do some error checking to prevent infinite loops\n\t\tif(typeof value == \"number\" && value > 0)\n\t\t\tthis._frequency = value;\n\t\telse\n\t\t\tthis._frequency = 1;\n\t}\n});\n\n/**\n * The constructor used to create new particles. The default is\n * the built in Particle class. Setting this will dump any active or\n * pooled particles, if the emitter has already been used.\n * @member {Function} PIXI.particles.Emitter#particleConstructor\n */\nObject.defineProperty(p, \"particleConstructor\",\n{\n\tget: function() { return this._particleConstructor; },\n\tset: function(value)\n\t{\n\t\tif(value != this._particleConstructor)\n\t\t{\n\t\t\tthis._particleConstructor = value;\n\t\t\t//clean up existing particles\n\t\t\tthis.cleanup();\n\t\t\t//scrap all the particles\n\t\t\tfor (var particle = this._poolFirst; particle; particle = particle.next)\n\t\t\t{\n\t\t\t\tparticle.destroy();\n\t\t\t}\n\t\t\tthis._poolFirst = null;\n\t\t\t//re-initialize the emitter so that the new constructor can do anything it needs to\n\t\t\tif(this._origConfig && this._origArt)\n\t\t\t\tthis.init(this._origArt, this._origConfig);\n\t\t}\n\t}\n});\n\n/**\n* The display object to add particles to. Settings this will dump any active particles.\n* @member {PIXI.DisplayObjectContainer} PIXI.particles.Emitter#parent\n*/\nObject.defineProperty(p, \"parent\",\n{\n\tget: function() { return this._parent; },\n\tset: function(value)\n\t{\n\t\t//if our previous parent was a ParticleContainer, then we need to remove\n\t\t//pooled particles from it\n\t\tif (this._parentIsPC) {\n\t\t\tfor (var particle = this._poolFirst; particle; particle = particle.next)\n\t\t\t{\n\t\t\t\tif(particle.parent)\n\t\t\t\t\tparticle.parent.removeChild(particle);\n\t\t\t}\n\t\t}\n\t\tthis.cleanup();\n\t\tthis._parent = value;\n\t\tthis._parentIsPC = ParticleContainer && value && value instanceof ParticleContainer;\n\t}\n});\n\n/**\n * Sets up the emitter based on the config settings.\n * @method PIXI.particles.Emitter#init\n * @param {Array|PIXI.Texture} art A texture or array of textures to use for the particles.\n * @param {Object} config A configuration object containing settings for the emitter.\n */\np.init = function(art, config)\n{\n\tif(!art || !config)\n\t\treturn;\n\t//clean up any existing particles\n\tthis.cleanup();\n\n\t//store the original config and particle images, in case we need to re-initialize\n\t//when the particle constructor is changed\n\tthis._origConfig = config;\n\tthis._origArt = art;\n\n\t//set up the array of data, also ensuring that it is an array\n\tart = Array.isArray(art) ? art.slice() : [art];\n\t//run the art through the particle class's parsing function\n\tvar partClass = this._particleConstructor;\n\tthis.particleImages = partClass.parseArt ? partClass.parseArt(art) : art;\n\t///////////////////////////\n\t// Particle Properties //\n\t///////////////////////////\n\t//set up the alpha\n\tif (config.alpha)\n\t{\n\t\tthis.startAlpha = config.alpha.start;\n\t\tthis.endAlpha = config.alpha.end;\n\t}\n\telse\n\t\tthis.startAlpha = this.endAlpha = 1;\n\t//set up the speed\n\tif (config.speed)\n\t{\n\t\tthis.startSpeed = config.speed.start;\n\t\tthis.endSpeed = config.speed.end;\n\t\tthis.minimumSpeedMultiplier = config.speed.minimumSpeedMultiplier || 1;\n\t}\n\telse\n\t{\n\t\tthis.minimumSpeedMultiplier = 1;\n\t\tthis.startSpeed = this.endSpeed = 0;\n\t}\n\t//set up acceleration\n\tvar acceleration = config.acceleration;\n\tif(acceleration && (acceleration.x || acceleration.y))\n\t{\n\t\tthis.endSpeed = this.startSpeed;\n\t\tthis.acceleration = new PIXI.Point(acceleration.x, acceleration.y);\n\t\tthis.maxSpeed = config.maxSpeed || NaN;\n\t}\n\telse\n\t\tthis.acceleration = new PIXI.Point();\n\t//set up the scale\n\tif (config.scale)\n\t{\n\t\tthis.startScale = config.scale.start;\n\t\tthis.endScale = config.scale.end;\n\t\tthis.minimumScaleMultiplier = config.scale.minimumScaleMultiplier || 1;\n\t}\n\telse\n\t\tthis.startScale = this.endScale = this.minimumScaleMultiplier = 1;\n\t//set up the color\n\tif (config.color)\n\t{\n\t\tthis.startColor = ParticleUtils.hexToRGB(config.color.start);\n\t\t//if it's just one color, only use the start color\n\t\tif (config.color.start != config.color.end)\n\t\t{\n\t\t\tthis.endColor = ParticleUtils.hexToRGB(config.color.end);\n\t\t}\n\t\telse\n\t\t\tthis.endColor = null;\n\t}\n\t//set up the start rotation\n\tif (config.startRotation)\n\t{\n\t\tthis.minStartRotation = config.startRotation.min;\n\t\tthis.maxStartRotation = config.startRotation.max;\n\t}\n\telse\n\t\tthis.minStartRotation = this.maxStartRotation = 0;\n\tif (config.noRotation &&\n\t\t(this.minStartRotation || this.maxStartRotation))\n\t{\n\t\tthis.noRotation = !!config.noRotation;\n\t}\n\telse\n\t\tthis.noRotation = false;\n\t//set up the rotation speed\n\tif (config.rotationSpeed)\n\t{\n\t\tthis.minRotationSpeed = config.rotationSpeed.min;\n\t\tthis.maxRotationSpeed = config.rotationSpeed.max;\n\t}\n\telse\n\t\tthis.minRotationSpeed = this.maxRotationSpeed = 0;\n\t//set up the lifetime\n\tthis.minLifetime = config.lifetime.min;\n\tthis.maxLifetime = config.lifetime.max;\n\t//get the blend mode\n\tthis.particleBlendMode = ParticleUtils.getBlendMode(config.blendMode);\n\t//use the custom ease if provided\n\tif (config.ease)\n\t{\n\t\tthis.customEase = typeof config.ease == \"function\" ?\n\t\t\t\t\t\t\t\t\t\t\t\t\tconfig.ease :\n\t\t\t\t\t\t\t\t\t\t\t\t\tParticleUtils.generateEase(config.ease);\n\t}\n\telse\n\t\tthis.customEase = null;\n\t//set up the extra data, running it through the particle class's parseData function.\n\tif(partClass.parseData)\n\t\tthis.extraData = partClass.parseData(config.extraData);\n\telse\n\t\tthis.extraData = config.extraData || null;\n\t//////////////////////////\n\t// Emitter Properties //\n\t//////////////////////////\n\t//reset spawn type specific settings\n\tthis.spawnRect = this.spawnCircle = null;\n\tthis.particlesPerWave = 1;\n\tthis.particleSpacing = 0;\n\tthis.angleStart = 0;\n\tvar spawnCircle;\n\t//determine the spawn function to use\n\tswitch(config.spawnType)\n\t{\n\t\tcase \"rect\":\n\t\t\tthis.spawnType = \"rect\";\n\t\t\tthis._spawnFunc = this._spawnRect;\n\t\t\tvar spawnRect = config.spawnRect;\n\t\t\tthis.spawnRect = new PIXI.Rectangle(spawnRect.x, spawnRect.y, spawnRect.w, spawnRect.h);\n\t\t\tbreak;\n\t\tcase \"circle\":\n\t\t\tthis.spawnType = \"circle\";\n\t\t\tthis._spawnFunc = this._spawnCircle;\n\t\t\tspawnCircle = config.spawnCircle;\n\t\t\tthis.spawnCircle = new PIXI.Circle(spawnCircle.x, spawnCircle.y, spawnCircle.r);\n\t\t\tbreak;\n\t\tcase \"ring\":\n\t\t\tthis.spawnType = \"ring\";\n\t\t\tthis._spawnFunc = this._spawnRing;\n\t\t\tspawnCircle = config.spawnCircle;\n\t\t\tthis.spawnCircle = new PIXI.Circle(spawnCircle.x, spawnCircle.y, spawnCircle.r);\n\t\t\tthis.spawnCircle.minRadius = spawnCircle.minR;\n\t\t\tbreak;\n\t\tcase \"burst\":\n\t\t\tthis.spawnType = \"burst\";\n\t\t\tthis._spawnFunc = this._spawnBurst;\n\t\t\tthis.particlesPerWave = config.particlesPerWave;\n\t\t\tthis.particleSpacing = config.particleSpacing;\n\t\t\tthis.angleStart = config.angleStart ? config.angleStart : 0;\n\t\t\tbreak;\n\t\tcase \"point\":\n\t\t\tthis.spawnType = \"point\";\n\t\t\tthis._spawnFunc = this._spawnPoint;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthis.spawnType = \"point\";\n\t\t\tthis._spawnFunc = this._spawnPoint;\n\t\t\tbreak;\n\t}\n\t//set the spawning frequency\n\tthis.frequency = config.frequency;\n\t//set the emitter lifetime\n\tthis.emitterLifetime = config.emitterLifetime || -1;\n\t//set the max particles\n\tthis.maxParticles = config.maxParticles > 0 ? config.maxParticles : 1000;\n\t//determine if we should add the particle at the back of the list or not\n\tthis.addAtBack = !!config.addAtBack;\n\t//reset the emitter position and rotation variables\n\tthis.rotation = 0;\n\tthis.ownerPos = new PIXI.Point();\n\tthis.spawnPos = new PIXI.Point(config.pos.x, config.pos.y);\n\tthis._prevEmitterPos = this.spawnPos.clone();\n\t//previous emitter position is invalid and should not be used for interpolation\n\tthis._prevPosIsValid = false;\n\t//start emitting\n\tthis._spawnTimer = 0;\n\tthis.emit = config.emit === undefined ? true : !!config.emit;\n\tthis.autoUpdate = config.autoUpdate === undefined ? false : !!config.autoUpdate;\n};\n\n/**\n * Recycles an individual particle.\n * @method PIXI.particles.Emitter#recycle\n * @param {Particle} particle The particle to recycle.\n * @private\n */\np.recycle = function(particle)\n{\n\tif(particle.next)\n\t\tparticle.next.prev = particle.prev;\n\tif(particle.prev)\n\t\tparticle.prev.next = particle.next;\n\tif(particle == this._activeParticlesLast)\n\t\tthis._activeParticlesLast = particle.prev;\n\tif(particle == this._activeParticlesFirst)\n\t\tthis._activeParticlesFirst = particle.next;\n\t//add to pool\n\tparticle.prev = null;\n\tparticle.next = this._poolFirst;\n\tthis._poolFirst = particle;\n\t//remove child from display, or make it invisible if it is in a ParticleContainer\n\tif(this._parentIsPC)\n\t{\n\t\tparticle.alpha = 0;\n\t\tparticle.visible = false;\n\t}\n\telse\n\t{\n\t\tif(particle.parent)\n\t\t\tparticle.parent.removeChild(particle);\n\t}\n\t//decrease count\n\t--this.particleCount;\n};\n\n/**\n * Sets the rotation of the emitter to a new value.\n * @method PIXI.particles.Emitter#rotate\n * @param {Number} newRot The new rotation, in degrees.\n */\np.rotate = function(newRot)\n{\n\tif (this.rotation == newRot) return;\n\t//caclulate the difference in rotation for rotating spawnPos\n\tvar diff = newRot - this.rotation;\n\tthis.rotation = newRot;\n\t//rotate spawnPos\n\tParticleUtils.rotatePoint(diff, this.spawnPos);\n\t//mark the position as having changed\n\tthis._posChanged = true;\n};\n\n/**\n * Changes the spawn position of the emitter.\n * @method PIXI.particles.Emitter#updateSpawnPos\n * @param {Number} x The new x value of the spawn position for the emitter.\n * @param {Number} y The new y value of the spawn position for the emitter.\n */\np.updateSpawnPos = function(x, y)\n{\n\tthis._posChanged = true;\n\tthis.spawnPos.x = x;\n\tthis.spawnPos.y = y;\n};\n\n/**\n * Changes the position of the emitter's owner. You should call this if you are adding\n * particles to the world display object that your emitter's owner is moving around in.\n * @method PIXI.particles.Emitter#updateOwnerPos\n * @param {Number} x The new x value of the emitter's owner.\n * @param {Number} y The new y value of the emitter's owner.\n */\np.updateOwnerPos = function(x, y)\n{\n\tthis._posChanged = true;\n\tthis.ownerPos.x = x;\n\tthis.ownerPos.y = y;\n};\n\n/**\n * Prevents emitter position interpolation in the next update.\n * This should be used if you made a major position change of your emitter's owner\n * that was not normal movement.\n * @method PIXI.particles.Emitter#resetPositionTracking\n */\np.resetPositionTracking = function()\n{\n\tthis._prevPosIsValid = false;\n};\n\n/**\n * If particles should be emitted during update() calls. Setting this to false\n * stops new particles from being created, but allows existing ones to die out.\n * @member {Boolean} PIXI.particles.Emitter#emit\n */\nObject.defineProperty(p, \"emit\",\n{\n\tget: function() { return this._emit; },\n\tset: function(value)\n\t{\n\t\tthis._emit = !!value;\n\t\tthis._emitterLife = this.emitterLifetime;\n\t}\n});\n\n/**\n * If the update function is called automatically from the shared ticker.\n * Setting this to false requires calling the update function manually.\n * @member {Boolean} PIXI.particles.Emitter#autoUpdate\n */\nObject.defineProperty(p, \"autoUpdate\",\n{\n\tget: function() { return this._autoUpdate; },\n\tset: function(value)\n\t{\n\t\tif (this._autoUpdate && !value)\n\t\t{\n\t\t\tticker.remove(this.update, this);\n\t\t}\n\t\telse if (!this._autoUpdate && value)\n\t\t{\n\t\t\tticker.add(this.update, this);\n\t\t}\n\t\tthis._autoUpdate = !!value;\n\t}\n});\n\n/**\n * Starts emitting particles, sets autoUpdate to true, and sets up the Emitter to destroy itself\n * when particle emission is complete.\n * @method PIXI.particles.Emitter#playOnceAndDestroy\n */\np.playOnceAndDestroy = function()\n{\n\tthis.autoUpdate = true;\n\tthis.emit = true;\n\tthis._destroyWhenComplete = true;\n};\n\n/**\n * Updates all particles spawned by this emitter and emits new ones.\n * @method PIXI.particles.Emitter#update\n * @param {Number} delta Time elapsed since the previous frame, in __seconds__.\n */\np.update = function(delta)\n{\n\tif (this._autoUpdate)\n\t{\n\t\tdelta = delta / PIXI.settings.TARGET_FPMS / 1000;\n\t}\n\n\t//if we don't have a parent to add particles to, then don't do anything.\n\t//this also works as a isDestroyed check\n\tif (!this._parent) return;\n\t//update existing particles\n\tvar i, particle, next;\n\tfor (particle = this._activeParticlesFirst; particle; particle = next)\n\t{\n\t\tnext = particle.next;\n\t\tparticle.update(delta);\n\t}\n\tvar prevX, prevY;\n\t//if the previous position is valid, store these for later interpolation\n\tif(this._prevPosIsValid)\n\t{\n\t\tprevX = this._prevEmitterPos.x;\n\t\tprevY = this._prevEmitterPos.y;\n\t}\n\t//store current position of the emitter as local variables\n\tvar curX = this.ownerPos.x + this.spawnPos.x;\n\tvar curY = this.ownerPos.y + this.spawnPos.y;\n\t//spawn new particles\n\tif (this._emit)\n\t{\n\t\t//decrease spawn timer\n\t\tthis._spawnTimer -= delta;\n\t\t//while _spawnTimer < 0, we have particles to spawn\n\t\twhile(this._spawnTimer <= 0)\n\t\t{\n\t\t\t//determine if the emitter should stop spawning\n\t\t\tif(this._emitterLife > 0)\n\t\t\t{\n\t\t\t\tthis._emitterLife -= this._frequency;\n\t\t\t\tif(this._emitterLife <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis._spawnTimer = 0;\n\t\t\t\t\tthis._emitterLife = 0;\n\t\t\t\t\tthis.emit = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//determine if we have hit the particle limit\n\t\t\tif(this.particleCount >= this.maxParticles)\n\t\t\t{\n\t\t\t\tthis._spawnTimer += this._frequency;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//determine the particle lifetime\n\t\t\tvar lifetime;\n\t\t\tif (this.minLifetime == this.maxLifetime)\n\t\t\t\tlifetime = this.minLifetime;\n\t\t\telse\n\t\t\t\tlifetime = Math.random() * (this.maxLifetime - this.minLifetime) + this.minLifetime;\n\t\t\t//only make the particle if it wouldn't immediately destroy itself\n\t\t\tif(-this._spawnTimer < lifetime)\n\t\t\t{\n\t\t\t\t//If the position has changed and this isn't the first spawn,\n\t\t\t\t//interpolate the spawn position\n\t\t\t\tvar emitPosX, emitPosY;\n\t\t\t\tif (this._prevPosIsValid && this._posChanged)\n\t\t\t\t{\n\t\t\t\t\t//1 - _spawnTimer / delta, but _spawnTimer is negative\n\t\t\t\t\tvar lerp = 1 + this._spawnTimer / delta;\n\t\t\t\t\temitPosX = (curX - prevX) * lerp + prevX;\n\t\t\t\t\temitPosY = (curY - prevY) * lerp + prevY;\n\t\t\t\t}\n\t\t\t\telse//otherwise just set to the spawn position\n\t\t\t\t{\n\t\t\t\t\temitPosX = curX;\n\t\t\t\t\temitPosY = curY;\n\t\t\t\t}\n\t\t\t\t//create enough particles to fill the wave (non-burst types have a wave of 1)\n\t\t\t\ti = 0;\n\t\t\t\tfor(var len = Math.min(this.particlesPerWave, this.maxParticles - this.particleCount); i < len; ++i)\n\t\t\t\t{\n\t\t\t\t\t//create particle\n\t\t\t\t\tvar p, rand;\n\t\t\t\t\tif(this._poolFirst)\n\t\t\t\t\t{\n\t\t\t\t\t\tp = this._poolFirst;\n\t\t\t\t\t\tthis._poolFirst = this._poolFirst.next;\n\t\t\t\t\t\tp.next = null;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tp = new this.particleConstructor(this);\n\t\t\t\t\t}\n\n\t\t\t\t\t//set a random texture if we have more than one\n\t\t\t\t\tif(this.particleImages.length > 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tp.applyArt(this.particleImages.random());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//if they are actually the same texture, a standard particle\n\t\t\t\t\t\t//will quit early from the texture setting in setTexture().\n\t\t\t\t\t\tp.applyArt(this.particleImages[0]);\n\t\t\t\t\t}\n\t\t\t\t\t//set up the start and end values\n\t\t\t\t\tp.startAlpha = this.startAlpha;\n\t\t\t\t\tp.endAlpha = this.endAlpha;\n\t\t\t\t\tif(this.minimumSpeedMultiplier != 1)\n\t\t\t\t\t{\n\t\t\t\t\t\trand = Math.random() * (1 - this.minimumSpeedMultiplier) + this.minimumSpeedMultiplier;\n\t\t\t\t\t\tp.startSpeed = this.startSpeed * rand;\n\t\t\t\t\t\tp.endSpeed = this.endSpeed * rand;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tp.startSpeed = this.startSpeed;\n\t\t\t\t\t\tp.endSpeed = this.endSpeed;\n\t\t\t\t\t}\n\t\t\t\t\tp.acceleration.x = this.acceleration.x;\n\t\t\t\t\tp.acceleration.y = this.acceleration.y;\n\t\t\t\t\tp.maxSpeed = this.maxSpeed;\n\t\t\t\t\tif(this.minimumScaleMultiplier != 1)\n\t\t\t\t\t{\n\t\t\t\t\t\trand = Math.random() * (1 - this.minimumScaleMultiplier) + this.minimumScaleMultiplier;\n\t\t\t\t\t\tp.startScale = this.startScale * rand;\n\t\t\t\t\t\tp.endScale = this.endScale * rand;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tp.startScale = this.startScale;\n\t\t\t\t\t\tp.endScale = this.endScale;\n\t\t\t\t\t}\n\t\t\t\t\tp.startColor = this.startColor;\n\t\t\t\t\tp.endColor = this.endColor;\n\t\t\t\t\t//randomize the rotation speed\n\t\t\t\t\tif(this.minRotationSpeed == this.maxRotationSpeed)\n\t\t\t\t\t\tp.rotationSpeed = this.minRotationSpeed;\n\t\t\t\t\telse\n\t\t\t\t\t\tp.rotationSpeed = Math.random() * (this.maxRotationSpeed - this.minRotationSpeed) + this.minRotationSpeed;\n\t\t\t\t\tp.noRotation = this.noRotation;\n\t\t\t\t\t//set up the lifetime\n\t\t\t\t\tp.maxLife = lifetime;\n\t\t\t\t\t//set the blend mode\n\t\t\t\t\tp.blendMode = this.particleBlendMode;\n\t\t\t\t\t//set the custom ease, if any\n\t\t\t\t\tp.ease = this.customEase;\n\t\t\t\t\t//set the extra data, if any\n\t\t\t\t\tp.extraData = this.extraData;\n\t\t\t\t\t//call the proper function to handle rotation and position of particle\n\t\t\t\t\tthis._spawnFunc(p, emitPosX, emitPosY, i);\n\t\t\t\t\t//initialize particle\n\t\t\t\t\tp.init();\n\t\t\t\t\t//update the particle by the time passed, so the particles are spread out properly\n\t\t\t\t\tp.update(-this._spawnTimer);//we want a positive delta, because a negative delta messes things up\n\t\t\t\t\t//add the particle to the display list\n\t\t\t\t\tif(!this._parentIsPC || !p.parent)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (this.addAtBack)\n\t\t\t\t\t\t\tthis._parent.addChildAt(p, 0);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthis._parent.addChild(p);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//kind of hacky, but performance friendly\n\t\t\t\t\t\t//shuffle children to correct place\n\t\t\t\t\t\tvar children = this._parent.children;\n\t\t\t\t\t\t//avoid using splice if possible\n\t\t\t\t\t\tif(children[0] == p)\n\t\t\t\t\t\t\tchildren.shift();\n\t\t\t\t\t\telse if(children[children.length-1] == p)\n\t\t\t\t\t\t\tchildren.pop();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvar index = children.indexOf(p);\n\t\t\t\t\t\t\tchildren.splice(index, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(this.addAtBack)\n\t\t\t\t\t\t\tchildren.unshift(p);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tchildren.push(p);\n\t\t\t\t\t}\n\t\t\t\t\t//add particle to list of active particles\n\t\t\t\t\tif(this._activeParticlesLast)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis._activeParticlesLast.next = p;\n\t\t\t\t\t\tp.prev = this._activeParticlesLast;\n\t\t\t\t\t\tthis._activeParticlesLast = p;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tthis._activeParticlesLast = this._activeParticlesFirst = p;\n\t\t\t\t\t}\n\t\t\t\t\t++this.particleCount;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//increase timer and continue on to any other particles that need to be created\n\t\t\tthis._spawnTimer += this._frequency;\n\t\t}\n\t}\n\t//if the position changed before this update, then keep track of that\n\tif(this._posChanged)\n\t{\n\t\tthis._prevEmitterPos.x = curX;\n\t\tthis._prevEmitterPos.y = curY;\n\t\tthis._prevPosIsValid = true;\n\t\tthis._posChanged = false;\n\t}\n\n\t//if we are all done and should destroy ourselves, take care of that\n\tif (this._destroyWhenComplete && !this._emit && !this._activeParticlesFirst)\n\t{\n\t\tthis.destroy();\n\t}\n};\n\n/**\n * Positions a particle for a point type emitter.\n * @method PIXI.particles.Emitter#_spawnPoint\n * @private\n * @param {Particle} p The particle to position and rotate.\n * @param {Number} emitPosX The emitter's x position\n * @param {Number} emitPosY The emitter's y position\n * @param {int} i The particle number in the current wave. Not used for this function.\n */\np._spawnPoint = function(p, emitPosX, emitPosY)\n{\n\t//set the initial rotation/direction of the particle based on\n\t//starting particle angle and rotation of emitter\n\tif (this.minStartRotation == this.maxStartRotation)\n\t\tp.rotation = this.minStartRotation + this.rotation;\n\telse\n\t\tp.rotation = Math.random() * (this.maxStartRotation - this.minStartRotation) + this.minStartRotation + this.rotation;\n\t//drop the particle at the emitter's position\n\tp.position.x = emitPosX;\n\tp.position.y = emitPosY;\n};\n\n/**\n * Positions a particle for a rectangle type emitter.\n * @method PIXI.particles.Emitter#_spawnRect\n * @private\n * @param {Particle} p The particle to position and rotate.\n * @param {Number} emitPosX The emitter's x position\n * @param {Number} emitPosY The emitter's y position\n * @param {int} i The particle number in the current wave. Not used for this function.\n */\np._spawnRect = function(p, emitPosX, emitPosY)\n{\n\t//set the initial rotation/direction of the particle based on starting\n\t//particle angle and rotation of emitter\n\tif (this.minStartRotation == this.maxStartRotation)\n\t\tp.rotation = this.minStartRotation + this.rotation;\n\telse\n\t\tp.rotation = Math.random() * (this.maxStartRotation - this.minStartRotation) + this.minStartRotation + this.rotation;\n\t//place the particle at a random point in the rectangle\n\thelperPoint.x = Math.random() * this.spawnRect.width + this.spawnRect.x;\n\thelperPoint.y = Math.random() * this.spawnRect.height + this.spawnRect.y;\n\tif(this.rotation !== 0)\n\t\tParticleUtils.rotatePoint(this.rotation, helperPoint);\n\tp.position.x = emitPosX + helperPoint.x;\n\tp.position.y = emitPosY + helperPoint.y;\n};\n\n/**\n * Positions a particle for a circle type emitter.\n * @method PIXI.particles.Emitter#_spawnCircle\n * @private\n * @param {Particle} p The particle to position and rotate.\n * @param {Number} emitPosX The emitter's x position\n * @param {Number} emitPosY The emitter's y position\n * @param {int} i The particle number in the current wave. Not used for this function.\n */\np._spawnCircle = function(p, emitPosX, emitPosY)\n{\n\t//set the initial rotation/direction of the particle based on starting\n\t//particle angle and rotation of emitter\n\tif (this.minStartRotation == this.maxStartRotation)\n\t\tp.rotation = this.minStartRotation + this.rotation;\n\telse\n\t\tp.rotation = Math.random() * (this.maxStartRotation - this.minStartRotation) +\n\t\t\t\t\tthis.minStartRotation + this.rotation;\n\t//place the particle at a random radius in the circle\n\thelperPoint.x = Math.random() * this.spawnCircle.radius;\n\thelperPoint.y = 0;\n\t//rotate the point to a random angle in the circle\n\tParticleUtils.rotatePoint(Math.random() * 360, helperPoint);\n\t//offset by the circle's center\n\thelperPoint.x += this.spawnCircle.x;\n\thelperPoint.y += this.spawnCircle.y;\n\t//rotate the point by the emitter's rotation\n\tif(this.rotation !== 0)\n\t\tParticleUtils.rotatePoint(this.rotation, helperPoint);\n\t//set the position, offset by the emitter's position\n\tp.position.x = emitPosX + helperPoint.x;\n\tp.position.y = emitPosY + helperPoint.y;\n};\n\n/**\n * Positions a particle for a ring type emitter.\n * @method PIXI.particles.Emitter#_spawnRing\n * @private\n * @param {Particle} p The particle to position and rotate.\n * @param {Number} emitPosX The emitter's x position\n * @param {Number} emitPosY The emitter's y position\n * @param {int} i The particle number in the current wave. Not used for this function.\n */\np._spawnRing = function(p, emitPosX, emitPosY)\n{\n\tvar spawnCircle = this.spawnCircle;\n\t//set the initial rotation/direction of the particle based on starting\n\t//particle angle and rotation of emitter\n\tif (this.minStartRotation == this.maxStartRotation)\n\t\tp.rotation = this.minStartRotation + this.rotation;\n\telse\n\t\tp.rotation = Math.random() * (this.maxStartRotation - this.minStartRotation) +\n\t\t\t\t\tthis.minStartRotation + this.rotation;\n\t//place the particle at a random radius in the ring\n\tif(spawnCircle.minRadius == spawnCircle.radius)\n\t{\n\t\thelperPoint.x = Math.random() * (spawnCircle.radius - spawnCircle.minRadius) +\n\t\t\t\t\t\tspawnCircle.minRadius;\n\t}\n\telse\n\t\thelperPoint.x = spawnCircle.radius;\n\thelperPoint.y = 0;\n\t//rotate the point to a random angle in the circle\n\tvar angle = Math.random() * 360;\n\tp.rotation += angle;\n\tParticleUtils.rotatePoint(angle, helperPoint);\n\t//offset by the circle's center\n\thelperPoint.x += this.spawnCircle.x;\n\thelperPoint.y += this.spawnCircle.y;\n\t//rotate the point by the emitter's rotation\n\tif(this.rotation !== 0)\n\t\tParticleUtils.rotatePoint(this.rotation, helperPoint);\n\t//set the position, offset by the emitter's position\n\tp.position.x = emitPosX + helperPoint.x;\n\tp.position.y = emitPosY + helperPoint.y;\n};\n\n/**\n * Positions a particle for a burst type emitter.\n * @method PIXI.particles.Emitter#_spawnBurst\n * @private\n * @param {Particle} p The particle to position and rotate.\n * @param {Number} emitPosX The emitter's x position\n * @param {Number} emitPosY The emitter's y position\n * @param {int} i The particle number in the current wave.\n */\np._spawnBurst = function(p, emitPosX, emitPosY, i)\n{\n\t//set the initial rotation/direction of the particle based on spawn\n\t//angle and rotation of emitter\n\tif(this.particleSpacing === 0)\n\t\tp.rotation = Math.random() * 360;\n\telse\n\t\tp.rotation = this.angleStart + (this.particleSpacing * i) + this.rotation;\n\t//drop the particle at the emitter's position\n\tp.position.x = emitPosX;\n\tp.position.y = emitPosY;\n};\n\n/**\n * Kills all active particles immediately.\n * @method PIXI.particles.Emitter#cleanup\n */\np.cleanup = function()\n{\n\tvar particle, next;\n\tfor (particle = this._activeParticlesFirst; particle; particle = next)\n\t{\n\t\tnext = particle.next;\n\t\tthis.recycle(particle);\n\t\tif(particle.parent)\n\t\t\tparticle.parent.removeChild(particle);\n\t}\n\tthis._activeParticlesFirst = this._activeParticlesLast = null;\n\tthis.particleCount = 0;\n};\n\n/**\n * Destroys the emitter and all of its particles.\n * @method PIXI.particles.Emitter#destroy\n */\np.destroy = function()\n{\n\t//make sure we aren't still listening to any tickers\n\tthis.autoUpdate = false;\n\t//puts all active particles in the pool, and removes them from the particle parent\n\tthis.cleanup();\n\t//wipe the pool clean\n\tvar next;\n\tfor (var particle = this._poolFirst; particle; particle = next)\n\t{\n\t\t//store next value so we don't lose it in our destroy call\n\t\tnext = particle.next;\n\t\tparticle.destroy();\n\t}\n\tthis._poolFirst = this._parent = this.particleImages = this.spawnPos = this.ownerPos =\n\t\tthis.startColor = this.endColor = this.customEase = null;\n};\n\nmodule.exports = Emitter;","var ParticleUtils = require(\"./ParticleUtils\");\nvar Sprite = PIXI.Sprite;\n\n/**\n * An individual particle image. You shouldn't have to deal with these.\n * @memberof PIXI.particles\n * @class Particle\n * @extends PIXI.Sprite\n * @constructor\n * @param {PIXI.particles.Emitter} emitter The emitter that controls this particle.\n */\nvar Particle = function(emitter)\n{\n\t//start off the sprite with a blank texture, since we are going to replace it\n\t//later when the particle is initialized.\n\tSprite.call(this);\n\n\t/**\n\t * The emitter that controls this particle.\n\t * @property {Emitter} emitter\n\t */\n\tthis.emitter = emitter;\n\t//particles should be centered\n\tthis.anchor.x = this.anchor.y = 0.5;\n\t/**\n\t * The velocity of the particle. Speed may change, but the angle also\n\t * contained in velocity is constant.\n\t * @property {PIXI.Point} velocity\n\t */\n\tthis.velocity = new PIXI.Point();\n\t/**\n\t * The maximum lifetime of this particle, in seconds.\n\t * @property {Number} maxLife\n\t */\n\tthis.maxLife = 0;\n\t/**\n\t * The current age of the particle, in seconds.\n\t * @property {Number} age\n\t */\n\tthis.age = 0;\n\t/**\n\t * A simple easing function to be applied to all properties that\n\t * are being interpolated.\n\t * @property {Function} ease\n\t */\n\tthis.ease = null;\n\t/**\n\t * Extra data that the emitter passes along for custom particles.\n\t * @property {Object} extraData\n\t */\n\tthis.extraData = null;\n\t/**\n\t * The alpha of the particle at the start of its life.\n\t * @property {Number} startAlpha\n\t */\n\tthis.startAlpha = 0;\n\t/**\n\t * The alpha of the particle at the end of its life.\n\t * @property {Number} endAlpha\n\t */\n\tthis.endAlpha = 0;\n\t/**\n\t * The speed of the particle at the start of its life.\n\t * @property {Number} startSpeed\n\t */\n\tthis.startSpeed = 0;\n\t/**\n\t * The speed of the particle at the end of its life.\n\t * @property {Number} endSpeed\n\t */\n\tthis.endSpeed = 0;\n\t/**\n\t * Acceleration to apply to the particle.\n\t * @property {PIXI.Point} accleration\n\t */\n\tthis.acceleration = new PIXI.Point();\n\t/**\n\t * The maximum speed allowed for accelerating particles. Negative values, values of 0 or NaN\n\t * will disable the maximum speed.\n\t * @property {Number} maxSpeed\n\t * @default NaN\n\t */\n\tthis.maxSpeed = NaN;\n\t/**\n\t * The scale of the particle at the start of its life.\n\t * @property {Number} startScale\n\t */\n\tthis.startScale = 0;\n\t/**\n\t * The scale of the particle at the start of its life.\n\t * @property {Number} endScale\n\t */\n\tthis.endScale = 0;\n\t/**\n\t * The tint of the particle at the start of its life.\n\t * @property {Array} startColor\n\t */\n\tthis.startColor = null;\n\t/**\n\t * The red tint of the particle at the start of its life.\n\t * This is pulled from startColor in init().\n\t * @property {uint} _sR\n\t * @private\n\t */\n\tthis._sR = 0;\n\t/**\n\t * The green tint of the particle at the start of its life.\n\t * This is pulled from startColor in init().\n\t * @property {uint} _sG\n\t * @private\n\t */\n\tthis._sG = 0;\n\t/**\n\t * The blue tint of the particle at the start of its life.\n\t * This is pulled from startColor in init().\n\t * @property {uint} _sB\n\t * @private\n\t */\n\tthis._sB = 0;\n\t/**\n\t * The tint of the particle at the start of its life.\n\t * @property {Array} endColor\n\t */\n\tthis.endColor = null;\n\t/**\n\t * The red tint of the particle at the end of its life.\n\t * This is pulled from endColor in init().\n\t * @property {uint} _eR\n\t * @private\n\t */\n\tthis._eR = 0;\n\t/**\n\t * The green tint of the particle at the end of its life.\n\t * This is pulled from endColor in init().\n\t * @property {uint} _sG\n\t * @private\n\t */\n\tthis._eG = 0;\n\t/**\n\t * The blue tint of the particle at the end of its life.\n\t * This is pulled from endColor in init().\n\t * @property {uint} _sB\n\t * @private\n\t */\n\tthis._eB = 0;\n\t/**\n\t * If alpha should be interpolated at all.\n\t * @property {Boolean} _doAlpha\n\t * @private\n\t */\n\tthis._doAlpha = false;\n\t/**\n\t * If scale should be interpolated at all.\n\t * @property {Boolean} _doScale\n\t * @private\n\t */\n\tthis._doScale = false;\n\t/**\n\t * If speed should be interpolated at all.\n\t * @property {Boolean} _doSpeed\n\t * @private\n\t */\n\tthis._doSpeed = false;\n\t/**\n\t * If acceleration should be handled at all. _doSpeed is mutually exclusive with this,\n\t * and _doSpeed gets priority.\n\t * @property {Boolean} _doAcceleration\n\t * @private\n\t */\n\tthis._doAcceleration = false;\n\t/**\n\t * If color should be interpolated at all.\n\t * @property {Boolean} _doColor\n\t * @private\n\t */\n\tthis._doColor = false;\n\t/**\n\t * If normal movement should be handled. Subclasses wishing to override movement\n\t * can set this to false in init().\n\t * @property {Boolean} _doNormalMovement\n\t * @private\n\t */\n\tthis._doNormalMovement = false;\n\t/**\n\t * One divided by the max life of the particle, saved for slightly faster math.\n\t * @property {Number} _oneOverLife\n\t * @private\n\t */\n\tthis._oneOverLife = 0;\n\n\t/**\n\t * Reference to the next particle in the list.\n\t * @property {Particle} next\n\t * @private\n\t */\n\tthis.next = null;\n\n\t/**\n\t * Reference to the previous particle in the list.\n\t * @property {Particle} prev\n\t * @private\n\t */\n\tthis.prev = null;\n\n\t//save often used functions on the instance instead of the prototype for better speed\n\tthis.init = this.init;\n\tthis.Particle_init = this.Particle_init;\n\tthis.update = this.update;\n\tthis.Particle_update = this.Particle_update;\n\tthis.applyArt = this.applyArt;\n\tthis.kill = this.kill;\n};\n\n// Reference to the prototype\nvar p = Particle.prototype = Object.create(Sprite.prototype);\n\n/**\n * Initializes the particle for use, based on the properties that have to\n * have been set already on the particle.\n * @method PIXI.particles.Particle#init\n */\n/**\n * A reference to init, so that subclasses can access it without the penalty of Function.call()\n * @method PIXI.particles.Particle#Particle_init\n * @protected\n */\np.init = p.Particle_init = function()\n{\n\t//reset the age\n\tthis.age = 0;\n\t//set up the velocity based on the start speed and rotation\n\tthis.velocity.x = this.startSpeed;\n\tthis.velocity.y = 0;\n\tParticleUtils.rotatePoint(this.rotation, this.velocity);\n\tif (this.noRotation)\n\t{\n\t\tthis.rotation = 0;\n\t}\n\telse\n\t{\n\t\t//convert rotation to Radians from Degrees\n\t\tthis.rotation *= ParticleUtils.DEG_TO_RADS;\n\t}\n\t//convert rotation speed to Radians from Degrees\n\tthis.rotationSpeed *= ParticleUtils.DEG_TO_RADS;\n\t//set alpha to inital alpha\n\tthis.alpha = this.startAlpha;\n\t//set scale to initial scale\n\tthis.scale.x = this.scale.y = this.startScale;\n\t//determine start and end color values\n\tif (this.startColor)\n\t{\n\t\tthis._sR = this.startColor[0];\n\t\tthis._sG = this.startColor[1];\n\t\tthis._sB = this.startColor[2];\n\t\tif(this.endColor)\n\t\t{\n\t\t\tthis._eR = this.endColor[0];\n\t\t\tthis._eG = this.endColor[1];\n\t\t\tthis._eB = this.endColor[2];\n\t\t}\n\t}\n\t//figure out what we need to interpolate\n\tthis._doAlpha = this.startAlpha != this.endAlpha;\n\tthis._doSpeed = this.startSpeed != this.endSpeed;\n\tthis._doScale = this.startScale != this.endScale;\n\tthis._doColor = !!this.endColor;\n\tthis._doAcceleration = this.acceleration.x !== 0 || this.acceleration.y !== 0;\n\t//_doNormalMovement can be cancelled by subclasses\n\tthis._doNormalMovement = this._doSpeed || this.startSpeed !== 0 || this._doAcceleration;\n\t//save our lerp helper\n\tthis._oneOverLife = 1 / this.maxLife;\n\t//set the inital color\n\tthis.tint = ParticleUtils.combineRGBComponents(this._sR, this._sG, this._sB);\n\t//ensure visibility\n\tthis.visible = true;\n};\n\n/**\n * Sets the texture for the particle. This can be overridden to allow\n * for an animated particle.\n * @method PIXI.particles.Particle#applyArt\n * @param {PIXI.Texture} art The texture to set.\n */\np.applyArt = function(art)\n{\n\tthis.texture = art || ParticleUtils.EMPTY_TEXTURE;\n};\n\n/**\n * Updates the particle.\n * @method PIXI.particles.Particle#update\n * @param {Number} delta Time elapsed since the previous frame, in __seconds__.\n * @return {Number} The standard interpolation multiplier (0-1) used for all relevant particle\n * properties. A value of -1 means the particle died of old age instead.\n */\n/**\n * A reference to update so that subclasses can access the original without the overhead\n * of Function.call().\n * @method PIXI.particles.Particle#Particle_update\n * @param {Number} delta Time elapsed since the previous frame, in __seconds__.\n * @return {Number} The standard interpolation multiplier (0-1) used for all relevant particle\n * properties. A value of -1 means the particle died of old age instead.\n * @protected\n */\np.update = p.Particle_update = function(delta)\n{\n\t//increase age\n\tthis.age += delta;\n\t//recycle particle if it is too old\n\tif(this.age >= this.maxLife)\n\t{\n\t\tthis.kill();\n\t\treturn -1;\n\t}\n\n\t//determine our interpolation value\n\tvar lerp = this.age * this._oneOverLife;//lifetime / maxLife;\n\tif (this.ease)\n\t{\n\t\tif(this.ease.length == 4)\n\t\t{\n\t\t\t//the t, b, c, d parameters that some tween libraries use\n\t\t\t//(time, initial value, end value, duration)\n\t\t\tlerp = this.ease(lerp, 0, 1, 1);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//the simplified version that we like that takes\n\t\t\t//one parameter, time from 0-1. TweenJS eases provide this usage.\n\t\t\tlerp = this.ease(lerp);\n\t\t}\n\t}\n\n\t//interpolate alpha\n\tif (this._doAlpha)\n\t\tthis.alpha = (this.endAlpha - this.startAlpha) * lerp + this.startAlpha;\n\t//interpolate scale\n\tif (this._doScale)\n\t{\n\t\tvar scale = (this.endScale - this.startScale) * lerp + this.startScale;\n\t\tthis.scale.x = this.scale.y = scale;\n\t}\n\t//handle movement\n\tif(this._doNormalMovement)\n\t{\n\t\t//interpolate speed\n\t\tif (this._doSpeed)\n\t\t{\n\t\t\tvar speed = (this.endSpeed - this.startSpeed) * lerp + this.startSpeed;\n\t\t\tParticleUtils.normalize(this.velocity);\n\t\t\tParticleUtils.scaleBy(this.velocity, speed);\n\t\t}\n\t\telse if(this._doAcceleration)\n\t\t{\n\t\t\tthis.velocity.x += this.acceleration.x * delta;\n\t\t\tthis.velocity.y += this.acceleration.y * delta;\n\t\t\tif (this.maxSpeed)\n\t\t\t{\n\t\t\t\tvar currentSpeed = ParticleUtils.length(this.velocity);\n\t\t\t\t//if we are going faster than we should, clamp at the max speed\n\t\t\t\t//DO NOT recalculate vector length\n\t\t\t\tif (currentSpeed > this.maxSpeed)\n\t\t\t\t{\n\t\t\t\t\tParticleUtils.scaleBy(this.velocity, this.maxSpeed / currentSpeed);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//adjust position based on velocity\n\t\tthis.position.x += this.velocity.x * delta;\n\t\tthis.position.y += this.velocity.y * delta;\n\t}\n\t//interpolate color\n\tif (this._doColor)\n\t{\n\t\tvar r = (this._eR - this._sR) * lerp + this._sR;\n\t\tvar g = (this._eG - this._sG) * lerp + this._sG;\n\t\tvar b = (this._eB - this._sB) * lerp + this._sB;\n\t\tthis.tint = ParticleUtils.combineRGBComponents(r, g, b);\n\t}\n\t//update rotation\n\tif(this.rotationSpeed !== 0)\n\t{\n\t\tthis.rotation += this.rotationSpeed * delta;\n\t}\n\telse if(this.acceleration && !this.noRotation)\n\t{\n\t\tthis.rotation = Math.atan2(this.velocity.y, this.velocity.x);// + Math.PI / 2;\n\t}\n\treturn lerp;\n};\n\n/**\n * Kills the particle, removing it from the display list\n * and telling the emitter to recycle it.\n * @method PIXI.particles.Particle#kill\n */\np.kill = function()\n{\n\tthis.emitter.recycle(this);\n};\n\np.Sprite_Destroy = Sprite.prototype.destroy;\n/**\n * Destroys the particle, removing references and preventing future use.\n * @method PIXI.particles.Particle#destroy\n */\np.destroy = function()\n{\n\tif (this.parent)\n\t\tthis.parent.removeChild(this);\n\tif (this.Sprite_Destroy)\n\t\tthis.Sprite_Destroy();\n\tthis.emitter = this.velocity = this.startColor = this.endColor = this.ease =\n\t\tthis.next = this.prev = null;\n};\n\n/**\n * Checks over the art that was passed to the Emitter's init() function, to do any special\n * modifications to prepare it ahead of time.\n * @method PIXI.particles.Particle.parseArt\n * @static\n * @param {Array} art The array of art data. For Particle, it should be an array of Textures.\n * Any strings in the array will be converted to Textures via\n * Texture.fromImage().\n * @return {Array} The art, after any needed modifications.\n */\nParticle.parseArt = function(art)\n{\n\t//convert any strings to Textures.\n\tvar i;\n\tfor(i = art.length; i >= 0; --i)\n\t{\n\t\tif(typeof art[i] == \"string\")\n\t\t\tart[i] = PIXI.Texture.fromImage(art[i]);\n\t}\n\t//particles from different base textures will be slower in WebGL than if they\n\t//were from one spritesheet\n\tif(ParticleUtils.verbose)\n\t{\n\t\tfor(i = art.length - 1; i > 0; --i)\n\t\t{\n\t\t\tif(art[i].baseTexture != art[i - 1].baseTexture)\n\t\t\t{\n\t\t\t\tif (window.console)\n\t\t\t\t\tconsole.warn(\"PixiParticles: using particle textures from different images may hinder performance in WebGL\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn art;\n};\n\n/**\n * Parses extra emitter data to ensure it is set up for this particle class.\n * Particle does nothing to the extra data.\n * @method PIXI.particles.Particle.parseData\n * @static\n * @param {Object} extraData The extra data from the particle config.\n * @return {Object} The parsed extra data.\n */\nParticle.parseData = function(extraData)\n{\n\treturn extraData;\n};\n\nmodule.exports = Particle;","\"use strict\";\n\nvar BLEND_MODES = PIXI.BLEND_MODES || PIXI.blendModes;\nvar Texture = PIXI.Texture;\n\n/**\n * Contains helper functions for particles and emitters to use.\n * @memberof PIXI.particles\n * @class ParticleUtils\n * @static\n */\nvar ParticleUtils = {};\n\n/**\n * If errors and warnings should be logged within the library.\n * @name PIXI.particles.ParticleUtils.verbose\n * @default false\n * @static\n */\nParticleUtils.verbose = false;\n\nvar DEG_TO_RADS = ParticleUtils.DEG_TO_RADS = Math.PI / 180;\n\nvar empty = ParticleUtils.EMPTY_TEXTURE = Texture.EMPTY;\n//prevent any events from being used on the empty texture, as well as destruction of it\n//v4 of Pixi does this, but doing it again won't hurt\nempty.on = empty.destroy = empty.once = empty.emit = function() {};\n\n/**\n * Rotates a point by a given angle.\n * @method PIXI.particles.ParticleUtils.rotatePoint\n * @param {Number} angle The angle to rotate by in degrees\n * @param {PIXI.Point} p The point to rotate around 0,0.\n * @static\n */\nParticleUtils.rotatePoint = function(angle, p)\n{\n\tif(!angle) return;\n\tangle *= DEG_TO_RADS;\n\tvar s = Math.sin(angle);\n\tvar c = Math.cos(angle);\n\tvar xnew = p.x * c - p.y * s;\n\tvar ynew = p.x * s + p.y * c;\n\tp.x = xnew;\n\tp.y = ynew;\n};\n\n/**\n * Combines separate color components (0-255) into a single uint color.\n * @method PIXI.particles.ParticleUtils.combineRGBComponents\n * @param {uint} r The red value of the color\n * @param {uint} g The green value of the color\n * @param {uint} b The blue value of the color\n * @return {uint} The color in the form of 0xRRGGBB\n * @static\n */\nParticleUtils.combineRGBComponents = function(r, g, b/*, a*/)\n{\n\treturn /*a << 24 |*/ r << 16 | g << 8 | b;\n};\n\n/**\n * Reduces the point to a length of 1.\n * @method PIXI.particles.ParticleUtils.normalize\n * @static\n * @param {PIXI.Point} point The point to normalize\n */\nParticleUtils.normalize = function(point)\n{\n\tvar oneOverLen = 1 / ParticleUtils.length(point);\n\tpoint.x *= oneOverLen;\n\tpoint.y *= oneOverLen;\n};\n\n/**\n * Multiplies the x and y values of this point by a value.\n * @method PIXI.particles.ParticleUtils.scaleBy\n * @static\n * @param {PIXI.Point} point The point to scaleBy\n * @param value {Number} The value to scale by.\n */\nParticleUtils.scaleBy = function(point, value)\n{\n\tpoint.x *= value;\n\tpoint.y *= value;\n};\n\n/**\n * Returns the length (or magnitude) of this point.\n * @method PIXI.particles.ParticleUtils.length\n * @static\n * @param {PIXI.Point} point The point to measure length\n * @return The length of this point.\n */\nParticleUtils.length = function(point)\n{\n\treturn Math.sqrt(point.x * point.x + point.y * point.y);\n};\n\n/**\n * Converts a hex string from \"#AARRGGBB\", \"#RRGGBB\", \"0xAARRGGBB\", \"0xRRGGBB\",\n * \"AARRGGBB\", or \"RRGGBB\" to an array of ints of 0-255 or Numbers from 0-1, as\n * [r, g, b, (a)].\n * @method PIXI.particles.ParticleUtils.hexToRGB\n * @param {String} color The input color string.\n * @param {Array} output An array to put the output in. If omitted, a new array is created.\n * @return The array of numeric color values.\n * @static\n */\nParticleUtils.hexToRGB = function(color, output)\n{\n\tif (output)\n\t\toutput.length = 0;\n\telse\n\t\toutput = [];\n\tif (color.charAt(0) == \"#\")\n\t\tcolor = color.substr(1);\n\telse if (color.indexOf(\"0x\") === 0)\n\t\tcolor = color.substr(2);\n\tvar alpha;\n\tif (color.length == 8)\n\t{\n\t\talpha = color.substr(0, 2);\n\t\tcolor = color.substr(2);\n\t}\n\toutput.push(parseInt(color.substr(0, 2), 16));//Red\n\toutput.push(parseInt(color.substr(2, 2), 16));//Green\n\toutput.push(parseInt(color.substr(4, 2), 16));//Blue\n\tif (alpha)\n\t\toutput.push(parseInt(alpha, 16));\n\treturn output;\n};\n\n/**\n * Generates a custom ease function, based on the GreenSock custom ease, as demonstrated\n * by the related tool at http://www.greensock.com/customease/.\n * @method PIXI.particles.ParticleUtils.generateEase\n * @param {Array} segments An array of segments, as created by\n * http://www.greensock.com/customease/.\n * @return {Function} A function that calculates the percentage of change at\n * a given point in time (0-1 inclusive).\n * @static\n */\nParticleUtils.generateEase = function(segments)\n{\n\tvar qty = segments.length;\n\tvar oneOverQty = 1 / qty;\n\t/*\n\t * Calculates the percentage of change at a given point in time (0-1 inclusive).\n\t * @param {Number} time The time of the ease, 0-1 inclusive.\n\t * @return {Number} The percentage of the change, 0-1 inclusive (unless your\n\t * ease goes outside those bounds).\n\t */\n\tvar simpleEase = function(time)\n\t{\n\t\tvar t, s;\n\t\tvar i = (qty * time) | 0;//do a quick floor operation\n\t\tt = (time - (i * oneOverQty)) * qty;\n\t\ts = segments[i] || segments[qty - 1];\n\t\treturn (s.s + t * (2 * (1 - t) * (s.cp - s.s) + t * (s.e - s.s)));\n\t};\n\treturn simpleEase;\n};\n\n/**\n * Gets a blend mode, ensuring that it is valid.\n * @method PIXI.particles.ParticleUtils.getBlendMode\n * @param {String} name The name of the blend mode to get.\n * @return {int} The blend mode as specified in the PIXI.blendModes enumeration.\n * @static\n */\nParticleUtils.getBlendMode = function(name)\n{\n\tif (!name) return BLEND_MODES.NORMAL;\n\tname = name.toUpperCase();\n\twhile (name.indexOf(\" \") >= 0)\n\t\tname = name.replace(\" \", \"_\");\n\treturn BLEND_MODES[name] || BLEND_MODES.NORMAL;\n};\n\nmodule.exports = ParticleUtils;","\"use strict\";\n\nvar ParticleUtils = require(\"./ParticleUtils\"),\n\tParticle = require(\"./Particle\");\n\n/**\n * An particle that follows a path defined by an algebraic expression, e.g. \"sin(x)\" or\n * \"5x + 3\".\n * To use this class, the particle config must have a \"path\" string in the\n * \"extraData\" parameter. This string should have \"x\" in it to represent movement (from the\n * speed settings of the particle). It may have numbers, parentheses, the four basic\n * operations, and the following Math functions or properties (without the preceding \"Math.\"):\n * \"pow\", \"sqrt\", \"abs\", \"floor\", \"round\", \"ceil\", \"E\", \"PI\", \"sin\", \"cos\", \"tan\", \"asin\",\n * \"acos\", \"atan\", \"atan2\", \"log\".\n * The overall movement of the particle and the expression value become x and y positions for\n * the particle, respectively. The final position is rotated by the spawn rotation/angle of\n * the particle.\n *\n * Some example paths:\n *\n * \t\"sin(x/10) * 20\" // A sine wave path.\n * \t\"cos(x/100) * 30\" // Particles curve counterclockwise (for medium speed/low lifetime particles)\n * \t\"pow(x/10, 2) / 2\" // Particles curve clockwise (remember, +y is down).\n *\n * @memberof PIXI.particles\n * @class PathParticle\n * @extends PIXI.particles.Particle\n * @constructor\n * @param {PIXI.particles.Emitter} emitter The emitter that controls this PathParticle.\n */\nvar PathParticle = function(emitter)\n{\n\tParticle.call(this, emitter);\n\t/**\n\t * The function representing the path the particle should take.\n\t * @property {Function} path\n\t */\n\tthis.path = null;\n\t/**\n\t * The initial rotation in degrees of the particle, because the direction of the path\n\t * is based on that.\n\t * @property {Number} initialRotation\n\t */\n\tthis.initialRotation = 0;\n\t/**\n\t * The initial position of the particle, as all path movement is added to that.\n\t * @property {PIXI.Point} initialPosition\n\t */\n\tthis.initialPosition = new PIXI.Point();\n\t/**\n\t * Total single directional movement, due to speed.\n\t * @property {Number} movement\n\t */\n\tthis.movement = 0;\n};\n\n// Reference to the super class\nvar s = Particle.prototype;\n// Reference to the prototype\nvar p = PathParticle.prototype = Object.create(s);\n\n/**\n * A helper point for math things.\n * @property {Function} helperPoint\n * @private\n * @static\n */\nvar helperPoint = new PIXI.Point();\n\n/**\n * Initializes the particle for use, based on the properties that have to\n * have been set already on the particle.\n * @method PIXI.particles.PathParticle#init\n */\np.init = function()\n{\n\t//get initial rotation before it is converted to radians\n\tthis.initialRotation = this.rotation;\n\t//standard init\n\tthis.Particle_init();\n\n\t//set the path for the particle\n\tthis.path = this.extraData.path;\n\t//cancel the normal movement behavior\n\tthis._doNormalMovement = !this.path;\n\t//reset movement\n\tthis.movement = 0;\n\t//grab position\n\tthis.initialPosition.x = this.position.x;\n\tthis.initialPosition.y = this.position.y;\n};\n\n//a hand picked list of Math functions (and a couple properties) that are allowable.\n//they should be used without the preceding \"Math.\"\nvar MATH_FUNCS =\n[\n\t\"pow\",\n\t\"sqrt\",\n\t\"abs\",\n\t\"floor\",\n\t\"round\",\n\t\"ceil\",\n\t\"E\",\n\t\"PI\",\n\t\"sin\",\n\t\"cos\",\n\t\"tan\",\n\t\"asin\",\n\t\"acos\",\n\t\"atan\",\n\t\"atan2\",\n\t\"log\"\n];\n//Allow the 4 basic operations, parentheses and all numbers/decimals, as well\n//as 'x', for the variable usage.\nvar WHITELISTER = \"[01234567890\\\\.\\\\*\\\\-\\\\+\\\\/\\\\(\\\\)x ,]\";\n//add the math functions to the regex string.\nfor(var index = MATH_FUNCS.length - 1; index >= 0; --index)\n{\n\tWHITELISTER += \"|\" + MATH_FUNCS[index];\n}\n//create an actual regular expression object from the string\nWHITELISTER = new RegExp(WHITELISTER, \"g\");\n\n/**\n * Parses a string into a function for path following.\n * This involves whitelisting the string for safety, inserting \"Math.\" to math function\n * names, and using eval() to generate a function.\n * @method PIXI.particles.PathParticle~parsePath\n * @private\n * @static\n * @param {String} pathString The string to parse.\n * @return {Function} The path function - takes x, outputs y.\n */\nvar parsePath = function(pathString)\n{\n\tvar rtn;\n\tvar matches = pathString.match(WHITELISTER);\n\tfor(var i = matches.length - 1; i >= 0; --i)\n\t{\n\t\tif(MATH_FUNCS.indexOf(matches[i]) >= 0)\n\t\t\tmatches[i] = \"Math.\" + matches[i];\n\t}\n\tpathString = matches.join(\"\");\n\teval(\"rtn = function(x){ return \" + pathString + \"; };\");// jshint ignore:line\n\treturn rtn;\n};\n\n/**\n * Updates the particle.\n * @method PIXI.particles.PathParticle#update\n * @param {Number} delta Time elapsed since the previous frame, in __seconds__.\n */\np.update = function(delta)\n{\n\tvar lerp = this.Particle_update(delta);\n\t//if the particle died during the update, then don't bother\n\tif(lerp >= 0 && this.path)\n\t{\n\t\t//increase linear movement based on speed\n\t\tvar speed = (this.endSpeed - this.startSpeed) * lerp + this.startSpeed;\n\t\tthis.movement += speed * delta;\n\t\t//set up the helper point for rotation\n\t\thelperPoint.x = this.movement;\n\t\thelperPoint.y = this.path(this.movement);\n\t\tParticleUtils.rotatePoint(this.initialRotation, helperPoint);\n\t\tthis.position.x = this.initialPosition.x + helperPoint.x;\n\t\tthis.position.y = this.initialPosition.y + helperPoint.y;\n\t}\n};\n\np.Particle_destroy = Particle.prototype.destroy;\n/**\n * Destroys the particle, removing references and preventing future use.\n * @method PIXI.particles.PathParticle#destroy\n */\np.destroy = function()\n{\n\tthis.Particle_destroy();\n\tthis.path = this.initialPosition = null;\n};\n\n/**\n * Checks over the art that was passed to the Emitter's init() function, to do any special\n * modifications to prepare it ahead of time. This just runs Particle.parseArt().\n * @method PIXI.particles.PathParticle.parseArt\n * @static\n * @param {Array} art The array of art data. For Particle, it should be an array of Textures.\n * Any strings in the array will be converted to Textures via\n * Texture.fromImage().\n * @return {Array} The art, after any needed modifications.\n */\nPathParticle.parseArt = function(art)\n{\n\treturn Particle.parseArt(art);\n};\n\n/**\n * Parses extra emitter data to ensure it is set up for this particle class.\n * PathParticle checks for the existence of path data, and parses the path data for use\n * by particle instances.\n * @method PIXI.particles.PathParticle.parseData\n * @static\n * @param {Object} extraData The extra data from the particle config.\n * @return {Object} The parsed extra data.\n */\nPathParticle.parseData = function(extraData)\n{\n\tvar output = {};\n\tif(extraData && extraData.path)\n\t{\n\t\ttry\n\t\t{\n\t\t\toutput.path = parsePath(extraData.path);\n\t\t}\n\t\tcatch(e)\n\t\t{\n\t\t\tif(ParticleUtils.verbose)\n\t\t\t\tconsole.error(\"PathParticle: error in parsing path expression\");\n\t\t\toutput.path = null;\n\t\t}\n\t}\n\telse\n\t{\n\t\tif(ParticleUtils.verbose)\n\t\t\tconsole.error(\"PathParticle requires a path string in extraData!\");\n\t\toutput.path = null;\n\t}\n\treturn output;\n};\n\nmodule.exports = PathParticle;","require(\"./polyfills.js\");\nexports.ParticleUtils = require(\"./ParticleUtils.js\");\nexports.Particle = require(\"./Particle.js\");\nexports.Emitter = require(\"./Emitter.js\");\nexports.PathParticle = require(\"./PathParticle.js\");\nexports.AnimatedParticle = require(\"./AnimatedParticle.js\");\nrequire(\"./deprecation.js\");","/**\n * Add methods to Array\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty\n * @class Array\n */\n\n/**\n * Shuffles the array\n * @method shuffle\n * @return {Array} The array, for chaining calls.\n */\nif(!Array.prototype.shuffle)\n{\n\t// In EcmaScript 5 specs and browsers that support it you can use the Object.defineProperty\n\t// to make it not enumerable set the enumerable property to false\n\tObject.defineProperty(Array.prototype, 'shuffle', {\n\t\tenumerable: false,\n\t\twritable:false,\n\t\tvalue: function() {\n\t\t\tfor(var j, x, i = this.length; i; j = Math.floor(Math.random() * i), x = this[--i], this[i] = this[j], this[j] = x);\n\t\t\treturn this;\n\t\t}\n\t});\n}\n\n/**\n * Get a random item from an array\n * @method random\n * @return {*} The random item\n */\nif(!Array.prototype.random)\n{\n\tObject.defineProperty(Array.prototype, 'random', {\n\t\tenumerable: false,\n\t\twritable: false,\n\t\tvalue: function() {\n\t\t\treturn this[Math.floor(Math.random() * this.length)];\n\t\t}\n\t});\n}","\"use strict\";\n\n// Check for window, fallback to global\nvar global = typeof window !== 'undefined' ? window : GLOBAL;\n\n//ensure that the particles namespace exist - PIXI 4 creates it itself, PIXI 3 does not\nif (!global.PIXI.particles) {\n\tglobal.PIXI.particles = {};\n}\n\n// Export for Node-compatible environments like Electron\nif (typeof module !== 'undefined' && module.exports)\n{\n\t// Attempt to require the pixi module\n\tif (typeof PIXI === 'undefined')\n\t{\n\t\t// Include the Pixi.js module\n\t\trequire('pixi.js');\n\t}\n\n\t// Export the module\n\tmodule.exports = global.PIXI.particles || particles;\n}\n// If we're in the browser make sure PIXI is available\nelse if (typeof PIXI === 'undefined')\n{\n\tthrow \"pixi-particles requires pixi.js to be loaded first\";\n}\n\n// get the library itself\nvar particles = require('./particles');\n\n// insert the lirbary into the particles namespace on PIXI\nfor (var prop in particles) {\n\tglobal.PIXI.particles[prop] = particles[prop];\n}"],"sourceRoot":"."} \ No newline at end of file diff --git a/index.d.ts b/index.d.ts index 85bee8aa..a9badb6d 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,4 +1,4 @@ -// Typings for pixi-particles 2.1.4, requires Pixi.js typings +// Typings for pixi-particles 2.1.5, requires Pixi.js typings declare namespace particles { type TexSrc = string|PIXI.Texture; diff --git a/package.json b/package.json index f3c9e5c4..92959d52 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pixi-particles", - "version": "2.1.4", + "version": "2.1.5", "main": "dist/pixi-particles.min.js", "typings": "index.d.ts", "description": "Particle emitter for Pixi.js",