API Reference · Math utilities
Ease
public static class EaseShaping a 0..1 parameter, so a move starts and stops instead of switching on and off.
A camera that reaches its mark at the same speed it left is a camera on rails. What the eye reads as deliberate is a move that leans into its start and settles at its end, and that is entirely a matter of what number gets handed to the interpolation — not of the interpolation itself. So there is nothing here that interpolates: float.Lerp and Vector3.Lerp already exist and this reshapes what they are given.
var t = Ease.InOut(elapsed / duration);
camera.LookFrom(Vector3.Lerp(from, to, t), target);Four functions, and the model closes at four. Ease.Ramp turns a measurement into a 0..1 parameter; Ease.In, Ease.Out and Ease.InOut decide which end of that parameter is soft. The usual libraries carry thirty of these — quad, cubic, quart, expo, elastic, back, bounce, each in three flavours — and the honest reading of that list is that it is a menu of polynomials rather than a set of ideas. The idea is which end has zero slope, and there are only three answers.
Methods
| Member | Description |
|---|---|
| Soft start, hard stop: away from rest and still accelerating when it arrives. A thing falling, a shot leaving, a cut that wants to feel like an interruption. |
| Soft at both ends — smoothstep, the same curve GLSL and HLSL have as a built-in. This is the default and it is what most moves want. Zero slope at 0 and at 1 means two of these laid end to end join without a kink, which is what lets a sequence of shots run together as one move rather than as a list of them. |
| Hard start, soft stop: already moving when it begins and settling as it lands. This is the one for a shot that cuts in on a move already under way, and for anything decaying. |
| Where The inverse of Composed with |