Options
All
  • Public
  • Public/Protected
  • All
Menu

Experimental!

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

memberof

PIXI

Hierarchy

  • RenderTexturePool

Index

Constructors

constructor

Properties

Private _pixelsHeight

_pixelsHeight: any

Private _pixelsWidth

_pixelsWidth: any

enableFullScreen

enableFullScreen: boolean

textureOptions

textureOptions: IBaseTextureOptions<any>

texturePool

texturePool: {}

Type declaration

Static SCREEN_KEY

SCREEN_KEY: string

Key that is used to store fullscreen renderTextures in a pool

static
const

{string}

Methods

clear

  • clear(destroyTextures?: boolean): void
  • Clears the pool

    Parameters

    • Optional destroyTextures: boolean

    Returns void

createTexture

  • createTexture(realWidth: number, realHeight: number): RenderTexture
  • creates of texture with params that were specified in pool constructor

    Parameters

    • realWidth: number

      width of texture in pixels

    • realHeight: number

      height of texture in pixels

    Returns RenderTexture

getFilterTexture

  • Gets extra texture of the same size as input renderTexture

    getFilterTexture(input, 0.5) or getFilterTexture(0.5, input)

    Parameters

    • input: RenderTexture

      renderTexture from which size and resolution will be copied

    • Optional resolution: number

    Returns RenderTexture

Protected getOptimalTexture

  • getOptimalTexture(minWidth: number, minHeight: number, resolution?: number): RenderTexture
  • Gets a Power-of-Two render texture or fullScreen texture

    Parameters

    • minWidth: number

      The minimum width of the render texture in real pixels.

    • minHeight: number

      The minimum height of the render texture in real pixels.

    • Optional resolution: number

    Returns RenderTexture

    The new render texture.

returnFilterTexture

  • Alias for returnTexture, to be compliant with FilterSystem interface

    Parameters

    Returns void

returnTexture

  • Place a render texture back into the pool.

    Parameters

    Returns void

setScreenSize

  • setScreenSize(size: ISize): void
  • If screen size was changed, drops all screen-sized textures, sets new screen size, sets enableFullScreen to true

    Size is measured in pixels, renderer.view can be passed here, not renderer.screen

    Parameters

    • size: ISize

      Initial size of screen

    Returns void

Generated using TypeDoc