securityos/node_modules/framer-motion/dist/es/value/use-time.mjs

11 lines
268 B
JavaScript

import { useAnimationFrame } from '../utils/use-animation-frame.mjs';
import { useMotionValue } from './use-motion-value.mjs';
function useTime() {
const time = useMotionValue(0);
useAnimationFrame((t) => time.set(t));
return time;
}
export { useTime };