@esotericsoftware/spine-phaser-v3 4.2.92 → 4.2.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/spine-phaser-v3.min.mjs +1 -1
- package/dist/esm/spine-phaser-v3.mjs +8 -8
- package/dist/esm/spine-phaser-v3.mjs.map +2 -2
- package/dist/iife/spine-phaser-v3.js +8 -8
- package/dist/iife/spine-phaser-v3.js.map +2 -2
- package/dist/iife/spine-phaser-v3.min.js +1 -1
- package/package.json +4 -4
|
@@ -11537,10 +11537,10 @@ var SkeletonRenderer = class _SkeletonRenderer {
|
|
|
11537
11537
|
var ManagedWebGLRenderingContext = class {
|
|
11538
11538
|
canvas;
|
|
11539
11539
|
gl;
|
|
11540
|
-
restorables =
|
|
11541
|
-
constructor(canvasOrContext, contextConfig = { alpha:
|
|
11540
|
+
restorables = [];
|
|
11541
|
+
constructor(canvasOrContext, contextConfig = { alpha: true }) {
|
|
11542
11542
|
if (!(canvasOrContext instanceof WebGLRenderingContext || typeof WebGL2RenderingContext !== "undefined" && canvasOrContext instanceof WebGL2RenderingContext)) {
|
|
11543
|
-
|
|
11543
|
+
const canvas = canvasOrContext;
|
|
11544
11544
|
this.gl = canvas.getContext("webgl2", contextConfig) || canvas.getContext("webgl", contextConfig);
|
|
11545
11545
|
this.canvas = canvas;
|
|
11546
11546
|
canvas.addEventListener("webglcontextlost", this.contextLostHandler);
|
|
@@ -11550,13 +11550,13 @@ var ManagedWebGLRenderingContext = class {
|
|
|
11550
11550
|
this.canvas = this.gl.canvas;
|
|
11551
11551
|
}
|
|
11552
11552
|
}
|
|
11553
|
-
contextLostHandler(e) {
|
|
11553
|
+
contextLostHandler = (e) => {
|
|
11554
11554
|
if (e) e.preventDefault();
|
|
11555
|
-
}
|
|
11556
|
-
contextRestoredHandler(
|
|
11555
|
+
};
|
|
11556
|
+
contextRestoredHandler = () => {
|
|
11557
11557
|
for (let i = 0, n = this.restorables.length; i < n; i++)
|
|
11558
11558
|
this.restorables[i].restore();
|
|
11559
|
-
}
|
|
11559
|
+
};
|
|
11560
11560
|
dispose() {
|
|
11561
11561
|
this.canvas.removeEventListener("webglcontextlost", this.contextLostHandler);
|
|
11562
11562
|
this.canvas.removeEventListener("webglcontextrestored", this.contextRestoredHandler);
|
|
@@ -11565,7 +11565,7 @@ var ManagedWebGLRenderingContext = class {
|
|
|
11565
11565
|
this.restorables.push(restorable);
|
|
11566
11566
|
}
|
|
11567
11567
|
removeRestorable(restorable) {
|
|
11568
|
-
|
|
11568
|
+
const index = this.restorables.indexOf(restorable);
|
|
11569
11569
|
if (index > -1) this.restorables.splice(index, 1);
|
|
11570
11570
|
}
|
|
11571
11571
|
};
|