@pixi/canvas-extract
Advanced tools
Comparing version 5.4.0-rc.3 to 6.0.0-rc
/*! | ||
* @pixi/canvas-extract - v5.4.0-rc.3 | ||
* Compiled Thu, 10 Dec 2020 03:22:17 UTC | ||
* @pixi/canvas-extract - v6.0.0-rc | ||
* Compiled Tue, 29 Dec 2020 19:58:03 UTC | ||
* | ||
@@ -9,3 +9,3 @@ * @pixi/canvas-extract is licensed under the MIT License. | ||
this.PIXI = this.PIXI || {}; | ||
var _pixi_canvas_extract = (function (exports, core, utils, math, canvasRenderer) { | ||
var _pixi_canvas_extract = (function (exports, core, utils, math) { | ||
'use strict'; | ||
@@ -145,14 +145,2 @@ | ||
}()); | ||
/** | ||
* @method PIXI.CanvasRenderer#extract | ||
* @type {PIXI.CanvasExtract} | ||
* @see PIXI.CanvasRenderer#plugins | ||
* @deprecated since 5.3.0 | ||
*/ | ||
Object.defineProperty(canvasRenderer.CanvasRenderer.prototype, 'extract', { | ||
get: function () { | ||
utils.deprecation('v5.3.0', 'CanvasRenderer#extract is deprecated, use CanvasRenderer#plugins.extract'); | ||
return this.plugins.extract; | ||
}, | ||
}); | ||
@@ -163,4 +151,4 @@ exports.CanvasExtract = CanvasExtract; | ||
}({}, PIXI, PIXI.utils, PIXI, PIXI)); | ||
}({}, PIXI, PIXI.utils, PIXI)); | ||
Object.assign(this.PIXI, _pixi_canvas_extract); | ||
//# sourceMappingURL=canvas-extract.js.map |
/*! | ||
* @pixi/canvas-extract - v5.4.0-rc.3 | ||
* Compiled Thu, 10 Dec 2020 03:22:17 UTC | ||
* @pixi/canvas-extract - v6.0.0-rc | ||
* Compiled Tue, 29 Dec 2020 19:58:03 UTC | ||
* | ||
@@ -8,3 +8,3 @@ * @pixi/canvas-extract is licensed under the MIT License. | ||
*/ | ||
this.PIXI=this.PIXI||{};var _pixi_canvas_extract=function(e,t,r,n,a){"use strict";var i=new n.Rectangle,o=function(){function e(e){this.renderer=e}return e.prototype.image=function(e,t,r){var n=new Image;return n.src=this.base64(e,t,r),n},e.prototype.base64=function(e,t,r){return this.canvas(e).toDataURL(t,r)},e.prototype.canvas=function(e){var n,a,o,s,c=this.renderer;e&&(s=e instanceof t.RenderTexture?e:c.generateTexture(e)),s?(n=s.baseTexture._canvasRenderTarget.context,a=s.baseTexture._canvasRenderTarget.resolution,o=s.frame):(n=c.rootContext,a=c.resolution,(o=i).width=this.renderer.width,o.height=this.renderer.height);var h=Math.floor(o.width*a+1e-4),u=Math.floor(o.height*a+1e-4),g=new r.CanvasRenderTarget(h,u,1),d=n.getImageData(o.x*a,o.y*a,h,u);return g.context.putImageData(d,0,0),g.canvas},e.prototype.pixels=function(e){var r,n,a,o,s=this.renderer;e&&(o=e instanceof t.RenderTexture?e:s.generateTexture(e)),o?(r=o.baseTexture._canvasRenderTarget.context,n=o.baseTexture._canvasRenderTarget.resolution,a=o.frame):(r=s.rootContext,(a=i).width=s.width,a.height=s.height);var c=a.x*n,h=a.y*n,u=a.width*n,g=a.height*n;return r.getImageData(c,h,u,g).data},e.prototype.destroy=function(){this.renderer=null},e}();return Object.defineProperty(a.CanvasRenderer.prototype,"extract",{get:function(){return this.plugins.extract}}),e.CanvasExtract=o,e}({},PIXI,PIXI.utils,PIXI,PIXI);Object.assign(this.PIXI,_pixi_canvas_extract); | ||
this.PIXI=this.PIXI||{};var _pixi_canvas_extract=function(e,t,r,a){"use strict";var n=new PIXI.Rectangle,i=function(){function e(e){this.renderer=e}return e.prototype.image=function(e,t,r){var a=new Image;return a.src=this.base64(e,t,r),a},e.prototype.base64=function(e,t,r){return this.canvas(e).toDataURL(t,r)},e.prototype.canvas=function(e){var a,i,o,s,h=this.renderer;e&&(s=e instanceof t.RenderTexture?e:h.generateTexture(e)),s?(a=s.baseTexture._canvasRenderTarget.context,i=s.baseTexture._canvasRenderTarget.resolution,o=s.frame):(a=h.rootContext,i=h.resolution,(o=n).width=this.renderer.width,o.height=this.renderer.height);var c=Math.floor(o.width*i+1e-4),u=Math.floor(o.height*i+1e-4),g=new r.CanvasRenderTarget(c,u,1),d=a.getImageData(o.x*i,o.y*i,c,u);return g.context.putImageData(d,0,0),g.canvas},e.prototype.pixels=function(e){var r,a,i,o,s=this.renderer;e&&(o=e instanceof t.RenderTexture?e:s.generateTexture(e)),o?(r=o.baseTexture._canvasRenderTarget.context,a=o.baseTexture._canvasRenderTarget.resolution,i=o.frame):(r=s.rootContext,(i=n).width=s.width,i.height=s.height);var h=i.x*a,c=i.y*a,u=i.width*a,g=i.height*a;return r.getImageData(h,c,u,g).data},e.prototype.destroy=function(){this.renderer=null},e}();return e.CanvasExtract=i,e}({},PIXI,PIXI.utils);Object.assign(this.PIXI,_pixi_canvas_extract); | ||
//# sourceMappingURL=canvas-extract.min.js.map |
/*! | ||
* @pixi/canvas-extract - v5.4.0-rc.3 | ||
* Compiled Thu, 10 Dec 2020 03:22:17 UTC | ||
* @pixi/canvas-extract - v6.0.0-rc | ||
* Compiled Tue, 29 Dec 2020 19:58:03 UTC | ||
* | ||
@@ -15,3 +15,2 @@ * @pixi/canvas-extract is licensed under the MIT License. | ||
var math = require('@pixi/math'); | ||
var canvasRenderer = require('@pixi/canvas-renderer'); | ||
@@ -150,16 +149,4 @@ var TEMP_RECT = new math.Rectangle(); | ||
}()); | ||
/** | ||
* @method PIXI.CanvasRenderer#extract | ||
* @type {PIXI.CanvasExtract} | ||
* @see PIXI.CanvasRenderer#plugins | ||
* @deprecated since 5.3.0 | ||
*/ | ||
Object.defineProperty(canvasRenderer.CanvasRenderer.prototype, 'extract', { | ||
get: function () { | ||
utils.deprecation('v5.3.0', 'CanvasRenderer#extract is deprecated, use CanvasRenderer#plugins.extract'); | ||
return this.plugins.extract; | ||
}, | ||
}); | ||
exports.CanvasExtract = CanvasExtract; | ||
//# sourceMappingURL=canvas-extract.js.map |
/*! | ||
* @pixi/canvas-extract - v5.4.0-rc.3 | ||
* Compiled Thu, 10 Dec 2020 03:22:17 UTC | ||
* @pixi/canvas-extract - v6.0.0-rc | ||
* Compiled Tue, 29 Dec 2020 19:58:03 UTC | ||
* | ||
@@ -8,3 +8,3 @@ * @pixi/canvas-extract is licensed under the MIT License. | ||
*/ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@pixi/core"),utils=require("@pixi/utils"),math=require("@pixi/math"),canvasRenderer=require("@pixi/canvas-renderer"),TEMP_RECT=new math.Rectangle,CanvasExtract=function(){function e(e){this.renderer=e}return e.prototype.image=function(e,t,r){var a=new Image;return a.src=this.base64(e,t,r),a},e.prototype.base64=function(e,t,r){return this.canvas(e).toDataURL(t,r)},e.prototype.canvas=function(e){var t,r,a,n,i=this.renderer;e&&(n=e instanceof core.RenderTexture?e:i.generateTexture(e)),n?(t=n.baseTexture._canvasRenderTarget.context,r=n.baseTexture._canvasRenderTarget.resolution,a=n.frame):(t=i.rootContext,r=i.resolution,(a=TEMP_RECT).width=this.renderer.width,a.height=this.renderer.height);var o=Math.floor(a.width*r+1e-4),s=Math.floor(a.height*r+1e-4),u=new utils.CanvasRenderTarget(o,s,1),c=t.getImageData(a.x*r,a.y*r,o,s);return u.context.putImageData(c,0,0),u.canvas},e.prototype.pixels=function(e){var t,r,a,n,i=this.renderer;e&&(n=e instanceof core.RenderTexture?e:i.generateTexture(e)),n?(t=n.baseTexture._canvasRenderTarget.context,r=n.baseTexture._canvasRenderTarget.resolution,a=n.frame):(t=i.rootContext,(a=TEMP_RECT).width=i.width,a.height=i.height);var o=a.x*r,s=a.y*r,u=a.width*r,c=a.height*r;return t.getImageData(o,s,u,c).data},e.prototype.destroy=function(){this.renderer=null},e}();Object.defineProperty(canvasRenderer.CanvasRenderer.prototype,"extract",{get:function(){return this.plugins.extract}}),exports.CanvasExtract=CanvasExtract; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@pixi/core"),utils=require("@pixi/utils"),math=require("@pixi/math"),TEMP_RECT=new math.Rectangle,CanvasExtract=function(){function e(e){this.renderer=e}return e.prototype.image=function(e,t,r){var a=new Image;return a.src=this.base64(e,t,r),a},e.prototype.base64=function(e,t,r){return this.canvas(e).toDataURL(t,r)},e.prototype.canvas=function(e){var t,r,a,n,i=this.renderer;e&&(n=e instanceof core.RenderTexture?e:i.generateTexture(e)),n?(t=n.baseTexture._canvasRenderTarget.context,r=n.baseTexture._canvasRenderTarget.resolution,a=n.frame):(t=i.rootContext,r=i.resolution,(a=TEMP_RECT).width=this.renderer.width,a.height=this.renderer.height);var o=Math.floor(a.width*r+1e-4),s=Math.floor(a.height*r+1e-4),u=new utils.CanvasRenderTarget(o,s,1),h=t.getImageData(a.x*r,a.y*r,o,s);return u.context.putImageData(h,0,0),u.canvas},e.prototype.pixels=function(e){var t,r,a,n,i=this.renderer;e&&(n=e instanceof core.RenderTexture?e:i.generateTexture(e)),n?(t=n.baseTexture._canvasRenderTarget.context,r=n.baseTexture._canvasRenderTarget.resolution,a=n.frame):(t=i.rootContext,(a=TEMP_RECT).width=i.width,a.height=i.height);var o=a.x*r,s=a.y*r,u=a.width*r,h=a.height*r;return t.getImageData(o,s,u,h).data},e.prototype.destroy=function(){this.renderer=null},e}();exports.CanvasExtract=CanvasExtract; | ||
//# sourceMappingURL=canvas-extract.min.js.map |
/*! | ||
* @pixi/canvas-extract - v5.4.0-rc.3 | ||
* Compiled Thu, 10 Dec 2020 03:22:17 UTC | ||
* @pixi/canvas-extract - v6.0.0-rc | ||
* Compiled Tue, 29 Dec 2020 19:58:03 UTC | ||
* | ||
@@ -9,5 +9,4 @@ * @pixi/canvas-extract is licensed under the MIT License. | ||
import { RenderTexture } from '@pixi/core'; | ||
import { CanvasRenderTarget, deprecation } from '@pixi/utils'; | ||
import { CanvasRenderTarget } from '@pixi/utils'; | ||
import { Rectangle } from '@pixi/math'; | ||
import { CanvasRenderer } from '@pixi/canvas-renderer'; | ||
@@ -146,16 +145,4 @@ var TEMP_RECT = new Rectangle(); | ||
}()); | ||
/** | ||
* @method PIXI.CanvasRenderer#extract | ||
* @type {PIXI.CanvasExtract} | ||
* @see PIXI.CanvasRenderer#plugins | ||
* @deprecated since 5.3.0 | ||
*/ | ||
Object.defineProperty(CanvasRenderer.prototype, 'extract', { | ||
get: function () { | ||
deprecation('v5.3.0', 'CanvasRenderer#extract is deprecated, use CanvasRenderer#plugins.extract'); | ||
return this.plugins.extract; | ||
}, | ||
}); | ||
export { CanvasExtract }; | ||
//# sourceMappingURL=canvas-extract.js.map |
/*! | ||
* @pixi/canvas-extract - v5.4.0-rc.3 | ||
* Compiled Thu, 10 Dec 2020 03:22:17 UTC | ||
* @pixi/canvas-extract - v6.0.0-rc | ||
* Compiled Tue, 29 Dec 2020 19:58:03 UTC | ||
* | ||
@@ -8,3 +8,3 @@ * @pixi/canvas-extract is licensed under the MIT License. | ||
*/ | ||
import{RenderTexture as e}from"@pixi/core";import{CanvasRenderTarget as t}from"@pixi/utils";import{Rectangle as r}from"@pixi/math";import{CanvasRenderer as n}from"@pixi/canvas-renderer";var a=new r,o=function(){function r(e){this.renderer=e}return r.prototype.image=function(e,t,r){var n=new Image;return n.src=this.base64(e,t,r),n},r.prototype.base64=function(e,t,r){return this.canvas(e).toDataURL(t,r)},r.prototype.canvas=function(r){var n,o,i,s,h=this.renderer;r&&(s=r instanceof e?r:h.generateTexture(r)),s?(n=s.baseTexture._canvasRenderTarget.context,o=s.baseTexture._canvasRenderTarget.resolution,i=s.frame):(n=h.rootContext,o=h.resolution,(i=a).width=this.renderer.width,i.height=this.renderer.height);var u=Math.floor(i.width*o+1e-4),c=Math.floor(i.height*o+1e-4),p=new t(u,c,1),g=n.getImageData(i.x*o,i.y*o,u,c);return p.context.putImageData(g,0,0),p.canvas},r.prototype.pixels=function(t){var r,n,o,i,s=this.renderer;t&&(i=t instanceof e?t:s.generateTexture(t)),i?(r=i.baseTexture._canvasRenderTarget.context,n=i.baseTexture._canvasRenderTarget.resolution,o=i.frame):(r=s.rootContext,(o=a).width=s.width,o.height=s.height);var h=o.x*n,u=o.y*n,c=o.width*n,p=o.height*n;return r.getImageData(h,u,c,p).data},r.prototype.destroy=function(){this.renderer=null},r}();Object.defineProperty(n.prototype,"extract",{get:function(){return this.plugins.extract}});export{o as CanvasExtract}; | ||
import{RenderTexture as e}from"@pixi/core";import{CanvasRenderTarget as t}from"@pixi/utils";import{Rectangle as r}from"@pixi/math";var a=new r,n=function(){function r(e){this.renderer=e}return r.prototype.image=function(e,t,r){var a=new Image;return a.src=this.base64(e,t,r),a},r.prototype.base64=function(e,t,r){return this.canvas(e).toDataURL(t,r)},r.prototype.canvas=function(r){var n,o,i,s,h=this.renderer;r&&(s=r instanceof e?r:h.generateTexture(r)),s?(n=s.baseTexture._canvasRenderTarget.context,o=s.baseTexture._canvasRenderTarget.resolution,i=s.frame):(n=h.rootContext,o=h.resolution,(i=a).width=this.renderer.width,i.height=this.renderer.height);var u=Math.floor(i.width*o+1e-4),c=Math.floor(i.height*o+1e-4),g=new t(u,c,1),p=n.getImageData(i.x*o,i.y*o,u,c);return g.context.putImageData(p,0,0),g.canvas},r.prototype.pixels=function(t){var r,n,o,i,s=this.renderer;t&&(i=t instanceof e?t:s.generateTexture(t)),i?(r=i.baseTexture._canvasRenderTarget.context,n=i.baseTexture._canvasRenderTarget.resolution,o=i.frame):(r=s.rootContext,(o=a).width=s.width,o.height=s.height);var h=o.x*n,u=o.y*n,c=o.width*n,g=o.height*n;return r.getImageData(h,u,c,g).data},r.prototype.destroy=function(){this.renderer=null},r}();export{n as CanvasExtract}; | ||
//# sourceMappingURL=canvas-extract.min.js.map |
{ | ||
"name": "@pixi/canvas-extract", | ||
"version": "5.4.0-rc.3", | ||
"version": "6.0.0-rc", | ||
"main": "dist/cjs/canvas-extract.js", | ||
@@ -28,9 +28,9 @@ "module": "dist/esm/canvas-extract.js", | ||
"dependencies": { | ||
"@pixi/canvas-renderer": "5.4.0-rc.3", | ||
"@pixi/core": "5.4.0-rc.3", | ||
"@pixi/display": "5.4.0-rc.3", | ||
"@pixi/math": "5.4.0-rc.3", | ||
"@pixi/utils": "5.4.0-rc.3" | ||
"@pixi/canvas-renderer": "6.0.0-rc", | ||
"@pixi/core": "6.0.0-rc", | ||
"@pixi/display": "6.0.0-rc", | ||
"@pixi/math": "6.0.0-rc", | ||
"@pixi/utils": "6.0.0-rc" | ||
}, | ||
"gitHead": "0c48db94f0521d85cc226fc4b15f69c30d53c765" | ||
"gitHead": "15513755f4d9f2112df5cc261b44f2dc1f05e00c" | ||
} |
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
78101
540
+ Added@pixi/canvas-renderer@6.0.0-rc(transitive)
+ Added@pixi/constants@6.0.0-rc(transitive)
+ Added@pixi/core@6.0.0-rc(transitive)
+ Added@pixi/display@6.0.0-rc(transitive)
+ Added@pixi/math@6.0.0-rc(transitive)
+ Added@pixi/runner@6.0.0-rc(transitive)
+ Added@pixi/settings@6.0.0-rc(transitive)
+ Added@pixi/ticker@6.0.0-rc(transitive)
+ Added@pixi/utils@6.0.0-rc(transitive)
+ Added@types/node@12.20.55(transitive)
+ Addedcall-bound@1.0.4(transitive)
- Removed@pixi/canvas-renderer@5.4.0-rc.3(transitive)
- Removed@pixi/constants@5.4.0-rc.3(transitive)
- Removed@pixi/core@5.4.0-rc.3(transitive)
- Removed@pixi/display@5.4.0-rc.3(transitive)
- Removed@pixi/math@5.4.0-rc.3(transitive)
- Removed@pixi/runner@5.4.0-rc.3(transitive)
- Removed@pixi/settings@5.4.0-rc.3(transitive)
- Removed@pixi/ticker@5.4.0-rc.3(transitive)
- Removed@pixi/utils@5.4.0-rc.3(transitive)
- Removedcall-bound@1.0.3(transitive)
- Removedcss-color-names@1.0.1(transitive)
Updated@pixi/core@6.0.0-rc
Updated@pixi/display@6.0.0-rc
Updated@pixi/math@6.0.0-rc
Updated@pixi/utils@6.0.0-rc