Improve physics

This commit is contained in:
schmelczerandras 2020-10-06 09:26:56 +02:00
parent 8b87b68dae
commit ec0b700313
14 changed files with 181 additions and 71 deletions

View file

@ -5,7 +5,9 @@ export class DeltaTimeCalculator {
document.addEventListener('visibilitychange', this.handleVisibilityChange.bind(this));
}
public getNextDeltaTime(currentTime: DOMHighResTimeStamp): DOMHighResTimeStamp {
public getNextDeltaTimeInMilliseconds(
currentTime: DOMHighResTimeStamp
): DOMHighResTimeStamp {
if (this.previousTime === null) {
this.previousTime = currentTime;
}