@pixi/sprite-tiling
Advanced tools
Comparing version 5.0.3 to 5.0.4
/*! | ||
* @pixi/sprite-tiling - v5.0.3 | ||
* Compiled Sun, 19 May 2019 19:03:31 UTC | ||
* @pixi/sprite-tiling - v5.0.4 | ||
* Compiled Fri, 07 Jun 2019 17:17:49 UTC | ||
* | ||
@@ -149,3 +149,3 @@ * @pixi/sprite-tiling is licensed under the MIT License. | ||
} | ||
this.cachedTint = 0xFFFFFF; | ||
this._cachedTint = 0xFFFFFF; | ||
}; | ||
@@ -152,0 +152,0 @@ |
/*! | ||
* @pixi/sprite-tiling - v5.0.3 | ||
* Compiled Sun, 19 May 2019 19:03:31 UTC | ||
* @pixi/sprite-tiling - v5.0.4 | ||
* Compiled Fri, 07 Jun 2019 17:17:49 UTC | ||
* | ||
@@ -8,3 +8,3 @@ * @pixi/sprite-tiling is licensed under the MIT License. | ||
*/ | ||
this.PIXI=this.PIXI||{};var _pixi_sprite_tiling=function(t,r,e,i,o,n){"use strict";var a=new e.Point,s=function(t){function o(i,o,n){void 0===o&&(o=100),void 0===n&&(n=100),t.call(this,i),this.tileTransform=new e.Transform,this._width=o,this._height=n,this._canvasPattern=null,this.uvMatrix=i.uvMatrix||new r.TextureMatrix(i),this.pluginName="tilingSprite",this.uvRespectAnchor=!1}t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o;var n={clampMargin:{configurable:!0},tileScale:{configurable:!0},tilePosition:{configurable:!0},width:{configurable:!0},height:{configurable:!0}};return n.clampMargin.get=function(){return this.uvMatrix.clampMargin},n.clampMargin.set=function(t){this.uvMatrix.clampMargin=t,this.uvMatrix.update(!0)},n.tileScale.get=function(){return this.tileTransform.scale},n.tileScale.set=function(t){this.tileTransform.scale.copyFrom(t)},n.tilePosition.get=function(){return this.tileTransform.position},n.tilePosition.set=function(t){this.tileTransform.position.copyFrom(t)},o.prototype._onTextureUpdate=function(){this.uvMatrix&&(this.uvMatrix.texture=this._texture),this.cachedTint=16777215},o.prototype._render=function(t){var r=this._texture;r&&r.valid&&(this.tileTransform.updateLocalTransform(),this.uvMatrix.update(),t.batch.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this))},o.prototype._calculateBounds=function(){var t=this._width*-this._anchor._x,r=this._height*-this._anchor._y,e=this._width*(1-this._anchor._x),i=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,t,r,e,i)},o.prototype.getLocalBounds=function(r){return 0===this.children.length?(this._bounds.minX=this._width*-this._anchor._x,this._bounds.minY=this._height*-this._anchor._y,this._bounds.maxX=this._width*(1-this._anchor._x),this._bounds.maxY=this._height*(1-this._anchor._y),r||(this._localBoundsRect||(this._localBoundsRect=new e.Rectangle),r=this._localBoundsRect),this._bounds.getRectangle(r)):t.prototype.getLocalBounds.call(this,r)},o.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,a);var r=this._width,e=this._height,i=-r*this.anchor._x;if(a.x>=i&&a.x<i+r){var o=-e*this.anchor._y;if(a.y>=o&&a.y<o+e)return!0}return!1},o.prototype.destroy=function(r){t.prototype.destroy.call(this,r),this.tileTransform=null,this.uvMatrix=null},o.from=function(t,e,i){return new o(r.Texture.from(t),e,i)},o.fromFrame=function(t,r,e){var n=i.TextureCache[t];if(!n)throw new Error('The frameId "'+t+'" does not exist in the texture cache '+this);return new o(n,r,e)},o.fromImage=function(t,e,i,n){return n&&"object"!=typeof n&&(n={scaleMode:arguments[4],resourceOptions:{crossorigin:arguments[3]}}),new o(r.Texture.from(t,n),e,i)},n.width.get=function(){return this._width},n.width.set=function(t){this._width=t},n.height.get=function(){return this._height},n.height.set=function(t){this._height=t},Object.defineProperties(o.prototype,n),o}(o.Sprite),h="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n",u="varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;\n\nvoid main(void)\n{\n vec2 coord = mod(vTextureCoord - uClampOffset, vec2(1.0, 1.0)) + uClampOffset;\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n vec4 sample = texture2D(uSampler, coord);\n gl_FragColor = sample * uColor;\n}\n",c="varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\n\nvoid main(void)\n{\n vec4 sample = texture2D(uSampler, vTextureCoord);\n gl_FragColor = sample * uColor;\n}\n",l=new e.Matrix,p=function(t){function e(e){t.call(this,e);var i={globals:this.renderer.globalUniforms};this.shader=r.Shader.from(h,u,i),this.simpleShader=r.Shader.from(h,c,i),this.quad=new r.QuadUv}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(t){var r=this.renderer,e=this.quad,o=e.vertices;o[0]=o[6]=t._width*-t.anchor.x,o[1]=o[3]=t._height*-t.anchor.y,o[2]=o[4]=t._width*(1-t.anchor.x),o[5]=o[7]=t._height*(1-t.anchor.y),t.uvRespectAnchor&&((o=e.uvs)[0]=o[6]=-t.anchor.x,o[1]=o[3]=-t.anchor.y,o[2]=o[4]=1-t.anchor.x,o[5]=o[7]=1-t.anchor.y),e.invalidate();var a=t._texture,s=a.baseTexture,h=t.tileTransform.localTransform,u=t.uvMatrix,c=s.isPowerOfTwo&&a.frame.width===s.width&&a.frame.height===s.height;c&&(s._glTextures[r.CONTEXT_UID]?c=s.wrapMode!==n.WRAP_MODES.CLAMP:s.wrapMode===n.WRAP_MODES.CLAMP&&(s.wrapMode=n.WRAP_MODES.REPEAT));var p=c?this.simpleShader:this.shader,d=a.width,m=a.height,f=t._width,_=t._height;l.set(h.a*d/f,h.b*d/_,h.c*m/f,h.d*m/_,h.tx/f,h.ty/_),l.invert(),c?l.prepend(u.mapCoord):(p.uniforms.uMapCoord=u.mapCoord.toArray(!0),p.uniforms.uClampFrame=u.uClampFrame,p.uniforms.uClampOffset=u.uClampOffset),p.uniforms.uTransform=l.toArray(!0),p.uniforms.uColor=i.premultiplyTintToRgba(t.tint,t.worldAlpha,p.uniforms.uColor,s.premultiplyAlpha),p.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),p.uniforms.uSampler=a,r.shader.bind(p),r.geometry.bind(e),r.state.setBlendMode(i.correctBlendMode(t.blendMode,s.premultiplyAlpha)),r.geometry.draw(this.renderer.gl.TRIANGLES,6,0)},e}(r.ObjectRenderer);return t.TilingSprite=s,t.TilingSpriteRenderer=p,t}({},PIXI,PIXI,PIXI.utils,PIXI,PIXI);Object.assign(this.PIXI,_pixi_sprite_tiling); | ||
this.PIXI=this.PIXI||{};var _pixi_sprite_tiling=function(t,r,e,i,o,n){"use strict";var a=new e.Point,s=function(t){function o(i,o,n){void 0===o&&(o=100),void 0===n&&(n=100),t.call(this,i),this.tileTransform=new e.Transform,this._width=o,this._height=n,this._canvasPattern=null,this.uvMatrix=i.uvMatrix||new r.TextureMatrix(i),this.pluginName="tilingSprite",this.uvRespectAnchor=!1}t&&(o.__proto__=t),o.prototype=Object.create(t&&t.prototype),o.prototype.constructor=o;var n={clampMargin:{configurable:!0},tileScale:{configurable:!0},tilePosition:{configurable:!0},width:{configurable:!0},height:{configurable:!0}};return n.clampMargin.get=function(){return this.uvMatrix.clampMargin},n.clampMargin.set=function(t){this.uvMatrix.clampMargin=t,this.uvMatrix.update(!0)},n.tileScale.get=function(){return this.tileTransform.scale},n.tileScale.set=function(t){this.tileTransform.scale.copyFrom(t)},n.tilePosition.get=function(){return this.tileTransform.position},n.tilePosition.set=function(t){this.tileTransform.position.copyFrom(t)},o.prototype._onTextureUpdate=function(){this.uvMatrix&&(this.uvMatrix.texture=this._texture),this._cachedTint=16777215},o.prototype._render=function(t){var r=this._texture;r&&r.valid&&(this.tileTransform.updateLocalTransform(),this.uvMatrix.update(),t.batch.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this))},o.prototype._calculateBounds=function(){var t=this._width*-this._anchor._x,r=this._height*-this._anchor._y,e=this._width*(1-this._anchor._x),i=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,t,r,e,i)},o.prototype.getLocalBounds=function(r){return 0===this.children.length?(this._bounds.minX=this._width*-this._anchor._x,this._bounds.minY=this._height*-this._anchor._y,this._bounds.maxX=this._width*(1-this._anchor._x),this._bounds.maxY=this._height*(1-this._anchor._y),r||(this._localBoundsRect||(this._localBoundsRect=new e.Rectangle),r=this._localBoundsRect),this._bounds.getRectangle(r)):t.prototype.getLocalBounds.call(this,r)},o.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,a);var r=this._width,e=this._height,i=-r*this.anchor._x;if(a.x>=i&&a.x<i+r){var o=-e*this.anchor._y;if(a.y>=o&&a.y<o+e)return!0}return!1},o.prototype.destroy=function(r){t.prototype.destroy.call(this,r),this.tileTransform=null,this.uvMatrix=null},o.from=function(t,e,i){return new o(r.Texture.from(t),e,i)},o.fromFrame=function(t,r,e){var n=i.TextureCache[t];if(!n)throw new Error('The frameId "'+t+'" does not exist in the texture cache '+this);return new o(n,r,e)},o.fromImage=function(t,e,i,n){return n&&"object"!=typeof n&&(n={scaleMode:arguments[4],resourceOptions:{crossorigin:arguments[3]}}),new o(r.Texture.from(t,n),e,i)},n.width.get=function(){return this._width},n.width.set=function(t){this._width=t},n.height.get=function(){return this._height},n.height.set=function(t){this._height=t},Object.defineProperties(o.prototype,n),o}(o.Sprite),h="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n",u="varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;\n\nvoid main(void)\n{\n vec2 coord = mod(vTextureCoord - uClampOffset, vec2(1.0, 1.0)) + uClampOffset;\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n vec4 sample = texture2D(uSampler, coord);\n gl_FragColor = sample * uColor;\n}\n",c="varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\n\nvoid main(void)\n{\n vec4 sample = texture2D(uSampler, vTextureCoord);\n gl_FragColor = sample * uColor;\n}\n",l=new e.Matrix,p=function(t){function e(e){t.call(this,e);var i={globals:this.renderer.globalUniforms};this.shader=r.Shader.from(h,u,i),this.simpleShader=r.Shader.from(h,c,i),this.quad=new r.QuadUv}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.render=function(t){var r=this.renderer,e=this.quad,o=e.vertices;o[0]=o[6]=t._width*-t.anchor.x,o[1]=o[3]=t._height*-t.anchor.y,o[2]=o[4]=t._width*(1-t.anchor.x),o[5]=o[7]=t._height*(1-t.anchor.y),t.uvRespectAnchor&&((o=e.uvs)[0]=o[6]=-t.anchor.x,o[1]=o[3]=-t.anchor.y,o[2]=o[4]=1-t.anchor.x,o[5]=o[7]=1-t.anchor.y),e.invalidate();var a=t._texture,s=a.baseTexture,h=t.tileTransform.localTransform,u=t.uvMatrix,c=s.isPowerOfTwo&&a.frame.width===s.width&&a.frame.height===s.height;c&&(s._glTextures[r.CONTEXT_UID]?c=s.wrapMode!==n.WRAP_MODES.CLAMP:s.wrapMode===n.WRAP_MODES.CLAMP&&(s.wrapMode=n.WRAP_MODES.REPEAT));var p=c?this.simpleShader:this.shader,d=a.width,m=a.height,f=t._width,_=t._height;l.set(h.a*d/f,h.b*d/_,h.c*m/f,h.d*m/_,h.tx/f,h.ty/_),l.invert(),c?l.prepend(u.mapCoord):(p.uniforms.uMapCoord=u.mapCoord.toArray(!0),p.uniforms.uClampFrame=u.uClampFrame,p.uniforms.uClampOffset=u.uClampOffset),p.uniforms.uTransform=l.toArray(!0),p.uniforms.uColor=i.premultiplyTintToRgba(t.tint,t.worldAlpha,p.uniforms.uColor,s.premultiplyAlpha),p.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),p.uniforms.uSampler=a,r.shader.bind(p),r.geometry.bind(e),r.state.setBlendMode(i.correctBlendMode(t.blendMode,s.premultiplyAlpha)),r.geometry.draw(this.renderer.gl.TRIANGLES,6,0)},e}(r.ObjectRenderer);return t.TilingSprite=s,t.TilingSpriteRenderer=p,t}({},PIXI,PIXI,PIXI.utils,PIXI,PIXI);Object.assign(this.PIXI,_pixi_sprite_tiling); | ||
//# sourceMappingURL=sprite-tiling.min.js.map |
/*! | ||
* @pixi/sprite-tiling - v5.0.3 | ||
* Compiled Sun, 19 May 2019 19:03:31 UTC | ||
* @pixi/sprite-tiling - v5.0.4 | ||
* Compiled Fri, 07 Jun 2019 17:17:49 UTC | ||
* | ||
@@ -151,3 +151,3 @@ * @pixi/sprite-tiling is licensed under the MIT License. | ||
} | ||
this.cachedTint = 0xFFFFFF; | ||
this._cachedTint = 0xFFFFFF; | ||
}; | ||
@@ -154,0 +154,0 @@ |
/*! | ||
* @pixi/sprite-tiling - v5.0.3 | ||
* Compiled Sun, 19 May 2019 19:03:31 UTC | ||
* @pixi/sprite-tiling - v5.0.4 | ||
* Compiled Fri, 07 Jun 2019 17:17:49 UTC | ||
* | ||
@@ -155,3 +155,3 @@ * @pixi/sprite-tiling is licensed under the MIT License. | ||
} | ||
this.cachedTint = 0xFFFFFF; | ||
this._cachedTint = 0xFFFFFF; | ||
}; | ||
@@ -158,0 +158,0 @@ |
{ | ||
"name": "@pixi/sprite-tiling", | ||
"version": "5.0.3", | ||
"version": "5.0.4", | ||
"main": "lib/sprite-tiling.js", | ||
@@ -30,8 +30,8 @@ "module": "lib/sprite-tiling.es.js", | ||
"dependencies": { | ||
"@pixi/constants": "^5.0.3", | ||
"@pixi/core": "^5.0.3", | ||
"@pixi/display": "^5.0.3", | ||
"@pixi/math": "^5.0.3", | ||
"@pixi/sprite": "^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/sprite": "^5.0.4", | ||
"@pixi/utils": "^5.0.4" | ||
}, | ||
@@ -41,3 +41,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
149844
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/sprite@^5.0.4
Updated@pixi/utils@^5.0.4