Fix common capitalization errors in documentation (#14562)

WASM -> Wasm
MacOS -> macOS

Nothing important, just something that annoyed me for a while :)
This commit is contained in:
Jan Hohenheim 2024-07-31 23:16:05 +02:00 committed by GitHub
parent bfcb19a871
commit 6f7c554daa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 51 additions and 51 deletions

View file

@ -7,9 +7,9 @@
# #
# ## LLD # ## LLD
# #
# LLD is a linker from the LLVM project that supports Linux, Windows, MacOS, and WASM. It has the greatest # LLD is a linker from the LLVM project that supports Linux, Windows, macOS, and Wasm. It has the greatest
# platform support and the easiest installation process. It is enabled by default in this file for Linux # platform support and the easiest installation process. It is enabled by default in this file for Linux
# and Windows. On MacOS, the default linker yields higher performance than LLD and is used instead. # and Windows. On macOS, the default linker yields higher performance than LLD and is used instead.
# #
# To install, please scroll to the corresponding table for your target (eg. `[target.x86_64-pc-windows-msvc]` # To install, please scroll to the corresponding table for your target (eg. `[target.x86_64-pc-windows-msvc]`
# for Windows) and follow the steps under `LLD linker`. # for Windows) and follow the steps under `LLD linker`.
@ -25,7 +25,7 @@
# your corresponding target, disable LLD by commenting out its `-Clink-arg=...` line, and enable Mold by # your corresponding target, disable LLD by commenting out its `-Clink-arg=...` line, and enable Mold by
# *uncommenting* its `-Clink-arg=...` line. # *uncommenting* its `-Clink-arg=...` line.
# #
# There is a fork of Mold named Sold that supports MacOS, but it is unmaintained and is about the same speed as # There is a fork of Mold named Sold that supports macOS, but it is unmaintained and is about the same speed as
# the default ld64 linker. For this reason, it is not included in this file. # the default ld64 linker. For this reason, it is not included in this file.
# #
# For more information, please see Mold's repository at <https://github.com/rui314/mold>. # For more information, please see Mold's repository at <https://github.com/rui314/mold>.
@ -142,7 +142,7 @@ rustflags = [
] ]
# Optional: Uncommenting the following improves compile times, but reduces the amount of debug info to 'line number tables only' # Optional: Uncommenting the following improves compile times, but reduces the amount of debug info to 'line number tables only'
# In most cases the gains are negligible, but if you are on macos and have slow compile times you should see significant gains. # In most cases the gains are negligible, but if you are on macOS and have slow compile times you should see significant gains.
# [profile.dev] # [profile.dev]
# debug = 1 # debug = 1

View file

@ -12,7 +12,7 @@
# repository before you can use this action. # repository before you can use this action.
# #
# This action will only install dependencies when the current operating system is Linux. It will do # This action will only install dependencies when the current operating system is Linux. It will do
# nothing on any other OS (MacOS, Windows). # nothing on any other OS (macOS, Windows).
name: Install Linux dependencies name: Install Linux dependencies
description: Installs the dependencies necessary to build Bevy on Linux. description: Installs the dependencies necessary to build Bevy on Linux.

View file

