This package has been deprecated

Author message:

cubic-bezier-easing is no longer maintained. Please use @thednp/bezier-easing

cubic-bezier-easing
TypeScript icon, indicating that this package has built-in type declarations

1.0.18 • Public • Published

CubicBezier

A JavaScript ES6/ES7 cubic-bezier class to create easing functions as used in KUTE.js. The module is based on UnitBezier by Apple, a piece of code found on Codepen.

Install

npm install cubic-bezier-easing

Usage

import CubicBezier from 'cubic-bezier-easing'

let easeCubicInOut = new CubicBezier(0.645, 0.045, 0.355, 1)

let moveItRight = KUTE.to(someTarget,{translateX:150}, {easing: easingCubicInOut})

Note: if you're using KUTE.js, you don't have to install this module, the above is just an example on what it does and how to use it.

By default, new easing functions get a name with the parameters. EG: cubic-bezier(0.645,0.045,0.335,1)

However, you can set your own unique name like so:

let easeCubicInOut = new CubicBezier(0.645, 0.045, 0.355, 1, 'myCubicOut')

You can use CubicBezier in combination with other libraries like D3, Three.js, Tween.js and GSAP of course.

License

MIT License

Package Sidebar

Install

npm i cubic-bezier-easing

Weekly Downloads

52

Version

1.0.18

License

MIT

Unpacked Size

23.9 kB

Total Files

16

Last publish

Collaborators

  • thednp