on master help sign in
small docs
commite7e6e9eb5557bd829ab29856f00109212fe1f1c7 authorJohn P Mayer Jr <john.p.mayer.jr@gmail.com> dateWed 5 Mar 2014, 22:25 (13 years ago) parentfde18d6
2 files changed+27−7
libraries/Graphics/WebGL.elm+23−2 libraries/MJS.elm+4−5
libraries/Graphics/WebGL.elm+23−2
@@ -1,7 +1,28 @@
1−
21module Graphics.WebGL (mapTriangle, zipTriangle, loadTex, model, webgl) where
32
4−{-| WebGL -}
3+{-| The WebGL API is for high performance drawing.
4+
5+# Triangle Convenience Functions
6+@docs Triangle, mapTriangle, zipTriangle
7+
8+# Shaders
9+Shaders are created using glsl blocks.
10+
11+vertex : Shader { a | pos : V3 } {} {}
12+vertex = [glsl|
13+
14+attribute vec3 pos;
15+
16+void main () {
17+ gl_Position = vec4(pos,1.0);
18+}
19+
20+|]
21+
22+# WebGL Element
23+@docs webgl
24+
25+-}
526
627import Graphics.Element (Element)
728import Http (Response)
libraries/MJS.elm+4−5
@@ -2,9 +2,9 @@ module MJS where
22
33{-| MJS
44
5−A high performance linear algrbra library using
6−native JS array types. Geared towards 3D graphics
7−and used primarily by the Graphics.WebGL.
5+A high performance linear algebra library using
6+native JS arrays. Geared towards 3D graphics
7+and use with Graphics.WebGL.
88
99Both vectors and matrices are immutable.
1010
@@ -15,6 +15,7 @@ import Native.MJS
1515data V2 = V2
1616data V3 = V3
1717data V4 = V4
18+data M4x4 = M4x4
1819
1920v3 : Float -> Float -> Float -> V3
2021v3 = Native.MJS.v3
@@ -53,8 +54,6 @@ dot = Native.MJS.v3dot
5354cross : V3 -> V3 -> V3
5455cross = Native.MJS.v3cross
5556
56−data M4x4 = Dummy_M4x4
57−
5857mul4x4 : M4x4 -> V3 -> V3
5958mul4x4 = Native.MJS.v3mul4x4
6059