nano-pow 5.1.12 → 5.1.14

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/bin/cli.js CHANGED
@@ -92,7 +92,7 @@ Object.defineProperty(webgl, "isSupported", {
92
92
  let isWebglSupported = false;
93
93
  try {
94
94
  const gl = new OffscreenCanvas(0, 0)?.getContext?.("webgl2");
95
- isWebglSupported = gl instanceof WebGL2RenderingContext;
95
+ isWebglSupported = gl instanceof WebGL2RenderingContext && !gl.isContextLost();
96
96
  } catch (err) {
97
97
  console.warn("WebGL is not supported in this environment.\n", err);
98
98
  isWebglSupported = false;
@@ -95,7 +95,7 @@ Object.defineProperty(webgl, "isSupported", {
95
95
  let isWebglSupported = false;
96
96
  try {
97
97
  const gl = new OffscreenCanvas(0, 0)?.getContext?.("webgl2");
98
- isWebglSupported = gl instanceof WebGL2RenderingContext;
98
+ isWebglSupported = gl instanceof WebGL2RenderingContext && !gl.isContextLost();
99
99
  } catch (err) {
100
100
  console.warn("WebGL is not supported in this environment.\n", err);
101
101
  isWebglSupported = false;
package/dist/main.min.js CHANGED
@@ -101,7 +101,7 @@ Object.defineProperty(webgl, "isSupported", {
101
101
  let isWebglSupported = false;
102
102
  try {
103
103
  const gl2 = new OffscreenCanvas(0, 0)?.getContext?.("webgl2");
104
- isWebglSupported = gl2 instanceof WebGL2RenderingContext;
104
+ isWebglSupported = gl2 instanceof WebGL2RenderingContext && !gl2.isContextLost();
105
105
  } catch (err) {
106
106
  console.warn("WebGL is not supported in this environment.\n", err);
107
107
  isWebglSupported = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nano-pow",
3
- "version": "5.1.12",
3
+ "version": "5.1.14",
4
4
  "description": "Proof-of-work generation and validation with WebGPU/WebGL/WASM for Nano cryptocurrency.",
5
5
  "keywords": [
6
6
  "nemo",
@@ -17,7 +17,7 @@
17
17
  "webgl",
18
18
  "webgl2"
19
19
  ],
20
- "homepage": "https://codecow.com",
20
+ "homepage": "https://git.codecow.com/?p=nano-pow.git",
21
21
  "bugs": "bug-nano-pow@codecow.com",
22
22
  "license": "(GPL-3.0-or-later AND MIT)",
23
23
  "author": "Chris Duncan <chris@codecow.com>",