---
title: Transition
summary: Interface in @bimworks/viewercommon.
order: 10
languages: [javascript]
sdk-package: JavaScript · @bimworks/viewercommon
---

# Transition

[[page:reference/javascript/api|API catalogue]] · `@bimworks/viewercommon` · Interface

````typescript sdk=js sdk-namespace="@bimworks/viewercommon"
interface Transition
````

A transition submitted with `ObjectStateManager.transition`

## Members

| Member | Kind | Description |
|---|---|---|
| [[page:reference/javascript/bimworks-viewercommon/transition-d8c50f74#member-finished-eb0d4932fb1a|finished]] | Property | Settles once the transition has ended: "finished" when it played to its end (every viewer that animates has drawn its last frame), "stopped" when stop(), sto… |
| [[page:reference/javascript/bimworks-viewercommon/transition-d8c50f74#member-started-9aba2b376505|started]] | Property | Settles once its first step's changes are in the manager's sets (the picture then catches up), or once it ended without starting; never rejects |
| [[page:reference/javascript/bimworks-viewercommon/transition-d8c50f74#member-stop-f891218e6b20|stop]] | Method | Stops it, running or still waiting; how: default its onStop. "end": as if it had played, the rest of its steps at once (a waiting one in its turn, after the … |

## `finished` {#member-finished-eb0d4932fb1a}

````typescript sdk=js sdk-namespace="@bimworks/viewercommon"
readonly finished: Promise<"stopped" | "finished">
````

Settles once the transition has ended: "finished" when it played to its end (every viewer that animates has
drawn its last frame), "stopped" when stop(), stopTransitions() or a replacing transition ended it. Rejects
when one of its queries fails

## `started` {#member-started-9aba2b376505}

````typescript sdk=js sdk-namespace="@bimworks/viewercommon"
readonly started: Promise<void>
````

Settles once its first step's changes are in the manager's sets (the picture then catches up), or once it ended
without starting; never rejects

## `stop` {#member-stop-f891218e6b20}

````typescript sdk=js sdk-namespace="@bimworks/viewercommon"
stop(how?: TransitionEnd): void
````

Stops it, running or still waiting; how: default its onStop. "end": as if it had played, the rest of its
steps at once (a waiting one in its turn, after the transitions ahead of it). "start": what it changed and
nothing changed since goes back to how it was before it. "current":
stays as it shows (camera, colours between two fixed colours or two transparencies exactly; a fade as a
transparency; the rest at the nearer end); a waiting transition with "start" or "current" changes nothing

### Parameters

| Name | Type | Description |
|---|---|---|
| `how` | [[page:reference/javascript/bimworks-viewercommon/transitionend-aa579c10|TransitionEnd]] |  |
