ExperimentalOptionaldecorateExperimentalOptional non-interactive decoration (e.g., a leader line drawn from a bounds edge to a handle — visual only, not draggable). Receives raw state + view because the decoration may live outside any single target's local frame. Most affordances leave this undefined.
ExperimentalEnumerate this affordance's interactive regions. Each region lives in
some target id's local frame (or in the world frame when targetId
is null). Returning [] means "no chrome for this state" (no
selection, multi-mode disabled, etc.).
A single interactive piece of chrome. Pure functions; the kit composes multiple affordances into a single RenderLayer per tool via
composeAffordanceLayer.Affordances declare interactive regions in a target's local frame. The framework (
composeAffordanceLayer) composes the target's bounds transform (rotation around the AABB center, when present) for both paint and hit-test, so the affordance never touches rotation, view.scale, or world↔screen math.