How to use Zoom Api

Hi I wanna Zoom extand but, I couldnt handle it.

api.scene.camera.zoomAsync(); with that – > white places more than geometry… it is not extand for my modal…

in spite of that I wanna zoom the longest part of my modal so I thought maybe with this way I can zoom extand full width…

I tried that :

api.scene.camera.zoomAsync( {name:“raylar_1”},[{duration:500}])

what can be wrong?

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 :

api.scene.camera.zoomAsync( {name:“raylar_1”},[{duration:500}])

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;

thank you very much, that is what I want…