/ concept-collection / mesh-converter
Sign in
concept-collection / mesh-converter
mesh-converter / README.md
36 lines · 1.4 KBCodeBlameHistory
3A static web app for converting meshes between formats: upload a mesh file,
4inspect it in an interactive 3D view, and download it in a format of your
5choice. Formats differ in what they can store, and the UI shows exactly which
6attributes (normals, colors, name) would be dropped by a lossy conversion.
8Currently ships with three **invented text formats** to illustrate the
9workflow; real formats will replace them later:
11| Format | Extension | positions/faces | normals | colors | name |
12| --- | --- | --- | --- | --- | --- |
13| MOPF (Mesh Omni-Portable Format) | `.mopf` | ✓ | ✓ | ✓ | ✓ |
14| TRICOL (TriColor Interchange) | `.tricol` | ✓ | — | ✓ | — |
15| BMSH (BareMesh) | `.bmsh` | ✓ | — | — | — |
17A built-in sample mesh (a rainbow torus with normals and vertex colors) is
18available from the UI for trying things out without a file.
20## Development
22```bash
23npm install
24npm run dev # local dev server
25npm run build # static build in dist/
26```
28Built with Vite, React, TypeScript, and three.js (react-three-fiber).
30## Adding a format
32Implement the `MeshFormat` interface in `src/mesh/formats/` (parse and
33serialize against the internal `MeshData` representation, declaring which
34optional attributes the format supports) and register it in
35`src/mesh/formats/index.ts`. The upload, viewer, capability table, and
36loss-warning UI pick it up automatically.
moveopenescclose