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

@pixi/canvas-extract

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-extract - npm Package Compare versions

Comparing version 5.0.0-rc.3 to 5.0.0

14

dist/canvas-extract.js
/*!
* @pixi/canvas-extract - v5.0.0-rc.3
* Compiled Fri, 22 Mar 2019 16:33:44 UTC
* Compiled Tue, 30 Apr 2019 02:21:00 UTC
*

@@ -41,9 +41,11 @@ * @pixi/canvas-extract is licensed under the MIT License.

* to convert. If left empty will use the main renderer
* @param {string} [format] - Image format, e.g. "image/jpeg" or "image/webp".
* @param {number} [quality] - JPEG or Webp compression from 0 to 1. Default is 0.92.
* @return {HTMLImageElement} HTML Image of the target
*/
CanvasExtract.prototype.image = function image (target)
CanvasExtract.prototype.image = function image (target, format, quality)
{
var image = new Image();
image.src = this.base64(target);
image.src = this.base64(target, format, quality);

@@ -59,7 +61,9 @@ return image;

* to convert. If left empty will use the main renderer
* @param {string} [format] - Image format, e.g. "image/jpeg" or "image/webp".
* @param {number} [quality] - JPEG or Webp compression from 0 to 1. Default is 0.92.
* @return {string} A base64 encoded string of the texture.
*/
CanvasExtract.prototype.base64 = function base64 (target)
CanvasExtract.prototype.base64 = function base64 (target, format, quality)
{
return this.canvas(target).toDataURL();
return this.canvas(target).toDataURL(format, quality);
};

@@ -66,0 +70,0 @@

/*!
* @pixi/canvas-extract - v5.0.0-rc.3
* Compiled Fri, 22 Mar 2019 16:33:44 UTC
* Compiled Tue, 30 Apr 2019 02:21:00 UTC
*

@@ -40,9 +40,11 @@ * @pixi/canvas-extract is licensed under the MIT License.

* to convert. If left empty will use the main renderer
* @param {string} [format] - Image format, e.g. "image/jpeg" or "image/webp".
* @param {number} [quality] - JPEG or Webp compression from 0 to 1. Default is 0.92.
* @return {HTMLImageElement} HTML Image of the target
*/
CanvasExtract.prototype.image = function image (target)
CanvasExtract.prototype.image = function image (target, format, quality)
{
var image = new Image();
image.src = this.base64(target);
image.src = this.base64(target, format, quality);

@@ -58,7 +60,9 @@ return image;

* to convert. If left empty will use the main renderer
* @param {string} [format] - Image format, e.g. "image/jpeg" or "image/webp".
* @param {number} [quality] - JPEG or Webp compression from 0 to 1. Default is 0.92.
* @return {string} A base64 encoded string of the texture.
*/
CanvasExtract.prototype.base64 = function base64 (target)
CanvasExtract.prototype.base64 = function base64 (target, format, quality)
{
return this.canvas(target).toDataURL();
return this.canvas(target).toDataURL(format, quality);
};

@@ -65,0 +69,0 @@

/*!
* @pixi/canvas-extract - v5.0.0-rc.3
* Compiled Fri, 22 Mar 2019 16:33:44 UTC
* Compiled Tue, 30 Apr 2019 02:21:00 UTC
*

@@ -44,9 +44,11 @@ * @pixi/canvas-extract is licensed under the MIT License.

* to convert. If left empty will use the main renderer
* @param {string} [format] - Image format, e.g. "image/jpeg" or "image/webp".
* @param {number} [quality] - JPEG or Webp compression from 0 to 1. Default is 0.92.
* @return {HTMLImageElement} HTML Image of the target
*/
CanvasExtract.prototype.image = function image (target)
CanvasExtract.prototype.image = function image (target, format, quality)
{
var image = new Image();
image.src = this.base64(target);
image.src = this.base64(target, format, quality);

@@ -62,7 +64,9 @@ return image;

* to convert. If left empty will use the main renderer
* @param {string} [format] - Image format, e.g. "image/jpeg" or "image/webp".
* @param {number} [quality] - JPEG or Webp compression from 0 to 1. Default is 0.92.
* @return {string} A base64 encoded string of the texture.
*/
CanvasExtract.prototype.base64 = function base64 (target)
CanvasExtract.prototype.base64 = function base64 (target, format, quality)
{
return this.canvas(target).toDataURL();
return this.canvas(target).toDataURL(format, quality);
};

@@ -69,0 +73,0 @@

{
"name": "@pixi/canvas-extract",
"version": "5.0.0-rc.3",
"version": "5.0.0",
"main": "lib/canvas-extract.js",

@@ -28,5 +28,5 @@ "module": "lib/canvas-extract.es.js",

"dependencies": {
"@pixi/core": "^5.0.0-rc.3",
"@pixi/core": "^5.0.0",
"@pixi/math": "^5.0.0-rc.3",
"@pixi/utils": "^5.0.0-rc.3"
"@pixi/utils": "^5.0.0"
},

@@ -36,3 +36,3 @@ "devDependencies": {

},
"gitHead": "8bd27c8b903ae2c8f90d91d64e82d65b19ac1cdb"
"gitHead": "607e68419902444cde15f2d69588fbd189481cd8"
}

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