Class: DisplacementFilter

DisplacementFilter


new DisplacementFilter(sprite)

The DisplacementFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object.
You can use this filter to apply all manor of crazy warping effects
Currently the r property of the texture is used to offset the x and the g property of the texture is used to offset the y.

Parameters:
Name Type Description
sprite Sprite

the sprite used for the displacement map. (make sure its added to the scene!)

Source:

Extends

Members


padding :number

The extra padding that the filter might need

Type:
  • number
Inherited From:
Source:

uniforms :object

The uniforms as an object

Type:
  • object
Inherited From:
Source:

Methods


applyFilter(renderer, input, output, clear)

Applies the filter

Parameters:
Name Type Description
renderer PIXI.WebGLRenderer

The renderer to retrieve the filter from

input PIXI.RenderTarget
output PIXI.RenderTarget
clear boolean

Whether or not we want to clear the outputTarget

Inherited From:
Overrides:
Source:

getShader(renderer)

Grabs a shader from the current renderer

Parameters:
Name Type Description
renderer PIXI.WebGLRenderer

The renderer to retrieve the shader from

Inherited From:
Source:

syncUniform()

Syncs a uniform between the class object and the shaders.

Inherited From:
Source: