Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface AnimationDefinition

Pattern for the definition of an animation

Define the animation of the transformation or the color over time

{
   start: {
     translation:  the position at the start of the animation, 
     rotation:     the angle of rotation at the start of the animation, 
     scaling:      the size at the start of the animation, 
     color:        the color at the start of the animation,
   },
   end: {
     same as above but for the end of the animation
   },
   duration: the duration of one animation-cylce in seconds,
   playmode: the mode to play the animation in, see ANIMATION_PLAYMODE
}

Example

let animation: ƒS.AnimationDefinition = {
   start: {translation: ƒS.positions.bottomleft, rotation: -20, scaling: new ƒS.Position(0.5, 1.5), color: ƒS.Color.CSS("white", 0)},
   end: {translation: ƒS.positions.bottomright, rotation: 20, scaling: new ƒS.Position(1.5, 0.5), color: ƒS.Color.CSS("red")},
   duration: 1,
   playmode: ƒS.ANIMATION_PLAYMODE.REVERSELOOP
};

Hierarchy

  • AnimationDefinition

Index

Properties

Properties

duration

duration: number

end

end: { color?: Color; rotation?: number; scaling?: Vector2; translation?: Vector2 }

Type declaration

  • Optional color?: Color
  • Optional rotation?: number
  • Optional scaling?: Vector2
  • Optional translation?: Vector2

playmode

playmode: ANIMATION_PLAYMODE

start

start: { color?: Color; rotation?: number; scaling?: Vector2; translation?: Vector2 }

Type declaration

  • Optional color?: Color
  • Optional rotation?: number
  • Optional scaling?: Vector2
  • Optional translation?: Vector2

Generated using TypeDoc