Home

class: WebGLPrepare


The prepare manager provides functionality to upload content to the GPU.

An instance of this class is automatically created by default, and can be found at renderer.plugins.prepare

Extends:

BasePrepare → WebGLPrepare

Methods summary


Public methods
public upload(item: function, PIXI.DisplayObject, PIXI.Container, PIXI.BaseTexture, PIXI.Texture, PIXI.Graphics, PIXI.Text, done: function): void
private tick(): void
private prepareItems(): void
public registerFindHook(addHook: function): PIXI.BasePrepare
public registerUploadHook(uploadHook: function): PIXI.BasePrepare
public add(item: PIXI.DisplayObject, PIXI.Container, PIXI.BaseTexture, PIXI.Texture, PIXI.Graphics, PIXI.Text, *): PIXI.CanvasPrepare
public destroy(): void

Properties


Name Type Attribute Description
register public

Methods


upload(item: function, PIXI.DisplayObject, PIXI.Container, PIXI.BaseTexture, PIXI.Texture, PIXI.Graphics, PIXI.Text, done: function): void

Upload all the textures and graphics to the GPU.

Params:

Name Type Attribute Description
item

Either the container or display object to search for items to upload, the items to upload themselves,
or the callback function, if items have been added using prepare.add.

done

Optional callback when all queued uploads have completed

Returns:

void


tick(): void

Handle tick update

Returns:

void


prepareItems(): void

Actually prepare items. This is handled outside of the tick because it will take a while
and we do NOT want to block the current animation frame from rendering.

Returns:

void


registerFindHook(addHook: function): PIXI.BasePrepare

Adds hooks for finding items.

Params:

Name Type Attribute Description
addHook

Function call that takes two parameters: item:*, queue:Array
function must return true if it was able to add item to the queue.

Returns:

PIXI.BasePrepare


registerUploadHook(uploadHook: function): PIXI.BasePrepare

Adds hooks for uploading items.

Params:

Name Type Attribute Description
uploadHook

Function call that takes two parameters: prepare:CanvasPrepare, item:* and
function must return true if it was able to handle upload of item.

Returns:

PIXI.BasePrepare


add(item: PIXI.DisplayObject, PIXI.Container, PIXI.BaseTexture, PIXI.Texture, PIXI.Graphics, PIXI.Text, *): PIXI.CanvasPrepare

Manually add an item to the uploading queue.

Params:

Name Type Attribute Description
item

Object to
add to the queue

Returns:

PIXI.CanvasPrepare


destroy(): void

Destroys the plugin, don't use after this.

Returns:

void


  {
    "comment": "/**\n * The prepare manager provides functionality to upload content to the GPU.\n *\n * An instance of this class is automatically created by default, and can be found at renderer.plugins.prepare\n *\n * @class\n * @extends PIXI.prepare.BasePrepare\n * @memberof PIXI.prepare\n */",
    "meta": {
        "range": [
            383,
            829
        ],
        "filename": "WebGLPrepare.js",
        "lineno": 15,
        "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\prepare\\webgl",
        "code": {
            "id": "astnode100074527",
            "name": "WebGLPrepare",
            "type": "ClassDeclaration",
            "paramnames": [
                "renderer"
            ]
        }
    },
    "classdesc": "

The prepare manager provides functionality to upload content to the GPU.

\n

An instance of this class is automatically created by default, and can be found at renderer.plugins.prepare

", "kind": "class", "augments": [ "PIXI.prepare.BasePrepare" ], "memberof": "PIXI.prepare", "name": "WebGLPrepare", "longname": "PIXI.prepare.WebGLPrepare", "scope": "static", "params": [ { "type": { "names": [ "PIXI.WebGLRenderer" ] }, "description": "

A reference to the current renderer

", "name": "renderer" } ], "___id": "T000002R006930", "___s": true, "$methods": [ { "comment": "/**\n * Upload all the textures and graphics to the GPU.\n *\n * @param {Function|PIXI.DisplayObject|PIXI.Container|PIXI.BaseTexture|PIXI.Texture|PIXI.Graphics|PIXI.Text} item -\n * Either the container or display object to search for items to upload, the items to upload themselves,\n * or the callback function, if items have been added using `prepare.add`.\n * @param {Function} [done] - Optional callback when all queued uploads have completed\n */", "meta": { "range": [ 3937, 4668 ], "filename": "BasePrepare.js", "lineno": 137, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\prepare", "code": { "id": "astnode100073423", "name": "BasePrepare#upload", "type": "MethodDefinition", "paramnames": [ "item", "done" ] }, "vars": { "": null } }, "description": "

Upload all the textures and graphics to the GPU.

