Home

class: Quad


Helper class to create a quad

Methods summary


Public methods
public initVao(shader: PIXI.Shader): void
public map(targetTextureFrame: PIXI.Rectangle, destinationFrame: PIXI.Rectangle): PIXI.Quad
public upload(): PIXI.Quad
public destroy(): void
public initVao(shader: PIXI.Shader): void
public map(targetTextureFrame: PIXI.Rectangle, destinationFrame: PIXI.Rectangle): PIXI.Quad
public upload(): PIXI.Quad
public destroy(): void

Properties


Name Type Attribute Description
vertices Float32Array public

An array of vertices

uvs Float32Array public

The Uvs of the quad

vertices Float32Array public

An array of vertices

uvs Float32Array public

The Uvs of the quad

Methods


initVao(shader: PIXI.Shader): void

Initialises the vaos and uses the shader.

Params:

Name Type Attribute Description
shader

the shader to use

Returns:

void


map(targetTextureFrame: PIXI.Rectangle, destinationFrame: PIXI.Rectangle): PIXI.Quad

Maps two Rectangle to the quad.

Params:

Name Type Attribute Description
targetTextureFrame

the first rectangle

destinationFrame

the second rectangle

Returns:

PIXI.Quad


upload(): PIXI.Quad

Binds the buffer and uploads the data

Returns:

PIXI.Quad


destroy(): void

Removes this quad from WebGL

Returns:

void


initVao(shader: PIXI.Shader): void

Initialises the vaos and uses the shader.

Params:

Name Type Attribute Description
shader

the shader to use

Returns:

void


map(targetTextureFrame: PIXI.Rectangle, destinationFrame: PIXI.Rectangle): PIXI.Quad

Maps two Rectangle to the quad.

Params:

Name Type Attribute Description
targetTextureFrame

the first rectangle

destinationFrame

the second rectangle

Returns:

PIXI.Quad


upload(): PIXI.Quad

Binds the buffer and uploads the data

Returns:

PIXI.Quad


destroy(): void

Removes this quad from WebGL

Returns:

void


  {
    "comment": "/**\n * Helper class to create a quad\n *\n * @class\n * @memberof PIXI\n */",
    "meta": {
        "range": [
            204,
            4544
        ],
        "filename": "Quad.js",
        "lineno": 12,
        "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\renderers\\webgl\\utils",
        "code": {
            "id": "astnode100028421",
            "name": "Quad",
            "type": "ClassDeclaration",
            "paramnames": [
                "gl",
                "state"
            ]
        }
    },
    "classdesc": "

Helper class to create a quad

", "kind": "class", "memberof": "PIXI", "name": "Quad", "longname": "PIXI.Quad", "scope": "static", "params": [ { "type": { "names": [ "WebGLRenderingContext" ] }, "description": "

The gl context for this quad to use.

", "name": "gl" }, { "type": { "names": [ "object" ] }, "description": "

TODO: Description

", "name": "state" } ], "___id": "T000002R002610", "___s": true, "$methods": [ { "comment": "/**\n * Initialises the vaos and uses the shader.\n *\n * @param {PIXI.Shader} shader - the shader to use\n */", "meta": { "range": [ 2207, 2514 ], "filename": "Quad.js", "lineno": 87, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\renderers\\webgl\\utils", "code": { "id": "astnode100028622", "name": "Quad#initVao", "type": "MethodDefinition", "paramnames": [ "shader" ] }, "vars": { "": null } }, "description": "

Initialises the vaos and uses the shader.

", "params": [ { "type": { "names": [ "PIXI.Shader" ] }, "description": "

the shader to use

", "name": "shader" } ], "name": "initVao", "longname": "PIXI.Quad#initVao", "kind": "function", "memberof": "PIXI.Quad", "scope": "instance", "___id": "T000002R002627", "___s": true, "skip": true, "slug": "PIXI.QuadinitVao", "filepath": "core\\renderers\\webgl\\utils\\Quad.js" }, { "comment": "/**\n * Maps two Rectangle to the quad.\n *\n * @param {PIXI.Rectangle} targetTextureFrame - the first rectangle\n * @param {PIXI.Rectangle} destinationFrame - the second rectangle\n * @return {PIXI.Quad} Returns itself.\n */", "meta": { "range": [ 2768, 3817 ], "filename": "Quad.js", "lineno": 102, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\renderers\\webgl\\utils", "code": { "id": "astnode100028684", "name": "Quad#map", "type": "MethodDefinition", "paramnames": [ "targetTextureFrame", "destinationFrame" ] }, "vars": { "": null } }, "description": "

