Skip to Content

Animation Toolkit

Animate any content display in page

Animation Toolkit

The Animation Toolkit is a Java library that offers animation primitives and animators for any content (images, forms, text...).

The AcceleratorAnimator is able to compute an accelerated movement interpolation.

The movement type can be:

  • Acceleration
  • Deceleration
  • Acceleration + Deceleration

 

PullBack Animator

The PullBackAnimator computes an animation in 3 phases:

  • Phase 1 : fast translation towards (x2,y2) + (x2,y2)*exceedingRatio
  • Phase 2 : scroll back towards (x2,y2) - (x2,y2)*exceedingRatio*0.2
  • Phase 3 : final translation to (x2, y2)

This produces a simple rubber band effect

 

WallRebound Animator

The WallRebound animator computes an animation for start to destination and adds rebounds.

As an input the user shall specify a mass which is a factor from 1 to 10. The number of rebounds and amplitude of rebounds increase hen mass decreases.

 

Oscillator Animator

The OscilatorAnimator computes an socillation around a start point. If not start point is defined, the oscillation is done around 0,0. The inputs for the animation computing are:

  • OscillationRatio : a float betwwen 0 and 1 that indicates the distance ratio that is lost at each oscillation
  • state1 : the intial state. Oscillation will be cimputed around this initial state.
  • oscillationState : the oscillation range on x and y and/or scale x, scale y and/or angle.

 

KitchenDrawer Animator

The kitchen drawer animator computes an animation in 2 phases:

  • phase 1 is a fast acceleration towards 95% of the total distance during 50% of the total time
  • phase 2 is a decceleration towards the remaining 5% distance during 50% of the total time

 

Animation combinations

The AnimationChain class offers the ability to sequence animators. When a call to createTransformKeys or createDeltaTransformKeys is made, the keys for all animators of the chain are appended.

You have the possibility to add animations simply by creating several AnimateTransform instance that target different Transform nodes.

 

Available in Workbench Developer