I have used v3d.SimplePreloader to load a glTF model. I want the camera to transition from its current position and lookat to a desired one on click of a button. I am able to get the current camera position and lookat and need to know how to do the camera interpolation.
// Get the camera object from the scene
let sceneCamera = app.scene.getObjectByName("Camera");
// Calculate the camera's current position and target
let initialPosition = sceneCamera.position.clone();
let camLookAt = new v3d.Vector3();
sceneCamera.getWorldDirection(camLookAt);
let initialTarget = camLookAt;
// Set the target position and lookat direction for the camera
let newPosition = new v3d.Vector3(-0.1624367, 0.182233, 0.4044204);
let newTarget = new v3d.Vector3(0.0, -0.23743, -0.9714045);
Thanks