@pixi/particles
Advanced tools
Comparing version 5.0.3 to 5.0.4
/*! | ||
* @pixi/particles - v5.0.3 | ||
* Compiled Sun, 19 May 2019 19:03:31 UTC | ||
* @pixi/particles - v5.0.4 | ||
* Compiled Fri, 07 Jun 2019 17:17:49 UTC | ||
* | ||
@@ -28,3 +28,3 @@ * @pixi/particles is licensed under the MIT License. | ||
* { | ||
* let sprite = new PIXI.Sprite.from("myImage.png"); | ||
* let sprite = PIXI.Sprite.from("myImage.png"); | ||
* container.addChild(sprite); | ||
@@ -59,7 +59,2 @@ * } | ||
if (batchSize > maxSize) | ||
{ | ||
batchSize = maxSize; | ||
} | ||
/** | ||
@@ -653,3 +648,3 @@ * Set properties to be dynamic (true) / static (false) | ||
} | ||
else if (totalChildren > maxSize) | ||
else if (totalChildren > maxSize && !container.autoResize) | ||
{ | ||
@@ -700,6 +695,2 @@ totalChildren = maxSize; | ||
{ | ||
if (!container.autoResize) | ||
{ | ||
break; | ||
} | ||
buffers.push(this._generateOneMoreBuffer(container)); | ||
@@ -706,0 +697,0 @@ } |
/*! | ||
* @pixi/particles - v5.0.3 | ||
* Compiled Sun, 19 May 2019 19:03:31 UTC | ||
* @pixi/particles - v5.0.4 | ||
* Compiled Fri, 07 Jun 2019 17:17:49 UTC | ||
* | ||
@@ -8,3 +8,3 @@ * @pixi/particles is licensed under the MIT License. | ||
*/ | ||
this.PIXI=this.PIXI||{};var _pixi_particles=function(t,e,i,r,s,o){"use strict";var a=function(t){function r(i,r,s,o){void 0===i&&(i=1500),void 0===s&&(s=16384),void 0===o&&(o=!1),t.call(this);s>16384&&(s=16384),s>i&&(s=i),this._properties=[!1,!0,!1,!1,!1],this._maxSize=i,this._batchSize=s,this._buffers=null,this._bufferUpdateIDs=[],this._updateID=0,this.interactiveChildren=!1,this.blendMode=e.BLEND_MODES.NORMAL,this.autoResize=o,this.roundPixels=!0,this.baseTexture=null,this.setProperties(r),this._tint=0,this.tintRgb=new Float32Array(4),this.tint=16777215}t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r;var s={tint:{configurable:!0}};return r.prototype.setProperties=function(t){t&&(this._properties[0]="vertices"in t||"scale"in t?!!t.vertices||!!t.scale:this._properties[0],this._properties[1]="position"in t?!!t.position:this._properties[1],this._properties[2]="rotation"in t?!!t.rotation:this._properties[2],this._properties[3]="uvs"in t?!!t.uvs:this._properties[3],this._properties[4]="tint"in t||"alpha"in t?!!t.tint||!!t.alpha:this._properties[4])},r.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},s.tint.get=function(){return this._tint},s.tint.set=function(t){this._tint=t,i.hex2rgb(t,this.tintRgb)},r.prototype.render=function(t){var e=this;this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable&&(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.valid||this.baseTexture.once("update",function(){return e.onChildrenChange(0)})),t.batch.setObjectRenderer(t.plugins.particle),t.plugins.particle.render(this))},r.prototype.onChildrenChange=function(t){for(var e=Math.floor(t/this._batchSize);this._bufferUpdateIDs.length<e;)this._bufferUpdateIDs.push(0);this._bufferUpdateIDs[e]=++this._updateID},r.prototype.dispose=function(){if(this._buffers){for(var t=0;t<this._buffers.length;++t)this._buffers[t].destroy();this._buffers=null}},r.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this.dispose(),this._properties=null,this._buffers=null,this._bufferUpdateIDs=null},Object.defineProperties(r.prototype,s),r}(r.Container),n=function(t,i,r){this.geometry=new s.Geometry,this.indexBuffer=null,this.size=r,this.dynamicProperties=[],this.staticProperties=[];for(var o=0;o<t.length;++o){var a=t[o];a={attributeName:a.attributeName,size:a.size,uploadFunction:a.uploadFunction,type:a.type||e.TYPES.FLOAT,offset:a.offset},i[o]?this.dynamicProperties.push(a):this.staticProperties.push(a)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this._updateID=0,this.initBuffers()};n.prototype.initBuffers=function(){var t=this.geometry,r=0;this.indexBuffer=new s.Buffer(i.createIndicesForQuads(this.size),!0,!0),t.addIndex(this.indexBuffer),this.dynamicStride=0;for(var o=0;o<this.dynamicProperties.length;++o){var a=this.dynamicProperties[o];a.offset=r,r+=a.size,this.dynamicStride+=a.size}var n=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(n),this.dynamicDataUint32=new Uint32Array(n),this.dynamicBuffer=new s.Buffer(this.dynamicData,!1,!1);var h=0;this.staticStride=0;for(var u=0;u<this.staticProperties.length;++u){var p=this.staticProperties[u];p.offset=h,h+=p.size,this.staticStride+=p.size}var l=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(l),this.staticDataUint32=new Uint32Array(l),this.staticBuffer=new s.Buffer(this.staticData,!0,!1);for(var c=0;c<this.dynamicProperties.length;++c){var d=this.dynamicProperties[c];t.addAttribute(d.attributeName,this.dynamicBuffer,0,d.type===e.TYPES.UNSIGNED_BYTE,d.type,4*this.dynamicStride,4*d.offset)}for(var f=0;f<this.staticProperties.length;++f){var y=this.staticProperties[f];t.addAttribute(y.attributeName,this.staticBuffer,0,y.type===e.TYPES.UNSIGNED_BYTE,y.type,4*this.staticStride,4*y.offset)}},n.prototype.uploadDynamic=function(t,i,r){for(var s=0;s<this.dynamicProperties.length;s++){var o=this.dynamicProperties[s];o.uploadFunction(t,i,r,o.type===e.TYPES.UNSIGNED_BYTE?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,o.offset)}this.dynamicBuffer._updateID++},n.prototype.uploadStatic=function(t,i,r){for(var s=0;s<this.staticProperties.length;s++){var o=this.staticProperties[s];o.uploadFunction(t,i,r,o.type===e.TYPES.UNSIGNED_BYTE?this.staticDataUint32:this.staticData,this.staticStride,o.offset)}this.staticBuffer._updateID++},n.prototype.destroy=function(){this.indexBuffer=null,this.dynamicProperties=null,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.geometry.destroy()};var h="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\n\nattribute vec2 aPositionCoord;\nattribute float aRotation;\n\nuniform mat3 translationMatrix;\nuniform vec4 uColor;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nvoid main(void){\n float x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);\n float y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);\n\n vec2 v = vec2(x, y);\n v = v + aPositionCoord;\n\n gl_Position = vec4((translationMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vColor = aColor * uColor;\n}\n",u="varying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n vec4 color = texture2D(uSampler, vTextureCoord) * vColor;\n gl_FragColor = color;\n}",p=function(t){function r(i){t.call(this,i),this.shader=null,this.properties=null,this.tempMatrix=new o.Matrix,this.properties=[{attributeName:"aVertexPosition",size:2,uploadFunction:this.uploadVertices,offset:0},{attributeName:"aPositionCoord",size:2,uploadFunction:this.uploadPosition,offset:0},{attributeName:"aRotation",size:1,uploadFunction:this.uploadRotation,offset:0},{attributeName:"aTextureCoord",size:2,uploadFunction:this.uploadUvs,offset:0},{attributeName:"aColor",size:1,type:e.TYPES.UNSIGNED_BYTE,uploadFunction:this.uploadTint,offset:0}],this.shader=s.Shader.from(h,u,{})}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.render=function(t){var e=t.children,r=t._maxSize,s=t._batchSize,o=this.renderer,a=e.length;if(0!==a){a>r&&(a=r);var n=t._buffers;n||(n=t._buffers=this.generateBuffers(t));var h=e[0]._texture.baseTexture;this.renderer.state.setBlendMode(i.correctBlendMode(t.blendMode,h.premultiplyAlpha));var u=o.gl,p=t.worldTransform.copyTo(this.tempMatrix);p.prepend(o.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=p.toArray(!0),this.shader.uniforms.uColor=i.premultiplyRgba(t.tintRgb,t.worldAlpha,this.shader.uniforms.uColor,h.premultiplyAlpha),this.shader.uniforms.uSampler=h,this.renderer.shader.bind(this.shader);for(var l=!1,c=0,d=0;c<a;c+=s,d+=1){var f=a-c;if(f>s&&(f=s),d>=n.length){if(!t.autoResize)break;n.push(this._generateOneMoreBuffer(t))}var y=n[d];y.uploadDynamic(e,c,f);var v=t._bufferUpdateIDs[d]||0;(l=l||y._updateID<v)&&(y._updateID=t._updateID,y.uploadStatic(e,c,f)),o.geometry.bind(y.geometry),u.drawElements(u.TRIANGLES,6*f,u.UNSIGNED_SHORT,0)}}},r.prototype.generateBuffers=function(t){for(var e=[],i=t._maxSize,r=t._batchSize,s=t._properties,o=0;o<i;o+=r)e.push(new n(this.properties,s,r));return e},r.prototype._generateOneMoreBuffer=function(t){var e=t._batchSize,i=t._properties;return new n(this.properties,i,e)},r.prototype.uploadVertices=function(t,e,i,r,s,o){for(var a=0,n=0,h=0,u=0,p=0;p<i;++p){var l=t[e+p],c=l._texture,d=l.scale.x,f=l.scale.y,y=c.trim,v=c.orig;y?(a=(n=y.x-l.anchor.x*v.width)+y.width,h=(u=y.y-l.anchor.y*v.height)+y.height):(a=v.width*(1-l.anchor.x),n=v.width*-l.anchor.x,h=v.height*(1-l.anchor.y),u=v.height*-l.anchor.y),r[o]=n*d,r[o+1]=u*f,r[o+s]=a*d,r[o+s+1]=u*f,r[o+2*s]=a*d,r[o+2*s+1]=h*f,r[o+3*s]=n*d,r[o+3*s+1]=h*f,o+=4*s}},r.prototype.uploadPosition=function(t,e,i,r,s,o){for(var a=0;a<i;a++){var n=t[e+a].position;r[o]=n.x,r[o+1]=n.y,r[o+s]=n.x,r[o+s+1]=n.y,r[o+2*s]=n.x,r[o+2*s+1]=n.y,r[o+3*s]=n.x,r[o+3*s+1]=n.y,o+=4*s}},r.prototype.uploadRotation=function(t,e,i,r,s,o){for(var a=0;a<i;a++){var n=t[e+a].rotation;r[o]=n,r[o+s]=n,r[o+2*s]=n,r[o+3*s]=n,o+=4*s}},r.prototype.uploadUvs=function(t,e,i,r,s,o){for(var a=0;a<i;++a){var n=t[e+a]._texture._uvs;n?(r[o]=n.x0,r[o+1]=n.y0,r[o+s]=n.x1,r[o+s+1]=n.y1,r[o+2*s]=n.x2,r[o+2*s+1]=n.y2,r[o+3*s]=n.x3,r[o+3*s+1]=n.y3,o+=4*s):(r[o]=0,r[o+1]=0,r[o+s]=0,r[o+s+1]=0,r[o+2*s]=0,r[o+2*s+1]=0,r[o+3*s]=0,r[o+3*s+1]=0,o+=4*s)}},r.prototype.uploadTint=function(t,e,r,s,o,a){for(var n=0;n<r;++n){var h=t[e+n],u=h._texture.baseTexture.premultiplyAlpha,p=h.alpha,l=p<1&&u?i.premultiplyTint(h._tintRGB,p):h._tintRGB+(255*p<<24);s[a]=l,s[a+o]=l,s[a+2*o]=l,s[a+3*o]=l,a+=4*o}},r.prototype.destroy=function(){t.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null},r}(s.ObjectRenderer);return t.ParticleContainer=a,t.ParticleRenderer=p,t}({},PIXI,PIXI.utils,PIXI,PIXI,PIXI);Object.assign(this.PIXI,_pixi_particles); | ||
this.PIXI=this.PIXI||{};var _pixi_particles=function(t,e,i,r,s,o){"use strict";var a=function(t){function r(i,r,s,o){void 0===i&&(i=1500),void 0===s&&(s=16384),void 0===o&&(o=!1),t.call(this);s>16384&&(s=16384),this._properties=[!1,!0,!1,!1,!1],this._maxSize=i,this._batchSize=s,this._buffers=null,this._bufferUpdateIDs=[],this._updateID=0,this.interactiveChildren=!1,this.blendMode=e.BLEND_MODES.NORMAL,this.autoResize=o,this.roundPixels=!0,this.baseTexture=null,this.setProperties(r),this._tint=0,this.tintRgb=new Float32Array(4),this.tint=16777215}t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r;var s={tint:{configurable:!0}};return r.prototype.setProperties=function(t){t&&(this._properties[0]="vertices"in t||"scale"in t?!!t.vertices||!!t.scale:this._properties[0],this._properties[1]="position"in t?!!t.position:this._properties[1],this._properties[2]="rotation"in t?!!t.rotation:this._properties[2],this._properties[3]="uvs"in t?!!t.uvs:this._properties[3],this._properties[4]="tint"in t||"alpha"in t?!!t.tint||!!t.alpha:this._properties[4])},r.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},s.tint.get=function(){return this._tint},s.tint.set=function(t){this._tint=t,i.hex2rgb(t,this.tintRgb)},r.prototype.render=function(t){var e=this;this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable&&(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.valid||this.baseTexture.once("update",function(){return e.onChildrenChange(0)})),t.batch.setObjectRenderer(t.plugins.particle),t.plugins.particle.render(this))},r.prototype.onChildrenChange=function(t){for(var e=Math.floor(t/this._batchSize);this._bufferUpdateIDs.length<e;)this._bufferUpdateIDs.push(0);this._bufferUpdateIDs[e]=++this._updateID},r.prototype.dispose=function(){if(this._buffers){for(var t=0;t<this._buffers.length;++t)this._buffers[t].destroy();this._buffers=null}},r.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this.dispose(),this._properties=null,this._buffers=null,this._bufferUpdateIDs=null},Object.defineProperties(r.prototype,s),r}(r.Container),n=function(t,i,r){this.geometry=new s.Geometry,this.indexBuffer=null,this.size=r,this.dynamicProperties=[],this.staticProperties=[];for(var o=0;o<t.length;++o){var a=t[o];a={attributeName:a.attributeName,size:a.size,uploadFunction:a.uploadFunction,type:a.type||e.TYPES.FLOAT,offset:a.offset},i[o]?this.dynamicProperties.push(a):this.staticProperties.push(a)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this._updateID=0,this.initBuffers()};n.prototype.initBuffers=function(){var t=this.geometry,r=0;this.indexBuffer=new s.Buffer(i.createIndicesForQuads(this.size),!0,!0),t.addIndex(this.indexBuffer),this.dynamicStride=0;for(var o=0;o<this.dynamicProperties.length;++o){var a=this.dynamicProperties[o];a.offset=r,r+=a.size,this.dynamicStride+=a.size}var n=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(n),this.dynamicDataUint32=new Uint32Array(n),this.dynamicBuffer=new s.Buffer(this.dynamicData,!1,!1);var h=0;this.staticStride=0;for(var u=0;u<this.staticProperties.length;++u){var p=this.staticProperties[u];p.offset=h,h+=p.size,this.staticStride+=p.size}var l=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(l),this.staticDataUint32=new Uint32Array(l),this.staticBuffer=new s.Buffer(this.staticData,!0,!1);for(var c=0;c<this.dynamicProperties.length;++c){var d=this.dynamicProperties[c];t.addAttribute(d.attributeName,this.dynamicBuffer,0,d.type===e.TYPES.UNSIGNED_BYTE,d.type,4*this.dynamicStride,4*d.offset)}for(var f=0;f<this.staticProperties.length;++f){var y=this.staticProperties[f];t.addAttribute(y.attributeName,this.staticBuffer,0,y.type===e.TYPES.UNSIGNED_BYTE,y.type,4*this.staticStride,4*y.offset)}},n.prototype.uploadDynamic=function(t,i,r){for(var s=0;s<this.dynamicProperties.length;s++){var o=this.dynamicProperties[s];o.uploadFunction(t,i,r,o.type===e.TYPES.UNSIGNED_BYTE?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,o.offset)}this.dynamicBuffer._updateID++},n.prototype.uploadStatic=function(t,i,r){for(var s=0;s<this.staticProperties.length;s++){var o=this.staticProperties[s];o.uploadFunction(t,i,r,o.type===e.TYPES.UNSIGNED_BYTE?this.staticDataUint32:this.staticData,this.staticStride,o.offset)}this.staticBuffer._updateID++},n.prototype.destroy=function(){this.indexBuffer=null,this.dynamicProperties=null,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.geometry.destroy()};var h="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\n\nattribute vec2 aPositionCoord;\nattribute float aRotation;\n\nuniform mat3 translationMatrix;\nuniform vec4 uColor;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nvoid main(void){\n float x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);\n float y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);\n\n vec2 v = vec2(x, y);\n v = v + aPositionCoord;\n\n gl_Position = vec4((translationMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vColor = aColor * uColor;\n}\n",u="varying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n vec4 color = texture2D(uSampler, vTextureCoord) * vColor;\n gl_FragColor = color;\n}",p=function(t){function r(i){t.call(this,i),this.shader=null,this.properties=null,this.tempMatrix=new o.Matrix,this.properties=[{attributeName:"aVertexPosition",size:2,uploadFunction:this.uploadVertices,offset:0},{attributeName:"aPositionCoord",size:2,uploadFunction:this.uploadPosition,offset:0},{attributeName:"aRotation",size:1,uploadFunction:this.uploadRotation,offset:0},{attributeName:"aTextureCoord",size:2,uploadFunction:this.uploadUvs,offset:0},{attributeName:"aColor",size:1,type:e.TYPES.UNSIGNED_BYTE,uploadFunction:this.uploadTint,offset:0}],this.shader=s.Shader.from(h,u,{})}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.render=function(t){var e=t.children,r=t._maxSize,s=t._batchSize,o=this.renderer,a=e.length;if(0!==a){a>r&&!t.autoResize&&(a=r);var n=t._buffers;n||(n=t._buffers=this.generateBuffers(t));var h=e[0]._texture.baseTexture;this.renderer.state.setBlendMode(i.correctBlendMode(t.blendMode,h.premultiplyAlpha));var u=o.gl,p=t.worldTransform.copyTo(this.tempMatrix);p.prepend(o.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=p.toArray(!0),this.shader.uniforms.uColor=i.premultiplyRgba(t.tintRgb,t.worldAlpha,this.shader.uniforms.uColor,h.premultiplyAlpha),this.shader.uniforms.uSampler=h,this.renderer.shader.bind(this.shader);for(var l=!1,c=0,d=0;c<a;c+=s,d+=1){var f=a-c;f>s&&(f=s),d>=n.length&&n.push(this._generateOneMoreBuffer(t));var y=n[d];y.uploadDynamic(e,c,f);var v=t._bufferUpdateIDs[d]||0;(l=l||y._updateID<v)&&(y._updateID=t._updateID,y.uploadStatic(e,c,f)),o.geometry.bind(y.geometry),u.drawElements(u.TRIANGLES,6*f,u.UNSIGNED_SHORT,0)}}},r.prototype.generateBuffers=function(t){for(var e=[],i=t._maxSize,r=t._batchSize,s=t._properties,o=0;o<i;o+=r)e.push(new n(this.properties,s,r));return e},r.prototype._generateOneMoreBuffer=function(t){var e=t._batchSize,i=t._properties;return new n(this.properties,i,e)},r.prototype.uploadVertices=function(t,e,i,r,s,o){for(var a=0,n=0,h=0,u=0,p=0;p<i;++p){var l=t[e+p],c=l._texture,d=l.scale.x,f=l.scale.y,y=c.trim,v=c.orig;y?(a=(n=y.x-l.anchor.x*v.width)+y.width,h=(u=y.y-l.anchor.y*v.height)+y.height):(a=v.width*(1-l.anchor.x),n=v.width*-l.anchor.x,h=v.height*(1-l.anchor.y),u=v.height*-l.anchor.y),r[o]=n*d,r[o+1]=u*f,r[o+s]=a*d,r[o+s+1]=u*f,r[o+2*s]=a*d,r[o+2*s+1]=h*f,r[o+3*s]=n*d,r[o+3*s+1]=h*f,o+=4*s}},r.prototype.uploadPosition=function(t,e,i,r,s,o){for(var a=0;a<i;a++){var n=t[e+a].position;r[o]=n.x,r[o+1]=n.y,r[o+s]=n.x,r[o+s+1]=n.y,r[o+2*s]=n.x,r[o+2*s+1]=n.y,r[o+3*s]=n.x,r[o+3*s+1]=n.y,o+=4*s}},r.prototype.uploadRotation=function(t,e,i,r,s,o){for(var a=0;a<i;a++){var n=t[e+a].rotation;r[o]=n,r[o+s]=n,r[o+2*s]=n,r[o+3*s]=n,o+=4*s}},r.prototype.uploadUvs=function(t,e,i,r,s,o){for(var a=0;a<i;++a){var n=t[e+a]._texture._uvs;n?(r[o]=n.x0,r[o+1]=n.y0,r[o+s]=n.x1,r[o+s+1]=n.y1,r[o+2*s]=n.x2,r[o+2*s+1]=n.y2,r[o+3*s]=n.x3,r[o+3*s+1]=n.y3,o+=4*s):(r[o]=0,r[o+1]=0,r[o+s]=0,r[o+s+1]=0,r[o+2*s]=0,r[o+2*s+1]=0,r[o+3*s]=0,r[o+3*s+1]=0,o+=4*s)}},r.prototype.uploadTint=function(t,e,r,s,o,a){for(var n=0;n<r;++n){var h=t[e+n],u=h._texture.baseTexture.premultiplyAlpha,p=h.alpha,l=p<1&&u?i.premultiplyTint(h._tintRGB,p):h._tintRGB+(255*p<<24);s[a]=l,s[a+o]=l,s[a+2*o]=l,s[a+3*o]=l,a+=4*o}},r.prototype.destroy=function(){t.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null},r}(s.ObjectRenderer);return t.ParticleContainer=a,t.ParticleRenderer=p,t}({},PIXI,PIXI.utils,PIXI,PIXI,PIXI);Object.assign(this.PIXI,_pixi_particles); | ||
//# sourceMappingURL=particles.min.js.map |
/*! | ||
* @pixi/particles - v5.0.3 | ||
* Compiled Sun, 19 May 2019 19:03:31 UTC | ||
* @pixi/particles - v5.0.4 | ||
* Compiled Fri, 07 Jun 2019 17:17:49 UTC | ||
* | ||
@@ -30,3 +30,3 @@ * @pixi/particles is licensed under the MIT License. | ||
* { | ||
* let sprite = new PIXI.Sprite.from("myImage.png"); | ||
* let sprite = PIXI.Sprite.from("myImage.png"); | ||
* container.addChild(sprite); | ||
@@ -61,7 +61,2 @@ * } | ||
if (batchSize > maxSize) | ||
{ | ||
batchSize = maxSize; | ||
} | ||
/** | ||
@@ -655,3 +650,3 @@ * Set properties to be dynamic (true) / static (false) | ||
} | ||
else if (totalChildren > maxSize) | ||
else if (totalChildren > maxSize && !container.autoResize) | ||
{ | ||
@@ -702,6 +697,2 @@ totalChildren = maxSize; | ||
{ | ||
if (!container.autoResize) | ||
{ | ||
break; | ||
} | ||
buffers.push(this._generateOneMoreBuffer(container)); | ||
@@ -708,0 +699,0 @@ } |
/*! | ||
* @pixi/particles - v5.0.3 | ||
* Compiled Sun, 19 May 2019 19:03:31 UTC | ||
* @pixi/particles - v5.0.4 | ||
* Compiled Fri, 07 Jun 2019 17:17:49 UTC | ||
* | ||
@@ -34,3 +34,3 @@ * @pixi/particles is licensed under the MIT License. | ||
* { | ||
* let sprite = new PIXI.Sprite.from("myImage.png"); | ||
* let sprite = PIXI.Sprite.from("myImage.png"); | ||
* container.addChild(sprite); | ||
@@ -65,7 +65,2 @@ * } | ||
if (batchSize > maxSize) | ||
{ | ||
batchSize = maxSize; | ||
} | ||
/** | ||
@@ -659,3 +654,3 @@ * Set properties to be dynamic (true) / static (false) | ||
} | ||
else if (totalChildren > maxSize) | ||
else if (totalChildren > maxSize && !container.autoResize) | ||
{ | ||
@@ -706,6 +701,2 @@ totalChildren = maxSize; | ||
{ | ||
if (!container.autoResize) | ||
{ | ||
break; | ||
} | ||
buffers.push(this._generateOneMoreBuffer(container)); | ||
@@ -712,0 +703,0 @@ } |
{ | ||
"name": "@pixi/particles", | ||
"version": "5.0.3", | ||
"version": "5.0.4", | ||
"main": "lib/particles.js", | ||
@@ -27,7 +27,7 @@ "module": "lib/particles.es.js", | ||
"dependencies": { | ||
"@pixi/constants": "^5.0.3", | ||
"@pixi/core": "^5.0.3", | ||
"@pixi/display": "^5.0.3", | ||
"@pixi/math": "^5.0.3", | ||
"@pixi/utils": "^5.0.3" | ||
"@pixi/constants": "^5.0.4", | ||
"@pixi/core": "^5.0.4", | ||
"@pixi/display": "^5.0.4", | ||
"@pixi/math": "^5.0.4", | ||
"@pixi/utils": "^5.0.4" | ||
}, | ||
@@ -37,3 +37,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "ba03f57001cd8bae3ae3644911cd513c68184e7c" | ||
"gitHead": "7a771ca5f05eeba62222b53446d0c2bdfcac37f7" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
303491
2527
Updated@pixi/constants@^5.0.4
Updated@pixi/core@^5.0.4
Updated@pixi/display@^5.0.4
Updated@pixi/math@^5.0.4
Updated@pixi/utils@^5.0.4