", "params": [ { "type": { "names": [ "function", "PIXI.DisplayObject", "PIXI.Container", "PIXI.BaseTexture", "PIXI.Texture", "PIXI.Graphics", "PIXI.Text" ] }, "description": "

Either the container or display object to search for items to upload, the items to upload themselves,
or the callback function, if items have been added using prepare.add.

", "name": "item" }, { "type": { "names": [ "function" ] }, "optional": true, "description": "

Optional callback when all queued uploads have completed

", "name": "done" } ], "name": "upload", "longname": "PIXI.prepare.WebGLPrepare#upload", "kind": "function", "memberof": "PIXI.prepare.WebGLPrepare", "scope": "instance", "inherits": "PIXI.prepare.BasePrepare#upload", "inherited": true, "overrides": "PIXI.prepare.BasePrepare#upload", "___id": "T000002R014792", "___s": true, "skip": true, "slug": "PIXI.prepare.WebGLPrepareupload", "filepath": "prepare\\BasePrepare.js" }, { "comment": "/**\n * Handle tick update\n *\n * @private\n */", "meta": { "range": [ 4739, 4798 ], "filename": "BasePrepare.js", "lineno": 177, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\prepare", "code": { "id": "astnode100073502", "name": "BasePrepare#tick", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Handle tick update

", "access": "private", "name": "tick", "longname": "PIXI.prepare.WebGLPrepare#tick", "kind": "function", "memberof": "PIXI.prepare.WebGLPrepare", "scope": "instance", "params": [], "inherits": "PIXI.prepare.BasePrepare#tick", "inherited": true, "overrides": "PIXI.prepare.BasePrepare#tick", "___id": "T000002R014793", "___s": true, "skip": true, "slug": "PIXI.prepare.WebGLPreparetick", "filepath": "prepare\\BasePrepare.js" }, { "comment": "/**\n * Actually prepare items. This is handled outside of the tick because it will take a while\n * and we do NOT want to block the current animation frame from rendering.\n *\n * @private\n */", "meta": { "range": [ 5018, 6301 ], "filename": "BasePrepare.js", "lineno": 188, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\prepare", "code": { "id": "astnode100073513", "name": "BasePrepare#prepareItems", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Actually prepare items. This is handled outside of the tick because it will take a while
and we do NOT want to block the current animation frame from rendering.

", "access": "private", "name": "prepareItems", "longname": "PIXI.prepare.WebGLPrepare#prepareItems", "kind": "function", "memberof": "PIXI.prepare.WebGLPrepare", "scope": "instance", "params": [], "inherits": "PIXI.prepare.BasePrepare#prepareItems", "inherited": true, "overrides": "PIXI.prepare.BasePrepare#prepareItems", "___id": "T000002R014794", "___s": true, "skip": true, "slug": "PIXI.prepare.WebGLPrepareprepareItems", "filepath": "prepare\\BasePrepare.js" }, { "comment": "/**\n * Adds hooks for finding items.\n *\n * @param {Function} addHook - Function call that takes two parameters: `item:*, queue:Array`\n * function must return `true` if it was able to add item to the queue.\n * @return {PIXI.BasePrepare} Instance of plugin for chaining.\n */", "meta": { "range": [ 6617, 6758 ], "filename": "BasePrepare.js", "lineno": 244, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\prepare", "code": { "id": "astnode100073679", "name": "BasePrepare#registerFindHook", "type": "MethodDefinition", "paramnames": [ "addHook" ] }, "vars": { "": null } }, "description": "

Adds hooks for finding items.

", "params": [ { "type": { "names": [ "function" ] }, "description": "

Function call that takes two parameters: item:*, queue:Array
function must return true if it was able to add item to the queue.

", "name": "addHook" } ], "returns": [ { "type": { "names": [ "PIXI.BasePrepare" ] }, "description": "

Instance of plugin for chaining.

" } ], "name": "registerFindHook", "longname": "PIXI.prepare.WebGLPrepare#registerFindHook", "kind": "function", "memberof": "PIXI.prepare.WebGLPrepare", "scope": "instance", "inherits": "PIXI.prepare.BasePrepare#registerFindHook", "inherited": true, "overrides": "PIXI.prepare.BasePrepare#registerFindHook", "___id": "T000002R014795", "___s": true, "skip": true, "slug": "PIXI.prepare.WebGLPrepareregisterFindHook", "filepath": "prepare\\BasePrepare.js" }, { "comment": "/**\n * Adds hooks for uploading items.\n *\n * @param {Function} uploadHook - Function call that takes two parameters: `prepare:CanvasPrepare, item:*` and\n * function must return `true` if it was able to handle upload of item.\n * @return {PIXI.BasePrepare} Instance of plugin for chaining.\n */", "meta": { "range": [ 7093, 7248 ], "filename": "BasePrepare.js", "lineno": 261, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\prepare", "code": { "id": "astnode100073697", "name": "BasePrepare#registerUploadHook", "type": "MethodDefinition", "paramnames": [ "uploadHook" ] }, "vars": { "": null } }, "description": "

