lib/gamnit: fix `cube::tex_coords`
authorAlexis Laferrière <alexis.laf@xymus.net>
Thu, 21 Jan 2016 16:27:50 +0000 (11:27 -0500)
committerAlexis Laferrière <alexis.laf@xymus.net>
Fri, 20 May 2016 20:15:19 +0000 (16:15 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/gamnit/depth/more_meshes.nit

index 9f2318a..569973b 100644 (file)
@@ -124,7 +124,8 @@ class Cube
                var d = [1.0, 0.0]
 
                var texture_coords = new Array[Float]
-               for v in [c, d, a, a, d, b] do for i in 6.times do texture_coords.add_all v
+               var face = [a, c, d, a, d, b]
+               for i in 6.times do for v in face do texture_coords.add_all v
                return texture_coords
        end