attach
SourceAdds the monitor to the page. The panel starts closed unless open is set; toggle it with the key (Backslash by default) or the corner button.
Devtools
A live monitor panel for a running game in the browser: how the game is built and what it is doing, without reading its code.
The monitor observes the runtime only while it is open, so a closed monitor costs nothing. While open it reduces trace events to counts and shows its own cost per tick. It needs a runtime made with debug: true.
const monitor = Monitor.attach(runtime, {
schedules: { fixedUpdate: step, frame },
pick: (event) => entityUnderPointer(event),
locate: (entity) => screenPositionOf(entity)
})
// Toggle with the backslash key or the corner button.
Adds the monitor to the page. The panel starts closed unless open is set; toggle it with the key (Backslash by default) or the corner button.