An interface for debugging the game.
groupDebug
Pause the whole game.
Draw bounding boxes of all objects with `area()` component, hover to inspect their states.
Global time scale.
Show the debug log or not.
fps(): number
Current frames per second, that the game is running using
(may be limited by the `maxFPS` or `maxTimeStep` options)
Raw frames per second from the browser unaffected by
the `maxFPS` or `maxTimeStep` options.
Total number of frames elapsed.
sincev3000.0
Number of draw calls made last frame.
Step to the next frame. Useful with pausing.
Clear the debug log.
logMessage(message: DebugMessage[] , wrapStyle?: DebugLogStyle ): void
Log a message to the on-screen debug log, with optional
style wrapping.
parammessage- The messages to log
paramwrapStyle- Style to wrap all messages
```
debug.logMessage(["oh", "hi"], "warn");
sincev4000.0
log(message: DebugMessage[] ): void
Log a message with the info style (white) to the on-screen debug log.
parammessage- The message to log
```
debug.log("oh", "hi")
warn(message: DebugMessage[] ): void
Log a message with the warn style (yellow) to the on-screen debug log.
parammessage- The message to log
```
debug.warn("oh", "humm")
sincev4000.0
error(message: DebugMessage[] ): void
Log a message with the error style (pink since kaboom) to the on-screen debug log.
parammessage- The message to log
```
debug.error("oh", "no")
The recording handle if currently in recording mode.
sincev2000.1
Get total number of objects.
sincev3001.0