You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Parity] Add a Primitive escape hatch for existing and custom Two.js objects #33
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(...).
Activity
jonobr1 commentedon Sep 3, 2026
Foundation Update from #29
The lifecycle and reconciliation primitives required for
<Primitive object={...} />are now available via #36 (closing #29):useTwoObjectcentralizes scene-graph attachment, dynamic reparenting, JSX sibling order registration (registerChildOrder), in-place replacement, ref forwarding, and event registration.<Primitive object={object} />can directly wrapuseTwoObject(props, forwardedRef, { factory: () => object, isSceneObject: true }), instantly gaining authoritative scene graph ordering, reparenting, and Strict Mode double-mount safety.