function getExtension(gl, name) {
  var exts = extensions.filter(function (e) {
    return e[0] === gl;
  })[0];
  exts = exts && exts[1];
  if (!exts) {
    extensions.push([gl, {}]);
    exts = extensions[extensions.length - 1][1];
  }
  if (!exts[name]) {
    exts[name] = gl.getExtension(name);
  }
  return exts[name];
}
Expand a single value or 3-element array into a 4-element array, with the last (e.g. w or a)
    coordinate defaulting to 1 (with option to specify). Also runs parseFloat to try to maintain
    data integrity. Returns null if input couldn't be parsed.