From f582387f383004f72b48808c2ab7b0d8858b83fb Mon Sep 17 00:00:00 2001 From: andrewstart Date: Sat, 14 Jan 2017 21:10:51 -0500 Subject: [PATCH] Added built files for 2.1.0 --- dist/pixi-particles.js | 5 +++-- dist/pixi-particles.js.map | 2 +- dist/pixi-particles.min.js | 4 ++-- dist/pixi-particles.min.js.map | 2 +- package.json | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/dist/pixi-particles.js b/dist/pixi-particles.js index 6e325bc9..f1a2de9a 100644 --- a/dist/pixi-particles.js +++ b/dist/pixi-particles.js @@ -1,6 +1,6 @@ /*! - * pixi-particles - v2.0.0 - * Compiled Sat, 14 Jan 2017 22:39:18 UTC + * pixi-particles - v2.1.0 + * Compiled Sun, 15 Jan 2017 02:03:29 UTC * * pixi-particles is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license @@ -876,6 +876,7 @@ p.init = function(art, config) * Recycles an individual particle. * @method recycle * @param {Particle} particle The particle to recycle. + * @private */ p.recycle = function(particle) { diff --git a/dist/pixi-particles.js.map b/dist/pixi-particles.js.map index c0e1b714..0ea3bd7a 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;;ACxpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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 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 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 * @property {Number} 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 * @property {Function} 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* @property {PIXI.DisplayObjectContainer} 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 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 recycle\n * @param {Particle} particle The particle to recycle.\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 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 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 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 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 * @property {Boolean} 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 * @property {Boolean} 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 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 / ticker.speed / 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 _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 _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 _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 _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 _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 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 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 init\n */\n/**\n * A reference to init, so that subclasses can access it without the penalty of Function.call()\n * @method Particle_init\n * @private\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 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 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 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 * @private\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 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 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 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 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 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 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 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 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 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 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;;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 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 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 * @property {Number} 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 * @property {Function} 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* @property {PIXI.DisplayObjectContainer} 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 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 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 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 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 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 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 * @property {Boolean} 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 * @property {Boolean} 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 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 / ticker.speed / 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 _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 _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 _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 _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 _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 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 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 init\n */\n/**\n * A reference to init, so that subclasses can access it without the penalty of Function.call()\n * @method Particle_init\n * @private\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 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 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 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 * @private\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 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 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 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 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 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 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 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 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 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 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 68081250..e2c8d2c2 100644 --- a/dist/pixi-particles.min.js +++ b/dist/pixi-particles.min.js @@ -1,6 +1,6 @@ /*! - * pixi-particles - v2.0.0 - * Compiled Sat, 14 Jan 2017 22:39:18 UTC + * pixi-particles - v2.1.0 + * Compiled Sun, 15 Jan 2017 02:03:30 UTC * * pixi-particles is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license diff --git a/dist/pixi-particles.min.js.map b/dist/pixi-particles.min.js.map index d5ec2a0f..9cf79646 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,GAAAK,EAAAA,GAAA,mBAAAC,QAAAA,OAAA,mBAAAC,QAAAA,OAAA,mBAAAC,MAAAA,KAAAC,KAAAJ,EAAAK,cAAAV,MAAA,WAAA,GAAAG,QAAAD,OAAAD,OAAA,OAAA,SAAAU,GAAAC,EAAAC,EAAAC,GAAA,QAAAC,GAAAC,EAAAC,GAAA,IAAAJ,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,GAAAE,GAAA,kBAAAC,UAAAA,OAAA,KAAAF,GAAAC,EAAA,MAAAA,GAAAF,GAAA,EAAA,IAAAI,EAAA,MAAAA,GAAAJ,GAAA,EAAA,IAAAhB,GAAA,GAAAqB,OAAA,uBAAAL,EAAA,IAAA,MAAAhB,GAAAsB,KAAA,mBAAAtB,EAAA,GAAAuB,GAAAV,EAA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AA/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 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 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 * @property {Number} 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 * @property {Function} 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* @property {PIXI.DisplayObjectContainer} 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 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 recycle\n * @param {Particle} particle The particle to recycle.\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 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 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 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 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 * @property {Boolean} 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 * @property {Boolean} 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 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 / ticker.speed / 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 _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 _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 _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 _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 _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 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 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 init\n */\n/**\n * A reference to init, so that subclasses can access it without the penalty of Function.call()\n * @method Particle_init\n * @private\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 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 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 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 * @private\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 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 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 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 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 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 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 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 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 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 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","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,Q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,EAAA,sBACAlB,EAAA2B,SAAAT,EAAA,iBACAlB,EAAAoE,QAAAlD,EAAA,gBACAlB,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 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 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 * @property {Number} 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 * @property {Function} 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* @property {PIXI.DisplayObjectContainer} 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 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 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 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 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 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 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 * @property {Boolean} 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 * @property {Boolean} 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 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 / ticker.speed / 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 _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 _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 _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 _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 _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 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 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 init\n */\n/**\n * A reference to init, so that subclasses can access it without the penalty of Function.call()\n * @method Particle_init\n * @private\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 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 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 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 * @private\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 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 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 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 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 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 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 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 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 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 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/package.json b/package.json index 4f457942..e30164b6 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "start": "npm run build -- --watch", "predocs-live": "npm run docs", "docs-live": "gh-pages -d docs", - "postversion": "npm run build && npm test", + "postversion": "npm run build", "publish:patch": "npm version patch && npm publish", "publish:minor": "npm version minor && npm publish", "publish:major": "npm version major && npm publish",