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() })
const { curve } = useControls({ curve: bezier([0.54, 0.05, 0.6, 0.98]) })
const { curve } = useControls({ curve: bezier('in-out-quadratic') })
const { curve } = useControls({ curve: bezier({ handles: [0.54, 0.05, 0.6, 0.98], graph: false }) })
console.log(curve.evaluate(0.3))
return <div style={{ animationTimingFunction: value.cssEasing }} />
}