public void setKeyframesScale(Vector3f[] scales) {
        if (times == null) {
            throw new IllegalStateException(
                    "TransformTrack lacks keyframe times.  "
                    + "Please invoke setTimes() first.");
        }
        if (scales == null || scales.length == 0) {
            throw new IllegalArgumentException(
                    "No scale vectors were provided.");
        }
        this.scales = new CompactVector3Array();
        this.scales.add(scales);
        this.scales.freeze();

        assert times != null && times.length == scales.length;
    }
Sets the scales.

@param scales the desired scale of the target for each keyframe (not
    null, same length as "times")
jme3-core/src/main/java/com/jme3/anim/TransformTrack.java