@pixi/canvas-extract
Advanced tools
Comparing version 5.1.5 to 5.2.0
/*! | ||
* @pixi/canvas-extract - v5.1.5 | ||
* Compiled Tue, 24 Sep 2019 04:07:05 UTC | ||
* @pixi/canvas-extract - v5.2.0 | ||
* Compiled Wed, 06 Nov 2019 02:32:43 UTC | ||
* | ||
@@ -111,4 +111,4 @@ * @pixi/canvas-extract is licensed under the MIT License. | ||
var width = Math.floor(frame.width * resolution); | ||
var height = Math.floor(frame.height * resolution); | ||
var width = Math.floor((frame.width * resolution) + 1e-4); | ||
var height = Math.floor((frame.height * resolution) + 1e-4); | ||
@@ -115,0 +115,0 @@ var canvasBuffer = new utils.CanvasRenderTarget(width, height, 1); |
/*! | ||
* @pixi/canvas-extract - v5.1.5 | ||
* Compiled Tue, 24 Sep 2019 04:07:05 UTC | ||
* @pixi/canvas-extract - v5.2.0 | ||
* Compiled Wed, 06 Nov 2019 02:32:43 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,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); | ||
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+1e-4),u=Math.floor(s.height*i+1e-4),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.1.5 | ||
* Compiled Tue, 24 Sep 2019 04:07:05 UTC | ||
* @pixi/canvas-extract - v5.2.0 | ||
* Compiled Wed, 06 Nov 2019 02:32:43 UTC | ||
* | ||
@@ -110,4 +110,4 @@ * @pixi/canvas-extract is licensed under the MIT License. | ||
var width = Math.floor(frame.width * resolution); | ||
var height = Math.floor(frame.height * resolution); | ||
var width = Math.floor((frame.width * resolution) + 1e-4); | ||
var height = Math.floor((frame.height * resolution) + 1e-4); | ||
@@ -114,0 +114,0 @@ var canvasBuffer = new CanvasRenderTarget(width, height, 1); |
/*! | ||
* @pixi/canvas-extract - v5.1.5 | ||
* Compiled Tue, 24 Sep 2019 04:07:05 UTC | ||
* @pixi/canvas-extract - v5.2.0 | ||
* Compiled Wed, 06 Nov 2019 02:32:43 UTC | ||
* | ||
@@ -114,4 +114,4 @@ * @pixi/canvas-extract is licensed under the MIT License. | ||
var width = Math.floor(frame.width * resolution); | ||
var height = Math.floor(frame.height * resolution); | ||
var width = Math.floor((frame.width * resolution) + 1e-4); | ||
var height = Math.floor((frame.height * resolution) + 1e-4); | ||
@@ -118,0 +118,0 @@ var canvasBuffer = new utils.CanvasRenderTarget(width, height, 1); |
{ | ||
"name": "@pixi/canvas-extract", | ||
"version": "5.1.5", | ||
"version": "5.2.0", | ||
"main": "lib/canvas-extract.js", | ||
@@ -28,7 +28,7 @@ "module": "lib/canvas-extract.es.js", | ||
"dependencies": { | ||
"@pixi/core": "^5.1.5", | ||
"@pixi/math": "^5.1.0", | ||
"@pixi/utils": "^5.1.3" | ||
"@pixi/core": "^5.2.0", | ||
"@pixi/math": "^5.2.0", | ||
"@pixi/utils": "^5.2.0" | ||
}, | ||
"gitHead": "8cf3db88d06355cbabea64150cdb0774191e502c" | ||
"gitHead": "aaf96b460582b83a1fa73037ef2dd69dd9e84415" | ||
} |
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
54005
Updated@pixi/core@^5.2.0
Updated@pixi/math@^5.2.0
Updated@pixi/utils@^5.2.0