Interface BgaAnimationWithOriginSettings

Hierarchy

Properties

animationClass?: string

The class to add to the animated element.

animationEnd?: ((animation) => any)

Type declaration

animationStart?: ((animation) => any)

Type declaration

    • (animation): any
    • A function called when animation starts (for example to add a zoom effect on a card during a reveal animation).

      Parameters

      Returns any

duration?: number

The animation duration, in ms (default: 500).

element: HTMLElement

The element to animate.

finalTransform?: string

The transform property to set after the animation.

fromDelta?: {
    x: number;
    y: number;
}

A delta coordinates (object with x and y properties).

Type declaration

  • x: number
  • y: number
fromElement?: HTMLElement

The element to move the card from.

fromRect?: DOMRect

An initial Rect position. Can be the moved object BoundingClientRect itself, before being attached.

game?: Game

The game class. Used to know if the game is in instantaneous mode (replay) becausewe don't want animations in this case.

rotationDelta?: number

If the card is rotated at the start of animation.

scale?: number

The cumulated scale of the element to animate (default: 1).

transitionTimingFunction?: string

The animation CSS timing function, 'linear', 'ease-in-out' (default: linear).

zIndex?: number

The zIndex to apply during animation (default: 10).

Generated using TypeDoc