I try to configure the viewer with my external JSON, following the documentation at https://doc.babylonjs.com/extensions/configuring_the_viewer#configuring-using-external-json
You can look at my HTML page here
and the JSON file here
I have 2 issues:
I would expect the inspector to show up, because I set "debug": "true"
in the JSON, but i dont see the inspector.
I would expect the camera to not auto-rotate, because I have set camera.behaviors.auto-rotate="0"
in the babylon-tag in the HTML sourcecode, but it rotates.
Am I doing something wrong? Do I misunderstand the documentation? Please point me to the right direction. How do I correctly use a separate JSON-file for configuration of the viewer? Thank you for any hint!
Hallo 
Oh, that took me a while!
So - the thing is this - your json is sadly wrong. I saw your pull request yesterday (and approved it
) but I just realized - it is wrong as well. debug should be set to be a boolean. so, not “true” but true
. the JSON needs to look like this:
{
"scene": {
"debug": true
}
}
Otherwise it will be ignored, as it compares types as well as content.
1 Like
Oha. 
Thank you! It works now. I was only watching if the JSON produces no error in the browser, but did not realize that it was still not working. I changed it and sent a new pull request to update this in the documentation.
I will go on and try to find out how to stop the auto-rotation of the camera, since the cam still rotates. Any hints on that, too?
It should be set to “false” instead of “0”.
Changing to
camera.behaviors.auto-rotate="false"
solves the problem and the camera does not rotate any more. Ill update the documentation in this point as well.
Hm. I am confused. Setting any value except of “0” at
camera.behaviors.auto-rotate
stops the rotation, and setting “0” starts the rotation. 
0 is the type of behavior and not its on/off state. false
simply turns it off. 0 set the type to 0 (auto rotate behavior) and uses default values. You don’t have to call it auto-rotate, you can call it - rotateAutomatically or any other term you want. what’s important is that the type will be correct.
If you want to configure the behavior, you can set it to be an object:
behaviors.autoRotate: {
type: 0,
idleRotationWaitTime: 4000,
idleRotationSpeed: 0.17453292519943295,
idleRotationSpinupTime: 2500,
zoomStopsAnimation: false
}
1 Like
Thank you! It works like you say. Anyways I have to go deeper into this to fully understand what behaviors I can control/config like this and how I do it. Next, I will try to change the .env and the sykbox.
1 Like