Class: CanvasPool

CanvasPool

Texture pool, used by FilterSystem and plugins.

Stores collection of temporary pow2 or screen-sized renderTextures

If you use custom RenderTexturePool for your filters, you can use methods getFilterTexture and returnFilterTexture same as in

Members

enableFullScreen boolean

Allow renderTextures of the same size as screen, not just pow2

Automatically sets to true after setScreenSize

Default Value:
  • false

Methods

getOptimalCanvasAndContext (minWidth, minHeight, resolution) CanvasAndContext

Gets a Power-of-Two render texture or fullScreen texture

Name Type Default Description
minWidth number

The minimum width of the render texture.

minHeight number

The minimum height of the render texture.

resolution number 1

The resolution of the render texture.

Returns:
Type Description
CanvasAndContext The new render texture.

returnCanvasAndContext (canvasAndContext) void

Place a render texture back into the pool.

Name Type Description
canvasAndContext CanvasAndContext