Easingclass
Easing functions used for transitions. See https://easings.net/ for examples.
Methods22
Showing 22 methods
public static float BounceIn(float f)
Bouncy ease in.
| Parameter | Type | Description |
|---|---|---|
| f | float | Input in range of 0 to 1. |
floatOutput in range 0 to 1.public static float BounceInOut(float f)
Bouncy ease in and out.
| Parameter | Type | Description |
|---|---|---|
| f | float | Input in range of 0 to 1. |
floatOutput in range 0 to 1.public static float BounceOut(float f)
Bouncy ease out.
| Parameter | Type | Description |
|---|---|---|
| f | float | Input in range of 0 to 1. |
floatOutput in range 0 to 1.public static Sandbox.Utility.Easing.Function CubicBezier(float x1, float y1, float x2, float y2)
Cubic bezier easing with control points (x1,y1) and (x2,y2). The curve runs from (0,0) to (1,1). Matches the CSS `cubic-bezier(x1, y1, x2, y2)` timing function.
| Parameter | Type | Description |
|---|---|---|
| x1 | float | — |
| y1 | float | — |
| x2 | float | — |
| y2 | float | — |
public static float EaseIn(float f)
| Parameter | Type | Description |
|---|---|---|
| f | float | — |
float—public static float EaseInOut(float f)
| Parameter | Type | Description |
|---|---|---|
| f | float | — |
float—public static float EaseOut(float f)
| Parameter | Type | Description |
|---|---|---|
| f | float | — |
float—public static float ExpoIn(float f)
Exponential ease in.
| Parameter | Type | Description |
|---|---|---|
| f | float | Input in range of 0 to 1. |
floatOutput in range 0 to 1.public static float ExpoInOut(float f)
Exponential ease in and out.
| Parameter | Type | Description |
|---|---|---|
| f | float | Input in range of 0 to 1. |
floatOutput in range 0 to 1.public static float ExpoOut(float f)
Exponential ease out.
| Parameter | Type | Description |
|---|---|---|
| f | float | Input in range of 0 to 1. |
floatOutput in range 0 to 1.public static Sandbox.Utility.Easing.Function GetFunction(string name)
Get an easing function by name (ie, "ease-in", "cubic-bezier(0.1, 0.7, 1, 0.1)" or "steps(4, end)"). If the function doesn't exist we return QuadraticInOut
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
public static float Linear(float f)
Linear easing function, x=y.
| Parameter | Type | Description |
|---|---|---|
| f | float | Input in range of 0 to 1. |
floatOutput in range 0 to 1.public static float QuadraticIn(float f)
Quadratic ease in.
| Parameter | Type | Description |
|---|---|---|
| f | float | Input in range of 0 to 1. |
floatOutput in range 0 to 1.public static float QuadraticInOut(float f)
Quadratic ease in and out.
| Parameter | Type | Description |
|---|---|---|
| f | float | Input in range of 0 to 1. |
floatOutput in range 0 to 1.public static float QuadraticOut(float f)
Quadratic ease out.
| Parameter | Type | Description |
|---|---|---|
| f | float | Input in range of 0 to 1. |
floatOutput in range 0 to 1.public static float SineEaseIn(float f)
Sine ease in.
| Parameter | Type | Description |
|---|---|---|
| f | float | Input in range of 0 to 1. |
floatOutput in range 0 to 1.public static float SineEaseInOut(float f)
Sine ease in and out.
| Parameter | Type | Description |
|---|---|---|
| f | float | Input in range of 0 to 1. |
floatOutput in range 0 to 1.public static float SineEaseOut(float f)
Sine ease out.
| Parameter | Type | Description |
|---|---|---|
| f | float | Input in range of 0 to 1. |
floatOutput in range 0 to 1.public static float StepEnd(float f)
Stays at 0 until the animation ends, then jumps to 1.
| Parameter | Type | Description |
|---|---|---|
| f | float | Input in range of 0 to 1. |
floatOutput in range 0 to 1.public static Sandbox.Utility.Easing.Function Steps(int count, bool atStart = False)
Stepped easing with `count` equal-sized jumps. When `atStart` is true the jump happens at the start of each step, otherwise it happens at the end. Matches the CSS `steps(n, start|end)` timing function.
| Parameter | Type | Description |
|---|---|---|
| count | int | — |
| atStart = False | bool | — |
public static float StepStart(float f)
Jumps straight to 1 the moment the animation starts.
| Parameter | Type | Description |
|---|---|---|
| f | float | Input in range of 0 to 1. |
floatOutput in range 0 to 1.public static bool TryGetFunction(string name, Sandbox.Utility.Easing.Function function)
Get an easing function by name (ie, "ease-in", "cubic-bezier(0.1, 0.7, 1, 0.1)" or "steps(4, end)"). If the function exists we return true, otherwise return false.
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
| function | Function | — |
bool—No results match this filter.