Navigation
These archived docs are for Phaser 2.2.2 Phaser 3 docs can be found on newdocs.phaser.io.
Phaser CE docs can be found on the Phaser CE Documentation site.

Constructor

PIXI. AlphaMaskFilter

new AlphaMaskFilter(texture)

The AlphaMaskFilter 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
texture PIXI.Texture

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

Source code: pixi/filters/AlphaMaskFilter.js, line 5

Extends

Public Properties

dirty : boolean

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

map : PIXI.Texture

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

Source code: pixi/filters/AlphaMaskFilter.js, line 84

padding : number

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

Public Methods

onTextureLoaded()

Sets the map dimensions uniforms when the texture becomes available.

Source code: pixi/filters/AlphaMaskFilter.js, line 71

syncUniforms()

Syncs the uniforms between the class object and the shaders.

Inherited From
Source code: pixi/filters/AbstractFilter.js, line 60