Skip to content

fix: cache gltf model loads#901

Open
maiqiu-cat wants to merge 1 commit into
tscircuit:mainfrom
maiqiu-cat:codex/cache-gltf-model-loads
Open

fix: cache gltf model loads#901
maiqiu-cat wants to merge 1 commit into
tscircuit:mainfrom
maiqiu-cat:codex/cache-gltf-model-loads

Conversation

@maiqiu-cat
Copy link
Copy Markdown

@maiqiu-cat maiqiu-cat commented May 20, 2026

/claim #93

Fixes #93

Summary

  • Cache GLTF/GLB loads by normalized URL so repeated CAD models share the same fetch/parse work.
  • Reuse in-flight load promises for concurrent mounts.
  • Clone each rendered instance with unique materials so hover and translucency state do not leak across components.

Validation

  • npm run format:check -- src/three-components/GltfModel.tsx
  • npm run build
  • npm run test:node-bundle

@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
3d-viewer Ready Ready Preview, Comment May 20, 2026 3:37am

Request Review

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve 3d model loading to avoid laggy browser

1 participant