On this page

# Mouse

### new Mouse(canvas, world, callback)

Create and start mouse obj, args: a model, and a callback method.

Parameters:

Name | Type | Description
--- | --- | ---
`canvas` | Canvas | String | The canvas upon which we track the mouse. If a string is given, get the HTML element by that name
`world` | world | World instance
`callback` | function | callback(mouse) called on every mouse action

Source
  - Mouse.js, line 11

## Methods

### start()

Start the mouseListeners.

Source
  - Mouse.js, line 32

Returns:

this Return this instance for chaining

### stop()

Start the mouseListeners.

Source
  - Mouse.js, line 44

Returns:

this Return this instance for chaining

Type anything to view search result