bga-animations
    Preparing search index...

    Class AnimationManager

    The animation class, giving access to many type of animations, and the possibility to run multiple animation with a delta or sync/async. Instanciate only one for all your game animations.

    Index

    Constructors

    Properties

    Methods

    • Apply the DisplayElementAnimationSettings to the displayElement.

      Parameters

      Returns void

    • Add a floating element over another element.

      Parameters

      Returns Promise<any>

    • Indicates if animations should be run, based on constructor animationSettings.

      Returns boolean

    • Add a floating text speach bubble over another element.

      Parameters

      Returns Promise<void>

    • Add a floating message over another element.

      Parameters

      Returns Promise<void>

    • Add a floating number over another element. It will be prefixed by '+' if positive, and '-' if negative.

      Parameters

      Returns Promise<void>

    • Fade an object in. The object must be attached to the destination before.

      Parameters

      Returns Promise<any>

    • Fade out an object and destroy it. It call be called with a toElement, in that case a slide animation will be triggered.

      Parameters

      Returns Promise<any>

    • Play multiple animations with a fixed interval between each animation.

      Parameters

      • animations: ((index: number) => Promise<any>)[]

        functions generating an animation, returning a Promise.

      • interval: number = ...

      Returns Promise<void>

      promise when all animations ends

    • Play multiple animations a the same time.

      Parameters

      • animations: ((index: number) => Promise<any>)[]

        functions generating an animation, returning a Promise.

      Returns Promise<any>

      promise when all animations ends

    • Play multiple animations one after the other.

      Parameters

      • animations: (() => Promise<any>)[]

        functions generating an animation, returning a Promise.

      Returns Promise<any>

      promise when all animations ends

    • Slide an object to an element.

      Parameters

      • element: HTMLElement
      • toElement: HTMLElement
      • OptionalanimationSettings: SlideAnimationSettings
      • OptionalinsertBefore: HTMLElement

      Returns Promise<any>

    • Add a floating element over another element.

      Parameters

      Returns Promise<any>

    • Slide an object in. The object must be attached to the destination before.

      Parameters

      Returns Promise<any>

    • Slide an object in. The object must be attached to the destination before.

      Parameters

      Returns Promise<any>

    • slide out an object and destroy it. It call be called with a toElement, in that case a slide animation will be triggered.

      Parameters

      Returns Promise<any>

    • Slide an object over an intermediate element then attach to an element.

      Parameters

      Returns Promise<any>

    • Slide an object to the screen center then an element.

      Parameters

      Returns Promise<any>

    • Swap two elements.

      Parameters

      Returns Promise<any>