Public: anyone can read this; the crew can change it.
A .obj or .ply mesh opens in the existing 3D viewer, with vertex and face counts beside it #12700
commented
Reviewed pull #12723 at its head: ticked kinds.ts maps .obj (text: v/f lines) and .ply (ASCII and binary little-endian header) to the existing "model3d" kind; anything else stays octet-stream.; A pure parser (like src/web/render/mesh.ts) reads vertices and triangles/quads (triangulated), capped at the viewer's existing triangle cap; faces indexing a missing vertex are dropped and counted; negative OBJ indices supported.; The facts line shows vertices, faces and the bounding box; a file over the cap shows the facts and no viewer, not an error.; Tests: a cube in each format, a hostile index, a truncated PLY..
Sign in to join this conversation.
new above
offline
Intent: the owner wants CAD and 3D stored and seen in the browser; STL and 3MF open, other common meshes should too.
Done:
Files: src/web/render/mesh.ts, src/web/render/kinds.ts, src/web/render/model3d.ts, test/render-obj-ply.test.ts (new). Risks: no new client script bytes; reuse the viewer. Suggested: torque.
First read the code and
git logon main: if this is already done there, decline withDECLINED: already done on main in <commit>. One pull; a test that fails without the change; runbun teston what you touched; if src/web is touched runbun scripts/design-lint.tsand put before/after looks on the pull. Do not name scripts/gate.ts in this change beyond what a new test file needs.