@@ -5,17 +5,17 @@ module Graphics.WebGL where
7import Basics (Float)
7import Basics (Float)
8−import MJS (V3)
8+import MJS (V3,M4x4)
9import Graphics.Element (Element)
10import Graphics.Element (Element)
10import Native.Graphics.WebGL
11import Native.Graphics.WebGL
13+type GLPoint = (V3,Color)
12−type GLTriangle = { a: V3, b: V3, c: V3 }
14+type GLTriangle = { a: GLPoint, b: GLPoint, c: GLPoint }
14−type Model = [(GLColor,GLTriangle)]
15+type Model = [GLTriangle]
16−data Transform = NoTransform
18−data Scene = Node Transform [Scene] | Leaf Model
17+data Scene = Node M4x4 [Scene] | Leaf Model
20glContext : Int -> Int -> Scene -> Element
19glContext : Int -> Int -> Scene -> Element
21glContext = Native.Graphics.WebGL.glContext
20glContext = Native.Graphics.WebGL.glContext