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.
- package/dist/main.min.js +2 -1
- 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
|
-
|
|
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) {
|