开发者问题收集

在某些浏览器(尤其是移动设备)上,查看器不会在最新的库中显示模型

2017-10-27
84

嗨,我有一个具体的问题,当我尝试在平板电脑和 Surface 上运行我的项目时,我遇到了错误:

viewer3D.js?v=3.1.*:1372 Uncaught TypeError: Cannot read property 'id' of null
at _.recognizeWith (viewer3D.js?v=3.1.*:1372)
at Array.forEach (<anonymous>)
at g (viewer3D.js?v=3.1.*:1372)
at f (viewer3D.js?v=3.1.*:1372)
at _.recognizeWith (viewer3D.js?v=3.1.*:1372)
at new Autodesk.Viewing.GestureHandler (viewer3D.js?v=3.1.*:13874)
at GuiViewer3D.Viewer3D.createControls (viewer3D.js?v=3.1.*:42281)
at GuiViewer3D.Viewer3D.initialize (viewer3D.js?v=3.1.*:42354)
at GuiViewer3D.initialize (viewer3D.js?v=3.1.*:48392)
at GuiViewer3D.Viewer3D.start (viewer3D.js?v=3.1.*:42154)

此错误一直发生到版本 2.13,当我使用 v2.12 时,一切正常。

我想使用最新的 api,因为我发现在较新的库上一切都运行得更好

你能以某种方式帮助我吗

//脚本加载

<script src="https://developer.api.autodesk.com/derivativeservice/v2/viewers/three.js?v=2.12.*"></script>
<script src="https://developer.api.autodesk.com/derivativeservice/v2/viewers/viewer3D.js?v=2.12.*"></script>

我也试过了

<script src="https://developer.api.autodesk.com/modelderivative/v2/viewers/three.js?v=3.1.*"></script>
<script src="https://developer.api.autodesk.com/modelderivative/v2/viewers/viewer3D.js?v=3.1.*"></script>
1个回答

问题是由第三方库引起的。 “问题出在外部库 ->materialize.js,当我使用它时出现了那个错误,现在我抛出它,现在没问题了。”

Jaime Rosales
2017-11-02