Adds hooks for uploading items.

", "params": [ { "type": { "names": [ "function" ] }, "description": "

Function call that takes two parameters: prepare:CanvasPrepare, item:* and
function must return true if it was able to handle upload of item.

", "name": "uploadHook" } ], "returns": [ { "type": { "names": [ "PIXI.BasePrepare" ] }, "description": "

Instance of plugin for chaining.

" } ], "name": "registerUploadHook", "longname": "PIXI.prepare.WebGLPrepare#registerUploadHook", "kind": "function", "memberof": "PIXI.prepare.WebGLPrepare", "scope": "instance", "inherits": "PIXI.prepare.BasePrepare#registerUploadHook", "inherited": true, "overrides": "PIXI.prepare.BasePrepare#registerUploadHook", "___id": "T000002R014796", "___s": true, "skip": true, "slug": "PIXI.prepare.WebGLPrepareregisterUploadHook", "filepath": "prepare\\BasePrepare.js" }, { "comment": "/**\n * Manually add an item to the uploading queue.\n *\n * @param {PIXI.DisplayObject|PIXI.Container|PIXI.BaseTexture|PIXI.Texture|PIXI.Graphics|PIXI.Text|*} item - Object to\n * add to the queue\n * @return {PIXI.CanvasPrepare} Instance of plugin for chaining.\n */", "meta": { "range": [ 7552, 8117 ], "filename": "BasePrepare.js", "lineno": 278, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\prepare", "code": { "id": "astnode100073715", "name": "BasePrepare#add", "type": "MethodDefinition", "paramnames": [ "item" ] }, "vars": { "": null } }, "description": "

Manually add an item to the uploading queue.

", "params": [ { "type": { "names": [ "PIXI.DisplayObject", "PIXI.Container", "PIXI.BaseTexture", "PIXI.Texture", "PIXI.Graphics", "PIXI.Text", "*" ] }, "description": "

Object to
add to the queue

", "name": "item" } ], "returns": [ { "type": { "names": [ "PIXI.CanvasPrepare" ] }, "description": "

Instance of plugin for chaining.

" } ], "name": "add", "longname": "PIXI.prepare.WebGLPrepare#add", "kind": "function", "memberof": "PIXI.prepare.WebGLPrepare", "scope": "instance", "inherits": "PIXI.prepare.BasePrepare#add", "inherited": true, "overrides": "PIXI.prepare.BasePrepare#add", "___id": "T000002R014797", "___s": true, "skip": true, "slug": "PIXI.prepare.WebGLPrepareadd", "filepath": "prepare\\BasePrepare.js" }, { "comment": "/**\n * Destroys the plugin, don't use after this.\n *\n */", "meta": { "range": [ 8196, 8561 ], "filename": "BasePrepare.js", "lineno": 306, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\prepare", "code": { "id": "astnode100073787", "name": "BasePrepare#destroy", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Destroys the plugin, don't use after this.

", "name": "destroy", "longname": "PIXI.prepare.WebGLPrepare#destroy", "kind": "function", "memberof": "PIXI.prepare.WebGLPrepare", "scope": "instance", "params": [], "inherits": "PIXI.prepare.BasePrepare#destroy", "inherited": true, "overrides": "PIXI.prepare.BasePrepare#destroy", "___id": "T000002R014798", "___s": true, "skip": true, "slug": "PIXI.prepare.WebGLPreparedestroy", "filepath": "prepare\\BasePrepare.js" } ], "$attributes": [ { "comment": "/**\n * @method\n * @name PIXI.prepare.BasePrepare#register\n * @see PIXI.prepare.BasePrepare#registerFindHook\n * @deprecated since version 4.4.2\n * @param {Function} [addHook] - Function call that takes two parameters: `item:*, queue:Array`\n * function must return `true` if it was able to add item to the queue.\n * @param {Function} [uploadHook] - Function call that takes two parameters: `prepare:CanvasPrepare, item:*` and\n * function must return `true` if it was able to handle upload of item.\n * @return {PIXI.BasePrepare} Instance of plugin for chaining.\n */", "meta": { "range": [ 24256, 24832 ], "filename": "deprecation.js", "lineno": 920, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src", "code": {} }, "kind": "function", "name": "register", "see": [ "PIXI.prepare.BasePrepare#registerFindHook" ], "deprecated": "since version 4.4.2", "params": [ { "type": { "names": [ "function" ] }, "optional": true, "description": "

