In forge viewer I want to call the focus method from my script to focus on selected elements.
I cannot find method like
viewer.focuse(viewer.getSelection());
This is quite simple, just call Viewer3D#fitToView()
~
var selection = viewer.getSelection();
viewer.fitToView( selection );
See here for the documentation: https://developer.autodesk.com/en/docs/viewer/v2/reference/javascript/viewer3d/