需要使用三个。
这就是我目前所拥有的。
return from(fetch(targetUrl.toString(), {headers: { 'responseType': 'application/octet-stream'}, method: 'GET'})).pipe(
map((surfaceMesh) => {
this.surfaceMeshes.set(surfaceMeshKey, surfaceMesh);
}
)
以前,服务器响应是在JSON提供的,因此一切正常。以前的回应看起来有点像这样。
content_uncompressed = {
"api_info": f"Visualization REST Server {__version__}",
"component_id": component_id_int,
"vertices": vertex_list,
"faces": trig_faces.tolist(),
"n_faces": n_trig_faces,
}
但是,最近,服务器响应已更改为八位字节(对于.glb文件)。因此,当然,不再可用的顶点和脸。我想知道如何使用trix.js(或其他任何东西)的GLTF加载器在返回语句中提取顶点和面部。如果您为我写下代码,这对我来说意义重大,因为我对所有这些都很新。
This is what I have currently.
return from(fetch(targetUrl.toString(), {headers: { 'responseType': 'application/octet-stream'}, method: 'GET'})).pipe(
map((surfaceMesh) => {
this.surfaceMeshes.set(surfaceMeshKey, surfaceMesh);
}
)
Previously, the server response was in JSON providing so everything worked perfectly. The previous response looked somewhat like this.
content_uncompressed = {
"api_info": f"Visualization REST Server {__version__}",
"component_id": component_id_int,
"vertices": vertex_list,
"faces": trig_faces.tolist(),
"n_faces": n_trig_faces,
}
However, recently, the server response has been changed to an octet-stream (that kind for .glb file). So of course, the array of vertices and faces are no longer available. I was wondering how do I extract the vertices and faces and put it in two different arrays in my return statement using GLTF Loader of three.js (or anything else). It would mean a lot to me if you write the code down for me as I am very new to all this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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