Function call that takes two parameters: item:*, queue:Array
function must return true if it was able to add item to the queue.

", "name": "addHook" }, { "type": { "names": [ "function" ] }, "optional": true, "description": "

Function call that takes two parameters: prepare:CanvasPrepare, item:* and
function must return true if it was able to handle upload of item.

", "name": "uploadHook" } ], "returns": [ { "type": { "names": [ "PIXI.BasePrepare" ] }, "description": "

Instance of plugin for chaining.

" } ], "memberof": "PIXI.prepare.WebGLPrepare", "longname": "PIXI.prepare.WebGLPrepare#register", "scope": "instance", "inherits": "PIXI.prepare.BasePrepare#register", "inherited": true, "overrides": "PIXI.prepare.BasePrepare#register", "___id": "T000002R014791", "___s": true, "skip": true, "slug": "PIXI.prepare.WebGLPrepareregister", "filepath": "deprecation.js" } ], "$staticmethods": [], "$staticproperties": [], "$augments": [ { "comment": "/**\n * The prepare manager provides functionality to upload content to the GPU. BasePrepare handles\n * basic queuing functionality and is extended by {@link PIXI.prepare.WebGLPrepare} and {@link PIXI.prepare.CanvasPrepare}\n * to provide preparation capabilities specific to their respective renderers.\n *\n * @example\n * // Create a sprite\n * const sprite = new PIXI.Sprite.fromImage('something.png');\n *\n * // Load object into GPU\n * app.renderer.plugins.prepare.upload(sprite, () => {\n *\n * //Texture(s) has been uploaded to GPU\n * app.stage.addChild(sprite);\n *\n * })\n *\n * @abstract\n * @class\n * @memberof PIXI.prepare\n */", "meta": { "range": [ 997, 8564 ], "filename": "BasePrepare.js", "lineno": 39, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\prepare", "code": { "id": "astnode100073300", "name": "BasePrepare", "type": "ClassDeclaration", "paramnames": [ "renderer" ] } }, "classdesc": "

The prepare manager provides functionality to upload content to the GPU. BasePrepare handles
basic queuing functionality and is extended by {@link PIXI.prepare.WebGLPrepare} and {@link PIXI.prepare.CanvasPrepare}
to provide preparation capabilities specific to their respective renderers.

", "examples": [ "// Create a sprite\nconst sprite = new PIXI.Sprite.fromImage('something.png');\n\n// Load object into GPU\napp.renderer.plugins.prepare.upload(sprite, () => {\n\n //Texture(s) has been uploaded to GPU\n app.stage.addChild(sprite);\n\n})" ], "virtual": true, "kind": "class", "memberof": "PIXI.prepare", "name": "BasePrepare", "longname": "PIXI.prepare.BasePrepare", "scope": "static", "params": [ { "type": { "names": [ "PIXI.SystemRenderer" ] }, "description": "

A reference to the current renderer

", "name": "renderer" } ], "___id": "T000002R006835", "___s": true, "$methods": [ { "comment": "/**\n * Upload all the textures and graphics to the GPU.\n *\n * @param {Function|PIXI.DisplayObject|PIXI.Container|PIXI.BaseTexture|PIXI.Texture|PIXI.Graphics|PIXI.Text} item -\n * Either the container or display object to search for items to upload, the items to upload themselves,\n * or the callback function, if items have been added using `prepare.add`.\n * @param {Function} [done] - Optional callback when all queued uploads have completed\n */", "meta": { "range": [ 3937, 4668 ], "filename": "BasePrepare.js", "lineno": 137, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\prepare", "code": { "id": "astnode100073423", "name": "BasePrepare#upload", "type": "MethodDefinition", "paramnames": [ "item", "done" ] }, "vars": { "": null } }, "description": "

Upload all the textures and graphics to the GPU.

", "params": [ { "type": { "names": [ "function", "PIXI.DisplayObject", "PIXI.Container", "PIXI.BaseTexture", "PIXI.Texture", "PIXI.Graphics", "PIXI.Text" ] }, "description": "

Either the container or display object to search for items to upload, the items to upload themselves,
or the callback function, if items have been added using prepare.add.

", "name": "item" }, { "type": { "names": [ "function" ] }, "optional": true, "description": "

Optional callback when all queued uploads have completed