Maps two Rectangle to the quad.

", "params": [ { "type": { "names": [ "PIXI.Rectangle" ] }, "description": "

the first rectangle

", "name": "targetTextureFrame" }, { "type": { "names": [ "PIXI.Rectangle" ] }, "description": "

the second rectangle

", "name": "destinationFrame" } ], "returns": [ { "type": { "names": [ "PIXI.Quad" ] }, "description": "

Returns itself.

" } ], "name": "map", "longname": "PIXI.Quad#map", "kind": "function", "memberof": "PIXI.Quad", "scope": "instance", "___id": "T000002R002628", "___s": true, "skip": true, "slug": "PIXI.Quadmap", "filepath": "core\\renderers\\webgl\\utils\\Quad.js" }, { "comment": "/**\n * Binds the buffer and uploads the data\n *\n * @return {PIXI.Quad} Returns itself.\n */", "meta": { "range": [ 3934, 4347 ], "filename": "Quad.js", "lineno": 142, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\renderers\\webgl\\utils", "code": { "id": "astnode100028888", "name": "Quad#upload", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Binds the buffer and uploads the data

", "returns": [ { "type": { "names": [ "PIXI.Quad" ] }, "description": "

Returns itself.

" } ], "name": "upload", "longname": "PIXI.Quad#upload", "kind": "function", "memberof": "PIXI.Quad", "scope": "instance", "params": [], "___id": "T000002R002649", "___s": true, "skip": true, "slug": "PIXI.Quadupload", "filepath": "core\\renderers\\webgl\\utils\\Quad.js" }, { "comment": "/**\n * Removes this quad from WebGL\n */", "meta": { "range": [ 4405, 4542 ], "filename": "Quad.js", "lineno": 160, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\renderers\\webgl\\utils", "code": { "id": "astnode100028989", "name": "Quad#destroy", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Removes this quad from WebGL

", "name": "destroy", "longname": "PIXI.Quad#destroy", "kind": "function", "memberof": "PIXI.Quad", "scope": "instance", "params": [], "___id": "T000002R002655", "___s": true, "skip": true, "slug": "PIXI.Quaddestroy", "filepath": "core\\renderers\\webgl\\utils\\Quad.js" }, { "comment": "/**\n * Initialises the vaos and uses the shader.\n *\n * @param {PIXI.Shader} shader - the shader to use\n */", "meta": { "range": [ 2207, 2514 ], "filename": "Quad.js", "lineno": 87, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\renderers\\webgl\\utils", "code": { "id": "astnode100103301", "name": "Quad#initVao", "type": "MethodDefinition", "paramnames": [ "shader" ] }, "vars": { "": null } }, "description": "

Initialises the vaos and uses the shader.

", "params": [ { "type": { "names": [ "PIXI.Shader" ] }, "description": "

the shader to use

", "name": "shader" } ], "name": "initVao", "longname": "PIXI.Quad#initVao", "kind": "function", "memberof": "PIXI.Quad", "scope": "instance", "___id": "T000002R009561", "___s": true, "skip": true, "slug": "PIXI.QuadinitVao", "filepath": "core\\renderers\\webgl\\utils\\Quad.js" }, { "comment": "/**\n * Maps two Rectangle to the quad.\n *\n * @param {PIXI.Rectangle} targetTextureFrame - the first rectangle\n * @param {PIXI.Rectangle} destinationFrame - the second rectangle\n * @return {PIXI.Quad} Returns itself.\n */", "meta": { "range": [ 2768, 3817 ], "filename": "Quad.js", "lineno": 102, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\renderers\\webgl\\utils", "code": { "id": "astnode100103363", "name": "Quad#map", "type": "MethodDefinition", "paramnames": [ "targetTextureFrame", "destinationFrame" ] }, "vars": { "": null } }, "description": "

Maps two Rectangle to the quad.

", "params": [ { "type": { "names": [ "PIXI.Rectangle" ] }, "description": "

the first rectangle

", "name": "targetTextureFrame" }, { "type": { "names": [ "PIXI.Rectangle" ] }, "description": "

the second rectangle

", "name": "destinationFrame" } ], "returns": [ { "type": { "names": [ "PIXI.Quad" ] }, "description": "

Returns itself.

