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

Hello, why after I click the "Upload" button, click "OK", the file is not loaded in, there is no reaction #290

Closed song0603 closed 2 years ago

song0603 commented 2 years ago

@A}0}DH2G3P8{{M5{LFGPTW

donmccurdy commented 2 years ago

I don't see any .gltf or .glb files in this directory, are you sure it's a glTF file? Does that last file just have its extension hidden? If you could share the .ZIP (you can upload to github comments) that may help.

song0603 commented 2 years ago

Thank you very much for your timely reply. I have also tried other GLTF files, which can be viewed normally on your website, but not on mine T~1HFZH89C0EHT _W~QEW_K

[Uploading models.zip…]()

song0603 commented 2 years ago

And I also found that before I uploaded the file, there was a dot flashing all the time, but there was no dot in your website. I don't know if this is the problem U5MXG3HC U921K@F9HQEL`X

donmccurdy commented 2 years ago

@song0603 it looks like the .ZIP in your previous comment did not fully upload, you may need to wait before submitting the comment. I think there's a 10MB limit.

song0603 commented 2 years ago

models.zip I uploaded it again, but I think my problem may be that the environment is not configured properly, I'm using VS Code and Microsoft,as a novice who is not familiar with it

donmccurdy commented 2 years ago

Oh I see – you'll need to run some kind of local server, you can't run websites properly when opening them directly from disk. There may be other issues. The intended way to run this tool locally is:

npm install
npm run dev
song0603 commented 2 years ago

Thank you again for your reply. As you said, I have tried these two commands, but the result is in the picture. I don't know how to solve it. 8(1OPW8~L%07DK3LH@UZBSH

donmccurdy commented 2 years ago

What happens if you visit http://localhost:49708 (from screenshot above) rather than the local disk path shown in your first screenshot?

song0603 commented 2 years ago

After trying your suggestion, I succeeded. Thank you very much