0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-12-25 13:39:06 -05:00

added default for delta parameter in Engine.update, closes #200

This commit is contained in:
liabru 2016-02-07 16:06:54 +00:00
parent cc8083746a
commit 490d232f48

View file

@ -96,11 +96,12 @@ var Body = require('../body/Body');
* Triggers `collisionStart`, `collisionActive` and `collisionEnd` events.
* @method update
* @param {engine} engine
* @param {number} delta
* @param {number} [correction]
* @param {number} [delta=16.666]
* @param {number} [correction=1]
*/
Engine.update = function(engine, delta, correction) {
correction = (typeof correction !== 'undefined') ? correction : 1;
delta = delta || 1000 / 60;
correction = correction || 1;
var world = engine.world,
timing = engine.timing,