Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pixi/sprite-tiling

Package Overview
Dependencies
Maintainers
1
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pixi/sprite-tiling - npm Package Compare versions

Comparing version 5.3.4 to 5.3.5

8

dist/sprite-tiling.js
/*!
* @pixi/sprite-tiling - v5.3.4
* Compiled Mon, 14 Dec 2020 19:48:09 UTC
* @pixi/sprite-tiling - v5.3.5
* Compiled Thu, 17 Dec 2020 18:23:23 UTC
*

@@ -247,3 +247,3 @@ * @pixi/sprite-tiling is licensed under the MIT License.

*/
_this.uvMatrix = texture.uvMatrix || new core.TextureMatrix(texture);
_this.uvMatrix = _this.texture.uvMatrix || new core.TextureMatrix(texture);
/**

@@ -464,3 +464,3 @@ * Plugin that is responsible for rendering this element.

var fragment = "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 = vTextureCoord - floor(vTextureCoord - uClampOffset);\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n vec4 texSample = texture2D(uSampler, coord);\n gl_FragColor = texSample * uColor;\n}\n";
var fragment = "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 = vTextureCoord + ceil(uClampOffset - vTextureCoord);\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n vec4 texSample = texture2D(uSampler, coord);\n gl_FragColor = texSample * uColor;\n}\n";

@@ -467,0 +467,0 @@ var fragmentSimple = "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";

/*!
* @pixi/sprite-tiling - v5.3.4
* Compiled Mon, 14 Dec 2020 19:48:09 UTC
* @pixi/sprite-tiling - v5.3.5
* Compiled Thu, 17 Dec 2020 18:23:23 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,o,i,n){"use strict";var a=function(t,r){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(t,r)};function s(t,r){function e(){this.constructor=t}a(t,r),t.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)}var u=new e.Point,h=function(t){function o(o,i,n){void 0===i&&(i=100),void 0===n&&(n=100);var a=t.call(this,o)||this;return a.tileTransform=new e.Transform,a._width=i,a._height=n,a.uvMatrix=o.uvMatrix||new r.TextureMatrix(o),a.pluginName="tilingSprite",a.uvRespectAnchor=!1,a}return s(o,t),Object.defineProperty(o.prototype,"clampMargin",{get:function(){return this.uvMatrix.clampMargin},set:function(t){this.uvMatrix.clampMargin=t,this.uvMatrix.update(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"tileScale",{get:function(){return this.tileTransform.scale},set:function(t){this.tileTransform.scale.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"tilePosition",{get:function(){return this.tileTransform.position},set:function(t){this.tileTransform.position.copyFrom(t)},enumerable:!1,configurable:!0}),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),o=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,t,r,e,o)},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,u);var r=this._width,e=this._height,o=-r*this.anchor._x;if(u.x>=o&&u.x<o+r){var i=-e*this.anchor._y;if(u.y>=i&&u.y<i+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){return"number"==typeof e&&(i.deprecation("5.3.0","TilingSprite.from use options instead of width and height args"),e={width:e,height:arguments[2]}),new o(r.Texture.from(t,e),e.width,e.height)},Object.defineProperty(o.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t},enumerable:!1,configurable:!0}),o}(o.Sprite),c="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",l="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 = vTextureCoord - floor(vTextureCoord - uClampOffset);\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n vec4 texSample = texture2D(uSampler, coord);\n gl_FragColor = texSample * uColor;\n}\n",d="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",p=new e.Matrix,m=function(t){function e(e){var o=t.call(this,e)||this,i={globals:o.renderer.globalUniforms};return o.shader=r.Shader.from(c,l,i),o.simpleShader=r.Shader.from(c,d,i),o.quad=new r.QuadUv,o.state=r.State.for2d(),o}return s(e,t),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,u=t.tileTransform.localTransform,h=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 l=c?this.simpleShader:this.shader,d=a.width,m=a.height,f=t._width,_=t._height;p.set(u.a*d/f,u.b*d/_,u.c*m/f,u.d*m/_,u.tx/f,u.ty/_),p.invert(),c?p.prepend(h.mapCoord):(l.uniforms.uMapCoord=h.mapCoord.toArray(!0),l.uniforms.uClampFrame=h.uClampFrame,l.uniforms.uClampOffset=h.uClampOffset),l.uniforms.uTransform=p.toArray(!0),l.uniforms.uColor=i.premultiplyTintToRgba(t.tint,t.worldAlpha,l.uniforms.uColor,s.alphaMode),l.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),l.uniforms.uSampler=a,r.shader.bind(l),r.geometry.bind(e),this.state.blendMode=i.correctBlendMode(t.blendMode,s.alphaMode),r.state.set(this.state),r.geometry.draw(this.renderer.gl.TRIANGLES,6,0)},e}(r.ObjectRenderer);return t.TilingSprite=h,t.TilingSpriteRenderer=m,t}({},PIXI,PIXI,PIXI,PIXI.utils,PIXI);Object.assign(this.PIXI,_pixi_sprite_tiling);
this.PIXI=this.PIXI||{};var _pixi_sprite_tiling=function(t,r,e,i,n,o){"use strict";var a=function(t,r){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(t,r)};function s(t,r){function e(){this.constructor=t}a(t,r),t.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)}var u=new e.Point,h=function(t){function i(i,n,o){void 0===n&&(n=100),void 0===o&&(o=100);var a=t.call(this,i)||this;return a.tileTransform=new e.Transform,a._width=n,a._height=o,a.uvMatrix=a.texture.uvMatrix||new r.TextureMatrix(i),a.pluginName="tilingSprite",a.uvRespectAnchor=!1,a}return s(i,t),Object.defineProperty(i.prototype,"clampMargin",{get:function(){return this.uvMatrix.clampMargin},set:function(t){this.uvMatrix.clampMargin=t,this.uvMatrix.update(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"tileScale",{get:function(){return this.tileTransform.scale},set:function(t){this.tileTransform.scale.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"tilePosition",{get:function(){return this.tileTransform.position},set:function(t){this.tileTransform.position.copyFrom(t)},enumerable:!1,configurable:!0}),i.prototype._onTextureUpdate=function(){this.uvMatrix&&(this.uvMatrix.texture=this._texture),this._cachedTint=16777215},i.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))},i.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)},i.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)},i.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,u);var r=this._width,e=this._height,i=-r*this.anchor._x;if(u.x>=i&&u.x<i+r){var n=-e*this.anchor._y;if(u.y>=n&&u.y<n+e)return!0}return!1},i.prototype.destroy=function(r){t.prototype.destroy.call(this,r),this.tileTransform=null,this.uvMatrix=null},i.from=function(t,e){return"number"==typeof e&&(n.deprecation("5.3.0","TilingSprite.from use options instead of width and height args"),e={width:e,height:arguments[2]}),new i(r.Texture.from(t,e),e.width,e.height)},Object.defineProperty(i.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t},enumerable:!1,configurable:!0}),i}(i.Sprite),c="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",l="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 = vTextureCoord + ceil(uClampOffset - vTextureCoord);\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n vec4 texSample = texture2D(uSampler, coord);\n gl_FragColor = texSample * uColor;\n}\n",d="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",p=new e.Matrix,m=function(t){function e(e){var i=t.call(this,e)||this,n={globals:i.renderer.globalUniforms};return i.shader=r.Shader.from(c,l,n),i.simpleShader=r.Shader.from(c,d,n),i.quad=new r.QuadUv,i.state=r.State.for2d(),i}return s(e,t),e.prototype.render=function(t){var r=this.renderer,e=this.quad,i=e.vertices;i[0]=i[6]=t._width*-t.anchor.x,i[1]=i[3]=t._height*-t.anchor.y,i[2]=i[4]=t._width*(1-t.anchor.x),i[5]=i[7]=t._height*(1-t.anchor.y),t.uvRespectAnchor&&((i=e.uvs)[0]=i[6]=-t.anchor.x,i[1]=i[3]=-t.anchor.y,i[2]=i[4]=1-t.anchor.x,i[5]=i[7]=1-t.anchor.y),e.invalidate();var a=t._texture,s=a.baseTexture,u=t.tileTransform.localTransform,h=t.uvMatrix,c=s.isPowerOfTwo&&a.frame.width===s.width&&a.frame.height===s.height;c&&(s._glTextures[r.CONTEXT_UID]?c=s.wrapMode!==o.WRAP_MODES.CLAMP:s.wrapMode===o.WRAP_MODES.CLAMP&&(s.wrapMode=o.WRAP_MODES.REPEAT));var l=c?this.simpleShader:this.shader,d=a.width,m=a.height,f=t._width,_=t._height;p.set(u.a*d/f,u.b*d/_,u.c*m/f,u.d*m/_,u.tx/f,u.ty/_),p.invert(),c?p.prepend(h.mapCoord):(l.uniforms.uMapCoord=h.mapCoord.toArray(!0),l.uniforms.uClampFrame=h.uClampFrame,l.uniforms.uClampOffset=h.uClampOffset),l.uniforms.uTransform=p.toArray(!0),l.uniforms.uColor=n.premultiplyTintToRgba(t.tint,t.worldAlpha,l.uniforms.uColor,s.alphaMode),l.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),l.uniforms.uSampler=a,r.shader.bind(l),r.geometry.bind(e),this.state.blendMode=n.correctBlendMode(t.blendMode,s.alphaMode),r.state.set(this.state),r.geometry.draw(this.renderer.gl.TRIANGLES,6,0)},e}(r.ObjectRenderer);return t.TilingSprite=h,t.TilingSpriteRenderer=m,t}({},PIXI,PIXI,PIXI,PIXI.utils,PIXI);Object.assign(this.PIXI,_pixi_sprite_tiling);
//# sourceMappingURL=sprite-tiling.min.js.map
/*!
* @pixi/sprite-tiling - v5.3.4
* Compiled Mon, 14 Dec 2020 19:48:09 UTC
* @pixi/sprite-tiling - v5.3.5
* Compiled Thu, 17 Dec 2020 18:23:23 UTC
*

@@ -87,3 +87,3 @@ * @pixi/sprite-tiling is licensed under the MIT License.

*/
_this.uvMatrix = texture.uvMatrix || new TextureMatrix(texture);
_this.uvMatrix = _this.texture.uvMatrix || new TextureMatrix(texture);
/**

@@ -304,3 +304,3 @@ * Plugin that is responsible for rendering this element.

var fragment = "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 = vTextureCoord - floor(vTextureCoord - uClampOffset);\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n vec4 texSample = texture2D(uSampler, coord);\n gl_FragColor = texSample * uColor;\n}\n";
var fragment = "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 = vTextureCoord + ceil(uClampOffset - vTextureCoord);\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n vec4 texSample = texture2D(uSampler, coord);\n gl_FragColor = texSample * uColor;\n}\n";

@@ -307,0 +307,0 @@ var fragmentSimple = "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";

/*!
* @pixi/sprite-tiling - v5.3.4
* Compiled Mon, 14 Dec 2020 19:48:09 UTC
* @pixi/sprite-tiling - v5.3.5
* Compiled Thu, 17 Dec 2020 18:23:23 UTC
*

@@ -91,3 +91,3 @@ * @pixi/sprite-tiling is licensed under the MIT License.

*/
_this.uvMatrix = texture.uvMatrix || new core.TextureMatrix(texture);
_this.uvMatrix = _this.texture.uvMatrix || new core.TextureMatrix(texture);
/**

@@ -308,3 +308,3 @@ * Plugin that is responsible for rendering this element.

var fragment = "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 = vTextureCoord - floor(vTextureCoord - uClampOffset);\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n vec4 texSample = texture2D(uSampler, coord);\n gl_FragColor = texSample * uColor;\n}\n";
var fragment = "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 = vTextureCoord + ceil(uClampOffset - vTextureCoord);\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n vec4 texSample = texture2D(uSampler, coord);\n gl_FragColor = texSample * uColor;\n}\n";

@@ -311,0 +311,0 @@ var fragmentSimple = "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";

{
"name": "@pixi/sprite-tiling",
"version": "5.3.4",
"version": "5.3.5",
"main": "lib/sprite-tiling.js",

@@ -27,10 +27,10 @@ "module": "lib/sprite-tiling.es.js",

"dependencies": {
"@pixi/constants": "5.3.4",
"@pixi/core": "5.3.4",
"@pixi/display": "5.3.4",
"@pixi/math": "5.3.4",
"@pixi/sprite": "5.3.4",
"@pixi/utils": "5.3.4"
"@pixi/constants": "5.3.5",
"@pixi/core": "5.3.5",
"@pixi/display": "5.3.5",
"@pixi/math": "5.3.5",
"@pixi/sprite": "5.3.5",
"@pixi/utils": "5.3.5"
},
"gitHead": "f6a5f18e9d5a9b6e57d7bdcb0c369f88cd83530c"
"gitHead": "b5353da2693f0112230cd2b1be581f9bff0ce2a1"
}

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc