Work towards correcting inconsistencies in the API:

- Rename *Percent to *Normalized.
- Update inline documentation.
- Add additional single-valued and array overloads.
- Add AacFlSettingCurveObjectReference.WithUnit to be on-par with AacFlSettingCurve.
This commit is contained in:
Haï~
2024-07-05 02:30:01 +02:00
parent 52c64d97f9
commit c47e49d516
2 changed files with 116 additions and 10 deletions
@@ -612,9 +612,23 @@ namespace AnimatorAsCode.V1
return this;
}
// FIXME API: Percent is misnomer
/// Set the exit time at a specific normalized amount.
public AacFlTransition AfterAnimationIsAtLeastAtNormalized(float exitTimeNormalized)
{
return AfterAnimationIsAtLeastAtPercent(exitTimeNormalized);
}
/// Set a non-fixed transition duration in a normalized amount.
public AacFlTransition WithTransitionDurationNormalized(float transitionDurationNormalized)
{
return WithTransitionDurationPercent(transitionDurationNormalized);
}
/// Set the exit time at a specific normalized amount.<br/>
/// <br/>
/// Note: Percent is a misnomer. You are expected to provide a value expressed as a normalized value (where 1 represents the clip duration).<br/>
/// This function behaves identically to `AfterAnimationIsAtLeastAtNormalized(float)`
public AacFlTransition AfterAnimationIsAtLeastAtPercent(float exitTimeNormalized)
{
_transition.hasExitTime = true;
@@ -623,8 +637,10 @@ namespace AnimatorAsCode.V1
return this;
}
// FIXME API: Percent is misnomer
/// Set a non-fixed transition duration in a normalized amount.
/// Set a non-fixed transition duration in a normalized amount.<br/>
/// <br/>
/// Note: Percent is a misnomer. You are expected to provide a value expressed as a normalized value (where 1 represents the clip duration).<br/>
/// This function behaves identically to `WithTransitionDurationNormalized(float)`
public AacFlTransition WithTransitionDurationPercent(float transitionDurationNormalized)
{
_transition.hasFixedDuration = false;