Add AacFlSettingCurve.WithAnimationCurve(...) to animate using traditional AnimationCurve objects:

- Add WithAnimationCurve to animate using traditional AnimationCurve objects
This commit is contained in:
Haï~
2022-03-20 05:19:04 +01:00
parent 573fc7eaef
commit 2ea5b42092
2 changed files with 9 additions and 0 deletions
+8
View File
@@ -290,6 +290,14 @@ namespace AnimatorAsCode.V0
AnimationUtility.SetEditorCurve(_clip, binding, new AnimationCurve(mutatedKeyframes.ToArray()));
}
}
public void WithAnimationCurve(AnimationCurve animationCurve)
{
foreach (var binding in _bindings)
{
AnimationUtility.SetEditorCurve(_clip, binding, animationCurve);
}
}
}
public class AacFlSettingCurveColor
+1
View File
@@ -747,6 +747,7 @@ foreach (var cancelWhenNotAllowed in new[] {auto, reverse, manual, custom, done}
- `void WithSecondsUnit(Action<AacFlSettingKeyframes> action)` /// Start defining the keyframes with a lambda expression, expressing the unit to be in seconds.
- `void WithFrameCountUnit(Action<AacFlSettingKeyframes> action)` /// Start defining the keyframes with a lambda expression, expressing the unit in frames.
- `void WithUnit(AacFlUnit unit, Action<AacFlSettingKeyframes> action)` /// Start defining the keyframes with a lambda expression, expressing the unit.
- `void WithAnimationCurve(AnimationCurve animationCurve)` /// Define the curve using a traditional AnimationCurve.
# Curve of type Color (AacFlSettingCurveColor)