JavaScript
// set up global javascript variables
var canvas, gl; // canvas and webgl context
var shaderScript;
var shaderSource;
var vertexShader; // Vertex shader. Not much happens in that shader, it just creates the vertex's to be drawn on
var fragmentShader; // this shader is where the magic happens. Fragment = pixel. Vertex = kind of like "faces" on a 3d model.
var buffer;
/* Variables holding the location of uniform variables in the WebGL. We use this to send info to the WebGL script. */
var locationOfTime;
var locationOfResolution;
var startTime = new Date().getTime(); // Get start time for animating
var currentTime = 0;
function init() {
// standard canvas setup here, except get webgl context
canvas = document.getElementById('glscreen');
gl = canvas.ge