在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/云計(jì)算  HTML/ 請問加載模型后可以Viewer API修改ViewCube的角度么

請問加載模型后可以Viewer API修改ViewCube的角度么

如圖
clipboard.png

默認(rèn)加載為這個(gè)角度

能在加載后就是

clipboard.png

如圖角度么?

回答
編輯回答
來守候

可以的,只要監(jiān)聽一個(gè) Autodesk.Viewing.GEOMETRY_LOADED_EVENT 事件和調(diào)用 Viewer3D#setViewCube() 函數(shù)就可以達(dá)到了,請參考幫助文檔:https://developer.autodesk.co...

const onGeometriesLoaded = function() {
    viewer.removeEventListener(
        Autodesk.Viewing.GEOMETRY_LOADED_EVENT,
        onGeometriesLoaded
    );
    // Postpone this action to next frame
    setTimeout(function() {
        viewer.setViewCube( 'top/back/left' );
    }, 1000);
};

viewer.addEventListener(
    Autodesk.Viewing.GEOMETRY_LOADED_EVENT,
    onGeometriesLoaded
);
2017年2月7日 08:44