Engine API Reference - v2.23.0-beta.17
    Preparing search index...

    Class MultiTouchSourceAlpha

    Multi-touch input source class. Attached to an element, it accumulates touch deltas for the movement of the touch points, count deltas for changes in the number of touches, and pinch deltas for the change in distance between two touches, which is what an orbiting camera needs on a touch screen.

    Hierarchy (View Summary)

    Index
    _element: HTMLElement | null = null
    deltas: { count: InputDelta; pinch: InputDelta; touch: InputDelta } = ...

    Type Declaration

    • count: InputDelta

      The count deltas, represented as an array of integers.

    • pinch: InputDelta

      The pinch deltas, represented as an array of integers.

    • touch: InputDelta

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

    • 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

      Returns the current frame state and resets the deltas to zero.

      Returns { count: number[]; pinch: number[]; touch: number[] }

      • The flushed input frame with current deltas.
      • count: number[]

        The count deltas, represented as an array of integers.

      • pinch: number[]

        The pinch deltas, represented as an array of integers.

      • touch: number[]

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