Skip to content

[Roadmap] Declarative Two.js web-scene feature parity #35

Open

Description

@jonobr1

Goal

Track the remaining work required for a React application to reproduce a Two.js web scene declaratively and keep it correct through React updates.

This roadmap treats imperative access through useTwo() and refs as an escape hatch, not as proof that the React surface is complete.

Definition of feature complete

  • A representative Two.js scene can be expressed without manual parent.add(...) calls.
  • React remains authoritative after prop changes, prop removal, child reorder, reparenting, and unmount.
  • Masks, gradients, texture-backed objects, imported SVG, and custom/existing objects have lifecycle-safe declarative paths.
  • SVG, Canvas, and WebGL accept the documented configuration and produce equivalent scene structure where Two.js supports it.
  • Pointer targeting follows the rendered scene graph.
  • Every exported component has checked property and lifecycle coverage.

Foundation

Scene relationships and resources

Object coverage and escape hatches

Canvas and importing

Interaction correctness

Follow-on React ergonomics

These are valuable but are not blockers for core Two.js web-scene parity:

React Native is a separate renderer/platform initiative and remains tracked independently in #6.

Already delivered

Recommended sequence

Updated after the October 14, 2026 issue review. Foundation (#29 and #30), Canvas/import correctness (#32 and #8), and interaction correctness (#34) are complete. PR #39 closed #8, #32, and #34.

  1. Highest priority: [Parity] Add declarative gradient stops and resource composition #31 — gradient stops and resource composition. The README Gradient Fill example still supplies plain stop objects and has an invalid callback-ref pattern. Fix the executable example first, then deliver declarative stops, binding, updates, and shared-resource cleanup.
  2. Next: Feature Request: Add useTexture hook for async texture loading with states #12 — async texture loading. Deliver loading/loaded/error state, source changes, stale-result protection, and cleanup first. Cache/preload, retry, and optional Suspense can follow separately. The Texture component from [Feature Request] Add Two.Texture #1 does not satisfy this hook request.
  3. Next: Feature Request: Add useClipMask hook for declarative clipping masks #9 — lifecycle-safe mask relationships. Direct mask/clip properties and reset behavior landed in [Parity] Complete declarative prop coverage for Two.js objects #30/[Parity] Reconcile the Two.js scene graph with React updates #29; masked event handling landed in [Bug] Align pointer events with Two.js coordinates and scene order #34. Focus this issue on mask creation, switching, disabling, and ownership cleanup rather than repeating those completed layers.
  4. Then: [Parity] Add a Primitive escape hatch for existing and custom Two.js objects #33 — existing/custom object escape hatch. Reuse the shared lifecycle, but explicitly define borrowed-object ownership, replacement, Group children, and cleanup.
  5. Then: Feature Request: Add Arc component for open arc shapes #10 — first-class typed Arc. Keep this distinct from [Parity] Add a Primitive escape hatch for existing and custom Two.js objects #33: a generic object wrapper does not replace a discoverable typed Arc component.

Backlog triage

Non-goals

  • Restoring the removed Canvas.container prop. The current styling API is intentional.
  • Requiring helper/gizmo or React Native work before declaring core web scene parity.
  • Wrapping every Two.js method as JSX when useTwo() or refs are the appropriate advanced API.

Activity

  1. jonobr1 commented on Sep 3, 2026

    @jonobr1
    OwnerAuthor

    Roadmap Progress Update

    Both Foundation track items are now complete:

    Unblocked Tracks:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions