donmccurdy / three-gltf-viewer

Drag-and-drop preview for glTF 2.0 models in WebGL using three.js.
https://gltf-viewer.donmccurdy.com/
MIT License
2.09k stars 534 forks source link

share 3d model feature with a link #306

Closed softmuneeb closed 1 year ago

donmccurdy commented 1 year ago

Hi! If your GLB files are hosted already with the correct CORS headers, you can create links to them with the #model=$URL parameter:

https://gltf-viewer.donmccurdy.com/#model=https://raw.githack.com/KhronosGroup/glTF-Sample-Models/master/2.0/DamagedHelmet/glTF-Binary/DamagedHelmet.glb

However, this website does not offer the option to host your 3D models for you, you'll need to host them yourself on a site like Google Cloud Storage or Amazon S3. Sites like Google Drive and Dropbox do not support CORS, and cannot be used for this purpose.