dc740 / minifb-async-examples

Some test projects I used to test minifb in webassembly.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

minifb multiplatform (webassembly too!) example

This project can be compiled to webassembly and desktop.

There is only one thing to keep in mind:

  • desktop app expects the pixels to be in ARGB
  • web app expects the pixels to be in ABGR

Check the game_step() function to see an example of conditional compilation.

How to run in a browser

  • make sure you have wasm-pack installed: cargo install wasm-pack
  • Run ./build_web.sh on linux to compile and start a demo server.

(the demo server is written in Python 3, so make is installed)

How to run in a desktop

  • cargo run --release

About

Some test projects I used to test minifb in webassembly.

License:GNU General Public License v3.0


Languages

Language:Rust 70.5%Language:Python 14.4%Language:Shell 9.6%Language:HTML 5.4%