easing-coordinates
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "easing-coordinates", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": | ||
@@ -5,0 +5,0 @@ "Utility script that takes an easing function as input and outputs a coordinate set with adjustable precision/resolution.", |
@@ -13,10 +13,8 @@ # Easing Coordinates | ||
<br> | ||
Utility to turn steps and cubic-bezier | ||
[single-transition-timing-functions](https://developer.mozilla.org/en-US/docs/Web/CSS/single-transition-timing-function) | ||
into an array of "low-poly" xy-coordinates. | ||
## Usage | ||
The easingCoordinates function takes steps and cubic-bezier | ||
[single-transition-timing-functions](https://developer.mozilla.org/en-US/docs/Web/CSS/single-transition-timing-function) | ||
as input and returns an array of "low-poly" xy-coordinates. | ||
```js | ||
@@ -66,7 +64,11 @@ import { easingCoordinates } from 'easing-coordinates' | ||
```js | ||
import { cubicCoordinates, easingCoordinates, stepsCoordinates } from './index' | ||
import { | ||
cubicCoordinates, | ||
easingCoordinates, | ||
stepsCoordinates, | ||
} from 'easing-coordinates' | ||
easingCoordinates('cubic-bezier(0.42, 0, 0.58, 1)') == | ||
easingCoordinates('cubic-bezier(0.42, 0, 0.58, 1)') === | ||
cubicCoordinates(0.42, 0, 0.58, 1) | ||
easingCoordinates('steps(4, skip-end)') == stepsCoordinates(4, 'skip-end') | ||
easingCoordinates('steps(4, skip-end)') === stepsCoordinates(4, 'skip-end') | ||
``` | ||
@@ -82,2 +84,3 @@ | ||
} | ||
function easingCoordinates( | ||
@@ -88,3 +91,5 @@ easingFunction: string, | ||
): ICoordinate[] | ||
function stepsCoordinates(steps: number, skip = 'skip-end'): ICoordinate[] | ||
function cubicCoordinates( | ||
@@ -128,5 +133,5 @@ x1: number, | ||
[mit]: https://github.com/larsenwork/easing-coordinates/blob/master/LICENSE | ||
[twt-img]: https://img.shields.io/twitter/follow/larsenwork.svg?label=follow+larsenwork | ||
[twt-img]: https://img.shields.io/twitter/follow/larsenwork.svg?label=follow+larsenwork&longCache=true&style=flat-square | ||
[twt]: https://twitter.com/larsenwork | ||
[prt-img]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?longCache=true&style=flat-square | ||
[prt]: https://github.com/prettier/prettier |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
31865
133
0