Skip to content

Commit 51cadbd

Browse files
author
Nathan Bolton
committed
Comment out fps meter
1 parent 05fd339 commit 51cadbd

File tree

1 file changed

+33
-31
lines changed

1 file changed

+33
-31
lines changed

js/rpg_core/Graphics.js

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ Graphics.initialize = function(width, height, type) {
4040
this._videoLoading = false;
4141
this._upperCanvas = null;
4242
this._renderer = null;
43-
this._fpsMeter = null;
43+
//this._fpsMeter = null;
4444
this._modeBox = null;
4545
this._skipCount = 0;
4646
this._maxSkip = 3;
4747
this._rendered = false;
4848
this._loadingImage = null;
4949
this._loadingCount = 0;
50-
this._fpsMeterToggled = false;
50+
//this._fpsMeterToggled = false;
5151
this._stretchEnabled = this._defaultStretchMode();
5252

5353
this._canUseDifferenceBlend = false;
@@ -136,9 +136,9 @@ Graphics.BLEND_SCREEN = 3;
136136
* @method tickStart
137137
*/
138138
Graphics.tickStart = function() {
139-
if (this._fpsMeter) {
140-
this._fpsMeter.tickStart();
141-
}
139+
//if (this._fpsMeter) {
140+
// this._fpsMeter.tickStart();
141+
//}
142142
};
143143

144144
/**
@@ -148,9 +148,9 @@ Graphics.tickStart = function() {
148148
* @method tickEnd
149149
*/
150150
Graphics.tickEnd = function() {
151-
if (this._fpsMeter && this._rendered) {
152-
this._fpsMeter.tick();
153-
}
151+
//if (this._fpsMeter && this._rendered) {
152+
// this._fpsMeter.tick();
153+
//}
154154
};
155155

156156
/**
@@ -305,7 +305,9 @@ Graphics._showProgress = function(){
305305
};
306306

307307
Graphics._hideProgress = function(){
308-
this._progressElement.style.visibility = 'hidden';
308+
if (this._progressElement) {
309+
this._progressElement.style.visibility = 'hidden';
310+
}
309311
clearTimeout(this._progressTimeout);
310312
};
311313

@@ -471,10 +473,10 @@ Graphics.setShowErrorDetail = function(showErrorDetail) {
471473
* @method showFps
472474
*/
473475
Graphics.showFps = function() {
474-
if (this._fpsMeter) {
475-
this._fpsMeter.show();
476-
this._modeBox.style.opacity = 1;
477-
}
476+
//if (this._fpsMeter) {
477+
// this._fpsMeter.show();
478+
// this._modeBox.style.opacity = 1;
479+
//}
478480
};
479481

480482
/**
@@ -484,10 +486,10 @@ Graphics.showFps = function() {
484486
* @method hideFps
485487
*/
486488
Graphics.hideFps = function() {
487-
if (this._fpsMeter) {
488-
this._fpsMeter.hide();
489-
this._modeBox.style.opacity = 0;
490-
}
489+
//if (this._fpsMeter) {
490+
// this._fpsMeter.hide();
491+
// this._modeBox.style.opacity = 0;
492+
//}
491493
};
492494

493495
/**
@@ -1146,9 +1148,9 @@ Graphics._updateRenderer = function() {
11461148
* @private
11471149
*/
11481150
Graphics._createFPSMeter = function() {
1149-
var options = { graph: 1, decimals: 0, theme: 'transparent', toggleOn: null };
1150-
this._fpsMeter = new FPSMeter(options);
1151-
this._fpsMeter.hide();
1151+
//var options = { graph: 1, decimals: 0, theme: 'transparent', toggleOn: null };
1152+
//this._fpsMeter = new FPSMeter(options);
1153+
//this._fpsMeter.hide();
11521154
};
11531155

11541156
/**
@@ -1360,7 +1362,7 @@ Graphics._onKeyDown = function(event) {
13601362
switch (event.keyCode) {
13611363
case 113: // F2
13621364
event.preventDefault();
1363-
this._switchFPSMeter();
1365+
//this._switchFPSMeter();
13641366
break;
13651367
case 114: // F3
13661368
event.preventDefault();
@@ -1396,16 +1398,16 @@ Graphics._onTouchEnd = function(event) {
13961398
* @private
13971399
*/
13981400
Graphics._switchFPSMeter = function() {
1399-
if (this._fpsMeter.isPaused) {
1400-
this.showFps();
1401-
this._fpsMeter.showFps();
1402-
this._fpsMeterToggled = false;
1403-
} else if (!this._fpsMeterToggled) {
1404-
this._fpsMeter.showDuration();
1405-
this._fpsMeterToggled = true;
1406-
} else {
1407-
this.hideFps();
1408-
}
1401+
//if (this._fpsMeter.isPaused) {
1402+
// this.showFps();
1403+
// this._fpsMeter.showFps();
1404+
// this._fpsMeterToggled = false;
1405+
//} else if (!this._fpsMeterToggled) {
1406+
// this._fpsMeter.showDuration();
1407+
// this._fpsMeterToggled = true;
1408+
//} else {
1409+
// this.hideFps();
1410+
//}
14091411
};
14101412

14111413
/**

0 commit comments

Comments
 (0)