@chromatic-coherence/generative-charts-3d 0.12.1 → 0.12.2
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/index.js +5 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -766,6 +766,11 @@ export class World {
|
|
|
766
766
|
c();
|
|
767
767
|
this.cleanup = [];
|
|
768
768
|
this.overlay.remove();
|
|
769
|
+
// Release the GL context NOW — browsers cap live WebGL contexts per page (~16) and only
|
|
770
|
+
// reclaim them at GC, so a page that builds and disposes many worlds otherwise exhausts
|
|
771
|
+
// the pool and every later createWorld fails. A lost context is permanently dead on its
|
|
772
|
+
// canvas: mount a fresh canvas to build again.
|
|
773
|
+
this.gl.getExtension("WEBGL_lose_context")?.loseContext();
|
|
769
774
|
}
|
|
770
775
|
}
|
|
771
776
|
export function createWorld(o) { return new World(o); }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chromatic-coherence/generative-charts-3d",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"description": "The second generative-charts engine — the same API as generative-charts-2d, rendered on WebGL: a real depth buffer (occlusion exact, always on, for solids and light) and per-pixel Lambert + point lights. Zero dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|