模型缩放时如何设置枢轴

发布于 2025-02-10 07:38:19 字数 238 浏览 1 评论 0原文

它在缩放功能时在BIM360查看器上找到了枢轴,但是本机观看器中的此功能不可用。我尝试使用viewer.navigation.setPivotpoint(point);,但是我不知道如何在鼠标位置后缩放。

bim360 demo

It is found on BIM360 viewer has set pivot when zooming feature, but this feature not available in native viewer. I'm try to used viewer.navigation.setPivotPoint(point);, but I don't know how to get zooming after mouse position.

BIM360 Demo

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

莫言歌 2025-02-17 07:38:19

只需调用vieewr.navigation.setwheelsetspivot(true)即可活跃此行为。

如果您想将其制作到查看器应用程序的默认行为,则可以在“查看器配置文件”设置中更改它。

let viewer = new Autodesk.Viewing.GuiViewer3D(document.getElementById('forgeViewer'), config3d);
let startedCode = viewer.start();
if (startedCode > 0) {
  console.error('Failed to create a Viewer: WebGL not supported.');
  return;
}

const profileSettings = Autodesk.Viewing.ProfileSettings.clone(Autodesk.Viewing.ProfileSettings.AEC);
profileSettings.settings.wheelSetsPivot = true;

const profile = new Autodesk.Viewing.Profile(profileSettings);
viewer.setProfile(profile);

//Autodesk.Viewing.Document.load(documentId, onDocumentLoadSuccess, onDocumentLoadFailure);

Just call vieewr.navigation.setWheelSetsPivot(true) to active this behavior.

If you want to make it your viewer app's default behavior, you can change it in the viewer profile settings.

let viewer = new Autodesk.Viewing.GuiViewer3D(document.getElementById('forgeViewer'), config3d);
let startedCode = viewer.start();
if (startedCode > 0) {
  console.error('Failed to create a Viewer: WebGL not supported.');
  return;
}

const profileSettings = Autodesk.Viewing.ProfileSettings.clone(Autodesk.Viewing.ProfileSettings.AEC);
profileSettings.settings.wheelSetsPivot = true;

const profile = new Autodesk.Viewing.Profile(profileSettings);
viewer.setProfile(profile);

//Autodesk.Viewing.Document.load(documentId, onDocumentLoadSuccess, onDocumentLoadFailure);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文