getTransform
Returns the current transform applied to the specified model.
Example
Usage
const modelId = "my-model-id";
const type = "bim";
const transform = viewer3d.getTransform(modelId, type);Parameters
modelId
Id of the model.
Type | Required |
|---|---|
String | Yes |
type
Type of the model.
Type | Required |
|---|---|
String | No |
Valid values are:
- bim
- point-cloud
Return Value
The transform applied to the model.
Type |
|---|
Object |
Properties
Rotation
Name | Type | Required | Description |
|---|---|---|---|
angle | Number | No | Angle in radians |
centerOfRotation | Vector3 | No | Point to rotate over |
x | Number | Yes | X axis rotation |
y | Number | Yes | Y axis rotation |
z | Number | Yes | Z axis rotation |
Example
{
rotation: {
centerOfRotation: {
x: 0,
y: 0,
z: 0,
},
angle: 0,
x: 0,
y: 0,
z: 1,
},
position: {
x: 0,
y: 0,
z: 0,
},
scale: {
x: 1,
y: 1,
z: 1,
},
};