Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uggla/rotozoom
https://github.com/uggla/rotozoom
Last synced: 25 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/uggla/rotozoom
- Owner: uggla
- License: apache-2.0
- Created: 2022-03-07T23:12:09.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-11T08:03:02.000Z (over 1 year ago)
- Last Synced: 2024-10-14T09:11:05.603Z (2 months ago)
- Language: Rust
- Size: 841 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rotozoom
[![rotozoom](https://github.com/uggla/rotozoom/actions/workflows/rotozoom.yml/badge.svg)](https://github.com/uggla/rotozoom/actions/workflows/rotozoom.yml)
A naive rotozoom with macroquad
* Compute a 2D Texture to create a rotozoom the old school way.
* No usage of camera, texture rotation or shader.*Note: build with ``--release`` switch to achieve descent fps.*
## Authors
- [@Uggla](https://www.github.com/Uggla)
## Screenshots
Native application:
![App native screenshot](images/rotozoom_native.png)Running the wasm application into Firefox:
![App wasm32 screenshot](images/rotozoom_wasm.png)## Binaries
Binaries are available here:
[Binary releases](https://github.com/uggla/rotozoom/releases)## Run Locally (mainly for development purposes)
1. Clone the project
```bash
git clone https://github.com/uggla/rotozoom
```2. Go to the project directory
```bash
cd rotozoom
```#### Native
1. Install Rust following the instructions [here](https://www.rust-lang.org/fr/learn/get-started).*Tips: the rustup method is the simplest one.*
2. Install required library for macroquad
* Ubuntu system dependencies
```bash
apt install pkg-config libx11-dev libxi-dev libgl1-mesa-dev libasound2-dev
```* Fedora system dependencies
```bash
dnf install libX11-devel libXi-devel mesa-libGL-devel alsa-lib-devel
```* Windows system
```
No dependencies are required for Windows or MacOS
```3. Run the native client
```bash
cargo run --release
```#### Wasm32
1. Follow the above instruction of the native client.
2. Install basic-http-server
```bash
cargo install basic-http-server
```3. Add the wasm32 compilation target
```bash
rustup target add wasm32-unknown-unknown
```4. Go to the client directory and run the native client
```bash
cargo build --target wasm32-unknown-unknown --release
```5. Serve the files and open the browser
```bash
basic-http-server
xdg-open http://127.0.0.1:4000
```