Forge Viewer 多模型上下文和枢轴点
我们在查看器中加载了一个多模型。模型的坐标系相似,没有大的偏差。所有工具似乎都工作正常。
随着查看器状态的变化,枢轴点似乎会令人烦恼地更新。例如,当用户使用鼠标滚轮进行缩放时,枢轴点会移动到屏幕外的某个位置。 WheelSetsPivot 设置无法解决该问题。查看器版本是7。我们尝试了很多查看器版本,但没有成功。
当仅将一个模型加载到查看器中时,枢轴点按预期工作。
我怎样才能解决这个问题,使其像单一模型案例一样工作?多模型上下文或枢轴点有任何设置吗?
We have a multi-model loaded into the viewer. The coordinate systems of the models are similar, with no major deviations. All tools appear to be working normally.
The pivot point appears to update annoyingly as the viewer state changes. For example, when the user zooms with the mouse wheel, the pivot point moves somewhere outside the screen. The WheelSetsPivot setting does not fix the problem. Viewer version is 7. We have tried many viewer versions without any luck.
When loading only one model into the viewer pivot point works as expected.
How can I fix this to work like one-model case? Any settings for multi-model context or for pivot point?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
问题是查看器针对多模型上下文的旧式聚合视图初始化(查看器版本 6?)。当我将多模型加载更新为 v7 样式(loadDocumentNode)时,一切似乎都按预期工作。
The problem was the viewer's old style aggregate view init (viewer version 6?) for multi-model context. When I updated multi-model loading to v7 style (loadDocumentNode), everything seems to be working as expected.
如果我理解你所提到的情况,你的意思是当用户缩放并加载另一个模型时,相机会移动到某个地方,对吧?
如果是这样,您在调用 Viewer3D#loadDocumentNode 时是否在
loadModelOptions
中包含了preserveView: true
?此选项可以防止 Forge Viewer 在将新模型添加到场景时自动重置相机状态。If I understand the situation you addressed, you mean when user is zooming and another model is loaded, the camera will move to somewhere, right?
If so, haven't you included
preserveView: true
in theloadModelOptions
when calling Viewer3D#loadDocumentNode? This option can prevent Forge Viewer from auto-resetting camera state automatically on adding a new model to the scene.