渲染FBX对象不起作用的三j。 - 未定义的404(找不到)

发布于 2025-01-22 21:05:46 字数 622 浏览 4 评论 0原文

我有一组.fbx对象,这些对象正在尝试通过Webxr应用程序上的FBXLOADER加载。

window.fbxLoader.load("/assets/modelate_FBX/Vaza%208067134/Vaza 8067134.fbx", function( object ) {
    const flower = this.scene.children.find(c => c.name === 'sunflower');
    window.sunflower = this.scene;
});

问题是,每当我尝试运行该应用程序时,我都会收到以下控制台错误:

undefined:1 GET http://localhost:8887/assets/modelate_FBX/Vaza%208067134/undefined 404 (Not Found)

我很确定对象路径是正确的,因为我以前设法渲染GLTF文件。但是我需要渲染FBX。

我希望有必要为纹理模型定义一条路径。但是说实话,我有点迷路了。

I have a set of .fbx objects that I'm trying to load through FBXLoader on a WebXR App.

window.fbxLoader.load("/assets/modelate_FBX/Vaza%208067134/Vaza 8067134.fbx", function( object ) {
    const flower = this.scene.children.find(c => c.name === 'sunflower');
    window.sunflower = this.scene;
});

The problem is that whenever i try running the app, I get the following console error:

undefined:1 GET http://localhost:8887/assets/modelate_FBX/Vaza%208067134/undefined 404 (Not Found)

I am pretty sure the object path is right, as I previously managed to render GLtf files. But I need to render the FBX aswell.

I'm expecting the need to define a path for the texture models. But to be honest I'm kinda lost.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

万水千山粽是情ミ 2025-01-29 21:05:46

切勿将您的对象路径定义为localhost!这将永远无法正常工作。相反,但是您可以作为/Assets/Modeate_fbx/vaza%208067134/vaza 8067134.fbx

这是您fbxloader的工作方式:

window.fbxLoader.load("/assets/modelate_FBX/Vaza%208067134/Vaza 8067134.fbx", function( object ) {
    const flower = this.scene.children.find(c => c.name === 'sunflower');
    window.sunflower = this.scene;
});

Never define your object path as localhost! This will never work. Instead, but you path as /assets/modelate_FBX/Vaza%208067134/Vaza 8067134.fbx.

Here is how youFBXLoader would work:

window.fbxLoader.load("/assets/modelate_FBX/Vaza%208067134/Vaza 8067134.fbx", function( object ) {
    const flower = this.scene.children.find(c => c.name === 'sunflower');
    window.sunflower = this.scene;
});
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文