How to use the matter-js.Events.off function in matter-js

To help you get started, we’ve selected a few matter-js examples, based on popular ways it is used in public projects.

github plinko-team / plinko / src / server / serverEngine.js View on Github external
unregisterPhysicsEvents() {
    Events.off(this.engine, 'collisionStart', this.onCollisionStart);
  }
github FormidableLabs / react-game-kit / src / components / world.js View on Github external
componentWillUnmount() {
    this.context.loop.unsubscribe(this.loopID);
    Events.off(this.engine, 'afterUpdate', this.props.onUpdate);
    Events.off(this.engine, 'collisionStart', this.props.onCollision);
  }
github FormidableLabs / react-game-kit / src / native / components / world.js View on Github external
componentWillUnmount() {
    this.context.loop.unsubscribe(this.loopID);
    Events.off(this.engine, 'afterUpdate', this.props.onUpdate);
    Events.off(this.engine, 'collisionStart', this.props.onCollision);
  }
github FormidableLabs / react-game-kit / src / native / components / world.js View on Github external
componentWillUnmount() {
    this.context.loop.unsubscribe(this.loopID);
    Events.off(this.engine, 'afterUpdate', this.props.onUpdate);
    Events.off(this.engine, 'collisionStart', this.props.onCollision);
  }
github FormidableLabs / react-game-kit / src / components / world.js View on Github external
componentWillUnmount() {
    this.context.loop.unsubscribe(this.loopID);
    Events.off(this.engine, 'afterUpdate', this.props.onUpdate);
    Events.off(this.engine, 'collisionStart', this.props.onCollision);
  }