在Autodesk Forge Viewer中,我无法在同一页面上实例化6个以上的查看器(Autodesk.Viewing.ViewingApplication)。
我已经尝试了此处提出的无效解决方案:There are too many active WebGL contexts on this page, the oldest context will be lost. [dedup.min.js]
我使用的功能:
Autodesk.Viewing.Initializer(options, function onInitialized(){
this.viewerApp = new Autodesk.Viewing.ViewingApplication(this.div_id);
this.viewerApp.registerViewer(this.viewerApp.k3D, Autodesk.Viewing.Private.GuiViewer3D, { extensions: ['PropertyInspectorExtension']});
this.viewerApp.loadDocument(documentId, onDocumentLoadSuccess, onDocumentLoadFailure);
}.bind(this));
[显然,可以使用Three.js来实现,但是可以在Autodesk Forge中实现吗?否则我自己不知道该怎么做。
*答案:Display multiple instances of three.js in a single pageIs it possible to enable unbounded number of renderers in THREE.js?
*结果示例:https://threejs.org/examples/webgl_multiple_elements.html
我知道这是一种解决方法,但是您可以在Chrome中使用此命令行开关: