请求为Viewer添加禁用AggregatedView.updateHomeCamera的选项
关于Autodesk Viewer相机配置被
AggregatedView.updateHomeCamera重置的问题 问题说明:
在模型加载前/加载过程中完成了相机的精细配置,但AggregatedView.updateHomeCamera函数会强制重置视图立方体,还通过调用autocam.sync和autocam.setHomeViewFrom执行大量无意义操作。由于该函数是独立函数,无法直接对其打补丁。临时解决方案:
通过对autocam.sync打补丁来规避问题,代码如下:const nativeSync = viewer.autocam.sync.bind(viewer.autocam) const sync = (camera) => { if (camera.position instanceof Autodesk.Viewing.Private.LmvVector3) return nativeSync(camera) } viewer.autocam.sync = sync该方案虽不够理想,但能保证相机和视图立方体正常工作。
诉求:
希望官方添加禁用AggregatedView.updateHomeCamera的选项,或者至少将该函数改为成员函数,方便开发者打补丁定制行为。
内容的提问来源于stack exchange,提问作者user2025261
相关产品推荐
相关产品推荐

