如何在以下代码中访问顶点和三角形面的列表?
我基本上想知道如何从GLTF文件的场景中访问顶点和三角形面的列表。我目前拥有的。
return from(fetch(targetUrl.toString(), {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(response => {
response.arrayBuffer()
.then(data => {
const loader = new GLTFLoader();
loader.parse(data, "", gltf => {
this.scene.add(gltf.scene);
})
})
})).pipe(
map((surfaceMesh) => {
this.surfaceMeshes.set(surfaceMeshKey, surfaceMesh);
}
))
}
在这方面,我想拥有一系列顶点和三角形面孔,而不是计数!在这种情况下,有人可以帮我吗?如果你们对修改代码的外观进行语法,对我来说意义重大?
I would like to basically know how do I access the list of vertices and triangular faces from the scene of gltf file. What I have currently is this.
return from(fetch(targetUrl.toString(), {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(response => {
response.arrayBuffer()
.then(data => {
const loader = new GLTFLoader();
loader.parse(data, "", gltf => {
this.scene.add(gltf.scene);
})
})
})).pipe(
map((surfaceMesh) => {
this.surfaceMeshes.set(surfaceMeshKey, surfaceMesh);
}
))
}
I would like to have the array of vertices and triangular faces in this regard, not the count! Can somebody please help me out in this case? It would mean a lot to me if you guys do the syntax of how the modified code would look like?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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