private void interpolate(Type type, float ratio, KeyFrame lastKeyFrame, KeyFrame nextKeyFrame, int currentIndex) {
        //TODO here we should interpolate differently according to the interpolation given in the gltf file.
        switch (type) {
            case Translation:
                translations[currentIndex] = FastMath.interpolateLinear(ratio, lastKeyFrame.translation, nextKeyFrame.translation);
                break;
            case Rotation:
                Quaternion rot = new Quaternion().set(lastKeyFrame.rotation);
                rot.nlerp(nextKeyFrame.rotation, ratio);
                rotations[currentIndex] = rot;
                break;
            case Scale:
                scales[currentIndex] = FastMath.interpolateLinear(ratio, lastKeyFrame.scale, nextKeyFrame.scale);
                break;
        }
    }
Verify that the
{@link #times}, {@link #translations}, {@link #rotations}, and
{@link #scales} vectors all have the same length, if present.

@throws AssetLoadException if the lengths differ
jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf/TrackData.java