Summary
Add a generic React component for attaching an existing Two.js object to the declarative scene graph.
A primitive escape hatch makes custom Two.Shape subclasses, extras, clones, and objects restored with fromObject(...) usable without waiting for a bespoke wrapper or imperatively calling parent.add(...).
Proposed API sketch
const object = useMemo(() => Two.Group.fromObject(snapshot), [snapshot]);
<Primitive object={object} />
The exact name and ownership API are open for design.
Related work
Acceptance criteria
Summary
Add a generic React component for attaching an existing Two.js object to the declarative scene graph.
A primitive escape hatch makes custom
Two.Shapesubclasses, extras, clones, and objects restored withfromObject(...)usable without waiting for a bespoke wrapper or imperatively callingparent.add(...).Proposed API sketch
The exact name and ownership API are open for design.
Related work
Acceptance criteria
Group.fromObject(...)scene restoration example.