function draw() {
gl.clearColor(1., 1., 1., 1.);
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
gl.bindVertexArray(vao)
{
gl.uniform2f(uniformLocations.resolution, width, height);
gl.uniform4fv(uniformLocations.color, new Float32Array(data.color));
gl.uniformMatrix4fv(uniformLocations.transform, false, new Float32Array(transform));
}
gl.useProgram(program);
const offset = 0;
const vertexCount = 6;
const indexType = gl.UNSIGNED_SHORT;
gl.drawElements(gl.TRIANGLES, vertexCount, indexType, offset)
}