Beispiel #1
0
 /// <summary>
 /// Dynamically accelerates until the middle point and then decelerates.
 /// </summary>
 /// <param name="t">Time in the value between 0 and duration (inclusive)</param>
 /// <param name="from">Starting value from the ease</param>
 /// <param name="to">Target value to ease</param>
 /// <param name="duration">Duration of the ease</param>
 /// <returns>Eased value</returns>
 public static double PerlinInOut(double t, double from, double to, double duration)
 {
     return(from + (to - from) * Easings.PerlinInOut(t / duration));
 }
Beispiel #2
0
 /// <summary>
 /// Starts slower and then accelerates and past the middle point it starts to decelerate,
 /// creates a slightly bigger curve than <see cref="SineInOut"/>.
 /// </summary>
 /// <param name="t">Time in the value between 0 and duration (inclusive)</param>
 /// <param name="from">Starting value from the ease</param>
 /// <param name="to">Target value to ease</param>
 /// <param name="duration">Duration of the ease</param>
 /// <returns>Eased value</returns>
 public static double QuadraticInOut(double t, double from, double to, double duration)
 {
     return(from + (to - from) * Easings.QuadraticInOut(t / duration));
 }
Beispiel #3
0
 /// <summary>
 /// Starts with a set of 4 bounces where the midpoint of the fourth one is in the midpoint of the ease
 /// and then continues as if starting from a middle of a bounce then does 3 more bounces that get progressively weaker.
 /// </summary>
 /// <param name="t">Time in the value between 0 and duration (inclusive)</param>
 /// <param name="from">Starting value from the ease</param>
 /// <param name="to">Target value to ease</param>
 /// <param name="duration">Duration of the ease</param>
 /// <returns>Eased value</returns>
 public static double BounceInOut(double t, double from, double to, double duration)
 {
     return(from + (to - from) * Easings.BounceInOut(t / duration));
 }
Beispiel #4
0
 /// <summary>
 /// Starts slower and then accelerates and past the middle point it starts to decelerate, creates a very soft curve.
 /// </summary>
 /// <param name="t">Time in the value between 0 and duration (inclusive)</param>
 /// <param name="from">Starting value from the ease</param>
 /// <param name="to">Target value to ease</param>
 /// <param name="duration">Duration of the ease</param>
 /// <returns>Eased value</returns>
 public static double SineOut(double t, double from, double to, double duration)
 {
     return(from + (to - from) * Easings.SineOut(t / duration));
 }
Beispiel #5
0
 /// <summary>
 /// Starts swinging back and forth and then very quickly runs to the endpoint.
 /// </summary>
 /// <param name="t">Time in the value between 0 and duration (inclusive)</param>
 /// <param name="from">Starting value from the ease</param>
 /// <param name="to">Target value to ease</param>
 /// <param name="duration">Duration of the ease</param>
 /// <returns>Eased value</returns>
 public static double ElasticIn(double t, double from, double to, double duration)
 {
     return(from + (to - from) * Easings.ElasticIn(t / duration));
 }
Beispiel #6
0
 /// <summary>
 /// Starts slower and then starts accelerating fast and past the middle point it starts to decelerate fast, creating a very sharp curve.
 /// creates a bigger curve than <see cref="QuinticInOut"/>.
 /// </summary>
 /// <param name="t">Time in the value between 0 and duration (inclusive)</param>
 /// <param name="from">Starting value from the ease</param>
 /// <param name="to">Target value to ease</param>
 /// <param name="duration">Duration of the ease</param>
 /// <returns>Eased value</returns>
 public static double CircularInOut(double t, double from, double to, double duration)
 {
     return(from + (to - from) * Easings.CircularInOut(t / duration));
 }
Beispiel #7
0
 /// <summary>
 /// Starts slower and then accelerates and past the middle point it starts to decelerate,
 /// creates a bigger curve than <see cref="QuinticInOut"/>.
 /// </summary>
 /// <param name="t">Time in the value between 0 and duration (inclusive)</param>
 /// <param name="from">Starting value from the ease</param>
 /// <param name="to">Target value to ease</param>
 /// <param name="duration">Duration of the ease</param>
 /// <returns>Eased value</returns>
 public static double ExponentialInOut(double t, double from, double to, double duration)
 {
     return(from + (to - from) * Easings.ExponentialInOut(t / duration));
 }