Documentation
¶
Overview ¶
Example: the interactive Session loop, headless.
output.Session drives a Source (here a *ggplot.Plot) onto a LiveSurface, running the build → draw → event loop and the fast-path / slow-path policy:
- fast path (ActionRedraw): re-render the current figure with updated data-space viewport (pan/zoom via Zoomable) — no rebuild.
- slow path (ActionRebuild): call Source.Build again when an interaction crosses the trained data extent (scales retrain, stats recompute). WithRebuildDelay makes this asynchronous and debounced.
output/window wires this same Session policy to a real GPU window (see examples/window). Here we use a headless LiveSurface that scripts a sequence of events and writes each committed frame to a PNG, so the loop is fully runnable without a display:
go run ./examples/session
Click to show internal directories.
Click to hide internal directories.