@pixi/canvas-extract
Advanced tools
Comparing version 5.0.4 to 5.1.0
/*! | ||
* @pixi/canvas-extract - v5.0.4 | ||
* Compiled Fri, 07 Jun 2019 17:17:49 UTC | ||
* @pixi/canvas-extract - v5.1.0 | ||
* Compiled Fri, 19 Jul 2019 21:54:36 UTC | ||
* | ||
@@ -111,4 +111,4 @@ * @pixi/canvas-extract is licensed under the MIT License. | ||
var width = frame.width * resolution; | ||
var height = frame.height * resolution; | ||
var width = Math.floor(frame.width * resolution); | ||
var height = Math.floor(frame.height * resolution); | ||
@@ -115,0 +115,0 @@ var canvasBuffer = new utils.CanvasRenderTarget(width, height, 1); |
/*! | ||
* @pixi/canvas-extract - v5.0.4 | ||
* Compiled Fri, 07 Jun 2019 17:17:49 UTC | ||
* @pixi/canvas-extract - v5.1.0 | ||
* Compiled Fri, 19 Jul 2019 21:54:36 UTC | ||
* | ||
@@ -8,3 +8,3 @@ * @pixi/canvas-extract is licensed under the MIT License. | ||
*/ | ||
this.PIXI=this.PIXI||{},this.PIXI.extract=this.PIXI.extract||{};var _pixi_canvas_extract=function(e,t,r,a){"use strict";var n=new PIXI.Rectangle,i=function(e){this.renderer=e,e.extract=this};return i.prototype.image=function(e,t,r){var a=new Image;return a.src=this.base64(e,t,r),a},i.prototype.base64=function(e,t,r){return this.canvas(e).toDataURL(t,r)},i.prototype.canvas=function(e){var a,i,s,o,c=this.renderer;e&&(o=e instanceof t.RenderTexture?e:c.generateTexture(e)),o?(a=o.baseTexture._canvasRenderTarget.context,i=o.baseTexture._canvasRenderTarget.resolution,s=o.frame):(a=c.rootContext,i=c.resolution,(s=n).width=this.renderer.width,s.height=this.renderer.height);var h=s.width*i,u=s.height*i,x=new r.CanvasRenderTarget(h,u,1),d=a.getImageData(s.x*i,s.y*i,h,u);return x.context.putImageData(d,0,0),x.canvas},i.prototype.pixels=function(e){var r,a,i,s,o=this.renderer;return e&&(s=e instanceof t.RenderTexture?e:o.generateTexture(e)),s?(r=s.baseTexture._canvasRenderTarget.context,a=s.baseTexture._canvasRenderTarget.resolution,i=s.frame):(r=o.rootContext,(i=n).width=o.width,i.height=o.height),r.getImageData(0,0,i.width*a,i.height*a).data},i.prototype.destroy=function(){this.renderer.extract=null,this.renderer=null},e.CanvasExtract=i,e}({},PIXI,PIXI.utils);Object.assign(this.PIXI.extract,_pixi_canvas_extract); | ||
this.PIXI=this.PIXI||{},this.PIXI.extract=this.PIXI.extract||{};var _pixi_canvas_extract=function(e,t,r,a){"use strict";var n=new PIXI.Rectangle,i=function(e){this.renderer=e,e.extract=this};return i.prototype.image=function(e,t,r){var a=new Image;return a.src=this.base64(e,t,r),a},i.prototype.base64=function(e,t,r){return this.canvas(e).toDataURL(t,r)},i.prototype.canvas=function(e){var a,i,s,o,h=this.renderer;e&&(o=e instanceof t.RenderTexture?e:h.generateTexture(e)),o?(a=o.baseTexture._canvasRenderTarget.context,i=o.baseTexture._canvasRenderTarget.resolution,s=o.frame):(a=h.rootContext,i=h.resolution,(s=n).width=this.renderer.width,s.height=this.renderer.height);var c=Math.floor(s.width*i),u=Math.floor(s.height*i),x=new r.CanvasRenderTarget(c,u,1),d=a.getImageData(s.x*i,s.y*i,c,u);return x.context.putImageData(d,0,0),x.canvas},i.prototype.pixels=function(e){var r,a,i,s,o=this.renderer;return e&&(s=e instanceof t.RenderTexture?e:o.generateTexture(e)),s?(r=s.baseTexture._canvasRenderTarget.context,a=s.baseTexture._canvasRenderTarget.resolution,i=s.frame):(r=o.rootContext,(i=n).width=o.width,i.height=o.height),r.getImageData(0,0,i.width*a,i.height*a).data},i.prototype.destroy=function(){this.renderer.extract=null,this.renderer=null},e.CanvasExtract=i,e}({},PIXI,PIXI.utils);Object.assign(this.PIXI.extract,_pixi_canvas_extract); | ||
//# sourceMappingURL=canvas-extract.min.js.map |
/*! | ||
* @pixi/canvas-extract - v5.0.4 | ||
* Compiled Fri, 07 Jun 2019 17:17:49 UTC | ||
* @pixi/canvas-extract - v5.1.0 | ||
* Compiled Fri, 19 Jul 2019 21:54:36 UTC | ||
* | ||
@@ -110,4 +110,4 @@ * @pixi/canvas-extract is licensed under the MIT License. | ||
var width = frame.width * resolution; | ||
var height = frame.height * resolution; | ||
var width = Math.floor(frame.width * resolution); | ||
var height = Math.floor(frame.height * resolution); | ||
@@ -114,0 +114,0 @@ var canvasBuffer = new CanvasRenderTarget(width, height, 1); |
/*! | ||
* @pixi/canvas-extract - v5.0.4 | ||
* Compiled Fri, 07 Jun 2019 17:17:49 UTC | ||
* @pixi/canvas-extract - v5.1.0 | ||
* Compiled Fri, 19 Jul 2019 21:54:36 UTC | ||
* | ||
@@ -114,4 +114,4 @@ * @pixi/canvas-extract is licensed under the MIT License. | ||
var width = frame.width * resolution; | ||
var height = frame.height * resolution; | ||
var width = Math.floor(frame.width * resolution); | ||
var height = Math.floor(frame.height * resolution); | ||
@@ -118,0 +118,0 @@ var canvasBuffer = new utils.CanvasRenderTarget(width, height, 1); |
{ | ||
"name": "@pixi/canvas-extract", | ||
"version": "5.0.4", | ||
"version": "5.1.0", | ||
"main": "lib/canvas-extract.js", | ||
@@ -28,10 +28,7 @@ "module": "lib/canvas-extract.es.js", | ||
"dependencies": { | ||
"@pixi/core": "^5.0.4", | ||
"@pixi/math": "^5.0.4", | ||
"@pixi/utils": "^5.0.4" | ||
"@pixi/core": "^5.1.0", | ||
"@pixi/math": "^5.1.0", | ||
"@pixi/utils": "^5.1.0" | ||
}, | ||
"devDependencies": { | ||
"floss": "^2.2.0" | ||
}, | ||
"gitHead": "7a771ca5f05eeba62222b53446d0c2bdfcac37f7" | ||
"gitHead": "05c5e0e0beba56e886c74f201bf7efe576612570" | ||
} |
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
53787
0
Updated@pixi/core@^5.1.0
Updated@pixi/math@^5.1.0
Updated@pixi/utils@^5.1.0