Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CameraOrbitControl

Allows the user to control the camera by orbiting the target.

Hierarchy

  • CameraOrbitControl

Index

Constructors

constructor

Properties

Protected _allowControl

_allowControl: boolean = true

Protected _angles

_angles: ObservablePoint<undefined> = ...

Protected _autoUpdate

_autoUpdate: boolean = true

Protected _camera

_camera: Camera = Camera.main

Protected _dampingAngles

_dampingAngles: { x: number; y: number } = ...

Type declaration

  • x: number
  • y: number

Protected _dampingDistance

_dampingDistance: number = 5

Protected _dampingFactor

_dampingFactor: number = 0.1

Protected _distance

_distance: number = 5

Protected _element

_element: HTMLElement

Protected _enableDamping

_enableDamping: boolean = false

Protected _grabbed

_grabbed: boolean = false

Protected _previousClientX

_previousClientX: number = 0

Protected _previousClientY

_previousClientY: number = 0

Protected _previousPinchDistance

_previousPinchDistance: number = 0

Protected _target

_target: { x: number; y: number; z: number } = ...

Type declaration

  • x: number
  • y: number
  • z: number

Accessors

allowControl

  • get allowControl(): boolean
  • set allowControl(value: boolean): void

angles

  • get angles(): ObservablePoint<undefined>
  • Orientation euler angles (x-axis and y-axis). The angle for the x-axis will be clamped between -85 and 85 degrees.

    Returns ObservablePoint<undefined>

autoUpdate

  • get autoUpdate(): boolean
  • set autoUpdate(value: boolean): void

camera

dampingFactor

  • get dampingFactor(): number
  • set dampingFactor(value: number): void

distance

  • get distance(): number
  • set distance(value: number): void

enableDamping

  • get enableDamping(): boolean
  • set enableDamping(value: boolean): void
  • Value indicating if damping (inertia) is enabled, which can be used to give a sense of weight to the controls. Default is false.

    Returns boolean

  • Value indicating if damping (inertia) is enabled, which can be used to give a sense of weight to the controls. Default is false.

    Parameters

    • value: boolean

    Returns void

target

  • get target(): { x: number; y: number; z: number }
  • set target(value: { x: number; y: number; z: number }): void

Methods

Protected bind

  • bind(): void

destroy

  • destroy(): void

Protected onMouseDown

  • onMouseDown(e: MouseEvent): void

Protected onMouseDownInteraction

  • onMouseDownInteraction(e: InteractionEvent): void

Protected onMouseMove

  • onMouseMove(e: MouseEvent): void

Protected onMouseUp

  • onMouseUp(_e: MouseEvent): void

Protected onPinch

  • onPinch(e: TouchEvent): void

Protected onPointerDown

  • onPointerDown(clientX: number, clientY: number): void

Protected onPointerMove

  • onPointerMove(clientX: number, clientY: number): void

Protected onPointerUp

  • onPointerUp(): void

Protected onPreRender

  • onPreRender(): void

Protected onTouchEnd

  • onTouchEnd(e: TouchEvent): void

Protected onTouchMove

  • onTouchMove(e: TouchEvent): void

Protected onTouchStart

  • onTouchStart(e: TouchEvent): void

Protected onWheel

  • onWheel(e: WheelEvent): void

Protected unbind

  • unbind(): void

updateCamera

  • updateCamera(): void

Generated using TypeDoc