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

Function ensureLoop

src/content/Animations/GhostCursor/GhostCursor.jsx:405–410  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

403 };
404
405 const ensureLoop = () => {
406 if (!runningRef.current) {
407 runningRef.current = true;
408 rafRef.current = requestAnimationFrame(animate);
409 }
410 };
411
412 const onPointerMove = e => {
413 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