ReferenceScripting APIMotionCamera
MotionCamera
interfaceA 3D layer's camera (scene.camera). Read it with its properties, change it with its methods.
| Name | MotionCamera |
|---|---|
| Kind | interface |
| Script reaches it as | MotionScene.camera() |
| Since | 0.3 |
Syntax
interface MotionCamera { … }Properties
| Name | Type | Description |
|---|---|---|
orbitproperty | readonly number | How far round it is, degrees. |
heightproperty | readonly number | How high it looks down from, degrees. |
distanceproperty | readonly number | How far it is from what it looks at, in the layer's units. |
fovproperty | readonly number | Its field of view, degrees. |
Methods
| Signature | Description |
|---|---|
setOrbit(degrees: number, seconds?: number): Promise<boolean>method | Turns it round. |
setHeight(degrees: number, seconds?: number): Promise<boolean>method | Raises or lowers it. |
setDistance(distance: number, seconds?: number): Promise<boolean>method | Moves it nearer or further. |
setFov(degrees: number, seconds?: number): Promise<boolean>method | Widens or narrows its view. |
lookAt(target: { x: number; y: number; z: number } | [number, number, number], seconds?: number): Promise<boolean>method | Turns it to face a point of its scene. |
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.