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

    Class SingleGestureSourceAlpha

    Single gesture input source.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

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

    Type Declaration

    • doubleTap: InputDelta

      The double tap delta.

    • input: InputDelta

      The input deltas, represented as an array of [x, y] coordinates.

    Accessors

    • get joystick(): VirtualJoystick
      Alpha

      Returns VirtualJoystick

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

      Gets the layout of the single touch input source.

      Returns "joystick" | "touch"

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

      Sets the layout of the single touch input source. Can be one of the following:

      • joystick: A virtual joystick.
      • touch: A touch.

      Defaults to joystick.

      Parameters

      • value: "joystick" | "touch"

      Returns void

    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[]; input: number[] }

      • doubleTap: number[]

        The double tap delta.

      • input: number[]

        The input deltas, represented as an array of [x, y] coordinates.