Name | Type | Description |
---|---|---|
renderer |
PIXI.Renderer |
The renderer this System works for. |
Extends
Members
-
this uniform group is attached to filter uniforms when used
-
A very simple geometry used when drawing a filter effect to the screen
-
renderer PIXI.Renderer inherited
-
The renderer this manager works for.
-
a pool for storing filter states, save us creating new ones each tick
-
tempRect PIXI.Rectangle
-
Temporary rect for maths
-
stores a bunch of PO2 textures used for filtering
Methods
-
Draws a filter.
Name Type Description filter
PIXI.Filter The filter to draw.
input
PIXI.RenderTarget The input render target.
output
PIXI.RenderTarget The target to output to.
clear
boolean Should the output be cleared before rendering to it
-
calculateScreenSpaceMatrix (outputMatrix)PIXI.Matrix
-
Calculates the mapped matrix.
TODO playing around here.. this is temporary - (will end up in the shader) this returns a matrix that will normalise map filter cords in the filter to screen space
Name Type Description outputMatrix
PIXI.Matrix the matrix to output to.
Returns:
Type Description PIXI.Matrix The mapped matrix. -
calculateSpriteMatrix (outputMatrix, sprite)PIXI.Matrix
-
This will map the filter coord so that a texture can be used based on the transform of a sprite
Name Type Description outputMatrix
PIXI.Matrix The matrix to output to.
sprite
PIXI.Sprite The sprite to map to.
Returns:
Type Description PIXI.Matrix The mapped matrix. -
contextChange () inherited
-
Generic method called when there is a WebGL context change.
-
destroy (contextLost) overrides
-
Destroys this Filter System.
Name Type Default Description contextLost
boolean false optional context was lost, do not free shaders
-
Empties the texture pool.
-
getFilterTexture (resolution)PIXI.RenderTexture
-
Gets extra render texture to use inside current filter
Name Type Description resolution
number resolution of the renderTexture
Returns:
Type Description PIXI.RenderTexture -
Pops off the filter and applies it.
-
Adds a new filter to the System.
Name Type Description target
PIXI.DisplayObject The target of the filter to render.
filters
Array.<PIXI.Filter> The filters to apply.
-
Frees a render texture back into the pool.
Name Type Description renderTexture
PIXI.RenderTarget The renderTarget to free