Skip to main content

Module spotlight

Module spotlight 

Source
Expand description

Where a document step worked: the scope it happened in and the grid region that contains its subjects.

One derivation of “what did this change touch”, consumed twice — the camera aims at it and the canvas rings it — so the two cannot disagree about where a change was. The names come from the manifest row the act wrote (blockworx_store::worked); the region is measured at read time from the documents either side of the step.

Structs§

Lit 🔒
The ring, while one is up: what it frames and when it was raised.
Spotlight
Where a commit worked. Advisory: a camera hint and a ring, never a claim about what the commit did.
Spotlighter
Whatever ring is currently up. One per session, owned by the app: a ring is state the canvas draws from, not something the canvas remembers for us.
Step
The two documents a commit stands between. A subject is read from before — a step frames where the thing was, which is what the camera has to reach before the change is drawn — and from after only where the commit itself brought it into being. Between them they hold every subject a commit can name, which is what a delete’s footprint needs now that a delete removes rather than tombstones.

Constants§

CLEAR
The air between what changed and the ring round it, so the ring reads as pointing at the thing rather than as part of it.
CORNER 🔒
FADE 🔒
And how long it takes to go.
HOLD 🔒
How long the ring stands at full strength before it goes.
RING_WIDTH 🔒

Functions§

area_rect 🔒
block_rect 🔒
center 🔒
grid_bounds 🔒
Artwork is the document’s one unsnapped rect; the region that frames it is the whole cells it covers.
image_rect 🔒
in_scope 🔒
Whether a subject stands in scope, or in no scope at all.
pin_anchor 🔒
Where a pin shows: the slot anchor on its owner’s boundary, which is where the user sees the pin at all. Its port body is interior geometry, one scope in, and is not what a viewer looking at the parent needs framed.
region_of 🔒
The grid region one subject stands in.
route_region 🔒
A wire’s corridor: the polyline the router solved for it, or — where none is solved — its two endpoints and whatever waypoints it was authored through. The fallback frames the corridor the wire was drawn through rather than the exact path taken, which is what a camera and a ring need.
slot_anchor 🔒
spot 🔒
strength 🔒
How strongly the ring shows at elapsed, or None once it is gone.
text_pos 🔒
union 🔒
worked
The scope and region an act worked in, read across the step it made.