问题
I downloaded a 3d model in .gltf from a website like sketchfab. If I drag the compressed .zip file into my assets folder and get a link that a-frame can use for it, it does not work.
回答1:
The easiest way to do this is to
1 Extract your zip file.
Extract your zip file by right clicking on it in file explorer and pressing "extract all"
2 Open the new folder
Now that you have extracted your .gltf file, you should automatically be brought either 2 or 3 files. They may be textures
scene
and scene.bin
this video has a great description of the differences in these, and a detailed explanation on this entire process.
3 Highlight all these files and drop them to https://glb-packer.glitch.me/
This website will put them all into out.glb
and this is the file you can upload to your assets.
Reference the 3d model as
<a-gltf-model></a-gltf-model>
and add the link from your assets with the src
tag.
来源:https://stackoverflow.com/questions/59187114/how-do-you-properly-load-a-gtlf-file-in-a-frame-specifically-in-glitch