@pixi/canvas-extract
Advanced tools
Comparing version 5.0.0-rc.3 to 5.0.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 | ||
* | ||
@@ -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
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
44435
9
483
Updated@pixi/core@^5.0.0
Updated@pixi/utils@^5.0.0