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

@pixi/canvas-sprite

Package Overview
Dependencies
Maintainers
3
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pixi/canvas-sprite - npm Package Compare versions

Comparing version 5.0.3 to 5.0.4

14

dist/canvas-sprite.js
/*!
* @pixi/canvas-sprite - v5.0.3
* Compiled Sun, 19 May 2019 19:03:31 UTC
* @pixi/canvas-sprite - v5.0.4
* Compiled Fri, 07 Jun 2019 17:17:49 UTC
*

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

context.drawImage(
source,
sprite._tintedCanvas,
0,

@@ -217,10 +217,2 @@ 0,

/**
* Cached tint value so we can tell when the tint is changed.
* @memberof PIXI.Sprite#
* @member {number} _cachedTint
* @protected
*/
sprite.Sprite.prototype._cachedTint = 0xFFFFFF;
/**
* Renders the object using the Canvas renderer

@@ -227,0 +219,0 @@ *

/*!
* @pixi/canvas-sprite - v5.0.3
* Compiled Sun, 19 May 2019 19:03:31 UTC
* @pixi/canvas-sprite - v5.0.4
* Compiled Fri, 07 Jun 2019 17:17:49 UTC
*

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

*/
this.PIXI=this.PIXI||{};var _pixi_canvas_sprite=function(t,e,r,o,i){"use strict";var n=new r.Matrix,a=function(t){this.renderer=t};return a.prototype.render=function(t){var i=t._texture,a=this.renderer,s=a.context,d=i._frame.width,l=i._frame.height,u=t.transform.worldTransform,h=0,c=0,p=i.baseTexture.getDrawableSource();if(!(i.orig.width<=0||i.orig.height<=0)&&p&&i.valid){a.setBlendMode(t.blendMode,!0),a.context.globalAlpha=t.worldAlpha;var _=i.baseTexture.scaleMode===e.SCALE_MODES.LINEAR;a.smoothProperty&&a.context[a.smoothProperty]!==_&&(s[a.smoothProperty]=_),i.trim?(h=i.trim.width/2+i.trim.x-t.anchor.x*i.orig.width,c=i.trim.height/2+i.trim.y-t.anchor.y*i.orig.height):(h=(.5-t.anchor.x)*i.orig.width,c=(.5-t.anchor.y)*i.orig.height),i.rotate&&(u.copyTo(n),u=n,r.GroupD8.matrixAppendRotationInv(u,i.rotate,h,c),h=0,c=0),h-=d/2,c-=l/2,t.roundPixels?(a.context.setTransform(u.a,u.b,u.c,u.d,u.tx*a.resolution|0,u.ty*a.resolution|0),h|=0,c|=0):a.context.setTransform(u.a,u.b,u.c,u.d,u.tx*a.resolution,u.ty*a.resolution);var x=i.baseTexture.resolution,I=a._outerBlend;I&&(s.save(),s.beginPath(),s.rect(h*a.resolution,c*a.resolution,d*a.resolution,l*a.resolution),s.clip()),16777215!==t.tint?(t._cachedTint===t.tint&&t._tintedCanvas.tintId===t._texture._updateID||(t._cachedTint=t.tint,t._tintedCanvas=o.CanvasTinter.getTintedCanvas(t,t.tint)),s.drawImage(p,0,0,d*x,l*x,h*a.resolution,c*a.resolution,d*a.resolution,l*a.resolution)):s.drawImage(p,i._frame.x*x,i._frame.y*x,d*x,l*x,h*a.resolution,c*a.resolution,d*a.resolution,l*a.resolution),I&&s.restore(),a.setBlendMode(e.BLEND_MODES.NORMAL)}},a.prototype.destroy=function(){this.renderer=null},i.Sprite.prototype._tintedCanvas=null,i.Sprite.prototype._cachedTint=16777215,i.Sprite.prototype._renderCanvas=function(t){t.plugins.sprite.render(this)},t.CanvasSpriteRenderer=a,t}({},PIXI,PIXI,PIXI,PIXI);Object.assign(this.PIXI,_pixi_canvas_sprite);
this.PIXI=this.PIXI||{};var _pixi_canvas_sprite=function(t,e,r,o,n){"use strict";var i=new r.Matrix,a=function(t){this.renderer=t};return a.prototype.render=function(t){var n=t._texture,a=this.renderer,s=a.context,d=n._frame.width,l=n._frame.height,u=t.transform.worldTransform,h=0,c=0,p=n.baseTexture.getDrawableSource();if(!(n.orig.width<=0||n.orig.height<=0)&&p&&n.valid){a.setBlendMode(t.blendMode,!0),a.context.globalAlpha=t.worldAlpha;var _=n.baseTexture.scaleMode===e.SCALE_MODES.LINEAR;a.smoothProperty&&a.context[a.smoothProperty]!==_&&(s[a.smoothProperty]=_),n.trim?(h=n.trim.width/2+n.trim.x-t.anchor.x*n.orig.width,c=n.trim.height/2+n.trim.y-t.anchor.y*n.orig.height):(h=(.5-t.anchor.x)*n.orig.width,c=(.5-t.anchor.y)*n.orig.height),n.rotate&&(u.copyTo(i),u=i,r.GroupD8.matrixAppendRotationInv(u,n.rotate,h,c),h=0,c=0),h-=d/2,c-=l/2,t.roundPixels?(a.context.setTransform(u.a,u.b,u.c,u.d,u.tx*a.resolution|0,u.ty*a.resolution|0),h|=0,c|=0):a.context.setTransform(u.a,u.b,u.c,u.d,u.tx*a.resolution,u.ty*a.resolution);var x=n.baseTexture.resolution,I=a._outerBlend;I&&(s.save(),s.beginPath(),s.rect(h*a.resolution,c*a.resolution,d*a.resolution,l*a.resolution),s.clip()),16777215!==t.tint?(t._cachedTint===t.tint&&t._tintedCanvas.tintId===t._texture._updateID||(t._cachedTint=t.tint,t._tintedCanvas=o.CanvasTinter.getTintedCanvas(t,t.tint)),s.drawImage(t._tintedCanvas,0,0,d*x,l*x,h*a.resolution,c*a.resolution,d*a.resolution,l*a.resolution)):s.drawImage(p,n._frame.x*x,n._frame.y*x,d*x,l*x,h*a.resolution,c*a.resolution,d*a.resolution,l*a.resolution),I&&s.restore(),a.setBlendMode(e.BLEND_MODES.NORMAL)}},a.prototype.destroy=function(){this.renderer=null},n.Sprite.prototype._tintedCanvas=null,n.Sprite.prototype._renderCanvas=function(t){t.plugins.sprite.render(this)},t.CanvasSpriteRenderer=a,t}({},PIXI,PIXI,PIXI,PIXI);Object.assign(this.PIXI,_pixi_canvas_sprite);
//# sourceMappingURL=canvas-sprite.min.js.map
/*!
* @pixi/canvas-sprite - v5.0.3
* Compiled Sun, 19 May 2019 19:03:31 UTC
* @pixi/canvas-sprite - v5.0.4
* Compiled Fri, 07 Jun 2019 17:17:49 UTC
*

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

context.drawImage(
source,
sprite._tintedCanvas,
0,

@@ -218,10 +218,2 @@ 0,

/**
* Cached tint value so we can tell when the tint is changed.
* @memberof PIXI.Sprite#
* @member {number} _cachedTint
* @protected
*/
Sprite.prototype._cachedTint = 0xFFFFFF;
/**
* Renders the object using the Canvas renderer

@@ -228,0 +220,0 @@ *

/*!
* @pixi/canvas-sprite - v5.0.3
* Compiled Sun, 19 May 2019 19:03:31 UTC
* @pixi/canvas-sprite - v5.0.4
* Compiled Fri, 07 Jun 2019 17:17:49 UTC
*

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

context.drawImage(
source,
sprite._tintedCanvas,
0,

@@ -222,10 +222,2 @@ 0,

/**
* Cached tint value so we can tell when the tint is changed.
* @memberof PIXI.Sprite#
* @member {number} _cachedTint
* @protected
*/
sprite.Sprite.prototype._cachedTint = 0xFFFFFF;
/**
* Renders the object using the Canvas renderer

@@ -232,0 +224,0 @@ *

{
"name": "@pixi/canvas-sprite",
"version": "5.0.3",
"version": "5.0.4",
"main": "lib/canvas-sprite.js",

@@ -27,7 +27,7 @@ "module": "lib/canvas-sprite.es.js",

"dependencies": {
"@pixi/canvas-renderer": "^5.0.3",
"@pixi/constants": "^5.0.3",
"@pixi/math": "^5.0.3",
"@pixi/sprite": "^5.0.3",
"@pixi/utils": "^5.0.3"
"@pixi/canvas-renderer": "^5.0.4",
"@pixi/constants": "^5.0.4",
"@pixi/math": "^5.0.4",
"@pixi/sprite": "^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

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