@@ -3,11 +3,12 @@ module Graphics.WebGL (mapTriangle, zipTriangle, loadTex, model, webgl) where
33{-| The WebGL API is for high performance drawing.
44
55# Triangle Convenience Functions
6−@docs mapTriangle, zipTriangle
6+@docs Triangle, mapTriangle, zipTriangle
77
88# Shaders
99Shaders are created using glsl blocks.
1010
11+```haskell
1112vertex : Shader { a | pos : V3 } {} {}
1213vertex = [glsl|
1314
@@ -18,6 +19,7 @@ void main () {
1819}
1920
2021\]
22+```
2123
2224# WebGL Element
2325@docs loadTex, model, webgl
@@ -32,7 +34,8 @@ import Signal (Signal)
3234unsafeCoerceGLSL : String -> Shader attr unif vary
3335unsafeCoerceGLSL = Native.Graphics.WebGL.unsafeCoerceGLSL
3436
35−{-| An alias for a 3-tuple -}
37+{-| Triangles are only homogenous 3-tuples. Each element describes something about each vertex, and must be a record to be used with GLSL shaders.
38+-}
3639type Triangle a = (a,a,a)
3740
3841{-| Apply a function to each vertex -}