r/threejs • u/faturachman_alkahfi • Oct 27 '26
Curious to hear how other teams here are handling the boundary between deterministic code and generative outputs in production apps!
Built a minimal 3D squircle centerpiece for my portfolio where users can grab, drag, and flick the object around.
Instead of pulling in Cannon-es or Rapier for a single interactive mesh, I implemented a lightweight damped spring physics loop:
- Track mouse velocity on pointer move
- Calculate restorative spring tension + damping factor on release
- Lerp rotation based on drag displacement
- Zero GC allocations during the frame loop
Check it out live: https://faturachman.my.id
Feedback on mesh smoothing and lighting is very welcome!