<abstract> new Controller( [options])
Creates a new Controller instance.
Parameters:
Name | Type | Argument | Description | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
Configuration options Properties
|
- Source:
Example
// Create a pan-zoom controller and associate it with the viewer's pointer manager const panzoom = new OpenLIME.ControllerPanZoom(viewer.camera, { priority: -1000, activeModifiers: [0, 1] }); viewer.pointerManager.onEvent(panzoom);
Methods
-
<abstract> fingerDoubleTap(e)
-
Called for quick double mouse press or double finger touch.
Parameters:
Name Type Description e
Event The double tap event
- Source:
-
<abstract> fingerSingleTap(e)
-
Called for quick mouse press or short finger touch.
Parameters:
Name Type Description e
Event The tap event
- Source:
-
modifierState(e)
-
Gets the modifier state from an event.
Parameters:
Name Type Description e
Event The event to check
- Source:
Returns:
Modifier state bitmask where:
- 0 = No modifiers
- 1 = Ctrl key
- 2 = Shift key
- 4 = Alt key Multiple modifiers combine their values (e.g., Ctrl+Shift = 3)
- Type
- number
-
<abstract> mouseWheel(e)
-
Called when user rotates mouse wheel.
Parameters:
Name Type Description e
WheelEvent The wheel event
- Source:
-
<abstract> panEnd(e)
-
Called when panning ends (mouse up or finger lift).
Parameters:
Name Type Description e
Event The pan end event
- Source:
-
<abstract> panMove(e)
-
Called continuously during panning.
Parameters:
Name Type Description e
Event The pan move event
- Source:
-
<abstract> panStart(e)
-
Called when user starts panning (mouse down or finger touch). Call e.preventDefault() to capture the event.
Parameters:
Name Type Description e
Event The pan start event
- Source:
-
<abstract> pinchEnd(e1, e2)
-
Called when pinch ends (finger lift).
Parameters:
Name Type Description e1
Event First finger event
e2
Event Second finger event
- Source:
-
<abstract> pinchMove(e1, e2)
-
Called continuously during pinching.
Parameters:
Name Type Description e1
Event First finger event
e2
Event Second finger event
- Source:
-
<abstract> pinchStart(e1, e2)
-
Called when user starts a two-finger pinch. Call e1.preventDefault() to capture the event.
Parameters:
Name Type Description e1
Event First finger event
e2
Event Second finger event
- Source: