Socket
Socket
Sign inDemoInstall

@pixi/utils

Package Overview
Dependencies
Maintainers
2
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pixi/utils - npm Package Compare versions

Comparing version 7.2.4 to 7.3.0-rc

lib/browser/detectVideoAlphaMode.d.ts

9

lib/browser/hello.js

@@ -1,7 +0,3 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var deprecation = require('../logging/deprecation.js');
"use strict";
var deprecation = require("../logging/deprecation.js");
function skipHello() {

@@ -13,5 +9,4 @@ deprecation.deprecation("7.0.0", "skipHello is deprecated, please use settings.RENDER_OPTIONS.hello");

}
exports.sayHello = sayHello;
exports.skipHello = skipHello;
//# sourceMappingURL=hello.js.map

@@ -1,40 +0,28 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
require('../settings.js');
var settings = require('@pixi/settings');
"use strict";
require("../settings.js");
var settings = require("@pixi/settings");
let supported;
function isWebGLSupported() {
if (typeof supported === "undefined") {
supported = function supported2() {
const contextOptions = {
stencil: true,
failIfMajorPerformanceCaveat: settings.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT
};
try {
if (!settings.settings.ADAPTER.getWebGLRenderingContext()) {
return false;
}
const canvas = settings.settings.ADAPTER.createCanvas();
let gl = canvas.getContext("webgl", contextOptions) || canvas.getContext("experimental-webgl", contextOptions);
const success = !!gl?.getContextAttributes()?.stencil;
if (gl) {
const loseContext = gl.getExtension("WEBGL_lose_context");
if (loseContext) {
loseContext.loseContext();
}
}
gl = null;
return success;
} catch (e) {
return false;
return typeof supported > "u" && (supported = function() {
const contextOptions = {
stencil: !0,
failIfMajorPerformanceCaveat: settings.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT
};
try {
if (!settings.settings.ADAPTER.getWebGLRenderingContext())
return !1;
const canvas = settings.settings.ADAPTER.createCanvas();
let gl = canvas.getContext("webgl", contextOptions) || canvas.getContext("experimental-webgl", contextOptions);
const success = !!gl?.getContextAttributes()?.stencil;
if (gl) {
const loseContext = gl.getExtension("WEBGL_lose_context");
loseContext && loseContext.loseContext();
}
}();
}
return supported;
return gl = null, success;
} catch {
return !1;
}
}()), supported;
}
exports.isWebGLSupported = isWebGLSupported;
//# sourceMappingURL=isWebGLSupported.js.map

@@ -1,25 +0,15 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var color = require('@pixi/color');
var deprecation = require('../logging/deprecation.js');
"use strict";
var color = require("@pixi/color"), deprecation = require("../logging/deprecation.js");
function hex2rgb(hex, out = []) {
deprecation.deprecation("7.2.0", "utils.hex2rgb is deprecated, use Color#toRgbArray instead");
return color.Color.shared.setValue(hex).toRgbArray(out);
return deprecation.deprecation("7.2.0", "utils.hex2rgb is deprecated, use Color#toRgbArray instead"), color.Color.shared.setValue(hex).toRgbArray(out);
}
function hex2string(hex) {
deprecation.deprecation("7.2.0", "utils.hex2string is deprecated, use Color#toHex instead");
return color.Color.shared.setValue(hex).toHex();
return deprecation.deprecation("7.2.0", "utils.hex2string is deprecated, use Color#toHex instead"), color.Color.shared.setValue(hex).toHex();
}
function string2hex(string) {
deprecation.deprecation("7.2.0", "utils.string2hex is deprecated, use Color#toNumber instead");
return color.Color.shared.setValue(string).toNumber();
return deprecation.deprecation("7.2.0", "utils.string2hex is deprecated, use Color#toNumber instead"), color.Color.shared.setValue(string).toNumber();
}
function rgb2hex(rgb) {
deprecation.deprecation("7.2.0", "utils.rgb2hex is deprecated, use Color#toNumber instead");
return color.Color.shared.setValue(rgb).toNumber();
return deprecation.deprecation("7.2.0", "utils.rgb2hex is deprecated, use Color#toNumber instead"), color.Color.shared.setValue(rgb).toNumber();
}
exports.hex2rgb = hex2rgb;

@@ -26,0 +16,0 @@ exports.hex2string = hex2string;

@@ -1,26 +0,10 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var color = require('@pixi/color');
var constants = require('@pixi/constants');
var deprecation = require('../logging/deprecation.js');
"use strict";
var color = require("@pixi/color"), constants = require("@pixi/constants"), deprecation = require("../logging/deprecation.js");
function mapPremultipliedBlendModes() {
const pm = [];
const npm = [];
for (let i = 0; i < 32; i++) {
pm[i] = i;
npm[i] = i;
}
pm[constants.BLEND_MODES.NORMAL_NPM] = constants.BLEND_MODES.NORMAL;
pm[constants.BLEND_MODES.ADD_NPM] = constants.BLEND_MODES.ADD;
pm[constants.BLEND_MODES.SCREEN_NPM] = constants.BLEND_MODES.SCREEN;
npm[constants.BLEND_MODES.NORMAL] = constants.BLEND_MODES.NORMAL_NPM;
npm[constants.BLEND_MODES.ADD] = constants.BLEND_MODES.ADD_NPM;
npm[constants.BLEND_MODES.SCREEN] = constants.BLEND_MODES.SCREEN_NPM;
const pm = [], npm = [];
for (let i = 0; i < 32; i++)
pm[i] = i, npm[i] = i;
pm[constants.BLEND_MODES.NORMAL_NPM] = constants.BLEND_MODES.NORMAL, pm[constants.BLEND_MODES.ADD_NPM] = constants.BLEND_MODES.ADD, pm[constants.BLEND_MODES.SCREEN_NPM] = constants.BLEND_MODES.SCREEN, npm[constants.BLEND_MODES.NORMAL] = constants.BLEND_MODES.NORMAL_NPM, npm[constants.BLEND_MODES.ADD] = constants.BLEND_MODES.ADD_NPM, npm[constants.BLEND_MODES.SCREEN] = constants.BLEND_MODES.SCREEN_NPM;
const array = [];
array.push(npm);
array.push(pm);
return array;
return array.push(npm), array.push(pm), array;
}

@@ -31,15 +15,11 @@ const premultiplyBlendMode = mapPremultipliedBlendModes();

}
function premultiplyRgba(rgb, alpha, out, premultiply = true) {
deprecation.deprecation("7.2.0", `utils.premultiplyRgba has moved to Color.premultiply`);
return color.Color.shared.setValue(rgb).premultiply(alpha, premultiply).toArray(out ?? new Float32Array(4));
function premultiplyRgba(rgb, alpha, out, premultiply = !0) {
return deprecation.deprecation("7.2.0", "utils.premultiplyRgba has moved to Color.premultiply"), color.Color.shared.setValue(rgb).premultiply(alpha, premultiply).toArray(out ?? new Float32Array(4));
}
function premultiplyTint(tint, alpha) {
deprecation.deprecation("7.2.0", `utils.premultiplyTint has moved to Color.toPremultiplied`);
return color.Color.shared.setValue(tint).toPremultiplied(alpha);
return deprecation.deprecation("7.2.0", "utils.premultiplyTint has moved to Color.toPremultiplied"), color.Color.shared.setValue(tint).toPremultiplied(alpha);
}
function premultiplyTintToRgba(tint, alpha, out, premultiply = true) {
deprecation.deprecation("7.2.0", `utils.premultiplyTintToRgba has moved to Color.premultiply`);
return color.Color.shared.setValue(tint).premultiply(alpha, premultiply).toArray(out ?? new Float32Array(4));
function premultiplyTintToRgba(tint, alpha, out, premultiply = !0) {
return deprecation.deprecation("7.2.0", "utils.premultiplyTintToRgba has moved to Color.premultiply"), color.Color.shared.setValue(tint).premultiply(alpha, premultiply).toArray(out ?? new Float32Array(4));
}
exports.correctBlendMode = correctBlendMode;

@@ -46,0 +26,0 @@ exports.premultiplyBlendMode = premultiplyBlendMode;

@@ -1,8 +0,4 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
"use strict";
const DATA_URI = /^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i;
exports.DATA_URI = DATA_URI;
//# sourceMappingURL=const.js.map

@@ -1,23 +0,11 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
"use strict";
function createIndicesForQuads(size, outBuffer = null) {
const totalIndices = size * 6;
outBuffer = outBuffer || new Uint16Array(totalIndices);
if (outBuffer.length !== totalIndices) {
if (outBuffer = outBuffer || new Uint16Array(totalIndices), outBuffer.length !== totalIndices)
throw new Error(`Out buffer length is incorrect, got ${outBuffer.length} and expected ${totalIndices}`);
}
for (let i = 0, j = 0; i < totalIndices; i += 6, j += 4) {
outBuffer[i + 0] = j + 0;
outBuffer[i + 1] = j + 1;
outBuffer[i + 2] = j + 2;
outBuffer[i + 3] = j + 0;
outBuffer[i + 4] = j + 2;
outBuffer[i + 5] = j + 3;
}
for (let i = 0, j = 0; i < totalIndices; i += 6, j += 4)
outBuffer[i + 0] = j + 0, outBuffer[i + 1] = j + 1, outBuffer[i + 2] = j + 2, outBuffer[i + 3] = j + 0, outBuffer[i + 4] = j + 2, outBuffer[i + 5] = j + 3;
return outBuffer;
}
exports.createIndicesForQuads = createIndicesForQuads;
//# sourceMappingURL=createIndicesForQuads.js.map

@@ -1,26 +0,13 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
"use strict";
function getBufferType(array) {
if (array.BYTES_PER_ELEMENT === 4) {
if (array instanceof Float32Array) {
return "Float32Array";
} else if (array instanceof Uint32Array) {
return "Uint32Array";
}
return "Int32Array";
} else if (array.BYTES_PER_ELEMENT === 2) {
if (array instanceof Uint16Array) {
if (array.BYTES_PER_ELEMENT === 4)
return array instanceof Float32Array ? "Float32Array" : array instanceof Uint32Array ? "Uint32Array" : "Int32Array";
if (array.BYTES_PER_ELEMENT === 2) {
if (array instanceof Uint16Array)
return "Uint16Array";
}
} else if (array.BYTES_PER_ELEMENT === 1) {
if (array instanceof Uint8Array) {
return "Uint8Array";
}
}
} else if (array.BYTES_PER_ELEMENT === 1 && array instanceof Uint8Array)
return "Uint8Array";
return null;
}
exports.getBufferType = getBufferType;
//# sourceMappingURL=getBufferType.js.map

@@ -1,30 +0,16 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var getBufferType = require('./getBufferType.js');
"use strict";
var getBufferType = require("./getBufferType.js");
const map = { Float32Array, Uint32Array, Int32Array, Uint8Array };
function interleaveTypedArrays(arrays, sizes) {
let outSize = 0;
let stride = 0;
let outSize = 0, stride = 0;
const views = {};
for (let i = 0; i < arrays.length; i++) {
stride += sizes[i];
outSize += arrays[i].length;
}
for (let i = 0; i < arrays.length; i++)
stride += sizes[i], outSize += arrays[i].length;
const buffer = new ArrayBuffer(outSize * 4);
let out = null;
let littleOffset = 0;
let out = null, littleOffset = 0;
for (let i = 0; i < arrays.length; i++) {
const size = sizes[i];
const array = arrays[i];
const type = getBufferType.getBufferType(array);
if (!views[type]) {
views[type] = new map[type](buffer);
}
out = views[type];
const size = sizes[i], array = arrays[i], type = getBufferType.getBufferType(array);
views[type] || (views[type] = new map[type](buffer)), out = views[type];
for (let j = 0; j < array.length; j++) {
const indexStart = (j / size | 0) * stride + littleOffset;
const index = j % size;
const indexStart = (j / size | 0) * stride + littleOffset, index = j % size;
out[indexStart + index] = array[j];

@@ -36,4 +22,3 @@ }

}
exports.interleaveTypedArrays = interleaveTypedArrays;
//# sourceMappingURL=interleaveTypedArrays.js.map

@@ -1,14 +0,4 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
"use strict";
function nextPow2(v) {
v += v === 0 ? 1 : 0;
--v;
v |= v >>> 1;
v |= v >>> 2;
v |= v >>> 4;
v |= v >>> 8;
v |= v >>> 16;
return v + 1;
return v += v === 0 ? 1 : 0, --v, v |= v >>> 1, v |= v >>> 2, v |= v >>> 4, v |= v >>> 8, v |= v >>> 16, v + 1;
}

@@ -22,13 +12,4 @@ function isPow2(v) {

let shift = (v > 255 ? 1 : 0) << 3;
v >>>= shift;
r |= shift;
shift = (v > 15 ? 1 : 0) << 2;
v >>>= shift;
r |= shift;
shift = (v > 3 ? 1 : 0) << 1;
v >>>= shift;
r |= shift;
return r | v >> 1;
return v >>>= shift, r |= shift, shift = (v > 15 ? 1 : 0) << 2, v >>>= shift, r |= shift, shift = (v > 3 ? 1 : 0) << 1, v >>>= shift, r |= shift, r | v >> 1;
}
exports.isPow2 = isPow2;

@@ -35,0 +16,0 @@ exports.log2 = log2;

@@ -1,20 +0,14 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
"use strict";
function removeItems(arr, startIdx, removeCount) {
const length = arr.length;
let i;
if (startIdx >= length || removeCount === 0) {
if (startIdx >= length || removeCount === 0)
return;
}
removeCount = startIdx + removeCount > length ? length - startIdx : removeCount;
const len = length - removeCount;
for (i = startIdx; i < len; ++i) {
for (i = startIdx; i < len; ++i)
arr[i] = arr[i + removeCount];
}
arr.length = len;
}
exports.removeItems = removeItems;
//# sourceMappingURL=removeItems.js.map

@@ -1,12 +0,6 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
"use strict";
function sign(n) {
if (n === 0)
return 0;
return n < 0 ? -1 : 1;
return n === 0 ? 0 : n < 0 ? -1 : 1;
}
exports.sign = sign;
//# sourceMappingURL=sign.js.map

@@ -1,5 +0,2 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
"use strict";
let nextUid = 0;

@@ -9,4 +6,3 @@ function uid() {

}
exports.uid = uid;
//# sourceMappingURL=uid.js.map

@@ -71,2 +71,3 @@ /// <reference path="../global.d.ts" />

* @member {object}
* @deprecated since 7.3.0
*/

@@ -82,2 +83,3 @@ export * from './url';

export * from './path';
export * from './browser/detectVideoAlphaMode';
export * from './browser/hello';

@@ -84,0 +86,0 @@ export * from './browser/isWebGLSupported';

@@ -1,55 +0,16 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
require('./settings.js');
var settings = require('@pixi/settings');
var eventemitter3 = require('eventemitter3');
var earcut = require('earcut');
var url = require('./url.js');
var path = require('./path.js');
var hello = require('./browser/hello.js');
var isWebGLSupported = require('./browser/isWebGLSupported.js');
var hex = require('./color/hex.js');
var premultiply = require('./color/premultiply.js');
var _const = require('./const.js');
var createIndicesForQuads = require('./data/createIndicesForQuads.js');
var getBufferType = require('./data/getBufferType.js');
var interleaveTypedArrays = require('./data/interleaveTypedArrays.js');
var pow2 = require('./data/pow2.js');
var removeItems = require('./data/removeItems.js');
var sign = require('./data/sign.js');
var uid = require('./data/uid.js');
var deprecation = require('./logging/deprecation.js');
var BoundingBox = require('./media/BoundingBox.js');
var caches = require('./media/caches.js');
var CanvasRenderTarget = require('./media/CanvasRenderTarget.js');
var getCanvasBoundingBox = require('./media/getCanvasBoundingBox.js');
var trimCanvas = require('./media/trimCanvas.js');
var decomposeDataUri = require('./network/decomposeDataUri.js');
var determineCrossOrigin = require('./network/determineCrossOrigin.js');
var getResolutionOfUrl = require('./network/getResolutionOfUrl.js');
require('./types/index.js');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var eventemitter3__default = /*#__PURE__*/_interopDefaultLegacy(eventemitter3);
var earcut__default = /*#__PURE__*/_interopDefaultLegacy(earcut);
Object.defineProperty(exports, 'isMobile', {
enumerable: true,
get: function () { return settings.isMobile; }
"use strict";
require("./settings.js");
var settings = require("@pixi/settings"), eventemitter3 = require("eventemitter3"), earcut = require("earcut"), url = require("./url.js"), path = require("./path.js"), detectVideoAlphaMode = require("./browser/detectVideoAlphaMode.js"), hello = require("./browser/hello.js"), isWebGLSupported = require("./browser/isWebGLSupported.js"), hex = require("./color/hex.js"), premultiply = require("./color/premultiply.js"), _const = require("./const.js"), createIndicesForQuads = require("./data/createIndicesForQuads.js"), getBufferType = require("./data/getBufferType.js"), interleaveTypedArrays = require("./data/interleaveTypedArrays.js"), pow2 = require("./data/pow2.js"), removeItems = require("./data/removeItems.js"), sign = require("./data/sign.js"), uid = require("./data/uid.js"), deprecation = require("./logging/deprecation.js"), BoundingBox = require("./media/BoundingBox.js"), caches = require("./media/caches.js"), CanvasRenderTarget = require("./media/CanvasRenderTarget.js"), getCanvasBoundingBox = require("./media/getCanvasBoundingBox.js"), trimCanvas = require("./media/trimCanvas.js"), decomposeDataUri = require("./network/decomposeDataUri.js"), determineCrossOrigin = require("./network/determineCrossOrigin.js"), getResolutionOfUrl = require("./network/getResolutionOfUrl.js");
require("./types/index.js");
Object.defineProperty(exports, "isMobile", {
enumerable: !0,
get: function() {
return settings.isMobile;
}
});
Object.defineProperty(exports, 'EventEmitter', {
enumerable: true,
get: function () { return eventemitter3__default["default"]; }
});
Object.defineProperty(exports, 'earcut', {
enumerable: true,
get: function () { return earcut__default["default"]; }
});
exports.EventEmitter = eventemitter3;
exports.earcut = earcut;
exports.url = url.url;
exports.path = path.path;
exports.detectVideoAlphaMode = detectVideoAlphaMode.detectVideoAlphaMode;
exports.sayHello = hello.sayHello;

@@ -56,0 +17,0 @@ exports.skipHello = hello.skipHello;

@@ -1,31 +0,20 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
"use strict";
const warnings = {};
function deprecation(version, message, ignoreDepth = 3) {
if (warnings[message]) {
if (warnings[message])
return;
}
let stack = new Error().stack;
if (typeof stack === "undefined") {
console.warn("PixiJS Deprecation Warning: ", `${message}
Deprecated since v${version}`);
} else {
stack = stack.split("\n").splice(ignoreDepth).join("\n");
if (console.groupCollapsed) {
console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s", "color:#614108;background:#fffbe6", "font-weight:normal;color:#614108;background:#fffbe6", `${message}
Deprecated since v${version}`);
console.warn(stack);
console.groupEnd();
} else {
console.warn("PixiJS Deprecation Warning: ", `${message}
Deprecated since v${version}`);
console.warn(stack);
}
}
warnings[message] = true;
typeof stack > "u" ? console.warn("PixiJS Deprecation Warning: ", `${message}
Deprecated since v${version}`) : (stack = stack.split(`
`).splice(ignoreDepth).join(`
`), console.groupCollapsed ? (console.groupCollapsed(
"%cPixiJS Deprecation Warning: %c%s",
"color:#614108;background:#fffbe6",
"font-weight:normal;color:#614108;background:#fffbe6",
`${message}
Deprecated since v${version}`
), console.warn(stack), console.groupEnd()) : (console.warn("PixiJS Deprecation Warning: ", `${message}
Deprecated since v${version}`), console.warn(stack))), warnings[message] = !0;
}
exports.deprecation = deprecation;
//# sourceMappingURL=deprecation.js.map

@@ -1,18 +0,21 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
"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;
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() {

@@ -22,6 +25,5 @@ return this.left === this.right || this.top === this.bottom;

};
_BoundingBox.EMPTY = new _BoundingBox(0, 0, 0, 0);
let BoundingBox = _BoundingBox;
BoundingBox.EMPTY = new _BoundingBox(0, 0, 0, 0);
exports.BoundingBox = BoundingBox;
//# sourceMappingURL=BoundingBox.js.map

@@ -1,27 +0,17 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const ProgramCache = {};
const TextureCache = /* @__PURE__ */ Object.create(null);
const BaseTextureCache = /* @__PURE__ */ Object.create(null);
"use strict";
const ProgramCache = {}, TextureCache = /* @__PURE__ */ Object.create(null), BaseTextureCache = /* @__PURE__ */ Object.create(null);
function destroyTextureCache() {
let key;
for (key in TextureCache) {
for (key in TextureCache)
TextureCache[key].destroy();
}
for (key in BaseTextureCache) {
for (key in BaseTextureCache)
BaseTextureCache[key].destroy();
}
}
function clearTextureCache() {
let key;
for (key in TextureCache) {
for (key in TextureCache)
delete TextureCache[key];
}
for (key in BaseTextureCache) {
for (key in BaseTextureCache)
delete BaseTextureCache[key];
}
}
exports.BaseTextureCache = BaseTextureCache;

@@ -28,0 +18,0 @@ exports.ProgramCache = ProgramCache;

@@ -1,60 +0,65 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var settings = require('@pixi/settings');
"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);
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);
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);
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;
this._context = null, this._canvas = null;
}
/**
* The width of the canvas buffer in pixels.
* @member {number}
*/
get width() {
this._checkDestroyed();
return this._canvas.width;
return this._checkDestroyed(), this._canvas.width;
}
set width(val) {
this._checkDestroyed();
this._canvas.width = Math.round(val);
this._checkDestroyed(), this._canvas.width = Math.round(val);
}
/**
* The height of the canvas buffer in pixels.
* @member {number}
*/
get height() {
this._checkDestroyed();
return this._canvas.height;
return this._checkDestroyed(), this._canvas.height;
}
set height(val) {
this._checkDestroyed();
this._canvas.height = Math.round(val);
this._checkDestroyed(), this._canvas.height = Math.round(val);
}
/** The Canvas object that belongs to this CanvasRenderTarget. */
get canvas() {
this._checkDestroyed();
return this._canvas;
return this._checkDestroyed(), this._canvas;
}
/** A CanvasRenderingContext2D object representing a two-dimensional rendering context. */
get context() {
this._checkDestroyed();
return this._context;
return this._checkDestroyed(), this._context;
}
_checkDestroyed() {
if (this._canvas === null) {
if (this._canvas === null)
throw new TypeError("The CanvasRenderTarget has already been destroyed");
}
}
}
exports.CanvasRenderTarget = CanvasRenderTarget;
//# sourceMappingURL=CanvasRenderTarget.js.map

@@ -1,52 +0,37 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var BoundingBox = require('./BoundingBox.js');
"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) {
for (let x = 0, index = 4 * y * width; x < width; ++x, index += 4)
if (data[index + 3] !== 0)
return false;
}
return true;
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) {
for (let y = top, index = top * stride + 4 * x; y <= bottom; ++y, index += stride)
if (data[index + 3] !== 0)
return false;
}
return true;
return !1;
return !0;
}
function getCanvasBoundingBox(canvas) {
const { width, height } = canvas;
const context = canvas.getContext("2d", {
willReadFrequently: true
const { width, height } = canvas, context = canvas.getContext("2d", {
willReadFrequently: !0
});
if (context === null) {
if (context === null)
throw new TypeError("Failed to get canvas 2D context");
}
const imageData = context.getImageData(0, 0, width, height);
const data = imageData.data;
let left = 0;
let top = 0;
let right = width - 1;
let bottom = height - 1;
while (top < height && checkRow(data, width, top))
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;
while (checkRow(data, width, bottom))
for (; checkRow(data, width, bottom); )
--bottom;
while (checkColumn(data, width, left, top, bottom))
for (; checkColumn(data, width, left, top, bottom); )
++left;
while (checkColumn(data, width, right, top, bottom))
for (; checkColumn(data, width, right, top, bottom); )
--right;
++right;
++bottom;
return new BoundingBox.BoundingBox(left, top, right, bottom);
return ++right, ++bottom, new BoundingBox.BoundingBox(left, top, right, bottom);
}
exports.getCanvasBoundingBox = getCanvasBoundingBox;
//# sourceMappingURL=getCanvasBoundingBox.js.map

@@ -1,22 +0,20 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var getCanvasBoundingBox = require('./getCanvasBoundingBox.js');
"use strict";
var getCanvasBoundingBox = require("./getCanvasBoundingBox.js");
function trimCanvas(canvas) {
const boundingBox = getCanvasBoundingBox.getCanvasBoundingBox(canvas);
const { width, height } = boundingBox;
const boundingBox = getCanvasBoundingBox.getCanvasBoundingBox(canvas), { width, height } = boundingBox;
let data = null;
if (!boundingBox.isEmpty()) {
const context = canvas.getContext("2d");
if (context === null) {
if (context === null)
throw new TypeError("Failed to get canvas 2D context");
}
data = context.getImageData(boundingBox.left, boundingBox.top, width, height);
data = context.getImageData(
boundingBox.left,
boundingBox.top,
width,
height
);
}
return { width, height, data };
}
exports.trimCanvas = trimCanvas;
//# sourceMappingURL=trimCanvas.js.map

@@ -1,10 +0,6 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var _const = require('../const.js');
"use strict";
var _const = require("../const.js");
function decomposeDataUri(dataUri) {
const dataUriMatch = _const.DATA_URI.exec(dataUri);
if (dataUriMatch) {
if (dataUriMatch)
return {

@@ -17,7 +13,4 @@ mediaType: dataUriMatch[1] ? dataUriMatch[1].toLowerCase() : void 0,

};
}
return void 0;
}
exports.decomposeDataUri = decomposeDataUri;
//# sourceMappingURL=decomposeDataUri.js.map

@@ -1,26 +0,10 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var url = require('../url.js');
let tempAnchor;
function determineCrossOrigin(url$1, loc = globalThis.location) {
if (url$1.startsWith("data:")) {
"use strict";
function determineCrossOrigin(url, loc = globalThis.location) {
if (url.startsWith("data:"))
return "";
}
loc = loc || globalThis.location;
if (!tempAnchor) {
tempAnchor = document.createElement("a");
}
tempAnchor.href = url$1;
const parsedUrl = url.url.parse(tempAnchor.href);
const samePort = !parsedUrl.port && loc.port === "" || parsedUrl.port === loc.port;
if (parsedUrl.hostname !== loc.hostname || !samePort || parsedUrl.protocol !== loc.protocol) {
return "anonymous";
}
return "";
const parsedUrl = new URL(url, document.baseURI);
return parsedUrl.hostname !== loc.hostname || parsedUrl.port !== loc.port || parsedUrl.protocol !== loc.protocol ? "anonymous" : "";
}
exports.determineCrossOrigin = determineCrossOrigin;
//# sourceMappingURL=determineCrossOrigin.js.map

@@ -1,17 +0,9 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
require('../settings.js');
var settings = require('@pixi/settings');
"use strict";
require("../settings.js");
var settings = require("@pixi/settings");
function getResolutionOfUrl(url, defaultValue = 1) {
const resolution = settings.settings.RETINA_PREFIX?.exec(url);
if (resolution) {
return parseFloat(resolution[1]);
}
return defaultValue;
return resolution ? parseFloat(resolution[1]) : defaultValue;
}
exports.getResolutionOfUrl = getResolutionOfUrl;
//# sourceMappingURL=getResolutionOfUrl.js.map

@@ -1,15 +0,9 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var settings = require('@pixi/settings');
"use strict";
var settings = require("@pixi/settings");
function assertPath(path2) {
if (typeof path2 !== "string") {
if (typeof path2 != "string")
throw new TypeError(`Path must be a string. Received ${JSON.stringify(path2)}`);
}
}
function removeUrlParams(url) {
const re = url.split("?")[0];
return re.split("#")[0];
return url.split("?")[0].split("#")[0];
}

@@ -23,64 +17,32 @@ function escapeRegExp(string) {

function normalizeStringPosix(path2, allowAboveRoot) {
let res = "";
let lastSegmentLength = 0;
let lastSlash = -1;
let dots = 0;
let code = -1;
let res = "", lastSegmentLength = 0, lastSlash = -1, dots = 0, code = -1;
for (let i = 0; i <= path2.length; ++i) {
if (i < path2.length) {
if (i < path2.length)
code = path2.charCodeAt(i);
} else if (code === 47) {
break;
} else {
else {
if (code === 47)
break;
code = 47;
}
if (code === 47) {
if (lastSlash === i - 1 || dots === 1) {
} else if (lastSlash !== i - 1 && dots === 2) {
if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 || res.charCodeAt(res.length - 2) !== 46) {
if (res.length > 2) {
const lastSlashIndex = res.lastIndexOf("/");
if (lastSlashIndex !== res.length - 1) {
if (lastSlashIndex === -1) {
res = "";
lastSegmentLength = 0;
} else {
res = res.slice(0, lastSlashIndex);
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
if (!(lastSlash === i - 1 || dots === 1))
if (lastSlash !== i - 1 && dots === 2) {
if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 || res.charCodeAt(res.length - 2) !== 46) {
if (res.length > 2) {
const lastSlashIndex = res.lastIndexOf("/");
if (lastSlashIndex !== res.length - 1) {
lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = i, dots = 0;
continue;
}
lastSlash = i;
dots = 0;
} else if (res.length === 2 || res.length === 1) {
res = "", lastSegmentLength = 0, lastSlash = i, dots = 0;
continue;
}
} else if (res.length === 2 || res.length === 1) {
res = "";
lastSegmentLength = 0;
lastSlash = i;
dots = 0;
continue;
}
}
if (allowAboveRoot) {
if (res.length > 0) {
res += "/..";
} else {
res = "..";
}
lastSegmentLength = 2;
}
} else {
if (res.length > 0) {
res += `/${path2.slice(lastSlash + 1, i)}`;
} else {
res = path2.slice(lastSlash + 1, i);
}
lastSegmentLength = i - lastSlash - 1;
}
lastSlash = i;
dots = 0;
} else if (code === 46 && dots !== -1) {
++dots;
} else {
dots = -1;
}
allowAboveRoot && (res.length > 0 ? res += "/.." : res = "..", lastSegmentLength = 2);
} else
res.length > 0 ? res += `/${path2.slice(lastSlash + 1, i)}` : res = path2.slice(lastSlash + 1, i), lastSegmentLength = i - lastSlash - 1;
lastSlash = i, dots = 0;
} else
code === 46 && dots !== -1 ? ++dots : dots = -1;
}

@@ -90,76 +52,93 @@ return res;

const path = {
/**
* Converts a path to posix format.
* @param path - The path to convert to posix
*/
toPosix(path2) {
return replaceAll(path2, "\\", "/");
},
/**
* Checks if the path is a URL
* @param path - The path to check
*/
isUrl(path2) {
return /^https?:/.test(this.toPosix(path2));
},
/**
* Checks if the path is a data URL
* @param path - The path to check
*/
isDataUrl(path2) {
return /^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(path2);
},
/**
* Checks if the path has a protocol e.g. http://
* This will return true for windows file paths
* @param path - The path to check
*/
hasProtocol(path2) {
return /^[^/:]+:\//.test(this.toPosix(path2));
},
/**
* Returns the protocol of the path e.g. http://, C:/, file:///
* @param path - The path to get the protocol from
*/
getProtocol(path2) {
assertPath(path2);
path2 = this.toPosix(path2);
assertPath(path2), path2 = this.toPosix(path2);
let protocol = "";
const isFile = /^file:\/\/\//.exec(path2);
const isHttp = /^[^/:]+:\/\//.exec(path2);
const isWindows = /^[^/:]+:\//.exec(path2);
const isFile = /^file:\/\/\//.exec(path2), isHttp = /^[^/:]+:\/\//.exec(path2), isWindows = /^[^/:]+:\//.exec(path2);
if (isFile || isHttp || isWindows) {
const arr = isFile?.[0] || isHttp?.[0] || isWindows?.[0];
protocol = arr;
path2 = path2.slice(arr.length);
protocol = arr, path2 = path2.slice(arr.length);
}
return protocol;
},
/**
* Converts URL to an absolute path.
* When loading from a Web Worker, we must use absolute paths.
* If the URL is already absolute we return it as is
* If it's not, we convert it
* @param url - The URL to test
* @param customBaseUrl - The base URL to use
* @param customRootUrl - The root URL to use
*/
toAbsolute(url, customBaseUrl, customRootUrl) {
if (this.isDataUrl(url))
return url;
const baseUrl = removeUrlParams(this.toPosix(customBaseUrl ?? settings.settings.ADAPTER.getBaseUrl()));
const rootUrl = removeUrlParams(this.toPosix(customRootUrl ?? this.rootname(baseUrl)));
assertPath(url);
url = this.toPosix(url);
if (url.startsWith("/")) {
return path.join(rootUrl, url.slice(1));
}
const absolutePath = this.isAbsolute(url) ? url : this.join(baseUrl, url);
return absolutePath;
const baseUrl = removeUrlParams(this.toPosix(customBaseUrl ?? settings.settings.ADAPTER.getBaseUrl())), rootUrl = removeUrlParams(this.toPosix(customRootUrl ?? this.rootname(baseUrl)));
return assertPath(url), url = this.toPosix(url), url.startsWith("/") ? path.join(rootUrl, url.slice(1)) : this.isAbsolute(url) ? url : this.join(baseUrl, url);
},
/**
* Normalizes the given path, resolving '..' and '.' segments
* @param path - The path to normalize
*/
normalize(path2) {
path2 = this.toPosix(path2);
assertPath(path2);
if (path2.length === 0)
if (path2 = this.toPosix(path2), assertPath(path2), path2.length === 0)
return ".";
let protocol = "";
const isAbsolute = path2.startsWith("/");
if (this.hasProtocol(path2)) {
protocol = this.rootname(path2);
path2 = path2.slice(protocol.length);
}
this.hasProtocol(path2) && (protocol = this.rootname(path2), path2 = path2.slice(protocol.length));
const trailingSeparator = path2.endsWith("/");
path2 = normalizeStringPosix(path2, false);
if (path2.length > 0 && trailingSeparator)
path2 += "/";
if (isAbsolute)
return `/${path2}`;
return protocol + path2;
return path2 = normalizeStringPosix(path2, !1), path2.length > 0 && trailingSeparator && (path2 += "/"), isAbsolute ? `/${path2}` : protocol + path2;
},
/**
* Determines if path is an absolute path.
* Absolute paths can be urls, data urls, or paths on disk
* @param path - The path to test
*/
isAbsolute(path2) {
assertPath(path2);
path2 = this.toPosix(path2);
if (this.hasProtocol(path2))
return true;
return path2.startsWith("/");
return assertPath(path2), path2 = this.toPosix(path2), this.hasProtocol(path2) ? !0 : path2.startsWith("/");
},
/**
* Joins all given path segments together using the platform-specific separator as a delimiter,
* then normalizes the resulting path
* @param segments - The segments of the path to join
*/
join(...segments) {
if (segments.length === 0) {
if (segments.length === 0)
return ".";
}
let joined;
for (let i = 0; i < segments.length; ++i) {
const arg = segments[i];
assertPath(arg);
if (arg.length > 0) {
if (assertPath(arg), arg.length > 0)
if (joined === void 0)

@@ -169,18 +148,13 @@ joined = arg;

const prevArg = segments[i - 1] ?? "";
if (this.extname(prevArg)) {
joined += `/../${arg}`;
} else {
joined += `/${arg}`;
}
this.extname(prevArg) ? joined += `/../${arg}` : joined += `/${arg}`;
}
}
}
if (joined === void 0) {
return ".";
}
return this.normalize(joined);
return joined === void 0 ? "." : this.normalize(joined);
},
/**
* Returns the directory name of a path
* @param path - The path to parse
*/
dirname(path2) {
assertPath(path2);
if (path2.length === 0)
if (assertPath(path2), path2.length === 0)
return ".";

@@ -190,10 +164,7 @@ path2 = this.toPosix(path2);

const hasRoot = code === 47;
let end = -1;
let matchedSlash = true;
const proto = this.getProtocol(path2);
const origpath = path2;
let end = -1, matchedSlash = !0;
const proto = this.getProtocol(path2), origpath = path2;
path2 = path2.slice(proto.length);
for (let i = path2.length - 1; i >= 1; --i) {
code = path2.charCodeAt(i);
if (code === 47) {
for (let i = path2.length - 1; i >= 1; --i)
if (code = path2.charCodeAt(i), code === 47) {
if (!matchedSlash) {

@@ -203,46 +174,31 @@ end = i;

}
} else {
matchedSlash = false;
}
}
if (end === -1)
return hasRoot ? "/" : this.isUrl(origpath) ? proto + path2 : proto;
if (hasRoot && end === 1)
return "//";
return proto + path2.slice(0, end);
} else
matchedSlash = !1;
return end === -1 ? hasRoot ? "/" : this.isUrl(origpath) ? proto + path2 : proto : hasRoot && end === 1 ? "//" : proto + path2.slice(0, end);
},
/**
* Returns the root of the path e.g. /, C:/, file:///, http://domain.com/
* @param path - The path to parse
*/
rootname(path2) {
assertPath(path2);
path2 = this.toPosix(path2);
assertPath(path2), path2 = this.toPosix(path2);
let root = "";
if (path2.startsWith("/"))
root = "/";
else {
root = this.getProtocol(path2);
}
if (this.isUrl(path2)) {
if (path2.startsWith("/") ? root = "/" : root = this.getProtocol(path2), this.isUrl(path2)) {
const index = path2.indexOf("/", root.length);
if (index !== -1) {
root = path2.slice(0, index);
} else
root = path2;
if (!root.endsWith("/"))
root += "/";
index !== -1 ? root = path2.slice(0, index) : root = path2, root.endsWith("/") || (root += "/");
}
return root;
},
/**
* Returns the last portion of a path
* @param path - The path to test
* @param ext - Optional extension to remove
*/
basename(path2, ext) {
assertPath(path2);
if (ext)
assertPath(ext);
path2 = removeUrlParams(this.toPosix(path2));
let start = 0;
let end = -1;
let matchedSlash = true;
let i;
assertPath(path2), ext && assertPath(ext), path2 = removeUrlParams(this.toPosix(path2));
let start = 0, end = -1, matchedSlash = !0, i;
if (ext !== void 0 && ext.length > 0 && ext.length <= path2.length) {
if (ext.length === path2.length && ext === path2)
return "";
let extIdx = ext.length - 1;
let firstNonSlashEnd = -1;
let extIdx = ext.length - 1, firstNonSlashEnd = -1;
for (i = path2.length - 1; i >= 0; --i) {

@@ -255,26 +211,8 @@ const code = path2.charCodeAt(i);

}
} else {
if (firstNonSlashEnd === -1) {
matchedSlash = false;
firstNonSlashEnd = i + 1;
}
if (extIdx >= 0) {
if (code === ext.charCodeAt(extIdx)) {
if (--extIdx === -1) {
end = i;
}
} else {
extIdx = -1;
end = firstNonSlashEnd;
}
}
}
} else
firstNonSlashEnd === -1 && (matchedSlash = !1, firstNonSlashEnd = i + 1), extIdx >= 0 && (code === ext.charCodeAt(extIdx) ? --extIdx === -1 && (end = i) : (extIdx = -1, end = firstNonSlashEnd));
}
if (start === end)
end = firstNonSlashEnd;
else if (end === -1)
end = path2.length;
return path2.slice(start, end);
return start === end ? end = firstNonSlashEnd : end === -1 && (end = path2.length), path2.slice(start, end);
}
for (i = path2.length - 1; i >= 0; --i) {
for (i = path2.length - 1; i >= 0; --i)
if (path2.charCodeAt(i) === 47) {

@@ -285,19 +223,15 @@ if (!matchedSlash) {

}
} else if (end === -1) {
matchedSlash = false;
end = i + 1;
}
}
if (end === -1)
return "";
return path2.slice(start, end);
} else
end === -1 && (matchedSlash = !1, end = i + 1);
return end === -1 ? "" : path2.slice(start, end);
},
/**
* Returns the extension of the path, from the last occurrence of the . (period) character to end of string in the last
* portion of the path. If there is no . in the last portion of the path, or if there are no . characters other than
* the first character of the basename of path, an empty string is returned.
* @param path - The path to parse
*/
extname(path2) {
assertPath(path2);
path2 = removeUrlParams(this.toPosix(path2));
let startDot = -1;
let startPart = 0;
let end = -1;
let matchedSlash = true;
let preDotState = 0;
assertPath(path2), path2 = removeUrlParams(this.toPosix(path2));
let startDot = -1, startPart = 0, end = -1, matchedSlash = !0, preDotState = 0;
for (let i = path2.length - 1; i >= 0; --i) {

@@ -312,20 +246,10 @@ const code = path2.charCodeAt(i);

}
if (end === -1) {
matchedSlash = false;
end = i + 1;
}
if (code === 46) {
if (startDot === -1)
startDot = i;
else if (preDotState !== 1)
preDotState = 1;
} else if (startDot !== -1) {
preDotState = -1;
}
end === -1 && (matchedSlash = !1, end = i + 1), code === 46 ? startDot === -1 ? startDot = i : preDotState !== 1 && (preDotState = 1) : startDot !== -1 && (preDotState = -1);
}
if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
return "";
}
return path2.slice(startDot, end);
return startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1 ? "" : path2.slice(startDot, end);
},
/**
* Parses a path into an object containing the 'root', `dir`, `base`, `ext`, and `name` properties.
* @param path - The path to parse
*/
parse(path2) {

@@ -341,17 +265,6 @@ assertPath(path2);

const protocol = "";
ret.root = this.rootname(path2);
if (isAbsolute || this.hasProtocol(path2)) {
start = 1;
} else {
start = 0;
}
let startDot = -1;
let startPart = 0;
let end = -1;
let matchedSlash = true;
let i = path2.length - 1;
let preDotState = 0;
ret.root = this.rootname(path2), isAbsolute || this.hasProtocol(path2) ? start = 1 : start = 0;
let startDot = -1, startPart = 0, end = -1, matchedSlash = !0, i = path2.length - 1, preDotState = 0;
for (; i >= start; --i) {
code = path2.charCodeAt(i);
if (code === 47) {
if (code = path2.charCodeAt(i), code === 47) {
if (!matchedSlash) {

@@ -363,36 +276,5 @@ startPart = i + 1;

}
if (end === -1) {
matchedSlash = false;
end = i + 1;
}
if (code === 46) {
if (startDot === -1)
startDot = i;
else if (preDotState !== 1)
preDotState = 1;
} else if (startDot !== -1) {
preDotState = -1;
}
end === -1 && (matchedSlash = !1, end = i + 1), code === 46 ? startDot === -1 ? startDot = i : preDotState !== 1 && (preDotState = 1) : startDot !== -1 && (preDotState = -1);
}
if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
if (end !== -1) {
if (startPart === 0 && isAbsolute)
ret.base = ret.name = path2.slice(1, end);
else
ret.base = ret.name = path2.slice(startPart, end);
}
} else {
if (startPart === 0 && isAbsolute) {
ret.name = path2.slice(1, startDot);
ret.base = path2.slice(1, end);
} else {
ret.name = path2.slice(startPart, startDot);
ret.base = path2.slice(startPart, end);
}
ret.ext = path2.slice(startDot, end);
}
ret.dir = this.dirname(path2);
if (protocol)
ret.dir = protocol + ret.dir;
return ret;
return startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1 ? end !== -1 && (startPart === 0 && isAbsolute ? ret.base = ret.name = path2.slice(1, end) : ret.base = ret.name = path2.slice(startPart, end)) : (startPart === 0 && isAbsolute ? (ret.name = path2.slice(1, startDot), ret.base = path2.slice(1, end)) : (ret.name = path2.slice(startPart, startDot), ret.base = path2.slice(startPart, end)), ret.ext = path2.slice(startDot, end)), ret.dir = this.dirname(path2), protocol && (ret.dir = protocol + ret.dir), ret;
},

@@ -402,4 +284,3 @@ sep: "/",

};
exports.path = path;
//# sourceMappingURL=path.js.map

@@ -1,14 +0,11 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var settings = require('@pixi/settings');
"use strict";
var settings = require("@pixi/settings");
settings.settings.RETINA_PREFIX = /@([0-9\.]+)x/;
settings.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT = false;
Object.defineProperty(exports, 'settings', {
enumerable: true,
get: function () { return settings.settings; }
settings.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT = !1;
Object.defineProperty(exports, "settings", {
enumerable: !0,
get: function() {
return settings.settings;
}
});
//# sourceMappingURL=settings.js.map

@@ -1,3 +0,2 @@

'use strict';
"use strict";
//# sourceMappingURL=index.js.map

@@ -53,6 +53,15 @@ interface ParsedUrlQuery {

export declare const url: {
parse: ParseFunction;
format: FormatFunction;
resolve: ResolveFunction;
/**
* @deprecated since 7.3.0
*/
readonly parse: ParseFunction;
/**
* @deprecated since 7.3.0
*/
readonly format: FormatFunction;
/**
* @deprecated since 7.3.0
*/
readonly resolve: ResolveFunction;
};
export {};

@@ -1,14 +0,24 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var url$1 = require('url');
"use strict";
var url$1 = require("url"), deprecation = require("./logging/deprecation.js");
const url = {
parse: url$1.parse,
format: url$1.format,
resolve: url$1.resolve
/**
* @deprecated since 7.3.0
*/
get parse() {
return deprecation.deprecation("7.3.0", "utils.url.parse is deprecated, use native URL API instead."), url$1.parse;
},
/**
* @deprecated since 7.3.0
*/
get format() {
return deprecation.deprecation("7.3.0", "utils.url.format is deprecated, use native URL API instead."), url$1.format;
},
/**
* @deprecated since 7.3.0
*/
get resolve() {
return deprecation.deprecation("7.3.0", "utils.url.resolve is deprecated, use native URL API instead."), url$1.resolve;
}
};
exports.url = url;
//# sourceMappingURL=url.js.map
{
"name": "@pixi/utils",
"version": "7.2.4",
"version": "7.3.0-rc",
"main": "lib/index.js",

@@ -39,5 +39,5 @@ "module": "lib/index.mjs",

"dependencies": {
"@pixi/color": "7.2.4",
"@pixi/constants": "7.2.4",
"@pixi/settings": "7.2.4",
"@pixi/color": "7.3.0-rc",
"@pixi/constants": "7.3.0-rc",
"@pixi/settings": "7.3.0-rc",
"@types/earcut": "^2.1.0",

@@ -44,0 +44,0 @@ "earcut": "^2.2.4",

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

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

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

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

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

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

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

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

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

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

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

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

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

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