Once again, initialization happens just once when the HTML finishes loading. It is invoked by the onload
event on the <body>
element.
The initialization of the interactive renderer is largely identical to the minimal application, though with two additional steps…
var canvas
var gl
canvas.onmousedown = onmousedown
canvas.onmouseup = onmouseup
canvas.onmousemove = onmousemove