New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug should be optional #984
Comments
When I saw this issue I was very excited but then I test this on iPhone 4 and unfortunately I didn't see any difference in fps (36 fps in both cases). |
I experienced this on a Chromecast dongle. I assume this applies to similar devices. The problem seems to be that it creates a canvas element on top of the scene. |
…sing the Game configuration setting: `enableDebug`. By default it is `true`, set to `false` to prevent the class from being created. Please note you are responsible for checking if this class exists before calling it, but you can do that via `if (game.debug) { ... }` (request #984)
There is now an optional flag to disable this - however I don't expect it will make any actual difference in this case. |
Thank you for fixing this. I can verify that it does make a difference. Unfortunately, since you are no longer creating a debug object, this line fails: |
debug.boot() here (https://github.com/photonstorm/phaser/blob/1c92caad421f10707c70ad66373b3a0b4cc7f56a/src/core/Game.js#L456) significantly reduces performance on low end devices (in my case I was getting 8fps vs 27fps with debugging disabled manually by commenting out the line above). There should be a way to disable debugging when dealing with devices where it matters.
The text was updated successfully, but these errors were encountered: