Show:

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

Matter.Events.on

(object, eventNames, callback)

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

Parameters

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

Item Index

Methods

0.11.0