Cache inline STL data geometry#888
Open
fangzheli wants to merge 1 commit into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Author
|
Demo video for the UI/3D viewer requirement: https://github.com/fangzheli/3d-viewer/blob/demo-video-pr-888/pr-888-inline-stl-cache-demo-short.mp4 This recording only captures the Storybook iframe for the 3D viewer and shows the model rendering plus orbit interaction. |
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.
/claim #93
Summary
stlDataArrayBuffer geometry with a WeakMap.BufferGeometryper caller so each mountedSTLModelcan dispose safely during cleanup.STLModelstlDatapath through the cache; thestlUrlloader path is unchanged.Non-overlap
The active PRs I found cover OBJ cache keys, GLTF/GLB loading, direct STL URL geometry loading, STEP-to-GLB conversion, and generic
load3DModelURL detection. This PR only addresses repeated parsing for inlinestlDataArrayBuffers.Verification
npx --yes bun test tests/load-cached-stl-data-geometry.test.tsnpx --yes bun x biome check src/three-components/STLModel.tsx src/utils/load-cached-stl-data-geometry.ts tests/load-cached-stl-data-geometry.test.tsnpx --yes bun x tsc --noEmitnpx --yes bun run buildgit diff --checknpx --yes bun run test:node-bundleFull
npx --yes bun testcurrently reports 25 passing tests and 3 failures intests/outline-bounds.test.tsandtests/preprocess-circuit-json.test.ts; the new focused STL cache test passes.AI-assisted with Codex; I reviewed the diff and kept the change scoped.
Demo Video