Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EaseTo

Hierarchy

  • EaseTo

Implements

Index

Constructors

constructor

  • new EaseTo(actor: Actor, x: number, y: number, duration: number, easingFcn: function): EaseTo
  • Parameters

    • actor: Actor
    • x: number
    • y: number
    • duration: number
    • easingFcn: function
        • (currentTime: number, startValue: number, endValue: number, duration: number): number
        • Parameters

          • currentTime: number
          • startValue: number
          • endValue: number
          • duration: number

          Returns number

    Returns EaseTo

Properties

Private _currentLerpTime

_currentLerpTime: number = 0

Private _distance

_distance: number = 0

Private _initialized

_initialized: boolean = false

Private _lerpDuration

_lerpDuration: number = 1 * 1000

Private _lerpEnd

_lerpEnd: Vector = new ex.Vector(0, 0)

Private _lerpStart

_lerpStart: Vector = new ex.Vector(0, 0)

Private _stopped

_stopped: boolean = false

actor

actor: Actor

easingFcn

easingFcn: function

Type declaration

    • (currentTime: number, startValue: number, endValue: number, duration: number): number
    • Parameters

      • currentTime: number
      • startValue: number
      • endValue: number
      • duration: number

      Returns number

Methods

Private _initialize

  • _initialize(): void
  • Returns void

isComplete

  • isComplete(actor: Actor): boolean
  • Parameters

    Returns boolean

reset

  • reset(): void
  • Returns void

stop

  • stop(): void
  • Returns void

update

  • update(delta: number): void
  • Parameters

    • delta: number

    Returns void