JSFiddle - React, Tailwind, and code Playground
HTML
<canvas></canvas>
CSS
canvas{
width: 100%:
height: 100%:
}
JavaScript
const canvas = document.querySelector('canvas');
const gl = canvas.getContext('webgl');
if (!gl) {
console.error('WebGL is not supported.');
} else {
const maxTextureSize = gl.getParameter(gl.MAX_TEXTURE_SIZE);
console.log('Maximum texture size:', maxTextureSize);
}