Skip to content

Commit

Permalink
Allow examples to be built for WebGPU and add instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
rparrett committed Jul 20, 2023
1 parent 55c15bf commit a8cf3ad
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ features = [
"bevy_text",
"bevy_sprite",
"filesystem_watcher",
"webgl2"
]

[target.'cfg(unix)'.dev-dependencies.bevy]
Expand Down
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,21 @@ This can be made simple with [wasm-server-runner](https://github.com/jakobheller

After that's installed and configured, run:

#### WebGL2

```bash
cargo run --target wasm32-unknown-unknown --example animation --release --features atlas
cargo run --target wasm32-unknown-unknown --example animation --release --features atlas,bevy/webgl2
```

**Note**: You **must** use the `atlas` feature when targeting the web. See [#283](https://github.com/StarArawn/bevy_ecs_tilemap/issues/283).
**Note**: You **must** use the `atlas` feature when targeting the web with WebGL2. See [#283](https://github.com/StarArawn/bevy_ecs_tilemap/issues/283).

#### WebGPU

WebGPU is not yet supported by many browsers.

```
RUSTFLAGS=--cfg=web_sys_unstable_apis cargo run --example animation --target=wasm32-unknown-unknown
```

## Bevy Compatibility

Expand Down

0 comments on commit a8cf3ad

Please sign in to comment.