diff --git a/bower.json b/bower.json index f95f57a4..83c715bd 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pixi-particles", - "version": "1.6.2", + "version": "1.6.3", "main": "dist/pixi-particles.min.js", "dependencies": { "pixi.js": "*" diff --git a/dist/modules/animated-particle.js b/dist/modules/animated-particle.js index c88205ae..2fad67d3 100644 --- a/dist/modules/animated-particle.js +++ b/dist/modules/animated-particle.js @@ -1,4 +1,4 @@ -/*! pixi-particles 1.6.2 */ +/*! pixi-particles 1.6.3 */ /** * @module Animated Particle * @namespace PIXI.particles @@ -150,13 +150,14 @@ } }; + p.Particle_destroy = Particle.prototype.destroy; /** * Destroys the particle, removing references and preventing future use. * @method destroy */ p.destroy = function() { - s.destroy.call(this); + this.Particle_destroy(); }; /** diff --git a/dist/modules/animated-particle.min.js b/dist/modules/animated-particle.min.js index 7e668ae6..e2a7f8f7 100644 --- a/dist/modules/animated-particle.min.js +++ b/dist/modules/animated-particle.min.js @@ -1,2 +1,2 @@ -/*! pixi-particles 1.6.2 */ -!function(){"use strict";!function(a,b){"use strict";var c=a.particles.ParticleUtils,d=a.particles.Particle,e=a.Texture,f=c.useAPI3,g=function(a){d.call(this,a),this.textures=null,this.duration=0,this.framerate=0,this.elapsed=0,this.loop=!1},h=d.prototype,i=g.prototype=Object.create(h);i.init=function(){this.Particle_init(),this.elapsed=0,this.framerate<0&&(this.duration=this.maxLife,this.framerate=this.textures.length/this.duration)},i.applyArt=function(a){this.textures=a.textures,this.framerate=a.framerate,this.duration=a.duration,this.loop=a.loop},i.update=function(a){if(this.Particle_update(a)>=0){this.elapsed+=a,this.elapsed>this.duration&&(this.loop?this.elapsed=this.elapsed%this.duration:this.elapsed=this.duration-1e-6);var b=this.elapsed*this.framerate+1e-7|0;f?this.texture=this.textures[b]:this.setTexture(this.textures[b])}},i.destroy=function(){h.destroy.call(this)},g.parseArt=function(a){var b,c,d,f,g,h,i=[];for(b=0;b0;--j)h.push(g)}"matchLife"==c.framerate?(i.framerate=-1,i.duration=0,i.loop=!1):(i.loop=!!c.loop,i.framerate=c.framerate>0?c.framerate:60,i.duration=h.length/i.framerate)}return a},a.particles.AnimatedParticle=g}(PIXI);}(); \ No newline at end of file +/*! pixi-particles 1.6.3 */ +!function(){"use strict";!function(a,b){"use strict";var c=a.particles.ParticleUtils,d=a.particles.Particle,e=a.Texture,f=c.useAPI3,g=function(a){d.call(this,a),this.textures=null,this.duration=0,this.framerate=0,this.elapsed=0,this.loop=!1},h=d.prototype,i=g.prototype=Object.create(h);i.init=function(){this.Particle_init(),this.elapsed=0,this.framerate<0&&(this.duration=this.maxLife,this.framerate=this.textures.length/this.duration)},i.applyArt=function(a){this.textures=a.textures,this.framerate=a.framerate,this.duration=a.duration,this.loop=a.loop},i.update=function(a){if(this.Particle_update(a)>=0){this.elapsed+=a,this.elapsed>this.duration&&(this.loop?this.elapsed=this.elapsed%this.duration:this.elapsed=this.duration-1e-6);var b=this.elapsed*this.framerate+1e-7|0;f?this.texture=this.textures[b]:this.setTexture(this.textures[b])}},i.Particle_destroy=d.prototype.destroy,i.destroy=function(){this.Particle_destroy()},g.parseArt=function(a){var b,c,d,f,g,h,i=[];for(b=0;b0;--j)h.push(g)}"matchLife"==c.framerate?(i.framerate=-1,i.duration=0,i.loop=!1):(i.loop=!!c.loop,i.framerate=c.framerate>0?c.framerate:60,i.duration=h.length/i.framerate)}return a},a.particles.AnimatedParticle=g}(PIXI);}(); \ No newline at end of file diff --git a/dist/modules/path-particle.js b/dist/modules/path-particle.js index 1fd170fb..e1e94b05 100644 --- a/dist/modules/path-particle.js +++ b/dist/modules/path-particle.js @@ -1,4 +1,4 @@ -/*! pixi-particles 1.6.2 */ +/*! pixi-particles 1.6.3 */ /** * @module Path Particle * @namespace PIXI.particles @@ -174,13 +174,14 @@ } }; + p.Particle_destroy = Particle.prototype.destroy; /** * Destroys the particle, removing references and preventing future use. * @method destroy */ p.destroy = function() { - s.destroy.call(this); + this.Particle_destroy(); }; /** diff --git a/dist/modules/path-particle.min.js b/dist/modules/path-particle.min.js index 09b057f2..f6060037 100644 --- a/dist/modules/path-particle.min.js +++ b/dist/modules/path-particle.min.js @@ -1,2 +1,2 @@ -/*! pixi-particles 1.6.2 */ -!function(){"use strict";!function(PIXI,undefined){"use strict";var ParticleUtils=PIXI.particles.ParticleUtils,Particle=PIXI.particles.Particle,PathParticle=function(a){Particle.call(this,a),this.path=null,this.initialRotation=0,this.initialPosition=new PIXI.Point,this.movement=0},s=Particle.prototype,p=PathParticle.prototype=Object.create(s),helperPoint=new PIXI.Point;p.init=function(){this.initialRotation=this.rotation,this.Particle_init(),this.path=this.extraData.path,this._doNormalMovement=!this.path,this.movement=0,this.initialPosition.x=this.position.x,this.initialPosition.y=this.position.y};for(var MATH_FUNCS=["pow","sqrt","abs","floor","round","ceil","E","PI","sin","cos","tan","asin","acos","atan","atan2","log"],WHITELISTER="[01234567890\\.\\*\\-\\+\\/\\(\\)x ,]",index=MATH_FUNCS.length-1;index>=0;--index)WHITELISTER+="|"+MATH_FUNCS[index];WHITELISTER=new RegExp(WHITELISTER,"g");var parsePath=function(pathString){for(var rtn,matches=pathString.match(WHITELISTER),i=matches.length-1;i>=0;--i)MATH_FUNCS.indexOf(matches[i])>=0&&(matches[i]="Math."+matches[i]);return pathString=matches.join(""),eval("rtn = function(x){ return "+pathString+"; };"),rtn};p.update=function(a){var b=this.Particle_update(a);if(b>=0&&this.path){var c=(this.endSpeed-this.startSpeed)*b+this.startSpeed;this.movement+=c*a,helperPoint.x=this.movement,helperPoint.y=this.path(this.movement),ParticleUtils.rotatePoint(this.initialRotation,helperPoint),this.position.x=this.initialPosition.x+helperPoint.x,this.position.y=this.initialPosition.y+helperPoint.y}},p.destroy=function(){s.destroy.call(this)},PathParticle.parseArt=function(a){return Particle.parseArt(a)},PathParticle.parseData=function(a){var b={};if(a&&a.path)try{b.path=parsePath(a.path)}catch(c){b.path=null}else b.path=null;return b},PIXI.particles.PathParticle=PathParticle}(PIXI);}(); \ No newline at end of file +/*! pixi-particles 1.6.3 */ +!function(){"use strict";!function(PIXI,undefined){"use strict";var ParticleUtils=PIXI.particles.ParticleUtils,Particle=PIXI.particles.Particle,PathParticle=function(a){Particle.call(this,a),this.path=null,this.initialRotation=0,this.initialPosition=new PIXI.Point,this.movement=0},s=Particle.prototype,p=PathParticle.prototype=Object.create(s),helperPoint=new PIXI.Point;p.init=function(){this.initialRotation=this.rotation,this.Particle_init(),this.path=this.extraData.path,this._doNormalMovement=!this.path,this.movement=0,this.initialPosition.x=this.position.x,this.initialPosition.y=this.position.y};for(var MATH_FUNCS=["pow","sqrt","abs","floor","round","ceil","E","PI","sin","cos","tan","asin","acos","atan","atan2","log"],WHITELISTER="[01234567890\\.\\*\\-\\+\\/\\(\\)x ,]",index=MATH_FUNCS.length-1;index>=0;--index)WHITELISTER+="|"+MATH_FUNCS[index];WHITELISTER=new RegExp(WHITELISTER,"g");var parsePath=function(pathString){for(var rtn,matches=pathString.match(WHITELISTER),i=matches.length-1;i>=0;--i)MATH_FUNCS.indexOf(matches[i])>=0&&(matches[i]="Math."+matches[i]);return pathString=matches.join(""),eval("rtn = function(x){ return "+pathString+"; };"),rtn};p.update=function(a){var b=this.Particle_update(a);if(b>=0&&this.path){var c=(this.endSpeed-this.startSpeed)*b+this.startSpeed;this.movement+=c*a,helperPoint.x=this.movement,helperPoint.y=this.path(this.movement),ParticleUtils.rotatePoint(this.initialRotation,helperPoint),this.position.x=this.initialPosition.x+helperPoint.x,this.position.y=this.initialPosition.y+helperPoint.y}},p.Particle_destroy=Particle.prototype.destroy,p.destroy=function(){this.Particle_destroy()},PathParticle.parseArt=function(a){return Particle.parseArt(a)},PathParticle.parseData=function(a){var b={};if(a&&a.path)try{b.path=parsePath(a.path)}catch(c){b.path=null}else b.path=null;return b},PIXI.particles.PathParticle=PathParticle}(PIXI);}(); \ No newline at end of file diff --git a/dist/pixi-particles.js b/dist/pixi-particles.js index 3cfb8ef3..d9def115 100644 --- a/dist/pixi-particles.js +++ b/dist/pixi-particles.js @@ -1,4 +1,4 @@ -/*! pixi-particles 1.6.2 */ +/*! pixi-particles 1.6.3 */ /** * @module Pixi Particles * @namespace window @@ -42,7 +42,7 @@ if(!Array.prototype.random) return this[Math.floor(Math.random() * this.length)]; } }); -} +} /** * @module Pixi Particles * @namespace PIXI.particles @@ -86,7 +86,7 @@ if(!Array.prototype.random) // Assign to global namespace global.PIXI.particles = particles; -}()); +}()); /** * @module Pixi Particles * @namespace PIXI.particles @@ -107,7 +107,7 @@ if(!Array.prototype.random) var DEG_TO_RADS = ParticleUtils.DEG_TO_RADS = Math.PI / 180; ParticleUtils.useAPI3 = false; - // avoid the string replacement of '"1.6.2"' + // avoid the string replacement of '"1.6.3"' var version = PIXI["VER"+"SION"];// jshint ignore:line if(version && parseInt(version.substring(0, version.indexOf("."))) >= 3) { @@ -268,7 +268,7 @@ if(!Array.prototype.random) PIXI.particles.ParticleUtils = ParticleUtils; -}(PIXI)); +}(PIXI)); /** * @module Pixi Particles * @namespace PIXI.particles @@ -673,12 +673,15 @@ if(!Array.prototype.random) this.emitter.recycle(this); }; + p.Sprite_Destroy = Sprite.prototype.destroy; /** * Destroys the particle, removing references and preventing future use. * @method destroy */ p.destroy = function() { + if (this.Sprite_Destroy) + this.Sprite_Destroy(); this.emitter = this.velocity = this.startColor = this.endColor = this.ease = this.next = this.prev = null; }; @@ -736,7 +739,7 @@ if(!Array.prototype.random) PIXI.particles.Particle = Particle; }(PIXI)); - + /** * @module Pixi Particles * @namespace PIXI.particles @@ -1800,9 +1803,14 @@ if(!Array.prototype.random) */ p.destroy = function() { + //puts all active particles in the pool, and removes them from the particle parent this.cleanup(); - for (var particle = this._poolFirst; particle; particle = particle.next) + //wipe the pool clean + var next; + for (var particle = this._poolFirst; particle; particle = next) { + //store next value so we don't lose it in our destroy call + next = particle.next; particle.destroy(); } this._poolFirst = this._parent = this.particleImages = this.spawnPos = this.ownerPos = @@ -1812,7 +1820,7 @@ if(!Array.prototype.random) PIXI.particles.Emitter = Emitter; }(PIXI)); - + (function(undefined){ // Check for window, fallback to global diff --git a/dist/pixi-particles.min.js b/dist/pixi-particles.min.js index 592b14bd..880082cd 100644 --- a/dist/pixi-particles.min.js +++ b/dist/pixi-particles.min.js @@ -1,2 +1,2 @@ -/*! pixi-particles 1.6.2 */ -!function(){"use strict";Array.prototype.shuffle||Object.defineProperty(Array.prototype,"shuffle",{enumerable:!1,writable:!1,value:function(){for(var a,b,c=this.length;c;a=Math.floor(Math.random()*c),b=this[--c],this[c]=this[a],this[a]=b);return this}}),Array.prototype.random||Object.defineProperty(Array.prototype,"random",{enumerable:!1,writable:!1,value:function(){return this[Math.floor(Math.random()*this.length)]}}),function(){"use strict";var a="undefined"!=typeof window?window:GLOBAL,b={};if("undefined"!=typeof module&&module.exports)"undefined"==typeof PIXI&&require("pixi.js"),module.exports=b;else if("undefined"==typeof PIXI)throw"Requires pixi.js";a.PIXI.particles=b}(),function(a,b){"use strict";var c=a.BLEND_MODES||a.blendModes,d={},e=d.DEG_TO_RADS=Math.PI/180;d.useAPI3=!1;var f=a.VERSION;f&&parseInt(f.substring(0,f.indexOf(".")))>=3&&(d.useAPI3=!0),d.rotatePoint=function(a,b){if(a){a*=e;var c=Math.sin(a),d=Math.cos(a),f=b.x*d-b.y*c,g=b.x*c+b.y*d;b.x=f,b.y=g}},d.combineRGBComponents=function(a,b,c){return a<<16|b<<8|c},d.normalize=function(a){var b=1/d.length(a);a.x*=b,a.y*=b},d.scaleBy=function(a,b){a.x*=b,a.y*=b},d.length=function(a){return Math.sqrt(a.x*a.x+a.y*a.y)},d.hexToRGB=function(a,b){b?b.length=0:b=[],"#"==a.charAt(0)?a=a.substr(1):0===a.indexOf("0x")&&(a=a.substr(2));var c;return 8==a.length&&(c=a.substr(0,2),a=a.substr(2)),b.push(parseInt(a.substr(0,2),16)),b.push(parseInt(a.substr(2,2),16)),b.push(parseInt(a.substr(4,2),16)),c&&b.push(parseInt(c,16)),b},d.generateEase=function(a){var b=a.length,c=1/b,d=function(d){var e,f,g=b*d|0;return e=(d-g*c)*b,f=a[g]||a[b-1],f.s+e*(2*(1-e)*(f.cp-f.s)+e*(f.e-f.s))};return d},d.getBlendMode=function(a){if(!a)return c.NORMAL;for(a=a.toUpperCase();a.indexOf(" ")>=0;)a=a.replace(" ","_");return c[a]||c.NORMAL},a.particles.ParticleUtils=d}(PIXI),function(a,b){"use strict";var c,d=a.particles.ParticleUtils,e=a.Sprite,f=d.useAPI3;if(!f){var g=document.createElement("canvas");g.width=g.height=1,c=a.Texture.fromCanvas(g)}var h=function(b){f?e.call(this):e.call(this,c),this.emitter=b,this.anchor.x=this.anchor.y=.5,this.velocity=new a.Point,this.maxLife=0,this.age=0,this.ease=null,this.extraData=null,this.startAlpha=0,this.endAlpha=0,this.startSpeed=0,this.endSpeed=0,this.acceleration=new a.Point,this.startScale=0,this.endScale=0,this.startColor=null,this._sR=0,this._sG=0,this._sB=0,this.endColor=null,this._eR=0,this._eG=0,this._eB=0,this._doAlpha=!1,this._doScale=!1,this._doSpeed=!1,this._doAcceleration=!1,this._doColor=!1,this._doNormalMovement=!1,this._oneOverLife=0,this.next=null,this.prev=null,this.init=this.init,this.Particle_init=this.Particle_init,this.update=this.update,this.Particle_update=this.Particle_update,this.applyArt=this.applyArt,this.kill=this.kill},i=h.prototype=Object.create(e.prototype);i.init=i.Particle_init=function(){this.age=0,this.velocity.x=this.startSpeed,this.velocity.y=0,d.rotatePoint(this.rotation,this.velocity),this.rotation*=d.DEG_TO_RADS,this.rotationSpeed*=d.DEG_TO_RADS,this.alpha=this.startAlpha,this.scale.x=this.scale.y=this.startScale,this.startColor&&(this._sR=this.startColor[0],this._sG=this.startColor[1],this._sB=this.startColor[2],this.endColor&&(this._eR=this.endColor[0],this._eG=this.endColor[1],this._eB=this.endColor[2])),this._doAlpha=this.startAlpha!=this.endAlpha,this._doSpeed=this.startSpeed!=this.endSpeed,this._doScale=this.startScale!=this.endScale,this._doColor=!!this.endColor,this._doAcceleration=0!==this.acceleration.x||0!==this.acceleration.y,this._doNormalMovement=this._doSpeed||0!==this.startSpeed||this._doAcceleration,this._oneOverLife=1/this.maxLife,this.tint=d.combineRGBComponents(this._sR,this._sG,this._sB),this.visible=!0},i.applyArt=function(a){f?this.texture=a:this.setTexture(a)},i.update=i.Particle_update=function(a){if(this.age+=a,this.age>=this.maxLife)return this.kill(),-1;var b=this.age*this._oneOverLife;if(this.ease&&(b=4==this.ease.length?this.ease(b,0,1,1):this.ease(b)),this._doAlpha&&(this.alpha=(this.endAlpha-this.startAlpha)*b+this.startAlpha),this._doScale){var c=(this.endScale-this.startScale)*b+this.startScale;this.scale.x=this.scale.y=c}if(this._doNormalMovement){if(this._doSpeed){var e=(this.endSpeed-this.startSpeed)*b+this.startSpeed;d.normalize(this.velocity),d.scaleBy(this.velocity,e)}else this._doAcceleration&&(this.velocity.x+=this.acceleration.x*a,this.velocity.y+=this.acceleration.y*a);this.position.x+=this.velocity.x*a,this.position.y+=this.velocity.y*a}if(this._doColor){var f=(this._eR-this._sR)*b+this._sR,g=(this._eG-this._sG)*b+this._sG,h=(this._eB-this._sB)*b+this._sB;this.tint=d.combineRGBComponents(f,g,h)}return 0!==this.rotationSpeed?this.rotation+=this.rotationSpeed*a:this.acceleration&&(this.rotation=Math.atan2(this.velocity.y,this.velocity.x)),b},i.kill=function(){this.emitter.recycle(this)},i.destroy=function(){this.emitter=this.velocity=this.startColor=this.endColor=this.ease=this.next=this.prev=null},h.parseArt=function(b){var c;for(c=b.length;c>=0;--c)"string"==typeof b[c]&&(b[c]=a.Texture.fromImage(b[c]));return b},h.parseData=function(a){return a},a.particles.Particle=h}(PIXI),function(a,b){"use strict";var c=a.particles.ParticleUtils,d=a.particles.Particle,e=a.ParticleContainer,f=function(a,b,c){this._particleConstructor=d,this.particleImages=null,this.startAlpha=1,this.endAlpha=1,this.startSpeed=0,this.endSpeed=0,this.acceleration=null,this.startScale=1,this.endScale=1,this.minimumScaleMultiplier=1,this.startColor=null,this.endColor=null,this.minLifetime=0,this.maxLifetime=0,this.minStartRotation=0,this.maxStartRotation=0,this.minRotationSpeed=0,this.maxRotationSpeed=0,this.particleBlendMode=0,this.customEase=null,this.extraData=null,this._frequency=1,this.maxParticles=1e3,this.emitterLifetime=-1,this.spawnPos=null,this.spawnType=null,this._spawnFunc=null,this.spawnRect=null,this.spawnCircle=null,this.particlesPerWave=1,this.particleSpacing=0,this.angleStart=0,this.rotation=0,this.ownerPos=null,this._prevEmitterPos=null,this._prevPosIsValid=!1,this._posChanged=!1,this._parentIsPC=!1,this._parent=null,this.addAtBack=!1,this.particleCount=0,this._emit=!1,this._spawnTimer=0,this._emitterLife=-1,this._activeParticlesFirst=null,this._activeParticlesLast=null,this._poolFirst=null,this._origConfig=null,this._origArt=null,this.parent=a,b&&c&&this.init(b,c),this.recycle=this.recycle,this.update=this.update,this.rotate=this.rotate,this.updateSpawnPos=this.updateSpawnPos,this.updateOwnerPos=this.updateOwnerPos},g=f.prototype={},h=new a.Point;Object.defineProperty(g,"frequency",{get:function(){return this._frequency},set:function(a){"number"==typeof a&&a>0?this._frequency=a:this._frequency=1}}),Object.defineProperty(g,"particleConstructor",{get:function(){return this._particleConstructor},set:function(a){if(a!=this._particleConstructor){this._particleConstructor=a,this.cleanup();for(var b=this._poolFirst;b;b=b.next)b.destroy();this._poolFirst=null,this._origConfig&&this._origArt&&this.init(this._origArt,this._origConfig)}}}),Object.defineProperty(g,"parent",{get:function(){return this._parent},set:function(a){this.cleanup(),this._parent=a,this._parentIsPC=e&&a&&a instanceof e}}),g.init=function(b,d){if(b&&d){this.cleanup(),this._origConfig=d,this._origArt=b,b=Array.isArray(b)?b.slice():[b];var e=this._particleConstructor;this.particleImages=e.parseArt?e.parseArt(b):b,d.alpha?(this.startAlpha=d.alpha.start,this.endAlpha=d.alpha.end):this.startAlpha=this.endAlpha=1,d.speed?(this.startSpeed=d.speed.start,this.endSpeed=d.speed.end):this.startSpeed=this.endSpeed=0;var f=d.acceleration;f&&(f.x||f.y)?(this.endSpeed=this.startSpeed,this.acceleration=new a.Point(f.x,f.y)):this.acceleration=new a.Point,d.scale?(this.startScale=d.scale.start,this.endScale=d.scale.end,this.minimumScaleMultiplier=d.scale.minimumScaleMultiplier||1):this.startScale=this.endScale=this.minimumScaleMultiplier=1,d.color&&(this.startColor=c.hexToRGB(d.color.start),d.color.start!=d.color.end?this.endColor=c.hexToRGB(d.color.end):this.endColor=null),d.startRotation?(this.minStartRotation=d.startRotation.min,this.maxStartRotation=d.startRotation.max):this.minStartRotation=this.maxStartRotation=0,d.rotationSpeed?(this.minRotationSpeed=d.rotationSpeed.min,this.maxRotationSpeed=d.rotationSpeed.max):this.minRotationSpeed=this.maxRotationSpeed=0,this.minLifetime=d.lifetime.min,this.maxLifetime=d.lifetime.max,this.particleBlendMode=c.getBlendMode(d.blendMode),d.ease?this.customEase="function"==typeof d.ease?d.ease:c.generateEase(d.ease):this.customEase=null,e.parseData?this.extraData=e.parseData(d.extraData):this.extraData=d.extraData||null,this.spawnRect=this.spawnCircle=null,this.particlesPerWave=1,this.particleSpacing=0,this.angleStart=0;var g;switch(d.spawnType){case"rect":this.spawnType="rect",this._spawnFunc=this._spawnRect;var h=d.spawnRect;this.spawnRect=new a.Rectangle(h.x,h.y,h.w,h.h);break;case"circle":this.spawnType="circle",this._spawnFunc=this._spawnCircle,g=d.spawnCircle,this.spawnCircle=new a.Circle(g.x,g.y,g.r);break;case"ring":this.spawnType="ring",this._spawnFunc=this._spawnRing,g=d.spawnCircle,this.spawnCircle=new a.Circle(g.x,g.y,g.r),this.spawnCircle.minRadius=g.minR;break;case"burst":this.spawnType="burst",this._spawnFunc=this._spawnBurst,this.particlesPerWave=d.particlesPerWave,this.particleSpacing=d.particleSpacing,this.angleStart=d.angleStart?d.angleStart:0;break;case"point":this.spawnType="point",this._spawnFunc=this._spawnPoint;break;default:this.spawnType="point",this._spawnFunc=this._spawnPoint}this.frequency=d.frequency,this.emitterLifetime=d.emitterLifetime||-1,this.maxParticles=d.maxParticles>0?d.maxParticles:1e3,this.addAtBack=!!d.addAtBack,this.rotation=0,this.ownerPos=new a.Point,this.spawnPos=new a.Point(d.pos.x,d.pos.y),this._prevEmitterPos=this.spawnPos.clone(),this._prevPosIsValid=!1,this._spawnTimer=0,this.emit=!0}},g.recycle=function(a){a.next&&(a.next.prev=a.prev),a.prev&&(a.prev.next=a.next),a==this._activeParticlesLast&&(this._activeParticlesLast=a.prev),a==this._activeParticlesFirst&&(this._activeParticlesFirst=a.next),a.prev=null,a.next=this._poolFirst,this._poolFirst=a,this._parentIsPC?(a.alpha=0,a.visible=!1):a.parent&&a.parent.removeChild(a),--this.particleCount},g.rotate=function(a){if(this.rotation!=a){var b=a-this.rotation;this.rotation=a,c.rotatePoint(b,this.spawnPos),this._posChanged=!0}},g.updateSpawnPos=function(a,b){this._posChanged=!0,this.spawnPos.x=a,this.spawnPos.y=b},g.updateOwnerPos=function(a,b){this._posChanged=!0,this.ownerPos.x=a,this.ownerPos.y=b},g.resetPositionTracking=function(){this._prevPosIsValid=!1},Object.defineProperty(g,"emit",{get:function(){return this._emit},set:function(a){this._emit=!!a,this._emitterLife=this.emitterLifetime}}),g.update=function(a){var b,c,d;for(c=this._activeParticlesFirst;c;c=d)d=c.next,c.update(a);var e,f;this._prevPosIsValid&&(e=this._prevEmitterPos.x,f=this._prevEmitterPos.y);var g=this.ownerPos.x+this.spawnPos.x,h=this.ownerPos.y+this.spawnPos.y;if(this.emit)for(this._spawnTimer-=a;this._spawnTimer<=0;){if(this._emitterLife>0&&(this._emitterLife-=this._frequency,this._emitterLife<=0)){this._spawnTimer=0,this._emitterLife=0,this.emit=!1;break}if(this.particleCount>=this.maxParticles)this._spawnTimer+=this._frequency;else{var i;if(i=this.minLifetime==this.maxLifetime?this.minLifetime:Math.random()*(this.maxLifetime-this.minLifetime)+this.minLifetime,-this._spawnTimerb;++b){var n;if(this._poolFirst?(n=this._poolFirst,this._poolFirst=this._poolFirst.next,n.next=null):n=new this.particleConstructor(this),this.particleImages.length>1?n.applyArt(this.particleImages.random()):n.applyArt(this.particleImages[0]),n.startAlpha=this.startAlpha,n.endAlpha=this.endAlpha,n.startSpeed=this.startSpeed,n.endSpeed=this.endSpeed,n.acceleration.x=this.acceleration.x,n.acceleration.y=this.acceleration.y,1!=this.minimumScaleMultiplier){var o=Math.random()*(1-this.minimumScaleMultiplier)+this.minimumScaleMultiplier;n.startScale=this.startScale*o,n.endScale=this.endScale*o}else n.startScale=this.startScale,n.endScale=this.endScale;if(n.startColor=this.startColor,n.endColor=this.endColor,this.minRotationSpeed==this.maxRotationSpeed?n.rotationSpeed=this.minRotationSpeed:n.rotationSpeed=Math.random()*(this.maxRotationSpeed-this.minRotationSpeed)+this.minRotationSpeed,n.maxLife=i,n.blendMode=this.particleBlendMode,n.ease=this.customEase,n.extraData=this.extraData,this._spawnFunc(n,j,k,b),n.init(),n.update(-this._spawnTimer),this._parentIsPC&&n.parent){var p=this._parent.children,q=p.indexOf(n);1>q?p.shift():q==p.length-1?p.pop():p.splice(q,1),this.addAtBack?p.unshift(n):p.push(n)}else this.addAtBack?this._parent.addChildAt(n,0):this._parent.addChild(n);this._activeParticlesLast?(this._activeParticlesLast.next=n,n.prev=this._activeParticlesLast,this._activeParticlesLast=n):this._activeParticlesLast=this._activeParticlesFirst=n,++this.particleCount}}this._spawnTimer+=this._frequency}}this._posChanged&&(this._prevEmitterPos.x=g,this._prevEmitterPos.y=h,this._prevPosIsValid=!0,this._posChanged=!1)},g._spawnPoint=function(a,b,c,d){this.minStartRotation==this.maxStartRotation?a.rotation=this.minStartRotation+this.rotation:a.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,a.position.x=b,a.position.y=c},g._spawnRect=function(a,b,d,e){this.minStartRotation==this.maxStartRotation?a.rotation=this.minStartRotation+this.rotation:a.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,h.x=Math.random()*this.spawnRect.width+this.spawnRect.x,h.y=Math.random()*this.spawnRect.height+this.spawnRect.y,0!==this.rotation&&c.rotatePoint(this.rotation,h),a.position.x=b+h.x,a.position.y=d+h.y},g._spawnCircle=function(a,b,d,e){this.minStartRotation==this.maxStartRotation?a.rotation=this.minStartRotation+this.rotation:a.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,h.x=Math.random()*this.spawnCircle.radius,h.y=0,c.rotatePoint(360*Math.random(),h),h.x+=this.spawnCircle.x,h.y+=this.spawnCircle.y,0!==this.rotation&&c.rotatePoint(this.rotation,h),a.position.x=b+h.x,a.position.y=d+h.y},g._spawnRing=function(a,b,d,e){var f=this.spawnCircle;this.minStartRotation==this.maxStartRotation?a.rotation=this.minStartRotation+this.rotation:a.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,f.minRadius==f.radius?h.x=Math.random()*(f.radius-f.minRadius)+f.minRadius:h.x=f.radius,h.y=0;var g=360*Math.random();a.rotation+=g,c.rotatePoint(g,h),h.x+=this.spawnCircle.x,h.y+=this.spawnCircle.y,0!==this.rotation&&c.rotatePoint(this.rotation,h),a.position.x=b+h.x,a.position.y=d+h.y},g._spawnBurst=function(a,b,c,d){0===this.particleSpacing?a.rotation=360*Math.random():a.rotation=this.angleStart+this.particleSpacing*d+this.rotation,a.position.x=b,a.position.y=c},g.cleanup=function(){var a,b;for(a=this._activeParticlesFirst;a;a=b)b=a.next,this.recycle(a),a.parent&&a.parent.removeChild(a);this._activeParticlesFirst=this._activeParticlesLast=null,this.particleCount=0},g.destroy=function(){this.cleanup();for(var a=this._poolFirst;a;a=a.next)a.destroy();this._poolFirst=this._parent=this.particleImages=this.spawnPos=this.ownerPos=this.startColor=this.endColor=this.customEase=null},a.particles.Emitter=f}(PIXI),function(a){var b="undefined"!=typeof window?window:GLOBAL;"undefined"==typeof cloudkid&&(b.cloudkid={}),Object.defineProperties(b.cloudkid,{AnimatedParticle:{get:function(){return PIXI.particles.AnimatedParticle}},Emitter:{get:function(){return PIXI.particles.Emitter}},Particle:{get:function(){return PIXI.particles.Particle}},ParticleUtils:{get:function(){return PIXI.particles.ParticleUtils}},PathParticle:{get:function(){return PIXI.particles.PathParticle}}})}();}(); \ No newline at end of file +/*! pixi-particles 1.6.3 */ +!function(){"use strict";Array.prototype.shuffle||Object.defineProperty(Array.prototype,"shuffle",{enumerable:!1,writable:!1,value:function(){for(var a,b,c=this.length;c;a=Math.floor(Math.random()*c),b=this[--c],this[c]=this[a],this[a]=b);return this}}),Array.prototype.random||Object.defineProperty(Array.prototype,"random",{enumerable:!1,writable:!1,value:function(){return this[Math.floor(Math.random()*this.length)]}}),function(){"use strict";var a="undefined"!=typeof window?window:GLOBAL,b={};if("undefined"!=typeof module&&module.exports)"undefined"==typeof PIXI&&require("pixi.js"),module.exports=b;else if("undefined"==typeof PIXI)throw"Requires pixi.js";a.PIXI.particles=b}(),function(a,b){"use strict";var c=a.BLEND_MODES||a.blendModes,d={},e=d.DEG_TO_RADS=Math.PI/180;d.useAPI3=!1;var f=a.VERSION;f&&parseInt(f.substring(0,f.indexOf(".")))>=3&&(d.useAPI3=!0),d.rotatePoint=function(a,b){if(a){a*=e;var c=Math.sin(a),d=Math.cos(a),f=b.x*d-b.y*c,g=b.x*c+b.y*d;b.x=f,b.y=g}},d.combineRGBComponents=function(a,b,c){return a<<16|b<<8|c},d.normalize=function(a){var b=1/d.length(a);a.x*=b,a.y*=b},d.scaleBy=function(a,b){a.x*=b,a.y*=b},d.length=function(a){return Math.sqrt(a.x*a.x+a.y*a.y)},d.hexToRGB=function(a,b){b?b.length=0:b=[],"#"==a.charAt(0)?a=a.substr(1):0===a.indexOf("0x")&&(a=a.substr(2));var c;return 8==a.length&&(c=a.substr(0,2),a=a.substr(2)),b.push(parseInt(a.substr(0,2),16)),b.push(parseInt(a.substr(2,2),16)),b.push(parseInt(a.substr(4,2),16)),c&&b.push(parseInt(c,16)),b},d.generateEase=function(a){var b=a.length,c=1/b,d=function(d){var e,f,g=b*d|0;return e=(d-g*c)*b,f=a[g]||a[b-1],f.s+e*(2*(1-e)*(f.cp-f.s)+e*(f.e-f.s))};return d},d.getBlendMode=function(a){if(!a)return c.NORMAL;for(a=a.toUpperCase();a.indexOf(" ")>=0;)a=a.replace(" ","_");return c[a]||c.NORMAL},a.particles.ParticleUtils=d}(PIXI),function(a,b){"use strict";var c,d=a.particles.ParticleUtils,e=a.Sprite,f=d.useAPI3;if(!f){var g=document.createElement("canvas");g.width=g.height=1,c=a.Texture.fromCanvas(g)}var h=function(b){f?e.call(this):e.call(this,c),this.emitter=b,this.anchor.x=this.anchor.y=.5,this.velocity=new a.Point,this.maxLife=0,this.age=0,this.ease=null,this.extraData=null,this.startAlpha=0,this.endAlpha=0,this.startSpeed=0,this.endSpeed=0,this.acceleration=new a.Point,this.startScale=0,this.endScale=0,this.startColor=null,this._sR=0,this._sG=0,this._sB=0,this.endColor=null,this._eR=0,this._eG=0,this._eB=0,this._doAlpha=!1,this._doScale=!1,this._doSpeed=!1,this._doAcceleration=!1,this._doColor=!1,this._doNormalMovement=!1,this._oneOverLife=0,this.next=null,this.prev=null,this.init=this.init,this.Particle_init=this.Particle_init,this.update=this.update,this.Particle_update=this.Particle_update,this.applyArt=this.applyArt,this.kill=this.kill},i=h.prototype=Object.create(e.prototype);i.init=i.Particle_init=function(){this.age=0,this.velocity.x=this.startSpeed,this.velocity.y=0,d.rotatePoint(this.rotation,this.velocity),this.rotation*=d.DEG_TO_RADS,this.rotationSpeed*=d.DEG_TO_RADS,this.alpha=this.startAlpha,this.scale.x=this.scale.y=this.startScale,this.startColor&&(this._sR=this.startColor[0],this._sG=this.startColor[1],this._sB=this.startColor[2],this.endColor&&(this._eR=this.endColor[0],this._eG=this.endColor[1],this._eB=this.endColor[2])),this._doAlpha=this.startAlpha!=this.endAlpha,this._doSpeed=this.startSpeed!=this.endSpeed,this._doScale=this.startScale!=this.endScale,this._doColor=!!this.endColor,this._doAcceleration=0!==this.acceleration.x||0!==this.acceleration.y,this._doNormalMovement=this._doSpeed||0!==this.startSpeed||this._doAcceleration,this._oneOverLife=1/this.maxLife,this.tint=d.combineRGBComponents(this._sR,this._sG,this._sB),this.visible=!0},i.applyArt=function(a){f?this.texture=a:this.setTexture(a)},i.update=i.Particle_update=function(a){if(this.age+=a,this.age>=this.maxLife)return this.kill(),-1;var b=this.age*this._oneOverLife;if(this.ease&&(b=4==this.ease.length?this.ease(b,0,1,1):this.ease(b)),this._doAlpha&&(this.alpha=(this.endAlpha-this.startAlpha)*b+this.startAlpha),this._doScale){var c=(this.endScale-this.startScale)*b+this.startScale;this.scale.x=this.scale.y=c}if(this._doNormalMovement){if(this._doSpeed){var e=(this.endSpeed-this.startSpeed)*b+this.startSpeed;d.normalize(this.velocity),d.scaleBy(this.velocity,e)}else this._doAcceleration&&(this.velocity.x+=this.acceleration.x*a,this.velocity.y+=this.acceleration.y*a);this.position.x+=this.velocity.x*a,this.position.y+=this.velocity.y*a}if(this._doColor){var f=(this._eR-this._sR)*b+this._sR,g=(this._eG-this._sG)*b+this._sG,h=(this._eB-this._sB)*b+this._sB;this.tint=d.combineRGBComponents(f,g,h)}return 0!==this.rotationSpeed?this.rotation+=this.rotationSpeed*a:this.acceleration&&(this.rotation=Math.atan2(this.velocity.y,this.velocity.x)),b},i.kill=function(){this.emitter.recycle(this)},i.Sprite_Destroy=e.prototype.destroy,i.destroy=function(){this.Sprite_Destroy&&this.Sprite_Destroy(),this.emitter=this.velocity=this.startColor=this.endColor=this.ease=this.next=this.prev=null},h.parseArt=function(b){var c;for(c=b.length;c>=0;--c)"string"==typeof b[c]&&(b[c]=a.Texture.fromImage(b[c]));return b},h.parseData=function(a){return a},a.particles.Particle=h}(PIXI),function(a,b){"use strict";var c=a.particles.ParticleUtils,d=a.particles.Particle,e=a.ParticleContainer,f=function(a,b,c){this._particleConstructor=d,this.particleImages=null,this.startAlpha=1,this.endAlpha=1,this.startSpeed=0,this.endSpeed=0,this.acceleration=null,this.startScale=1,this.endScale=1,this.minimumScaleMultiplier=1,this.startColor=null,this.endColor=null,this.minLifetime=0,this.maxLifetime=0,this.minStartRotation=0,this.maxStartRotation=0,this.minRotationSpeed=0,this.maxRotationSpeed=0,this.particleBlendMode=0,this.customEase=null,this.extraData=null,this._frequency=1,this.maxParticles=1e3,this.emitterLifetime=-1,this.spawnPos=null,this.spawnType=null,this._spawnFunc=null,this.spawnRect=null,this.spawnCircle=null,this.particlesPerWave=1,this.particleSpacing=0,this.angleStart=0,this.rotation=0,this.ownerPos=null,this._prevEmitterPos=null,this._prevPosIsValid=!1,this._posChanged=!1,this._parentIsPC=!1,this._parent=null,this.addAtBack=!1,this.particleCount=0,this._emit=!1,this._spawnTimer=0,this._emitterLife=-1,this._activeParticlesFirst=null,this._activeParticlesLast=null,this._poolFirst=null,this._origConfig=null,this._origArt=null,this.parent=a,b&&c&&this.init(b,c),this.recycle=this.recycle,this.update=this.update,this.rotate=this.rotate,this.updateSpawnPos=this.updateSpawnPos,this.updateOwnerPos=this.updateOwnerPos},g=f.prototype={},h=new a.Point;Object.defineProperty(g,"frequency",{get:function(){return this._frequency},set:function(a){"number"==typeof a&&a>0?this._frequency=a:this._frequency=1}}),Object.defineProperty(g,"particleConstructor",{get:function(){return this._particleConstructor},set:function(a){if(a!=this._particleConstructor){this._particleConstructor=a,this.cleanup();for(var b=this._poolFirst;b;b=b.next)b.destroy();this._poolFirst=null,this._origConfig&&this._origArt&&this.init(this._origArt,this._origConfig)}}}),Object.defineProperty(g,"parent",{get:function(){return this._parent},set:function(a){this.cleanup(),this._parent=a,this._parentIsPC=e&&a&&a instanceof e}}),g.init=function(b,d){if(b&&d){this.cleanup(),this._origConfig=d,this._origArt=b,b=Array.isArray(b)?b.slice():[b];var e=this._particleConstructor;this.particleImages=e.parseArt?e.parseArt(b):b,d.alpha?(this.startAlpha=d.alpha.start,this.endAlpha=d.alpha.end):this.startAlpha=this.endAlpha=1,d.speed?(this.startSpeed=d.speed.start,this.endSpeed=d.speed.end):this.startSpeed=this.endSpeed=0;var f=d.acceleration;f&&(f.x||f.y)?(this.endSpeed=this.startSpeed,this.acceleration=new a.Point(f.x,f.y)):this.acceleration=new a.Point,d.scale?(this.startScale=d.scale.start,this.endScale=d.scale.end,this.minimumScaleMultiplier=d.scale.minimumScaleMultiplier||1):this.startScale=this.endScale=this.minimumScaleMultiplier=1,d.color&&(this.startColor=c.hexToRGB(d.color.start),d.color.start!=d.color.end?this.endColor=c.hexToRGB(d.color.end):this.endColor=null),d.startRotation?(this.minStartRotation=d.startRotation.min,this.maxStartRotation=d.startRotation.max):this.minStartRotation=this.maxStartRotation=0,d.rotationSpeed?(this.minRotationSpeed=d.rotationSpeed.min,this.maxRotationSpeed=d.rotationSpeed.max):this.minRotationSpeed=this.maxRotationSpeed=0,this.minLifetime=d.lifetime.min,this.maxLifetime=d.lifetime.max,this.particleBlendMode=c.getBlendMode(d.blendMode),d.ease?this.customEase="function"==typeof d.ease?d.ease:c.generateEase(d.ease):this.customEase=null,e.parseData?this.extraData=e.parseData(d.extraData):this.extraData=d.extraData||null,this.spawnRect=this.spawnCircle=null,this.particlesPerWave=1,this.particleSpacing=0,this.angleStart=0;var g;switch(d.spawnType){case"rect":this.spawnType="rect",this._spawnFunc=this._spawnRect;var h=d.spawnRect;this.spawnRect=new a.Rectangle(h.x,h.y,h.w,h.h);break;case"circle":this.spawnType="circle",this._spawnFunc=this._spawnCircle,g=d.spawnCircle,this.spawnCircle=new a.Circle(g.x,g.y,g.r);break;case"ring":this.spawnType="ring",this._spawnFunc=this._spawnRing,g=d.spawnCircle,this.spawnCircle=new a.Circle(g.x,g.y,g.r),this.spawnCircle.minRadius=g.minR;break;case"burst":this.spawnType="burst",this._spawnFunc=this._spawnBurst,this.particlesPerWave=d.particlesPerWave,this.particleSpacing=d.particleSpacing,this.angleStart=d.angleStart?d.angleStart:0;break;case"point":this.spawnType="point",this._spawnFunc=this._spawnPoint;break;default:this.spawnType="point",this._spawnFunc=this._spawnPoint}this.frequency=d.frequency,this.emitterLifetime=d.emitterLifetime||-1,this.maxParticles=d.maxParticles>0?d.maxParticles:1e3,this.addAtBack=!!d.addAtBack,this.rotation=0,this.ownerPos=new a.Point,this.spawnPos=new a.Point(d.pos.x,d.pos.y),this._prevEmitterPos=this.spawnPos.clone(),this._prevPosIsValid=!1,this._spawnTimer=0,this.emit=!0}},g.recycle=function(a){a.next&&(a.next.prev=a.prev),a.prev&&(a.prev.next=a.next),a==this._activeParticlesLast&&(this._activeParticlesLast=a.prev),a==this._activeParticlesFirst&&(this._activeParticlesFirst=a.next),a.prev=null,a.next=this._poolFirst,this._poolFirst=a,this._parentIsPC?(a.alpha=0,a.visible=!1):a.parent&&a.parent.removeChild(a),--this.particleCount},g.rotate=function(a){if(this.rotation!=a){var b=a-this.rotation;this.rotation=a,c.rotatePoint(b,this.spawnPos),this._posChanged=!0}},g.updateSpawnPos=function(a,b){this._posChanged=!0,this.spawnPos.x=a,this.spawnPos.y=b},g.updateOwnerPos=function(a,b){this._posChanged=!0,this.ownerPos.x=a,this.ownerPos.y=b},g.resetPositionTracking=function(){this._prevPosIsValid=!1},Object.defineProperty(g,"emit",{get:function(){return this._emit},set:function(a){this._emit=!!a,this._emitterLife=this.emitterLifetime}}),g.update=function(a){var b,c,d;for(c=this._activeParticlesFirst;c;c=d)d=c.next,c.update(a);var e,f;this._prevPosIsValid&&(e=this._prevEmitterPos.x,f=this._prevEmitterPos.y);var g=this.ownerPos.x+this.spawnPos.x,h=this.ownerPos.y+this.spawnPos.y;if(this.emit)for(this._spawnTimer-=a;this._spawnTimer<=0;){if(this._emitterLife>0&&(this._emitterLife-=this._frequency,this._emitterLife<=0)){this._spawnTimer=0,this._emitterLife=0,this.emit=!1;break}if(this.particleCount>=this.maxParticles)this._spawnTimer+=this._frequency;else{var i;if(i=this.minLifetime==this.maxLifetime?this.minLifetime:Math.random()*(this.maxLifetime-this.minLifetime)+this.minLifetime,-this._spawnTimerb;++b){var n;if(this._poolFirst?(n=this._poolFirst,this._poolFirst=this._poolFirst.next,n.next=null):n=new this.particleConstructor(this),this.particleImages.length>1?n.applyArt(this.particleImages.random()):n.applyArt(this.particleImages[0]),n.startAlpha=this.startAlpha,n.endAlpha=this.endAlpha,n.startSpeed=this.startSpeed,n.endSpeed=this.endSpeed,n.acceleration.x=this.acceleration.x,n.acceleration.y=this.acceleration.y,1!=this.minimumScaleMultiplier){var o=Math.random()*(1-this.minimumScaleMultiplier)+this.minimumScaleMultiplier;n.startScale=this.startScale*o,n.endScale=this.endScale*o}else n.startScale=this.startScale,n.endScale=this.endScale;if(n.startColor=this.startColor,n.endColor=this.endColor,this.minRotationSpeed==this.maxRotationSpeed?n.rotationSpeed=this.minRotationSpeed:n.rotationSpeed=Math.random()*(this.maxRotationSpeed-this.minRotationSpeed)+this.minRotationSpeed,n.maxLife=i,n.blendMode=this.particleBlendMode,n.ease=this.customEase,n.extraData=this.extraData,this._spawnFunc(n,j,k,b),n.init(),n.update(-this._spawnTimer),this._parentIsPC&&n.parent){var p=this._parent.children,q=p.indexOf(n);1>q?p.shift():q==p.length-1?p.pop():p.splice(q,1),this.addAtBack?p.unshift(n):p.push(n)}else this.addAtBack?this._parent.addChildAt(n,0):this._parent.addChild(n);this._activeParticlesLast?(this._activeParticlesLast.next=n,n.prev=this._activeParticlesLast,this._activeParticlesLast=n):this._activeParticlesLast=this._activeParticlesFirst=n,++this.particleCount}}this._spawnTimer+=this._frequency}}this._posChanged&&(this._prevEmitterPos.x=g,this._prevEmitterPos.y=h,this._prevPosIsValid=!0,this._posChanged=!1)},g._spawnPoint=function(a,b,c,d){this.minStartRotation==this.maxStartRotation?a.rotation=this.minStartRotation+this.rotation:a.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,a.position.x=b,a.position.y=c},g._spawnRect=function(a,b,d,e){this.minStartRotation==this.maxStartRotation?a.rotation=this.minStartRotation+this.rotation:a.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,h.x=Math.random()*this.spawnRect.width+this.spawnRect.x,h.y=Math.random()*this.spawnRect.height+this.spawnRect.y,0!==this.rotation&&c.rotatePoint(this.rotation,h),a.position.x=b+h.x,a.position.y=d+h.y},g._spawnCircle=function(a,b,d,e){this.minStartRotation==this.maxStartRotation?a.rotation=this.minStartRotation+this.rotation:a.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,h.x=Math.random()*this.spawnCircle.radius,h.y=0,c.rotatePoint(360*Math.random(),h),h.x+=this.spawnCircle.x,h.y+=this.spawnCircle.y,0!==this.rotation&&c.rotatePoint(this.rotation,h),a.position.x=b+h.x,a.position.y=d+h.y},g._spawnRing=function(a,b,d,e){var f=this.spawnCircle;this.minStartRotation==this.maxStartRotation?a.rotation=this.minStartRotation+this.rotation:a.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,f.minRadius==f.radius?h.x=Math.random()*(f.radius-f.minRadius)+f.minRadius:h.x=f.radius,h.y=0;var g=360*Math.random();a.rotation+=g,c.rotatePoint(g,h),h.x+=this.spawnCircle.x,h.y+=this.spawnCircle.y,0!==this.rotation&&c.rotatePoint(this.rotation,h),a.position.x=b+h.x,a.position.y=d+h.y},g._spawnBurst=function(a,b,c,d){0===this.particleSpacing?a.rotation=360*Math.random():a.rotation=this.angleStart+this.particleSpacing*d+this.rotation,a.position.x=b,a.position.y=c},g.cleanup=function(){var a,b;for(a=this._activeParticlesFirst;a;a=b)b=a.next,this.recycle(a),a.parent&&a.parent.removeChild(a);this._activeParticlesFirst=this._activeParticlesLast=null,this.particleCount=0},g.destroy=function(){this.cleanup();for(var a,b=this._poolFirst;b;b=a)a=b.next,b.destroy();this._poolFirst=this._parent=this.particleImages=this.spawnPos=this.ownerPos=this.startColor=this.endColor=this.customEase=null},a.particles.Emitter=f}(PIXI),function(a){var b="undefined"!=typeof window?window:GLOBAL;"undefined"==typeof cloudkid&&(b.cloudkid={}),Object.defineProperties(b.cloudkid,{AnimatedParticle:{get:function(){return PIXI.particles.AnimatedParticle}},Emitter:{get:function(){return PIXI.particles.Emitter}},Particle:{get:function(){return PIXI.particles.Particle}},ParticleUtils:{get:function(){return PIXI.particles.ParticleUtils}},PathParticle:{get:function(){return PIXI.particles.PathParticle}}})}();}(); \ No newline at end of file diff --git a/library.json b/library.json index 3d46b635..e1b94e4f 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "pixi-particles", - "version": "1.6.2", + "version": "1.6.3", "description": "Particle system for PixiJS", "url": "http://github.com/pixijs/pixi-particles", "output": "pixi-particles", diff --git a/package.json b/package.json index b6afbde3..88347f6b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pixi-particles", - "version": "1.6.2", + "version": "1.6.3", "main": "dist/pixi-particles.min.js", "description": "Particle emitter for Pixi.js", "author": "Andrew Start ",