PIXI. DisplacementFilter

new DisplacementFilter(texture)

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 offset the x and the g property of the texture is used to offset the y.

Parameters:
Name Type Description
texture PIXI.Texture

The texture used for the displacement map * must be power of 2 texture at the moment

Source - pixi/filters/DisplacementFilter.js, line 5

Extends

Members

dirty :Boolean

Inherited From:
Source - pixi/filters/AbstractFilter.js, line 31

map :PIXI.Texture

The texture used for the displacement map. Must be power of 2 texture.

Source - pixi/filters/DisplacementFilter.js, line 91

offset :PIXI.Point

The offset used to move the displacement map.

Source - pixi/filters/DisplacementFilter.js, line 121

padding :Number

Inherited From:
Source - pixi/filters/AbstractFilter.js, line 37

scale :PIXI.Point

The multiplier used to scale the displacement result from the map calculation.

Source - pixi/filters/DisplacementFilter.js, line 106

Methods

onTextureLoaded()

Sets the map dimensions uniforms when the texture becomes available.

Source - pixi/filters/DisplacementFilter.js, line 78

syncUniforms()

Syncs the uniforms between the class object and the shaders.

Inherited From:
Source - pixi/filters/AbstractFilter.js, line 60
Phaser Copyright © 2012-2014 Photon Storm Ltd.
Documentation generated by JSDoc 3.3.0-dev on Wed Dec 03 2014 10:31:15 GMT-0000 (GMT) using the DocStrap template.