在查看器中使用 loadModel 加载 .gltf 模型

时间:2021-02-02 17:23:06

标签: autodesk-forge autodesk-viewer autodesk

我试图在 Forge Viewer 中使用 GuiViewer3D 来使用 loadModel() 函数加载本地 .gltf 文件。这是可能的还是我每次都需要将其转换为 .SVF ?我注意到您还可以提供 FileLoader。 .gltf 文件有没有 FileLoader?

This is the error I get in the viewer

This is the error inside js console in the browser

1 个答案:

答案 0 :(得分:0)

Forge Viewer 具有(或至少具有)对直接加载 glTF 文件的实验性支持,但目前该功能似乎已损坏。我曾经能够使用 loadModel 方法加载 glTF 文件,但是当我今天尝试使用 Forge Viewer 版本 7.* 加载示例文件(尝试使用 glTF 1.0 或 glTF 2.0)时,我遇到了与您相同的错误.

巧合的是,查看器工程团队最近通知我他们计划为加载 glTF 2.0 文件添加官方支持。我计划尽快在 https://forge.autodesk.com/blog 上发布有关该功能的博客,敬请期待!

相关问题