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

Returns the current state of the objects in the scene.

## Example

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

## Usage

```javascript
const modelIds = ["model_id_1", "model_id_2"];

const sceneState = viewer3d.getSceneState(modelIds);
```

## Parameters

### modelIds

List of model ids to limit result, includes all models by default.

| **Type**       | **Required** |
| -------------- | ------------ |
| Array\[String] | No           |

## Return Value

The current state of the objects in the scene.

| **Type** |
| -------- |
| Object   |

**Properties**

| **Name**      | **Type**       | **Description**                |
| ------------- | -------------- | ------------------------------ |
| `selected`    | Array\[String] | List of selected object ids    |
| `visible`     | Array\[String] | List of visible object ids     |
| `hidden`      | Array\[String] | List of hidden object ids      |
| `translucent` | Array\[String] | List of translucent object ids |

### Example

```javascript
{
  selected: ["272335963430"],
  visible: ["272335963424", "272335963427", "272335963430"],
  hidden: ["272335963429"],
  translucent: [],
};
```

