0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-12-26 13:49:01 -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. * Triggers `collisionStart`, `collisionActive` and `collisionEnd` events.
* @method update * @method update
* @param {engine} engine * @param {engine} engine
* @param {number} delta * @param {number} [delta=16.666]
* @param {number} [correction] * @param {number} [correction=1]
*/ */
Engine.update = function(engine, delta, correction) { Engine.update = function(engine, delta, correction) {
correction = (typeof correction !== 'undefined') ? correction : 1; delta = delta || 1000 / 60;
correction = correction || 1;
var world = engine.world, var world = engine.world,
timing = engine.timing, timing = engine.timing,