Skip to content

Commit 6b86aa0

Browse files
author
Andreas Larsen
committed
Short description of custom easing
It's very simple and figured many users would want it.
1 parent 1da1627 commit 6b86aa0

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,20 @@ skrollr ships with some built in functions:
534534
* outCubic
535535
* bounce: Bounces like a ball. See https://www.desmos.com/calculator/tbr20s8vd2 for a graphical representation.
536536

537+
**Custom easing**
538+
539+
* Use [this](http://www.timotheegroleau.com/Flash/experiments/easing_function_generator.htm) generator
540+
* Insert the given polynomial coeficients instead of t, t2, t3, t4 and t5
541+
```
542+
t5*(p*p*p*p*p) + t4*(p*p*p*p) + t3*(p*p*p) + t2*(p*p) + t*p
543+
```
544+
Example shown with the values for easeOutElasticBig
545+
```
546+
easeOutElasticBig: function(p) {
547+
return 56*(p*p*p*p*p) - 175*(p*p*p*p) + 200*(p*p*p) - 100*(p*p) + 20*p;
548+
}
549+
```
550+
537551
skrollr.get()
538552
-----
539553

0 commit comments

Comments
 (0)