" } ], "name": "map", "longname": "PIXI.Quad#map", "kind": "function", "memberof": "PIXI.Quad", "scope": "instance", "___id": "T000002R009562", "___s": true, "skip": true, "slug": "PIXI.Quadmap", "filepath": "core\\renderers\\webgl\\utils\\Quad.js" }, { "comment": "/**\n * Binds the buffer and uploads the data\n *\n * @return {PIXI.Quad} Returns itself.\n */", "meta": { "range": [ 3934, 4347 ], "filename": "Quad.js", "lineno": 142, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\renderers\\webgl\\utils", "code": { "id": "astnode100103567", "name": "Quad#upload", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Binds the buffer and uploads the data

", "returns": [ { "type": { "names": [ "PIXI.Quad" ] }, "description": "

Returns itself.

" } ], "name": "upload", "longname": "PIXI.Quad#upload", "kind": "function", "memberof": "PIXI.Quad", "scope": "instance", "params": [], "___id": "T000002R009583", "___s": true, "skip": true, "slug": "PIXI.Quadupload", "filepath": "core\\renderers\\webgl\\utils\\Quad.js" }, { "comment": "/**\n * Removes this quad from WebGL\n */", "meta": { "range": [ 4405, 4542 ], "filename": "Quad.js", "lineno": 160, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\renderers\\webgl\\utils", "code": { "id": "astnode100103668", "name": "Quad#destroy", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Removes this quad from WebGL

", "name": "destroy", "longname": "PIXI.Quad#destroy", "kind": "function", "memberof": "PIXI.Quad", "scope": "instance", "params": [], "___id": "T000002R009589", "___s": true, "skip": true, "slug": "PIXI.Quaddestroy", "filepath": "core\\renderers\\webgl\\utils\\Quad.js" } ], "$attributes": [ { "comment": "/**\n * An array of vertices\n *\n * @member {Float32Array} PIXI.Quad#vertices\n */", "meta": { "range": [ 561, 672 ], "filename": "Quad.js", "lineno": 27, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\renderers\\webgl\\utils", "code": {} }, "description": "

An array of vertices

", "kind": "member", "name": "vertices", "type": { "names": [ "Float32Array" ] }, "memberof": "PIXI.Quad", "longname": "PIXI.Quad#vertices", "scope": "instance", "___id": "T000002R002613", "___s": true, "skip": true, "slug": "PIXI.Quadvertices", "filepath": "core\\renderers\\webgl\\utils\\Quad.js" }, { "comment": "/**\n * The Uvs of the quad\n *\n * @member {Float32Array} PIXI.Quad#uvs\n */", "meta": { "range": [ 813, 918 ], "filename": "Quad.js", "lineno": 39, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\renderers\\webgl\\utils", "code": {} }, "description": "

The Uvs of the quad

", "kind": "member", "name": "uvs", "type": { "names": [ "Float32Array" ] }, "memberof": "PIXI.Quad", "longname": "PIXI.Quad#uvs", "scope": "instance", "___id": "T000002R002615", "___s": true, "skip": true, "slug": "PIXI.Quaduvs", "filepath": "core\\renderers\\webgl\\utils\\Quad.js" }, { "comment": "/**\n * An array of vertices\n *\n * @member {Float32Array} PIXI.Quad#vertices\n */", "meta": { "range": [ 561, 672 ], "filename": "Quad.js", "lineno": 27, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\renderers\\webgl\\utils", "code": {} }, "description": "

An array of vertices

", "kind": "member", "name": "vertices", "type": { "names": [ "Float32Array" ] }, "memberof": "PIXI.Quad", "longname": "PIXI.Quad#vertices", "scope": "instance", "___id": "T000002R009547", "___s": true, "skip": true, "slug": "PIXI.Quadvertices", "filepath": "core\\renderers\\webgl\\utils\\Quad.js" }, { "comment": "/**\n * The Uvs of the quad\n *\n * @member {Float32Array} PIXI.Quad#uvs\n */", "meta": { "range": [ 813, 918 ], "filename": "Quad.js", "lineno": 39, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\renderers\\webgl\\utils", "code": {} }, "description": "

The Uvs of the quad

", "kind": "member", "name": "uvs", "type": { "names": [ "Float32Array" ] }, "memberof": "PIXI.Quad", "longname": "PIXI.Quad#uvs", "scope": "instance", "___id": "T000002R009549", "___s": true, "skip": true, "slug": "PIXI.Quaduvs", "filepath": "core\\renderers\\webgl\\utils\\Quad.js" } ], "$staticmethods": [], "$staticproperties": [], "$augments": [], "$augmentedBy": [], "filepath": "core\\renderers\\webgl\\utils\\Quad.js" }