An open API service indexing awesome lists of open source software.

https://github.com/ullaskunder3/linear-interpolation

linear interpolation implementation using vanilla javascript
https://github.com/ullaskunder3/linear-interpolation

Last synced: 12 months ago
JSON representation

linear interpolation implementation using vanilla javascript

Awesome Lists containing this project

README

          

# linear-interpolation

linear interpolation implementation using vanilla javascript

- Mouse mouse with friction

![ezgif-3-1aceec5ac4](https://user-images.githubusercontent.com/66258652/147836439-09f282ec-489c-474a-9e96-82e8c9e6363c.gif)

Linear interpolation is the simplest type of interpolation: parameter values are calculated in proportion to the difference between key times

lerp allows you to interpolate between min and max. Or in other words, traverse between min and max values, where choosing 0 for fraction puts you at min, choosing 1 puts you at max and for any other value between 0 and 1, puts you anywhere between min and max. You can also see min and max as key poses, like in traditional animation, and lerp outputs as inbetweens ;-).

good example in freeCodeCamp [link](https://www.freecodecamp.org/news/understanding-linear-interpolation-in-ui-animations-74701eb9957c/)