The call to api.scene.camera.zoomAsync(); should do what you want. Do I understand correctly that when you call it, it zooms too far from the model? This is likely because some leftover geometry is used to compute the bounding box, double check that you have turned off preview for all the construction geometry such as points, curves, etc…
Actually I thought so but I couldnt find any clue of any curves etc… . I think I have a drawing problem… but for the second way…Can you lead me the true api key for :
You have to use an array of scene paths in the zoomAsync function, as documented here.
The call would be api.scene.camera.zoomAsync([scenePath],{duration:500});
where scenePath is the scene path of the asset you want to zoom to. Depending on how materials are defined in your model, getting the scene path of your asset might look like the following call: scenePath = api.scene.get({name: 'raylar_1', format: 'glb'}, "CommPlugin_1").data[0].scenePath;