Skip to content

fix: cache gltf model loading#875

Open
furoku wants to merge 1 commit into
tscircuit:mainfrom
furoku:fix/gltf-model-cache-93
Open

fix: cache gltf model loading#875
furoku wants to merge 1 commit into
tscircuit:mainfrom
furoku:fix/gltf-model-cache-93

Conversation

@furoku
Copy link
Copy Markdown

@furoku furoku commented May 12, 2026

Summary

  • add a shared GLTF/GLB model cache so duplicate model URLs reuse one loader request
  • normalize model cache keys by removing only cachebust_origin while preserving meaningful query params
  • return cloned model instances with cloned materials so hover/translucency state stays isolated per component
  • reuse the same cache-key normalization in the existing OBJ/WRL loader path

Test Plan

  • bun test tests/model-url-cache-key.test.ts tests/load-cached-gltf-model.test.ts with bunfig.toml temporarily moved aside to avoid this VM's failed sharp preload install
  • bunx tsc --noEmit --skipLibCheck
  • bun run build
  • git diff --check

Note: a full local bun test tests run is blocked in this VM because bun install could not download sharp's native binary through the proxy (407 Proxy Authentication Required). Running without the preload avoids sharp but exposes existing unrelated failures in snapshot/faux-board tests, while the focused cache tests pass.

This PR was prepared with AI assistance from Hermes Agent. I reviewed the generated changes and verification results before submitting.

/claim #93

@vercel
Copy link
Copy Markdown

vercel Bot commented May 12, 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 12, 2026 5:45am

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.

1 participant