", "name": "done" } ], "name": "upload", "longname": "PIXI.prepare.BasePrepare#upload", "kind": "function", "memberof": "PIXI.prepare.BasePrepare", "scope": "instance", "___id": "T000002R006846", "___s": true, "skip": true, "slug": "PIXI.prepare.BasePrepareupload", "filepath": "prepare\\BasePrepare.js" }, { "comment": "/**\n * Handle tick update\n *\n * @private\n */", "meta": { "range": [ 4739, 4798 ], "filename": "BasePrepare.js", "lineno": 177, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\prepare", "code": { "id": "astnode100073502", "name": "BasePrepare#tick", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Handle tick update

", "access": "private", "name": "tick", "longname": "PIXI.prepare.BasePrepare#tick", "kind": "function", "memberof": "PIXI.prepare.BasePrepare", "scope": "instance", "params": [], "___id": "T000002R006850", "___s": true, "skip": true, "slug": "PIXI.prepare.BasePreparetick", "filepath": "prepare\\BasePrepare.js" }, { "comment": "/**\n * Actually prepare items. This is handled outside of the tick because it will take a while\n * and we do NOT want to block the current animation frame from rendering.\n *\n * @private\n */", "meta": { "range": [ 5018, 6301 ], "filename": "BasePrepare.js", "lineno": 188, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\prepare", "code": { "id": "astnode100073513", "name": "BasePrepare#prepareItems", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Actually prepare items. This is handled outside of the tick because it will take a while
and we do NOT want to block the current animation frame from rendering.

", "access": "private", "name": "prepareItems", "longname": "PIXI.prepare.BasePrepare#prepareItems", "kind": "function", "memberof": "PIXI.prepare.BasePrepare", "scope": "instance", "params": [], "___id": "T000002R006851", "___s": true, "skip": true, "slug": "PIXI.prepare.BasePrepareprepareItems", "filepath": "prepare\\BasePrepare.js" }, { "comment": "/**\n * Adds hooks for finding items.\n *\n * @param {Function} addHook - Function call that takes two parameters: `item:*, queue:Array`\n * function must return `true` if it was able to add item to the queue.\n * @return {PIXI.BasePrepare} Instance of plugin for chaining.\n */", "meta": { "range": [ 6617, 6758 ], "filename": "BasePrepare.js", "lineno": 244, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\prepare", "code": { "id": "astnode100073679", "name": "BasePrepare#registerFindHook", "type": "MethodDefinition", "paramnames": [ "addHook" ] }, "vars": { "": null } }, "description": "

Adds hooks for finding items.

", "params": [ { "type": { "names": [ "function" ] }, "description": "

Function call that takes two parameters: item:*, queue:Array
function must return true if it was able to add item to the queue.

", "name": "addHook" } ], "returns": [ { "type": { "names": [ "PIXI.BasePrepare" ] }, "description": "

Instance of plugin for chaining.

" } ], "name": "registerFindHook", "longname": "PIXI.prepare.BasePrepare#registerFindHook", "kind": "function", "memberof": "PIXI.prepare.BasePrepare", "scope": "instance", "___id": "T000002R006862", "___s": true, "skip": true, "slug": "PIXI.prepare.BasePrepareregisterFindHook", "filepath": "prepare\\BasePrepare.js" }, { "comment": "/**\n * Adds hooks for uploading items.\n *\n * @param {Function} uploadHook - Function call that takes two parameters: `prepare:CanvasPrepare, item:*` and\n * function must return `true` if it was able to handle upload of item.\n * @return {PIXI.BasePrepare} Instance of plugin for chaining.\n */", "meta": { "range": [ 7093, 7248 ], "filename": "BasePrepare.js", "lineno": 261, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\prepare", "code": { "id": "astnode100073697", "name": "BasePrepare#registerUploadHook", "type": "MethodDefinition", "paramnames": [ "uploadHook" ] }, "vars": { "": null } }, "description": "

Adds hooks for uploading items.

", "params": [ { "type": { "names": [ "function" ] }, "description": "

Function call that takes two parameters: prepare:CanvasPrepare, item:* and
function must return true if it was able to handle upload of item.

", "name": "uploadHook" } ], "returns": [ { "type": { "names": [ "PIXI.BasePrepare" ] }, "description": "

Instance of plugin for chaining.

" } ], "name": "registerUploadHook", "longname": "PIXI.prepare.BasePrepare#registerUploadHook", "kind": "function", "memberof": "PIXI.prepare.BasePrepare", "scope": "instance", "___id": "T000002R006863", "___s": true, "skip": true, "slug": "PIXI.prepare.BasePrepareregisterUploadHook", "filepath": "prepare\\BasePrepare.js" }, { "comment": "/**\n * Manually add an item to the uploading queue.\n *\n * @param {PIXI.DisplayObject|PIXI.Container|PIXI.BaseTexture|PIXI.Texture|PIXI.Graphics|PIXI.Text|*} item - Object to\n * add to the queue\n * @return {PIXI.CanvasPrepare} Instance of plugin for chaining.\n */", "meta": { "range": [ 7552, 8117 ], "filename": "BasePrepare.js", "lineno": 278, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\prepare", "code": { "id": "astnode100073715", "name": "BasePrepare#add", "type": "MethodDefinition", "paramnames": [ "item" ] }, "vars": { "": null } }, "description": "

