Matter.Events

Defined in: src/core/Events.js:1

The Matter.Events module contains methods to fire and listen to events on other objects.

See the included usage examples.

Methods

Matter.Events.off

(object, eventNames, callback)

Removes the given event callback. If no callback, clears all callbacks in eventNames. If no eventNames, clears all events.

Parameters

@ src/core/Events.js:38

Matter.Events.on

(object, eventNames, callback)

Subscribes a callback function to the given object's eventName.

Parameters

@ src/core/Events.js:17

Matter.Events.trigger

(object, eventNames, event)

Fires all the callbacks subscribed to the given object's eventName, in the order they subscribed, if any.

Parameters

@ src/core/Events.js:74

Item Index

Methods