Examples - Fix Variable Timestep not Starting
This commit is contained in:
parent
5c4e3a55b7
commit
8d6f1d8812
1 changed files with 1 additions and 12 deletions
|
@ -1,15 +1,3 @@
|
|||
//void main() {
|
||||
// double lastTime = performance.now();
|
||||
// while(true) {
|
||||
// double currentTime = performance.now();
|
||||
// double delta = currentTime - lastTime;
|
||||
//
|
||||
// update(delta);
|
||||
//
|
||||
// lastTime = currentTime;
|
||||
// }
|
||||
//}
|
||||
|
||||
import 'dart:html';
|
||||
import 'package:browserloop/game/Game.dart';
|
||||
import 'package:browserloop/game/LoopExample.dart';
|
||||
|
@ -25,6 +13,7 @@ class VariableTimestep implements LoopExample {
|
|||
Stopwatch elapsed = new Stopwatch();
|
||||
|
||||
VariableTimestep(Game this.game) {
|
||||
window.requestAnimationFrame(eventloop);
|
||||
}
|
||||
|
||||
void eventloop(num time) {
|
||||
|
|
Loading…
Reference in a new issue