Class SimpleViewportControls

Abstract class for all viewport controls implementations.

Hierarchy

Implements

Constructors

Properties

_enabled: boolean
center: Vector3
dispose: (() => void)

Type declaration

    • (): void
    • Returns void

domElement: HTMLCanvasElement
object: Object3D<Object3DEventMap>

Usually the camera.

panSpeed: number
rotationSpeed: number
zoomSpeed: number

Accessors

Methods

  • Adds a listener to an event type.

    Type Parameters

    • T extends never

    Parameters

    • type: T

      The type of event to listen to.

    • listener: EventListener<{}[T], T, SimpleViewportControls>

      The function that gets called when the event is fired.

    Returns void

  • Fire an event type.

    Type Parameters

    • T extends never

    Parameters

    • event: BaseEvent<T> & {}[T]

      The event that gets fired.

    Returns void

  • Checks if listener is added to an event type.

    Type Parameters

    • T extends never

    Parameters

    • type: T

      The type of event to listen to.

    • listener: EventListener<{}[T], T, SimpleViewportControls>

      The function that gets called when the event is fired.

    Returns boolean

  • Removes a listener from an event type.

    Type Parameters

    • T extends never

    Parameters

    • type: T

      The type of the listener that gets removed.

    • listener: EventListener<{}[T], T, SimpleViewportControls>

      The listener function that gets removed.

    Returns void

Generated using TypeDoc