nano-pow 5.1.11 → 5.1.12

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.
Files changed (2) hide show
  1. package/dist/main.min.js +2 -1
  2. package/package.json +1 -1
package/dist/main.min.js CHANGED
@@ -838,7 +838,8 @@ function createCanvas(size) {
838
838
  });
839
839
  if (context == null) throw new Error("WebGL 2 is required");
840
840
  gl = context;
841
- size = Math.min(size, ...gl.getParameter(gl.MAX_VIEWPORT_DIMS));
841
+ const MAX_VIEWPORT_DIMS = gl.getParameter(gl.MAX_VIEWPORT_DIMS) ?? [4096, 4096];
842
+ size = Math.min(size, ...MAX_VIEWPORT_DIMS);
842
843
  size = Math.floor(size / 256) * 256;
843
844
  canvas.height = canvas.width = size;
844
845
  if (canvas.height !== gl.drawingBufferHeight || canvas.width !== gl.drawingBufferWidth) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nano-pow",
3
- "version": "5.1.11",
3
+ "version": "5.1.12",
4
4
  "description": "Proof-of-work generation and validation with WebGPU/WebGL/WASM for Nano cryptocurrency.",
5
5
  "keywords": [
6
6
  "nemo",