otate(mat, time * (0.1 + 0.1 * ndx), mat);

      const color = colors[ndx];

      gl.uniform4fv(colorLoc, color);
      gl.uniformMatrix4fv(matrixLoc, false, mat);

      gl.drawArrays(
          gl.TRIANGLES,
          0,             // offset
          numVertices,   // num vertices per instance
      );
    });

    requestAnimationFrame(render);
  }
  requestAnimationFrame(render);
}

main();
</script>
</html>



