From 239e4162204048d1dddd6637e4a68761343009f0 Mon Sep 17 00:00:00 2001 From: polygonboutique Date: Tue, 1 Nov 2016 16:32:06 +0100 Subject: [PATCH] triangle collision meshes. --- src/game-lib-game.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/game-lib-game.js b/src/game-lib-game.js index e8c5753..1c8a19c 100644 --- a/src/game-lib-game.js +++ b/src/game-lib-game.js @@ -12,14 +12,14 @@ GameLib.D3.Game.prototype.addScene = function( }; GameLib.D3.Game.prototype.processPhysics = function ( - timestep + dt ) { for(var s in this.scenes) { var scene = this.scenes[s]; for(var w in scene.worlds) { var world = scene.worlds[w]; - world.step(timestep); + world.step(dt); } } }; @@ -36,14 +36,15 @@ GameLib.D3.Game.prototype.render = function( }; GameLib.D3.Game.prototype.update = function( - dt + dt, + fixedDt ) { for(var s in this.scenes) { var scene = this.scenes[s]; for(var w in scene.worlds) { var world = scene.worlds[w]; - world.step(dt); + world.step(fixedDt); } scene.update(dt);