通过GLTF文件中的材料和网格(和动画)循环并导入三个JS
我敢肯定,这可能是以前曾经问过的,但是我是三j(和反应纤维)的新手,所以我的问题的一部分并不是真正知道如何用我需要的东西。.
我知道我想做什么必须有可能,因为可以在此处拖放任何GLTF文件: https:// https:// gltf-viewer。 donmccurdy.com/ 看到它正确呈现。
因此,我想做的是创建一个带有/没有动画的GLTF模型的循环(,例如此),并将其作为网页的一部分输出。
目前,我发现自己乏味地试图为模型的每个部分添加< mesh>
,而且我知道必须有一种更简单的方法。
我找到了“ nofollow noreferrer”> source-code a>在这里,但是如前所述,我仍然是该库的新手,因此将不胜感激的是任何帮助(或链接到类似问题)。
I'm sure this has probably been asked before, but I'm fairly new to threejs (and React Fiber), so part of my problem here is not really knowing how to phrase what I need..
I know what I want to do must be possible, because it is possible to drag and drop any gltf file here: https://gltf-viewer.donmccurdy.com/ and see it rendered correctly.
So, what I want to do, is create a loop which will traverse all parts (nodes?) of a gltf model with/without animations (such as this one) and output it as part of a webpage.
Currently, I find myself tediously trying to add a <mesh>
for each and every part of a model, and I know there must be an easier way.
I have found the source-code for the viewer here, but as mentioned, I'm still quite new to this library, so any help (or link to a similar question), would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论