Session-wide view state - currently, whether the HUD is out of the way. More...
| Import Statement: | import Clayground.Lab |
A singleton because all of the HUD has to agree at once, and the pieces of it do not know about each other: a panel, a banner and a hint bar are siblings scattered through a lab, and threading one lab's boolean through every one of them is the kind of wiring that gets forgotten in the lab written next.
Unlike LabPrefs this is not persisted. Focus is a thing you do for a minute while looking at something, not a setting - coming back to a lab with its instruments mysteriously gone would be a bug report.
See also LabPanel and LabKeys.
focus : bool |
Whether the lab is showing the scene and nothing else.
Everything built on LabPanel steps out of the way on its own; a panel that must stay - a flow's own overlay, which is the one piece of chrome a guided lesson cannot do without - sets hideOnFocus to false. Chrome that is not a LabPanel binds to this directly.
For studying a scene when nothing is being changed or measured: the instruments are what a lab is for, right up until they are the thing in the way.
toggleFocus() |
Flips focus. What the reserved key calls.