I have a problem with drawing a cube (12 triangles) on a HTML canvas. I have all the connections between the vertexes stored in an array connections ([0,1,2 ,0,2,3