Files
nothoughts/node_modules/pixi.js/lib/utils/logging/deprecation.mjs
2025-08-04 18:57:35 +02:00

36 lines
1007 B
JavaScript

"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