Manually add an item to the uploading queue.

", "params": [ { "type": { "names": [ "PIXI.DisplayObject", "PIXI.Container", "PIXI.BaseTexture", "PIXI.Texture", "PIXI.Graphics", "PIXI.Text", "*" ] }, "description": "

Object to
add to the queue

", "name": "item" } ], "returns": [ { "type": { "names": [ "PIXI.CanvasPrepare" ] }, "description": "

Instance of plugin for chaining.

" } ], "name": "add", "longname": "PIXI.prepare.BasePrepare#add", "kind": "function", "memberof": "PIXI.prepare.BasePrepare", "scope": "instance", "___id": "T000002R006864", "___s": true, "skip": true, "slug": "PIXI.prepare.BasePrepareadd", "filepath": "prepare\\BasePrepare.js" }, { "comment": "/**\n * Destroys the plugin, don't use after this.\n *\n */", "meta": { "range": [ 8196, 8561 ], "filename": "BasePrepare.js", "lineno": 306, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\prepare", "code": { "id": "astnode100073787", "name": "BasePrepare#destroy", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Destroys the plugin, don't use after this.

", "name": "destroy", "longname": "PIXI.prepare.BasePrepare#destroy", "kind": "function", "memberof": "PIXI.prepare.BasePrepare", "scope": "instance", "params": [], "___id": "T000002R006868", "___s": true, "skip": true, "slug": "PIXI.prepare.BasePreparedestroy", "filepath": "prepare\\BasePrepare.js" }, { "comment": "/**\n * Upload all the textures and graphics to the GPU.\n *\n * @param {Function|PIXI.DisplayObject|PIXI.Container|PIXI.BaseTexture|PIXI.Texture|PIXI.Graphics|PIXI.Text} item -\n * Either the container or display object to search for items to upload, the items to upload themselves,\n * or the callback function, if items have been added using `prepare.add`.\n * @param {Function} [done] - Optional callback when all queued uploads have completed\n */", "meta": { "range": [ 3937, 4668 ], "filename": "BasePrepare.js", "lineno": 137, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\prepare", "code": { "id": "astnode100148102", "name": "BasePrepare#upload", "type": "MethodDefinition", "paramnames": [ "item", "done" ] }, "vars": { "": null } }, "description": "

Upload all the textures and graphics to the GPU.

", "params": [ { "type": { "names": [ "function", "PIXI.DisplayObject", "PIXI.Container", "PIXI.BaseTexture", "PIXI.Texture", "PIXI.Graphics", "PIXI.Text" ] }, "description": "

Either the container or display object to search for items to upload, the items to upload themselves,
or the callback function, if items have been added using prepare.add.

", "name": "item" }, { "type": { "names": [ "function" ] }, "optional": true, "description": "

Optional callback when all queued uploads have completed

", "name": "done" } ], "name": "upload", "longname": "PIXI.prepare.BasePrepare#upload", "kind": "function", "memberof": "PIXI.prepare.BasePrepare", "scope": "instance", "___id": "T000002R013780", "___s": true, "skip": true, "slug": "PIXI.prepare.BasePrepareupload", "filepath": "prepare\\BasePrepare.js" }, { "comment": "/**\n * Handle tick update\n *\n * @private\n */", "meta": { "range": [ 4739, 4798 ], "filename": "BasePrepare.js", "lineno": 177, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\prepare", "code": { "id": "astnode100148181", "name": "BasePrepare#tick", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Handle tick update

", "access": "private", "name": "tick", "longname": "PIXI.prepare.BasePrepare#tick", "kind": "function", "memberof": "PIXI.prepare.BasePrepare", "scope": "instance", "params": [], "___id": "T000002R013784", "___s": true, "skip": true, "slug": "PIXI.prepare.BasePreparetick", "filepath": "prepare\\BasePrepare.js" }, { "comment": "/**\n * Actually prepare items. This is handled outside of the tick because it will take a while\n * and we do NOT want to block the current animation frame from rendering.\n *\n * @private\n */", "meta": { "range": [ 5018, 6301 ], "filename": "BasePrepare.js", "lineno": 188, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\prepare", "code": { "id": "astnode100148192", "name": "BasePrepare#prepareItems", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Actually prepare items. This is handled outside of the tick because it will take a while
and we do NOT want to block the current animation frame from rendering.

", "access": "private", "name": "prepareItems", "longname": "PIXI.prepare.BasePrepare#prepareItems", "kind": "function", "memberof": "PIXI.prepare.BasePrepare", "scope": "instance", "params": [], "___id": "T000002R013785", "___s": true, "skip": true, "slug": "PIXI.prepare.BasePrepareprepareItems", "filepath": "prepare\\BasePrepare.js" }, { "comment": "/**\n * Adds hooks for finding items.\n *\n * @param {Function} addHook - Function call that takes two parameters: `item:*, queue:Array`\n * function must return `true` if it was able to add item to the queue.\n * @return {PIXI.BasePrepare} Instance of plugin for chaining.\n */", "meta": { "range": [ 6617, 6758 ], "filename": "BasePrepare.js", "lineno": 244, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\prepare", "code": { "id": "astnode100148358", "name": "BasePrepare#registerFindHook", "type": "MethodDefinition", "paramnames": [ "addHook" ] }, "vars": { "": null } }, "description": "

Adds hooks for finding items.

", "params": [ { "type": { "names": [ "function" ] }, "description": "

Function call that takes two parameters: item:*, queue:Array
function must return true if it was able to add item to the queue.

", "name": "addHook" } ], "returns": [ { "type": { "names": [ "PIXI.BasePrepare" ] }, "description": "

Instance of plugin for chaining.

" } ], "name": "registerFindHook", "longname": "PIXI.prepare.BasePrepare#registerFindHook", "kind": "function", "memberof": "PIXI.prepare.BasePrepare", "scope": "instance", "___id": "T000002R013796", "___s": true, "skip": true, "slug": "PIXI.prepare.BasePrepareregisterFindHook", "filepath": "prepare\\BasePrepare.js" }, { "comment": "/**\n * Adds hooks for uploading items.\n *\n * @param {Function} uploadHook - Function call that takes two parameters: `prepare:CanvasPrepare, item:*` and\n * function must return `true` if it was able to handle upload of item.\n * @return {PIXI.BasePrepare} Instance of plugin for chaining.\n */", "meta": { "range": [ 7093, 7248 ], "filename": "BasePrepare.js", "lineno": 261, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\prepare", "code": { "id": "astnode100148376", "name": "BasePrepare#registerUploadHook", "type": "MethodDefinition", "paramnames": [ "uploadHook" ] }, "vars": { "": null } }, "description": "

Adds hooks for uploading items.

", "params": [ { "type": { "names": [ "function" ] }, "description": "

Function call that takes two parameters: prepare:CanvasPrepare, item:* and
function must return true if it was able to handle upload of item.

", "name": "uploadHook" } ], "returns": [ { "type": { "names": [ "PIXI.BasePrepare" ] }, "description": "

Instance of plugin for chaining.

" } ], "name": "registerUploadHook", "longname": "PIXI.prepare.BasePrepare#registerUploadHook", "kind": "function", "memberof": "PIXI.prepare.BasePrepare", "scope": "instance", "___id": "T000002R013797", "___s": true, "skip": true, "slug": "PIXI.prepare.BasePrepareregisterUploadHook", "filepath": "prepare\\BasePrepare.js" }, { "comment": "/**\n * Manually add an item to the uploading queue.\n *\n * @param {PIXI.DisplayObject|PIXI.Container|PIXI.BaseTexture|PIXI.Texture|PIXI.Graphics|PIXI.Text|*} item - Object to\n * add to the queue\n * @return {PIXI.CanvasPrepare} Instance of plugin for chaining.\n */", "meta": { "range": [ 7552, 8117 ], "filename": "BasePrepare.js", "lineno": 278, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\prepare", "code": { "id": "astnode100148394", "name": "BasePrepare#add", "type": "MethodDefinition", "paramnames": [ "item" ] }, "vars": { "": null } }, "description": "

Manually add an item to the uploading queue.

", "params": [ { "type": { "names": [ "PIXI.DisplayObject", "PIXI.Container", "PIXI.BaseTexture", "PIXI.Texture", "PIXI.Graphics", "PIXI.Text", "*" ] }, "description": "

Object to
add to the queue

", "name": "item" } ], "returns": [ { "type": { "names": [ "PIXI.CanvasPrepare" ] }, "description": "

Instance of plugin for chaining.

