https://github.com/mirzaianov/test-balls-canvas
Test Project
https://github.com/mirzaianov/test-balls-canvas
test-project
Last synced: about 1 year ago
JSON representation
Test Project
- Host: GitHub
- URL: https://github.com/mirzaianov/test-balls-canvas
- Owner: mirzaianov
- Created: 2024-04-25T13:46:24.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-17T14:00:32.000Z (about 1 year ago)
- Last Synced: 2025-03-17T14:44:14.031Z (about 1 year ago)
- Topics: test-project
- Language: TypeScript
- Homepage: https://test-balls-canvas.vercel.app
- Size: 101 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# The Billiards Project

## Description
### A test project that renders a set of balls on a canvas
### Features
- No third-part libraries for physics are used.
- A rectangular canvas field is initially filled with a random set of balls of a different size and color.
- The user can push a ball if he/she holds the left button of a mouse and touches the ball.
- The pushed ball elastically collides with the other balls on the canvas and with the borders of the canvas losing its velocity.
- The user can change a color of the ball with a context menu if he/she right-clicks a mouse on this ball.
### Dependencies
1. `React` • `TypeScript` • `Tailwind`
2. `Canvas`
### Installation & Execution
### Install via Vite
```bash
git clone https://github.com/mirzaianov/test-balls-canvas.git
cd test-balls-canvas
npm i
```
### Run in the development mode
```bash
npm run dev
```
Vite will start frontend server on [http://localhost:5173/](http://localhost:5173/)
### Or open the deployed site
[https://todo-mirzaianov.vercel.app/](https://todo-mirzaianov.vercel.app/)
## License
### MIT license
You can use the code, but I ask you do not copy this site without giving me credit.