JS functions to display 2D graphics in WebGL canvas.