Class: Quad

PIXI.Quad

Helper class to create a quad

new PIXI.Quad (gl, state)

Name Type Description
gl WebGLRenderingContext

The gl context for this quad to use.

state object

TODO: Description

Members

gl WebGLRenderingContext

the current WebGL drawing context

indexBuffer glCore.GLBuffer

The index buffer

indices Uint16Array

An array containing the indices of the vertices

uvs Float32Array

The Uvs of the quad

vao glCore.VertexArrayObject

The vertex array object

vertexBuffer glCore.GLBuffer

The vertex buffer

vertices Float32Array

An array of vertices

Methods

destroy ()

Removes this quad from WebGL

initVao (shader)

Initialises the vaos and uses the shader.

Name Type Description
shader PIXI.Shader

the shader to use

map (targetTextureFrame, destinationFrame)PIXI.Quad

Maps two Rectangle to the quad.

Name Type Description
targetTextureFrame PIXI.Rectangle

the first rectangle

destinationFrame PIXI.Rectangle

the second rectangle

Returns:
Type Description
PIXI.Quad Returns itself.

Binds the buffer and uploads the data

Returns:
Type Description
PIXI.Quad Returns itself.