@@ -7,7 +7,6 @@ var RequestAnimationFrame = require('../dom/RequestAnimationFrame');
77// fps: {
88// min: 10,
99// target: 60,
10- // max: 120
1110// forceSetTimeOut: false,
1211// deltaHistory: 10,
1312// panicMax: 120
@@ -29,11 +28,9 @@ var TimeStep = new Class({
2928 this . running = false ;
3029
3130 this . minFps = GetValue ( config , 'min' , 5 ) ;
32- this . maxFps = GetValue ( config , 'max' , 120 ) ;
3331 this . targetFps = GetValue ( config , 'target' , 60 ) ;
3432
3533 this . _min = 1000 / this . minFps ; // 200ms between frames (i.e. super slow!)
36- this . _max = 1000 / this . maxFps ; // 8.333ms between frames (i.e. super fast, 120Hz displays)
3734 this . _target = 1000 / this . targetFps ; // 16.666ms between frames (i.e. normal)
3835
3936 // 200 / 1000 = 0.2 (5fps)
@@ -124,7 +121,7 @@ var TimeStep = new Class({
124121
125122 for ( var i = 0 ; i < this . deltaSmoothingMax ; i ++ )
126123 {
127- this . deltaHistory [ i ] = this . _target ;
124+ this . deltaHistory [ i ] = 0 ;
128125 }
129126
130127 this . delta = 0 ;
@@ -185,8 +182,7 @@ var TimeStep = new Class({
185182 // debug = (time - this.lastTime);
186183 }
187184
188- // min / max range (yes, the < and > should be this way around)
189- if ( dt > this . _min || dt < this . _max )
185+ if ( dt > this . _min )
190186 {
191187 // Probably super bad start time or browser tab context loss,
192188 // so use the last 'sane' dt value
@@ -195,8 +191,8 @@ var TimeStep = new Class({
195191
196192 dt = history [ idx ] ;
197193
198- // Clamp delta to min max range (in case history has become corrupted somehow)
199- dt = Math . max ( Math . min ( dt , this . _max ) , this . _min ) ;
194+ // Clamp delta to min (in case history has become corrupted somehow)
195+ dt = Math . min ( dt , this . _min ) ;
200196 }
201197
202198 // Smooth out the delta over the previous X frames
0 commit comments