Options
All
  • Public
  • Public/Protected
  • All
Menu

A type of ping that points to a specific location.

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 ChevronPing(origin: any, options?: {}): ChevronPing

Properties

_r: number
_rInner: number
_t14: number
_t12: number
_t34: number
_chevron: Sprite
_h2: number
_y: number
_outer: any
_inner: any
x: any
y: any
options: any
_color: number | utils.Color
_CHEVRON_PATH: string = "icons/pings/chevron.webp"

The path to the chevron texture.

Methods

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

    Returns Promise<boolean>

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

  • _animateFrame(dt: any, animation: any): void
  • On each tick, advance the animation.

    Parameters

    • dt: any

      The number of ms that elapsed since the previous frame.

    • animation: any

      The animation state.

    Returns void

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

    • options: {} = {}

      Returns void

    • _drawRings(a: number): void
    • Draw the outer and inner rings.

      Parameters

      • a: number

        The alpha.

      Returns void

    • _loadChevron(): Promise<Sprite>
    • Load the chevron texture.

      Returns Promise<Sprite>

    • _createRings(): any[]
    • Draw the two rings that are used as part of the ping animation.

      Returns any[]