Created
August 3, 2025 09:27
-
-
Save goldenratio/e8c599202effa2c8943ac9556df3133f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.querySelectorAll('canvas').forEach((canvas, i) => { | |
const ctx2d = canvas.getContext('2d'); | |
const ctxWebGL = canvas.getContext('webgl') || canvas.getContext('webgl2'); | |
console.log(`Canvas ${i}:`, { | |
'2D': !!ctx2d, | |
'WebGL': !!ctxWebGL | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment