MCPcopy Create free account
hub / github.com/ptmt/react-native-macos / elastic

Method elastic

Libraries/Animated/src/Easing.js:171–174  ·  view source on GitHub ↗

* A simple elastic interaction, similar to a spring oscillating back and * forth. * * Default bounciness is 1, which overshoots a little bit once. 0 bounciness * doesn't overshoot at all, and bounciness of N > 1 will overshoot about N * times. * * http://easings.net/#easeInElast

(bounciness: number = 1)

Source from the content-addressed store, hash-verified

169 * - http://tiny.cc/elastic_b_3 (bounciness = 3)
170 */
171 static elastic(bounciness: number = 1): (t: number) => number {
172 const p = bounciness * Math.PI;
173 return (t) => 1 - Math.pow(Math.cos(t * Math.PI / 2), 3) * Math.cos(t * p);
174 }
175
176 /**
177 * Use with `Animated.parallel()` to create a simple effect where the object

Callers 2

AnimatedExample.jsFile · 0.80
Easing-test.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected