I’m having 2 issues in my application.
1. Trouble controlling the zoom level of the camera. I want to avoid zoom-out completely and allow only a small amount of zoom-in. Amending the camera.upperRadiusLimit
does not do what I need. It acts more like a the zoom level when the page loads.
var camera = new BABYLON.ArcRotateCamera("Camera", -Math.PI / 2, Math.PI / 4, 5, BABYLON.Vector3.Zero(), scene);
BABYLON.SceneLoader.AppendAsync("assets/model/", "sample.gltf", scene).then(function (scene) {
scene.createDefaultCameraOrLight(true, true, true);
let camera = scene.activeCamera;
camera.lowerRadiusLimit = 1;
camera.upperRadiusLimit = 100;
camera.attachControl(canvas, true);
});
2. I draw in to a canvas multiple times to change the texture dynamically. When the new text is being applied the model sort of has a flickering effect (happens ones for each texture change). Could someone suggest me how to prevent this so the new texture is being applied smoothly?