UNPKG

framer-motion

Version:

An open source and production-ready motion library for React on the web

8 lines (6 loc) • 247 B
import { mix } from "popmotion" import { Axis } from "../../../types/geometry" export function tweenAxis(target: Axis, prev: Axis, next: Axis, p: number) { target.min = mix(prev.min, next.min, p) target.max = mix(prev.max, next.max, p) }