Skip to content

Make Surface rendering declarative - #32

Merged
petekp merged 15 commits into
mainfrom
pkp/surface-api-refactor
Sep 9, 2026
Merged

Make Surface rendering declarative#32
petekp merged 15 commits into
mainfrom
pkp/surface-api-refactor

Conversation

@petekp

@petekp petekp commented Sep 4, 2026

Copy link
Copy Markdown
Owner

React content now moves between the page and a Three.js scene without remounting its HTML or losing local input state. Surface owns preparation, renderer handoff, reversal, and native fallback.

<SurfaceCanvas />
<Surface inScene={selected}><Counter /></Surface>

This is a breaking API cutover. Surface.Root, .HTML, .Scene, and .Mesh provide explicit composition; SceneSurface handles scene-owned HTML; capture APIs let shaders sample content that stays native. The lab, registry, public types, and README migrate together. The branch includes the landing-page work and fixes from #84.

Verification of the combined integration snapshot: 1,589 tests, four typechecks, lint, package/lab builds, and native fallback passed. Chrome probes verified late texture resizing, lit alpha coverage, surviving duplicate parts, editor focus, camera interruption, panel pose, live tuning, Genie restoration, Unroll cancellation, and Lamp release. Filtered-edge pixels passed in headed Chrome at DPR 2; the DPR 1 headless sample does not exercise filtering.

Review preparation versus actual presentation closely: page content must remain available until its replacement has drawn. No package release is included.

@petekp
petekp merged commit a97614a into main Sep 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant