The extract manager provides functionality to export content from the renderers.
An instance of this class is automatically created by default, and can be found at renderer.plugins.extract
Public methods | |
---|---|
public | image(target: PIXI.DisplayObject, PIXI.RenderTexture): HTMLImageElement |
public | base64(target: PIXI.DisplayObject, PIXI.RenderTexture): string |
public | canvas(target: PIXI.DisplayObject, PIXI.RenderTexture): HTMLCanvasElement |
public | pixels(target: PIXI.DisplayObject, PIXI.RenderTexture): Uint8ClampedArray |
public | destroy(): void |
public | image(target: PIXI.DisplayObject, PIXI.RenderTexture): HTMLImageElement |
public | base64(target: PIXI.DisplayObject, PIXI.RenderTexture): string |
public | canvas(target: PIXI.DisplayObject, PIXI.RenderTexture): HTMLCanvasElement |
public | pixels(target: PIXI.DisplayObject, PIXI.RenderTexture): Uint8ClampedArray |
public | destroy(): void |
Will return a HTML Image of the target
Name | Type | Attribute | Description |
---|---|---|---|
target | A displayObject or renderTexture |
Will return a a base64 encoded string of this target. It works by calling
WebGLExtract.getCanvas
and then running toDataURL on that.
Name | Type | Attribute | Description |
---|---|---|---|
target | A displayObject or renderTexture |
Creates a Canvas element, renders this target to it and then returns it.
Name | Type | Attribute | Description |
---|---|---|---|
target | A displayObject or renderTexture |
Will return a one-dimensional array containing the pixel data of the entire texture in RGBA
order, with integer values between 0 and 255 (included).
Name | Type | Attribute | Description |
---|---|---|---|
target | A displayObject or renderTexture |
Destroys the extract
void
Will return a HTML Image of the target
Name | Type | Attribute | Description |
---|---|---|---|
target | A displayObject or renderTexture |
Will return a a base64 encoded string of this target. It works by calling
WebGLExtract.getCanvas
and then running toDataURL on that.
Name | Type | Attribute | Description |
---|---|---|---|
target | A displayObject or renderTexture |
Creates a Canvas element, renders this target to it and then returns it.
Name | Type | Attribute | Description |
---|---|---|---|
target | A displayObject or renderTexture |
Will return a one-dimensional array containing the pixel data of the entire texture in RGBA
order, with integer values between 0 and 255 (included).
Name | Type | Attribute | Description |
---|---|---|---|
target | A displayObject or renderTexture |
Destroys the extract
void
{ "comment": "/**\n * The extract manager provides functionality to export content from the renderers.\n *\n * An instance of this class is automatically created by default, and can be found at renderer.plugins.extract\n *\n * @class\n * @memberof PIXI\n */", "meta": { "range": [ 372, 6689 ], "filename": "WebGLExtract.js", "lineno": 16, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\extract\\webgl", "code": { "id": "astnode100050688", "name": "WebGLExtract", "type": "ClassDeclaration", "paramnames": [ "renderer" ] } }, "classdesc": "The extract manager provides functionality to export content from the renderers.
\nAn instance of this class is automatically created by default, and can be found at renderer.plugins.extract
", "kind": "class", "memberof": "PIXI", "name": "WebGLExtract", "longname": "PIXI.WebGLExtract", "scope": "static", "params": [ { "type": { "names": [ "PIXI.WebGLRenderer" ] }, "description": "A reference to the current renderer
", "name": "renderer" } ], "___id": "T000002R004789", "___s": true, "$methods": [ { "comment": "/**\n * Will return a HTML Image of the target\n *\n * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture\n * to convert. If left empty will use use the main renderer\n * @return {HTMLImageElement} HTML Image of the target\n */", "meta": { "range": [ 1162, 1287 ], "filename": "WebGLExtract.js", "lineno": 41, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\extract\\webgl", "code": { "id": "astnode100050708", "name": "WebGLExtract#image", "type": "MethodDefinition", "paramnames": [ "target" ] }, "vars": { "": null } }, "description": "Will return a HTML Image of the target
", "params": [ { "type": { "names": [ "PIXI.DisplayObject", "PIXI.RenderTexture" ] }, "description": "A displayObject or renderTexture
", "name": "target" } ], "returns": [ { "type": { "names": [ "HTMLImageElement" ] }, "description": "
to convert. If left empty will use use the main rendererHTML Image of the target
" } ], "name": "image", "longname": "PIXI.WebGLExtract#image", "kind": "function", "memberof": "PIXI.WebGLExtract", "scope": "instance", "___id": "T000002R004794", "___s": true, "skip": true, "slug": "PIXI.WebGLExtractimage", "filepath": "extract\\webgl\\WebGLExtract.js" }, { "comment": "/**\n * Will return a a base64 encoded string of this target. It works by calling\n * `WebGLExtract.getCanvas` and then running toDataURL on that.\n *\n * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture\n * to convert. If left empty will use use the main renderer\n * @return {string} A base64 encoded string of the texture.\n */", "meta": { "range": [ 1691, 1765 ], "filename": "WebGLExtract.js", "lineno": 58, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\extract\\webgl", "code": { "id": "astnode100050730", "name": "WebGLExtract#base64", "type": "MethodDefinition", "paramnames": [ "target" ] }, "vars": { "": null } }, "description": "Will return a a base64 encoded string of this target. It works by calling
", "params": [ { "type": { "names": [ "PIXI.DisplayObject", "PIXI.RenderTexture" ] }, "description": "
WebGLExtract.getCanvas
and then running toDataURL on that.A displayObject or renderTexture
", "name": "target" } ], "returns": [ { "type": { "names": [ "string" ] }, "description": "
to convert. If left empty will use use the main rendererA base64 encoded string of the texture.
" } ], "name": "base64", "longname": "PIXI.WebGLExtract#base64", "kind": "function", "memberof": "PIXI.WebGLExtract", "scope": "instance", "___id": "T000002R004797", "___s": true, "skip": true, "slug": "PIXI.WebGLExtractbase64", "filepath": "extract\\webgl\\WebGLExtract.js" }, { "comment": "/**\n * Creates a Canvas element, renders this target to it and then returns it.\n *\n * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture\n * to convert. If left empty will use use the main renderer\n * @return {HTMLCanvasElement} A Canvas element with the texture rendered on.\n */", "meta": { "range": [ 2117, 4451 ], "filename": "WebGLExtract.js", "lineno": 70, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\extract\\webgl", "code": { "id": "astnode100050744", "name": "WebGLExtract#canvas", "type": "MethodDefinition", "paramnames": [ "target" ] }, "vars": { "": null } }, "description": "Creates a Canvas element, renders this target to it and then returns it.
", "params": [ { "type": { "names": [ "PIXI.DisplayObject", "PIXI.RenderTexture" ] }, "description": "A displayObject or renderTexture
", "name": "target" } ], "returns": [ { "type": { "names": [ "HTMLCanvasElement" ] }, "description": "
to convert. If left empty will use use the main rendererA Canvas element with the texture rendered on.
" } ], "name": "canvas", "longname": "PIXI.WebGLExtract#canvas", "kind": "function", "memberof": "PIXI.WebGLExtract", "scope": "instance", "___id": "T000002R004798", "___s": true, "skip": true, "slug": "PIXI.WebGLExtractcanvas", "filepath": "extract\\webgl\\WebGLExtract.js" }, { "comment": "/**\n * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA\n * order, with integer values between 0 and 255 (included).\n *\n * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture\n * to convert. If left empty will use use the main renderer\n * @return {Uint8ClampedArray} One-dimensional array containing the pixel data of the entire texture\n */", "meta": { "range": [ 4909, 6541 ], "filename": "WebGLExtract.js", "lineno": 162, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\extract\\webgl", "code": { "id": "astnode100051007", "name": "WebGLExtract#pixels", "type": "MethodDefinition", "paramnames": [ "target" ] }, "vars": { "": null } }, "description": "Will return a one-dimensional array containing the pixel data of the entire texture in RGBA
", "params": [ { "type": { "names": [ "PIXI.DisplayObject", "PIXI.RenderTexture" ] }, "description": "
order, with integer values between 0 and 255 (included).A displayObject or renderTexture
", "name": "target" } ], "returns": [ { "type": { "names": [ "Uint8ClampedArray" ] }, "description": "
to convert. If left empty will use use the main rendererOne-dimensional array containing the pixel data of the entire texture
" } ], "name": "pixels", "longname": "PIXI.WebGLExtract#pixels", "kind": "function", "memberof": "PIXI.WebGLExtract", "scope": "instance", "___id": "T000002R004823", "___s": true, "skip": true, "slug": "PIXI.WebGLExtractpixels", "filepath": "extract\\webgl\\WebGLExtract.js" }, { "comment": "/**\n * Destroys the extract\n *\n */", "meta": { "range": [ 6598, 6687 ], "filename": "WebGLExtract.js", "lineno": 228, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\extract\\webgl", "code": { "id": "astnode100051190", "name": "WebGLExtract#destroy", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "Destroys the extract
", "name": "destroy", "longname": "PIXI.WebGLExtract#destroy", "kind": "function", "memberof": "PIXI.WebGLExtract", "scope": "instance", "params": [], "___id": "T000002R004843", "___s": true, "skip": true, "slug": "PIXI.WebGLExtractdestroy", "filepath": "extract\\webgl\\WebGLExtract.js" }, { "comment": "/**\n * Will return a HTML Image of the target\n *\n * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture\n * to convert. If left empty will use use the main renderer\n * @return {HTMLImageElement} HTML Image of the target\n */", "meta": { "range": [ 1162, 1287 ], "filename": "WebGLExtract.js", "lineno": 41, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\extract\\webgl", "code": { "id": "astnode100125387", "name": "WebGLExtract#image", "type": "MethodDefinition", "paramnames": [ "target" ] }, "vars": { "": null } }, "description": "Will return a HTML Image of the target
", "params": [ { "type": { "names": [ "PIXI.DisplayObject", "PIXI.RenderTexture" ] }, "description": "A displayObject or renderTexture
", "name": "target" } ], "returns": [ { "type": { "names": [ "HTMLImageElement" ] }, "description": "
to convert. If left empty will use use the main rendererHTML Image of the target
" } ], "name": "image", "longname": "PIXI.WebGLExtract#image", "kind": "function", "memberof": "PIXI.WebGLExtract", "scope": "instance", "___id": "T000002R011728", "___s": true, "skip": true, "slug": "PIXI.WebGLExtractimage", "filepath": "extract\\webgl\\WebGLExtract.js" }, { "comment": "/**\n * Will return a a base64 encoded string of this target. It works by calling\n * `WebGLExtract.getCanvas` and then running toDataURL on that.\n *\n * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture\n * to convert. If left empty will use use the main renderer\n * @return {string} A base64 encoded string of the texture.\n */", "meta": { "range": [ 1691, 1765 ], "filename": "WebGLExtract.js", "lineno": 58, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\extract\\webgl", "code": { "id": "astnode100125409", "name": "WebGLExtract#base64", "type": "MethodDefinition", "paramnames": [ "target" ] }, "vars": { "": null } }, "description": "Will return a a base64 encoded string of this target. It works by calling
", "params": [ { "type": { "names": [ "PIXI.DisplayObject", "PIXI.RenderTexture" ] }, "description": "
WebGLExtract.getCanvas
and then running toDataURL on that.A displayObject or renderTexture
", "name": "target" } ], "returns": [ { "type": { "names": [ "string" ] }, "description": "
to convert. If left empty will use use the main rendererA base64 encoded string of the texture.
" } ], "name": "base64", "longname": "PIXI.WebGLExtract#base64", "kind": "function", "memberof": "PIXI.WebGLExtract", "scope": "instance", "___id": "T000002R011731", "___s": true, "skip": true, "slug": "PIXI.WebGLExtractbase64", "filepath": "extract\\webgl\\WebGLExtract.js" }, { "comment": "/**\n * Creates a Canvas element, renders this target to it and then returns it.\n *\n * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture\n * to convert. If left empty will use use the main renderer\n * @return {HTMLCanvasElement} A Canvas element with the texture rendered on.\n */", "meta": { "range": [ 2117, 4451 ], "filename": "WebGLExtract.js", "lineno": 70, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\extract\\webgl", "code": { "id": "astnode100125423", "name": "WebGLExtract#canvas", "type": "MethodDefinition", "paramnames": [ "target" ] }, "vars": { "": null } }, "description": "Creates a Canvas element, renders this target to it and then returns it.
", "params": [ { "type": { "names": [ "PIXI.DisplayObject", "PIXI.RenderTexture" ] }, "description": "A displayObject or renderTexture
", "name": "target" } ], "returns": [ { "type": { "names": [ "HTMLCanvasElement" ] }, "description": "
to convert. If left empty will use use the main rendererA Canvas element with the texture rendered on.
" } ], "name": "canvas", "longname": "PIXI.WebGLExtract#canvas", "kind": "function", "memberof": "PIXI.WebGLExtract", "scope": "instance", "___id": "T000002R011732", "___s": true, "skip": true, "slug": "PIXI.WebGLExtractcanvas", "filepath": "extract\\webgl\\WebGLExtract.js" }, { "comment": "/**\n * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA\n * order, with integer values between 0 and 255 (included).\n *\n * @param {PIXI.DisplayObject|PIXI.RenderTexture} target - A displayObject or renderTexture\n * to convert. If left empty will use use the main renderer\n * @return {Uint8ClampedArray} One-dimensional array containing the pixel data of the entire texture\n */", "meta": { "range": [ 4909, 6541 ], "filename": "WebGLExtract.js", "lineno": 162, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\extract\\webgl", "code": { "id": "astnode100125686", "name": "WebGLExtract#pixels", "type": "MethodDefinition", "paramnames": [ "target" ] }, "vars": { "": null } }, "description": "Will return a one-dimensional array containing the pixel data of the entire texture in RGBA
", "params": [ { "type": { "names": [ "PIXI.DisplayObject", "PIXI.RenderTexture" ] }, "description": "
order, with integer values between 0 and 255 (included).A displayObject or renderTexture
", "name": "target" } ], "returns": [ { "type": { "names": [ "Uint8ClampedArray" ] }, "description": "
to convert. If left empty will use use the main rendererOne-dimensional array containing the pixel data of the entire texture
" } ], "name": "pixels", "longname": "PIXI.WebGLExtract#pixels", "kind": "function", "memberof": "PIXI.WebGLExtract", "scope": "instance", "___id": "T000002R011757", "___s": true, "skip": true, "slug": "PIXI.WebGLExtractpixels", "filepath": "extract\\webgl\\WebGLExtract.js" }, { "comment": "/**\n * Destroys the extract\n *\n */", "meta": { "range": [ 6598, 6687 ], "filename": "WebGLExtract.js", "lineno": 228, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\extract\\webgl", "code": { "id": "astnode100125869", "name": "WebGLExtract#destroy", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "Destroys the extract
", "name": "destroy", "longname": "PIXI.WebGLExtract#destroy", "kind": "function", "memberof": "PIXI.WebGLExtract", "scope": "instance", "params": [], "___id": "T000002R011777", "___s": true, "skip": true, "slug": "PIXI.WebGLExtractdestroy", "filepath": "extract\\webgl\\WebGLExtract.js" } ], "$attributes": [], "$staticmethods": [], "$staticproperties": [], "$augments": [], "$augmentedBy": [], "filepath": "extract\\webgl\\WebGLExtract.js" }