Home | History | Annotate | Download | only in animation

Lines Matching defs:keyframes

31  * values between those keyframes for a given animation. The class internal to the animation
32 * package because it is an implementation detail of how Keyframes are stored and used.
34 class KeyframeSet implements Keyframes {
41 List<Keyframe> mKeyframes; // only used when there are not 2 keyframes
45 public KeyframeSet(Keyframe... keyframes) {
46 mNumKeyframes = keyframes.length;
48 mKeyframes = Arrays.asList(keyframes);
49 mFirstKeyframe = keyframes[0];
50 mLastKeyframe = keyframes[mNumKeyframes - 1];
55 * If subclass has variables that it calculates based on the Keyframes, it should reset them
68 IntKeyframe keyframes[] = new IntKeyframe[Math.max(numKeyframes,2)];
70 keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f);
71 keyframes[1] = (IntKeyframe) Keyframe.ofInt(1f, values[0]);
73 keyframes[0] = (IntKeyframe) Keyframe.ofInt(0f, values[0]);
75 keyframes[i] =
79 return new IntKeyframeSet(keyframes);
85 FloatKeyframe keyframes[] = new FloatKeyframe[Math.max(numKeyframes,2)];
87 keyframes[0] = (FloatKeyframe) Keyframe.ofFloat(0f);
88 keyframes[1] = (FloatKeyframe) Keyframe.ofFloat(1f, values[0]);
93 keyframes[0] = (FloatKeyframe) Keyframe.ofFloat(0f, values[0]);
95 keyframes[i] =
105 return new FloatKeyframeSet(keyframes);
108 public static KeyframeSet ofKeyframe(Keyframe... keyframes) {
109 // if all keyframes of same primitive type, create the appropriate KeyframeSet
110 int numKeyframes = keyframes.length;
115 if (keyframes[i] instanceof FloatKeyframe) {
117 } else if (keyframes[i] instanceof IntKeyframe) {
126 floatKeyframes[i] = (FloatKeyframe) keyframes[i];
132 intKeyframes[i] = (IntKeyframe) keyframes[i];
136 return new KeyframeSet(keyframes);
142 ObjectKeyframe keyframes[] = new ObjectKeyframe[Math.max(numKeyframes,2)];
144 keyframes[0] = (ObjectKeyframe) Keyframe.ofObject(0f);
145 keyframes[1] = (ObjectKeyframe) Keyframe.ofObject(1f, values[0]);
147 keyframes[0] = (ObjectKeyframe) Keyframe.ofObject(0f, values[0]);
149 keyframes[i] = (ObjectKeyframe) Keyframe.ofObject((float) i / (numKeyframes - 1), values[i]);
152 return new KeyframeSet(keyframes);
182 List<Keyframe> keyframes = mKeyframes;
186 newKeyframes[i] = keyframes.get(i).clone();
199 * just using the two keyframes at the appropriate end when the value is outside those bounds.
206 // Special-case optimization for the common case of only two keyframes