This project is a Breakout game implemented using JavaScript and WebAssembly. It supports both mouse and touch events for paddle movement.
- Rust
- wasm-pack
- JavaScript
- HTML
To build the WebAssembly module, run the following command:
wasm-pack build --target web --out-dir web
Run a Python 3 local webserver
python3 -m http.server 3000
- Open the
index.html
file in your web browser to run the game. - Use the mouse or touch input to move the paddle and play the game.
src/
: Contains the Rust source code for the WebAssembly module.web/
: Contains the compiled WebAssembly module and other web assets (HTML, JavaScript, CSS).
The project includes functions to handle both mouse and touch events for paddle movement:
This project is licensed under the MIT License.