1module Graphics.WebGL (mapTriangle, zipTriangle, loadTex, model, webgl) where
3{-| The WebGL API is for high performance drawing.
5# Triangle Convenience Functions
6@docs Triangle, mapTriangle, zipTriangle
9Shaders are created using glsl blocks.
11vertex : Shader { a | pos : V3 } {} {}
17 gl_Position = vec4(pos,1.0);
27import Graphics.Element (Element)
29import Native.Graphics.WebGL
32type Triangle a = (a,a,a)
34mapTriangle : (a -> b) -> Triangle a -> Triangle b
35mapTriangle f (x,y,z) = (f x, f y, f z)
37zipTriangle : (a -> b -> c) -> Triangle a -> Triangle b -> Triangle c
38zipTriangle f (x,y,z) (x',y',z') = (f x x', f y y', f z z')
40data Shader attr unif vary = Shader
44loadTex : String -> Signal (Response Texture)
45loadTex = Native.Graphics.WebGL.loadTex
49model : Shader attr unif vary -> Shader {} unif vary -> [Triangle attr] -> unif -> Model
50model = Native.Graphics.WebGL.model
52webgl : (Int,Int) -> [Model] -> Element
53webgl = Native.Graphics.WebGL.webgl
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list