PIXI.CanvasPrepare

class CanvasPrepare extends PIXI.BasePrepare

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

This cannot be done directly for Canvas like in WebGL, but the effect can be achieved by drawing textures to an offline canvas. This draw call will force the texture to be moved onto the GPU.

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

Constructor


new PIXI.CanvasPrepare(renderer: PIXI.CanvasRenderer) → {}
Parameters:
Name Type Description
renderer PIXI.CanvasRenderer

A reference to the current renderer

Summary


Properties from CanvasPrepare

HTMLCanvasElement
canvas
CanvasRenderingContext2D
ctx

Methods from CanvasPrepare

void
destroy()

Destroys the plugin, don't use after this

Properties inherited from BasePrepare

Array<Function>
addHooks
Array<Function>
completes
boolean
ticking
Array<Function>
uploadHooks
Array<any>
protected queue

Collection of items to uploads at once.

PIXI.AbstractRenderer
protected renderer

Reference to the renderer.

any
protected uploadHookHelper

Public Properties


canvas CanvasPrepare.ts:65
canvas: HTMLCanvasElement

An offline canvas to render textures to

ctx CanvasPrepare.ts:70
ctx: CanvasRenderingContext2D

The context to the canvas

Public Methods


destroy CanvasPrepare.ts:96
destroy() → {void}

Destroys the plugin, don't use after this

Returns:
Type Description
void

Powered by webdoc!