export function createShaderProgram(gl, vs, fs) {
  var program = gl.createProgram();

  function createShader(type, source) {
    var shader = gl.createShader(type);
    gl.shaderSource(shader, source);
    gl.compileShader(shader);
    gl.attachShader(program, shader);
  }

  createShader(gl.VERTEX_SHADER, vs);
  createShader(gl.FRAGMENT_SHADER, fs);

  gl.linkProgram(program);

  return program;
}

export function setFloat32Attribute(gl, program, name, size, array) {
  gl.bindBuffer(gl.ARRAY_BUFFER, gl.createBuffer());
  gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(array), gl.STATIC_DRAW);

  var location = gl.getAttribLocation(program, name);
  gl.enableVertexAttribArray(location);
  gl.vertexAttribPointer(location, size, gl.FLOAT, false, 0, 0);
}

export function createIndicesBuffer(gl, indices) {
  var indicesBuffer = gl.createBuffer();
  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indicesBuffer);
  gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(indices), gl.STATIC_DRAW);
  return indicesBuffer;
}

export function setMat4Uniform(gl, program, name, array) {
  var location = gl.getUniformLocation(program, name);
  gl.uniformMatrix4fv(location, false, array);
}

@@ -779,247 +779,151 @@
 ion 
-createIndicesBuffer(gl, indices) %7B%0A  var indicesBuffer = gl.createBuffer();%0A  gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indicesBuffer);%0A  gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(indices), gl.STATIC_DRAW);%0A  return indicesBuffer
+setMat4Uniform(gl, program, name, array) %7B%0A  var location = gl.getUniformLocation(program, name);%0A  gl.uniformMatrix4fv(location, false, array)
 ;%0A%7D%0A
@@ -934,36 +934,36 @@
 ort function set
-Mat4
+Vec3
 Uniform(gl, prog
@@ -965,37 +965,39 @@
  program, name, 
-array
+x, y, z
 ) %7B%0A  var locati
@@ -1047,33 +1047,26 @@
   gl.uniform
-Matrix4fv
+3f
 (location, f
@@ -1060,29 +1060,24 @@
 f(location, 
-false, array
+x, y, z
 );%0A%7D%0A

Add setVec3Uniform and remove createIndicesBuffer