feat: Add 3MF export/preview support with custom WASM build#77
Open
mikekuniavsky wants to merge 14 commits intoseasick:mainfrom
Open
feat: Add 3MF export/preview support with custom WASM build#77mikekuniavsky wants to merge 14 commits intoseasick:mainfrom
mikekuniavsky wants to merge 14 commits intoseasick:mainfrom
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add GitHub Pages live link to README - Update get-openscad.sh to download the custom WASM build (replaces old openscad.org zip with the vibejects build) - Simplify README dev setup to use the script Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
npm 11 (Node 25) was resolving @types/react@19 while CI's npm 10 (Node 20) resolves @types/react@18, causing npm ci to fail. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Jest 30 changed the guide URL from goo.gl/fbAQLP to jestjs.io/docs/snapshot-testing and now validates it at test time. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ts-jest requires explicit @types/node for fs and __dirname in tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The preview function was hardcoded to 'stl', meaning the worker always exported STL and the 3MF color rendering path was never reached. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
OpenSCAD uses Z-up coordinates; Three.js uses Y-up. Without this rotation the model renders with its top face as the front face. Matches the existing rotation applied in readFromSTLFile.ts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
readFrom3MFFile.tsusing Three.jsThreeMFLoaderto render multi-color 3MF previews--export-format=3mfwhen the file type is 3MF, falling back tobinstlotherwise@react-three/drei,@react-three/fiber,three) to newer versionsModel.tsxto guard against null geometry and enable shadow casting on 3MF meshesThreeJsCanvas.tsxfor better large-model visibilityWASM Setup
This PR requires a custom OpenSCAD WASM build with 3MF color support. Since
src/vendor/is gitignored, you must manually download the WASM files before running:Test plan
npm run devand verify no WASM magic number error in the consolecolor()statements and export as 3MF — verify colors are preserved🤖 Generated with Claude Code