Skip to content

Commit 4548d70

Browse files
committed
Experimenting with new MainLoop + position interpolation. (reverted from commit e49d45e)
1 parent e49d45e commit 4548d70

8 files changed

Lines changed: 6 additions & 431 deletions

File tree

build/config.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@
134134
<script src="$path/src/core/FlexGrid.js"></script>
135135
<script src="$path/src/core/FlexLayer.js"></script>
136136
<script src="$path/src/core/ScaleManager.js"></script>
137-
<script src="$path/src/core/MainLoop.js"></script>
138137
<script src="$path/src/core/Game.js"></script>
139138
140139
<script src="$path/src/input/Input.js"></script>
@@ -297,10 +296,10 @@
297296
}
298297

299298
echo <<<EOL
300-
<script src="$path/src/utils/Device.js"></script>
301-
<script src="$path/src/utils/DOM.js"></script>
302-
<script src="$path/src/utils/Canvas.js"></script>
303-
<script src="$path/src/utils/RequestAnimationFrame.js"></script>
299+
<script src="$path/src/system/Device.js"></script>
300+
<script src="$path/src/system/DOM.js"></script>
301+
<script src="$path/src/system/Canvas.js"></script>
302+
<script src="$path/src/system/RequestAnimationFrame.js"></script>
304303
305304
<script src="$path/src/math/Math.js"></script>
306305
<script src="$path/src/math/RandomDataGenerator.js"></script>

src/core/Game.js

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -144,17 +144,11 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant
144144
*/
145145
this.isRunning = false;
146146

147-
/**
148-
* @property {Phaser.MainLoop} mainloop - Automatically handles the core game loop via requestAnimationFrame or setTimeout.
149-
* @protected
150-
*/
151-
this.mainloop = null;
152-
153147
/**
154148
* @property {Phaser.RequestAnimationFrame} raf - Automatically handles the core game loop via requestAnimationFrame or setTimeout
155149
* @protected
156150
*/
157-
// this.raf = null;
151+
this.raf = null;
158152

159153
/**
160154
* @property {Phaser.GameObjectFactory} add - Reference to the Phaser.GameObjectFactory.
@@ -589,7 +583,6 @@ Phaser.Game.prototype = {
589583

590584
this.isRunning = true;
591585

592-
/*
593586
if (this.config && this.config['forceSetTimeOut'])
594587
{
595588
this.raf = new Phaser.RequestAnimationFrame(this, this.config['forceSetTimeOut']);
@@ -600,7 +593,6 @@ Phaser.Game.prototype = {
600593
}
601594

602595
this._kickstart = true;
603-
*/
604596

605597
if (window['focus'])
606598
{
@@ -610,11 +602,7 @@ Phaser.Game.prototype = {
610602
}
611603
}
612604

613-
this.mainloop = new Phaser.MainLoop(this);
614-
615-
this.mainloop.start();
616-
617-
// this.raf.start();
605+
this.raf.start();
618606

619607
},
620608

0 commit comments

Comments
 (0)