- Replaces the `cancelAnimationFrame` pattern with a boolean ticking flag to reduce function allocation and RAF overhead on high-frequency mousemove events. - Uses closure variables for coordinates to ensure the latest position is used in the animation frame. - Improves performance of the custom cursor on high-refresh-rate input devices.
418 B
418 B
2024-05-22 - Missing Scripts and Environment
Learning: The project lacks lint script in package.json. Running pnpm lint might invoke system tools (like Android Lint?) instead of failing or doing nothing useful. Always check package.json scripts first.
Action: Use specific commands like pnpm exec tsc --noEmit or npx vitest as discovered/documented, rather than assuming standard scripts exist.