pixels/examples/minimal-web
Jay Oster 6f4fa6c967
Fix invalid texture sizes (#250)
- Makes methods fallible when they create textures.
- Correctly handle window resize in fltk example.
- TODO: tests
- Closes #240
2022-12-17 20:21:28 -08:00
..
src Fix invalid texture sizes (#250) 2022-12-17 20:21:28 -08:00
Cargo.toml Update all dependencies in the workspace (#323) 2022-12-17 17:35:02 -08:00
README.md Replace just with cargo-run-wasm (#310) 2022-10-02 21:13:48 -07:00

Hello Pixels + Web

Hello Pixels + Web

Minimal example for WebGL2.

Install build dependencies

Install the WASM32 target:

rustup target add wasm32-unknown-unknown

Running on the Web

Build the project and start a local server to host it:

cargo run-wasm --release minimal-web

Open http://localhost:8000/ in your browser to run the example.

To build the project without serving it:

cargo run-wasm --release --build-only minimal-web

The build files are stored in ./target/wasm-examples/minimal-web/.

Running on native targets

cargo run --release --package minimal-web

About

This example is based on minimal-winit, demonstrating how to build your app for WebGL2 targets.