the current WebGL renderer session
additional settings to initialize this compositors
an array of attributes definition
an array of attributes definition
an array of vertex attribute properties
the shader currently used by this compositor
the default shader created by this compositor
primitive type to render (gl.POINTS, gl.LINE_STRIP, gl.LINE_LOOP, gl.LINES, gl.TRIANGLE_STRIP, gl.TRIANGLE_FAN, gl.TRIANGLES)
the size of a single vertex in bytes (will automatically be calculated as attributes definitions are added)
the vertex data buffer used by this compositor
the size of a single vertex in floats (will automatically be calculated as attributes definitions are added)
add vertex attribute property definition to the compositor
name of the attribute in the vertex shader
number of components per vertex attribute. Must be 1, 2, 3, or 4.
data type of each component in the array
whether integer data values should be normalized into a certain range when being cast to a float
offset in bytes of the first component in the vertex attribute array
Add a textured quad
Source texture atlas
Destination x-coordinate
Destination y-coordinate
Destination width
Destination height
Texture UV (u0) value.
Texture UV (v0) value.
Texture UV (u1) value.
Texture UV (v1) value.
tint color to be applied to the texture in UINT32 (argb) format
Force the texture to be reuploaded even if already bound
assign the given WebGL texture to the current batch
a WebGL texture
Texture unit to which the given texture is bound
Create a WebGL texture from an image
Destination texture unit
Optional
pixels: Source image
gl.LINEAR or gl.NEAREST
Optional
repeat: string = "no-repeat"Image repeat behavior (see ImageLayer#repeat)
Optional
w: number = pixels.widthSource image width (Only use with UInt8Array[] or Float32Array[] source image)
Optional
h: number = pixels.heightSource image height (Only use with UInt8Array[] or Float32Array[] source image)
Optional
premultipliedAlpha: boolean = trueMultiplies the alpha channel into the other color channels
Optional
mipmap: boolean = trueWhether mipmap levels should be generated for this texture
a WebGL texture
delete the given WebGL texture
Optional
texture: WebGLTexturea WebGL texture to delete
returns the WebGL texture associated to the given texture unit
Texture unit to which a texture is bound
texture a WebGL texture
set/change the current projection matrix
the new projection matrix
unbind the given WebGL texture, forcing it to be reuploaded
Optional
texture: WebGLTexturea WebGL texture
Optional
unit: numbera WebGL texture
unit the unit number that was associated with the given texture
Select the shader to use for compositing
a reference to a GLShader instance
A WebGL Compositor object. This class handles all of the WebGL state
Pushes texture regions or shape geometry into WebGL buffers, automatically flushes to GPU