feat(capture): shared local Clay previews and dollhouse rendering - #788
Merged
Merged
Conversation
|
I hit an error while handling your request (Model unavailable on AI Gateway free tier: Free tier users do not have access to this model. Upgrade to paid credits at https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%3Fmodal%3Dtop-up for unrestricted…). Please try again, rephrase, or reach out if it keeps failing. Error id: 14274f0c-2a3f-4815-8b9f-daf9afaf05e0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Capture previews above 6,000 faces were rejected even though the recorder permits 20,000. Align validation with the native budget while retaining byte-length and index checks, and expose a small shared geometry/matcap entry point so hosts can display a locally saved Clay preview before upload.
Add optional host-controlled Clay and dollhouse presentation to capture layers. Dollhouse changes cloned per-instance materials; default rendering stays compatible. Browser/React Native source exports support packaged offline DOM previews without generated workspace artifacts.
How to test
bun test packages/capture-protocol/src packages/capture-viewer/src— 41 tests pass.bunx tsc --build packages/capture-protocol packages/capture-viewerandbunx biome check packages/capture-protocol packages/capture-viewer.Architecture review: the protocol retains plain validated data; Three.js geometry/material helpers stay in capture-viewer; the host owns controls, access, transport, and lifecycle. No new editor-state dependency or node kind.
Screenshots / screen recording
Visual checks use a private capture in the consuming app, including an offline packaged preview and native simulator. Private scan artifacts are not attached to this public repository.
Checklist
bun devmainbranchNote
Medium Risk
Protocol validation now accepts much larger surface meshes, which affects memory and parsing for all consumers; rendering changes are opt-in but touch shared layer and room-model material cloning.
Overview
Raises capture-protocol surface-mesh validation from 6,000 to 20,000 faces (and scales the indices payload cap) so manifests match the native recorder budget; tests now assert acceptance at 20k and rejection above it.
Adds
@pascal-app/capture-viewer/previewwithcreateSurfaceMeshGeometry,createClayMatcap, and shared decode logic (protocol-validated, returnsnullon bad input). Browser/React Native package exports resolve source so offline DOM bundles skip workspacedist.CaptureStreamLayer(and custom stream renderers) accept optionalmeshPresentation:previewMaterial: 'clay'swaps vertex colors for a procedural matcap;dollhouse: trueuses front-face materials on surface meshes and cloned room GLB/USDZ materials. Defaults preserve prior double-sided recorded-color rendering.Reviewed by Cursor Bugbot for commit 51a66f2. Bugbot is set up for automated code reviews on this repo. Configure here.