I am using framingBehavior to automatically show all the objects in the mesh when they are loaded. However, I would like to have the framing behavior and bounds disabled after the objects are loaded for the first time.
I have tried:
var framingBehavior = new BABYLON.FramingBehavior();
framingBehavior.attach(renderer.camera);
framingBehavior.zoomOnMesh(myMesh, false, () => {
framingBehavior.detach();
});
and
renderer.camera.useFramingBehavior = true;
renderer.camera.framingBehavior.framingTime = 1;
renderer.camera.setTarget(myMesh);
renderer.camera.useFramingBehavior = false;
In both cases, when zooming manually, the framing bounds are still enforced and zooming is limited to keep the whole mesh visible. Is there a way to completely remove them, as if framingBehavior was never set to true to start with?
Thank you!