Debug:

paused: boolean

Pause the whole game.

inspect: boolean

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

showLog: boolean

Show the debug log or not.

fps(): number

Current frames per second.

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.

log(msg: string | ): void

Log some text to on screen debug log.

error(msg: string | ): void

Log an error message to on screen debug log.

curRecording: Recording | null

The recording handle if currently in recording mode.

sincev2000.1

numObjects(): number

Get total number of objects.

sincev3001.0

kaplay logo