             dist = vec3(0,h,0);
          else
             dist = vec3(0,0,h);
+            
          // ----
          // Quick fix to defy perspective correction
          dist *= gl_Position.w;

          # vertex A, there are two opposite vertices B and C that must also
          # be sent down, and these opposite vertices will be different at each
          # index.
          _mesh = new Jax.Mesh.Base
            init: (vertices, colors, textures, normals) ->
              for i in [0...mesh.data.indexBuffer.length] by 3
                v1 = mesh.data.indexBuffer[i] * 3
                v2 = mesh.data.indexBuffer[i+1] * 3
                v3 = mesh.data.indexBuffer[i+2] * 3
                c = mesh.data.indexBuffer[i] * 4
                t = mesh.data.indexBuffer[i] * 2
                vertices.push mesh.data.vertexBuffer[v1+0], mesh.data.vertexBuffer[v1+1], mesh.data.vertexBuffer[v1+2]
                normals.push mesh.data.normalBuffer[v1+0], mesh.data.normalBuffer[v1+1], mesh.data.normalBuffer[v1+2]
                colors.push mesh.data.colorBuffer[c], mesh.data.colorBuffer[c+1], mesh.data.colorBuffer[c+2], mesh.data.colorBuffer[c+3]
                textures.push mesh.data.textureCoordsBuffer[t], mesh.data.textureCoordsBuffer[c+1]
                buf2[i*4] = mesh.data.vertexBuffer[v2+0]
                buf2[i*4+1] = mesh.data.vertexBuffer[v2+1]
                buf2[i*4+2] = mesh.data.vertexBuffer[v2+2]
                buf2[i*4+3] = 0
                buf3[i*3] = mesh.data.vertexBuffer[v3+0]
                buf3[i*3+1] = mesh.data.vertexBuffer[v3+1]
                buf3[i*3+2] = mesh.data.vertexBuffer[v3+2]
                vertices.push mesh.data.vertexBuffer[v2+0], mesh.data.vertexBuffer[v2+1], mesh.data.vertexBuffer[v2+2]
                buf2[(i+1)*4] = mesh.data.vertexBuffer[v3+0]
                buf2[(i+1)*4+1] = mesh.data.vertexBuffer[v3+1]
                buf2[(i+1)*4+2] = mesh.data.vertexBuffer[v3+2]
                buf2[(i+1)*4+3] = 1
                buf3[(i+1)*3] = mesh.data.vertexBuffer[v1+0]
                buf3[(i+1)*3+1] = mesh.data.vertexBuffer[v1+1]
                buf3[(i+1)*3+2] = mesh.data.vertexBuffer[v1+2]
                vertices.push mesh.data.vertexBuffer[v3+0], mesh.data.vertexBuffer[v3+1], mesh.data.vertexBuffer[v3+2]
                buf2[(i+2)*4] = mesh.data.vertexBuffer[v1+0]
                buf2[(i+2)*4+1] = mesh.data.vertexBuffer[v1+1]
                buf2[(i+2)*4+2] = mesh.data.vertexBuffer[v1+2]
                buf2[(i+2)*4+3] = 2
                buf3[(i+2)*3] = mesh.data.vertexBuffer[v2+0]
                buf3[(i+2)*3+1] = mesh.data.vertexBuffer[v2+1]
                buf3[(i+2)*3+2] = mesh.data.vertexBuffer[v2+2]
              console.log vertices, buf2
          _mesh.validate() # make sure the mesh data has been built
          # now we will swap the original mesh's data with the newly-built mesh data
          mesh.data = _mesh.data
          # reassign the context to the data so that it knows where to send the vertices
          mesh.data.context = context
          @_p2verts = new Jax.Buffer GL_ARRAY_BUFFER, null, GL_STREAM_DRAW, buf2, 4
          @_p3verts = new Jax.Buffer GL_ARRAY_BUFFER, null, GL_STREAM_DRAW, buf3, 3

    }, material
    tpmesh.material = material
    
    # @world.addLight new Jax.Light.Directional
    
    @world.ambientColor = [1,1,1,1]
    @world.addObject new Jax.Framerate ema: no
    @world.addObject new Jax.Model 
      position: [0, 0, -3]
      mesh: tpmesh
      update: (tc) -> @camera.rotate tc, 1, 0.75, 0.5
