Namespace: extract

PIXI.extract

This namespace provides renderer-specific plugins for exporting content from a renderer. For instance, these plugins can be used for saving an Image, Canvas element or for exporting the raw image data (pixels).

Do not instantiate these plugins directly. It is available from the renderer.plugins property. See PIXI.CanvasRenderer#plugins or PIXI.Renderer#plugins.

Example

// Create a new app (will auto-add extract plugin to renderer)
const app = new PIXI.Application();

// Draw a red circle
const graphics = new PIXI.Graphics()
    .beginFill(0xFF0000)
    .drawCircle(0, 0, 50);

// Render the graphics as an HTMLImageElement
const image = app.renderer.plugins.extract.image(graphics);
document.body.appendChild(image);

Classes

CanvasExtract
Extract
WebGLExtract