Initial
This commit is contained in:
28
resources/app/node_modules/@pixi/utils/lib/media/BoundingBox.js
generated
vendored
Normal file
28
resources/app/node_modules/@pixi/utils/lib/media/BoundingBox.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
"use strict";
|
||||
const _BoundingBox = class {
|
||||
/**
|
||||
* @param left - The left coordinate value of the bounding box.
|
||||
* @param top - The top coordinate value of the bounding box.
|
||||
* @param right - The right coordinate value of the bounding box.
|
||||
* @param bottom - The bottom coordinate value of the bounding box.
|
||||
*/
|
||||
constructor(left, top, right, bottom) {
|
||||
this.left = left, this.top = top, this.right = right, this.bottom = bottom;
|
||||
}
|
||||
/** The width of the bounding box. */
|
||||
get width() {
|
||||
return this.right - this.left;
|
||||
}
|
||||
/** The height of the bounding box. */
|
||||
get height() {
|
||||
return this.bottom - this.top;
|
||||
}
|
||||
/** Determines whether the BoundingBox is empty. */
|
||||
isEmpty() {
|
||||
return this.left === this.right || this.top === this.bottom;
|
||||
}
|
||||
};
|
||||
_BoundingBox.EMPTY = new _BoundingBox(0, 0, 0, 0);
|
||||
let BoundingBox = _BoundingBox;
|
||||
exports.BoundingBox = BoundingBox;
|
||||
//# sourceMappingURL=BoundingBox.js.map
|
||||
1
resources/app/node_modules/@pixi/utils/lib/media/BoundingBox.js.map
generated
vendored
Normal file
1
resources/app/node_modules/@pixi/utils/lib/media/BoundingBox.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"BoundingBox.js","sources":["../../src/media/BoundingBox.ts"],"sourcesContent":["/**\n * A rectangular bounding box describing the boundary of an area.\n * @memberof PIXI.utils\n * @since 7.1.0\n */\nexport class BoundingBox\n{\n /** The left coordinate value of the bounding box. */\n left: number;\n /** The top coordinate value of the bounding box. */\n top: number;\n /** The right coordinate value of the bounding box. */\n right: number;\n /** The bottom coordinate value of the bounding box. */\n bottom: number;\n\n /**\n * @param left - The left coordinate value of the bounding box.\n * @param top - The top coordinate value of the bounding box.\n * @param right - The right coordinate value of the bounding box.\n * @param bottom - The bottom coordinate value of the bounding box.\n */\n constructor(left: number, top: number, right: number, bottom: number)\n {\n this.left = left;\n this.top = top;\n this.right = right;\n this.bottom = bottom;\n }\n\n /** The width of the bounding box. */\n get width(): number { return this.right - this.left; }\n /** The height of the bounding box. */\n get height(): number { return this.bottom - this.top; }\n\n /** Determines whether the BoundingBox is empty. */\n isEmpty(): boolean\n {\n return this.left === this.right || this.top === this.bottom;\n }\n\n /**\n * An empty BoundingBox.\n * @type {PIXI.utils.BoundingBox}\n */\n public static readonly EMPTY = new BoundingBox(0, 0, 0, 0);\n}\n"],"names":[],"mappings":";AAKO,MAAM,eAAN,MACP;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgBI,YAAY,MAAc,KAAa,OAAe,QACtD;AACS,SAAA,OAAO,MACZ,KAAK,MAAM,KACX,KAAK,QAAQ,OACb,KAAK,SAAS;AAAA,EAClB;AAAA;AAAA,EAGA,IAAI,QAAgB;AAAS,WAAA,KAAK,QAAQ,KAAK;AAAA,EAAM;AAAA;AAAA,EAErD,IAAI,SAAiB;AAAS,WAAA,KAAK,SAAS,KAAK;AAAA,EAAK;AAAA;AAAA,EAGtD,UACA;AACI,WAAO,KAAK,SAAS,KAAK,SAAS,KAAK,QAAQ,KAAK;AAAA,EACzD;AAOJ;AAzCa,aAwCc,QAAQ,IAAI,aAAY,GAAG,GAAG,GAAG,CAAC;AAxCtD,IAAM,cAAN;;"}
|
||||
29
resources/app/node_modules/@pixi/utils/lib/media/BoundingBox.mjs
generated
vendored
Normal file
29
resources/app/node_modules/@pixi/utils/lib/media/BoundingBox.mjs
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
const _BoundingBox = class {
|
||||
/**
|
||||
* @param left - The left coordinate value of the bounding box.
|
||||
* @param top - The top coordinate value of the bounding box.
|
||||
* @param right - The right coordinate value of the bounding box.
|
||||
* @param bottom - The bottom coordinate value of the bounding box.
|
||||
*/
|
||||
constructor(left, top, right, bottom) {
|
||||
this.left = left, this.top = top, this.right = right, this.bottom = bottom;
|
||||
}
|
||||
/** The width of the bounding box. */
|
||||
get width() {
|
||||
return this.right - this.left;
|
||||
}
|
||||
/** The height of the bounding box. */
|
||||
get height() {
|
||||
return this.bottom - this.top;
|
||||
}
|
||||
/** Determines whether the BoundingBox is empty. */
|
||||
isEmpty() {
|
||||
return this.left === this.right || this.top === this.bottom;
|
||||
}
|
||||
};
|
||||
_BoundingBox.EMPTY = new _BoundingBox(0, 0, 0, 0);
|
||||
let BoundingBox = _BoundingBox;
|
||||
export {
|
||||
BoundingBox
|
||||
};
|
||||
//# sourceMappingURL=BoundingBox.mjs.map
|
||||
1
resources/app/node_modules/@pixi/utils/lib/media/BoundingBox.mjs.map
generated
vendored
Normal file
1
resources/app/node_modules/@pixi/utils/lib/media/BoundingBox.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"BoundingBox.mjs","sources":["../../src/media/BoundingBox.ts"],"sourcesContent":["/**\n * A rectangular bounding box describing the boundary of an area.\n * @memberof PIXI.utils\n * @since 7.1.0\n */\nexport class BoundingBox\n{\n /** The left coordinate value of the bounding box. */\n left: number;\n /** The top coordinate value of the bounding box. */\n top: number;\n /** The right coordinate value of the bounding box. */\n right: number;\n /** The bottom coordinate value of the bounding box. */\n bottom: number;\n\n /**\n * @param left - The left coordinate value of the bounding box.\n * @param top - The top coordinate value of the bounding box.\n * @param right - The right coordinate value of the bounding box.\n * @param bottom - The bottom coordinate value of the bounding box.\n */\n constructor(left: number, top: number, right: number, bottom: number)\n {\n this.left = left;\n this.top = top;\n this.right = right;\n this.bottom = bottom;\n }\n\n /** The width of the bounding box. */\n get width(): number { return this.right - this.left; }\n /** The height of the bounding box. */\n get height(): number { return this.bottom - this.top; }\n\n /** Determines whether the BoundingBox is empty. */\n isEmpty(): boolean\n {\n return this.left === this.right || this.top === this.bottom;\n }\n\n /**\n * An empty BoundingBox.\n * @type {PIXI.utils.BoundingBox}\n */\n public static readonly EMPTY = new BoundingBox(0, 0, 0, 0);\n}\n"],"names":[],"mappings":"AAKO,MAAM,eAAN,MACP;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgBI,YAAY,MAAc,KAAa,OAAe,QACtD;AACS,SAAA,OAAO,MACZ,KAAK,MAAM,KACX,KAAK,QAAQ,OACb,KAAK,SAAS;AAAA,EAClB;AAAA;AAAA,EAGA,IAAI,QAAgB;AAAS,WAAA,KAAK,QAAQ,KAAK;AAAA,EAAM;AAAA;AAAA,EAErD,IAAI,SAAiB;AAAS,WAAA,KAAK,SAAS,KAAK;AAAA,EAAK;AAAA;AAAA,EAGtD,UACA;AACI,WAAO,KAAK,SAAS,KAAK,SAAS,KAAK,QAAQ,KAAK;AAAA,EACzD;AAOJ;AAzCa,aAwCc,QAAQ,IAAI,aAAY,GAAG,GAAG,GAAG,CAAC;AAxCtD,IAAM,cAAN;"}
|
||||
65
resources/app/node_modules/@pixi/utils/lib/media/CanvasRenderTarget.js
generated
vendored
Normal file
65
resources/app/node_modules/@pixi/utils/lib/media/CanvasRenderTarget.js
generated
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
"use strict";
|
||||
var settings = require("@pixi/settings");
|
||||
class CanvasRenderTarget {
|
||||
/**
|
||||
* @param width - the width for the newly created canvas
|
||||
* @param height - the height for the newly created canvas
|
||||
* @param {number} [resolution=PIXI.settings.RESOLUTION] - The resolution / device pixel ratio of the canvas
|
||||
*/
|
||||
constructor(width, height, resolution) {
|
||||
this._canvas = settings.settings.ADAPTER.createCanvas(), this._context = this._canvas.getContext("2d"), this.resolution = resolution || settings.settings.RESOLUTION, this.resize(width, height);
|
||||
}
|
||||
/**
|
||||
* Clears the canvas that was created by the CanvasRenderTarget class.
|
||||
* @private
|
||||
*/
|
||||
clear() {
|
||||
this._checkDestroyed(), this._context.setTransform(1, 0, 0, 1, 0, 0), this._context.clearRect(0, 0, this._canvas.width, this._canvas.height);
|
||||
}
|
||||
/**
|
||||
* Resizes the canvas to the specified width and height.
|
||||
* @param desiredWidth - the desired width of the canvas
|
||||
* @param desiredHeight - the desired height of the canvas
|
||||
*/
|
||||
resize(desiredWidth, desiredHeight) {
|
||||
this._checkDestroyed(), this._canvas.width = Math.round(desiredWidth * this.resolution), this._canvas.height = Math.round(desiredHeight * this.resolution);
|
||||
}
|
||||
/** Destroys this canvas. */
|
||||
destroy() {
|
||||
this._context = null, this._canvas = null;
|
||||
}
|
||||
/**
|
||||
* The width of the canvas buffer in pixels.
|
||||
* @member {number}
|
||||
*/
|
||||
get width() {
|
||||
return this._checkDestroyed(), this._canvas.width;
|
||||
}
|
||||
set width(val) {
|
||||
this._checkDestroyed(), this._canvas.width = Math.round(val);
|
||||
}
|
||||
/**
|
||||
* The height of the canvas buffer in pixels.
|
||||
* @member {number}
|
||||
*/
|
||||
get height() {
|
||||
return this._checkDestroyed(), this._canvas.height;
|
||||
}
|
||||
set height(val) {
|
||||
this._checkDestroyed(), this._canvas.height = Math.round(val);
|
||||
}
|
||||
/** The Canvas object that belongs to this CanvasRenderTarget. */
|
||||
get canvas() {
|
||||
return this._checkDestroyed(), this._canvas;
|
||||
}
|
||||
/** A CanvasRenderingContext2D object representing a two-dimensional rendering context. */
|
||||
get context() {
|
||||
return this._checkDestroyed(), this._context;
|
||||
}
|
||||
_checkDestroyed() {
|
||||
if (this._canvas === null)
|
||||
throw new TypeError("The CanvasRenderTarget has already been destroyed");
|
||||
}
|
||||
}
|
||||
exports.CanvasRenderTarget = CanvasRenderTarget;
|
||||
//# sourceMappingURL=CanvasRenderTarget.js.map
|
||||
1
resources/app/node_modules/@pixi/utils/lib/media/CanvasRenderTarget.js.map
generated
vendored
Normal file
1
resources/app/node_modules/@pixi/utils/lib/media/CanvasRenderTarget.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"CanvasRenderTarget.js","sources":["../../src/media/CanvasRenderTarget.ts"],"sourcesContent":["import { settings } from '@pixi/settings';\n\nimport type { ICanvas, ICanvasRenderingContext2D } from '@pixi/settings';\n\n/**\n * Creates a Canvas element of the given size to be used as a target for rendering to.\n * @class\n * @memberof PIXI.utils\n */\nexport class CanvasRenderTarget\n{\n protected _canvas: ICanvas | null;\n\n protected _context: ICanvasRenderingContext2D | null;\n\n /**\n * The resolution / device pixel ratio of the canvas\n * @default 1\n */\n public resolution: number;\n\n /**\n * @param width - the width for the newly created canvas\n * @param height - the height for the newly created canvas\n * @param {number} [resolution=PIXI.settings.RESOLUTION] - The resolution / device pixel ratio of the canvas\n */\n constructor(width: number, height: number, resolution?: number)\n {\n this._canvas = settings.ADAPTER.createCanvas();\n\n this._context = this._canvas.getContext('2d');\n\n this.resolution = resolution || settings.RESOLUTION;\n\n this.resize(width, height);\n }\n\n /**\n * Clears the canvas that was created by the CanvasRenderTarget class.\n * @private\n */\n clear(): void\n {\n this._checkDestroyed();\n\n this._context.setTransform(1, 0, 0, 1, 0, 0);\n this._context.clearRect(0, 0, this._canvas.width, this._canvas.height);\n }\n\n /**\n * Resizes the canvas to the specified width and height.\n * @param desiredWidth - the desired width of the canvas\n * @param desiredHeight - the desired height of the canvas\n */\n resize(desiredWidth: number, desiredHeight: number): void\n {\n this._checkDestroyed();\n\n this._canvas.width = Math.round(desiredWidth * this.resolution);\n this._canvas.height = Math.round(desiredHeight * this.resolution);\n }\n\n /** Destroys this canvas. */\n destroy(): void\n {\n this._context = null;\n this._canvas = null;\n }\n\n /**\n * The width of the canvas buffer in pixels.\n * @member {number}\n */\n get width(): number\n {\n this._checkDestroyed();\n\n return this._canvas.width;\n }\n\n set width(val: number)\n {\n this._checkDestroyed();\n\n this._canvas.width = Math.round(val);\n }\n\n /**\n * The height of the canvas buffer in pixels.\n * @member {number}\n */\n get height(): number\n {\n this._checkDestroyed();\n\n return this._canvas.height;\n }\n\n set height(val: number)\n {\n this._checkDestroyed();\n\n this._canvas.height = Math.round(val);\n }\n\n /** The Canvas object that belongs to this CanvasRenderTarget. */\n public get canvas(): ICanvas\n {\n this._checkDestroyed();\n\n return this._canvas;\n }\n\n /** A CanvasRenderingContext2D object representing a two-dimensional rendering context. */\n public get context(): ICanvasRenderingContext2D\n {\n this._checkDestroyed();\n\n return this._context;\n }\n\n private _checkDestroyed(): asserts this is this & { _canvas: ICanvas; _context: ICanvasRenderingContext2D }\n {\n if (this._canvas === null)\n {\n if (process.env.DEBUG)\n {\n throw new TypeError('The CanvasRenderTarget has already been destroyed');\n }\n }\n }\n}\n"],"names":["settings"],"mappings":";;AASO,MAAM,mBACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgBI,YAAY,OAAe,QAAgB,YAC3C;AACS,SAAA,UAAUA,kBAAS,QAAQ,gBAEhC,KAAK,WAAW,KAAK,QAAQ,WAAW,IAAI,GAE5C,KAAK,aAAa,cAAcA,SAAA,SAAS,YAEzC,KAAK,OAAO,OAAO,MAAM;AAAA,EAC7B;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,QACA;AACS,SAAA,gBAAA,GAEL,KAAK,SAAS,aAAa,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,GAC3C,KAAK,SAAS,UAAU,GAAG,GAAG,KAAK,QAAQ,OAAO,KAAK,QAAQ,MAAM;AAAA,EACzE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,OAAO,cAAsB,eAC7B;AACI,SAAK,gBAEL,GAAA,KAAK,QAAQ,QAAQ,KAAK,MAAM,eAAe,KAAK,UAAU,GAC9D,KAAK,QAAQ,SAAS,KAAK,MAAM,gBAAgB,KAAK,UAAU;AAAA,EACpE;AAAA;AAAA,EAGA,UACA;AACS,SAAA,WAAW,MAChB,KAAK,UAAU;AAAA,EACnB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAI,QACJ;AACS,WAAA,KAAA,gBAAA,GAEE,KAAK,QAAQ;AAAA,EACxB;AAAA,EAEA,IAAI,MAAM,KACV;AACI,SAAK,gBAEL,GAAA,KAAK,QAAQ,QAAQ,KAAK,MAAM,GAAG;AAAA,EACvC;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAI,SACJ;AACS,WAAA,KAAA,gBAAA,GAEE,KAAK,QAAQ;AAAA,EACxB;AAAA,EAEA,IAAI,OAAO,KACX;AACI,SAAK,gBAEL,GAAA,KAAK,QAAQ,SAAS,KAAK,MAAM,GAAG;AAAA,EACxC;AAAA;AAAA,EAGA,IAAW,SACX;AACS,WAAA,KAAA,mBAEE,KAAK;AAAA,EAChB;AAAA;AAAA,EAGA,IAAW,UACX;AACS,WAAA,KAAA,mBAEE,KAAK;AAAA,EAChB;AAAA,EAEQ,kBACR;AACI,QAAI,KAAK,YAAY;AAIP,YAAA,IAAI,UAAU,mDAAmD;AAAA,EAGnF;AACJ;;"}
|
||||
66
resources/app/node_modules/@pixi/utils/lib/media/CanvasRenderTarget.mjs
generated
vendored
Normal file
66
resources/app/node_modules/@pixi/utils/lib/media/CanvasRenderTarget.mjs
generated
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
import { settings } from "@pixi/settings";
|
||||
class CanvasRenderTarget {
|
||||
/**
|
||||
* @param width - the width for the newly created canvas
|
||||
* @param height - the height for the newly created canvas
|
||||
* @param {number} [resolution=PIXI.settings.RESOLUTION] - The resolution / device pixel ratio of the canvas
|
||||
*/
|
||||
constructor(width, height, resolution) {
|
||||
this._canvas = settings.ADAPTER.createCanvas(), this._context = this._canvas.getContext("2d"), this.resolution = resolution || settings.RESOLUTION, this.resize(width, height);
|
||||
}
|
||||
/**
|
||||
* Clears the canvas that was created by the CanvasRenderTarget class.
|
||||
* @private
|
||||
*/
|
||||
clear() {
|
||||
this._checkDestroyed(), this._context.setTransform(1, 0, 0, 1, 0, 0), this._context.clearRect(0, 0, this._canvas.width, this._canvas.height);
|
||||
}
|
||||
/**
|
||||
* Resizes the canvas to the specified width and height.
|
||||
* @param desiredWidth - the desired width of the canvas
|
||||
* @param desiredHeight - the desired height of the canvas
|
||||
*/
|
||||
resize(desiredWidth, desiredHeight) {
|
||||
this._checkDestroyed(), this._canvas.width = Math.round(desiredWidth * this.resolution), this._canvas.height = Math.round(desiredHeight * this.resolution);
|
||||
}
|
||||
/** Destroys this canvas. */
|
||||
destroy() {
|
||||
this._context = null, this._canvas = null;
|
||||
}
|
||||
/**
|
||||
* The width of the canvas buffer in pixels.
|
||||
* @member {number}
|
||||
*/
|
||||
get width() {
|
||||
return this._checkDestroyed(), this._canvas.width;
|
||||
}
|
||||
set width(val) {
|
||||
this._checkDestroyed(), this._canvas.width = Math.round(val);
|
||||
}
|
||||
/**
|
||||
* The height of the canvas buffer in pixels.
|
||||
* @member {number}
|
||||
*/
|
||||
get height() {
|
||||
return this._checkDestroyed(), this._canvas.height;
|
||||
}
|
||||
set height(val) {
|
||||
this._checkDestroyed(), this._canvas.height = Math.round(val);
|
||||
}
|
||||
/** The Canvas object that belongs to this CanvasRenderTarget. */
|
||||
get canvas() {
|
||||
return this._checkDestroyed(), this._canvas;
|
||||
}
|
||||
/** A CanvasRenderingContext2D object representing a two-dimensional rendering context. */
|
||||
get context() {
|
||||
return this._checkDestroyed(), this._context;
|
||||
}
|
||||
_checkDestroyed() {
|
||||
if (this._canvas === null)
|
||||
throw new TypeError("The CanvasRenderTarget has already been destroyed");
|
||||
}
|
||||
}
|
||||
export {
|
||||
CanvasRenderTarget
|
||||
};
|
||||
//# sourceMappingURL=CanvasRenderTarget.mjs.map
|
||||
1
resources/app/node_modules/@pixi/utils/lib/media/CanvasRenderTarget.mjs.map
generated
vendored
Normal file
1
resources/app/node_modules/@pixi/utils/lib/media/CanvasRenderTarget.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"CanvasRenderTarget.mjs","sources":["../../src/media/CanvasRenderTarget.ts"],"sourcesContent":["import { settings } from '@pixi/settings';\n\nimport type { ICanvas, ICanvasRenderingContext2D } from '@pixi/settings';\n\n/**\n * Creates a Canvas element of the given size to be used as a target for rendering to.\n * @class\n * @memberof PIXI.utils\n */\nexport class CanvasRenderTarget\n{\n protected _canvas: ICanvas | null;\n\n protected _context: ICanvasRenderingContext2D | null;\n\n /**\n * The resolution / device pixel ratio of the canvas\n * @default 1\n */\n public resolution: number;\n\n /**\n * @param width - the width for the newly created canvas\n * @param height - the height for the newly created canvas\n * @param {number} [resolution=PIXI.settings.RESOLUTION] - The resolution / device pixel ratio of the canvas\n */\n constructor(width: number, height: number, resolution?: number)\n {\n this._canvas = settings.ADAPTER.createCanvas();\n\n this._context = this._canvas.getContext('2d');\n\n this.resolution = resolution || settings.RESOLUTION;\n\n this.resize(width, height);\n }\n\n /**\n * Clears the canvas that was created by the CanvasRenderTarget class.\n * @private\n */\n clear(): void\n {\n this._checkDestroyed();\n\n this._context.setTransform(1, 0, 0, 1, 0, 0);\n this._context.clearRect(0, 0, this._canvas.width, this._canvas.height);\n }\n\n /**\n * Resizes the canvas to the specified width and height.\n * @param desiredWidth - the desired width of the canvas\n * @param desiredHeight - the desired height of the canvas\n */\n resize(desiredWidth: number, desiredHeight: number): void\n {\n this._checkDestroyed();\n\n this._canvas.width = Math.round(desiredWidth * this.resolution);\n this._canvas.height = Math.round(desiredHeight * this.resolution);\n }\n\n /** Destroys this canvas. */\n destroy(): void\n {\n this._context = null;\n this._canvas = null;\n }\n\n /**\n * The width of the canvas buffer in pixels.\n * @member {number}\n */\n get width(): number\n {\n this._checkDestroyed();\n\n return this._canvas.width;\n }\n\n set width(val: number)\n {\n this._checkDestroyed();\n\n this._canvas.width = Math.round(val);\n }\n\n /**\n * The height of the canvas buffer in pixels.\n * @member {number}\n */\n get height(): number\n {\n this._checkDestroyed();\n\n return this._canvas.height;\n }\n\n set height(val: number)\n {\n this._checkDestroyed();\n\n this._canvas.height = Math.round(val);\n }\n\n /** The Canvas object that belongs to this CanvasRenderTarget. */\n public get canvas(): ICanvas\n {\n this._checkDestroyed();\n\n return this._canvas;\n }\n\n /** A CanvasRenderingContext2D object representing a two-dimensional rendering context. */\n public get context(): ICanvasRenderingContext2D\n {\n this._checkDestroyed();\n\n return this._context;\n }\n\n private _checkDestroyed(): asserts this is this & { _canvas: ICanvas; _context: ICanvasRenderingContext2D }\n {\n if (this._canvas === null)\n {\n if (process.env.DEBUG)\n {\n throw new TypeError('The CanvasRenderTarget has already been destroyed');\n }\n }\n }\n}\n"],"names":[],"mappings":";AASO,MAAM,mBACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgBI,YAAY,OAAe,QAAgB,YAC3C;AACS,SAAA,UAAU,SAAS,QAAQ,gBAEhC,KAAK,WAAW,KAAK,QAAQ,WAAW,IAAI,GAE5C,KAAK,aAAa,cAAc,SAAS,YAEzC,KAAK,OAAO,OAAO,MAAM;AAAA,EAC7B;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,QACA;AACS,SAAA,gBAAA,GAEL,KAAK,SAAS,aAAa,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,GAC3C,KAAK,SAAS,UAAU,GAAG,GAAG,KAAK,QAAQ,OAAO,KAAK,QAAQ,MAAM;AAAA,EACzE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,OAAO,cAAsB,eAC7B;AACI,SAAK,gBAEL,GAAA,KAAK,QAAQ,QAAQ,KAAK,MAAM,eAAe,KAAK,UAAU,GAC9D,KAAK,QAAQ,SAAS,KAAK,MAAM,gBAAgB,KAAK,UAAU;AAAA,EACpE;AAAA;AAAA,EAGA,UACA;AACS,SAAA,WAAW,MAChB,KAAK,UAAU;AAAA,EACnB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAI,QACJ;AACS,WAAA,KAAA,gBAAA,GAEE,KAAK,QAAQ;AAAA,EACxB;AAAA,EAEA,IAAI,MAAM,KACV;AACI,SAAK,gBAEL,GAAA,KAAK,QAAQ,QAAQ,KAAK,MAAM,GAAG;AAAA,EACvC;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAI,SACJ;AACS,WAAA,KAAA,gBAAA,GAEE,KAAK,QAAQ;AAAA,EACxB;AAAA,EAEA,IAAI,OAAO,KACX;AACI,SAAK,gBAEL,GAAA,KAAK,QAAQ,SAAS,KAAK,MAAM,GAAG;AAAA,EACxC;AAAA;AAAA,EAGA,IAAW,SACX;AACS,WAAA,KAAA,mBAEE,KAAK;AAAA,EAChB;AAAA;AAAA,EAGA,IAAW,UACX;AACS,WAAA,KAAA,mBAEE,KAAK;AAAA,EAChB;AAAA,EAEQ,kBACR;AACI,QAAI,KAAK,YAAY;AAIP,YAAA,IAAI,UAAU,mDAAmD;AAAA,EAGnF;AACJ;"}
|
||||
22
resources/app/node_modules/@pixi/utils/lib/media/caches.js
generated
vendored
Normal file
22
resources/app/node_modules/@pixi/utils/lib/media/caches.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
const ProgramCache = {}, TextureCache = /* @__PURE__ */ Object.create(null), BaseTextureCache = /* @__PURE__ */ Object.create(null);
|
||||
function destroyTextureCache() {
|
||||
let key;
|
||||
for (key in TextureCache)
|
||||
TextureCache[key].destroy();
|
||||
for (key in BaseTextureCache)
|
||||
BaseTextureCache[key].destroy();
|
||||
}
|
||||
function clearTextureCache() {
|
||||
let key;
|
||||
for (key in TextureCache)
|
||||
delete TextureCache[key];
|
||||
for (key in BaseTextureCache)
|
||||
delete BaseTextureCache[key];
|
||||
}
|
||||
exports.BaseTextureCache = BaseTextureCache;
|
||||
exports.ProgramCache = ProgramCache;
|
||||
exports.TextureCache = TextureCache;
|
||||
exports.clearTextureCache = clearTextureCache;
|
||||
exports.destroyTextureCache = destroyTextureCache;
|
||||
//# sourceMappingURL=caches.js.map
|
||||
1
resources/app/node_modules/@pixi/utils/lib/media/caches.js.map
generated
vendored
Normal file
1
resources/app/node_modules/@pixi/utils/lib/media/caches.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"caches.js","sources":["../../src/media/caches.ts"],"sourcesContent":["import type { BaseTexture, Program, Texture } from '@pixi/core';\n\n/**\n * @todo Describe property usage\n * @static\n * @name ProgramCache\n * @memberof PIXI.utils\n * @type {Record<string, Program>}\n */\nexport const ProgramCache: {[key: string]: Program} = {};\n\n/**\n * @todo Describe property usage\n * @static\n * @name TextureCache\n * @memberof PIXI.utils\n * @type {Record<string, Texture>}\n */\nexport const TextureCache: {[key: string]: Texture} = Object.create(null);\n\n/**\n * @todo Describe property usage\n * @static\n * @name BaseTextureCache\n * @memberof PIXI.utils\n * @type {Record<string, BaseTexture>}\n */\nexport const BaseTextureCache: {[key: string]: BaseTexture} = Object.create(null);\n\n/**\n * Destroys all texture in the cache\n * @memberof PIXI.utils\n * @function destroyTextureCache\n */\nexport function destroyTextureCache(): void\n{\n let key;\n\n for (key in TextureCache)\n {\n TextureCache[key].destroy();\n }\n for (key in BaseTextureCache)\n {\n BaseTextureCache[key].destroy();\n }\n}\n\n/**\n * Removes all textures from cache, but does not destroy them\n * @memberof PIXI.utils\n * @function clearTextureCache\n */\nexport function clearTextureCache(): void\n{\n let key;\n\n for (key in TextureCache)\n {\n delete TextureCache[key];\n }\n for (key in BaseTextureCache)\n {\n delete BaseTextureCache[key];\n }\n}\n"],"names":[],"mappings":";AASa,MAAA,eAAyC,CAAC,GAS1C,eAAyC,uBAAO,OAAO,IAAI,GAS3D,mBAAwD,uBAAA,OAAO,IAAI;AAOzE,SAAS,sBAChB;AACQ,MAAA;AAEJ,OAAK,OAAO;AAEK,iBAAA,GAAG,EAAE;AAEtB,OAAK,OAAO;AAES,qBAAA,GAAG,EAAE;AAE9B;AAOO,SAAS,oBAChB;AACQ,MAAA;AAEJ,OAAK,OAAO;AAER,WAAO,aAAa,GAAG;AAE3B,OAAK,OAAO;AAER,WAAO,iBAAiB,GAAG;AAEnC;;;;;;"}
|
||||
23
resources/app/node_modules/@pixi/utils/lib/media/caches.mjs
generated
vendored
Normal file
23
resources/app/node_modules/@pixi/utils/lib/media/caches.mjs
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
const ProgramCache = {}, TextureCache = /* @__PURE__ */ Object.create(null), BaseTextureCache = /* @__PURE__ */ Object.create(null);
|
||||
function destroyTextureCache() {
|
||||
let key;
|
||||
for (key in TextureCache)
|
||||
TextureCache[key].destroy();
|
||||
for (key in BaseTextureCache)
|
||||
BaseTextureCache[key].destroy();
|
||||
}
|
||||
function clearTextureCache() {
|
||||
let key;
|
||||
for (key in TextureCache)
|
||||
delete TextureCache[key];
|
||||
for (key in BaseTextureCache)
|
||||
delete BaseTextureCache[key];
|
||||
}
|
||||
export {
|
||||
BaseTextureCache,
|
||||
ProgramCache,
|
||||
TextureCache,
|
||||
clearTextureCache,
|
||||
destroyTextureCache
|
||||
};
|
||||
//# sourceMappingURL=caches.mjs.map
|
||||
1
resources/app/node_modules/@pixi/utils/lib/media/caches.mjs.map
generated
vendored
Normal file
1
resources/app/node_modules/@pixi/utils/lib/media/caches.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"caches.mjs","sources":["../../src/media/caches.ts"],"sourcesContent":["import type { BaseTexture, Program, Texture } from '@pixi/core';\n\n/**\n * @todo Describe property usage\n * @static\n * @name ProgramCache\n * @memberof PIXI.utils\n * @type {Record<string, Program>}\n */\nexport const ProgramCache: {[key: string]: Program} = {};\n\n/**\n * @todo Describe property usage\n * @static\n * @name TextureCache\n * @memberof PIXI.utils\n * @type {Record<string, Texture>}\n */\nexport const TextureCache: {[key: string]: Texture} = Object.create(null);\n\n/**\n * @todo Describe property usage\n * @static\n * @name BaseTextureCache\n * @memberof PIXI.utils\n * @type {Record<string, BaseTexture>}\n */\nexport const BaseTextureCache: {[key: string]: BaseTexture} = Object.create(null);\n\n/**\n * Destroys all texture in the cache\n * @memberof PIXI.utils\n * @function destroyTextureCache\n */\nexport function destroyTextureCache(): void\n{\n let key;\n\n for (key in TextureCache)\n {\n TextureCache[key].destroy();\n }\n for (key in BaseTextureCache)\n {\n BaseTextureCache[key].destroy();\n }\n}\n\n/**\n * Removes all textures from cache, but does not destroy them\n * @memberof PIXI.utils\n * @function clearTextureCache\n */\nexport function clearTextureCache(): void\n{\n let key;\n\n for (key in TextureCache)\n {\n delete TextureCache[key];\n }\n for (key in BaseTextureCache)\n {\n delete BaseTextureCache[key];\n }\n}\n"],"names":[],"mappings":"AASa,MAAA,eAAyC,CAAC,GAS1C,eAAyC,uBAAO,OAAO,IAAI,GAS3D,mBAAwD,uBAAA,OAAO,IAAI;AAOzE,SAAS,sBAChB;AACQ,MAAA;AAEJ,OAAK,OAAO;AAEK,iBAAA,GAAG,EAAE;AAEtB,OAAK,OAAO;AAES,qBAAA,GAAG,EAAE;AAE9B;AAOO,SAAS,oBAChB;AACQ,MAAA;AAEJ,OAAK,OAAO;AAER,WAAO,aAAa,GAAG;AAE3B,OAAK,OAAO;AAER,WAAO,iBAAiB,GAAG;AAEnC;"}
|
||||
37
resources/app/node_modules/@pixi/utils/lib/media/getCanvasBoundingBox.js
generated
vendored
Normal file
37
resources/app/node_modules/@pixi/utils/lib/media/getCanvasBoundingBox.js
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
"use strict";
|
||||
var BoundingBox = require("./BoundingBox.js");
|
||||
function checkRow(data, width, y) {
|
||||
for (let x = 0, index = 4 * y * width; x < width; ++x, index += 4)
|
||||
if (data[index + 3] !== 0)
|
||||
return !1;
|
||||
return !0;
|
||||
}
|
||||
function checkColumn(data, width, x, top, bottom) {
|
||||
const stride = 4 * width;
|
||||
for (let y = top, index = top * stride + 4 * x; y <= bottom; ++y, index += stride)
|
||||
if (data[index + 3] !== 0)
|
||||
return !1;
|
||||
return !0;
|
||||
}
|
||||
function getCanvasBoundingBox(canvas) {
|
||||
const { width, height } = canvas, context = canvas.getContext("2d", {
|
||||
willReadFrequently: !0
|
||||
});
|
||||
if (context === null)
|
||||
throw new TypeError("Failed to get canvas 2D context");
|
||||
const data = context.getImageData(0, 0, width, height).data;
|
||||
let left = 0, top = 0, right = width - 1, bottom = height - 1;
|
||||
for (; top < height && checkRow(data, width, top); )
|
||||
++top;
|
||||
if (top === height)
|
||||
return BoundingBox.BoundingBox.EMPTY;
|
||||
for (; checkRow(data, width, bottom); )
|
||||
--bottom;
|
||||
for (; checkColumn(data, width, left, top, bottom); )
|
||||
++left;
|
||||
for (; checkColumn(data, width, right, top, bottom); )
|
||||
--right;
|
||||
return ++right, ++bottom, new BoundingBox.BoundingBox(left, top, right, bottom);
|
||||
}
|
||||
exports.getCanvasBoundingBox = getCanvasBoundingBox;
|
||||
//# sourceMappingURL=getCanvasBoundingBox.js.map
|
||||
1
resources/app/node_modules/@pixi/utils/lib/media/getCanvasBoundingBox.js.map
generated
vendored
Normal file
1
resources/app/node_modules/@pixi/utils/lib/media/getCanvasBoundingBox.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"getCanvasBoundingBox.js","sources":["../../src/media/getCanvasBoundingBox.ts"],"sourcesContent":["import { BoundingBox } from './BoundingBox';\n\nimport type { ICanvas } from '@pixi/settings';\n\nfunction checkRow(data: Uint8ClampedArray, width: number, y: number)\n{\n for (let x = 0, index = 4 * y * width; x < width; ++x, index += 4)\n {\n if (data[index + 3] !== 0) return false;\n }\n\n return true;\n}\n\nfunction checkColumn(data: Uint8ClampedArray, width: number, x: number, top: number, bottom: number)\n{\n const stride = 4 * width;\n\n for (let y = top, index = (top * stride) + (4 * x); y <= bottom; ++y, index += stride)\n {\n if (data[index + 3] !== 0) return false;\n }\n\n return true;\n}\n\n/**\n * Measuring the bounds of a canvas' visible (non-transparent) pixels.\n * @memberof PIXI.utils\n * @param {PIXI.ICanvas} canvas - The canvas to measure.\n * @returns {PIXI.utils.BoundingBox} The bounding box of the canvas' visible pixels.\n * @since 7.1.0\n */\nexport function getCanvasBoundingBox(canvas: ICanvas): BoundingBox\n{\n // https://gist.github.com/timdown/021d9c8f2aabc7092df564996f5afbbf\n\n const { width, height } = canvas;\n\n const context = canvas.getContext('2d', {\n willReadFrequently: true,\n });\n\n if (context === null)\n {\n throw new TypeError('Failed to get canvas 2D context');\n }\n\n const imageData = context.getImageData(0, 0, width, height);\n const data = imageData.data;\n\n let left = 0;\n let top = 0;\n let right = width - 1;\n let bottom = height - 1;\n\n while (top < height && checkRow(data, width, top)) ++top;\n if (top === height) return BoundingBox.EMPTY;\n while (checkRow(data, width, bottom)) --bottom;\n while (checkColumn(data, width, left, top, bottom)) ++left;\n while (checkColumn(data, width, right, top, bottom)) --right;\n\n ++right;\n ++bottom;\n\n return new BoundingBox(left, top, right, bottom);\n}\n"],"names":["BoundingBox"],"mappings":";;AAIA,SAAS,SAAS,MAAyB,OAAe,GAC1D;AACa,WAAA,IAAI,GAAG,QAAQ,IAAI,IAAI,OAAO,IAAI,OAAO,EAAE,GAAG,SAAS;AAExD,QAAA,KAAK,QAAQ,CAAC,MAAM;AAAU,aAAA;AAG/B,SAAA;AACX;AAEA,SAAS,YAAY,MAAyB,OAAe,GAAW,KAAa,QACrF;AACI,QAAM,SAAS,IAAI;AAEV,WAAA,IAAI,KAAK,QAAS,MAAM,SAAW,IAAI,GAAI,KAAK,QAAQ,EAAE,GAAG,SAAS;AAEvE,QAAA,KAAK,QAAQ,CAAC,MAAM;AAAU,aAAA;AAG/B,SAAA;AACX;AASO,SAAS,qBAAqB,QACrC;AAGU,QAAA,EAAE,OAAO,WAAW,QAEpB,UAAU,OAAO,WAAW,MAAM;AAAA,IACpC,oBAAoB;AAAA,EAAA,CACvB;AAED,MAAI,YAAY;AAEN,UAAA,IAAI,UAAU,iCAAiC;AAIzD,QAAM,OADY,QAAQ,aAAa,GAAG,GAAG,OAAO,MAAM,EACnC;AAEnB,MAAA,OAAO,GACP,MAAM,GACN,QAAQ,QAAQ,GAChB,SAAS,SAAS;AAEtB,SAAO,MAAM,UAAU,SAAS,MAAM,OAAO,GAAG;AAAK,MAAA;AACrD,MAAI,QAAQ;AAAQ,WAAOA,YAAAA,YAAY;AAChC,SAAA,SAAS,MAAM,OAAO,MAAM;AAAK,MAAA;AACxC,SAAO,YAAY,MAAM,OAAO,MAAM,KAAK,MAAM;AAAK,MAAA;AACtD,SAAO,YAAY,MAAM,OAAO,OAAO,KAAK,MAAM;AAAK,MAAA;AAErD,SAAA,EAAA,OACF,EAAE,QAEK,IAAIA,YAAAA,YAAY,MAAM,KAAK,OAAO,MAAM;AACnD;;"}
|
||||
38
resources/app/node_modules/@pixi/utils/lib/media/getCanvasBoundingBox.mjs
generated
vendored
Normal file
38
resources/app/node_modules/@pixi/utils/lib/media/getCanvasBoundingBox.mjs
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
import { BoundingBox } from "./BoundingBox.mjs";
|
||||
function checkRow(data, width, y) {
|
||||
for (let x = 0, index = 4 * y * width; x < width; ++x, index += 4)
|
||||
if (data[index + 3] !== 0)
|
||||
return !1;
|
||||
return !0;
|
||||
}
|
||||
function checkColumn(data, width, x, top, bottom) {
|
||||
const stride = 4 * width;
|
||||
for (let y = top, index = top * stride + 4 * x; y <= bottom; ++y, index += stride)
|
||||
if (data[index + 3] !== 0)
|
||||
return !1;
|
||||
return !0;
|
||||
}
|
||||
function getCanvasBoundingBox(canvas) {
|
||||
const { width, height } = canvas, context = canvas.getContext("2d", {
|
||||
willReadFrequently: !0
|
||||
});
|
||||
if (context === null)
|
||||
throw new TypeError("Failed to get canvas 2D context");
|
||||
const data = context.getImageData(0, 0, width, height).data;
|
||||
let left = 0, top = 0, right = width - 1, bottom = height - 1;
|
||||
for (; top < height && checkRow(data, width, top); )
|
||||
++top;
|
||||
if (top === height)
|
||||
return BoundingBox.EMPTY;
|
||||
for (; checkRow(data, width, bottom); )
|
||||
--bottom;
|
||||
for (; checkColumn(data, width, left, top, bottom); )
|
||||
++left;
|
||||
for (; checkColumn(data, width, right, top, bottom); )
|
||||
--right;
|
||||
return ++right, ++bottom, new BoundingBox(left, top, right, bottom);
|
||||
}
|
||||
export {
|
||||
getCanvasBoundingBox
|
||||
};
|
||||
//# sourceMappingURL=getCanvasBoundingBox.mjs.map
|
||||
1
resources/app/node_modules/@pixi/utils/lib/media/getCanvasBoundingBox.mjs.map
generated
vendored
Normal file
1
resources/app/node_modules/@pixi/utils/lib/media/getCanvasBoundingBox.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"getCanvasBoundingBox.mjs","sources":["../../src/media/getCanvasBoundingBox.ts"],"sourcesContent":["import { BoundingBox } from './BoundingBox';\n\nimport type { ICanvas } from '@pixi/settings';\n\nfunction checkRow(data: Uint8ClampedArray, width: number, y: number)\n{\n for (let x = 0, index = 4 * y * width; x < width; ++x, index += 4)\n {\n if (data[index + 3] !== 0) return false;\n }\n\n return true;\n}\n\nfunction checkColumn(data: Uint8ClampedArray, width: number, x: number, top: number, bottom: number)\n{\n const stride = 4 * width;\n\n for (let y = top, index = (top * stride) + (4 * x); y <= bottom; ++y, index += stride)\n {\n if (data[index + 3] !== 0) return false;\n }\n\n return true;\n}\n\n/**\n * Measuring the bounds of a canvas' visible (non-transparent) pixels.\n * @memberof PIXI.utils\n * @param {PIXI.ICanvas} canvas - The canvas to measure.\n * @returns {PIXI.utils.BoundingBox} The bounding box of the canvas' visible pixels.\n * @since 7.1.0\n */\nexport function getCanvasBoundingBox(canvas: ICanvas): BoundingBox\n{\n // https://gist.github.com/timdown/021d9c8f2aabc7092df564996f5afbbf\n\n const { width, height } = canvas;\n\n const context = canvas.getContext('2d', {\n willReadFrequently: true,\n });\n\n if (context === null)\n {\n throw new TypeError('Failed to get canvas 2D context');\n }\n\n const imageData = context.getImageData(0, 0, width, height);\n const data = imageData.data;\n\n let left = 0;\n let top = 0;\n let right = width - 1;\n let bottom = height - 1;\n\n while (top < height && checkRow(data, width, top)) ++top;\n if (top === height) return BoundingBox.EMPTY;\n while (checkRow(data, width, bottom)) --bottom;\n while (checkColumn(data, width, left, top, bottom)) ++left;\n while (checkColumn(data, width, right, top, bottom)) --right;\n\n ++right;\n ++bottom;\n\n return new BoundingBox(left, top, right, bottom);\n}\n"],"names":[],"mappings":";AAIA,SAAS,SAAS,MAAyB,OAAe,GAC1D;AACa,WAAA,IAAI,GAAG,QAAQ,IAAI,IAAI,OAAO,IAAI,OAAO,EAAE,GAAG,SAAS;AAExD,QAAA,KAAK,QAAQ,CAAC,MAAM;AAAU,aAAA;AAG/B,SAAA;AACX;AAEA,SAAS,YAAY,MAAyB,OAAe,GAAW,KAAa,QACrF;AACI,QAAM,SAAS,IAAI;AAEV,WAAA,IAAI,KAAK,QAAS,MAAM,SAAW,IAAI,GAAI,KAAK,QAAQ,EAAE,GAAG,SAAS;AAEvE,QAAA,KAAK,QAAQ,CAAC,MAAM;AAAU,aAAA;AAG/B,SAAA;AACX;AASO,SAAS,qBAAqB,QACrC;AAGU,QAAA,EAAE,OAAO,WAAW,QAEpB,UAAU,OAAO,WAAW,MAAM;AAAA,IACpC,oBAAoB;AAAA,EAAA,CACvB;AAED,MAAI,YAAY;AAEN,UAAA,IAAI,UAAU,iCAAiC;AAIzD,QAAM,OADY,QAAQ,aAAa,GAAG,GAAG,OAAO,MAAM,EACnC;AAEnB,MAAA,OAAO,GACP,MAAM,GACN,QAAQ,QAAQ,GAChB,SAAS,SAAS;AAEtB,SAAO,MAAM,UAAU,SAAS,MAAM,OAAO,GAAG;AAAK,MAAA;AACrD,MAAI,QAAQ;AAAQ,WAAO,YAAY;AAChC,SAAA,SAAS,MAAM,OAAO,MAAM;AAAK,MAAA;AACxC,SAAO,YAAY,MAAM,OAAO,MAAM,KAAK,MAAM;AAAK,MAAA;AACtD,SAAO,YAAY,MAAM,OAAO,OAAO,KAAK,MAAM;AAAK,MAAA;AAErD,SAAA,EAAA,OACF,EAAE,QAEK,IAAI,YAAY,MAAM,KAAK,OAAO,MAAM;AACnD;"}
|
||||
20
resources/app/node_modules/@pixi/utils/lib/media/trimCanvas.js
generated
vendored
Normal file
20
resources/app/node_modules/@pixi/utils/lib/media/trimCanvas.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
var getCanvasBoundingBox = require("./getCanvasBoundingBox.js");
|
||||
function trimCanvas(canvas) {
|
||||
const boundingBox = getCanvasBoundingBox.getCanvasBoundingBox(canvas), { width, height } = boundingBox;
|
||||
let data = null;
|
||||
if (!boundingBox.isEmpty()) {
|
||||
const context = canvas.getContext("2d");
|
||||
if (context === null)
|
||||
throw new TypeError("Failed to get canvas 2D context");
|
||||
data = context.getImageData(
|
||||
boundingBox.left,
|
||||
boundingBox.top,
|
||||
width,
|
||||
height
|
||||
);
|
||||
}
|
||||
return { width, height, data };
|
||||
}
|
||||
exports.trimCanvas = trimCanvas;
|
||||
//# sourceMappingURL=trimCanvas.js.map
|
||||
1
resources/app/node_modules/@pixi/utils/lib/media/trimCanvas.js.map
generated
vendored
Normal file
1
resources/app/node_modules/@pixi/utils/lib/media/trimCanvas.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"trimCanvas.js","sources":["../../src/media/trimCanvas.ts"],"sourcesContent":["import { getCanvasBoundingBox } from './getCanvasBoundingBox';\n\nimport type { ICanvas } from '@pixi/settings';\n\n/**\n * Trim transparent borders from a canvas.\n * @memberof PIXI.utils\n * @param {PIXI.ICanvas} canvas - The canvas to trim.\n * @returns The trimmed canvas data.\n */\nexport function trimCanvas(canvas: ICanvas): { width: number, height: number, data: ImageData | null }\n{\n const boundingBox = getCanvasBoundingBox(canvas);\n const { width, height } = boundingBox;\n let data = null;\n\n if (!boundingBox.isEmpty())\n {\n const context = canvas.getContext('2d');\n\n if (context === null)\n {\n throw new TypeError('Failed to get canvas 2D context');\n }\n\n data = context.getImageData(\n boundingBox.left,\n boundingBox.top,\n width,\n height\n );\n }\n\n return { width, height, data };\n}\n"],"names":["getCanvasBoundingBox"],"mappings":";;AAUO,SAAS,WAAW,QAC3B;AACI,QAAM,cAAcA,qBAAAA,qBAAqB,MAAM,GACzC,EAAE,OAAO,OAAW,IAAA;AAC1B,MAAI,OAAO;AAEP,MAAA,CAAC,YAAY,WACjB;AACU,UAAA,UAAU,OAAO,WAAW,IAAI;AAEtC,QAAI,YAAY;AAEN,YAAA,IAAI,UAAU,iCAAiC;AAGzD,WAAO,QAAQ;AAAA,MACX,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ;AAAA,MACA;AAAA,IAAA;AAAA,EAER;AAEO,SAAA,EAAE,OAAO,QAAQ;AAC5B;;"}
|
||||
21
resources/app/node_modules/@pixi/utils/lib/media/trimCanvas.mjs
generated
vendored
Normal file
21
resources/app/node_modules/@pixi/utils/lib/media/trimCanvas.mjs
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
import { getCanvasBoundingBox } from "./getCanvasBoundingBox.mjs";
|
||||
function trimCanvas(canvas) {
|
||||
const boundingBox = getCanvasBoundingBox(canvas), { width, height } = boundingBox;
|
||||
let data = null;
|
||||
if (!boundingBox.isEmpty()) {
|
||||
const context = canvas.getContext("2d");
|
||||
if (context === null)
|
||||
throw new TypeError("Failed to get canvas 2D context");
|
||||
data = context.getImageData(
|
||||
boundingBox.left,
|
||||
boundingBox.top,
|
||||
width,
|
||||
height
|
||||
);
|
||||
}
|
||||
return { width, height, data };
|
||||
}
|
||||
export {
|
||||
trimCanvas
|
||||
};
|
||||
//# sourceMappingURL=trimCanvas.mjs.map
|
||||
1
resources/app/node_modules/@pixi/utils/lib/media/trimCanvas.mjs.map
generated
vendored
Normal file
1
resources/app/node_modules/@pixi/utils/lib/media/trimCanvas.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"trimCanvas.mjs","sources":["../../src/media/trimCanvas.ts"],"sourcesContent":["import { getCanvasBoundingBox } from './getCanvasBoundingBox';\n\nimport type { ICanvas } from '@pixi/settings';\n\n/**\n * Trim transparent borders from a canvas.\n * @memberof PIXI.utils\n * @param {PIXI.ICanvas} canvas - The canvas to trim.\n * @returns The trimmed canvas data.\n */\nexport function trimCanvas(canvas: ICanvas): { width: number, height: number, data: ImageData | null }\n{\n const boundingBox = getCanvasBoundingBox(canvas);\n const { width, height } = boundingBox;\n let data = null;\n\n if (!boundingBox.isEmpty())\n {\n const context = canvas.getContext('2d');\n\n if (context === null)\n {\n throw new TypeError('Failed to get canvas 2D context');\n }\n\n data = context.getImageData(\n boundingBox.left,\n boundingBox.top,\n width,\n height\n );\n }\n\n return { width, height, data };\n}\n"],"names":[],"mappings":";AAUO,SAAS,WAAW,QAC3B;AACI,QAAM,cAAc,qBAAqB,MAAM,GACzC,EAAE,OAAO,OAAW,IAAA;AAC1B,MAAI,OAAO;AAEP,MAAA,CAAC,YAAY,WACjB;AACU,UAAA,UAAU,OAAO,WAAW,IAAI;AAEtC,QAAI,YAAY;AAEN,YAAA,IAAI,UAAU,iCAAiC;AAGzD,WAAO,QAAQ;AAAA,MACX,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ;AAAA,MACA;AAAA,IAAA;AAAA,EAER;AAEO,SAAA,EAAE,OAAO,QAAQ;AAC5B;"}
|
||||
Reference in New Issue
Block a user