on df9ebcf help sign in
31 lines 654 B history raw
1module Graphics.WebGL where
3{-| WebGL
5-}
7import Basics (Float)
8import Signal (Signal)
9import MJS (V3,M4x4)
10import Color (Color)
11import Graphics.Element (Element)
12import Native.Graphics.WebGL
14data GLContext = Fake_GLContext
16glContext : Int -> Int -> Signal GLContext
17glContext = Native.Graphics.WebGL.glContext
19type GLPoint = { pos: V3, color: Color }
20type GLTriangle = { a: GLPoint, b: GLPoint, c: GLPoint }
22data Mesh = Fake_Mesh
24makeMesh : [GLTriangle] -> GLContext -> Mesh
25makeMesh = Native.Graphics.WebGL.makeMesh
27data Scene = Node M4x4 [Scene] | Leaf Mesh
29renderGL : GLContext -> Scene -> Element
30renderGL = Native.Graphics.WebGL.renderGL