Hey,
I am really confused right now and do not really understand what’s happening.
I am trying to dynamically update the settings of the viewer (to restrict user controls depending on the situation). However, everytime I update the settings, the camera zooms to the extents of the scene! See the following gif
The basicViewerSettings are defined as:
basicViewerSettings = {
blurSceneWhenBusy: true,
ignoreSuperseded: true, // Ignore intermediate solutions which at the time of their arrival have already been superseded by another customization request
loggingLevel: 1,
scene: {
gridVisibility: false,
groundPlaneVisibility: true,
groundPlaneReflectionVisibility: false,
camera: {
autoAdjust: false, //camera should not auto adjust to geometry updates, we will implement a more detailed version of this ourselves
revertAtMouseUp: false, // Enable / disable if the camera should be reset to its default position and target on mouse up
zoomExtentsFactor:1.2, //Factor to apply to the bounding box before zooming to extents
controls:{
orbit:{
enablePan: true, //enable panning/right click movements
enableKeyPan: false, //disable panning with keyboard
panSpeed: 1.0, //speed of rightclick movement
enableRotation: true, //enable rotations/left click movements
enableAutoRotation: false, //enable / disable automatic rotation of the camera
rotationSpeed: 1.0,
enableZoom: true,
zoomSpeed: 1.5, //Speed of zooming
//damping: Number How much to damp camera movements by the user
restrictions: {
rotation: {
minPolarAngle: 0,
maxPolarAngle: 90
}
}
}
}
}
}
}
Thanks for any help!
David