Autodesk GuiViewer3D 初始化报​​错

Autodesk GuiViewer3D initialize gives an error

以下是我的代码

Autodesk.Viewing.Initializer(options, function () {
    var htmlDiv = document.getElementById('forgeViewer');
    viewer = new Autodesk.Viewing.GuiViewer3D(htmlDiv);
    var startedCode = viewer.start();
    if (startedCode > 0) {
        console.error('Failed to create a Viewer: WebGL not supported.');
        return;
    }

但是还是报错如下

请指教我哪里做错了?

使用查看器 V6

更新:

 var htmlDiv = document.getElementById('forgeViewer');
 viewer = new Autodesk.Viewing.Private.GuiViewer3D(htmlDiv);

错误堆栈

SettingsPanel.js:377 Uncaught TypeError: Cannot read property 'tBodies' of null
    at v.l.addCheckbox (SettingsPanel.js:377)
    at v.addCheckbox (ViewerSettingsPanel.js:137)
    at v.createNavigationPanel (ViewerSettingsPanel.js:328)
    at new v (ViewerSettingsPanel.js:64)
    at D.createSettingsPanel (GuiViewer3D.js:837)
    at D.initModelTools (GuiViewer3D.js:926)
    at D.createUI (GuiViewer3D.js:369)
    at GuiViewer3D.js:291
    at GuiViewer3D.js:301
l.addCheckbox   @   SettingsPanel.js:377
v.addCheckbox   @   ViewerSettingsPanel.js:137
v.createNavigationPanel @   ViewerSettingsPanel.js:328
v   @   ViewerSettingsPanel.js:64
D.createSettingsPanel   @   GuiViewer3D.js:837
D.initModelTools    @   GuiViewer3D.js:926
D.createUI  @   GuiViewer3D.js:369
(anonymous) @   GuiViewer3D.js:291
(anonymous) @   GuiViewer3D.js:301

new error

谢谢 干杯

在版本 6 及更早版本中,GuiViewer3D class 位于不同的命名空间中:Autodesk.Viewing.Private.GuiViewer3D.

自版本 7 起,完全限定名称为 Autodesk.Viewing.GuiViewer3D