on master help sign in
better api
commit6ed16655db19c7183c289d3eeb733bff2243d1d9 authorJohn P Mayer Jr <john.p.mayer.jr@gmail.com> dateMon 11 Nov 2013, 17:36 (13 years ago) parent4f4e6ac
2 files changed+9−8
libraries/Graphics/WebGL.elm+7−7 libraries/MJS.elm+2−1
libraries/Graphics/WebGL.elm+7−7
@@ -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+
libraries/MJS.elm+2−1
@@ -6,7 +6,8 @@ module MJS where
66
77import Native.MJS
88
9−data V3 = V3
9+data V3 = Fake_V3
10+data M4x4 = Fake_M4x4
1011
1112v3 : Float -> Float -> Float -> V3
1213v3 = Native.MJS.v3