Asserts if the expression is false, does nothing in release builds
Halts execution if the assert fails and throws an error
assert *any value, the assert fails when it is falsy
…output Objecterror message output
Draw a debug circle in world space, or on the screen with screenSpace
pos Vector2size number optional, default 0diameter
color Color|string optionaltime number optional, default 0fill boolean optional, default falsescreenSpace boolean optional, default drawScreenSpace
Clear all debug primitives in the list
Draw a debug line in world space, or on the screen with screenSpace
posA Vector2posB Vector2color Color|string optionalwidth number optional, default 0.1time number optional, default 0screenSpace boolean optional, default drawScreenSpace
Draw a debug combined axis aligned bounding box in world space, or on the screen with screenSpace
posA Vector2sizeA Vector2posB Vector2sizeB Vector2color Color|string optionaltime number optionalscreenSpace boolean optional, default drawScreenSpace
Draw a debug point in world space, or on the screen with screenSpace
pos Vector2color Color|string optionaltime number optionalangle number optionalscreenSpace boolean optional, default drawScreenSpace
Draw a debug poly in world space, or on the screen with screenSpace
pos Vector2points Array<Vector2>color Color|string optionaltime number optional, default 0angle number optional, default 0fill boolean optional, default falsescreenSpace boolean optional, default drawScreenSpace
Draw a debug rectangle in world space, or on the screen with screenSpace
pos Vector2size Vector2 optional, default vec2()color Color|string optionaltime number optional, default 0angle number optional, default 0fill boolean optional, default falsescreenSpace boolean optional, default drawScreenSpace
Trigger debug system to take a screenshot
Breaks on all asserts/errors, hides the canvas, and shows message in plain text
This is a good function to call at the start of your game to catch all errors
In release builds this function has no effect
Draw debug text in world space, or on the screen with screenSpace
text string|numberpos Vector2size number optional, default 1color Color|string optionaltime number optional, default 0angle number optional, default 0font string optional, default monospacescreenSpace boolean optional, default drawScreenSpace
Log to console if debug is enabled, does nothing in release builds
…output Objectmessage output
Set key code used to toggle debug mode, Esc by default
key string
Set if the debug keys work while the overlay is closed, the number keys and the +/- time keys
enable boolean optional, default true
Set the width in pixels of the outlines debug shapes are drawn with
width number
Open or close the debug overlay from code, as the debug key does; does nothing in release builds
show boolean optional, default true
Set if the tweakables panel is shown, as 9 does while the debug overlay is open
show boolean optional, default true
Set if watermark with FPS should be shown
show boolean
Key code used to toggle debug mode, Esc by default
Let the debug keys work while the overlay is closed, the number keys and the +/- time keys, for a game that does
not use them; off by default, so they only work while the overlay is open
Width in pixels of the outlines debug shapes are drawn with, the physics boxes and the tile collision view
among them; larger makes them easier to see
True if the debug overlay is active, always false in release builds
True if the tweakables panel is shown, 9 toggles it while the overlay is open; set it to show the panel
from the start, the panel is never shown in release builds
True if watermark with FPS should be shown, false in release builds
Size to render debug points by default