function main() {

// Get A WebGL context

/** @type {HTMLCanvasElement} */

const canvas = document.querySelector('#canvas');

const gl = canvas.getContext('webgl');

if (!gl) {

return;

}

 

const ext = gl.getExtension('WEBGL_depth_texture');

if (!ext) {

return alert('need WEBGL_depth_texture');

}

