lookAt
Adjusts the viewbox so that the specified objects are visible.
Example
Usage
const objectIds = ["object-1", "object-2"];
const options = {
expand: 10,
retainStoreys: true
};
viewer2d.lookAt(objectIds, options);Parameters
objectIds
Ids of the objects to look at.
Type | Required |
|---|---|
Array[String] | Yes |
options
Options for adjusting the viewbox.
Type | Required |
|---|---|
Object | No |
Properties
If any of the objects are visible the default value for retainStoreys is true, otherwise the default value is false.
Name | Type | Required | Description |
|---|---|---|---|
expand | Number or Vector2 | No | Expand the view in meters surrounding the objects |
retainStoreys | Boolean | No | Keep current storeys |