@@ -5,17 +5,17 @@ module Graphics.WebGL where
55-}
66
77import Basics (Float)
8−import MJS (V3)
8+import MJS (V3,M4x4)
9+import Color (Color)
910import Graphics.Element (Element)
1011import Native.Graphics.WebGL
1112
12−type GLTriangle = { a: V3, b: V3, c: V3 }
13−type GLColor = V3
14−type Model = [(GLColor,GLTriangle)]
13+type GLPoint = (V3,Color)
14+type GLTriangle = { a: GLPoint, b: GLPoint, c: GLPoint }
15+type Model = [GLTriangle]
1516
16−data Transform = NoTransform
17−
18−data Scene = Node Transform [Scene] | Leaf Model
17+data Scene = Node M4x4 [Scene] | Leaf Model
1918
2019glContext : Int -> Int -> Scene -> Element
2120glContext = Native.Graphics.WebGL.glContext
21+