Class: DisplacementFilter

PIXI.filters. DisplacementFilter

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.

new PIXI.filters.DisplacementFilter(sprite, scale)

Name Type Description
sprite PIXI.Sprite

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

scale number

The scale of the displacement

Extends

Members

map

Sets the texture to use for the displacement.

Methods

apply(filterManager, input, output)

Applies the filter.

Name Type Description
filterManager PIXI.FilterManager

The manager.

input PIXI.RenderTarget

The input target.

output PIXI.RenderTarget

The output target.