sdfsdfs
This commit is contained in:
35
node_modules/pixi.js/lib/utils/logging/deprecation.mjs
generated
vendored
Normal file
35
node_modules/pixi.js/lib/utils/logging/deprecation.mjs
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
"use strict";
|
||||
const warnings = {};
|
||||
const v8_0_0 = "8.0.0";
|
||||
const v8_3_4 = "8.3.4";
|
||||
function deprecation(version, message, ignoreDepth = 3) {
|
||||
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;
|
||||
}
|
||||
|
||||
export { deprecation, v8_0_0, v8_3_4 };
|
||||
//# sourceMappingURL=deprecation.mjs.map
|
Reference in New Issue
Block a user