ar tex = null;
const width = 1024;
const height = 1024;

function setSize(width, height) {
    sourceCanvas3D.width = width;
    sourceCanvas3D.height = height;
    destCanvas3D.width = width;
    destCanvas3D.height = height;
}

function rand(range) {
    return Math.floor(Math.random() * range);
}

function renderWebGL(gl) {
    gl.disable(gl.SCISSOR_TEST);
    gl.clear(gl.COLOR_BUFER_BIT);
    gl.enable(gl.SCISSOR_TEST);
    gl.scissor(rand(width), rand(height), rand(width), rand(height));
    gl.clearCo