3.1.4 • Published 2 years ago

@malkiii/d3-ease v3.1.4

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
2 years ago

d3-ease

This is a Typescript version from the original d3-ease.

npm (scoped) Workflow License

Easing is a method of distorting time to control apparent motion in animation. It is most commonly used for slow-in, slow-out. By easing time, animated transitions are smoother and exhibit more plausible motion.

The easing types in this module implement the ease method, which takes a normalized time t and returns the corresponding “eased” time . Both the normalized time and the eased time are typically in the range 0,1, where 0 represents the start of the animation and 1 represents the end; some easing types, such as elastic, may return eased times slightly outside this range. A good easing type should return 0 if t = 0 and 1 if t = 1. See the easing explorer for a visual demonstration.

These easing types are largely based on work by Robert Penner.

Installing

using npm:

npm i @malkiii/d3-ease

using yarn:

yarn add @malkiii/d3-ease

Usage

import { easeCubic, easeQuad, easeExpInOut } from '@malkiii/d3-ease';

const e1 = easeCubic(1.25);
const e2 = easeCubic(0.83);
const e3 = easeQuad(0.5);
const e4 = easeQuad(1.47);
const e5 = easeExpInOut(5.11);

API Reference

See API reference or Try d3-ease in your browser

3.1.3

2 years ago

3.1.2

2 years ago

3.1.4

2 years ago

3.1.1

2 years ago

3.1.0

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago