You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

请求为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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.28 22:32:39