Manual Reference Source
import CameraManipulator from '@modelo/api/doc/View/tool/CameraManipulator.js'
public class | source

CameraManipulator

Extends:

Tool → CameraManipulator

Constructor Summary

Public Constructor
public

Constructor of CameraManipulator class

Method Summary

Public Methods
public

addInput(input: Mouse | Keyboard)

Add input to this tool

public

Delete all resources in the cameraManipulator object.

public

Exit orthogonal view mode

public
public

Set the transition speed of camera when play animation.

public

switchToUserView(viewData: object, isVrEnabled: boolean)

public

switchToView(direction: string)

Switch camera to certain direction

public

Switch camera to the default view which contains all elements in view.

Inherited Summary

From class Tool
public

addInput(input: *)

Add input to the tool

public

Destroy the tool and release all internal resources

public
public

setEnabled(enabled: boolean)

Enable/Disable the tool

Public Constructors

public constructor(viewer: Viewer3D) source

Constructor of CameraManipulator class

Override:

Tool#constructor

Params:

NameTypeAttributeDescription
viewer Viewer3D

The viewer this tool belongs to.

Public Methods

public addInput(input: Mouse | Keyboard) source

Add input to this tool

Override:

Tool#addInput

Params:

NameTypeAttributeDescription
input Mouse | Keyboard

Can be a mouse object or keyboard object.

public destroy() source

Delete all resources in the cameraManipulator object.

Override:

Tool#destroy

public exitOrthoView() source

Exit orthogonal view mode

public isAvailable(isMobile: boolean): boolean source

Params:

NameTypeAttributeDescription
isMobile boolean

If the app is running on a mobile device.

Return:

boolean

True if this tool is available.

public setTransitionSpeed(speed: number) source

Set the transition speed of camera when play animation.

Params:

NameTypeAttributeDescription
speed number

public switchToUserView(viewData: object, isVrEnabled: boolean) source

Params:

NameTypeAttributeDescription
viewData object

the view data.

isVrEnabled boolean

in VR mode?

public switchToView(direction: string) source

Switch camera to certain direction

Params:

NameTypeAttributeDescription
direction string

The camera direction to swatich to. The enum values of the direction is in Modelo.View.ViewAngle

public switchToWorldView() source

Switch camera to the default view which contains all elements in view.