---
title: getTransform
slug: viewer-3d/methods/getTransform
docTags: 
createdAt: 2024-03-01T14:17:48.683Z
---

Returns the current transform applied to the specified model.

## Example

::codepen{url="https://codepen.io/Catenda/embed/QWXdXdJ"}

## Usage

```javascript
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**

| **Name**   | **Type**                                | **Required** | **Description**       |
| ---------- | --------------------------------------- | ------------ | --------------------- |
| `position` | [Vector3](docId\:kEwRHKTC8Iq2HlT48sRFQ) | No           | Position of the model |
| `rotation` | Rotation                                | No           | Rotation transform    |
| `scale`    | [Vector3](docId\:kEwRHKTC8Iq2HlT48sRFQ) | No           | Scale transform       |

**Rotation**

| **Name**           | **Type**                                | **Required** | **Description**      |
| ------------------ | --------------------------------------- | ------------ | -------------------- |
| `angle`            | Number                                  | No           | Angle in radians     |
| `centerOfRotation` | [Vector3](docId\:kEwRHKTC8Iq2HlT48sRFQ) | No           | Point to rotate over |
| `x`                | Number                                  | Yes          | X axis rotation      |
| `y`                | Number                                  | Yes          | Y axis rotation      |
| `z`                | Number                                  | Yes          | Z axis rotation      |

### Example

```javascript
{
  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,
  },
};
```

