How do you properly load a GTLF file in A-Frame (Specifically in glitch?)

淺唱寂寞╮ 提交于 2020-01-26 04:03:29

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!