Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Navigation

This navigation is merely a design template/recipe for more refined, specialized navigation and provides some basic, commonly used camera modifier such as turntable, first-person, as well as trackball. This implementation is also unfinished and will be continued as soon as possible (e.g., first-person navigation is not usable for now).

todo
  • Refine and comment this class to be usable at least as common/most-basic navigation auxiliary.

Hierarchy

  • Navigation

Index

Constructors

constructor

Properties

Protected _activeEvents

_activeEvents: Map<number, PointerEvent>

This keeps track of all events that are currently interacting with the canvas. It maps from pointer id to the currecnt position.

Protected _alwaysRotateOnMove

_alwaysRotateOnMove: boolean = false

Specifies, whether or not rotation mode should be invoked on any move event, regardless of buttons.

Protected _camera

_camera: Camera
see

camera

Protected _eventHandler

_eventHandler: EventHandler

Even handler used to forward/map events to specific camera modifiers.

Protected _firstPerson

_firstPerson: FirstPersonModifier | undefined

First person camera modifier.

Protected _invalidate

_invalidate: Invalidate

The navigation's invalidation callback. This should usually be setup by the owning renderer and invoke the same callback the renderer has been given by the canvas. This invalidation is required, when continuous rendering is not present, events might cause need for new rendering requests.

Protected _lastInteractionTime

_lastInteractionTime: number

Keep track of the latest interaction in order to allow a cooldown before the next interaction is allowed.

Protected _mode

_mode: Modes | undefined

Identifies the active camera modifier.

Protected _pan

_pan: PanModifier | undefined

Pan camera modifier.

Protected _pinch

_pinch: PinchZoomModifier | undefined

Pinch camera modifier.

Protected _rotationMetaphor

_rotationMetaphor: RotationMetaphor

Currently active metaphor.

Protected _trackball

_trackball: TrackballModifier | undefined

Trackball camera modifier.

Protected _turntable

_turntable: TurntableModifier | undefined

Turntable camera modifier.

Protected _wheelZoom

_wheelZoom: WheelZoomModifier | undefined

Wheel zoom modifier.

Accessors

camera

  • set camera(camera: Camera): void

rotationMetaphor

Methods

Protected getPrimaryEvent

  • getPrimaryEvent(events: Array<PointerEvent>): PointerEvent | undefined

Protected mode

  • mode(): Modes | undefined
  • Resolves the event to camera modifier mapping by returning the responsible camera modifier.

    Returns Modes | undefined

Protected onPointerCancel

  • onPointerCancel(latests: Array<PointerEvent>, previous: Array<PointerEvent>): void
  • Parameters

    • latests: Array<PointerEvent>
    • previous: Array<PointerEvent>

    Returns void

Protected onPointerDown

  • onPointerDown(latests: Array<PointerEvent>, previous: Array<PointerEvent>): void
  • Parameters

    • latests: Array<PointerEvent>
    • previous: Array<PointerEvent>

    Returns void

Protected onPointerEnter

  • onPointerEnter(latests: Array<PointerEvent>, previous: Array<PointerEvent>): void
  • Parameters

    • latests: Array<PointerEvent>
    • previous: Array<PointerEvent>

    Returns void

Protected onPointerLeave

  • onPointerLeave(latests: Array<PointerEvent>, previous: Array<PointerEvent>): void
  • Parameters

    • latests: Array<PointerEvent>
    • previous: Array<PointerEvent>

    Returns void

Protected onPointerMove

  • onPointerMove(latests: Array<PointerEvent>, previous: Array<PointerEvent>): void
  • Parameters

    • latests: Array<PointerEvent>
    • previous: Array<PointerEvent>

    Returns void

Protected onPointerUp

  • onPointerUp(latests: Array<PointerEvent>, previous: Array<PointerEvent>): void
  • Parameters

    • latests: Array<PointerEvent>
    • previous: Array<PointerEvent>

    Returns void

Protected onWheel

  • onWheel(latests: Array<WheelEvent>, previous: Array<WheelEvent>): void

Protected pan

  • pan(start: boolean): void

Protected pinch

  • pinch(start: boolean): void

Protected resolveMultiTouch

  • resolveMultiTouch(): Modes | undefined

Protected rotate

  • rotate(start: boolean): void

update

  • update(): void
  • Update should invoke navigation specific event processing. When using, e.g., an event handler, the event handlers update method should be called in order to have navigation specific event processing invoked.

    Returns void