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

11 lines
268 B
JavaScript
Raw Permalink Normal View History

2024-09-06 15:32:35 +00:00
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 };