A class to manage a user ping on the canvas.

Hierarchy (View Summary)

Constructors

Properties

Methods

Constructors

  • Parameters

    • origin: Point

      The canvas coordinates of the origin of the ping.

    • Optionaloptions: PingOptions = {}

      Additional options to configure the ping animation.

    Returns Ping

Properties

_color: Color

The color of the ping.

Methods

  • Start the ping animation.

    Returns Promise<boolean>

    Returns true if the animation ran to completion, false otherwise.

  • Parameters

    • options: {} = {}

    Returns void

  • Protected

    On each tick, advance the animation.

    Parameters

    • dt: number

      The number of ms that elapsed since the previous frame.

    • animation: CanvasAnimationData

      The animation state.

    Returns void