Debug:

An interface for debugging the game.

groupDebug

paused: boolean

Pause the whole game.

inspect: boolean

Draw bounding boxes of all objects with `area()` component, hover to inspect their states.

timeScale: number

Global time scale.

showLog: boolean

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)

rawFPS(): number

Raw frames per second from the browser unaffected by the `maxFPS` or `maxTimeStep` options.

numFrames(): number

Total number of frames elapsed.

sincev3000.0

drawCalls(): number

Number of draw calls made last frame.

stepFrame(): void

Step to the next frame. Useful with pausing.

clearLog(): void

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")

curRecording: Recording | null

The recording handle if currently in recording mode.

sincev2000.1

numObjects(): number

Get total number of objects.

sincev3001.0