SpaceMouseOperator

class Operators.SpaceMouseOperator()

Provide camera movement for the 3Dconnexion SpaceMouse.

Constructors

Operators.SpaceMouseOperator.constructor()
SpaceMouseOperator(viewer: IWebViewer, view: IView): SpaceMouseOperator

Parameters

viewer: IWebViewer

view: IView

Returns: SpaceMouseOperator

Methods

Operators.SpaceMouseOperator.addMapping()

inherited

addMapping(button: Button, modifier: KeyModifiers?): void

Adds a button and key modifier mapping for the operator. If no mapping is provided, all combinations are considered valid. All mappings require a mouse button, but a key modifier is optional.

Parameters

button: Button

modifier: KeyModifiers = KeyModifiers.None

Returns: void

Operators.SpaceMouseOperator.clearMapping()

inherited

clearMapping(): void

Clears any button and key modifier mappings for the operator.

Returns: void

Operators.SpaceMouseOperator.connect()
connect(): void

Connect to the space mouse. To be successful, this method should be called in the sceneReady callback. If you want to connect at a later time, the canvas where the mouse is to be used must have focus.

Note: If this is called but the 3d connexion software is not running, a connection error will be shown in the console.

Returns: void

Operators.SpaceMouseOperator.setMapping()

inherited

setMapping(button: Button, modifier: KeyModifiers?): void

Sets the button and key modifier mapping for the operator.

Parameters

button: Button

modifier: KeyModifiers = KeyModifiers.None

Returns: void