@ -6,7 +6,7 @@ test.beforeEach(async ({ page }) => {
const MAX_TIMEOUT_FOR_TEST = 300_000; const MAX_TIMEOUT_FOR_TEST = 300_000;
test.describe('WASM example', () => { test.describe('Wasm example', () => {
test('Wait for success', async ({ page }, testInfo) => { test('Wait for success', async ({ page }, testInfo) => {
let start = new Date().getTime(); let start = new Date().getTime();

View file

@ -72,7 +72,7 @@ jobs:
run: cargo run -p ci -- lints run: cargo run -p ci -- lints
miri: miri:
# Explicity use MacOS 14 to take advantage of M1 chip. # Explicity use macOS 14 to take advantage of M1 chip.
runs-on: macos-14 runs-on: macos-14
timeout-minutes: 60 timeout-minutes: 60
steps: steps:
@ -231,7 +231,7 @@ jobs:
run-examples-macos-metal: run-examples-macos-metal:
# Explicity use MacOS 14 to take advantage of M1 chip. # Explicity use macOS 14 to take advantage of M1 chip.
runs-on: macos-14 runs-on: macos-14
timeout-minutes: 30 timeout-minutes: 30
steps: steps:

View file

@ -209,7 +209,7 @@ jobs:
npx playwright install --with-deps npx playwright install --with-deps
cd ../.. cd ../..
- name: First WASM build - name: First Wasm build
run: | run: |
cargo build --release --example ui --target wasm32-unknown-unknown cargo build --release --example ui --target wasm32-unknown-unknown

View file

@ -354,7 +354,7 @@ reflect_functions = ["bevy_internal/reflect_functions"]
[dependencies] [dependencies]
bevy_internal = { path = "crates/bevy_internal", version = "0.15.0-dev", default-features = false } bevy_internal = { path = "crates/bevy_internal", version = "0.15.0-dev", default-features = false }
# WASM does not support dynamic linking. # Wasm does not support dynamic linking.
[target.'cfg(not(target_family = "wasm"))'.dependencies] [target.'cfg(not(target_family = "wasm"))'.dependencies]
bevy_dylib = { path = "crates/bevy_dylib", version = "0.15.0-dev", default-features = false, optional = true } bevy_dylib = { path = "crates/bevy_dylib", version = "0.15.0-dev", default-features = false, optional = true }
@ -760,7 +760,7 @@ doc-scrape-examples = true
name = "Lines" name = "Lines"
description = "Create a custom material to draw 3d lines" description = "Create a custom material to draw 3d lines"
category = "3D Rendering" category = "3D Rendering"
# WASM does not support the `POLYGON_MODE_LINE` feature. # Wasm does not support the `POLYGON_MODE_LINE` feature.
wasm = false wasm = false
[[example]] [[example]]

View file

@ -1,7 +1,7 @@
doc-valid-idents = [ doc-valid-idents = [
"GilRs", "GilRs",
"glTF", "glTF",
"MacOS", "macOS",
"NVidia", "NVidia",
"OpenXR", "OpenXR",
"sRGB", "sRGB",

View file

@ -1,5 +1,5 @@
//! This module provides panic handlers for [Bevy](https://bevyengine.org) //! This module provides panic handlers for [Bevy](https://bevyengine.org)
//! apps, and automatically configures platform specifics (i.e. WASM or Android). //! apps, and automatically configures platform specifics (i.e. Wasm or Android).
//! //!
//! By default, the [`PanicHandlerPlugin`] from this crate is included in Bevy's `DefaultPlugins`. //! By default, the [`PanicHandlerPlugin`] from this crate is included in Bevy's `DefaultPlugins`.
//! //!
@ -11,7 +11,7 @@ use crate::Plugin;
/// Adds sensible panic handlers to Apps. This plugin is part of the `DefaultPlugins`. Adding /// Adds sensible panic handlers to Apps. This plugin is part of the `DefaultPlugins`. Adding
/// this plugin will setup a panic hook appropriate to your target platform: /// this plugin will setup a panic hook appropriate to your target platform:
/// * On WASM, uses [`console_error_panic_hook`](https://crates.io/crates/console_error_panic_hook), logging /// * On Wasm, uses [`console_error_panic_hook`](https://crates.io/crates/console_error_panic_hook), logging
/// to the browser console. /// to the browser console.
/// * Other platforms are currently not setup. /// * Other platforms are currently not setup.
/// ///

View file

@ -1,8 +1,8 @@
#[cfg(all(feature = "file_watcher", target_arch = "wasm32"))] #[cfg(all(feature = "file_watcher", target_arch = "wasm32"))]
compile_error!( compile_error!(
"The \"file_watcher\" feature for hot reloading does not work \ "The \"file_watcher\" feature for hot reloading does not work \
on WASM.\nDisable \"file_watcher\" \ on Wasm.\nDisable \"file_watcher\" \
when compiling to WASM" when compiling to Wasm"
); );
#[cfg(target_os = "android")] #[cfg(target_os = "android")]

View file

@ -23,7 +23,7 @@ extern "C" {
fn worker(this: &Global) -> JsValue; fn worker(this: &Global) -> JsValue;
} }
/// Reader implementation for loading assets via HTTP in WASM. /// Reader implementation for loading assets via HTTP in Wasm.
pub struct HttpWasmAssetReader { pub struct HttpWasmAssetReader {
root_path: PathBuf, root_path: PathBuf,
} }

View file

@ -153,7 +153,7 @@ impl AssetProcessor {
/// Starts the processor in a background thread. /// Starts the processor in a background thread.
pub fn start(_processor: Res<Self>) { pub fn start(_processor: Res<Self>) {
#[cfg(any(target_arch = "wasm32", not(feature = "multi_threaded")))] #[cfg(any(target_arch = "wasm32", not(feature = "multi_threaded")))]
error!("Cannot run AssetProcessor in single threaded mode (or WASM) yet."); error!("Cannot run AssetProcessor in single threaded mode (or Wasm) yet.");
#[cfg(all(not(target_arch = "wasm32"), feature = "multi_threaded"))] #[cfg(all(not(target_arch = "wasm32"), feature = "multi_threaded"))]
{ {
let processor = _processor.clone(); let processor = _processor.clone();
@ -323,7 +323,7 @@ impl AssetProcessor {
AssetPath::from_path(&path).with_source(source.id()) AssetPath::from_path(&path).with_source(source.id())
); );
#[cfg(any(target_arch = "wasm32", not(feature = "multi_threaded")))] #[cfg(any(target_arch = "wasm32", not(feature = "multi_threaded")))]
error!("AddFolder event cannot be handled in single threaded mode (or WASM) yet."); error!("AddFolder event cannot be handled in single threaded mode (or Wasm) yet.");
#[cfg(all(not(target_arch = "wasm32"), feature = "multi_threaded"))] #[cfg(all(not(target_arch = "wasm32"), feature = "multi_threaded"))]
IoTaskPool::get().scope(|scope| { IoTaskPool::get().scope(|scope| {
scope.spawn(async move { scope.spawn(async move {

View file

@ -24,7 +24,7 @@ bevy_tasks = { path = "../bevy_tasks", version = "0.15.0-dev" }
const-fnv1a-hash = "1.1.0" const-fnv1a-hash = "1.1.0"
# MacOS # macOS
[target.'cfg(all(target_os="macos"))'.dependencies] [target.'cfg(all(target_os="macos"))'.dependencies]
# Some features of sysinfo are not supported by apple. This will disable those features on apple devices # Some features of sysinfo are not supported by apple. This will disable those features on apple devices
sysinfo = { version = "0.31.0", optional = true, default-features = false, features = [ sysinfo = { version = "0.31.0", optional = true, default-features = false, features = [

View file

@ -11,7 +11,7 @@ use bevy_ecs::system::Resource;
/// * linux, /// * linux,
/// * windows, /// * windows,
/// * android, /// * android,
/// * macos /// * macOS
/// ///
/// NOT supported when using the `bevy/dynamic` feature even when using previously mentioned targets /// NOT supported when using the `bevy/dynamic` feature even when using previously mentioned targets
/// ///
@ -48,7 +48,7 @@ pub struct SystemInfo {
pub memory: String, pub memory: String,
} }
// NOTE: sysinfo fails to compile when using bevy dynamic or on iOS and does nothing on wasm // NOTE: sysinfo fails to compile when using bevy dynamic or on iOS and does nothing on Wasm
#[cfg(all( #[cfg(all(
any( any(
target_os = "linux", target_os = "linux",

View file

@ -30,7 +30,7 @@ pub(super) trait SystemExecutor: Send + Sync {
/// Specifies how a [`Schedule`](super::Schedule) will be run. /// Specifies how a [`Schedule`](super::Schedule) will be run.
/// ///
/// The default depends on the target platform: /// The default depends on the target platform:
/// - [`SingleThreaded`](ExecutorKind::SingleThreaded) on WASM. /// - [`SingleThreaded`](ExecutorKind::SingleThreaded) on Wasm.
/// - [`MultiThreaded`](ExecutorKind::MultiThreaded) everywhere else. /// - [`MultiThreaded`](ExecutorKind::MultiThreaded) everywhere else.
#[derive(PartialEq, Eq, Default, Debug, Copy, Clone)] #[derive(PartialEq, Eq, Default, Debug, Copy, Clone)]
pub enum ExecutorKind { pub enum ExecutorKind {

View file

@ -840,7 +840,7 @@ pub enum Key {
/// Scroll up or display previous page of content. /// Scroll up or display previous page of content.
PageUp, PageUp,
/// Used to remove the character to the left of the cursor. This key value is also used for /// Used to remove the character to the left of the cursor. This key value is also used for
/// the key labeled `Delete` on MacOS keyboards. /// the key labeled `Delete` on macOS keyboards.
Backspace, Backspace,
/// Remove the currently selected input. /// Remove the currently selected input.
Clear, Clear,
@ -851,7 +851,7 @@ pub enum Key {
/// Cut the current selection. (`APPCOMMAND_CUT`) /// Cut the current selection. (`APPCOMMAND_CUT`)
Cut, Cut,
/// Used to delete the character to the right of the cursor. This key value is also used for the /// Used to delete the character to the right of the cursor. This key value is also used for the
/// key labeled `Delete` on MacOS keyboards when `Fn` is active. /// key labeled `Delete` on macOS keyboards when `Fn` is active.
Delete, Delete,
/// The Erase to End of Field key. This key deletes all characters from the current cursor /// The Erase to End of Field key. This key deletes all characters from the current cursor
/// position to the end of the current field. /// position to the end of the current field.

View file

@ -5,7 +5,7 @@
)] )]
//! This crate provides logging functions and configuration for [Bevy](https://bevyengine.org) //! This crate provides logging functions and configuration for [Bevy](https://bevyengine.org)
//! apps, and automatically configures platform specific log handlers (i.e. WASM or Android). //! apps, and automatically configures platform specific log handlers (i.e. Wasm or Android).
//! //!
//! The macros provided for logging are reexported from [`tracing`](https://docs.rs/tracing), //! The macros provided for logging are reexported from [`tracing`](https://docs.rs/tracing),
//! and behave identically to it. //! and behave identically to it.
@ -75,7 +75,7 @@ pub(crate) struct FlushGuard(SyncCell<tracing_chrome::FlushGuard>);
/// logging to `stdout`. /// logging to `stdout`.
/// * Using [`android_log-sys`](https://crates.io/crates/android_log-sys) on Android, /// * Using [`android_log-sys`](https://crates.io/crates/android_log-sys) on Android,
/// logging to Android logs. /// logging to Android logs.
/// * Using [`tracing-wasm`](https://crates.io/crates/tracing-wasm) in WASM, logging /// * Using [`tracing-wasm`](https://crates.io/crates/tracing-wasm) in Wasm, logging
/// to the browser console. /// to the browser console.
/// ///
/// You can configure this plugin. /// You can configure this plugin.

View file

@ -108,7 +108,7 @@ const MESHLET_MESH_MATERIAL_SHADER_HANDLE: Handle<Shader> =
/// This plugin is not compatible with [`Msaa`]. Any camera rendering a [`MeshletMesh`] must have /// This plugin is not compatible with [`Msaa`]. Any camera rendering a [`MeshletMesh`] must have
/// [`Msaa`] set to [`Msaa::Off`]. /// [`Msaa`] set to [`Msaa::Off`].
/// ///
/// This plugin does not work on WASM. /// This plugin does not work on Wasm.
/// ///
/// Mixing forward+prepass and deferred rendering for opaque materials is not currently supported when using this plugin. /// Mixing forward+prepass and deferred rendering for opaque materials is not currently supported when using this plugin.
/// You must use one or the other by setting [`crate::DefaultOpaqueRendererMethod`]. /// You must use one or the other by setting [`crate::DefaultOpaqueRendererMethod`].

View file

@ -66,7 +66,7 @@ image = { version = "0.25.2", default-features = false }
# misc # misc
codespan-reporting = "0.11.0" codespan-reporting = "0.11.0"
# `fragile-send-sync-non-atomic-wasm` feature means we can't use WASM threads for rendering # `fragile-send-sync-non-atomic-wasm` feature means we can't use Wasm threads for rendering
# It is enabled for now to avoid having to do a significant overhaul of the renderer just for wasm. # It is enabled for now to avoid having to do a significant overhaul of the renderer just for wasm.
# When the 'atomics' feature is enabled `fragile-send-sync-non-atomic` does nothing # When the 'atomics' feature is enabled `fragile-send-sync-non-atomic` does nothing
# and Bevy instead wraps `wgpu` types to verify they are not used off their origin thread. # and Bevy instead wraps `wgpu` types to verify they are not used off their origin thread.

View file

@ -464,7 +464,7 @@ pub struct PipelineCache {
waiting_pipelines: HashSet<CachedPipelineId>, waiting_pipelines: HashSet<CachedPipelineId>,
new_pipelines: Mutex<Vec<CachedPipeline>>, new_pipelines: Mutex<Vec<CachedPipeline>>,
/// If `true`, disables asynchronous pipeline compilation. /// If `true`, disables asynchronous pipeline compilation.
/// This has no effect on MacOS, wasm, or without the `multi_threaded` feature. /// This has no effect on macOS, wasm, or without the `multi_threaded` feature.
synchronous_pipeline_compilation: bool, synchronous_pipeline_compilation: bool,
} }

View file

@ -22,7 +22,7 @@ It is based on [`async-executor`][async-executor], a lightweight executor that a
In order to be able to optimize task execution in multi-threaded environments, In order to be able to optimize task execution in multi-threaded environments,
bevy provides three different thread pools via which tasks of different kinds can be spawned. bevy provides three different thread pools via which tasks of different kinds can be spawned.
(The same API is used in single-threaded environments, even if execution is limited to a single thread. (The same API is used in single-threaded environments, even if execution is limited to a single thread.
This currently applies to WASM targets.) This currently applies to Wasm targets.)
The determining factor for what kind of work should go in each pool is latency requirements: The determining factor for what kind of work should go in each pool is latency requirements:
* For CPU-intensive work (tasks that generally spin until completion) we have a standard * For CPU-intensive work (tasks that generally spin until completion) we have a standard

View file

@ -49,7 +49,7 @@ use std::{
#[cfg(not(target_arch = "wasm32"))] #[cfg(not(target_arch = "wasm32"))]
mod conditional_send { mod conditional_send {
/// Use [`ConditionalSend`] to mark an optional Send trait bound. Useful as on certain platforms (eg. WASM), /// Use [`ConditionalSend`] to mark an optional Send trait bound. Useful as on certain platforms (eg. Wasm),
/// futures aren't Send. /// futures aren't Send.
pub trait ConditionalSend: Send {} pub trait ConditionalSend: Send {}
impl<T: Send> ConditionalSend for T {} impl<T: Send> ConditionalSend for T {}
@ -64,7 +64,7 @@ mod conditional_send {
pub use conditional_send::*; pub use conditional_send::*;
/// Use [`ConditionalSendFuture`] for a future with an optional Send trait bound, as on certain platforms (eg. WASM), /// Use [`ConditionalSendFuture`] for a future with an optional Send trait bound, as on certain platforms (eg. Wasm),
/// futures aren't Send. /// futures aren't Send.
pub trait ConditionalSendFuture: std::future::Future + ConditionalSend {} pub trait ConditionalSendFuture: std::future::Future + ConditionalSend {}
impl<T: std::future::Future + ConditionalSend> ConditionalSendFuture for T {} impl<T: std::future::Future + ConditionalSend> ConditionalSendFuture for T {}

View file

@ -768,7 +768,7 @@ pub fn winit_runner<T: Event>(mut app: App) -> AppExit {
let mut runner_state = WinitAppRunnerState::new(app); let mut runner_state = WinitAppRunnerState::new(app);
trace!("starting winit event loop"); trace!("starting winit event loop");
// TODO(clean): the winit docs mention using `spawn` instead of `run` on WASM. // TODO(clean): the winit docs mention using `spawn` instead of `run` on Wasm.
if let Err(err) = event_loop.run_app(&mut runner_state) { if let Err(err) = event_loop.run_app(&mut runner_state) {
error!("winit event loop returned an error: {err}"); error!("winit event loop returned an error: {err}");
} }

View file

@ -49,7 +49,7 @@ git checkout v0.4.0
- [iOS](#ios) - [iOS](#ios)
- [Setup](#setup-1) - [Setup](#setup-1)
- [Build & Run](#build--run-1) - [Build & Run](#build--run-1)
- [WASM](#wasm) - [Wasm](#wasm)
- [Setup](#setup-2) - [Setup](#setup-2)
- [Build & Run](#build--run-2) - [Build & Run](#build--run-2)
- [WebGL2 and WebGPU](#webgl2-and-webgpu) - [WebGL2 and WebGPU](#webgl2-and-webgpu)
@ -195,7 +195,7 @@ Example | File | Description
--- | --- | --- --- | --- | ---
`ios` | [`mobile/src/lib.rs`](./mobile/src/lib.rs) | A 3d Scene with a button and playing sound `ios` | [`mobile/src/lib.rs`](./mobile/src/lib.rs) | A 3d Scene with a button and playing sound
## WASM ## Wasm
### Setup ### Setup

View file

@ -21,7 +21,7 @@ fn main() {
.add_systems(Update, example_control_system); .add_systems(Update, example_control_system);
// Unfortunately, MSAA and HDR are not supported simultaneously under WebGL. // Unfortunately, MSAA and HDR are not supported simultaneously under WebGL.
// Since this example uses HDR, we must disable MSAA for WASM builds, at least // Since this example uses HDR, we must disable MSAA for Wasm builds, at least
// until WebGPU is ready and no longer behind a feature flag in Web browsers. // until WebGPU is ready and no longer behind a feature flag in Web browsers.
#[cfg(target_arch = "wasm32")] #[cfg(target_arch = "wasm32")]
app.insert_resource(Msaa::Off); app.insert_resource(Msaa::Off);

View file

@ -74,7 +74,7 @@ git checkout v0.4.0
- [iOS](#ios) - [iOS](#ios)
- [Setup](#setup-1) - [Setup](#setup-1)
- [Build & Run](#build--run-1) - [Build & Run](#build--run-1)
- [WASM](#wasm) - [Wasm](#wasm)
- [Setup](#setup-2) - [Setup](#setup-2)
- [Build & Run](#build--run-2) - [Build & Run](#build--run-2)
- [WebGL2 and WebGPU](#webgl2-and-webgpu) - [WebGL2 and WebGPU](#webgl2-and-webgpu)
@ -615,7 +615,7 @@ Example | File | Description
--- | --- | --- --- | --- | ---
`ios` | [`mobile/src/lib.rs`](./mobile/src/lib.rs) | A 3d Scene with a button and playing sound `ios` | [`mobile/src/lib.rs`](./mobile/src/lib.rs) | A 3d Scene with a button and playing sound
## WASM ## Wasm
### Setup ### Setup

View file

@ -435,8 +435,8 @@ fn receive_image_from_buffer(
// buffered and receiving will just pick that up. // buffered and receiving will just pick that up.
// //
// It may also be worth noting that although on native, the usage of asynchronous // It may also be worth noting that although on native, the usage of asynchronous
// channels is wholly unnecessary, for the sake of portability to WASM // channels is wholly unnecessary, for the sake of portability to Wasm
// we'll use async channels that work on both native and WASM. // we'll use async channels that work on both native and Wasm.
let (s, r) = crossbeam_channel::bounded(1); let (s, r) = crossbeam_channel::bounded(1);

View file

@ -133,7 +133,7 @@ fn save_scene_system(world: &mut World) {
// Writing the scene to a new file. Using a task to avoid calling the filesystem APIs in a system // Writing the scene to a new file. Using a task to avoid calling the filesystem APIs in a system
// as they are blocking // as they are blocking
// This can't work in WASM as there is no filesystem access // This can't work in Wasm as there is no filesystem access
#[cfg(not(target_arch = "wasm32"))] #[cfg(not(target_arch = "wasm32"))]
IoTaskPool::get() IoTaskPool::get()
.spawn(async move { .spawn(async move {

View file

@ -224,8 +224,8 @@ fn map_and_read_buffer(
// buffered and receiving will just pick that up. // buffered and receiving will just pick that up.
// //
// It may also be worth noting that although on native, the usage of asynchronous // It may also be worth noting that although on native, the usage of asynchronous
// channels is wholly unnecessary, for the sake of portability to WASM // channels is wholly unnecessary, for the sake of portability to Wasm
// we'll use async channels that work on both native and WASM. // we'll use async channels that work on both native and Wasm.
let (s, r) = crossbeam_channel::unbounded::<()>(); let (s, r) = crossbeam_channel::unbounded::<()>();

View file

@ -18,7 +18,7 @@
background-color: white; background-color: white;
} }
</style> </style>
<title>WASM Example</title> <title>Wasm Example</title>
</head> </head>
<script type="module"> <script type="module">
import init from './target/wasm_example.js' import init from './target/wasm_example.js'

View file

@ -17,9 +17,9 @@ fn main() {
name: Some("bevy.app".into()), name: Some("bevy.app".into()),
resolution: (500., 300.).into(), resolution: (500., 300.).into(),
present_mode: PresentMode::AutoVsync, present_mode: PresentMode::AutoVsync,
// Tells wasm to resize the window according to the available canvas // Tells Wasm to resize the window according to the available canvas
fit_canvas_to_parent: true, fit_canvas_to_parent: true,
// Tells wasm not to override default event handling, like F5, Ctrl+R etc. // Tells Wasm not to override default event handling, like F5, Ctrl+R etc.
prevent_default_event_handling: false, prevent_default_event_handling: false,
window_theme: Some(WindowTheme::Dark), window_theme: Some(WindowTheme::Dark),
enabled_buttons: bevy::window::EnabledButtons { enabled_buttons: bevy::window::EnabledButtons {

View file

@ -48,7 +48,7 @@
pub use bevy_internal::*; pub use bevy_internal::*;
// WASM does not support dynamic linking. // Wasm does not support dynamic linking.
#[cfg(all(feature = "dynamic_linking", not(target_family = "wasm")))] #[cfg(all(feature = "dynamic_linking", not(target_family = "wasm")))]
#[allow(unused_imports)] #[allow(unused_imports)]
use bevy_dylib; use bevy_dylib;

View file

@ -1,7 +1,7 @@
[package] [package]
name = "build-wasm-example" name = "build-wasm-example"
edition = "2021" edition = "2021"
description = "Tool for building example for WASM" description = "Tool for building example for Wasm"
publish = false publish = false
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"

View file

@ -823,8 +823,8 @@ struct Example {
description: String, description: String,
/// Pretty category name, matching the folder containing the example /// Pretty category name, matching the folder containing the example
category: String, category: String,
/// Does this example work in wasm? /// Does this example work in Wasm?
// TODO: be able to differentiate between WebGL2, WebGPU, both, or neither (for examples that could run on wasm without a renderer) // TODO: be able to differentiate between WebGL2, WebGPU, both, or neither (for examples that could run on Wasm without a renderer)
wasm: bool, wasm: bool,
/// List of commands to run before the example. Can be used for example to specify data to download /// List of commands to run before the example. Can be used for example to specify data to download
setup: Vec<Vec<String>>, setup: Vec<Vec<String>>,