@@ -102,7 +102,7 @@ Elm.Native.Graphics.WebGL.make = function(elm) {
102102
103103 function drawScene(scene,n) {
104104 switch(scene.ctor) {
105− case 'Leaf':
105+ case 'SceneLeaf':
106106 drawMesh(scene._0, sceneMatrixStack[n]);
107107 break;
108108 default:
@@ -137,7 +137,7 @@ Elm.Native.Graphics.WebGL.make = function(elm) {
137137 drawGL(newModel)
138138 }
139139
140− function glContext(w,h) {
140+ function makeGL(w,h) {
141141 var node = newNode('canvas');
142142 var gl = node.getContext('webgl');
143143 var programPtr = createProgram(gl, geoVert, geoFrag);
@@ -153,7 +153,7 @@ Elm.Native.Graphics.WebGL.make = function(elm) {
153153 return Signal.constant({w:w,h:h,gl:gl,node:node,program:program});
154154 }
155155
156− function bindMesh(triangles, context) {
156+ function bufferMesh(triangles, context) {
157157 var indices = [];
158158 var positions = [];
159159 var colors = [];
@@ -161,10 +161,9 @@ Elm.Native.Graphics.WebGL.make = function(elm) {
161161 function pushTriangle(n, node) {
162162 if (node.ctor === "[]") return;
163163 var tri = node._0;
164− var names = ['a','b','c'];
165164 for (var i = 0; i < 3; i+= 1) {
166165 indices.push(3 * n + i);
167− var vertex = tri[names[i]];
166+ var vertex = tri['_' + i];
168167 for (var j = 0; j < 3; j += 1) {
169168 positions.push(vertex.pos[j]);
170169 }
@@ -201,7 +200,7 @@ Elm.Native.Graphics.WebGL.make = function(elm) {
201200
202201 }
203202
204− function renderGL(context, scene) {
203+ function webgl(context, scene) {
205204
206205 return A3(newElement, context.w, context.h, {
207206 ctor: 'Custom',
@@ -220,9 +219,9 @@ Elm.Native.Graphics.WebGL.make = function(elm) {
220219 }
221220
222221 return elm.Native.Graphics.WebGL.values = {
223− glContext:F2(glContext),
224− bindMesh:F2(bindMesh),
225− renderGL:F2(renderGL),
222+ makeGL:F2(makeGL),
223+ bufferMesh:F2(bufferMesh),
224+ webgl:F2(webgl),
226225 };
227226
228227};