如何在A帧中正确加载GTLF文件(特别是在毛刺中?) [英] How do you properly load a GTLF file in A-Frame (Specifically in glitch?)

查看:139
本文介绍了如何在A帧中正确加载GTLF文件(特别是在毛刺中?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从Sketchfab之类的网站下载了.gltf中的3D模型。如果我将压缩的.zip文件拖到我的资产文件夹中,并获得A框架可以使用的链接,则该链接将不起作用。

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.

推荐答案

最简单的方法是

提取右键单击文件浏览器中的zip文件,然后按提取所有文件

Extract your zip file by right clicking on it in file explorer and pressing "extract all"

现在您已经提取了.gltf文件,应该自动将2个或3个文件带入。它们可能是纹理 场景 scene.bin 此视频很好地描述了它们之间的差异,并对整个过程进行了详细说明。

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.

此网站会将它们全部放入 out.glb ,这是您可以上传到资产的文件。

This website will put them all into out.glb and this is the file you can upload to your assets.

将3d模型引用为

<a-gltf-model></a-gltf-model> 

并使用 src 标签。

这篇关于如何在A帧中正确加载GTLF文件(特别是在毛刺中?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