This method is only available in the Debug Build of Phaser, or a build with the
WEBGL_DEBUG
flag set in the Webpack Config.
Phaser v3.60 Debug has a build of Spector.js embedded in it, which is a WebGL inspector that allows for live inspection of your WebGL calls. Although it's easy to add the Spector extension to a desktop browsr, by embedding it in Phaser we can make it available in mobile browsers too, making it a powerful tool for debugging WebGL games on mobile devices where extensions are not permitted.
See https://github.com/BabylonJS/Spector.js for more details.
This method will start a capture on the Phaser canvas. The capture will stop once it reaches the number of commands specified as a parameter, or after 10 seconds. If quick capture is true, the thumbnails are not captured in order to speed up the capture.
name | type | arguments | Default | description |
---|---|---|---|---|
commandCount | number | <optional> | 0 |
The number of commands to capture. If zero it will capture for 10 seconds. |
quickCapture | boolean | <optional> | false |
If |
fullCapture | boolean | <optional> | false |
If |