new Tiny.Quad(gl, state)
Name | Type | Description |
---|---|---|
gl |
WebGLRenderingContext |
The gl context for this quad to use. |
state |
object |
TODO: Description |
Members
-
glWebGLRenderingContext
-
the current WebGL drawing context
-
uvsFloat32Array
-
The Uvs of the quad
-
verticesFloat32Array
-
An array of vertices
Methods
-
destroy()
-
Removes this quad from WebGL
-
initVao(shader)
-
Initialises the vaos and uses the shader.
Name Type Description shader
Tiny.Shader the shader to use
-
map(targetTextureFrame, destinationFrame) ❯ {Tiny.Quad}
-
Maps two Rectangle to the quad.
Name Type Description targetTextureFrame
Tiny.Rectangle the first rectangle
destinationFrame
Tiny.Rectangle the second rectangle
Returns:
Type Description Tiny.Quad Returns itself. -
upload() ❯ {Tiny.Quad}
-
Binds the buffer and uploads the data
Returns:
Type Description Tiny.Quad Returns itself.