Finalized replay mode. Added ORBIT camera mode. Bug fixes.

This commit is contained in:
Thibaut Despoulain
2012-10-31 15:35:44 +01:00
parent 3cd565ff50
commit 3e8d91af91
7 changed files with 91 additions and 46 deletions
+4 -2
View File
@@ -52,7 +52,7 @@ bkcore.hexgl.RaceData.prototype.tick = function(time)
bkcore.hexgl.RaceData.prototype.applyInterpolated = function(time)
{
while(this.seek < this.last && this.data[this.seek+1].time < time)
while(this.seek < this.last && this.data[this.seek+1][0] < time)
++this.seek;
var prev = this.data[this.seek];
@@ -67,7 +67,7 @@ bkcore.hexgl.RaceData.prototype.applyInterpolated = function(time)
// no interpolation
if(this.seek == this.last || this.seek == 0)
this.shipControls.teleport(prev.position, prev.quaternion);
this.shipControls.teleport(this._pp, this._pq);
// interpolation
var next = this.data[this.seek+1];
@@ -94,4 +94,6 @@ bkcore.hexgl.RaceData.prototype.export = function()
bkcore.hexgl.RaceData.prototype.import = function(imp)
{
this.data = imp;
this.last = this.data.length-1;
console.log(this.data);
}