Space adds an asteroid and X removes one. O shows and hides the debugging overlay. S saves and L loads.
This page uses two add-ons of its own.
mover.js is the Mover add-on from the
manual: each asteroid has a GAMEPALETTE.Mover,
which moves it after every logic step through an
afterLogicStep hook, so the main loop only has to wrap
the asteroids round the edges and spin them.
debugoverlay.js uses an
afterDraw hook to draw over the finished picture: a box
round each of the engine's activeSprites, placed with
worldToCanvas, and the actual logic and drawing speeds.
Both keep what they need in getAddOnData, so saving and
loading brings back the movers and the overlay setting with
everything else.
See Add-Ons in the manual.