Protected_Protected Optional_Protected_ReadonlyelementThe root element of the panel. It is in the container while the plugin is added.
Static Optional ReadonlyOldStatic ReadonlyPluginTrue shows the pill, false the card
False hides the panel and stops measuring
Corner of the container. Setting it, also to the same corner, puts back a panel that the person dragged.
Live numbers, updated in place 4 times per second while measuring (see the update event)
Protected_Protected_Optionalprefix: stringOptionalmeta: SerializationMetaTypeShows or hides the panel and starts or stops measuring, from enabled, isDisabled and the tab visibility
Optionalmeta: SerializationMetaType
PerfPanelPlugin shows a small FPS / performance panel over the canvas, in plain DOM.
Collapsed, it is a pill "60 fps" with a status dot (green, amber, red), and an amber corner dot when a warning is on. A click opens the card: a sparkline of the frame times (last 3 s; accent bars rendered, grey bars idle), frame time avg / p95 / max, CPU render time, renders per second, draw calls and triangles, canvas size, GPU and JS heap. A click on the card header collapses it again. Drag the pill or the card header to move the panel; it stays inside the container, also when the container gets smaller. Setting position (the Position dropdown) puts it back in a corner. The dragged place is kept while the page is open, not saved.
Collapsed, the pill is an overlay on the canvas (z-index 12, under the loading screen). The open card is viewer UI (z-index 150 and up, see UI layers in CONTRIBUTING.md), below the bars of the editor (200). With other panels of that layer, such as the sticky notes, the one pressed last is in front (raiseOnPress); opening the card is a press.
Warnings (also in stats.warnings): frame rate capped at ~30 fps (Chrome Energy Saver, Low Power Mode), CPU or GPU bound, on battery, software rendering, tab hidden.
It measures with its own requestAnimationFrame loop and the viewer's
preRender/postRenderevents. It never callssetDirty, so an idle viewer stays idle. Draw calls and triangles are summed over all the passes of a render (it wrapsrenderer.info.updatewhile rendering, and restores it on remove).Example