ReadonlyelementThe underlying HTMLCanvasElement. Null until the canvas mounts.
Use this for screenshots, getBoundingClientRect, focus management, etc.
(Replaces the pre-A2 pattern where ref.current directly was the element.)
Hit-test the registered layers (topmost-first, last-registered wins) at a
world-space point. Returns the id of the layer that claimed the point and
whatever its hitTest resolved, or null when none did.
<SceneCanvas> folds this into the affordanceAt thunk it hands the
gesture dispatcher — ahead of the kit's own selection chrome, since
registered layers draw on top — so a hit surfaces to actions as an
AffordanceHit with kind layer:<id> and the binding's initialScratch
as its payload. A layer's owner binds a kindOf predicate on that kind
to claim the gesture; see @weasel-js/hud for the worked example.
OptionalingestFeed external content into the ingestion pipeline imperatively — the
same content-handler registry that OS drop and clipboard paste hit.
input may be raw File[] (e.g. from openFilePicker) or
pre-normalized IngestItem[]. point is a world-space placement
anchor; omitted → handlers use their point-less policy (the kit image
handler centers on the viewport).
Optional because ingestion needs the SceneCanvas action stack — the
handle is always populated on <SceneCanvas> refs, absent on the
bare-primitive handle.
Optionalpoint: { x: number; y: number }Register an externally-owned RenderLayer. The layer participates in the
draw stack and, if it implements hitTest, in hitTestExtras.
The base imperative ref handle shared by the canvas components. For
<SceneCanvas>refs use SceneCanvasApi (this type plus the scene-level surfaces, e.g. a non-optionalingest):This is a deliberately small, supported consumer surface — not internal. Consumers use
elementfor focus / screenshots /getBoundingClientRect; plugin packages (e.g.@weasel-js/hud) additionally userequestRedrawandregisterLayerto attach externally-owned draw layers.