0
0
Fork 0
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:
liabru 2017-01-15 16:08:06 +00:00
parent 68382d62c3
commit ffb128cd0d

View file

@ -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);