MoonTools.Easing/README.md

33 lines
964 B
Markdown
Raw Normal View History

2020-02-20 23:29:57 +00:00
# MoonTools.Easing
2019-10-31 03:33:50 +00:00
2020-02-20 23:29:57 +00:00
[![NuGet Badge](https://buildstats.info/nuget/MoonTools.Easing)](https://www.nuget.org/packages/MoonTools.Easing/)
2020-02-20 23:36:19 +00:00
[![Build Status](https://drone.moonside.games/api/badges/MoonsideGames/MoonTools.Easing/status.svg)](https://drone.moonside.games/MoonsideGames/MoonTools.Easing)
2019-10-31 03:45:07 +00:00
2020-02-20 23:29:57 +00:00
Easing functions for .NET Standard
2019-10-31 03:33:50 +00:00
## Reference
https://easings.net
## Example
Use easing functions to transform time values and get fancy animations along paths.
```cs
2020-02-20 23:36:19 +00:00
using MoonTools;
2019-10-31 03:33:50 +00:00
// Transform a normalized time value.
Easing.InQuad(0.75f); // => 0.5625f
// Transform a time value within a time range.
Easing.InOutSine(3.5, 2, 6); // => 3.2346331352698
// Move within an arbitrary number range based on time.
2019-10-31 03:48:23 +00:00
// (time, start, delta, duration)
2019-10-31 03:33:50 +00:00
Easing.OutQuart(2, 10, 100, 4); // => 103.75
```
## Additional Info
2020-07-18 10:57:11 +00:00
Use this library with [MoonTools.Curve](https://gitea.moonside.games/MoonsideGames/MoonTools.Curve) for some nicely animated Bezier curves!