Skip to content

SaweliKudasow/CursorTracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ‘€ Cursor Tracker

A small interactive web project where two eyes follow your mouse cursor and blink naturally β€” just like real ones.
Built using HTML, CSS, and JavaScript, this project demonstrates simple yet smooth animation and user interactivity in the browser.


🌟 Features

  • 🧿 Eyes smoothly follow your mouse pointer
  • 😴 Auto sleep mode when inactive (eyes close after a few seconds)
  • πŸ˜‰ Random blinking for a more natural look
  • πŸ’» Responsive design β€” works on any screen size
  • ⚑ Lightweight and pure JavaScript (no libraries)

🧩 How It Works

  • JavaScript calculates the direction from each eye’s center to the mouse position.
  • Pupils move toward that direction smoothly using a simple interpolation formula.
  • CSS animations handle blinking by scaling the eyelid element vertically.
  • If no user activity (mouse, keyboard, or touch) is detected for 3.5 seconds, the eyes "fall asleep."

🧠 Technologies Used

Language / Tool Purpose
HTML Structure of the eyes and page layout
CSS Styling, shadows, and blinking animation
JavaScript Eye movement logic and interactivity

πŸš€ How to Run


πŸ§‘β€πŸ’» Author

Saweli Kudasow


πŸ“œ License

This project is free to use for educational purposes.