Skip to content

Yerish26/BouncingBalls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Bouncing Balls

This project is a simple animation of bouncing balls on an HTML canvas. The balls respond to gravity, collisions with the canvas edges, and collisions with each other. Clicking on the canvas adds new balls, and right-clicking removes balls. The project also includes basic audio feedback for collisions and can be paused and resumed with buttons.

Features

  • Balls respond to gravity and bounce off the edges of the canvas.
  • Balls detect and respond to collisions with each other.
  • Click to add new balls with random properties (size, color, velocity).
  • Right-click to remove balls at the click location.
  • Pause and resume the animation using buttons.
  • Background color changes dynamically over time.

Getting Started

Prerequisites

  • A modern web browser with JavaScript enabled
  • Typescipt compiler

Installation

  1. Clone the repository:
    git clone [email protected]:Yerish26/BouncingBalls.git
    cd bouncing-balls

Usage

  1. Open the project in Visual Studio Code (VS Code).
  2. Compile the TypeScript using the tsc command in Git Bash.
  3. Open index.html with Live Server.
  4. Left-click on the canvas to add a new ball.
  5. Right-click on a ball to remove it.
  6. Click the "Pause" button to pause the animation.
  7. Click the "Resume" button to resume the animation.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published