Skip to main content

setCameraPos

@combeenation/custom-code-utils


Variable: setCameraPos()

const setCameraPos: (pos, transitionMS?, sdCtrlName?, queued) => Promise<SDUpdateQueueResult> = SdvCamera.setCameraPos

Move the camera to a desired position

Parameters

pos

An object or JSON string including an "position" & "target" object.
See https://viewer.shapediver.com/v2/staging/doc/module-CameraApi-CameraApi.html#updateAsync for further info.

string | CameraDefinition

transitionMS?

number

Duration of the movement in milliseconds

sdCtrlName?

string

If not configured, the first shapediver instance of the configurator is used

queued?

boolean = false

true: Execute camera movement after all previously added movement commands have been finished.
false: Abort current and pending movement commands and move to the desired position immediatly.

Returns

Promise<SDUpdateQueueResult>