Warm tip: This article is reproduced from stackoverflow.com, please click
autodesk-forge forge

How to set all properties for viewer.getCamera() in Autodesk Forge

发布于 2020-05-19 17:56:37

I use the markup extension for Autodesk forge. When i want to show markups with separate layers, i get camera positions and rotate model with that position. But when i move model in show mode and after when i want to see another markup layer, the model positions changes. How can i fix this problem.

Questioner
Hovo216
Viewed
50
Eason Kang 2020-03-05 09:18

Please use const viewState = viewer.getState({ viewport: true }) to capture current camera statue instead, and restore it via viewer.restoreState( viewState )