Skip to content

docs(tutorials): add STL loading to the Loading Models guide - #3787

Open
BenMalaga wants to merge 1 commit into
pmndrs:masterfrom
BenMalaga:docs/stl-loading-models
Open

docs(tutorials): add STL loading to the Loading Models guide#3787
BenMalaga wants to merge 1 commit into
pmndrs:masterfrom
BenMalaga:docs/stl-loading-models

Conversation

@BenMalaga

Copy link
Copy Markdown

The Loading Models tutorial covers GLTF, FBX, and OBJ but not STL, which is one of the most common formats for 3D printing, CAD, and hardware work. This adds a short STL section in the same useLoader style as the others.

STL loads a little differently from the existing three, and the section calls that out:

  • STLLoader returns a BufferGeometry rather than a scene or group, so you attach it to your own mesh with a material. The example shows that.
  • STLLoader fills the normal attribute from the per-face normals in the file, so the geometry renders flat-shaded by default. The section notes that computeVertexNormals() is what you reach for when you want smooth shading or the file has missing/zero normals, rather than implying it is always required.

I left out a CodeSandbox demo to avoid referencing an asset that does not exist; happy to add one if you point me at a hosted STL model to match the other sections.

Covers loading STL via useLoader + STLLoader, in the same style as the GLTF/OBJ/FBX sections. Notes that STLLoader returns a BufferGeometry (attach to your own mesh + material) and that it fills the normal attribute from the file's per-face normals, so computeVertexNormals() is only needed for smooth shading or files missing valid normals.
@codesandbox-ci

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 1e8e0a7:

Sandbox Source
example Configuration

@DennisSmolek

Copy link
Copy Markdown
Member

If you can point to an open standard/test STL like the print boat or similar we could use that. CSB is being finicky, if you have an example you can pr it to: https://github.com/pmndrs/examples

There are big docs additions coming with v10 but I'm totally down to have a STL example

@DennisSmolek DennisSmolek added documentation to do with docs v10 labels Jul 27, 2026
@DennisSmolek DennisSmolek added this to the v10 milestone Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation to do with docs v10

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants