Class: Filter

Phaser. Filter

Phaser - Filter

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

Properties:
Name Type Description
dirty boolean

Internal PIXI var.

Default Value:
  • true
Source:

fragmentSrc

Properties:
Name Type Description
fragmentSrc array

The fragment shader code.

Source:

game

Properties:
Name Type Description
game Phaser.Game

A reference to the currently running game.

Source:

height

Properties:
Name Type Description
height number

The height (resolution uniform)

Source:

padding

Properties:
Name Type Description
padding number

Internal PIXI var.

Default Value:
  • 0
Source:

type

Properties:
Name Type Description
type number

The const type of this object, either Phaser.WEBGL_FILTER or Phaser.CANVAS_FILTER.

Source:

uniforms

Properties:
Name Type Description
uniforms object

Default uniform mappings.

Source:

width

Properties:
Name Type Description
width number

The width (resolution uniform)

Source:

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
width number

The width of the display.

height number

The height of the display.

Source:

update(pointer)

Updates the filter.

Parameters:
Name Type Argument Description
pointer Phaser.Pointer <optional>

A Pointer object to use for the filter. The coordinates are mapped to the mouse uniform.

Source:
Phaser Copyright © 2012-2014 Photon Storm Ltd.
Documentation generated by JSDoc 3.3.0-dev on Fri Jul 18 2014 12:36:42 GMT+0100 (BST) using the DocStrap template.