aframe 在 <a-gltf-model/> 中看不到嵌入 .gltf 场景 - 404 未找到。 (通过node.js)

aframe doesn't see embed .gltf scene inside <a-gltf-model/> -- 404 Not found. (through the node.js)

aframe 没有看到嵌入的 .gltf 场景 'a-gltf-model' -- 404 未找到。 (通过 node.js)。但是,如果我将 src 放入 'a-emity' - 场景在彩虹上的页面上某处 width/height 0/0。位置没有帮助。入门场景(内联)很好。

所以,我在根目录下有两个文件,第一个是 'index.js':

var express = require('express');
var app = express();
var path = require("path");

app.get('/', function (req, res) {
    res.sendFile(path.join('C:/web/index.html'));
});
app.listen(3000, function () {
  console.log('Example app listening on port 3000!');
});



并且,这里是 'index.html' 的内容:

<!DOCTYPE html>
    <html>
      <head>
        <title>test aframe scene</title>
        <script src="https://aframe.io/releases/0.8.0/aframe.min.js"></script>
      </head>
      <body>
        <a-scene>
          <a-gltf-model src="scene/archilogic/export.gltf"></a-gltf-model>
        </a-scene>
      </body>
    </html>



p.s. 对不起,我才刚刚开始,这是测试任务,我之前使用过 Blender。原场景here

此错误意味着您的模型(或其中的某些部分)不在您的代码说明的位置;如果没有完整的代码,我们几乎无能为力。您还可以在 3d models and hosting 上查看 A-Frame 文档。

编辑: 现在您已经发布了一些代码,请注意您的 Express 服务器 接受 / URL。如果你想通过它加载图像和模型,你需要将它设置为提供额外的文件。来自 Serving Static Files in Express:

app.use(express.static('C:/web'))

您的所有文件都应该放在该文件夹中。

另请注意,Archilogic(此 glTF 文件的来源)使用旧版本的 glTF,与最新的 A-Frame 版本不兼容。如果您看不到模型 here,它不会出现在 A-Frame 中。你需要 glTF 2.0.