Skip to content

Commit 4349acf

Browse files
committed
added doc string to centerVisibleObjects
1 parent ba0bddd commit 4349acf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/viewer.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,6 +1570,13 @@ class Viewer {
15701570
this.update(true, notify);
15711571
}
15721572

1573+
/**
1574+
* Centers the camera view on all visible objects in the scene.
1575+
* Calculates a bounding box that encompasses all visible ObjectGroup instances
1576+
* and sets the camera target to the center of that bounding box.
1577+
*
1578+
* @param {boolean} [notify=true] - Whether to notify listeners of the camera update
1579+
*/
15731580
centerVisibleObjects(notify = true) {
15741581
const groups = this.nestedGroup.groups;
15751582

0 commit comments

Comments
 (0)