Options
All
  • Public
  • Public/Protected
  • All
Menu

A class to manage a user ping on the canvas.

param origin

The canvas co-ordinates of the origin of the ping.

param [options]

Additional options to configure the ping animation.

Hierarchy

Index

Constructors

  • new Ping(origin: any, options?: {}): Ping
  • Parameters

    • origin: any
    • options: {} = {}

      Returns Ping

    Properties

    x: any
    y: any
    options: any
    _color: number | utils.Color

    Methods

    • destroy(options?: {}): void
    • inheritdoc

      Parameters

      • options: {} = {}

        Returns void

      • animate(): Promise<boolean>
      • Start the ping animation.

        Returns Promise<boolean>

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

      • On each tick, advance the animation.

        Parameters

        • dt: number

          The number of ms that elapsed since the previous frame.

        • animation: CanvasAnimationOptions

          The animation state.

        Returns void