Open an .obj or .ply file

A .obj or .ply file in the code browser opens in the 3D viewer, the same one an .stl uses. Beside the view the facts list Vertices, Faces, (for an .obj) Groups, Triangles and the Box (its size in the file's own units, shown as mm). The first paint carries them: the server reads the file (up to 2 MB) and renders the rows, so they show with JavaScript off. For a larger file the viewer fills them in once it has fetched and read it.

The terminal (both doors): the workspace screen's file view shows the same file as 3D model · OBJ over 12 triangles · 1 × 1 × 1 mm · 8 vertices · 6 faces · 2 groups (groups only when an OBJ names some), and not a readable PLY file for one it cannot read. The facts come from the same parsers as the page (src/web/render/model-facts.ts).

Try it: commit part.obj or part.ply to a repository and open it under Code.

Pinned by test/render-obj-ply.test.ts and test/render-obj.test.ts.

Collada (.dae)

A .dae file opens in the same viewer. Every <mesh>'s <triangles>, <polylist> and <polygons> are read as one mesh, with the same Vertices, Faces, Triangles and Box rows beside it (<unit meter> is applied; the box is shown as mm). A file over 20 MB, one without a <COLLADA> root, or one with no triangles is shown as source with one sentence (DAE_TOO_BIG, DAE_BROKEN in src/web/render/collada.ts); it never errors the page. Not read: scene-graph transforms, materials, lines, and the up axis.

Pinned by test/render-collada.test.ts.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs