use-elapsed-time
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "use-elapsed-time", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "React hook to get the elapsed time in an animation using requestAnimationFrame", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -29,2 +29,3 @@ # useElapsedTime React hook | ||
``` | ||
[Basic usage demo](https://codesandbox.io/s/epic-dream-hn62k) | ||
@@ -63,2 +64,3 @@ ## Function signature | ||
``` | ||
[Countdown timer demo](https://codesandbox.io/s/priceless-hill-2tbiq) | ||
@@ -86,4 +88,5 @@ ### Count Up | ||
``` | ||
[Count up demo](https://codesandbox.io/s/hungry-cray-hl6wn) | ||
### None-liner path animation | ||
### Non-liner path animation | ||
``` | ||
@@ -105,4 +108,4 @@ import { useElapsedTime } from 'use-elapsed-time'; | ||
const elapsedTime = useElapsedTime(isPlaying, config); | ||
const currentPoint = easing(elapsedTime, 0, pointsLength, durationMilliseconds) | 0; | ||
const colorValue = easing(elapsedTime, 0, 255, durationMilliseconds) | 0; | ||
const currentPoint = easing(elapsedTime, 0, pointsLength, durationMilliseconds); | ||
const colorValue = easing(elapsedTime, 0, 255, durationMilliseconds); | ||
@@ -126,2 +129,4 @@ const pointStyle = { | ||
}; | ||
``` | ||
``` | ||
[Demo non-linear animation](https://codesandbox.io/s/inspiring-austin-d6ol6) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
265839
128