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:
parent
cc8083746a
commit
490d232f48
1 changed files with 4 additions and 3 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue