Engine API Reference - v2.20.0-beta.0
    Preparing search index...

    Class ElementInput

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

    Index

    Constructors

    • Create a new ElementInput instance.

      Parameters

      • domElement: Element

        The DOM element.

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

        Optional arguments.

        • OptionaluseMouse?: boolean

          Whether to allow mouse input. Defaults to true.

        • OptionaluseTouch?: boolean

          Whether to allow touch input. Defaults to true.

        • OptionaluseXr?: boolean

          Whether to allow XR input sources. Defaults to true.

      Returns ElementInput

    Methods

    • Add a ElementComponent to the internal list of ElementComponents that are being checked for input.

      Parameters

      Returns void

    • Attach mouse and touch events to a DOM element.

      Parameters

      • domElement: Element

        The DOM element.

      Returns void

    • Remove mouse and touch events from the DOM element that it is attached to.

      Returns void

    • Remove a ElementComponent from the internal list of ElementComponents that are being checked for input.

      Parameters

      Returns void