The ControlsManager provides helper functions to create Controls instances and link them up with a Raycaster instance (reused across multiple Controls instances).

Hierarchy

  • Object3D
    • ControlsManager

Constructors

  • Parameters

    • camera: Camera

      the THREE.Camera instance used in the scene

    • domElement: HTMLElement

      the dom element on which THREE.js renderer is attached, generally available as renderer.domElement

    Returns ControlsManager

Methods

  • Creates a Controls instance and attaches it to the provided THREE.js object

    Parameters

    • object: Object3D<Event>

      the object provided by the user

    • Optional options: IControlsOptions

    Returns default

  • Detaches the Controls instance from the provided THREE.js object

    Parameters

    • object: Object3D<Event>

      the object provided by the user

    • controls: default

      the controls instance anchored on the object

    Returns void

  • Adds an event listener. Note that there is another method addEventListener on THREE.Object3D from which this class extends but that is specific to the internals of THREE.js, but not this library

    Parameters

    • event: EVENTS
    • callback: ((object: null | Object3D<Event>, handleName: string) => void)

      by default the second argument is the default group name for the Handle involved; for a custom handle, it is the name property set on the handle

        • (object: null | Object3D<Event>, handleName: string): void
        • Parameters

          • object: null | Object3D<Event>
          • handleName: string

          Returns void

    Returns void

  • Removes the event listener.

    Parameters

    • event: EVENTS
    • callback: ((object: null | Object3D<Event>, handleName: string) => void)
        • (object: null | Object3D<Event>, handleName: string): void
        • Parameters

          • object: null | Object3D<Event>
          • handleName: string

          Returns void

    Returns void

Generated using TypeDoc