Skip to content

BinHan-Code/TestCursor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Bouncing Balls Animation

A colorful HTML5 Canvas animation featuring bouncing balls in a rectangle.

Features

  • 14 Bouncing Balls: 2 red, 2 blue, 6 green, and 4 random colored balls
  • Realistic Physics: Each ball has position, velocity, and collision detection
  • Interactive Controls: Start, Pause, and Reset buttons
  • Smooth Animation: 60 FPS using requestAnimationFrame
  • Random Properties: Each ball has random size, position, and velocity

How to Use

  1. Open bouncing_balls.html in any modern web browser
  2. Click "Start" to begin the animation
  3. Use "Pause" to stop the animation
  4. Use "Reset" to create new balls with random positions and velocities

Technical Details

  • HTML5 Canvas: For smooth 2D graphics rendering
  • JavaScript Classes: Ball class for physics and BouncingBallsAnimation class for management
  • Collision Detection: Balls bounce off rectangle boundaries
  • Color Palette: Fixed colors (red, blue, green) plus random vibrant colors

Files

  • bouncing_balls.html - Main animation file with HTML, CSS, and JavaScript
  • README.md - This documentation file

Browser Compatibility

Works in all modern browsers that support HTML5 Canvas and ES6 classes. "# TestCursor"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published