Inspired by LiamOsler/Three-Molecules but coded declaritively using @react-three/fiber and Typescript in a Vite meta-framework.
Demo: https://mol-file-viewer.netlify.app
- based on https://github.com/MelonCode/r3f-raymarching/tree/main
- less cpu intenseive but requires immense recalculation when orbiting model
- based on https://github.com/gkjohnson/three-bvh-csg/blob/main/examples/multimaterial.js
- cpu intensive calculation, but offloaded to webworker
- geometry serialized and cached once calulated
- clone repo and cd into directory
- run
npm install - run
npm run devfor running local development server - run
npm run buildfor production build - run
npm run previewfor running produciton build server locally