Fade Module
Linear fade interpolation shared by both backend services — the single definition of how a volume moves from a start value to a target over a duration, so raylib and MonoGame fades behave identically.
Functions and values
| Function or value |
Description
|
Full Usage:
volume startVolume targetVolume elapsed duration
Parameters:
float32
-
Volume when the fade started.
targetVolume : float32
-
Volume when the fade completes.
elapsed : float32
-
Seconds since the fade started.
duration : float32
-
Total fade duration in seconds.
Returns: float32
The interpolated volume: the start value before the fade begins, the target value at and past the end.
Modifiers: inline |
Interpolates the volume at elapsed seconds into a fade from startVolume to targetVolume lasting duration seconds.
|
Mibo