A simple three.js STL Loader demo
This script loads 2 STL files, applies different materials to them, and adds colored lights to the scene for a nice look.
The 2 objects are animated:
hand_low_poly.stl
moves smoothly up and down the Y axis.wrench.stl
spins about the Y axis.
For an interesting visual effect, the camera moves as a function of the cursor position on the document window.
You may enable full orbital controls by uncommenting certain lines in script.js
.
npx vite
to start the development environment- Open
http://localhost:5173/
on a browser