MCPcopy Create free account
hub / github.com/DavidHDev/react-bits / ensureLoop

Function ensureLoop

src/ts-tailwind/Animations/GhostCursor/GhostCursor.tsx:430–435  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

428 };
429
430 const ensureLoop = () => {
431 if (!runningRef.current) {
432 runningRef.current = true;
433 rafRef.current = requestAnimationFrame(animate);
434 }
435 };
436
437 const onPointerMove = (e: PointerEvent) => {
438 const rect = parent.getBoundingClientRect();

Callers 4

onPointerMoveFunction · 0.70
onPointerEnterFunction · 0.70
onPointerLeaveFunction · 0.70
GhostCursorFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected