#

API Docs for: 2.0.0
Show: Inherited Protected Private Deprecated

# AlphaMaskFilter Class

Extends AbstractFilter
Defined in: `src/pixi/filters/AlphaMaskFilter.js:5`
Module: PIXI

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.

## Constructor

### `AlphaMaskFilter`

(

- `texture`

)

Defined in `src/pixi/filters/AlphaMaskFilter.js:5`

#### Parameters:

- `texture` Texture

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

- Index
- Methods
- Properties

## Item Index

### Methods

- onTextureLoaded
- syncUniforms

### Properties

- dirty
- fragmentSrc
- map
- padding
- passes
- shaders
- uniforms

## Methods

### `onTextureLoaded`

()

Defined in `src/pixi/filters/AlphaMaskFilter.js:71`

Sets the map dimensions uniforms when the texture becomes available.

### `syncUniforms`

()

Inherited from AbstractFilter: `src/pixi/filters/AbstractFilter.js:60`

Syncs the uniforms between the class object and the shaders.

## Properties

### `dirty`

Boolean

Inherited from AbstractFilter: `src/pixi/filters/AbstractFilter.js:31`

### `fragmentSrc`

Array private

Inherited from AbstractFilter: `src/pixi/filters/AbstractFilter.js:50`

### `map`

Texture

Defined in `src/pixi/filters/AlphaMaskFilter.js:84`

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

### `padding`

Number

Inherited from AbstractFilter: `src/pixi/filters/AbstractFilter.js:37`

### `passes`

Array an array of filter objects private

Inherited from AbstractFilter: `src/pixi/filters/AbstractFilter.js:15`

An array of passes - some filters contain a few steps this array simply stores the steps in a liniear fashion. For example the blur filter has two passes blurX and blurY.

### `shaders`

Array an array of shaders private

Inherited from AbstractFilter: `src/pixi/filters/AbstractFilter.js:24`

### `uniforms`

Object private

Inherited from AbstractFilter: `src/pixi/filters/AbstractFilter.js:43`