Class: MouseWheel

Phaser. MouseWheel

new MouseWheel(game)

The mouse wheel input handler.

Parameters:
Name Type Description
game Phaser.Game
Source:
src/input/MouseWheel.js line 7

Members

<static, constant> DOWN : number

Type:
  • number
Source:
src/input/MouseWheel.js line 105

<static, constant> UP : number

Type:
  • number
Source:
src/input/MouseWheel.js line 99

<readonly> active : boolean

Whether the handler is active.

Type:
  • boolean
Source:
src/input/MouseWheel.js line 42
See:

callback : function

A callback to call for each wheel event. It receives an event parameter.

Type:
  • function
Source:
src/input/MouseWheel.js line 49

callbackContext : any

The context for Phaser.MouseWheel#callback. The default is Phaser.MouseWheel#game.

Type:
  • any
Source:
src/input/MouseWheel.js line 56

<readonly> delta : number

The direction of the last wheel event. Between -1 (down) and 1 (up).

Type:
  • number
Source:
src/input/MouseWheel.js line 65

element : HTMLElement

The element where event listeners are added (the game canvas).

Type:
  • HTMLElement
Source:
src/input/MouseWheel.js line 26

game : Phaser.Game

The currently running game.

Type:
Source:
src/input/MouseWheel.js line 14

input : Phaser.Input

The Input Manager.

Type:
Source:
src/input/MouseWheel.js line 20

preventDefault : boolean

Whether the default mouse wheel actions (usually zoom or pan) are cancelled.

Type:
  • boolean
Default Value:
  • true
Source:
src/input/MouseWheel.js line 33

Methods

start()

Activates the handler, unless unsupported or already activate.

Source:
src/input/MouseWheel.js line 107
Returns:
  • True if the handler was started, otherwise false.
Type
boolean

stop()

Deactivates the handler.

Source:
src/input/MouseWheel.js line 137

phaser-ce@2.11.0 is on GitHub and NPM

Documentation generated by JSDoc 3.5.4 on 2018-06-26 using Tomorrow.