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

    Class DualGestureSourceAlpha

    Dual gesture input source.

    Hierarchy (View Summary)

    Index

    Constructors

    • Alpha

      Parameters

      • Optionallayout: "joystick-joystick" | "joystick-touch" | "touch-joystick" | "touch-touch"

        The layout of the dual gesture source.

      Returns DualGestureSource

    Properties

    _element: HTMLElement | null = null
    deltas: { doubleTap: InputDelta; leftInput: InputDelta; rightInput: InputDelta } = ...

    Type Declaration

    Accessors

    • get layout(): | "joystick-joystick"
      | "joystick-touch"
      | "touch-joystick"
      | "touch-touch"
      Alpha

      Gets the layout of the dual gesture input source.

      Returns "joystick-joystick" | "joystick-touch" | "touch-joystick" | "touch-touch"

    • set layout(
          value:
              | "joystick-joystick"
              | "joystick-touch"
              | "touch-joystick"
              | "touch-touch",
      ): void
      Alpha

      Sets the layout of the dual gesture input source. The value is a hyphen-separated pair describing the left and right inputs respectively, where each side can be either joystick (a virtual joystick) or touch (a touch). Defaults to joystick-touch.

      Parameters

      • value: "joystick-joystick" | "joystick-touch" | "touch-joystick" | "touch-touch"

      Returns void

    • get leftJoystick(): VirtualJoystick
      Alpha

      Returns VirtualJoystick

    • get rightJoystick(): VirtualJoystick
      Alpha

      Returns VirtualJoystick

    Methods

    • Alpha

      Returns void

    • Alpha

      Returns void

    • Alpha

      Fires an event with the given name and arguments.

      Parameters

      • event: string

        The event name to fire.

      • ...args: any[]

        The arguments to pass to the event listeners.

      Returns void

    • Alpha

      Removes an event listener for the specified event.

      Parameters

      • event: string

        The event name to stop listening for.

      • callback: HandleEventCallback

        The callback function to remove.

      Returns void

    • Alpha

      Adds an event listener for the specified event.

      Parameters

      • event: string

        The event name to listen for.

      • callback: HandleEventCallback

        The callback function to execute when the event is triggered.

      Returns void

    • Alpha

      Returns { doubleTap: number[]; leftInput: number[]; rightInput: number[] }

      • doubleTap: number[]

        The double tap delta.

      • leftInput: number[]

        The left input deltas.

      • rightInput: number[]

        The right input deltas.