如何在Autodesk-forge中更改查看器的画布

时间:2019-08-05 03:19:33

标签: canvas autodesk-forge

为了与其他GUI保持一致,我希望在autodesk-viewer中更改画布的颜色。但是,我不知道要获取其API或功能。

1 个答案:

答案 0 :(得分:0)

尝试viewer.setBackgroundColor-请参阅其文档here

viewer.setBackgroundColor(0, 59, 111, 255,255, 255)

或者尝试以下init选项:

const viewerOptions = {
clearColor: new THREE.Vector3(r/255.0,g/255.0,b/255.0),
clearColorBottom = new THREE.Vector3(r2/255.0,g2/255.0,b2/255.0),
...
}
new Autodesk.Viewing.Private.GuiViewer3D( divElement, viewerOptions)...