I am trying to initialize the viewer on my page with specific settings. This works fine for ‘top level settings’ but not for settings that are part of an object. Let me make an example:
Intiliazing the settings works fine for me when they are ‘top level settings’. Let me make an example.
let settings = {
ticket: 'XXX' //works fine
container: _container, //works fine
blurSceneWhenBusy: false, //works fine
scene:{
gridVisibility: true //does not work
},
'scene.gridVisibility': true //also does not work
};
window.api = new SDVApp.ParametricViewer(settings); //no error is thrown but the gridVisiblity setting is not applied
Basically, I would love to specify a long list of parameters when initializing the model.
Your example is not working as expected because the viewer constructor accepts a separate set of constructor settings, as opposed to the settings you can change using api.updateSettingsAsync (changing multiple settings at once) or api.updateSettingAsync (changing single settings).
I was sort of expecting this, but was also unsure where to put the initial api.updateSettingsAsync command. The example and your explanation have cleared up everything though.