Search code examples
javascriptfile-uploadthree.jsuploadinggltf

three.js - let user upload .gltf / .glb 3d model


Hi just started learning three.js

Is there any way to let the user upload his .glb / .gltf 3d model and see it on the canvas right away?

I'm thinking maybe is possible with PHP since I'm using WordPress?

Can PHP and JS even communicate together that way?

Or it is better uploading only with JS?

Thank You!


Solution

  • Yes it is possible. Have a look at Don McCurdy GLTF viewer.

    https://gltf-viewer.donmccurdy.com/

    https://github.com/donmccurdy/three-gltf-viewer