pixels/examples/minimal-web
Jay Oster a2c639823f
Update winit 0.27 (#302)
* Update winit 0.27

Closes #292

This _does not_ update `winit` in the `imgui-winit` example. See https://github.com/parasyte/pixels/pull/302#issuecomment-1264483040 for discussion.
2022-10-01 14:27:21 -07:00
..
src Allow accessing frame on immutable buffer (#288) 2022-08-14 15:44:23 -07:00
Cargo.toml Update winit 0.27 (#302) 2022-10-01 14:27:21 -07:00
index.html Initial WebGL2 support. (#218) 2021-11-16 11:37:56 -08:00
README.md Initial WebGL2 support. (#218) 2021-11-16 11:37:56 -08:00

Hello Pixels + Web

Hello Pixels + Web

Minimal example for WebGL2.

Install build dependencies

Install the WASM32 target and a few CLI tools:

rustup target add wasm32-unknown-unknown
cargo install --locked wasm-bindgen-cli just miniserve

Running on the Web

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

just serve minimal-web

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

To build the project without serving it:

just build minimal-web

The build files are stored in ./target/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.