From c1d2e7e9d1ae001ceb4a257b276682b87f941f99 Mon Sep 17 00:00:00 2001 From: andrewstart Date: Thu, 12 May 2016 07:26:48 -0400 Subject: [PATCH] Bumped version and rebuilt. --- bower.json | 2 +- dist/modules/animated-particle.js | 2 +- dist/modules/animated-particle.min.js | 2 +- dist/modules/path-particle.js | 2 +- dist/modules/path-particle.min.js | 2 +- dist/pixi-particles.js | 14 +++++++------- dist/pixi-particles.min.js | 2 +- library.json | 2 +- package.json | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/bower.json b/bower.json index 8c258386..ae9890dc 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pixi-particles", - "version": "1.6.6", + "version": "1.6.7", "main": "dist/pixi-particles.min.js", "dependencies": { "pixi.js": "*" diff --git a/dist/modules/animated-particle.js b/dist/modules/animated-particle.js index 9d46357e..23857245 100644 --- a/dist/modules/animated-particle.js +++ b/dist/modules/animated-particle.js @@ -1,4 +1,4 @@ -/*! pixi-particles 1.6.6 */ +/*! pixi-particles 1.6.7 */ /** * @module Animated Particle * @namespace PIXI.particles diff --git a/dist/modules/animated-particle.min.js b/dist/modules/animated-particle.min.js index be399e8e..87dff83c 100644 --- a/dist/modules/animated-particle.min.js +++ b/dist/modules/animated-particle.min.js @@ -1,2 +1,2 @@ -/*! pixi-particles 1.6.6 */ +/*! pixi-particles 1.6.7 */ !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]||c.EMPTY_TEXTURE:this.setTexture(this.textures[b]||c.EMPTY_TEXTURE)}},i.Particle_destroy=d.prototype.destroy,i.destroy=function(){this.Particle_destroy(),this.textures=null},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 54a5662e..20ce490b 100644 --- a/dist/modules/path-particle.js +++ b/dist/modules/path-particle.js @@ -1,4 +1,4 @@ -/*! pixi-particles 1.6.6 */ +/*! pixi-particles 1.6.7 */ /** * @module Path Particle * @namespace PIXI.particles diff --git a/dist/modules/path-particle.min.js b/dist/modules/path-particle.min.js index 962249ad..91c3c0c8 100644 --- a/dist/modules/path-particle.min.js +++ b/dist/modules/path-particle.min.js @@ -1,2 +1,2 @@ -/*! pixi-particles 1.6.6 */ +/*! pixi-particles 1.6.7 */ !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(),this.path=this.initialPosition=null},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 456abbfe..5c29bb2d 100644 --- a/dist/pixi-particles.js +++ b/dist/pixi-particles.js @@ -1,4 +1,4 @@ -/*! pixi-particles 1.6.6 */ +/*! pixi-particles 1.6.7 */ /** * @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 = global.PIXI.particles || particles; -}()); +}()); /** * @module Pixi Particles * @namespace PIXI.particles @@ -108,7 +108,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.6"' + // avoid the string replacement of '"1.6.7"' var version = PIXI["VER"+"SION"];// jshint ignore:line if(version && parseInt(version.substring(0, version.indexOf("."))) >= 3) { @@ -289,7 +289,7 @@ if(!Array.prototype.random) PIXI.particles.ParticleUtils = ParticleUtils; -}(PIXI)); +}(PIXI)); /** * @module Pixi Particles * @namespace PIXI.particles @@ -759,7 +759,7 @@ if(!Array.prototype.random) PIXI.particles.Particle = Particle; }(PIXI)); - + /** * @module Pixi Particles * @namespace PIXI.particles @@ -1857,7 +1857,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 990e0684..ef9b1411 100644 --- a/dist/pixi-particles.min.js +++ b/dist/pixi-particles.min.js @@ -1,2 +1,2 @@ -/*! pixi-particles 1.6.6 */ +/*! pixi-particles 1.6.7 */ !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=a.PIXI.particles||b}(),function(a,b){"use strict";var c=a.BLEND_MODES||a.blendModes,d=a.Texture,e={},f=e.DEG_TO_RADS=Math.PI/180;e.useAPI3=!1;var g=a.VERSION;g&&parseInt(g.substring(0,g.indexOf(".")))>=3&&(e.useAPI3=!0);var h=e.EMPTY_TEXTURE=null;if(e.useAPI3)h=e.EMPTY_TEXTURE=d.EMPTY,h.on=h.destroy=h.once=h.emit=function(){};else{var i=document.createElement("canvas");i.width=i.height=1,h=e.EMPTY_TEXTURE=a.Texture.fromCanvas(i),h.baseTexture.hasLoaded=!1,h.on=h.destroy=h.once=h.emit=function(){}}e.rotatePoint=function(a,b){if(a){a*=f;var c=Math.sin(a),d=Math.cos(a),e=b.x*d-b.y*c,g=b.x*c+b.y*d;b.x=e,b.y=g}},e.combineRGBComponents=function(a,b,c){return a<<16|b<<8|c},e.normalize=function(a){var b=1/e.length(a);a.x*=b,a.y*=b},e.scaleBy=function(a,b){a.x*=b,a.y*=b},e.length=function(a){return Math.sqrt(a.x*a.x+a.y*a.y)},e.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},e.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},e.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=e}(PIXI),function(a,b){"use strict";var c=a.particles.ParticleUtils,d=a.Sprite,e=c.useAPI3,f=function(b){e?d.call(this):d.call(this,c.EMPTY_TEXTURE),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},g=f.prototype=Object.create(d.prototype);g.init=g.Particle_init=function(){this.age=0,this.velocity.x=this.startSpeed,this.velocity.y=0,c.rotatePoint(this.rotation,this.velocity),this.rotation*=c.DEG_TO_RADS,this.rotationSpeed*=c.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=c.combineRGBComponents(this._sR,this._sG,this._sB),this.visible=!0},g.applyArt=function(a){e?this.texture=a||c.EMPTY_TEXTURE:this.setTexture(a||c.EMPTY_TEXTURE)},g.update=g.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 d=(this.endScale-this.startScale)*b+this.startScale;this.scale.x=this.scale.y=d}if(this._doNormalMovement){if(this._doSpeed){var e=(this.endSpeed-this.startSpeed)*b+this.startSpeed;c.normalize(this.velocity),c.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=c.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},g.kill=function(){this.emitter.recycle(this)},g.Sprite_Destroy=d.prototype.destroy,g.destroy=function(){this.parent&&this.parent.removeChild(this),this.Sprite_Destroy&&this.Sprite_Destroy(),this.emitter=this.velocity=this.startColor=this.endColor=this.ease=this.next=this.prev=null},f.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},f.parseData=function(a){return a},a.particles.Particle=f}(PIXI),function(a,b){"use strict";var c=a.particles.ParticleUtils,d=a.particles.Particle,e=a.particles.ParticleContainer||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){if(this._parentIsPC)for(var b=this._poolFirst;b;b=b.next)b.parent&&b.parent.removeChild(b);this.cleanup(),this._parent=a,this._parentIsPC=e&&a&&a instanceof e}}),g.init=function(d,e){if(d&&e){this.cleanup(),this._origConfig=e,this._origArt=d,d=Array.isArray(d)?d.slice():[d];var f=this._particleConstructor;this.particleImages=f.parseArt?f.parseArt(d):d,e.alpha?(this.startAlpha=e.alpha.start,this.endAlpha=e.alpha.end):this.startAlpha=this.endAlpha=1,e.speed?(this.startSpeed=e.speed.start,this.endSpeed=e.speed.end):this.startSpeed=this.endSpeed=0;var g=e.acceleration;g&&(g.x||g.y)?(this.endSpeed=this.startSpeed,this.acceleration=new a.Point(g.x,g.y)):this.acceleration=new a.Point,e.scale?(this.startScale=e.scale.start,this.endScale=e.scale.end,this.minimumScaleMultiplier=e.scale.minimumScaleMultiplier||1):this.startScale=this.endScale=this.minimumScaleMultiplier=1,e.color&&(this.startColor=c.hexToRGB(e.color.start),e.color.start!=e.color.end?this.endColor=c.hexToRGB(e.color.end):this.endColor=null),e.startRotation?(this.minStartRotation=e.startRotation.min,this.maxStartRotation=e.startRotation.max):this.minStartRotation=this.maxStartRotation=0,e.rotationSpeed?(this.minRotationSpeed=e.rotationSpeed.min,this.maxRotationSpeed=e.rotationSpeed.max):this.minRotationSpeed=this.maxRotationSpeed=0,this.minLifetime=e.lifetime.min,this.maxLifetime=e.lifetime.max,this.particleBlendMode=c.getBlendMode(e.blendMode),e.ease?this.customEase="function"==typeof e.ease?e.ease:c.generateEase(e.ease):this.customEase=null,f.parseData?this.extraData=f.parseData(e.extraData):this.extraData=e.extraData||null,this.spawnRect=this.spawnCircle=null,this.particlesPerWave=1,this.particleSpacing=0,this.angleStart=0;var h;switch(e.spawnType){case"rect":this.spawnType="rect",this._spawnFunc=this._spawnRect;var i=e.spawnRect;this.spawnRect=new a.Rectangle(i.x,i.y,i.w,i.h);break;case"circle":this.spawnType="circle",this._spawnFunc=this._spawnCircle,h=e.spawnCircle,this.spawnCircle=new a.Circle(h.x,h.y,h.r);break;case"ring":this.spawnType="ring",this._spawnFunc=this._spawnRing,h=e.spawnCircle,this.spawnCircle=new a.Circle(h.x,h.y,h.r),this.spawnCircle.minRadius=h.minR;break;case"burst":this.spawnType="burst",this._spawnFunc=this._spawnBurst,this.particlesPerWave=e.particlesPerWave,this.particleSpacing=e.particleSpacing,this.angleStart=e.angleStart?e.angleStart:0;break;case"point":this.spawnType="point",this._spawnFunc=this._spawnPoint;break;default:this.spawnType="point",this._spawnFunc=this._spawnPoint}this.frequency=e.frequency,this.emitterLifetime=e.emitterLifetime||-1,this.maxParticles=e.maxParticles>0?e.maxParticles:1e3,this.addAtBack=!!e.addAtBack,this.rotation=0,this.ownerPos=new a.Point,this.spawnPos=new a.Point(e.pos.x,e.pos.y),this._prevEmitterPos=this.spawnPos.clone(),this._prevPosIsValid=!1,this._spawnTimer=0,this.emit=e.emit===b?!0:!!e.emit}},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){if(this._parent){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;if(p[0]==n)p.shift();else if(p[p.length-1]==n)p.pop();else{var q=p.indexOf(n);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 c8ea115e..05e5340a 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "pixi-particles", - "version": "1.6.6", + "version": "1.6.7", "description": "Particle system for PixiJS", "url": "http://github.com/pixijs/pixi-particles", "output": "pixi-particles", diff --git a/package.json b/package.json index a81de594..0a39dd69 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pixi-particles", - "version": "1.6.6", + "version": "1.6.7", "main": "dist/pixi-particles.min.js", "description": "Particle emitter for Pixi.js", "author": "Andrew Start ",