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