Handles mouse and touch events for ElementComponents. When input events occur on an ElementComponent this fires the appropriate events on the ElementComponent.

Constructors

  • Create a new ElementInput instance.

    Parameters

    • domElement: Element

      The DOM element.

    • Optionaloptions: {
          useMouse: boolean;
          useTouch: boolean;
          useXr: boolean;
      }

      Optional arguments.

      • useMouse: boolean

        Whether to allow mouse input. Defaults to true.

      • useTouch: boolean

        Whether to allow touch input. Defaults to true.

      • useXr: boolean

        Whether to allow XR input sources. Defaults to true.

    Returns ElementInput

Methods