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
32unsafeCoerceGLSL : String -> Shader attr unif vary
33unsafeCoerceGLSL = Native.Graphics.WebGL.unsafeCoerceGLSL
35type Triangle a = (a,a,a)
37mapTriangle : (a -> b) -> Triangle a -> Triangle b
38mapTriangle f (x,y,z) = (f x, f y, f z)
40zipTriangle : (a -> b -> c) -> Triangle a -> Triangle b -> Triangle c
41zipTriangle f (x,y,z) (x',y',z') = (f x x', f y y', f z z')
43data Shader attr unif vary = Shader
47loadTex : String -> Signal (Response Texture)
48loadTex = Native.Graphics.WebGL.loadTex
52model : Shader attr unif vary -> Shader {} unif vary -> [Triangle attr] -> unif -> Model
53model = Native.Graphics.WebGL.model
55webgl : (Int,Int) -> [Model] -> Element
56webgl = 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