new Filter(game, uniforms, fragmentSrc)
This is a base Filter template to use for any Phaser filter development.
Parameters:
| Name | Type | Description |
|---|---|---|
game |
Phaser.Game | A reference to the currently running game. |
uniforms |
Object | Uniform mappings object |
fragmentSrc |
Array | The fragment shader code. |
- Source:
Members
-
dirty
-
- Default Value:
- true
- Source:
Properties:
Name Type Description dirtyboolean Internal PIXI var.
-
fragmentSrc
-
- Source:
Properties:
Name Type Description fragmentSrcarray The fragment shader code.
-
game
-
- Source:
Properties:
Name Type Description gamePhaser.Game A reference to the currently running game.
-
height
-
- Source:
Properties:
Name Type Description heightnumber The height (resolution uniform)
-
padding
-
- Default Value:
- 0
- Source:
Properties:
Name Type Description paddingnumber Internal PIXI var.
-
type
-
- Source:
Properties:
Name Type Description typenumber The const type of this object, either Phaser.WEBGL_FILTER or Phaser.CANVAS_FILTER.
-
uniforms
-
- Source:
Properties:
Name Type Description uniformsobject Default uniform mappings.
-
width
-
- Source:
Properties:
Name Type Description widthnumber The width (resolution uniform)
Methods
-
destroy()
-
Clear down this Filter and null out references
- Source:
-
init()
-
Should be over-ridden.
- Source:
-
setResolution(width, height)
-
Set the resolution uniforms on the filter.
Parameters:
Name Type Description widthnumber The width of the display.
heightnumber The height of the display.
- Source:
-
update(pointer)
-
Updates the filter.
Parameters:
Name Type Argument Description pointerPhaser.Pointer <optional>
A Pointer object to use for the filter. The coordinates are mapped to the mouse uniform.
- Source: