Rings on the world points something is naming right now. More...
| Import Statement: | import Clayground.Lab |
A presenter saying "collector on the left, emitter on the right, base facing you" is asking the eye to find three things by ear. This is the other half of that sentence: a ring on each of them, up while the line lasts and gone afterwards.
It draws marks and nothing else. Where they come from is the caller's business - a *mark ...* cue in a performance script (Performance.marks), a FlowStep.mark field, or a lab pointing at its own selection. Each entry is a world point, either a vector3d or { at: vector3d, label: string }; a label draws a small chip under the ring, and no label draws the ring alone.
Screen space over the 3D scene, like WorldLabel and BoardOverlay: put it in the same parent as the View3D, not inside it.
import Clayground.Lab MarkLayer { anchors.fill: parent view: view3d camera: rig.camera marks: guide.markPoints keepOut: root.presenterBox }
Note: The projection lists camera.scenePosition and camera.sceneRotation as explicit dependencies. Without them the marks freeze where the camera first saw them - invisible until the rig moves, which is the one thing a mark has to survive.
See also WorldLabel, BoardOverlay, Flow, and FlowStep.
camera : var |
camera \brief The camera the \l view renders with. : var |
count : int |
count \readonly \brief How many marks are up. : int |
keepOut : var |
A screen rectangle ({x, y, width, height}) no mark is drawn into, or null.
Same rule and the same shape as BoardOverlay::keepOut. A ring is screen space over a 3D scene, so nothing depth-tests it against a presenter standing in front of the part: a ring drawn on the coat marks the coat. A mark whose point falls inside the box fades out for as long as it does.
marks : var |
What to ring: world points, each a vector3d or {at, label}.
Empty draws nothing. Replacing the list is the whole of the API - there is no add/remove, because a mark set belongs to one sentence and outliving it is the failure mode.
pulseMs : int |
Period of the halo that expands out of each ring; 0 draws none.
The halo is what makes a ring read as "this one, now" rather than as another piece of chrome. It is decoration, so it is the first thing a lab turns off.
ringSize : real |
ringSize \brief Ring diameter at rest, in px. : real |
tone : color |
tone \brief The ring colour. : color |
view : var |
The View3D to project through.
var rather than View3D on purpose: the kernel should not import QtQuick3D to park a ring on a pixel.
bool clear(real sx, real sy) |
var screenOf(int i) |
Where mark i lands, as {x, y, z}; z <= 0 is behind the camera.
The verification seam: a claim about a mark is checked by asking where it is, not by looking at a picture.