Package-level declarations

Types

Link copied to clipboard
interface AnimatableModel
An AnimatableModel is an object whose properties can be animated by an ModelAnimation.
Link copied to clipboard
open class ModelAnimation
An ModelAnimation is a reusable set of keyframe tracks which represent an animation.
Link copied to clipboard
open class ModelAnimator
This class provides support for animating an AnimatableModel

Usage

By default the ModelAnimator can play the full ModelAnimation starting from 0 to the animation duration with:
ofAnimation
If you want to specify a start and end, you should use:
ofAnimationTime
ofAnimationFrame
ofAnimationFraction

Use cases

Simple usage

On a very basic 3D model like a single infinite rotating sphere, you should not have to use ModelAnimator but probably instead just call:
animate

Single Model with Single Animation

If you want to animate a single model to a specific timeline position, use:
ofAnimationTime
ofAnimationFrame
ofAnimationFraction
  • A single time, frame, fraction value will go from the actual position to the desired one
  • Two values means form value1 to value2
  • More than two values means form value1 to value2 then to value3
Example:
ModelAnimator.ofAnimationFraction(model, "VerticalTranslation", 0f, 0.8f, 0f).start();

Single Model with Multiple Animations

If the model is a character, for example, there may be one ModelAnimation for a walkcycle, a second for a jump, a third for sidestepping and so on.
Link copied to clipboard
Link copied to clipboard
object Transition
Link copied to clipboard