public Animation buildAnimation() {
        interpolateTime();
        interpolate(keyFramesTranslation, Type.Translation);
        interpolate(keyFramesRotation, Type.Rotation);
        interpolate(keyFramesScale, Type.Scale);

        SpatialTrack spatialTrack = new SpatialTrack(times, translations, rotations, scales);

        //creating the animation
        Animation spatialAnimation = new Animation(name, duration);
        spatialAnimation.setTracks(new SpatialTrack[]{spatialTrack});

        return spatialAnimation;
    }
Creates an Animation based on the keyFrames previously added to the factory.
@return the generated animation
jme3-core/src/main/java/com/jme3/animation/AnimationFactory.java