microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.27k stars 674 forks source link

Proposal: Custom easing functions for Composition animations #6639

Open rozele opened 2 years ago

rozele commented 2 years ago

Proposal: Custom easing functions for Composition animations

Similar to the custom easing functions supported in WPF Storyboards, it would be great for Composition animations to also support custom easing functions.

Summary

Rationale

Scope

Capability Priority
This proposal will allow developers to create a custom easing function for animating values Must
This proposal will allow developers to define arbitrary termination conditions and not rely on fixed durations Must
This proposal will allow developers to synchronously access the current value, e.g., This.CurrentValue, of the property being animated Must
StephenLPeters commented 2 years ago

@rozele the CubicBezier easing function should cover almost all the bases no? https://docs.microsoft.com/en-us/windows/winui/api/microsoft.ui.composition.cubicbeziereasingfunction?view=winui-3.0

ghost commented 2 years ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.

rozele commented 2 years ago

If we want the animation behavior to match the React Native behavior precisely, then no. For example, CubicBezier would not allow us to implement a decay function or a custom spring behavior.

StephenLPeters commented 2 years ago

@aborziak-ms @jeffStall FYI