React hook returning a kit-owned Scene. The Scene is constructed once
per host component and tracked via useSyncExternalStore, so React re-
renders on every Scene mutation (including undo/redo).
Two call shapes:
useScene({ items }) — one auto-registered system layer
named 'default', each item added as a leaf with pose === data === item.
Cheapest path for "a flat list of rects."useScene({ systemLayers, initial?, ops?, ... }) — explicit
layers, parenting, and custom op registration.
React hook returning a kit-owned
Scene. The Scene is constructed once per host component and tracked viauseSyncExternalStore, so React re- renders on every Scene mutation (including undo/redo).Two call shapes:
useScene({ items })— one auto-registered system layer named'default', each item added as a leaf withpose === data === item. Cheapest path for "a flat list of rects."useScene({ systemLayers, initial?, ops?, ... })— explicit layers, parenting, and custom op registration.