0.0.1 • Published 2 years ago

split-cubical-bezier v0.0.1

Weekly downloads
-
License
CC-BY-SA-4.0
Repository
github
Last release
2 years ago

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 ] }
0.0.1

2 years ago