# `CameraState`

> Contract 2.0.0 · package sha256 `a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e` · generated from `configurator-runtime.d.ts` by `services/onsite-scripter/scripts/build-contract-docs.mjs`; edit the source, not this file.

Interface · `import type { CameraState } from '@holostep-configurators/runtime-client/contract';` · stable · since 2.0.0 · section 10. Camera

Observed: as of the last drawn frame (this frame's inside [`onFrame({ phase: 'late' })`](Session.onFrame.md)).

## Members

| Member | Kind | Summary |
| --- | --- | --- |
| <a id="position"></a>[`position`](CameraState.position.md) | property | World position, metres. |
| <a id="target"></a>[`target`](CameraState.target.md) | property | The orbit target, metres. |
| <a id="azimuthdeg"></a>[`azimuthDeg`](CameraState.azimuthDeg.md) | property | Degrees in [−180, 180); 0 looks from +Z. |
| <a id="polardeg"></a>[`polarDeg`](CameraState.polarDeg.md) | property | Degrees in [0, 180]; 0 = from above. |
| <a id="distance"></a>[`distance`](CameraState.distance.md) | property | Metres from the target. |
| <a id="focaloffset"></a>[`focalOffset`](CameraState.focalOffset.md) | property | Metres the view is shifted from the target. |
| <a id="fovdeg"></a>[`fovDeg`](CameraState.fovDeg.md) | property | Vertical field of view, degrees. |
| <a id="horizontalfovdeg"></a>[`horizontalFovDeg`](CameraState.horizontalFovDeg.md) | property | Horizontal field of view, degrees. |
| <a id="aspect"></a>[`aspect`](CameraState.aspect.md) | property | Width over height of the element (of the image, in a capture's `snapshot.camera`). |
| <a id="mode"></a>[`mode`](CameraState.mode.md) | property | The current [`camera.mode`](Camera.mode.md). |
| <a id="frame"></a>[`frame`](CameraState.frame.md) | property | The drawn frame this state comes from. |

## Declaration

```ts
export interface CameraState {
  readonly position: ReadonlyPoint3;
  readonly target: ReadonlyPoint3;
  readonly azimuthDeg: number;
  readonly polarDeg: number;
  readonly distance: number;
  readonly focalOffset: ReadonlyPoint3;
  readonly fovDeg: number;
  readonly horizontalFovDeg: number;
  readonly aspect: number;
  readonly mode: 'orbit' | 'pan' | 'fixed' | 'other';
  readonly frame: number;
}
```

## Generic-API test (spec 3.1)

| Rule | Result |
| --- | --- |
| 1. Neutral name | pass: `CameraState` names no product |
| 2. A precedent | not recorded: no ledger row (coverage.json) names this member or its owner |
| 3. Two apps, or labs | pass: 21 apps (fleet cross-check: app-04c2774145, app-37356bf09f, app-378d190f1b, app-4762caacdc, app-4f16d2f6da, app-510d750508, app-822bb9d6aa, app-b362a81c85 and 13 more) |
| 4. The cheaper fix first | not recorded per member (Appendix B decides it per need) |
