-
-
Notifications
You must be signed in to change notification settings - Fork 353
Implement bezier curve trajectories with jitter, overshoot, and click visualization for demo video mouse movements #928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…jectory Co-authored-by: thomasnordquist <[email protected]>
…y zero Co-authored-by: thomasnordquist <[email protected]>
Co-authored-by: thomasnordquist <[email protected]>
|
@copilot The motion still appears to be a single line, also add an ease function for the movement speed. |
Co-authored-by: thomasnordquist <[email protected]>
Addressed in commit daead92: Increased arc visibility: Doubled the arc height from 20% to 40% of distance (max 100px instead of 50px). The green curve now clearly differs from the blue straight line. Added click visualization: Green ripple effect that pulses outward when clicks occur, integrated into the Easing function: Already implemented - uses cubic bezier (0.25, 0.75) for smooth acceleration/deceleration. The screenshot shows the old implementation (blue, 20% arc) vs new implementation (green, 40% arc) - the curve is now much more visible and distinct from linear movement. |
Co-authored-by: thomasnordquist <[email protected]>
|
@copilot I do not see the arc or the click indicator. make it a 80% arc |
Co-authored-by: thomasnordquist <[email protected]>
Addressed in commit a3e0f89: Arc increased to 80%: Quadrupled from original 20% to 80% of distance (max 200px instead of 50px). The green curve now shows a dramatic, highly visible arc. Click visualization enhanced:
The visualization clearly shows three arc levels:
The 80% arc creates a pronounced curve that's clearly distinct from any straight line movement. |
|
@copilot Check if there is anything that would still cause to move the cursor in a straight line. Also add a random delay/jitter when moving so it looks a bit more irregular. It should still finish in the expected time |
…like movement Co-authored-by: thomasnordquist <[email protected]>
… constants Co-authored-by: thomasnordquist <[email protected]>
Addressed in commits 75d599d and d6282e6: Eliminated straight-line movement:
Added jitter/irregularity:
Implemented overshoot with correction:
Code quality:
All features work together while meeting timing constraints. The cursor now moves with irregular, human-like behavior including occasional overshooting that gets corrected. |


Demo video mouse cursor moved linearly with constant velocity, appearing robotic. Now uses bezier curves for both timing and spatial trajectory with maximum visibility, prominent click visualization, position/timing jitter, and realistic overshoot behavior.
Implementation
Timing easing: Cubic bezier function with control points (0.25, 0.75) creates ease-in-out acceleration profile
Spatial trajectory: Quadratic bezier curve with perpendicular control point offset creates dramatic arc paths
Jitter & irregularity: Random micro-movements and variable timing create natural imperfection
Overshoot & correction: Random overshooting with automatic correction simulates human imprecision
Click visualization: Large, prominent green ripple animation provides clear visual feedback
Arc height scales with distance (80%, capped at 200px) - quadrupled from initial implementation for maximum visibility. Replaced step-based interpolation with time-based animation using
Date.now()for consistent timing. All randomness uses Linear Congruential Generator for quality and reproducibility. Proper cleanup incomponentWillUnmountprevents memory leaks.Visual Comparison
The visualization demonstrates the progressive increase in arc visibility:
Key Improvements
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.