Show / Hide Table of Contents

class EaseFuncFactory

Helpers for creating configurable easing functions.

Syntax
public static class EaseFuncFactory

Methods

View Source

CreatePunch(Int32, Single, Single, Boolean)

Create an easing function that oscillates and fade out.

Declaration
public static EaseFunc CreatePunch(int oscillationCount, float amplitudeDecay, float frequencyDecay, bool alwaysStartPositive = true)
Parameters
Type Name Description
System.Int32 oscillationCount

The number of times the value will oscillate (half the period).

A negative value will move the value away from the target on its first oscillation.

System.Single amplitudeDecay

Rate at which the amplitude of the wave decreases.

  • Higher values cause a more vigorous initial shake.
  • A value of zero will cause amplitude to stay constant.
  • Values below zero cause the amplitude to increase over time, tending towards infinity.
System.Single frequencyDecay

Rate at which the frequency of the wave decreases.

Higher values cause a more vigorous initial shake. Values below zero cause the shake to increase in speed over time.

System.Boolean alwaysStartPositive

If the curve would start with a negative gradient, invert it.

Returns
Type Description
EaseFunc

The easing function.

  • View Source
On this page
Back to top Generated by DocFX