0.9.19 • Published 2 years ago

@leva-ui/plugin-bezier v0.9.19

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Leva Plot

Installation

npm i @leva-ui/plugin-plot

Quick start

import { useControls } from 'leva'
import { bezier } from '@leva-ui/plugin-bezier'

function MyComponent() {
  const { curve } = useControls({ curve: bezier() })
  // or
  const { curve } = useControls({ curve: bezier([0.54, 0.05, 0.6, 0.98]) })
  // or
  const { curve } = useControls({ curve: bezier('in-out-quadratic') })
  // or
  const { curve } = useControls({ curve: bezier({ handles: [0.54, 0.05, 0.6, 0.98], graph: false }) })

  // built-in function evaluation
  console.log(curve.evaluate(0.3))

  // inside a css like animation-timing-function
  return <div style={{ animationTimingFunction: value.cssEasing }} />
}
0.9.19

2 years ago

0.9.18

2 years ago

0.9.14

3 years ago

0.9.12

3 years ago

0.9.10

3 years ago

0.9.9

3 years ago

0.9.7

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago