mirror of
https://github.com/liabru/matter-js.git
synced 2025-01-12 16:08:50 -05:00
change Matter.MouseConstraint to use engine beforeUpdate event, closes #73
This commit is contained in:
parent
68382d62c3
commit
ffb128cd0d
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,7 @@ var Bounds = require('../geometry/Bounds');
|
|||
|
||||
var mouseConstraint = Common.extend(defaults, options);
|
||||
|
||||
Events.on(engine, 'tick', function() {
|
||||
Events.on(engine, 'beforeUpdate', function() {
|
||||
var allBodies = Composite.allBodies(engine.world);
|
||||
MouseConstraint.update(mouseConstraint, allBodies);
|
||||
_triggerEvents(mouseConstraint);
|
||||
|
|
Loading…
Reference in a new issue