" } ], "name": "add", "longname": "PIXI.prepare.BasePrepare#add", "kind": "function", "memberof": "PIXI.prepare.BasePrepare", "scope": "instance", "___id": "T000002R013798", "___s": true, "skip": true, "slug": "PIXI.prepare.BasePrepareadd", "filepath": "prepare\\BasePrepare.js" }, { "comment": "/**\n * Destroys the plugin, don't use after this.\n *\n */", "meta": { "range": [ 8196, 8561 ], "filename": "BasePrepare.js", "lineno": 306, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\prepare", "code": { "id": "astnode100148466", "name": "BasePrepare#destroy", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Destroys the plugin, don't use after this.

", "name": "destroy", "longname": "PIXI.prepare.BasePrepare#destroy", "kind": "function", "memberof": "PIXI.prepare.BasePrepare", "scope": "instance", "params": [], "___id": "T000002R013802", "___s": true, "skip": true, "slug": "PIXI.prepare.BasePreparedestroy", "filepath": "prepare\\BasePrepare.js" } ], "$attributes": [ { "comment": "/**\n * @method\n * @name PIXI.prepare.BasePrepare#register\n * @see PIXI.prepare.BasePrepare#registerFindHook\n * @deprecated since version 4.4.2\n * @param {Function} [addHook] - Function call that takes two parameters: `item:*, queue:Array`\n * function must return `true` if it was able to add item to the queue.\n * @param {Function} [uploadHook] - Function call that takes two parameters: `prepare:CanvasPrepare, item:*` and\n * function must return `true` if it was able to handle upload of item.\n * @return {PIXI.BasePrepare} Instance of plugin for chaining.\n */", "meta": { "range": [ 24256, 24832 ], "filename": "deprecation.js", "lineno": 920, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src", "code": {} }, "kind": "function", "name": "register", "see": [ "PIXI.prepare.BasePrepare#registerFindHook" ], "deprecated": "since version 4.4.2", "params": [ { "type": { "names": [ "function" ] }, "optional": true, "description": "

Function call that takes two parameters: item:*, queue:Array
function must return true if it was able to add item to the queue.

", "name": "addHook" }, { "type": { "names": [ "function" ] }, "optional": true, "description": "

Function call that takes two parameters: prepare:CanvasPrepare, item:* and
function must return true if it was able to handle upload of item.

", "name": "uploadHook" } ], "returns": [ { "type": { "names": [ "PIXI.BasePrepare" ] }, "description": "

Instance of plugin for chaining.

" } ], "memberof": "PIXI.prepare.BasePrepare", "longname": "PIXI.prepare.BasePrepare#register", "scope": "instance", "___id": "T000002R004701", "___s": true, "skip": true, "slug": "PIXI.prepare.BasePrepareregister", "filepath": "deprecation.js" }, { "comment": "/**\n * @method\n * @name PIXI.prepare.BasePrepare#register\n * @see PIXI.prepare.BasePrepare#registerFindHook\n * @deprecated since version 4.4.2\n * @param {Function} [addHook] - Function call that takes two parameters: `item:*, queue:Array`\n * function must return `true` if it was able to add item to the queue.\n * @param {Function} [uploadHook] - Function call that takes two parameters: `prepare:CanvasPrepare, item:*` and\n * function must return `true` if it was able to handle upload of item.\n * @return {PIXI.BasePrepare} Instance of plugin for chaining.\n */", "meta": { "range": [ 24256, 24832 ], "filename": "deprecation.js", "lineno": 920, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src", "code": {} }, "kind": "function", "name": "register", "see": [ "PIXI.prepare.BasePrepare#registerFindHook" ], "deprecated": "since version 4.4.2", "params": [ { "type": { "names": [ "function" ] }, "optional": true, "description": "

Function call that takes two parameters: item:*, queue:Array
function must return true if it was able to add item to the queue.

", "name": "addHook" }, { "type": { "names": [ "function" ] }, "optional": true, "description": "

Function call that takes two parameters: prepare:CanvasPrepare, item:* and
function must return true if it was able to handle upload of item.

", "name": "uploadHook" } ], "returns": [ { "type": { "names": [ "PIXI.BasePrepare" ] }, "description": "

Instance of plugin for chaining.

" } ], "memberof": "PIXI.prepare.BasePrepare", "longname": "PIXI.prepare.BasePrepare#register", "scope": "instance", "___id": "T000002R011635", "___s": true, "skip": true, "slug": "PIXI.prepare.BasePrepareregister", "filepath": "deprecation.js" } ], "$staticmethods": [], "$staticproperties": [], "$augments": [], "$augmentedBy": [ { "name": "CanvasPrepare" }, { "name": "WebGLPrepare" }, { "name": "CanvasPrepare" }, { "name": "WebGLPrepare" } ], "filepath": "prepare\\BasePrepare.js" } ], "$augmentedBy": [], "filepath": "prepare\\webgl\\WebGLPrepare.js" }