split-cubical-bezier

0.0.1 • Public • Published

SplitCubicalBezier

This project referenced by StackOverflow:Extrapolate split cubic-bezier to 1,1.

Example

import { presets, createCubicBezier, getSplitCubicBezier } from "split-cubical-bezier";

const linear1 = presets.linear;                    // Same as linear2
const linear2 = createCubicBezier(x1, y1, x2, y2); // { xs: [ 0, 0, 1, 1 ], ys: [ 0, 0, 1, 1 ] }
const results = getSplitCubicBezier(linear2, 0.5); // { left: [ 0, 0, 0.5, 0.5 ], right: [ 0.5, 0.5, 1, 1 ] }

Readme

Keywords

none

Package Sidebar

Install

npm i split-cubical-bezier

Weekly Downloads

2

Version

0.0.1

License

CC-BY-SA-4.0

Unpacked Size

27.4 kB

Total Files

11

Last publish

Collaborators

  • black7375