sej
    Preparing search index...

    Class ViewportCameraControls

    Viewport camera controls.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    _enabled: boolean
    _limitOrographicCameraTo2D: boolean

    Whether the orthographic camera should be limited to 2D or not.

    If true, the camera will be limited to 2D and only display a view from above - like Google Maps.

    _previousPolarAngle: null | number = null

    Previous polar angle of the camera.

    cameraControls: CameraControls

    Reference to the camera-controls instance.

    domElement: HTMLCanvasElement

    Reference to the canvas element where the controls are attached. I.e. where pointer events are listened.

    object: Object3D<Object3DEventMap>

    Object that is begin controlled. Usually the camera.

    Accessors

    • set enabled(value: boolean): void

      Whether the controls are enabled or not.

      Parameters

      • value: boolean

      Returns void

      true
      

    Methods

    • This allows all components to add their own debug options to the debugger.

      For example, the controls. One controls may provide a set of debug options while another may provide a slightly different set.

      Parameters

      • gui: GUI

      Returns void

    • 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, ViewportCameraControls>

        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, ViewportCameraControls>

        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, ViewportCameraControls>

        The listener function that gets removed.

      Returns void

    • Set the boundary box that encloses the target of the camera. box3 is in THREE.Box3

      Parameters

      • Optionalbox3: Box3

        THREE.Box3

      Returns void