setViewState

Sets the current CameraViewState of the scene.

setViewState(
	viewState: CameraViewState
): Promise<void>

Parameters
Description
Type

viewState

Object describing the settings of a camera view.

Usage:

await modelApi.setViewState({
    position: {
        x: 4000,
        y: -5500,
        z: 1250
    },
    target: {
        x: 13,
        y: -36,
        z: 495
    },
    upVector: {
        x: 0,
        y: 0,
        z: 1
    }
});

Last updated