Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bevyengine
GitHub Repository: bevyengine/bevy
Path: blob/main/Cargo.toml
6570 views
1
[package]
2
name = "bevy"
3
version = "0.17.0-dev"
4
edition = "2024"
5
categories = ["game-engines", "graphics", "gui", "rendering"]
6
description = "A refreshingly simple data-driven game engine and app framework"
7
exclude = ["assets/", "tools/", ".github/", "crates/", "examples/wasm/assets/"]
8
homepage = "https://bevy.org"
9
keywords = ["game", "engine", "gamedev", "graphics", "bevy"]
10
license = "MIT OR Apache-2.0"
11
repository = "https://github.com/bevyengine/bevy"
12
documentation = "https://docs.rs/bevy"
13
rust-version = "1.88.0"
14
15
[workspace]
16
resolver = "2"
17
members = [
18
# All of Bevy's official crates are within the `crates` folder!
19
"crates/*",
20
# Several crates with macros have "compile fail" tests nested inside them, also known as UI
21
# tests, that verify diagnostic output does not accidentally change.
22
# TODO: Use a glob pattern once they are fixed in `dependabot-core`
23
# TODO: See https://github.com/bevyengine/bevy/issues/17876 for context.
24
"crates/bevy_derive/compile_fail",
25
"crates/bevy_ecs/compile_fail",
26
"crates/bevy_reflect/compile_fail",
27
# Examples of compiling Bevy for mobile platforms.
28
"examples/mobile",
29
# Examples of using Bevy on no_std platforms.
30
"examples/no_std/*",
31
# Examples of compiling Bevy with automatic reflect type registration for platforms without `inventory` support.
32
"examples/reflection/auto_register_static",
33
# Benchmarks
34
"benches",
35
# Internal tools that are not published.
36
"tools/*",
37
# Bevy's error codes. This is a crate so we can automatically check all of the code blocks.
38
"errors",
39
]
40
exclude = [
41
# Integration tests are not part of the workspace
42
"tests-integration",
43
]
44
45
[workspace.lints.clippy]
46
doc_markdown = "warn"
47
manual_let_else = "warn"
48
match_same_arms = "warn"
49
redundant_closure_for_method_calls = "warn"
50
redundant_else = "warn"
51
semicolon_if_nothing_returned = "warn"
52
type_complexity = "allow"
53
undocumented_unsafe_blocks = "warn"
54
unwrap_or_default = "warn"
55
needless_lifetimes = "allow"
56
too_many_arguments = "allow"
57
nonstandard_macro_braces = "warn"
58
print_stdout = "warn"
59
print_stderr = "warn"
60
61
ptr_as_ptr = "warn"
62
ptr_cast_constness = "warn"
63
ref_as_ptr = "warn"
64
65
# see: https://github.com/bevyengine/bevy/pull/15375#issuecomment-2366966219
66
too_long_first_doc_paragraph = "allow"
67
68
std_instead_of_core = "warn"
69
std_instead_of_alloc = "warn"
70
alloc_instead_of_core = "warn"
71
72
allow_attributes = "warn"
73
allow_attributes_without_reason = "warn"
74
75
[workspace.lints.rust]
76
missing_docs = "warn"
77
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(docsrs_dep)'] }
78
unsafe_code = "deny"
79
unsafe_op_in_unsafe_fn = "warn"
80
unused_qualifications = "warn"
81
82
# Unfortunately, cargo does not currently support overriding workspace lints
83
# inside a particular crate. See https://github.com/rust-lang/cargo/issues/13157
84
#
85
# We require an override for cases like `std_instead_of_core`, which are intended
86
# for the library contributors and not for how users should consume Bevy.
87
# To ensure examples aren't subject to these lints, below is a duplication of the
88
# workspace lints, with the "overrides" applied.
89
#
90
# [lints]
91
# workspace = true
92
93
[lints.clippy]
94
doc_markdown = "warn"
95
manual_let_else = "warn"
96
match_same_arms = "warn"
97
redundant_closure_for_method_calls = "warn"
98
redundant_else = "warn"
99
semicolon_if_nothing_returned = "warn"
100
type_complexity = "allow"
101
undocumented_unsafe_blocks = "warn"
102
unwrap_or_default = "warn"
103
needless_lifetimes = "allow"
104
too_many_arguments = "allow"
105
nonstandard_macro_braces = "warn"
106
107
ptr_as_ptr = "warn"
108
ptr_cast_constness = "warn"
109
ref_as_ptr = "warn"
110
111
too_long_first_doc_paragraph = "allow"
112
113
std_instead_of_core = "allow"
114
std_instead_of_alloc = "allow"
115
alloc_instead_of_core = "allow"
116
117
allow_attributes = "warn"
118
allow_attributes_without_reason = "warn"
119
120
[lints.rust]
121
missing_docs = "warn"
122
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(docsrs_dep)'] }
123
unsafe_code = "deny"
124
unsafe_op_in_unsafe_fn = "warn"
125
unused_qualifications = "warn"
126
127
[features]
128
default = [
129
"std",
130
"async_executor",
131
"android-game-activity",
132
"android_shared_stdcxx",
133
"animation",
134
"bevy_asset",
135
"bevy_audio",
136
"bevy_color",
137
"bevy_core_pipeline",
138
"bevy_post_process",
139
"bevy_core_widgets",
140
"bevy_anti_alias",
141
"bevy_gilrs",
142
"bevy_gizmos",
143
"bevy_gltf",
144
"bevy_input_focus",
145
"bevy_log",
146
"bevy_mesh_picking_backend",
147
"bevy_pbr",
148
"bevy_picking",
149
"bevy_render",
150
"bevy_scene",
151
"bevy_image",
152
"bevy_mesh",
153
"bevy_camera",
154
"bevy_light",
155
"bevy_shader",
156
"bevy_sprite",
157
"bevy_sprite_picking_backend",
158
"bevy_sprite_render",
159
"bevy_state",
160
"bevy_text",
161
"bevy_ui",
162
"bevy_ui_picking_backend",
163
"bevy_ui_render",
164
"bevy_window",
165
"bevy_winit",
166
"custom_cursor",
167
"default_font",
168
"hdr",
169
"ktx2",
170
"multi_threaded",
171
"png",
172
"reflect_auto_register",
173
"smaa_luts",
174
"sysinfo_plugin",
175
"tonemapping_luts",
176
"vorbis",
177
"webgl2",
178
"x11",
179
"wayland",
180
"debug",
181
"zstd_rust",
182
]
183
184
# Recommended defaults for no_std applications
185
default_no_std = ["libm", "critical-section", "bevy_color", "bevy_state"]
186
187
# Provides an implementation for picking meshes
188
bevy_mesh_picking_backend = ["bevy_internal/bevy_mesh_picking_backend"]
189
190
# Provides an implementation for picking sprites
191
bevy_sprite_picking_backend = ["bevy_internal/bevy_sprite_picking_backend"]
192
193
# Provides an implementation for picking UI
194
bevy_ui_picking_backend = ["bevy_internal/bevy_ui_picking_backend"]
195
196
# Provides a debug overlay for bevy UI
197
bevy_ui_debug = ["bevy_internal/bevy_ui_debug"]
198
199
# Force dynamic linking, which improves iterative compile times
200
dynamic_linking = ["dep:bevy_dylib", "bevy_internal/dynamic_linking"]
201
202
# Enables system information diagnostic plugin
203
sysinfo_plugin = ["bevy_internal/sysinfo_plugin"]
204
205
# Provides animation functionality
206
bevy_animation = ["bevy_internal/bevy_animation"]
207
208
# Provides asset functionality
209
bevy_asset = ["bevy_internal/bevy_asset"]
210
211
# Provides audio functionality
212
bevy_audio = ["bevy_internal/bevy_audio"]
213
214
# Provides shared color types and operations
215
bevy_color = ["bevy_internal/bevy_color"]
216
217
# Provides cameras and other basic render pipeline features
218
bevy_core_pipeline = ["bevy_internal/bevy_core_pipeline"]
219
220
# Provides post process effects such as depth of field, bloom, chromatic aberration.
221
bevy_post_process = ["bevy_internal/bevy_post_process"]
222
223
# Provides various anti aliasing solutions
224
bevy_anti_alias = ["bevy_internal/bevy_anti_alias"]
225
226
# Adds gamepad support
227
bevy_gilrs = ["bevy_internal/bevy_gilrs"]
228
229
# [glTF](https://www.khronos.org/gltf/) support
230
bevy_gltf = ["bevy_internal/bevy_gltf"]
231
232
# Adds PBR rendering
233
bevy_pbr = ["bevy_internal/bevy_pbr"]
234
235
# Provides picking functionality
236
bevy_picking = ["bevy_internal/bevy_picking"]
237
238
# Provides rendering functionality
239
bevy_render = ["bevy_internal/bevy_render"]
240
241
# Provides scene functionality
242
bevy_scene = ["bevy_internal/bevy_scene"]
243
244
# Provides raytraced lighting (experimental)
245
bevy_solari = ["bevy_internal/bevy_solari"]
246
247
# Provides sprite functionality
248
bevy_sprite = ["bevy_internal/bevy_sprite"]
249
250
# Provides sprite rendering functionality
251
bevy_sprite_render = ["bevy_internal/bevy_sprite_render"]
252
253
# Provides text functionality
254
bevy_text = ["bevy_internal/bevy_text"]
255
256
# A custom ECS-driven UI framework
257
bevy_ui = ["bevy_internal/bevy_ui"]
258
259
# Provides rendering functionality for bevy_ui
260
bevy_ui_render = ["bevy_internal/bevy_ui_render"]
261
262
# Windowing layer
263
bevy_window = ["bevy_internal/bevy_window"]
264
265
# winit window and input backend
266
bevy_winit = ["bevy_internal/bevy_winit"]
267
268
# Load and access image data. Usually added by an image format
269
bevy_image = ["bevy_internal/bevy_image"]
270
271
# Provides a mesh format and some primitive meshing routines.
272
bevy_mesh = ["bevy_internal/bevy_mesh"]
273
274
# Provides camera and visibility types, as well as culling primitives.
275
bevy_camera = ["bevy_internal/bevy_camera"]
276
277
# Provides light types such as point lights, directional lights, spotlights.
278
bevy_light = ["bevy_internal/bevy_light"]
279
280
# Provides shaders usable through asset handles.
281
bevy_shader = ["bevy_internal/bevy_shader"]
282
283
# Adds support for rendering gizmos
284
bevy_gizmos = ["bevy_internal/bevy_gizmos"]
285
286
# Provides a collection of developer tools
287
bevy_dev_tools = ["bevy_internal/bevy_dev_tools"]
288
289
# Enable the Bevy Remote Protocol
290
bevy_remote = ["bevy_internal/bevy_remote"]
291
292
# Enable integration with `tracing` and `log`
293
bevy_log = ["bevy_internal/bevy_log"]
294
295
# Enable input focus subsystem
296
bevy_input_focus = ["bevy_internal/bevy_input_focus"]
297
298
# Headless widget collection for Bevy UI.
299
bevy_core_widgets = ["bevy_internal/bevy_core_widgets"]
300
301
# Feathers widget collection.
302
experimental_bevy_feathers = ["bevy_internal/bevy_feathers"]
303
304
# Enable passthrough loading for SPIR-V shaders (Only supported on Vulkan, shader capabilities and extensions must agree with the platform implementation)
305
spirv_shader_passthrough = ["bevy_internal/spirv_shader_passthrough"]
306
307
# Statically linked DXC shader compiler for DirectX 12
308
statically-linked-dxc = ["bevy_internal/statically-linked-dxc"]
309
310
# Forces the wgpu instance to be initialized using the raw Vulkan HAL, enabling additional configuration
311
raw_vulkan_init = ["bevy_internal/raw_vulkan_init"]
312
313
# Tracing support, saving a file in Chrome Tracing format
314
trace_chrome = ["trace", "bevy_internal/trace_chrome"]
315
316
# Tracing support, exposing a port for Tracy
317
trace_tracy = ["trace", "bevy_internal/trace_tracy"]
318
319
# Tracing support, with memory profiling, exposing a port for Tracy
320
trace_tracy_memory = ["bevy_internal/trace_tracy_memory"]
321
322
# Tracing support
323
trace = ["bevy_internal/trace", "dep:tracing"]
324
325
# Basis Universal compressed texture support
326
basis-universal = ["bevy_internal/basis-universal"]
327
328
# Enables compressed KTX2 UASTC texture output on the asset processor
329
compressed_image_saver = ["bevy_internal/compressed_image_saver"]
330
331
# BMP image format support
332
bmp = ["bevy_internal/bmp"]
333
334
# DDS compressed texture support
335
dds = ["bevy_internal/dds"]
336
337
# EXR image format support
338
exr = ["bevy_internal/exr"]
339
340
# Farbfeld image format support
341
ff = ["bevy_internal/ff"]
342
343
# GIF image format support
344
gif = ["bevy_internal/gif"]
345
346
# HDR image format support
347
hdr = ["bevy_internal/hdr"]
348
349
# KTX2 compressed texture support
350
ktx2 = ["bevy_internal/ktx2"]
351
352
# ICO image format support
353
ico = ["bevy_internal/ico"]
354
355
# JPEG image format support
356
jpeg = ["bevy_internal/jpeg"]
357
358
# PNG image format support
359
png = ["bevy_internal/png"]
360
361
# PNM image format support, includes pam, pbm, pgm and ppm
362
pnm = ["bevy_internal/pnm"]
363
364
# QOI image format support
365
qoi = ["bevy_internal/qoi"]
366
367
# TGA image format support
368
tga = ["bevy_internal/tga"]
369
370
# TIFF image format support
371
tiff = ["bevy_internal/tiff"]
372
373
# WebP image format support
374
webp = ["bevy_internal/webp"]
375
376
# For KTX2 supercompression
377
zlib = ["bevy_internal/zlib"]
378
379
# For KTX2 Zstandard decompression using pure rust [ruzstd](https://crates.io/crates/ruzstd). This is the safe default. For maximum performance, use "zstd_c".
380
zstd_rust = ["bevy_internal/zstd_rust"]
381
382
# For KTX2 Zstandard decompression using [zstd](https://crates.io/crates/zstd). This is a faster backend, but uses unsafe C bindings. For the safe option, stick to the default backend with "zstd_rust".
383
zstd_c = ["bevy_internal/zstd_c"]
384
385
# FLAC audio format support
386
flac = ["bevy_internal/flac"]
387
388
# MP3 audio format support
389
mp3 = ["bevy_internal/mp3"]
390
391
# OGG/VORBIS audio format support
392
vorbis = ["bevy_internal/vorbis"]
393
394
# WAV audio format support
395
wav = ["bevy_internal/wav"]
396
397
# AAC audio format support (through symphonia)
398
symphonia-aac = ["bevy_internal/symphonia-aac"]
399
400
# AAC, FLAC, MP3, MP4, OGG/VORBIS, and WAV audio formats support (through symphonia)
401
symphonia-all = ["bevy_internal/symphonia-all"]
402
403
# FLAC audio format support (through symphonia)
404
symphonia-flac = ["bevy_internal/symphonia-flac"]
405
406
# MP4 audio format support (through symphonia)
407
symphonia-isomp4 = ["bevy_internal/symphonia-isomp4"]
408
409
# OGG/VORBIS audio format support (through symphonia)
410
symphonia-vorbis = ["bevy_internal/symphonia-vorbis"]
411
412
# WAV audio format support (through symphonia)
413
symphonia-wav = ["bevy_internal/symphonia-wav"]
414
415
# Enable serialization support through serde
416
serialize = ["bevy_internal/serialize"]
417
418
# Enables multithreaded parallelism in the engine. Disabling it forces all engine tasks to run on a single thread.
419
multi_threaded = ["bevy_internal/multi_threaded"]
420
421
# Use async-io's implementation of block_on instead of futures-lite's implementation. This is preferred if your application uses async-io.
422
async-io = ["bevy_internal/async-io"]
423
424
# Wayland display server support
425
wayland = ["bevy_internal/wayland"]
426
427
# X11 display server support
428
x11 = ["bevy_internal/x11"]
429
430
# Android NativeActivity support. Legacy, should be avoided for most new Android games.
431
android-native-activity = ["bevy_internal/android-native-activity"]
432
433
# Android GameActivity support. Default, choose between this and `android-native-activity`.
434
android-game-activity = ["bevy_internal/android-game-activity"]
435
436
# Enable systems that allow for automated testing on CI
437
bevy_ci_testing = ["bevy_internal/bevy_ci_testing"]
438
439
# Enable animation support, and glTF animation loading
440
animation = ["bevy_internal/animation", "bevy_animation"]
441
442
# Enable using a shared stdlib for cxx on Android
443
android_shared_stdcxx = ["bevy_internal/android_shared_stdcxx"]
444
445
# Enable detailed trace event logging. These trace events are expensive even when off, thus they require compile time opt-in
446
detailed_trace = ["bevy_internal/detailed_trace"]
447
448
# Include tonemapping Look Up Tables KTX2 files. If everything is pink, you need to enable this feature or change the `Tonemapping` method for your `Camera2d` or `Camera3d`.
449
tonemapping_luts = ["bevy_internal/tonemapping_luts"]
450
451
# Include SMAA Look Up Tables KTX2 Files
452
smaa_luts = ["bevy_internal/smaa_luts"]
453
454
# Include spatio-temporal blue noise KTX2 file used by generated environment maps, Solari and atmosphere
455
bluenoise_texture = ["bevy_internal/bluenoise_texture"]
456
457
# NVIDIA Deep Learning Super Sampling
458
dlss = ["bevy_internal/dlss"]
459
460
# Forcibly disable DLSS so that cargo build --all-features works without the DLSS SDK being installed. Not meant for users.
461
force_disable_dlss = ["bevy_internal/force_disable_dlss"]
462
463
# Enable AccessKit on Unix backends (currently only works with experimental screen readers and forks.)
464
accesskit_unix = ["bevy_internal/accesskit_unix"]
465
466
# Enable assertions to check the validity of parameters passed to glam
467
glam_assert = ["bevy_internal/glam_assert"]
468
469
# Enable assertions in debug builds to check the validity of parameters passed to glam
470
debug_glam_assert = ["bevy_internal/debug_glam_assert"]
471
472
# Include a default font, containing only ASCII characters, at the cost of a 20kB binary size increase
473
default_font = ["bevy_internal/default_font"]
474
475
# Enable support for shaders in GLSL
476
shader_format_glsl = ["bevy_internal/shader_format_glsl"]
477
478
# Enable support for shaders in SPIR-V
479
shader_format_spirv = ["bevy_internal/shader_format_spirv"]
480
481
# Enable support for shaders in WESL
482
shader_format_wesl = ["bevy_internal/shader_format_wesl"]
483
484
# Enable support for transmission-related textures in the `StandardMaterial`, at the risk of blowing past the global, per-shader texture limit on older/lower-end GPUs
485
pbr_transmission_textures = ["bevy_internal/pbr_transmission_textures"]
486
487
# Enable support for Clustered Decals
488
pbr_clustered_decals = ["bevy_internal/pbr_clustered_decals"]
489
490
# Enable support for Light Textures
491
pbr_light_textures = ["bevy_internal/pbr_light_textures"]
492
493
# Enable support for multi-layer material textures in the `StandardMaterial`, at the risk of blowing past the global, per-shader texture limit on older/lower-end GPUs
494
pbr_multi_layer_material_textures = [
495
"bevy_internal/pbr_multi_layer_material_textures",
496
]
497
498
# Enable support for anisotropy texture in the `StandardMaterial`, at the risk of blowing past the global, per-shader texture limit on older/lower-end GPUs
499
pbr_anisotropy_texture = ["bevy_internal/pbr_anisotropy_texture"]
500
501
# Enable support for PCSS, at the risk of blowing past the global, per-shader sampler limit on older/lower-end GPUs
502
experimental_pbr_pcss = ["bevy_internal/experimental_pbr_pcss"]
503
504
# Enable support for specular textures in the `StandardMaterial`, at the risk of blowing past the global, per-shader texture limit on older/lower-end GPUs
505
pbr_specular_textures = ["bevy_internal/pbr_specular_textures"]
506
507
# Enable some limitations to be able to use WebGL2. Please refer to the [WebGL2 and WebGPU](https://github.com/bevyengine/bevy/tree/latest/examples#webgl2-and-webgpu) section of the examples README for more information on how to run Wasm builds with WebGPU.
508
webgl2 = ["bevy_internal/webgl"]
509
510
# Enable support for WebGPU in Wasm. When enabled, this feature will override the `webgl2` feature and you won't be able to run Wasm builds with WebGL2, only with WebGPU.
511
webgpu = ["bevy_internal/webgpu"]
512
513
# Enables the built-in asset processor for processed assets.
514
asset_processor = ["bevy_internal/asset_processor"]
515
516
# Enables watching the filesystem for Bevy Asset hot-reloading
517
file_watcher = ["bevy_internal/file_watcher"]
518
519
# Enables watching in memory asset providers for Bevy Asset hot-reloading
520
embedded_watcher = ["bevy_internal/embedded_watcher"]
521
522
# Enables downloading assets from HTTP sources. Warning: there are security implications. Read the docs on WebAssetPlugin.
523
http = ["bevy_internal/http"]
524
525
# Enables downloading assets from HTTPS sources. Warning: there are security implications. Read the docs on WebAssetPlugin.
526
https = ["bevy_internal/https"]
527
528
# Enable caching downloaded assets on the filesystem. NOTE: this cache currently never invalidates entries!
529
web_asset_cache = ["bevy_internal/web_asset_cache"]
530
531
# Enable stepping-based debugging of Bevy systems
532
bevy_debug_stepping = [
533
"bevy_internal/bevy_debug_stepping",
534
"bevy_internal/debug",
535
]
536
537
# Enables the meshlet renderer for dense high-poly scenes (experimental)
538
meshlet = ["bevy_internal/meshlet"]
539
540
# Enables processing meshes into meshlet meshes for bevy_pbr
541
meshlet_processor = ["bevy_internal/meshlet_processor"]
542
543
# Enable built in global state machines
544
bevy_state = ["bevy_internal/bevy_state"]
545
546
# Enables source location tracking for change detection and spawning/despawning, which can assist with debugging
547
track_location = ["bevy_internal/track_location"]
548
549
# Enable function reflection
550
reflect_functions = ["bevy_internal/reflect_functions"]
551
552
# Enable documentation reflection
553
reflect_documentation = ["bevy_internal/reflect_documentation"]
554
555
# Enable automatic reflect registration
556
reflect_auto_register = ["bevy_internal/reflect_auto_register"]
557
558
# Enable automatic reflect registration without inventory. See `reflect::load_type_registrations` for more info.
559
reflect_auto_register_static = ["bevy_internal/reflect_auto_register_static"]
560
561
# Enable winit custom cursor support
562
custom_cursor = ["bevy_internal/custom_cursor"]
563
564
# Experimental support for nodes that are ignored for UI layouting
565
ghost_nodes = ["bevy_internal/ghost_nodes"]
566
567
# Uses `async-executor` as a task execution backend.
568
async_executor = ["std", "bevy_internal/async_executor"]
569
570
# Allows access to the `std` crate.
571
std = ["bevy_internal/std"]
572
573
# `critical-section` provides the building blocks for synchronization primitives on all platforms, including `no_std`.
574
critical-section = ["bevy_internal/critical-section"]
575
576
# Uses the `libm` maths library instead of the one provided in `std` and `core`.
577
libm = ["bevy_internal/libm"]
578
579
# Enables use of browser APIs. Note this is currently only applicable on `wasm32` architectures.
580
web = ["bevy_internal/web"]
581
582
# Enable hotpatching of Bevy systems
583
hotpatching = ["bevy_internal/hotpatching"]
584
585
# Enable collecting debug information about systems and components to help with diagnostics
586
debug = ["bevy_internal/debug"]
587
588
[dependencies]
589
bevy_internal = { path = "crates/bevy_internal", version = "0.17.0-dev", default-features = false }
590
tracing = { version = "0.1", default-features = false, optional = true }
591
592
# Wasm does not support dynamic linking.
593
[target.'cfg(not(target_family = "wasm"))'.dependencies]
594
bevy_dylib = { path = "crates/bevy_dylib", version = "0.17.0-dev", default-features = false, optional = true }
595
596
[dev-dependencies]
597
rand = "0.9.0"
598
rand_chacha = "0.9.0"
599
ron = "0.10"
600
flate2 = "1.0"
601
serde = { version = "1", features = ["derive"] }
602
serde_json = "1.0.140"
603
bytemuck = "1"
604
# The following explicit dependencies are needed for proc macros to work inside of examples as they are part of the bevy crate itself.
605
bevy_render = { path = "crates/bevy_render", version = "0.17.0-dev", default-features = false }
606
bevy_ecs = { path = "crates/bevy_ecs", version = "0.17.0-dev", default-features = false }
607
bevy_state = { path = "crates/bevy_state", version = "0.17.0-dev", default-features = false }
608
bevy_asset = { path = "crates/bevy_asset", version = "0.17.0-dev", default-features = false }
609
bevy_reflect = { path = "crates/bevy_reflect", version = "0.17.0-dev", default-features = false }
610
bevy_image = { path = "crates/bevy_image", version = "0.17.0-dev", default-features = false }
611
bevy_gizmos = { path = "crates/bevy_gizmos", version = "0.17.0-dev", default-features = false }
612
# Needed to poll Task examples
613
futures-lite = "2.0.1"
614
futures-timer = { version = "3", features = ["wasm-bindgen", "gloo-timers"] }
615
crossbeam-channel = "0.5.0"
616
argh = "0.1.12"
617
thiserror = "2.0"
618
event-listener = "5.3.0"
619
anyhow = "1"
620
accesskit = "0.21"
621
nonmax = "0.5"
622
623
[target.'cfg(not(target_family = "wasm"))'.dev-dependencies]
624
ureq = { version = "3.0.8", features = ["json"] }
625
626
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
627
getrandom = { version = "0.3", default-features = false, features = [
628
"wasm_js",
629
] }
630
wasm-bindgen = { version = "0.2" }
631
web-sys = { version = "0.3", features = ["Window"] }
632
633
[[example]]
634
name = "context_menu"
635
path = "examples/usage/context_menu.rs"
636
doc-scrape-examples = true
637
638
[package.metadata.example.context_menu]
639
name = "Context Menu"
640
description = "Example of a context menu"
641
category = "Usage"
642
wasm = true
643
644
[[example]]
645
name = "hello_world"
646
path = "examples/hello_world.rs"
647
doc-scrape-examples = true
648
649
[package.metadata.example.hello_world]
650
hidden = true
651
652
# 2D Rendering
653
[[example]]
654
name = "bloom_2d"
655
path = "examples/2d/bloom_2d.rs"
656
doc-scrape-examples = true
657
658
[package.metadata.example.bloom_2d]
659
name = "2D Bloom"
660
description = "Illustrates bloom post-processing in 2d"
661
category = "2D Rendering"
662
wasm = true
663
664
[[example]]
665
name = "move_sprite"
666
path = "examples/2d/move_sprite.rs"
667
doc-scrape-examples = true
668
669
[package.metadata.example.move_sprite]
670
name = "Move Sprite"
671
description = "Changes the transform of a sprite"
672
category = "2D Rendering"
673
wasm = true
674
675
[[example]]
676
name = "2d_viewport_to_world"
677
path = "examples/2d/2d_viewport_to_world.rs"
678
doc-scrape-examples = true
679
680
[package.metadata.example.2d_viewport_to_world]
681
name = "2D Viewport To World"
682
description = "Demonstrates how to use the `Camera::viewport_to_world_2d` method with a dynamic viewport and camera."
683
category = "2D Rendering"
684
wasm = true
685
686
[[example]]
687
name = "rotation"
688
path = "examples/2d/rotation.rs"
689
doc-scrape-examples = true
690
691
[package.metadata.example.rotation]
692
name = "2D Rotation"
693
description = "Demonstrates rotating entities in 2D with quaternions"
694
category = "2D Rendering"
695
wasm = true
696
697
[[example]]
698
name = "mesh2d"
699
path = "examples/2d/mesh2d.rs"
700
doc-scrape-examples = true
701
702
[package.metadata.example.mesh2d]
703
name = "Mesh 2D"
704
description = "Renders a 2d mesh"
705
category = "2D Rendering"
706
wasm = true
707
708
[[example]]
709
name = "mesh2d_arcs"
710
path = "examples/2d/mesh2d_arcs.rs"
711
doc-scrape-examples = true
712
713
[package.metadata.example.mesh2d_arcs]
714
name = "Arc 2D Meshes"
715
description = "Demonstrates UV-mapping of the circular segment and sector primitives"
716
category = "2D Rendering"
717
wasm = true
718
719
[[example]]
720
name = "mesh2d_manual"
721
path = "examples/2d/mesh2d_manual.rs"
722
doc-scrape-examples = true
723
724
[package.metadata.example.mesh2d_manual]
725
name = "Manual Mesh 2D"
726
description = "Renders a custom mesh \"manually\" with \"mid-level\" renderer apis"
727
category = "2D Rendering"
728
wasm = true
729
730
[[example]]
731
name = "mesh2d_vertex_color_texture"
732
path = "examples/2d/mesh2d_vertex_color_texture.rs"
733
doc-scrape-examples = true
734
735
[package.metadata.example.mesh2d_vertex_color_texture]
736
name = "Mesh 2D With Vertex Colors"
737
description = "Renders a 2d mesh with vertex color attributes"
738
category = "2D Rendering"
739
wasm = true
740
741
[[example]]
742
name = "2d_shapes"
743
path = "examples/2d/2d_shapes.rs"
744
doc-scrape-examples = true
745
746
[package.metadata.example.2d_shapes]
747
name = "2D Shapes"
748
description = "Renders simple 2D primitive shapes like circles and polygons"
749
category = "2D Rendering"
750
wasm = true
751
752
[[example]]
753
name = "custom_gltf_vertex_attribute"
754
path = "examples/2d/custom_gltf_vertex_attribute.rs"
755
doc-scrape-examples = true
756
757
[package.metadata.example.custom_gltf_vertex_attribute]
758
name = "Custom glTF vertex attribute 2D"
759
description = "Renders a glTF mesh in 2D with a custom vertex attribute"
760
category = "2D Rendering"
761
wasm = true
762
763
[[example]]
764
name = "cpu_draw"
765
path = "examples/2d/cpu_draw.rs"
766
doc-scrape-examples = true
767
768
[package.metadata.example.cpu_draw]
769
name = "CPU Drawing"
770
description = "Manually read/write the pixels of a texture"
771
category = "2D Rendering"
772
wasm = true
773
774
[[example]]
775
name = "sprite"
776
path = "examples/2d/sprite.rs"
777
doc-scrape-examples = true
778
779
[package.metadata.example.sprite]
780
name = "Sprite"
781
description = "Renders a sprite"
782
category = "2D Rendering"
783
wasm = true
784
785
[[example]]
786
name = "sprite_animation"
787
path = "examples/2d/sprite_animation.rs"
788
doc-scrape-examples = true
789
790
[package.metadata.example.sprite_animation]
791
name = "Sprite Animation"
792
description = "Animates a sprite in response to an event"
793
category = "2D Rendering"
794
wasm = true
795
796
[[example]]
797
name = "sprite_scale"
798
path = "examples/2d/sprite_scale.rs"
799
doc-scrape-examples = true
800
801
[package.metadata.example.sprite_scale]
802
name = "Sprite Scale"
803
description = "Shows how a sprite can be scaled into a rectangle while keeping the aspect ratio"
804
category = "2D Rendering"
805
wasm = true
806
807
[[example]]
808
name = "sprite_flipping"
809
path = "examples/2d/sprite_flipping.rs"
810
doc-scrape-examples = true
811
812
[package.metadata.example.sprite_flipping]
813
name = "Sprite Flipping"
814
description = "Renders a sprite flipped along an axis"
815
category = "2D Rendering"
816
wasm = true
817
818
[[example]]
819
name = "sprite_sheet"
820
path = "examples/2d/sprite_sheet.rs"
821
doc-scrape-examples = true
822
823
[package.metadata.example.sprite_sheet]
824
name = "Sprite Sheet"
825
description = "Renders an animated sprite"
826
category = "2D Rendering"
827
wasm = true
828
829
[[example]]
830
name = "sprite_tile"
831
path = "examples/2d/sprite_tile.rs"
832
doc-scrape-examples = true
833
834
[package.metadata.example.sprite_tile]
835
name = "Sprite Tile"
836
description = "Renders a sprite tiled in a grid"
837
category = "2D Rendering"
838
wasm = true
839
840
[[example]]
841
name = "sprite_slice"
842
path = "examples/2d/sprite_slice.rs"
843
doc-scrape-examples = true
844
845
[package.metadata.example.sprite_slice]
846
name = "Sprite Slice"
847
description = "Showcases slicing sprites into sections that can be scaled independently via the 9-patch technique"
848
category = "2D Rendering"
849
wasm = true
850
851
[[example]]
852
name = "text2d"
853
path = "examples/2d/text2d.rs"
854
doc-scrape-examples = true
855
856
[package.metadata.example.text2d]
857
name = "Text 2D"
858
description = "Generates text in 2D"
859
category = "2D Rendering"
860
wasm = true
861
862
[[example]]
863
name = "multi_window_text"
864
path = "examples/window/multi_window_text.rs"
865
doc-scrape-examples = true
866
867
[package.metadata.example.multi_window_text]
868
name = "Multi-Window Text"
869
description = "Renders text to multiple windows with different scale factors using both Text and Text2d"
870
category = "2D Rendering"
871
wasm = true
872
873
[[example]]
874
name = "texture_atlas"
875
path = "examples/2d/texture_atlas.rs"
876
doc-scrape-examples = true
877
878
[package.metadata.example.texture_atlas]
879
name = "Texture Atlas"
880
description = "Generates a texture atlas (sprite sheet) from individual sprites"
881
category = "2D Rendering"
882
# Loading asset folders is not supported in Wasm, but required to create the atlas.
883
wasm = false
884
885
[[example]]
886
name = "tilemap_chunk"
887
path = "examples/2d/tilemap_chunk.rs"
888
doc-scrape-examples = true
889
890
[package.metadata.example.tilemap_chunk]
891
name = "Tilemap Chunk"
892
description = "Renders a tilemap chunk"
893
category = "2D Rendering"
894
wasm = true
895
896
[[example]]
897
name = "transparency_2d"
898
path = "examples/2d/transparency_2d.rs"
899
doc-scrape-examples = true
900
901
[package.metadata.example.transparency_2d]
902
name = "Transparency in 2D"
903
description = "Demonstrates transparency in 2d"
904
category = "2D Rendering"
905
wasm = true
906
907
[[example]]
908
name = "mesh2d_alpha_mode"
909
path = "examples/2d/mesh2d_alpha_mode.rs"
910
doc-scrape-examples = true
911
912
[package.metadata.example.mesh2d_alpha_mode]
913
name = "Mesh2d Alpha Mode"
914
description = "Used to test alpha modes with mesh2d"
915
category = "2D Rendering"
916
wasm = true
917
918
[[example]]
919
name = "mesh2d_repeated_texture"
920
path = "examples/2d/mesh2d_repeated_texture.rs"
921
doc-scrape-examples = true
922
923
[package.metadata.example.mesh2d_repeated_texture]
924
name = "Mesh2d Repeated Texture"
925
description = "Showcase of using `uv_transform` on the `ColorMaterial` of a `Mesh2d`"
926
category = "2D Rendering"
927
wasm = true
928
929
[[example]]
930
name = "pixel_grid_snap"
931
path = "examples/2d/pixel_grid_snap.rs"
932
doc-scrape-examples = true
933
934
[package.metadata.example.pixel_grid_snap]
935
name = "Pixel Grid Snapping"
936
description = "Shows how to create graphics that snap to the pixel grid by rendering to a texture in 2D"
937
category = "2D Rendering"
938
wasm = true
939
940
[[example]]
941
name = "bounding_2d"
942
path = "examples/math/bounding_2d.rs"
943
doc-scrape-examples = true
944
945
[package.metadata.example.bounding_2d]
946
name = "Bounding Volume Intersections (2D)"
947
description = "Showcases bounding volumes and intersection tests"
948
category = "Math"
949
wasm = true
950
951
[[example]]
952
name = "wireframe_2d"
953
path = "examples/2d/wireframe_2d.rs"
954
doc-scrape-examples = true
955
956
[package.metadata.example.wireframe_2d]
957
name = "2D Wireframe"
958
description = "Showcases wireframes for 2d meshes"
959
category = "2D Rendering"
960
# PolygonMode::Line wireframes are not supported by WebGL
961
wasm = false
962
963
# 3D Rendering
964
[[example]]
965
name = "3d_scene"
966
path = "examples/3d/3d_scene.rs"
967
doc-scrape-examples = true
968
969
[package.metadata.example.3d_scene]
970
name = "3D Scene"
971
description = "Simple 3D scene with basic shapes and lighting"
972
category = "3D Rendering"
973
wasm = true
974
975
[[example]]
976
name = "3d_shapes"
977
path = "examples/3d/3d_shapes.rs"
978
doc-scrape-examples = true
979
980
[package.metadata.example.3d_shapes]
981
name = "3D Shapes"
982
description = "A scene showcasing the built-in 3D shapes"
983
category = "3D Rendering"
984
wasm = true
985
986
[[example]]
987
name = "3d_viewport_to_world"
988
path = "examples/3d/3d_viewport_to_world.rs"
989
doc-scrape-examples = true
990
991
[package.metadata.example.3d_viewport_to_world]
992
name = "3D Viewport To World"
993
description = "Demonstrates how to use the `Camera::viewport_to_world` method"
994
category = "3D Rendering"
995
wasm = true
996
997
[[example]]
998
name = "animated_material"
999
path = "examples/3d/animated_material.rs"
1000
doc-scrape-examples = true
1001
1002
[package.metadata.example.animated_material]
1003
name = "Animated Material"
1004
description = "Shows how to animate material properties"
1005
category = "3D Rendering"
1006
wasm = true
1007
1008
[[example]]
1009
name = "generate_custom_mesh"
1010
path = "examples/3d/generate_custom_mesh.rs"
1011
doc-scrape-examples = true
1012
1013
[package.metadata.example.generate_custom_mesh]
1014
name = "Generate Custom Mesh"
1015
description = "Simple showcase of how to generate a custom mesh with a custom texture"
1016
category = "3D Rendering"
1017
wasm = true
1018
1019
[[example]]
1020
name = "anti_aliasing"
1021
path = "examples/3d/anti_aliasing.rs"
1022
doc-scrape-examples = true
1023
1024
[package.metadata.example.anti_aliasing]
1025
name = "Anti-aliasing"
1026
description = "Compares different anti-aliasing techniques supported by Bevy"
1027
category = "3D Rendering"
1028
# TAA not supported by WebGL
1029
wasm = false
1030
1031
[[example]]
1032
name = "atmospheric_fog"
1033
path = "examples/3d/atmospheric_fog.rs"
1034
doc-scrape-examples = true
1035
1036
[package.metadata.example.atmospheric_fog]
1037
name = "Atmospheric Fog"
1038
description = "A scene showcasing the atmospheric fog effect"
1039
category = "3D Rendering"
1040
wasm = true
1041
1042
[[example]]
1043
name = "atmosphere"
1044
path = "examples/3d/atmosphere.rs"
1045
doc-scrape-examples = true
1046
1047
[package.metadata.example.atmosphere]
1048
name = "Atmosphere"
1049
description = "A scene showcasing pbr atmospheric scattering"
1050
category = "3D Rendering"
1051
wasm = true
1052
1053
[[example]]
1054
name = "fog"
1055
path = "examples/3d/fog.rs"
1056
doc-scrape-examples = true
1057
1058
[package.metadata.example.fog]
1059
name = "Fog"
1060
description = "A scene showcasing the distance fog effect"
1061
category = "3D Rendering"
1062
wasm = true
1063
1064
[[example]]
1065
name = "auto_exposure"
1066
path = "examples/3d/auto_exposure.rs"
1067
doc-scrape-examples = true
1068
1069
[package.metadata.example.auto_exposure]
1070
name = "Auto Exposure"
1071
description = "A scene showcasing auto exposure"
1072
category = "3D Rendering"
1073
# Requires compute shaders, which are not supported by WebGL.
1074
wasm = false
1075
1076
[[example]]
1077
name = "blend_modes"
1078
path = "examples/3d/blend_modes.rs"
1079
doc-scrape-examples = true
1080
1081
[package.metadata.example.blend_modes]
1082
name = "Blend Modes"
1083
description = "Showcases different blend modes"
1084
category = "3D Rendering"
1085
wasm = true
1086
1087
[[example]]
1088
name = "manual_material"
1089
path = "examples/3d/manual_material.rs"
1090
doc-scrape-examples = true
1091
1092
[package.metadata.example.manual_material]
1093
name = "Manual Material Implementation"
1094
description = "Demonstrates how to implement a material manually using the mid-level render APIs"
1095
category = "3D Rendering"
1096
wasm = true
1097
1098
[[example]]
1099
name = "edit_material_on_gltf"
1100
path = "examples/3d/edit_material_on_gltf.rs"
1101
doc-scrape-examples = true
1102
1103
[package.metadata.example.edit_material_on_gltf]
1104
name = "Edit Gltf Material"
1105
description = "Showcases changing materials of a Gltf after Scene spawn"
1106
category = "3D Rendering"
1107
wasm = true
1108
1109
[[example]]
1110
name = "lighting"
1111
path = "examples/3d/lighting.rs"
1112
doc-scrape-examples = true
1113
1114
[package.metadata.example.lighting]
1115
name = "Lighting"
1116
description = "Illustrates various lighting options in a simple scene"
1117
category = "3D Rendering"
1118
wasm = true
1119
1120
[[example]]
1121
name = "lines"
1122
path = "examples/3d/lines.rs"
1123
doc-scrape-examples = true
1124
1125
[package.metadata.example.lines]
1126
name = "Lines"
1127
description = "Create a custom material to draw 3d lines"
1128
category = "3D Rendering"
1129
# Wasm does not support the `POLYGON_MODE_LINE` feature.
1130
wasm = false
1131
1132
[[example]]
1133
name = "ssao"
1134
path = "examples/3d/ssao.rs"
1135
doc-scrape-examples = true
1136
1137
[package.metadata.example.ssao]
1138
name = "Screen Space Ambient Occlusion"
1139
description = "A scene showcasing screen space ambient occlusion"
1140
category = "3D Rendering"
1141
# Requires compute shaders, which are not supported by WebGL.
1142
wasm = false
1143
1144
[[example]]
1145
name = "spotlight"
1146
path = "examples/3d/spotlight.rs"
1147
doc-scrape-examples = true
1148
1149
[package.metadata.example.spotlight]
1150
name = "Spotlight"
1151
description = "Illustrates spot lights"
1152
category = "3D Rendering"
1153
wasm = true
1154
1155
[[example]]
1156
name = "bloom_3d"
1157
path = "examples/3d/bloom_3d.rs"
1158
doc-scrape-examples = true
1159
1160
[package.metadata.example.bloom_3d]
1161
name = "3D Bloom"
1162
description = "Illustrates bloom configuration using HDR and emissive materials"
1163
category = "3D Rendering"
1164
wasm = true
1165
1166
[[example]]
1167
name = "decal"
1168
path = "examples/3d/decal.rs"
1169
doc-scrape-examples = true
1170
1171
[package.metadata.example.decal]
1172
name = "Decal"
1173
description = "Decal rendering"
1174
category = "3D Rendering"
1175
wasm = true
1176
1177
[[example]]
1178
name = "deferred_rendering"
1179
path = "examples/3d/deferred_rendering.rs"
1180
doc-scrape-examples = true
1181
1182
[package.metadata.example.deferred_rendering]
1183
name = "Deferred Rendering"
1184
description = "Renders meshes with both forward and deferred pipelines"
1185
category = "3D Rendering"
1186
wasm = true
1187
1188
[[example]]
1189
name = "load_gltf"
1190
path = "examples/3d/load_gltf.rs"
1191
doc-scrape-examples = true
1192
1193
[package.metadata.example.load_gltf]
1194
name = "Load glTF"
1195
description = "Loads and renders a glTF file as a scene"
1196
category = "3D Rendering"
1197
wasm = true
1198
1199
[[example]]
1200
name = "load_gltf_extras"
1201
path = "examples/3d/load_gltf_extras.rs"
1202
doc-scrape-examples = true
1203
1204
[package.metadata.example.load_gltf_extras]
1205
name = "Load glTF extras"
1206
description = "Loads and renders a glTF file as a scene, including the gltf extras"
1207
category = "3D Rendering"
1208
wasm = true
1209
1210
[[example]]
1211
name = "query_gltf_primitives"
1212
path = "examples/3d/query_gltf_primitives.rs"
1213
doc-scrape-examples = true
1214
1215
[package.metadata.example.query_gltf_primitives]
1216
name = "Query glTF primitives"
1217
description = "Query primitives in a glTF scene"
1218
category = "3D Rendering"
1219
wasm = true
1220
1221
[[example]]
1222
name = "motion_blur"
1223
path = "examples/3d/motion_blur.rs"
1224
doc-scrape-examples = true
1225
1226
[package.metadata.example.motion_blur]
1227
name = "Motion Blur"
1228
description = "Demonstrates per-pixel motion blur"
1229
category = "3D Rendering"
1230
wasm = true
1231
1232
[[example]]
1233
name = "order_independent_transparency"
1234
path = "examples/3d/order_independent_transparency.rs"
1235
doc-scrape-examples = true
1236
1237
[package.metadata.example.order_independent_transparency]
1238
name = "Order Independent Transparency"
1239
description = "Demonstrates how to use OIT"
1240
category = "3D Rendering"
1241
# Not supported by WebGL
1242
wasm = false
1243
1244
[[example]]
1245
name = "tonemapping"
1246
path = "examples/3d/tonemapping.rs"
1247
doc-scrape-examples = true
1248
1249
[package.metadata.example.tonemapping]
1250
name = "Tonemapping"
1251
description = "Compares tonemapping options"
1252
category = "3D Rendering"
1253
wasm = true
1254
1255
[[example]]
1256
name = "orthographic"
1257
path = "examples/3d/orthographic.rs"
1258
doc-scrape-examples = true
1259
1260
[package.metadata.example.orthographic]
1261
name = "Orthographic View"
1262
description = "Shows how to create a 3D orthographic view (for isometric-look in games or CAD applications)"
1263
category = "3D Rendering"
1264
wasm = true
1265
1266
[[example]]
1267
name = "parenting"
1268
path = "examples/3d/parenting.rs"
1269
doc-scrape-examples = true
1270
1271
[package.metadata.example.parenting]
1272
name = "Parenting"
1273
description = "Demonstrates parent->child relationships and relative transformations"
1274
category = "3D Rendering"
1275
wasm = true
1276
1277
[[example]]
1278
name = "pbr"
1279
path = "examples/3d/pbr.rs"
1280
doc-scrape-examples = true
1281
1282
[package.metadata.example.pbr]
1283
name = "Physically Based Rendering"
1284
description = "Demonstrates use of Physically Based Rendering (PBR) properties"
1285
category = "3D Rendering"
1286
wasm = true
1287
1288
[[example]]
1289
name = "parallax_mapping"
1290
path = "examples/3d/parallax_mapping.rs"
1291
doc-scrape-examples = true
1292
1293
[package.metadata.example.parallax_mapping]
1294
name = "Parallax Mapping"
1295
description = "Demonstrates use of a normal map and depth map for parallax mapping"
1296
category = "3D Rendering"
1297
wasm = true
1298
1299
[[example]]
1300
name = "render_to_texture"
1301
path = "examples/3d/render_to_texture.rs"
1302
doc-scrape-examples = true
1303
1304
[package.metadata.example.render_to_texture]
1305
name = "Render to Texture"
1306
description = "Shows how to render to a texture, useful for mirrors, UI, or exporting images"
1307
category = "3D Rendering"
1308
wasm = true
1309
1310
[[example]]
1311
name = "shadow_biases"
1312
path = "examples/3d/shadow_biases.rs"
1313
doc-scrape-examples = true
1314
1315
[package.metadata.example.shadow_biases]
1316
name = "Shadow Biases"
1317
description = "Demonstrates how shadow biases affect shadows in a 3d scene"
1318
category = "3D Rendering"
1319
wasm = true
1320
1321
[[example]]
1322
name = "shadow_caster_receiver"
1323
path = "examples/3d/shadow_caster_receiver.rs"
1324
doc-scrape-examples = true
1325
1326
[package.metadata.example.shadow_caster_receiver]
1327
name = "Shadow Caster and Receiver"
1328
description = "Demonstrates how to prevent meshes from casting/receiving shadows in a 3d scene"
1329
category = "3D Rendering"
1330
wasm = true
1331
1332
[[example]]
1333
name = "skybox"
1334
path = "examples/3d/skybox.rs"
1335
doc-scrape-examples = true
1336
1337
[package.metadata.example.skybox]
1338
name = "Skybox"
1339
description = "Load a cubemap texture onto a cube like a skybox and cycle through different compressed texture formats."
1340
category = "3D Rendering"
1341
wasm = true
1342
1343
[[example]]
1344
name = "solari"
1345
path = "examples/3d/solari.rs"
1346
doc-scrape-examples = true
1347
required-features = ["bevy_solari", "https"]
1348
1349
[package.metadata.example.solari]
1350
name = "Solari"
1351
description = "Demonstrates realtime dynamic raytraced lighting using Bevy Solari."
1352
category = "3D Rendering"
1353
wasm = false # Raytracing is not supported on the web
1354
1355
[[example]]
1356
name = "spherical_area_lights"
1357
path = "examples/3d/spherical_area_lights.rs"
1358
doc-scrape-examples = true
1359
1360
[package.metadata.example.spherical_area_lights]
1361
name = "Spherical Area Lights"
1362
description = "Demonstrates how point light radius values affect light behavior"
1363
category = "3D Rendering"
1364
wasm = true
1365
1366
[[example]]
1367
name = "split_screen"
1368
path = "examples/3d/split_screen.rs"
1369
doc-scrape-examples = true
1370
1371
[package.metadata.example.split_screen]
1372
name = "Split Screen"
1373
description = "Demonstrates how to render two cameras to the same window to accomplish \"split screen\""
1374
category = "3D Rendering"
1375
wasm = true
1376
1377
[[example]]
1378
name = "texture"
1379
path = "examples/3d/texture.rs"
1380
doc-scrape-examples = true
1381
1382
[package.metadata.example.texture]
1383
name = "Texture"
1384
description = "Shows configuration of texture materials"
1385
category = "3D Rendering"
1386
wasm = true
1387
1388
[[example]]
1389
name = "transparency_3d"
1390
path = "examples/3d/transparency_3d.rs"
1391
doc-scrape-examples = true
1392
1393
[package.metadata.example.transparency_3d]
1394
name = "Transparency in 3D"
1395
description = "Demonstrates transparency in 3d"
1396
category = "3D Rendering"
1397
wasm = true
1398
1399
[[example]]
1400
name = "transmission"
1401
path = "examples/3d/transmission.rs"
1402
doc-scrape-examples = true
1403
1404
[package.metadata.example.transmission]
1405
name = "Transmission"
1406
description = "Showcases light transmission in the PBR material"
1407
category = "3D Rendering"
1408
wasm = true
1409
1410
[[example]]
1411
name = "two_passes"
1412
path = "examples/3d/two_passes.rs"
1413
doc-scrape-examples = true
1414
1415
[package.metadata.example.two_passes]
1416
name = "Two Passes"
1417
description = "Renders two 3d passes to the same window from different perspectives"
1418
category = "3D Rendering"
1419
wasm = true
1420
1421
[[example]]
1422
name = "update_gltf_scene"
1423
path = "examples/3d/update_gltf_scene.rs"
1424
doc-scrape-examples = true
1425
1426
[package.metadata.example.update_gltf_scene]
1427
name = "Update glTF Scene"
1428
description = "Update a scene from a glTF file, either by spawning the scene as a child of another entity, or by accessing the entities of the scene"
1429
category = "3D Rendering"
1430
wasm = true
1431
1432
[[example]]
1433
name = "vertex_colors"
1434
path = "examples/3d/vertex_colors.rs"
1435
doc-scrape-examples = true
1436
1437
[package.metadata.example.vertex_colors]
1438
name = "Vertex Colors"
1439
description = "Shows the use of vertex colors"
1440
category = "3D Rendering"
1441
wasm = true
1442
1443
[[example]]
1444
name = "wireframe"
1445
path = "examples/3d/wireframe.rs"
1446
doc-scrape-examples = true
1447
1448
[package.metadata.example.wireframe]
1449
name = "Wireframe"
1450
description = "Showcases wireframe rendering"
1451
category = "3D Rendering"
1452
# Not supported on WebGL
1453
wasm = false
1454
1455
[[example]]
1456
name = "irradiance_volumes"
1457
path = "examples/3d/irradiance_volumes.rs"
1458
doc-scrape-examples = true
1459
1460
[package.metadata.example.irradiance_volumes]
1461
name = "Irradiance Volumes"
1462
description = "Demonstrates irradiance volumes"
1463
category = "3D Rendering"
1464
# On WebGL and WebGPU, the number of texture bindings is too low
1465
# See <https://github.com/bevyengine/bevy/issues/11885>
1466
wasm = false
1467
1468
[[example]]
1469
name = "meshlet"
1470
path = "examples/3d/meshlet.rs"
1471
doc-scrape-examples = true
1472
required-features = ["meshlet", "https"]
1473
1474
[package.metadata.example.meshlet]
1475
name = "Meshlet"
1476
description = "Meshlet rendering for dense high-poly scenes (experimental)"
1477
category = "3D Rendering"
1478
# Requires compute shaders and WGPU extensions, not supported by WebGL nor WebGPU.
1479
wasm = false
1480
1481
[[example]]
1482
name = "mesh_ray_cast"
1483
path = "examples/3d/mesh_ray_cast.rs"
1484
doc-scrape-examples = true
1485
1486
[package.metadata.example.mesh_ray_cast]
1487
name = "Mesh Ray Cast"
1488
description = "Demonstrates ray casting with the `MeshRayCast` system parameter"
1489
category = "3D Rendering"
1490
wasm = true
1491
1492
[[example]]
1493
name = "lightmaps"
1494
path = "examples/3d/lightmaps.rs"
1495
doc-scrape-examples = true
1496
1497
[package.metadata.example.lightmaps]
1498
name = "Lightmaps"
1499
description = "Rendering a scene with baked lightmaps"
1500
category = "3D Rendering"
1501
wasm = true
1502
1503
[[example]]
1504
name = "no_prepass"
1505
path = "tests/3d/no_prepass.rs"
1506
doc-scrape-examples = true
1507
1508
[package.metadata.example.no_prepass]
1509
hidden = true
1510
1511
# Animation
1512
[[example]]
1513
name = "animation_events"
1514
path = "examples/animation/animation_events.rs"
1515
doc-scrape-examples = true
1516
1517
[package.metadata.example.animation_events]
1518
name = "Animation Events"
1519
description = "Demonstrate how to use animation events"
1520
category = "Animation"
1521
wasm = true
1522
1523
[[example]]
1524
name = "animated_mesh"
1525
path = "examples/animation/animated_mesh.rs"
1526
doc-scrape-examples = true
1527
1528
[package.metadata.example.animated_mesh]
1529
name = "Animated Mesh"
1530
description = "Plays an animation on a skinned glTF model of a fox"
1531
category = "Animation"
1532
wasm = true
1533
1534
[[example]]
1535
name = "animated_mesh_control"
1536
path = "examples/animation/animated_mesh_control.rs"
1537
doc-scrape-examples = true
1538
1539
[package.metadata.example.animated_mesh_control]
1540
name = "Animated Mesh Control"
1541
description = "Plays an animation from a skinned glTF with keyboard controls"
1542
category = "Animation"
1543
wasm = true
1544
1545
[[example]]
1546
name = "animated_mesh_events"
1547
path = "examples/animation/animated_mesh_events.rs"
1548
doc-scrape-examples = true
1549
1550
[package.metadata.example.animated_mesh_events]
1551
name = "Animated Mesh Events"
1552
description = "Plays an animation from a skinned glTF with events"
1553
category = "Animation"
1554
wasm = true
1555
1556
[[example]]
1557
name = "animation_graph"
1558
path = "examples/animation/animation_graph.rs"
1559
doc-scrape-examples = true
1560
1561
[package.metadata.example.animation_graph]
1562
name = "Animation Graph"
1563
description = "Blends multiple animations together with a graph"
1564
category = "Animation"
1565
wasm = true
1566
1567
[[example]]
1568
name = "morph_targets"
1569
path = "examples/animation/morph_targets.rs"
1570
doc-scrape-examples = true
1571
1572
[package.metadata.example.morph_targets]
1573
name = "Morph Targets"
1574
description = "Plays an animation from a glTF file with meshes with morph targets"
1575
category = "Animation"
1576
wasm = true
1577
1578
[[example]]
1579
name = "animated_transform"
1580
path = "examples/animation/animated_transform.rs"
1581
doc-scrape-examples = true
1582
1583
[package.metadata.example.animated_transform]
1584
name = "Animated Transform"
1585
description = "Create and play an animation defined by code that operates on the `Transform` component"
1586
category = "Animation"
1587
wasm = true
1588
1589
[[example]]
1590
name = "color_animation"
1591
path = "examples/animation/color_animation.rs"
1592
doc-scrape-examples = true
1593
1594
[package.metadata.example.color_animation]
1595
name = "Color animation"
1596
description = "Demonstrates how to animate colors using mixing and splines in different color spaces"
1597
category = "Animation"
1598
wasm = true
1599
1600
[[example]]
1601
name = "eased_motion"
1602
path = "examples/animation/eased_motion.rs"
1603
doc-scrape-examples = true
1604
1605
[package.metadata.example.eased_motion]
1606
name = "Eased Motion"
1607
description = "Demonstrates the application of easing curves to animate an object"
1608
category = "Animation"
1609
wasm = true
1610
1611
[[example]]
1612
name = "easing_functions"
1613
path = "examples/animation/easing_functions.rs"
1614
doc-scrape-examples = true
1615
1616
[package.metadata.example.easing_functions]
1617
name = "Easing Functions"
1618
description = "Showcases the built-in easing functions"
1619
category = "Animation"
1620
wasm = true
1621
1622
[[example]]
1623
name = "custom_skinned_mesh"
1624
path = "examples/animation/custom_skinned_mesh.rs"
1625
doc-scrape-examples = true
1626
1627
[package.metadata.example.custom_skinned_mesh]
1628
name = "Custom Skinned Mesh"
1629
description = "Skinned mesh example with mesh and joints data defined in code"
1630
category = "Animation"
1631
wasm = true
1632
1633
[[example]]
1634
name = "gltf_skinned_mesh"
1635
path = "examples/animation/gltf_skinned_mesh.rs"
1636
doc-scrape-examples = true
1637
1638
[package.metadata.example.gltf_skinned_mesh]
1639
name = "glTF Skinned Mesh"
1640
description = "Skinned mesh example with mesh and joints data loaded from a glTF file"
1641
category = "Animation"
1642
wasm = true
1643
1644
# Application
1645
[[example]]
1646
name = "custom_loop"
1647
path = "examples/app/custom_loop.rs"
1648
doc-scrape-examples = true
1649
1650
[package.metadata.example.custom_loop]
1651
name = "Custom Loop"
1652
description = "Demonstrates how to create a custom runner (to update an app manually)"
1653
category = "Application"
1654
# Doesn't render anything, doesn't create a canvas
1655
wasm = false
1656
1657
[[example]]
1658
name = "drag_and_drop"
1659
path = "examples/app/drag_and_drop.rs"
1660
doc-scrape-examples = true
1661
1662
[package.metadata.example.drag_and_drop]
1663
name = "Drag and Drop"
1664
description = "An example that shows how to handle drag and drop in an app"
1665
category = "Application"
1666
# Browser drag and drop is not supported
1667
wasm = false
1668
1669
[[example]]
1670
name = "empty"
1671
path = "examples/app/empty.rs"
1672
doc-scrape-examples = true
1673
1674
[package.metadata.example.empty]
1675
name = "Empty"
1676
description = "An empty application (does nothing)"
1677
category = "Application"
1678
# Doesn't render anything, doesn't create a canvas
1679
wasm = false
1680
1681
[[example]]
1682
name = "empty_defaults"
1683
path = "examples/app/empty_defaults.rs"
1684
doc-scrape-examples = true
1685
1686
[package.metadata.example.empty_defaults]
1687
name = "Empty with Defaults"
1688
description = "An empty application with default plugins"
1689
category = "Application"
1690
wasm = true
1691
1692
[[example]]
1693
name = "headless"
1694
path = "examples/app/headless.rs"
1695
doc-scrape-examples = true
1696
required-features = ["bevy_log"]
1697
1698
[package.metadata.example.headless]
1699
name = "Headless"
1700
description = "An application that runs without default plugins"
1701
category = "Application"
1702
# Doesn't render anything, doesn't create a canvas
1703
wasm = false
1704
1705
[[example]]
1706
name = "logs"
1707
path = "examples/app/logs.rs"
1708
doc-scrape-examples = true
1709
1710
[package.metadata.example.logs]
1711
name = "Logs"
1712
description = "Illustrate how to use generate log output"
1713
category = "Application"
1714
wasm = true
1715
1716
[[example]]
1717
name = "log_layers"
1718
path = "examples/app/log_layers.rs"
1719
doc-scrape-examples = true
1720
1721
[package.metadata.example.log_layers]
1722
name = "Log layers"
1723
description = "Illustrate how to add custom log layers"
1724
category = "Application"
1725
# Accesses `time`, which is not available on the web
1726
# Also doesn't render anything
1727
wasm = false
1728
1729
[[example]]
1730
name = "log_layers_ecs"
1731
path = "examples/app/log_layers_ecs.rs"
1732
doc-scrape-examples = true
1733
1734
[package.metadata.example.log_layers_ecs]
1735
name = "Advanced log layers"
1736
description = "Illustrate how to transfer data between log layers and Bevy's ECS"
1737
category = "Application"
1738
# Doesn't render anything, doesn't create a canvas
1739
wasm = false
1740
1741
[[example]]
1742
name = "plugin"
1743
path = "examples/app/plugin.rs"
1744
doc-scrape-examples = true
1745
1746
[package.metadata.example.plugin]
1747
name = "Plugin"
1748
description = "Demonstrates the creation and registration of a custom plugin"
1749
category = "Application"
1750
wasm = true
1751
1752
[[example]]
1753
name = "plugin_group"
1754
path = "examples/app/plugin_group.rs"
1755
doc-scrape-examples = true
1756
1757
[package.metadata.example.plugin_group]
1758
name = "Plugin Group"
1759
description = "Demonstrates the creation and registration of a custom plugin group"
1760
category = "Application"
1761
wasm = true
1762
1763
[[example]]
1764
name = "return_after_run"
1765
path = "examples/app/return_after_run.rs"
1766
doc-scrape-examples = true
1767
1768
[package.metadata.example.return_after_run]
1769
name = "Return after Run"
1770
description = "Show how to return to main after the Bevy app has exited"
1771
category = "Application"
1772
wasm = false
1773
1774
[[example]]
1775
name = "thread_pool_resources"
1776
path = "examples/app/thread_pool_resources.rs"
1777
doc-scrape-examples = true
1778
1779
[package.metadata.example.thread_pool_resources]
1780
name = "Thread Pool Resources"
1781
description = "Creates and customizes the internal thread pool"
1782
category = "Application"
1783
wasm = false
1784
1785
[[example]]
1786
name = "no_renderer"
1787
path = "examples/app/no_renderer.rs"
1788
doc-scrape-examples = true
1789
1790
[package.metadata.example.no_renderer]
1791
name = "No Renderer"
1792
description = "An application that runs with default plugins and displays an empty window, but without an actual renderer"
1793
category = "Application"
1794
wasm = false
1795
1796
[[example]]
1797
name = "headless_renderer"
1798
path = "examples/app/headless_renderer.rs"
1799
doc-scrape-examples = true
1800
1801
[package.metadata.example.headless_renderer]
1802
name = "Headless Renderer"
1803
description = "An application that runs with no window, but renders into image file"
1804
category = "Application"
1805
wasm = false
1806
1807
[[example]]
1808
name = "without_winit"
1809
path = "examples/app/without_winit.rs"
1810
doc-scrape-examples = true
1811
1812
[package.metadata.example.without_winit]
1813
name = "Without Winit"
1814
description = "Create an application without winit (runs single time, no event loop)"
1815
category = "Application"
1816
wasm = false
1817
1818
# Assets
1819
[[example]]
1820
name = "alter_mesh"
1821
path = "examples/asset/alter_mesh.rs"
1822
doc-scrape-examples = true
1823
1824
[package.metadata.example.alter_mesh]
1825
name = "Alter Mesh"
1826
description = "Shows how to modify the underlying asset of a Mesh after spawning."
1827
category = "Assets"
1828
wasm = false
1829
1830
[[example]]
1831
name = "alter_sprite"
1832
path = "examples/asset/alter_sprite.rs"
1833
doc-scrape-examples = true
1834
1835
[package.metadata.example.alter_sprite]
1836
name = "Alter Sprite"
1837
description = "Shows how to modify texture assets after spawning."
1838
category = "Assets"
1839
wasm = false
1840
1841
[[example]]
1842
name = "asset_loading"
1843
path = "examples/asset/asset_loading.rs"
1844
doc-scrape-examples = true
1845
1846
[package.metadata.example.asset_loading]
1847
name = "Asset Loading"
1848
description = "Demonstrates various methods to load assets"
1849
category = "Assets"
1850
wasm = false
1851
1852
[[example]]
1853
name = "asset_settings"
1854
path = "examples/asset/asset_settings.rs"
1855
doc-scrape-examples = true
1856
1857
[package.metadata.example.asset_settings]
1858
name = "Asset Settings"
1859
description = "Demonstrates various methods of applying settings when loading an asset"
1860
category = "Assets"
1861
wasm = false
1862
1863
[[example]]
1864
name = "asset_decompression"
1865
path = "examples/asset/asset_decompression.rs"
1866
doc-scrape-examples = true
1867
1868
[package.metadata.example.asset_decompression]
1869
name = "Asset Decompression"
1870
description = "Demonstrates loading a compressed asset"
1871
category = "Assets"
1872
wasm = false
1873
1874
[[example]]
1875
name = "custom_asset"
1876
path = "examples/asset/custom_asset.rs"
1877
doc-scrape-examples = true
1878
1879
[package.metadata.example.custom_asset]
1880
name = "Custom Asset"
1881
description = "Implements a custom asset loader"
1882
category = "Assets"
1883
wasm = true
1884
1885
[[example]]
1886
name = "custom_asset_reader"
1887
path = "examples/asset/custom_asset_reader.rs"
1888
doc-scrape-examples = true
1889
1890
[package.metadata.example.custom_asset_reader]
1891
name = "Custom Asset IO"
1892
description = "Implements a custom AssetReader"
1893
category = "Assets"
1894
# Incompatible with the asset path patching of the example-showcase tool
1895
wasm = false
1896
1897
[[example]]
1898
name = "embedded_asset"
1899
path = "examples/asset/embedded_asset.rs"
1900
doc-scrape-examples = true
1901
1902
[package.metadata.example.embedded_asset]
1903
name = "Embedded Asset"
1904
description = "Embed an asset in the application binary and load it"
1905
category = "Assets"
1906
wasm = true
1907
1908
[[example]]
1909
name = "extra_asset_source"
1910
path = "examples/asset/extra_source.rs"
1911
doc-scrape-examples = true
1912
1913
[package.metadata.example.extra_asset_source]
1914
name = "Extra Asset Source"
1915
description = "Load an asset from a non-standard asset source"
1916
category = "Assets"
1917
# Uses non-standard asset path
1918
wasm = false
1919
1920
[[example]]
1921
name = "web_asset"
1922
path = "examples/asset/web_asset.rs"
1923
doc-scrape-examples = true
1924
required-features = ["https"]
1925
1926
[package.metadata.example.web_asset]
1927
name = "Web Asset"
1928
description = "Load an asset from the web"
1929
category = "Assets"
1930
wasm = true
1931
1932
[[example]]
1933
name = "hot_asset_reloading"
1934
path = "examples/asset/hot_asset_reloading.rs"
1935
doc-scrape-examples = true
1936
required-features = ["file_watcher"]
1937
1938
[package.metadata.example.hot_asset_reloading]
1939
name = "Hot Reloading of Assets"
1940
description = "Demonstrates automatic reloading of assets when modified on disk"
1941
category = "Assets"
1942
wasm = false
1943
1944
[[example]]
1945
name = "asset_processing"
1946
path = "examples/asset/processing/asset_processing.rs"
1947
doc-scrape-examples = true
1948
required-features = ["file_watcher", "asset_processor"]
1949
1950
[package.metadata.example.asset_processing]
1951
name = "Asset Processing"
1952
description = "Demonstrates how to process and load custom assets"
1953
category = "Assets"
1954
wasm = false
1955
1956
[[example]]
1957
name = "repeated_texture"
1958
path = "examples/asset/repeated_texture.rs"
1959
doc-scrape-examples = true
1960
1961
[package.metadata.example.repeated_texture]
1962
name = "Repeated texture configuration"
1963
description = "How to configure the texture to repeat instead of the default clamp to edges"
1964
category = "Assets"
1965
wasm = true
1966
1967
# Assets
1968
[[example]]
1969
name = "multi_asset_sync"
1970
path = "examples/asset/multi_asset_sync.rs"
1971
doc-scrape-examples = true
1972
1973
[package.metadata.example.multi_asset_sync]
1974
name = "Multi-asset synchronization"
1975
description = "Demonstrates how to wait for multiple assets to be loaded."
1976
category = "Assets"
1977
wasm = true
1978
1979
# Async Tasks
1980
[[example]]
1981
name = "async_compute"
1982
path = "examples/async_tasks/async_compute.rs"
1983
doc-scrape-examples = true
1984
1985
[package.metadata.example.async_compute]
1986
name = "Async Compute"
1987
description = "How to use `AsyncComputeTaskPool` to complete longer running tasks"
1988
category = "Async Tasks"
1989
wasm = false
1990
1991
[[example]]
1992
name = "external_source_external_thread"
1993
path = "examples/async_tasks/external_source_external_thread.rs"
1994
doc-scrape-examples = true
1995
1996
[package.metadata.example.external_source_external_thread]
1997
name = "External Source of Data on an External Thread"
1998
description = "How to use an external thread to run an infinite task and communicate with a channel"
1999
category = "Async Tasks"
2000
wasm = false
2001
2002
# Audio
2003
[[example]]
2004
name = "audio"
2005
path = "examples/audio/audio.rs"
2006
doc-scrape-examples = true
2007
2008
[package.metadata.example.audio]
2009
name = "Audio"
2010
description = "Shows how to load and play an audio file"
2011
category = "Audio"
2012
wasm = true
2013
2014
[[example]]
2015
name = "audio_control"
2016
path = "examples/audio/audio_control.rs"
2017
doc-scrape-examples = true
2018
2019
[package.metadata.example.audio_control]
2020
name = "Audio Control"
2021
description = "Shows how to load and play an audio file, and control how it's played"
2022
category = "Audio"
2023
wasm = true
2024
2025
[[example]]
2026
name = "decodable"
2027
path = "examples/audio/decodable.rs"
2028
doc-scrape-examples = true
2029
2030
[package.metadata.example.decodable]
2031
name = "Decodable"
2032
description = "Shows how to create and register a custom audio source by implementing the `Decodable` type."
2033
category = "Audio"
2034
wasm = true
2035
2036
[[example]]
2037
name = "soundtrack"
2038
path = "examples/audio/soundtrack.rs"
2039
doc-scrape-examples = true
2040
2041
[package.metadata.example.soundtrack]
2042
name = "Soundtrack"
2043
description = "Shows how to play different soundtracks based on game state"
2044
category = "Audio"
2045
wasm = true
2046
2047
[[example]]
2048
name = "spatial_audio_2d"
2049
path = "examples/audio/spatial_audio_2d.rs"
2050
doc-scrape-examples = true
2051
2052
[package.metadata.example.spatial_audio_2d]
2053
name = "Spatial Audio 2D"
2054
description = "Shows how to play spatial audio, and moving the emitter in 2D"
2055
category = "Audio"
2056
wasm = true
2057
2058
[[example]]
2059
name = "spatial_audio_3d"
2060
path = "examples/audio/spatial_audio_3d.rs"
2061
doc-scrape-examples = true
2062
2063
[package.metadata.example.spatial_audio_3d]
2064
name = "Spatial Audio 3D"
2065
description = "Shows how to play spatial audio, and moving the emitter in 3D"
2066
category = "Audio"
2067
wasm = true
2068
2069
[[example]]
2070
name = "pitch"
2071
path = "examples/audio/pitch.rs"
2072
doc-scrape-examples = true
2073
2074
[package.metadata.example.pitch]
2075
name = "Pitch"
2076
description = "Shows how to directly play a simple pitch"
2077
category = "Audio"
2078
wasm = true
2079
2080
# Diagnostics
2081
[[example]]
2082
name = "log_diagnostics"
2083
path = "examples/diagnostics/log_diagnostics.rs"
2084
doc-scrape-examples = true
2085
2086
[package.metadata.example.log_diagnostics]
2087
name = "Log Diagnostics"
2088
description = "Add a plugin that logs diagnostics, like frames per second (FPS), to the console"
2089
category = "Diagnostics"
2090
wasm = true
2091
2092
[[example]]
2093
name = "custom_diagnostic"
2094
path = "examples/diagnostics/custom_diagnostic.rs"
2095
doc-scrape-examples = true
2096
2097
[package.metadata.example.custom_diagnostic]
2098
name = "Custom Diagnostic"
2099
description = "Shows how to create a custom diagnostic"
2100
category = "Diagnostics"
2101
wasm = true
2102
2103
[[example]]
2104
name = "enabling_disabling_diagnostic"
2105
path = "examples/diagnostics/enabling_disabling_diagnostic.rs"
2106
doc-scrape-examples = true
2107
2108
[package.metadata.example.enabling_disabling_diagnostic]
2109
name = "Enabling/disabling diagnostic"
2110
description = "Shows how to disable/re-enable a Diagnostic during runtime"
2111
category = "Diagnostics"
2112
wasm = true
2113
2114
# ECS (Entity Component System)
2115
[[example]]
2116
name = "ecs_guide"
2117
path = "examples/ecs/ecs_guide.rs"
2118
doc-scrape-examples = true
2119
2120
[package.metadata.example.ecs_guide]
2121
name = "ECS Guide"
2122
description = "Full guide to Bevy's ECS"
2123
category = "ECS (Entity Component System)"
2124
wasm = false
2125
2126
[[example]]
2127
name = "change_detection"
2128
path = "examples/ecs/change_detection.rs"
2129
doc-scrape-examples = true
2130
required-features = ["track_location"]
2131
2132
[package.metadata.example.change_detection]
2133
name = "Change Detection"
2134
description = "Change detection on components and resources"
2135
category = "ECS (Entity Component System)"
2136
wasm = false
2137
2138
[[example]]
2139
name = "component_hooks"
2140
path = "examples/ecs/component_hooks.rs"
2141
doc-scrape-examples = true
2142
2143
[package.metadata.example.component_hooks]
2144
name = "Component Hooks"
2145
description = "Define component hooks to manage component lifecycle events"
2146
category = "ECS (Entity Component System)"
2147
wasm = false
2148
2149
[[example]]
2150
name = "custom_schedule"
2151
path = "examples/ecs/custom_schedule.rs"
2152
doc-scrape-examples = true
2153
2154
[package.metadata.example.custom_schedule]
2155
name = "Custom Schedule"
2156
description = "Demonstrates how to add custom schedules"
2157
category = "ECS (Entity Component System)"
2158
wasm = false
2159
2160
[[example]]
2161
name = "custom_query_param"
2162
path = "examples/ecs/custom_query_param.rs"
2163
doc-scrape-examples = true
2164
2165
[package.metadata.example.custom_query_param]
2166
name = "Custom Query Parameters"
2167
description = "Groups commonly used compound queries and query filters into a single type"
2168
category = "ECS (Entity Component System)"
2169
wasm = false
2170
2171
[[example]]
2172
name = "dynamic"
2173
path = "examples/ecs/dynamic.rs"
2174
doc-scrape-examples = true
2175
required-features = ["debug"]
2176
2177
[package.metadata.example.dynamic]
2178
name = "Dynamic ECS"
2179
description = "Dynamically create components, spawn entities with those components and query those components"
2180
category = "ECS (Entity Component System)"
2181
wasm = false
2182
2183
[[example]]
2184
name = "event"
2185
path = "examples/ecs/event.rs"
2186
doc-scrape-examples = true
2187
2188
[package.metadata.example.event]
2189
name = "Event"
2190
description = "Illustrates event creation, activation, and reception"
2191
category = "ECS (Entity Component System)"
2192
wasm = false
2193
2194
[[example]]
2195
name = "send_and_receive_events"
2196
path = "examples/ecs/send_and_receive_events.rs"
2197
doc-scrape-examples = true
2198
2199
[package.metadata.example.send_and_receive_events]
2200
name = "Send and receive events"
2201
description = "Demonstrates how to send and receive events of the same type in a single system"
2202
category = "ECS (Entity Component System)"
2203
wasm = false
2204
2205
[[example]]
2206
name = "entity_disabling"
2207
path = "examples/ecs/entity_disabling.rs"
2208
doc-scrape-examples = true
2209
2210
[package.metadata.example.entity_disabling]
2211
name = "Entity disabling"
2212
description = "Demonstrates how to hide entities from the ECS without deleting them"
2213
category = "ECS (Entity Component System)"
2214
wasm = true
2215
2216
[[example]]
2217
name = "fixed_timestep"
2218
path = "examples/ecs/fixed_timestep.rs"
2219
doc-scrape-examples = true
2220
2221
[package.metadata.example.fixed_timestep]
2222
name = "Fixed Timestep"
2223
description = "Shows how to create systems that run every fixed timestep, rather than every tick"
2224
category = "ECS (Entity Component System)"
2225
wasm = false
2226
2227
[[example]]
2228
name = "generic_system"
2229
path = "examples/ecs/generic_system.rs"
2230
doc-scrape-examples = true
2231
2232
[package.metadata.example.generic_system]
2233
name = "Generic System"
2234
description = "Shows how to create systems that can be reused with different types"
2235
category = "ECS (Entity Component System)"
2236
wasm = false
2237
2238
[[example]]
2239
name = "hierarchy"
2240
path = "examples/ecs/hierarchy.rs"
2241
doc-scrape-examples = true
2242
2243
[package.metadata.example.hierarchy]
2244
name = "Hierarchy"
2245
description = "Creates a hierarchy of parents and children entities"
2246
category = "ECS (Entity Component System)"
2247
wasm = false
2248
2249
[[example]]
2250
name = "immutable_components"
2251
path = "examples/ecs/immutable_components.rs"
2252
doc-scrape-examples = true
2253
2254
[package.metadata.example.immutable_components]
2255
name = "Immutable Components"
2256
description = "Demonstrates the creation and utility of immutable components"
2257
category = "ECS (Entity Component System)"
2258
wasm = false
2259
2260
[[example]]
2261
name = "iter_combinations"
2262
path = "examples/ecs/iter_combinations.rs"
2263
doc-scrape-examples = true
2264
2265
[package.metadata.example.iter_combinations]
2266
name = "Iter Combinations"
2267
description = "Shows how to iterate over combinations of query results"
2268
category = "ECS (Entity Component System)"
2269
wasm = true
2270
2271
[[example]]
2272
name = "one_shot_systems"
2273
path = "examples/ecs/one_shot_systems.rs"
2274
doc-scrape-examples = true
2275
2276
[package.metadata.example.one_shot_systems]
2277
name = "One Shot Systems"
2278
description = "Shows how to flexibly run systems without scheduling them"
2279
category = "ECS (Entity Component System)"
2280
wasm = false
2281
2282
[[example]]
2283
name = "parallel_query"
2284
path = "examples/ecs/parallel_query.rs"
2285
doc-scrape-examples = true
2286
2287
[package.metadata.example.parallel_query]
2288
name = "Parallel Query"
2289
description = "Illustrates parallel queries with `ParallelIterator`"
2290
category = "ECS (Entity Component System)"
2291
wasm = false
2292
2293
[[example]]
2294
name = "relationships"
2295
path = "examples/ecs/relationships.rs"
2296
doc-scrape-examples = true
2297
2298
[package.metadata.example.relationships]
2299
name = "Relationships"
2300
description = "Define and work with custom relationships between entities"
2301
category = "ECS (Entity Component System)"
2302
wasm = false
2303
2304
[[example]]
2305
name = "removal_detection"
2306
path = "examples/ecs/removal_detection.rs"
2307
doc-scrape-examples = true
2308
2309
[package.metadata.example.removal_detection]
2310
name = "Removal Detection"
2311
description = "Query for entities that had a specific component removed earlier in the current frame"
2312
category = "ECS (Entity Component System)"
2313
wasm = false
2314
2315
[[example]]
2316
name = "run_conditions"
2317
path = "examples/ecs/run_conditions.rs"
2318
doc-scrape-examples = true
2319
2320
[package.metadata.example.run_conditions]
2321
name = "Run Conditions"
2322
description = "Run systems only when one or multiple conditions are met"
2323
category = "ECS (Entity Component System)"
2324
wasm = false
2325
2326
[[example]]
2327
name = "fallible_params"
2328
path = "examples/ecs/fallible_params.rs"
2329
doc-scrape-examples = true
2330
2331
[package.metadata.example.fallible_params]
2332
name = "Fallible System Parameters"
2333
description = "Systems are skipped if their parameters cannot be acquired"
2334
category = "ECS (Entity Component System)"
2335
wasm = false
2336
2337
[[example]]
2338
name = "error_handling"
2339
path = "examples/ecs/error_handling.rs"
2340
doc-scrape-examples = true
2341
required-features = ["bevy_mesh_picking_backend"]
2342
2343
[package.metadata.example.error_handling]
2344
name = "Error handling"
2345
description = "How to return and handle errors across the ECS"
2346
category = "ECS (Entity Component System)"
2347
wasm = false
2348
2349
[[example]]
2350
name = "startup_system"
2351
path = "examples/ecs/startup_system.rs"
2352
doc-scrape-examples = true
2353
2354
[package.metadata.example.startup_system]
2355
name = "Startup System"
2356
description = "Demonstrates a startup system (one that runs once when the app starts up)"
2357
category = "ECS (Entity Component System)"
2358
wasm = false
2359
2360
[[example]]
2361
name = "states"
2362
path = "examples/state/states.rs"
2363
doc-scrape-examples = true
2364
required-features = ["bevy_dev_tools"]
2365
2366
[package.metadata.example.states]
2367
name = "States"
2368
description = "Illustrates how to use States to control transitioning from a Menu state to an InGame state."
2369
category = "State"
2370
wasm = false
2371
2372
[[example]]
2373
name = "sub_states"
2374
path = "examples/state/sub_states.rs"
2375
doc-scrape-examples = true
2376
required-features = ["bevy_dev_tools"]
2377
2378
[package.metadata.example.sub_states]
2379
name = "Sub States"
2380
description = "Using Sub States for hierarchical state handling."
2381
category = "State"
2382
wasm = false
2383
2384
[[example]]
2385
name = "computed_states"
2386
path = "examples/state/computed_states.rs"
2387
doc-scrape-examples = true
2388
required-features = ["bevy_dev_tools"]
2389
2390
[package.metadata.example.computed_states]
2391
name = "Computed States"
2392
description = "Advanced state patterns using Computed States."
2393
category = "State"
2394
wasm = false
2395
2396
[[example]]
2397
name = "custom_transitions"
2398
path = "examples/state/custom_transitions.rs"
2399
doc-scrape-examples = true
2400
required-features = ["bevy_dev_tools"]
2401
2402
[package.metadata.example.custom_transitions]
2403
name = "Custom State Transition Behavior"
2404
description = "Creating and working with custom state transition schedules."
2405
category = "State"
2406
wasm = false
2407
2408
[[example]]
2409
name = "system_piping"
2410
path = "examples/ecs/system_piping.rs"
2411
doc-scrape-examples = true
2412
2413
[package.metadata.example.system_piping]
2414
name = "System Piping"
2415
description = "Pipe the output of one system into a second, allowing you to handle any errors gracefully"
2416
category = "ECS (Entity Component System)"
2417
wasm = false
2418
2419
[[example]]
2420
name = "state_scoped"
2421
path = "examples/ecs/state_scoped.rs"
2422
doc-scrape-examples = true
2423
2424
[package.metadata.example.state_scoped]
2425
name = "State Scoped"
2426
description = "Shows how to spawn entities that are automatically despawned either when entering or exiting specific game states."
2427
category = "ECS (Entity Component System)"
2428
wasm = false
2429
2430
[[example]]
2431
name = "system_closure"
2432
path = "examples/ecs/system_closure.rs"
2433
doc-scrape-examples = true
2434
2435
[package.metadata.example.system_closure]
2436
name = "System Closure"
2437
description = "Show how to use closures as systems, and how to configure `Local` variables by capturing external state"
2438
category = "ECS (Entity Component System)"
2439
wasm = false
2440
2441
[[example]]
2442
name = "system_param"
2443
path = "examples/ecs/system_param.rs"
2444
doc-scrape-examples = true
2445
2446
[package.metadata.example.system_param]
2447
name = "System Parameter"
2448
description = "Illustrates creating custom system parameters with `SystemParam`"
2449
category = "ECS (Entity Component System)"
2450
wasm = false
2451
2452
[[example]]
2453
name = "system_stepping"
2454
path = "examples/ecs/system_stepping.rs"
2455
doc-scrape-examples = true
2456
required-features = ["bevy_debug_stepping"]
2457
2458
[package.metadata.example.system_stepping]
2459
name = "System Stepping"
2460
description = "Demonstrate stepping through systems in order of execution."
2461
category = "ECS (Entity Component System)"
2462
wasm = false
2463
2464
# Time
2465
[[example]]
2466
name = "time"
2467
path = "examples/time/time.rs"
2468
doc-scrape-examples = true
2469
2470
[package.metadata.example.time]
2471
name = "Time handling"
2472
description = "Explains how Time is handled in ECS"
2473
category = "Time"
2474
wasm = false
2475
2476
[[example]]
2477
name = "virtual_time"
2478
path = "examples/time/virtual_time.rs"
2479
doc-scrape-examples = true
2480
2481
[package.metadata.example.virtual_time]
2482
name = "Virtual time"
2483
description = "Shows how `Time<Virtual>` can be used to pause, resume, slow down and speed up a game."
2484
category = "Time"
2485
wasm = false
2486
2487
[[example]]
2488
name = "timers"
2489
path = "examples/time/timers.rs"
2490
doc-scrape-examples = true
2491
2492
[package.metadata.example.timers]
2493
name = "Timers"
2494
description = "Illustrates ticking `Timer` resources inside systems and handling their state"
2495
category = "Time"
2496
wasm = false
2497
2498
2499
# Games
2500
[[example]]
2501
name = "alien_cake_addict"
2502
path = "examples/games/alien_cake_addict.rs"
2503
doc-scrape-examples = true
2504
2505
[package.metadata.example.alien_cake_addict]
2506
name = "Alien Cake Addict"
2507
description = "Eat the cakes. Eat them all. An example 3D game"
2508
category = "Games"
2509
wasm = true
2510
2511
[[example]]
2512
name = "breakout"
2513
path = "examples/games/breakout.rs"
2514
doc-scrape-examples = true
2515
2516
[package.metadata.example.breakout]
2517
name = "Breakout"
2518
description = "An implementation of the classic game \"Breakout\"."
2519
category = "Games"
2520
wasm = true
2521
2522
[[example]]
2523
name = "contributors"
2524
path = "examples/games/contributors.rs"
2525
doc-scrape-examples = true
2526
2527
[package.metadata.example.contributors]
2528
name = "Contributors"
2529
description = "Displays each contributor as a bouncy bevy-ball!"
2530
category = "Games"
2531
wasm = true
2532
2533
[[example]]
2534
name = "desk_toy"
2535
path = "examples/games/desk_toy.rs"
2536
doc-scrape-examples = true
2537
2538
[package.metadata.example.desk_toy]
2539
name = "Desk Toy"
2540
description = "Bevy logo as a desk toy using transparent windows! Now with Googly Eyes!"
2541
category = "Games"
2542
wasm = false
2543
2544
[[example]]
2545
name = "game_menu"
2546
path = "examples/games/game_menu.rs"
2547
doc-scrape-examples = true
2548
2549
[package.metadata.example.game_menu]
2550
name = "Game Menu"
2551
description = "A simple game menu"
2552
category = "Games"
2553
wasm = true
2554
2555
[[example]]
2556
name = "loading_screen"
2557
path = "examples/games/loading_screen.rs"
2558
doc-scrape-examples = true
2559
2560
[package.metadata.example.loading_screen]
2561
name = "Loading Screen"
2562
description = "Demonstrates how to create a loading screen that waits for all assets to be loaded and render pipelines to be compiled."
2563
category = "Games"
2564
wasm = true
2565
2566
# Input
2567
[[example]]
2568
name = "char_input_events"
2569
path = "examples/input/char_input_events.rs"
2570
doc-scrape-examples = true
2571
2572
[package.metadata.example.char_input_events]
2573
name = "Char Input Events"
2574
description = "Prints out all chars as they are inputted"
2575
category = "Input"
2576
wasm = false
2577
2578
[[example]]
2579
name = "gamepad_input"
2580
path = "examples/input/gamepad_input.rs"
2581
doc-scrape-examples = true
2582
2583
[package.metadata.example.gamepad_input]
2584
name = "Gamepad Input"
2585
description = "Shows handling of gamepad input, connections, and disconnections"
2586
category = "Input"
2587
wasm = false
2588
2589
[[example]]
2590
name = "gamepad_input_events"
2591
path = "examples/input/gamepad_input_events.rs"
2592
doc-scrape-examples = true
2593
2594
[package.metadata.example.gamepad_input_events]
2595
name = "Gamepad Input Events"
2596
description = "Iterates and prints gamepad input and connection events"
2597
category = "Input"
2598
wasm = false
2599
2600
[[example]]
2601
name = "gamepad_rumble"
2602
path = "examples/input/gamepad_rumble.rs"
2603
doc-scrape-examples = true
2604
2605
[package.metadata.example.gamepad_rumble]
2606
name = "Gamepad Rumble"
2607
description = "Shows how to rumble a gamepad using force feedback"
2608
category = "Input"
2609
wasm = false
2610
2611
[[example]]
2612
name = "keyboard_input"
2613
path = "examples/input/keyboard_input.rs"
2614
doc-scrape-examples = true
2615
2616
[package.metadata.example.keyboard_input]
2617
name = "Keyboard Input"
2618
description = "Demonstrates handling a key press/release"
2619
category = "Input"
2620
wasm = false
2621
2622
[[example]]
2623
name = "keyboard_modifiers"
2624
path = "examples/input/keyboard_modifiers.rs"
2625
doc-scrape-examples = true
2626
2627
[package.metadata.example.keyboard_modifiers]
2628
name = "Keyboard Modifiers"
2629
description = "Demonstrates using key modifiers (ctrl, shift)"
2630
category = "Input"
2631
wasm = false
2632
2633
[[example]]
2634
name = "keyboard_input_events"
2635
path = "examples/input/keyboard_input_events.rs"
2636
doc-scrape-examples = true
2637
2638
[package.metadata.example.keyboard_input_events]
2639
name = "Keyboard Input Events"
2640
description = "Prints out all keyboard events"
2641
category = "Input"
2642
wasm = false
2643
2644
[[example]]
2645
name = "mouse_input"
2646
path = "examples/input/mouse_input.rs"
2647
doc-scrape-examples = true
2648
2649
[package.metadata.example.mouse_input]
2650
name = "Mouse Input"
2651
description = "Demonstrates handling a mouse button press/release"
2652
category = "Input"
2653
wasm = false
2654
2655
[[example]]
2656
name = "mouse_input_events"
2657
path = "examples/input/mouse_input_events.rs"
2658
doc-scrape-examples = true
2659
2660
[package.metadata.example.mouse_input_events]
2661
name = "Mouse Input Events"
2662
description = "Prints out all mouse events (buttons, movement, etc.)"
2663
category = "Input"
2664
wasm = false
2665
2666
[[example]]
2667
name = "mouse_grab"
2668
path = "examples/input/mouse_grab.rs"
2669
doc-scrape-examples = true
2670
2671
[package.metadata.example.mouse_grab]
2672
name = "Mouse Grab"
2673
description = "Demonstrates how to grab the mouse, locking the cursor to the app's screen"
2674
category = "Input"
2675
wasm = false
2676
2677
[[example]]
2678
name = "touch_input"
2679
path = "examples/input/touch_input.rs"
2680
doc-scrape-examples = true
2681
2682
[package.metadata.example.touch_input]
2683
name = "Touch Input"
2684
description = "Displays touch presses, releases, and cancels"
2685
category = "Input"
2686
wasm = false
2687
2688
[[example]]
2689
name = "touch_input_events"
2690
path = "examples/input/touch_input_events.rs"
2691
doc-scrape-examples = true
2692
2693
[package.metadata.example.touch_input_events]
2694
name = "Touch Input Events"
2695
description = "Prints out all touch inputs"
2696
category = "Input"
2697
wasm = false
2698
2699
[[example]]
2700
name = "text_input"
2701
path = "examples/input/text_input.rs"
2702
doc-scrape-examples = true
2703
2704
[package.metadata.example.text_input]
2705
name = "Text Input"
2706
description = "Simple text input with IME support"
2707
category = "Input"
2708
wasm = false
2709
2710
# Reflection
2711
[[example]]
2712
name = "reflection"
2713
path = "examples/reflection/reflection.rs"
2714
doc-scrape-examples = true
2715
2716
[package.metadata.example.reflection]
2717
name = "Reflection"
2718
description = "Demonstrates how reflection in Bevy provides a way to dynamically interact with Rust types"
2719
category = "Reflection"
2720
wasm = false
2721
2722
[[example]]
2723
name = "custom_attributes"
2724
path = "examples/reflection/custom_attributes.rs"
2725
doc-scrape-examples = true
2726
2727
[package.metadata.example.custom_attributes]
2728
name = "Custom Attributes"
2729
description = "Registering and accessing custom attributes on reflected types"
2730
category = "Reflection"
2731
wasm = false
2732
2733
[[example]]
2734
name = "dynamic_types"
2735
path = "examples/reflection/dynamic_types.rs"
2736
doc-scrape-examples = true
2737
2738
[package.metadata.example.dynamic_types]
2739
name = "Dynamic Types"
2740
description = "How dynamic types are used with reflection"
2741
category = "Reflection"
2742
wasm = false
2743
2744
[[example]]
2745
name = "function_reflection"
2746
path = "examples/reflection/function_reflection.rs"
2747
doc-scrape-examples = true
2748
required-features = ["reflect_functions"]
2749
2750
[package.metadata.example.function_reflection]
2751
name = "Function Reflection"
2752
description = "Demonstrates how functions can be called dynamically using reflection"
2753
category = "Reflection"
2754
wasm = false
2755
2756
[[example]]
2757
name = "generic_reflection"
2758
path = "examples/reflection/generic_reflection.rs"
2759
doc-scrape-examples = true
2760
2761
[package.metadata.example.generic_reflection]
2762
name = "Generic Reflection"
2763
description = "Registers concrete instances of generic types that may be used with reflection"
2764
category = "Reflection"
2765
wasm = false
2766
2767
[[example]]
2768
name = "reflection_types"
2769
path = "examples/reflection/reflection_types.rs"
2770
doc-scrape-examples = true
2771
2772
[package.metadata.example.reflection_types]
2773
name = "Reflection Types"
2774
description = "Illustrates the various reflection types available"
2775
category = "Reflection"
2776
wasm = false
2777
2778
[[example]]
2779
name = "type_data"
2780
path = "examples/reflection/type_data.rs"
2781
doc-scrape-examples = true
2782
2783
[package.metadata.example.type_data]
2784
name = "Type Data"
2785
description = "Demonstrates how to create and use type data"
2786
category = "Reflection"
2787
wasm = false
2788
2789
[[example]]
2790
name = "auto_register_static"
2791
path = "examples/reflection/auto_register_static/src/lib.rs"
2792
doc-scrape-examples = true
2793
2794
[package.metadata.example.auto_register_static]
2795
name = "Automatic types registration"
2796
description = "Demonstrates how to set up automatic reflect types registration for platforms without `inventory` support"
2797
category = "Reflection"
2798
wasm = false
2799
2800
# Scene
2801
[[example]]
2802
name = "scene"
2803
path = "examples/scene/scene.rs"
2804
doc-scrape-examples = true
2805
2806
[package.metadata.example.scene]
2807
name = "Scene"
2808
description = "Demonstrates loading from and saving scenes to files"
2809
category = "Scene"
2810
wasm = false
2811
2812
# Shaders
2813
[[package.metadata.example_category]]
2814
name = "Shaders"
2815
description = """
2816
These examples demonstrate how to implement different shaders in user code.
2817
2818
A shader in its most common usage is a small program that is run by the GPU per-vertex in a mesh (a vertex shader) or per-affected-screen-fragment (a fragment shader.) The GPU executes these programs in a highly parallel way.
2819
2820
There are also compute shaders which are used for more general processing leveraging the GPU's parallelism.
2821
"""
2822
2823
[[example]]
2824
name = "shader_defs"
2825
path = "examples/shader/shader_defs.rs"
2826
doc-scrape-examples = true
2827
2828
[package.metadata.example.shader_defs]
2829
name = "Shader Defs"
2830
description = "A shader that uses \"shaders defs\" (a bevy tool to selectively toggle parts of a shader)"
2831
category = "Shaders"
2832
wasm = true
2833
2834
[[example]]
2835
name = "shader_material"
2836
path = "examples/shader/shader_material.rs"
2837
doc-scrape-examples = true
2838
2839
[package.metadata.example.shader_material]
2840
name = "Material"
2841
description = "A shader and a material that uses it"
2842
category = "Shaders"
2843
wasm = true
2844
2845
[[example]]
2846
name = "shader_material_2d"
2847
path = "examples/shader/shader_material_2d.rs"
2848
doc-scrape-examples = true
2849
2850
[package.metadata.example.shader_material_2d]
2851
name = "Material"
2852
description = "A shader and a material that uses it on a 2d mesh"
2853
category = "Shaders"
2854
wasm = true
2855
2856
[[example]]
2857
name = "extended_material"
2858
path = "examples/shader/extended_material.rs"
2859
doc-scrape-examples = true
2860
2861
[package.metadata.example.extended_material]
2862
name = "Extended Material"
2863
description = "A custom shader that builds on the standard material"
2864
category = "Shaders"
2865
wasm = true
2866
2867
[[example]]
2868
name = "shader_prepass"
2869
path = "examples/shader/shader_prepass.rs"
2870
doc-scrape-examples = true
2871
2872
[package.metadata.example.shader_prepass]
2873
name = "Material Prepass"
2874
description = "A shader that uses the various textures generated by the prepass"
2875
category = "Shaders"
2876
wasm = false
2877
2878
[[example]]
2879
name = "shader_material_screenspace_texture"
2880
path = "examples/shader/shader_material_screenspace_texture.rs"
2881
doc-scrape-examples = true
2882
2883
[package.metadata.example.shader_material_screenspace_texture]
2884
name = "Material - Screenspace Texture"
2885
description = "A shader that samples a texture with view-independent UV coordinates"
2886
category = "Shaders"
2887
wasm = true
2888
2889
[[example]]
2890
name = "shader_material_glsl"
2891
path = "examples/shader/shader_material_glsl.rs"
2892
doc-scrape-examples = true
2893
required-features = ["shader_format_glsl"]
2894
2895
[package.metadata.example.shader_material_glsl]
2896
name = "Material - GLSL"
2897
description = "A shader that uses the GLSL shading language"
2898
category = "Shaders"
2899
wasm = true
2900
2901
[[example]]
2902
name = "shader_material_wesl"
2903
path = "examples/shader/shader_material_wesl.rs"
2904
doc-scrape-examples = true
2905
required-features = ["shader_format_wesl"]
2906
2907
[package.metadata.example.shader_material_wesl]
2908
name = "Material - WESL"
2909
description = "A shader that uses WESL"
2910
category = "Shaders"
2911
wasm = true
2912
2913
[[example]]
2914
name = "automatic_instancing"
2915
path = "examples/shader/automatic_instancing.rs"
2916
doc-scrape-examples = true
2917
2918
[package.metadata.example.automatic_instancing]
2919
name = "Instancing"
2920
description = "Shows that multiple instances of a cube are automatically instanced in one draw call"
2921
category = "Shaders"
2922
wasm = true
2923
2924
[[example]]
2925
name = "animate_shader"
2926
path = "examples/shader/animate_shader.rs"
2927
doc-scrape-examples = true
2928
2929
[package.metadata.example.animate_shader]
2930
name = "Animated"
2931
description = "A shader that uses dynamic data like the time since startup"
2932
category = "Shaders"
2933
wasm = true
2934
2935
[[example]]
2936
name = "compute_shader_game_of_life"
2937
path = "examples/shader/compute_shader_game_of_life.rs"
2938
doc-scrape-examples = true
2939
2940
[package.metadata.example.compute_shader_game_of_life]
2941
name = "Compute - Game of Life"
2942
description = "A compute shader that simulates Conway's Game of Life"
2943
category = "Shaders"
2944
wasm = false
2945
2946
[[example]]
2947
name = "gpu_readback"
2948
path = "examples/shader/gpu_readback.rs"
2949
doc-scrape-examples = true
2950
2951
[package.metadata.example.gpu_readback]
2952
name = "GPU readback"
2953
description = "A very simple compute shader that writes to a buffer that is read by the cpu"
2954
category = "Shaders"
2955
wasm = false
2956
2957
[[example]]
2958
name = "array_texture"
2959
path = "examples/shader/array_texture.rs"
2960
doc-scrape-examples = true
2961
2962
[package.metadata.example.array_texture]
2963
name = "Array Texture"
2964
description = "A shader that shows how to reuse the core bevy PBR shading functionality in a custom material that obtains the base color from an array texture."
2965
category = "Shaders"
2966
wasm = true
2967
2968
[[example]]
2969
name = "storage_buffer"
2970
path = "examples/shader/storage_buffer.rs"
2971
doc-scrape-examples = true
2972
2973
[package.metadata.example.storage_buffer]
2974
name = "Storage Buffer"
2975
description = "A shader that shows how to bind a storage buffer using a custom material."
2976
category = "Shaders"
2977
wasm = true
2978
2979
# Shaders advanced
2980
[[package.metadata.example_category]]
2981
name = "Shaders - advanced"
2982
description = """
2983
These examples demonstrate how to use the lower level rendering apis exposed from bevy.
2984
2985
These are generally simplified examples of bevy's own rendering infrastructure.
2986
"""
2987
2988
[[example]]
2989
name = "custom_vertex_attribute"
2990
path = "examples/shader_advanced/custom_vertex_attribute.rs"
2991
doc-scrape-examples = true
2992
2993
[package.metadata.example.custom_vertex_attribute]
2994
name = "Custom Vertex Attribute"
2995
description = "A shader that reads a mesh's custom vertex attribute"
2996
category = "Shaders"
2997
wasm = true
2998
2999
[[example]]
3000
name = "custom_post_processing"
3001
path = "examples/shader_advanced/custom_post_processing.rs"
3002
doc-scrape-examples = true
3003
3004
[package.metadata.example.custom_post_processing]
3005
name = "Post Processing - Custom Render Pass"
3006
description = "A custom post processing effect, using a custom render pass that runs after the main pass"
3007
category = "Shaders"
3008
wasm = true
3009
3010
[[example]]
3011
name = "custom_shader_instancing"
3012
path = "examples/shader_advanced/custom_shader_instancing.rs"
3013
doc-scrape-examples = true
3014
3015
[package.metadata.example.custom_shader_instancing]
3016
name = "Instancing"
3017
description = "A shader that renders a mesh multiple times in one draw call using low level rendering api"
3018
category = "Shaders"
3019
wasm = true
3020
3021
[[example]]
3022
name = "custom_render_phase"
3023
path = "examples/shader_advanced/custom_render_phase.rs"
3024
doc-scrape-examples = true
3025
3026
[package.metadata.example.custom_render_phase]
3027
name = "Custom Render Phase"
3028
description = "Shows how to make a complete render phase"
3029
category = "Shaders"
3030
wasm = true
3031
3032
[[example]]
3033
name = "texture_binding_array"
3034
path = "examples/shader_advanced/texture_binding_array.rs"
3035
doc-scrape-examples = true
3036
3037
[package.metadata.example.texture_binding_array]
3038
name = "Texture Binding Array (Bindless Textures)"
3039
description = "A shader that shows how to bind and sample multiple textures as a binding array (a.k.a. bindless textures)."
3040
category = "Shaders"
3041
wasm = false
3042
3043
3044
[[example]]
3045
name = "specialized_mesh_pipeline"
3046
path = "examples/shader_advanced/specialized_mesh_pipeline.rs"
3047
doc-scrape-examples = true
3048
3049
[package.metadata.example.specialized_mesh_pipeline]
3050
name = "Specialized Mesh Pipeline"
3051
description = "Demonstrates how to write a specialized mesh pipeline"
3052
category = "Shaders"
3053
wasm = true
3054
3055
# Stress tests
3056
[[package.metadata.example_category]]
3057
name = "Stress Tests"
3058
description = """
3059
These examples are used to test the performance and stability of various parts of the engine in an isolated way.
3060
3061
Due to the focus on performance it's recommended to run the stress tests in release mode:
3062
3063
```sh
3064
cargo run --release --example <example name>
3065
```
3066
"""
3067
3068
[[example]]
3069
name = "bevymark"
3070
path = "examples/stress_tests/bevymark.rs"
3071
doc-scrape-examples = true
3072
3073
[package.metadata.example.bevymark]
3074
name = "Bevymark"
3075
description = "A heavy sprite rendering workload to benchmark your system with Bevy"
3076
category = "Stress Tests"
3077
wasm = true
3078
3079
[[example]]
3080
name = "many_animated_sprites"
3081
path = "examples/stress_tests/many_animated_sprites.rs"
3082
doc-scrape-examples = true
3083
3084
[package.metadata.example.many_animated_sprites]
3085
name = "Many Animated Sprites"
3086
description = "Displays many animated sprites in a grid arrangement with slight offsets to their animation timers. Used for performance testing."
3087
category = "Stress Tests"
3088
wasm = true
3089
3090
[[example]]
3091
name = "many_buttons"
3092
path = "examples/stress_tests/many_buttons.rs"
3093
doc-scrape-examples = true
3094
3095
[package.metadata.example.many_buttons]
3096
name = "Many Buttons"
3097
description = "Test rendering of many UI elements"
3098
category = "Stress Tests"
3099
wasm = true
3100
3101
[[example]]
3102
name = "many_gradients"
3103
path = "examples/stress_tests/many_gradients.rs"
3104
doc-scrape-examples = true
3105
3106
[package.metadata.example.many_gradients]
3107
name = "Many Gradients"
3108
description = "Stress test for gradient rendering performance"
3109
category = "Stress Tests"
3110
wasm = true
3111
3112
[[example]]
3113
name = "many_cameras_lights"
3114
path = "examples/stress_tests/many_cameras_lights.rs"
3115
doc-scrape-examples = true
3116
3117
[package.metadata.example.many_cameras_lights]
3118
name = "Many Cameras & Lights"
3119
description = "Test rendering of many cameras and lights"
3120
category = "Stress Tests"
3121
wasm = true
3122
3123
[[example]]
3124
name = "many_components"
3125
path = "examples/stress_tests/many_components.rs"
3126
doc-scrape-examples = true
3127
3128
[package.metadata.example.many_components]
3129
name = "Many Components (and Entities and Systems)"
3130
description = "Test large ECS systems"
3131
category = "Stress Tests"
3132
wasm = false
3133
3134
[[example]]
3135
name = "many_cubes"
3136
path = "examples/stress_tests/many_cubes.rs"
3137
doc-scrape-examples = true
3138
3139
[package.metadata.example.many_cubes]
3140
name = "Many Cubes"
3141
description = "Simple benchmark to test per-entity draw overhead. Run with the `sphere` argument to test frustum culling"
3142
category = "Stress Tests"
3143
wasm = true
3144
3145
[[example]]
3146
name = "many_gizmos"
3147
path = "examples/stress_tests/many_gizmos.rs"
3148
doc-scrape-examples = true
3149
3150
[package.metadata.example.many_gizmos]
3151
name = "Many Gizmos"
3152
description = "Test rendering of many gizmos"
3153
category = "Stress Tests"
3154
wasm = true
3155
3156
[[example]]
3157
name = "many_foxes"
3158
path = "examples/stress_tests/many_foxes.rs"
3159
doc-scrape-examples = true
3160
3161
[package.metadata.example.many_foxes]
3162
name = "Many Foxes"
3163
description = "Loads an animated fox model and spawns lots of them. Good for testing skinned mesh performance. Takes an unsigned integer argument for the number of foxes to spawn. Defaults to 1000"
3164
category = "Stress Tests"
3165
wasm = true
3166
3167
[[example]]
3168
name = "many_glyphs"
3169
path = "examples/stress_tests/many_glyphs.rs"
3170
doc-scrape-examples = true
3171
3172
[package.metadata.example.many_glyphs]
3173
name = "Many Glyphs"
3174
description = "Simple benchmark to test text rendering."
3175
category = "Stress Tests"
3176
wasm = true
3177
3178
[[example]]
3179
name = "many_lights"
3180
path = "examples/stress_tests/many_lights.rs"
3181
doc-scrape-examples = true
3182
3183
[package.metadata.example.many_lights]
3184
name = "Many Lights"
3185
description = "Simple benchmark to test rendering many point lights. Run with `WGPU_SETTINGS_PRIO=webgl2` to restrict to uniform buffers and max 256 lights"
3186
category = "Stress Tests"
3187
wasm = true
3188
3189
[[example]]
3190
name = "many_sprites"
3191
path = "examples/stress_tests/many_sprites.rs"
3192
doc-scrape-examples = true
3193
3194
[package.metadata.example.many_sprites]
3195
name = "Many Sprites"
3196
description = "Displays many sprites in a grid arrangement! Used for performance testing. Use `--colored` to enable color tinted sprites."
3197
category = "Stress Tests"
3198
wasm = true
3199
3200
[[example]]
3201
name = "many_text2d"
3202
path = "examples/stress_tests/many_text2d.rs"
3203
doc-scrape-examples = true
3204
3205
[package.metadata.example.many_text2d]
3206
name = "Many Text2d"
3207
description = "Displays many Text2d! Used for performance testing."
3208
category = "Stress Tests"
3209
wasm = true
3210
3211
[[example]]
3212
name = "many_materials"
3213
path = "examples/stress_tests/many_materials.rs"
3214
doc-scrape-examples = true
3215
3216
[package.metadata.example.many_materials]
3217
name = "Many Animated Materials"
3218
description = "Benchmark to test rendering many animated materials"
3219
category = "Stress Tests"
3220
wasm = true
3221
3222
[[example]]
3223
name = "transform_hierarchy"
3224
path = "examples/stress_tests/transform_hierarchy.rs"
3225
doc-scrape-examples = true
3226
3227
[package.metadata.example.transform_hierarchy]
3228
name = "Transform Hierarchy"
3229
description = "Various test cases for hierarchy and transform propagation performance"
3230
category = "Stress Tests"
3231
wasm = false
3232
3233
[[example]]
3234
name = "text_pipeline"
3235
path = "examples/stress_tests/text_pipeline.rs"
3236
doc-scrape-examples = true
3237
3238
[package.metadata.example.text_pipeline]
3239
name = "Text Pipeline"
3240
description = "Text Pipeline benchmark"
3241
category = "Stress Tests"
3242
wasm = false
3243
3244
# Tools
3245
[[example]]
3246
name = "scene_viewer"
3247
path = "examples/tools/scene_viewer/main.rs"
3248
doc-scrape-examples = true
3249
3250
[package.metadata.example.scene_viewer]
3251
name = "Scene Viewer"
3252
description = "A simple way to view glTF models with Bevy. Just run `cargo run --release --example scene_viewer /path/to/model.gltf#Scene0`, replacing the path as appropriate. With no arguments it will load the FieldHelmet glTF model from the repository assets subdirectory"
3253
category = "Tools"
3254
wasm = true
3255
3256
[[example]]
3257
name = "gamepad_viewer"
3258
path = "examples/tools/gamepad_viewer.rs"
3259
doc-scrape-examples = true
3260
3261
[package.metadata.example.gamepad_viewer]
3262
name = "Gamepad Viewer"
3263
description = "Shows a visualization of gamepad buttons, sticks, and triggers"
3264
category = "Tools"
3265
wasm = true
3266
3267
[[example]]
3268
name = "nondeterministic_system_order"
3269
path = "examples/ecs/nondeterministic_system_order.rs"
3270
doc-scrape-examples = true
3271
3272
[package.metadata.example.nondeterministic_system_order]
3273
name = "Nondeterministic System Order"
3274
description = "Systems run in parallel, but their order isn't always deterministic. Here's how to detect and fix this."
3275
category = "ECS (Entity Component System)"
3276
wasm = false
3277
3278
[[example]]
3279
name = "observers"
3280
path = "examples/ecs/observers.rs"
3281
doc-scrape-examples = true
3282
3283
[package.metadata.example.observers]
3284
name = "Observers"
3285
description = "Demonstrates observers that react to events (both built-in life-cycle events and custom events)"
3286
category = "ECS (Entity Component System)"
3287
wasm = true
3288
3289
[[example]]
3290
name = "observer_propagation"
3291
path = "examples/ecs/observer_propagation.rs"
3292
doc-scrape-examples = true
3293
3294
[package.metadata.example.observer_propagation]
3295
name = "Observer Propagation"
3296
description = "Demonstrates event propagation with observers"
3297
category = "ECS (Entity Component System)"
3298
wasm = true
3299
3300
[[example]]
3301
name = "3d_rotation"
3302
path = "examples/transforms/3d_rotation.rs"
3303
doc-scrape-examples = true
3304
3305
[package.metadata.example.3d_rotation]
3306
name = "3D Rotation"
3307
description = "Illustrates how to (constantly) rotate an object around an axis"
3308
category = "Transforms"
3309
wasm = true
3310
3311
[[example]]
3312
name = "align"
3313
path = "examples/transforms/align.rs"
3314
doc-scrape-examples = true
3315
3316
[package.metadata.example.align]
3317
name = "Alignment"
3318
description = "A demonstration of Transform's axis-alignment feature"
3319
category = "Transforms"
3320
wasm = true
3321
3322
[[example]]
3323
name = "scale"
3324
path = "examples/transforms/scale.rs"
3325
doc-scrape-examples = true
3326
3327
[package.metadata.example.scale]
3328
name = "Scale"
3329
description = "Illustrates how to scale an object in each direction"
3330
category = "Transforms"
3331
wasm = true
3332
3333
[[example]]
3334
name = "transform"
3335
path = "examples/transforms/transform.rs"
3336
doc-scrape-examples = true
3337
3338
[package.metadata.example.transform]
3339
name = "Transform"
3340
description = "Shows multiple transformations of objects"
3341
category = "Transforms"
3342
wasm = true
3343
3344
[[example]]
3345
name = "translation"
3346
path = "examples/transforms/translation.rs"
3347
doc-scrape-examples = true
3348
3349
[package.metadata.example.translation]
3350
name = "Translation"
3351
description = "Illustrates how to move an object along an axis"
3352
category = "Transforms"
3353
wasm = true
3354
3355
# UI (User Interface)
3356
[[example]]
3357
name = "borders"
3358
path = "examples/ui/borders.rs"
3359
doc-scrape-examples = true
3360
3361
[package.metadata.example.borders]
3362
name = "Borders"
3363
description = "Demonstrates how to create a node with a border"
3364
category = "UI (User Interface)"
3365
wasm = true
3366
3367
[[example]]
3368
name = "box_shadow"
3369
path = "examples/ui/box_shadow.rs"
3370
doc-scrape-examples = true
3371
3372
[package.metadata.example.box_shadow]
3373
name = "Box Shadow"
3374
description = "Demonstrates how to create a node with a shadow"
3375
category = "UI (User Interface)"
3376
wasm = true
3377
3378
[[example]]
3379
name = "button"
3380
path = "examples/ui/button.rs"
3381
doc-scrape-examples = true
3382
3383
[package.metadata.example.button]
3384
name = "Button"
3385
description = "Illustrates creating and updating a button"
3386
category = "UI (User Interface)"
3387
wasm = true
3388
3389
[[example]]
3390
name = "ui_drag_and_drop"
3391
path = "examples/ui/ui_drag_and_drop.rs"
3392
doc-scrape-examples = true
3393
3394
[package.metadata.example.ui_drag_and_drop]
3395
name = "UI Drag and Drop"
3396
description = "Demonstrates dragging and dropping UI nodes"
3397
category = "UI (User Interface)"
3398
wasm = true
3399
3400
[[example]]
3401
name = "display_and_visibility"
3402
path = "examples/ui/display_and_visibility.rs"
3403
doc-scrape-examples = true
3404
3405
[package.metadata.example.display_and_visibility]
3406
name = "Display and Visibility"
3407
description = "Demonstrates how Display and Visibility work in the UI."
3408
category = "UI (User Interface)"
3409
wasm = true
3410
3411
[[example]]
3412
name = "window_fallthrough"
3413
path = "examples/ui/window_fallthrough.rs"
3414
doc-scrape-examples = true
3415
3416
[package.metadata.example.window_fallthrough]
3417
name = "Window Fallthrough"
3418
description = "Illustrates how to access `winit::window::Window`'s `hittest` functionality."
3419
category = "UI (User Interface)"
3420
wasm = false
3421
3422
[[example]]
3423
name = "font_atlas_debug"
3424
path = "examples/ui/font_atlas_debug.rs"
3425
doc-scrape-examples = true
3426
3427
[package.metadata.example.font_atlas_debug]
3428
name = "Font Atlas Debug"
3429
description = "Illustrates how FontAtlases are populated (used to optimize text rendering internally)"
3430
category = "UI (User Interface)"
3431
wasm = true
3432
3433
[[example]]
3434
name = "overflow"
3435
path = "examples/ui/overflow.rs"
3436
doc-scrape-examples = true
3437
3438
[package.metadata.example.overflow]
3439
name = "Overflow"
3440
description = "Simple example demonstrating overflow behavior"
3441
category = "UI (User Interface)"
3442
wasm = true
3443
3444
[[example]]
3445
name = "overflow_clip_margin"
3446
path = "examples/ui/overflow_clip_margin.rs"
3447
doc-scrape-examples = true
3448
3449
[package.metadata.example.overflow_clip_margin]
3450
name = "Overflow Clip Margin"
3451
description = "Simple example demonstrating the OverflowClipMargin style property"
3452
category = "UI (User Interface)"
3453
wasm = true
3454
3455
3456
[[example]]
3457
name = "overflow_debug"
3458
path = "examples/ui/overflow_debug.rs"
3459
doc-scrape-examples = true
3460
3461
[package.metadata.example.overflow_debug]
3462
name = "Overflow and Clipping Debug"
3463
description = "An example to debug overflow and clipping behavior"
3464
category = "UI (User Interface)"
3465
wasm = true
3466
3467
[[example]]
3468
name = "relative_cursor_position"
3469
path = "examples/ui/relative_cursor_position.rs"
3470
doc-scrape-examples = true
3471
3472
[package.metadata.example.relative_cursor_position]
3473
name = "Relative Cursor Position"
3474
description = "Showcases the RelativeCursorPosition component"
3475
category = "UI (User Interface)"
3476
wasm = true
3477
3478
[[example]]
3479
name = "render_ui_to_texture"
3480
path = "examples/ui/render_ui_to_texture.rs"
3481
doc-scrape-examples = true
3482
3483
[package.metadata.example.render_ui_to_texture]
3484
name = "Render UI to Texture"
3485
description = "An example of rendering UI as a part of a 3D world"
3486
category = "UI (User Interface)"
3487
wasm = true
3488
3489
[[example]]
3490
name = "size_constraints"
3491
path = "examples/ui/size_constraints.rs"
3492
doc-scrape-examples = true
3493
3494
[package.metadata.example.size_constraints]
3495
name = "Size Constraints"
3496
description = "Demonstrates how the to use the size constraints to control the size of a UI node."
3497
category = "UI (User Interface)"
3498
wasm = true
3499
3500
[[example]]
3501
name = "text"
3502
path = "examples/ui/text.rs"
3503
doc-scrape-examples = true
3504
3505
[package.metadata.example.text]
3506
name = "Text"
3507
description = "Illustrates creating and updating text"
3508
category = "UI (User Interface)"
3509
wasm = true
3510
3511
[[example]]
3512
name = "text_background_colors"
3513
path = "examples/ui/text_background_colors.rs"
3514
doc-scrape-examples = true
3515
3516
[package.metadata.example.text_background_colors]
3517
name = "Text Background Colors"
3518
description = "Demonstrates text background colors"
3519
category = "UI (User Interface)"
3520
wasm = true
3521
3522
[[example]]
3523
name = "text_debug"
3524
path = "examples/ui/text_debug.rs"
3525
doc-scrape-examples = true
3526
3527
[package.metadata.example.text_debug]
3528
name = "Text Debug"
3529
description = "An example for debugging text layout"
3530
category = "UI (User Interface)"
3531
wasm = true
3532
3533
[[example]]
3534
name = "flex_layout"
3535
path = "examples/ui/flex_layout.rs"
3536
doc-scrape-examples = true
3537
3538
[package.metadata.example.flex_layout]
3539
name = "Flex Layout"
3540
description = "Demonstrates how the AlignItems and JustifyContent properties can be composed to layout nodes and position text"
3541
category = "UI (User Interface)"
3542
wasm = true
3543
3544
[[example]]
3545
name = "text_wrap_debug"
3546
path = "examples/ui/text_wrap_debug.rs"
3547
doc-scrape-examples = true
3548
3549
[package.metadata.example.text_wrap_debug]
3550
name = "Text Wrap Debug"
3551
description = "Demonstrates text wrapping"
3552
category = "UI (User Interface)"
3553
wasm = true
3554
3555
[[example]]
3556
name = "ghost_nodes"
3557
path = "examples/ui/ghost_nodes.rs"
3558
doc-scrape-examples = true
3559
required-features = ["ghost_nodes"]
3560
3561
[package.metadata.example.ghost_nodes]
3562
name = "Ghost Nodes"
3563
description = "Demonstrates the use of Ghost Nodes to skip entities in the UI layout hierarchy"
3564
category = "UI (User Interface)"
3565
wasm = true
3566
3567
[[example]]
3568
name = "grid"
3569
path = "examples/ui/grid.rs"
3570
doc-scrape-examples = true
3571
3572
[package.metadata.example.grid]
3573
name = "CSS Grid"
3574
description = "An example for CSS Grid layout"
3575
category = "UI (User Interface)"
3576
wasm = true
3577
3578
[[example]]
3579
name = "gradients"
3580
path = "examples/ui/gradients.rs"
3581
doc-scrape-examples = true
3582
3583
[package.metadata.example.gradients]
3584
name = "Gradients"
3585
description = "An example demonstrating gradients"
3586
category = "UI (User Interface)"
3587
wasm = true
3588
3589
[[example]]
3590
name = "stacked_gradients"
3591
path = "examples/ui/stacked_gradients.rs"
3592
doc-scrape-examples = true
3593
3594
[package.metadata.example.stacked_gradients]
3595
name = "Stacked Gradients"
3596
description = "An example demonstrating stacked gradients"
3597
category = "UI (User Interface)"
3598
wasm = true
3599
3600
[[example]]
3601
name = "scroll"
3602
path = "examples/ui/scroll.rs"
3603
doc-scrape-examples = true
3604
3605
[package.metadata.example.scroll]
3606
name = "Scroll"
3607
description = "Demonstrates scrolling UI containers"
3608
category = "UI (User Interface)"
3609
wasm = true
3610
3611
[[example]]
3612
name = "transparency_ui"
3613
path = "examples/ui/transparency_ui.rs"
3614
doc-scrape-examples = true
3615
3616
[package.metadata.example.transparency_ui]
3617
name = "Transparency UI"
3618
description = "Demonstrates transparency for UI"
3619
category = "UI (User Interface)"
3620
wasm = true
3621
3622
[[example]]
3623
name = "z_index"
3624
path = "examples/ui/z_index.rs"
3625
doc-scrape-examples = true
3626
3627
[package.metadata.example.z_index]
3628
name = "UI Z-Index"
3629
description = "Demonstrates how to control the relative depth (z-position) of UI elements"
3630
category = "UI (User Interface)"
3631
wasm = true
3632
3633
[[example]]
3634
name = "virtual_keyboard"
3635
path = "examples/ui/virtual_keyboard.rs"
3636
doc-scrape-examples = true
3637
required-features = ["experimental_bevy_feathers"]
3638
3639
[package.metadata.example.virtual_keyboard]
3640
name = "Virtual Keyboard"
3641
description = "Example demonstrating a virtual keyboard widget"
3642
category = "UI (User Interface)"
3643
wasm = true
3644
3645
[[example]]
3646
name = "ui_scaling"
3647
path = "examples/ui/ui_scaling.rs"
3648
doc-scrape-examples = true
3649
3650
[package.metadata.example.ui_scaling]
3651
name = "UI Scaling"
3652
description = "Illustrates how to scale the UI"
3653
category = "UI (User Interface)"
3654
wasm = true
3655
3656
[[example]]
3657
name = "ui_texture_atlas"
3658
path = "examples/ui/ui_texture_atlas.rs"
3659
doc-scrape-examples = true
3660
3661
[package.metadata.example.ui_texture_atlas]
3662
name = "UI Texture Atlas"
3663
description = "Illustrates how to use TextureAtlases in UI"
3664
category = "UI (User Interface)"
3665
wasm = true
3666
3667
[[example]]
3668
name = "ui_texture_slice"
3669
path = "examples/ui/ui_texture_slice.rs"
3670
doc-scrape-examples = true
3671
3672
[package.metadata.example.ui_texture_slice]
3673
name = "UI Texture Slice"
3674
description = "Illustrates how to use 9 Slicing in UI"
3675
category = "UI (User Interface)"
3676
wasm = true
3677
3678
[[example]]
3679
name = "ui_texture_slice_flip_and_tile"
3680
path = "examples/ui/ui_texture_slice_flip_and_tile.rs"
3681
doc-scrape-examples = true
3682
3683
[package.metadata.example.ui_texture_slice_flip_and_tile]
3684
name = "UI Texture Slice Flipping and Tiling"
3685
description = "Illustrates how to flip and tile images with 9 Slicing in UI"
3686
category = "UI (User Interface)"
3687
wasm = true
3688
3689
[[example]]
3690
name = "ui_texture_atlas_slice"
3691
path = "examples/ui/ui_texture_atlas_slice.rs"
3692
doc-scrape-examples = true
3693
3694
[package.metadata.example.ui_texture_atlas_slice]
3695
name = "UI Texture Atlas Slice"
3696
description = "Illustrates how to use 9 Slicing for TextureAtlases in UI"
3697
category = "UI (User Interface)"
3698
wasm = true
3699
3700
[[example]]
3701
name = "ui_transform"
3702
path = "examples/ui/ui_transform.rs"
3703
doc-scrape-examples = true
3704
3705
[package.metadata.example.ui_transform]
3706
name = "UI Transform"
3707
description = "An example demonstrating how to translate, rotate and scale UI elements."
3708
category = "UI (User Interface)"
3709
wasm = true
3710
3711
[[example]]
3712
name = "ui_target_camera"
3713
path = "examples/ui/ui_target_camera.rs"
3714
doc-scrape-examples = true
3715
3716
[package.metadata.example.ui_target_camera]
3717
name = "UI Target Camera"
3718
description = "Demonstrates how to use `UiTargetCamera` and camera ordering."
3719
category = "UI (User Interface)"
3720
wasm = true
3721
3722
[[example]]
3723
name = "viewport_debug"
3724
path = "examples/ui/viewport_debug.rs"
3725
doc-scrape-examples = true
3726
3727
[package.metadata.example.viewport_debug]
3728
name = "Viewport Debug"
3729
description = "An example for debugging viewport coordinates"
3730
category = "UI (User Interface)"
3731
wasm = true
3732
3733
[[example]]
3734
name = "viewport_node"
3735
path = "examples/ui/viewport_node.rs"
3736
doc-scrape-examples = true
3737
3738
[package.metadata.example.viewport_node]
3739
name = "Viewport Node"
3740
description = "Demonstrates how to create a viewport node with picking support"
3741
category = "UI (User Interface)"
3742
wasm = true
3743
3744
# Window
3745
[[example]]
3746
name = "clear_color"
3747
path = "examples/window/clear_color.rs"
3748
doc-scrape-examples = true
3749
3750
[package.metadata.example.clear_color]
3751
name = "Clear Color"
3752
description = "Creates a solid color window"
3753
category = "Window"
3754
wasm = true
3755
3756
[[example]]
3757
name = "custom_cursor_image"
3758
path = "examples/window/custom_cursor_image.rs"
3759
doc-scrape-examples = true
3760
required-features = ["custom_cursor"]
3761
3762
[package.metadata.example.custom_cursor_image]
3763
name = "Custom Cursor Image"
3764
description = "Demonstrates creating an animated custom cursor from an image"
3765
category = "Window"
3766
wasm = true
3767
3768
[[example]]
3769
name = "custom_user_event"
3770
path = "examples/window/custom_user_event.rs"
3771
doc-scrape-examples = true
3772
3773
[package.metadata.example.custom_user_event]
3774
name = "Custom User Event"
3775
description = "Handles custom user events within the event loop"
3776
category = "Window"
3777
wasm = true
3778
3779
[[example]]
3780
name = "low_power"
3781
path = "examples/window/low_power.rs"
3782
doc-scrape-examples = true
3783
3784
[package.metadata.example.low_power]
3785
name = "Low Power"
3786
description = "Demonstrates settings to reduce power use for bevy applications"
3787
category = "Window"
3788
wasm = true
3789
3790
[[example]]
3791
name = "multiple_windows"
3792
path = "examples/window/multiple_windows.rs"
3793
doc-scrape-examples = true
3794
3795
[package.metadata.example.multiple_windows]
3796
name = "Multiple Windows"
3797
description = "Demonstrates creating multiple windows, and rendering to them"
3798
category = "Window"
3799
wasm = false
3800
3801
[[example]]
3802
name = "scale_factor_override"
3803
path = "examples/window/scale_factor_override.rs"
3804
doc-scrape-examples = true
3805
3806
[package.metadata.example.scale_factor_override]
3807
name = "Scale Factor Override"
3808
description = "Illustrates how to customize the default window settings"
3809
category = "Window"
3810
wasm = true
3811
3812
[[example]]
3813
name = "screenshot"
3814
path = "examples/window/screenshot.rs"
3815
doc-scrape-examples = true
3816
3817
[package.metadata.example.screenshot]
3818
name = "Screenshot"
3819
description = "Shows how to save screenshots to disk"
3820
category = "Window"
3821
wasm = true
3822
3823
[[example]]
3824
name = "transparent_window"
3825
path = "examples/window/transparent_window.rs"
3826
doc-scrape-examples = true
3827
3828
[package.metadata.example.transparent_window]
3829
name = "Transparent Window"
3830
description = "Illustrates making the window transparent and hiding the window decoration"
3831
category = "Window"
3832
wasm = false
3833
3834
[[example]]
3835
name = "window_settings"
3836
path = "examples/window/window_settings.rs"
3837
doc-scrape-examples = true
3838
3839
[package.metadata.example.window_settings]
3840
name = "Window Settings"
3841
description = "Demonstrates customizing default window settings"
3842
category = "Window"
3843
wasm = true
3844
3845
[[example]]
3846
name = "window_drag_move"
3847
path = "examples/window/window_drag_move.rs"
3848
doc-scrape-examples = true
3849
3850
[package.metadata.example.window_drag_move]
3851
name = "Window Drag Move"
3852
description = "Demonstrates drag move and drag resize without window decoration"
3853
category = "Window"
3854
wasm = false
3855
3856
[[example]]
3857
name = "ambiguity_detection"
3858
path = "tests/ecs/ambiguity_detection.rs"
3859
doc-scrape-examples = true
3860
3861
[package.metadata.example.ambiguity_detection]
3862
hidden = true
3863
3864
[[example]]
3865
name = "resizing"
3866
path = "tests/window/resizing.rs"
3867
doc-scrape-examples = true
3868
3869
[package.metadata.example.resizing]
3870
hidden = true
3871
3872
[[example]]
3873
name = "minimizing"
3874
path = "tests/window/minimizing.rs"
3875
doc-scrape-examples = true
3876
3877
[package.metadata.example.minimizing]
3878
hidden = true
3879
3880
[[example]]
3881
name = "desktop_request_redraw"
3882
path = "tests/window/desktop_request_redraw.rs"
3883
doc-scrape-examples = true
3884
required-features = ["bevy_dev_tools"]
3885
3886
[package.metadata.example.desktop_request_redraw]
3887
hidden = true
3888
3889
[[example]]
3890
name = "window_resizing"
3891
path = "examples/window/window_resizing.rs"
3892
doc-scrape-examples = true
3893
3894
[[example]]
3895
name = "fallback_image"
3896
path = "examples/shader/fallback_image.rs"
3897
doc-scrape-examples = true
3898
3899
[[example]]
3900
name = "reflection_probes"
3901
path = "examples/3d/reflection_probes.rs"
3902
doc-scrape-examples = true
3903
3904
[package.metadata.example.reflection_probes]
3905
name = "Reflection Probes"
3906
description = "Demonstrates reflection probes"
3907
category = "3D Rendering"
3908
wasm = false
3909
3910
[package.metadata.example.fallback_image]
3911
hidden = true
3912
3913
[package.metadata.example.window_resizing]
3914
name = "Window Resizing"
3915
description = "Demonstrates resizing and responding to resizing a window"
3916
category = "Window"
3917
wasm = true
3918
3919
[[example]]
3920
name = "drag_to_scroll"
3921
path = "examples/ui/drag_to_scroll.rs"
3922
doc-scrape-examples = true
3923
3924
[package.metadata.example.drag_to_scroll]
3925
name = "Drag to Scroll"
3926
description = "This example tests scale factor, dragging and scrolling"
3927
category = "UI (User Interface)"
3928
wasm = true
3929
3930
[[example]]
3931
name = "ui_material"
3932
path = "examples/ui/ui_material.rs"
3933
doc-scrape-examples = true
3934
3935
[package.metadata.example.ui_material]
3936
name = "UI Material"
3937
description = "Demonstrates creating and using custom Ui materials"
3938
category = "UI (User Interface)"
3939
wasm = true
3940
3941
[[example]]
3942
name = "cubic_splines"
3943
path = "examples/math/cubic_splines.rs"
3944
doc-scrape-examples = true
3945
3946
[package.metadata.example.cubic_splines]
3947
name = "Cubic Splines"
3948
description = "Exhibits different modes of constructing cubic curves using splines"
3949
category = "Math"
3950
wasm = true
3951
3952
[[example]]
3953
name = "render_primitives"
3954
path = "examples/math/render_primitives.rs"
3955
doc-scrape-examples = true
3956
3957
[package.metadata.example.render_primitives]
3958
name = "Rendering Primitives"
3959
description = "Shows off rendering for all math primitives as both Meshes and Gizmos"
3960
category = "Math"
3961
wasm = true
3962
3963
# Math
3964
[[example]]
3965
name = "sampling_primitives"
3966
path = "examples/math/sampling_primitives.rs"
3967
doc-scrape-examples = true
3968
3969
[package.metadata.example.sampling_primitives]
3970
name = "Sampling Primitives"
3971
description = "Demonstrates all the primitives which can be sampled."
3972
category = "Math"
3973
wasm = true
3974
3975
[[example]]
3976
name = "custom_primitives"
3977
path = "examples/math/custom_primitives.rs"
3978
doc-scrape-examples = true
3979
3980
[package.metadata.example.custom_primitives]
3981
name = "Custom Primitives"
3982
description = "Demonstrates how to add custom primitives and useful traits for them."
3983
category = "Math"
3984
wasm = true
3985
3986
[[example]]
3987
name = "random_sampling"
3988
path = "examples/math/random_sampling.rs"
3989
doc-scrape-examples = true
3990
3991
[package.metadata.example.random_sampling]
3992
name = "Random Sampling"
3993
description = "Demonstrates how to sample random points from mathematical primitives"
3994
category = "Math"
3995
wasm = true
3996
3997
[[example]]
3998
name = "smooth_follow"
3999
path = "examples/movement/smooth_follow.rs"
4000
doc-scrape-examples = true
4001
4002
[package.metadata.example.smooth_follow]
4003
name = "Smooth Follow"
4004
description = "Demonstrates how to make an entity smoothly follow another using interpolation"
4005
category = "Math"
4006
wasm = true
4007
4008
# Gizmos
4009
[[example]]
4010
name = "2d_gizmos"
4011
path = "examples/gizmos/2d_gizmos.rs"
4012
doc-scrape-examples = true
4013
4014
[package.metadata.example.2d_gizmos]
4015
name = "2D Gizmos"
4016
description = "A scene showcasing 2D gizmos"
4017
category = "Gizmos"
4018
wasm = true
4019
4020
[[example]]
4021
name = "3d_gizmos"
4022
path = "examples/gizmos/3d_gizmos.rs"
4023
doc-scrape-examples = true
4024
4025
[package.metadata.example.3d_gizmos]
4026
name = "3D Gizmos"
4027
description = "A scene showcasing 3D gizmos"
4028
category = "Gizmos"
4029
wasm = true
4030
4031
[[example]]
4032
name = "axes"
4033
path = "examples/gizmos/axes.rs"
4034
doc-scrape-examples = true
4035
4036
[package.metadata.example.axes]
4037
name = "Axes"
4038
description = "Demonstrates the function of axes gizmos"
4039
category = "Gizmos"
4040
wasm = true
4041
4042
[[example]]
4043
name = "light_gizmos"
4044
path = "examples/gizmos/light_gizmos.rs"
4045
doc-scrape-examples = true
4046
4047
[package.metadata.example.light_gizmos]
4048
name = "Light Gizmos"
4049
description = "A scene showcasing light gizmos"
4050
category = "Gizmos"
4051
wasm = true
4052
4053
[[example]]
4054
name = "fps_overlay"
4055
path = "examples/dev_tools/fps_overlay.rs"
4056
doc-scrape-examples = true
4057
required-features = ["bevy_dev_tools"]
4058
4059
[[example]]
4060
name = "2d_top_down_camera"
4061
path = "examples/camera/2d_top_down_camera.rs"
4062
doc-scrape-examples = true
4063
4064
[package.metadata.example.2d_top_down_camera]
4065
name = "2D top-down camera"
4066
description = "A 2D top-down camera smoothly following player movements"
4067
category = "Camera"
4068
wasm = true
4069
4070
[[example]]
4071
name = "custom_projection"
4072
path = "examples/camera/custom_projection.rs"
4073
doc-scrape-examples = true
4074
4075
[package.metadata.example.custom_projection]
4076
name = "Custom Projection"
4077
description = "Shows how to create custom camera projections."
4078
category = "Camera"
4079
wasm = true
4080
4081
[[example]]
4082
name = "first_person_view_model"
4083
path = "examples/camera/first_person_view_model.rs"
4084
doc-scrape-examples = true
4085
4086
[package.metadata.example.first_person_view_model]
4087
name = "First person view model"
4088
description = "A first-person camera that uses a world model and a view model with different field of views (FOV)"
4089
category = "Camera"
4090
wasm = true
4091
4092
[[example]]
4093
name = "projection_zoom"
4094
path = "examples/camera/projection_zoom.rs"
4095
doc-scrape-examples = true
4096
4097
[package.metadata.example.projection_zoom]
4098
name = "Projection Zoom"
4099
description = "Shows how to zoom orthographic and perspective projection cameras."
4100
category = "Camera"
4101
wasm = true
4102
4103
[[example]]
4104
name = "camera_orbit"
4105
path = "examples/camera/camera_orbit.rs"
4106
doc-scrape-examples = true
4107
4108
[package.metadata.example.camera_orbit]
4109
name = "Camera Orbit"
4110
description = "Shows how to orbit a static scene using pitch, yaw, and roll."
4111
category = "Camera"
4112
wasm = true
4113
4114
[[example]]
4115
name = "2d_screen_shake"
4116
path = "examples/camera/2d_screen_shake.rs"
4117
doc-scrape-examples = true
4118
4119
[package.metadata.example.2d_screen_shake]
4120
name = "Screen Shake"
4121
description = "A simple 2D screen shake effect"
4122
category = "Camera"
4123
wasm = true
4124
4125
[[example]]
4126
name = "2d_on_ui"
4127
path = "examples/camera/2d_on_ui.rs"
4128
doc-scrape-examples = true
4129
4130
[package.metadata.example.2d_on_ui]
4131
name = "2D on Bevy UI"
4132
description = "Shows how to render 2D objects on top of Bevy UI"
4133
category = "Camera"
4134
wasm = true
4135
4136
[package.metadata.example.fps_overlay]
4137
name = "FPS overlay"
4138
description = "Demonstrates FPS overlay"
4139
category = "Dev tools"
4140
wasm = true
4141
4142
[[example]]
4143
name = "visibility_range"
4144
path = "examples/3d/visibility_range.rs"
4145
doc-scrape-examples = true
4146
4147
[package.metadata.example.visibility_range]
4148
name = "Visibility range"
4149
description = "Demonstrates visibility ranges"
4150
category = "3D Rendering"
4151
wasm = true
4152
4153
[[example]]
4154
name = "ssr"
4155
path = "examples/3d/ssr.rs"
4156
doc-scrape-examples = true
4157
4158
[package.metadata.example.ssr]
4159
name = "Screen Space Reflections"
4160
description = "Demonstrates screen space reflections with water ripples"
4161
category = "3D Rendering"
4162
wasm = false
4163
4164
[[example]]
4165
name = "camera_sub_view"
4166
path = "examples/3d/camera_sub_view.rs"
4167
doc-scrape-examples = true
4168
4169
[package.metadata.example.camera_sub_view]
4170
name = "Camera sub view"
4171
description = "Demonstrates using different sub view effects on a camera"
4172
category = "3D Rendering"
4173
wasm = true
4174
4175
[[example]]
4176
name = "color_grading"
4177
path = "examples/3d/color_grading.rs"
4178
doc-scrape-examples = true
4179
4180
[package.metadata.example.color_grading]
4181
name = "Color grading"
4182
description = "Demonstrates color grading"
4183
category = "3D Rendering"
4184
wasm = true
4185
4186
[[example]]
4187
name = "clearcoat"
4188
path = "examples/3d/clearcoat.rs"
4189
doc-scrape-examples = true
4190
required-features = ["pbr_multi_layer_material_textures"]
4191
4192
[package.metadata.example.clearcoat]
4193
name = "Clearcoat"
4194
description = "Demonstrates the clearcoat PBR feature"
4195
category = "3D Rendering"
4196
wasm = false
4197
4198
[[example]]
4199
name = "depth_of_field"
4200
path = "examples/3d/depth_of_field.rs"
4201
doc-scrape-examples = true
4202
4203
[package.metadata.example.depth_of_field]
4204
name = "Depth of field"
4205
description = "Demonstrates depth of field"
4206
category = "3D Rendering"
4207
wasm = false
4208
4209
[[example]]
4210
name = "volumetric_fog"
4211
path = "examples/3d/volumetric_fog.rs"
4212
doc-scrape-examples = true
4213
4214
[package.metadata.example.volumetric_fog]
4215
name = "Volumetric fog"
4216
description = "Demonstrates volumetric fog and lighting"
4217
category = "3D Rendering"
4218
wasm = true
4219
4220
[[example]]
4221
name = "client"
4222
path = "examples/remote/client.rs"
4223
doc-scrape-examples = true
4224
required-features = ["bevy_remote"]
4225
4226
[package.metadata.example.client]
4227
name = "client"
4228
description = "A simple command line client that can control Bevy apps via the BRP"
4229
category = "Remote Protocol"
4230
wasm = false
4231
4232
[[example]]
4233
name = "server"
4234
path = "examples/remote/server.rs"
4235
doc-scrape-examples = true
4236
required-features = ["bevy_remote"]
4237
4238
[package.metadata.example.server]
4239
name = "server"
4240
description = "A Bevy app that you can connect to with the BRP and edit"
4241
category = "Remote Protocol"
4242
wasm = false
4243
4244
[[example]]
4245
name = "anisotropy"
4246
path = "examples/3d/anisotropy.rs"
4247
doc-scrape-examples = true
4248
required-features = ["jpeg", "pbr_anisotropy_texture"]
4249
4250
[package.metadata.example.anisotropy]
4251
name = "Anisotropy"
4252
description = "Displays an example model with anisotropy"
4253
category = "3D Rendering"
4254
wasm = false
4255
4256
[[example]]
4257
name = "custom_phase_item"
4258
path = "examples/shader_advanced/custom_phase_item.rs"
4259
doc-scrape-examples = true
4260
4261
[package.metadata.example.custom_phase_item]
4262
name = "Custom phase item"
4263
description = "Demonstrates how to enqueue custom draw commands in a render phase"
4264
category = "Shaders"
4265
wasm = true
4266
4267
[[example]]
4268
name = "fog_volumes"
4269
path = "examples/3d/fog_volumes.rs"
4270
doc-scrape-examples = true
4271
4272
[package.metadata.example.fog_volumes]
4273
name = "Fog volumes"
4274
description = "Demonstrates fog volumes"
4275
category = "3D Rendering"
4276
wasm = false
4277
4278
[[example]]
4279
name = "scrolling_fog"
4280
path = "examples/3d/scrolling_fog.rs"
4281
doc-scrape-examples = true
4282
4283
[package.metadata.example.scrolling_fog]
4284
name = "Scrolling fog"
4285
description = "Demonstrates how to create the effect of fog moving in the wind"
4286
category = "3D Rendering"
4287
wasm = false
4288
4289
[[example]]
4290
name = "physics_in_fixed_timestep"
4291
path = "examples/movement/physics_in_fixed_timestep.rs"
4292
doc-scrape-examples = true
4293
4294
[package.metadata.example.physics_in_fixed_timestep]
4295
name = "Run physics in a fixed timestep"
4296
description = "Handles input, physics, and rendering in an industry-standard way by using a fixed timestep"
4297
category = "Movement"
4298
wasm = true
4299
4300
[[example]]
4301
name = "post_processing"
4302
path = "examples/3d/post_processing.rs"
4303
doc-scrape-examples = true
4304
4305
[package.metadata.example.post_processing]
4306
name = "Built-in postprocessing"
4307
description = "Demonstrates the built-in postprocessing features"
4308
category = "3D Rendering"
4309
wasm = true
4310
4311
[[example]]
4312
name = "rotate_environment_map"
4313
path = "examples/3d/rotate_environment_map.rs"
4314
doc-scrape-examples = true
4315
required-features = ["pbr_multi_layer_material_textures"]
4316
4317
[package.metadata.example.rotate_environment_map]
4318
name = "Rotate Environment Map"
4319
description = "Demonstrates how to rotate the skybox and the environment map simultaneously"
4320
category = "3D Rendering"
4321
wasm = false
4322
4323
[[example]]
4324
name = "mesh_picking"
4325
path = "examples/picking/mesh_picking.rs"
4326
doc-scrape-examples = true
4327
required-features = ["bevy_mesh_picking_backend"]
4328
4329
[package.metadata.example.mesh_picking]
4330
name = "Mesh Picking"
4331
description = "Demonstrates picking meshes"
4332
category = "Picking"
4333
wasm = true
4334
4335
[[example]]
4336
name = "simple_picking"
4337
path = "examples/picking/simple_picking.rs"
4338
doc-scrape-examples = true
4339
required-features = ["bevy_picking"]
4340
4341
[package.metadata.example.simple_picking]
4342
name = "Showcases simple picking events and usage"
4343
description = "Demonstrates how to use picking events to spawn simple objects"
4344
category = "Picking"
4345
wasm = true
4346
4347
[[example]]
4348
name = "sprite_picking"
4349
path = "examples/picking/sprite_picking.rs"
4350
doc-scrape-examples = true
4351
required-features = ["bevy_sprite_picking_backend"]
4352
4353
[package.metadata.example.sprite_picking]
4354
name = "Sprite Picking"
4355
description = "Demonstrates picking sprites and sprite atlases"
4356
category = "Picking"
4357
wasm = true
4358
4359
[[example]]
4360
name = "debug_picking"
4361
path = "examples/picking/debug_picking.rs"
4362
doc-scrape-examples = true
4363
required-features = ["bevy_dev_tools"]
4364
4365
[package.metadata.example.debug_picking]
4366
name = "Picking Debug Tools"
4367
description = "Demonstrates picking debug overlay"
4368
category = "Picking"
4369
wasm = true
4370
4371
[[example]]
4372
name = "animation_masks"
4373
path = "examples/animation/animation_masks.rs"
4374
doc-scrape-examples = true
4375
4376
[package.metadata.example.animation_masks]
4377
name = "Animation Masks"
4378
description = "Demonstrates animation masks"
4379
category = "Animation"
4380
wasm = true
4381
4382
[[example]]
4383
name = "pcss"
4384
path = "examples/3d/pcss.rs"
4385
doc-scrape-examples = true
4386
required-features = ["experimental_pbr_pcss"]
4387
4388
[package.metadata.example.pcss]
4389
name = "Percentage-closer soft shadows"
4390
description = "Demonstrates percentage-closer soft shadows (PCSS)"
4391
category = "3D Rendering"
4392
wasm = false
4393
4394
[[example]]
4395
name = "mixed_lighting"
4396
path = "examples/3d/mixed_lighting.rs"
4397
doc-scrape-examples = true
4398
required-features = ["jpeg"]
4399
4400
[package.metadata.example.mixed_lighting]
4401
name = "Mixed lighting"
4402
description = "Demonstrates how to combine baked and dynamic lighting"
4403
category = "3D Rendering"
4404
wasm = true
4405
4406
[[example]]
4407
name = "animated_ui"
4408
path = "examples/animation/animated_ui.rs"
4409
doc-scrape-examples = true
4410
4411
[package.metadata.example.animated_ui]
4412
name = "Animated UI"
4413
description = "Shows how to use animation clips to animate UI properties"
4414
category = "Animation"
4415
wasm = true
4416
4417
[[example]]
4418
name = "shader_material_bindless"
4419
path = "examples/shader/shader_material_bindless.rs"
4420
doc-scrape-examples = true
4421
4422
[package.metadata.example.shader_material_bindless]
4423
name = "Material - Bindless"
4424
description = "Demonstrates how to make materials that use bindless textures"
4425
category = "Shaders"
4426
wasm = true
4427
4428
[[example]]
4429
name = "specular_tint"
4430
path = "examples/3d/specular_tint.rs"
4431
doc-scrape-examples = true
4432
required-features = ["pbr_specular_textures"]
4433
4434
[package.metadata.example.specular_tint]
4435
name = "Specular Tint"
4436
description = "Demonstrates specular tints and maps"
4437
category = "3D Rendering"
4438
wasm = true
4439
4440
[[example]]
4441
name = "test_invalid_skinned_mesh"
4442
path = "tests/3d/test_invalid_skinned_mesh.rs"
4443
doc-scrape-examples = true
4444
4445
[package.metadata.example.test_invalid_skinned_mesh]
4446
hidden = true
4447
4448
[profile.wasm-release]
4449
inherits = "release"
4450
opt-level = "z"
4451
lto = "fat"
4452
codegen-units = 1
4453
4454
[profile.stress-test]
4455
inherits = "release"
4456
lto = "fat"
4457
panic = "abort"
4458
4459
[package.metadata.docs.rs]
4460
# This cfg is needed so that #[doc(fake_variadic)] is correctly propagated for
4461
# impls for re-exported traits. See https://github.com/rust-lang/cargo/issues/8811
4462
# for details on why this is needed. Since dependencies don't expect to be built
4463
# with `--cfg docsrs` (and thus fail to compile) we use a different cfg.
4464
rustc-args = ["--cfg", "docsrs_dep"]
4465
rustdoc-args = [
4466
"-Zunstable-options",
4467
"--generate-link-to-definition",
4468
# Embed tags to the top of documentation pages for common Bevy traits
4469
# that are implemented by the current type, like `Component` or `Resource`.
4470
# This makes it easier to see at a glance what types are used for.
4471
"--html-after-content",
4472
"docs-rs/trait-tags.html",
4473
]
4474
all-features = true
4475
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
4476
4477
[[example]]
4478
name = "monitor_info"
4479
path = "examples/window/monitor_info.rs"
4480
doc-scrape-examples = true
4481
4482
[package.metadata.example.monitor_info]
4483
name = "Monitor info"
4484
description = "Displays information about available monitors (displays)."
4485
category = "Window"
4486
wasm = false
4487
4488
# Testbed
4489
[[example]]
4490
name = "testbed_2d"
4491
path = "examples/testbed/2d.rs"
4492
doc-scrape-examples = true
4493
4494
[package.metadata.example.testbed_2d]
4495
hidden = true
4496
4497
[[example]]
4498
name = "testbed_3d"
4499
path = "examples/testbed/3d.rs"
4500
doc-scrape-examples = true
4501
4502
[package.metadata.example.testbed_3d]
4503
hidden = true
4504
4505
[[example]]
4506
name = "testbed_ui"
4507
path = "examples/testbed/ui.rs"
4508
doc-scrape-examples = true
4509
4510
[package.metadata.example.testbed_ui]
4511
hidden = true
4512
4513
[[example]]
4514
name = "testbed_full_ui"
4515
path = "examples/testbed/full_ui.rs"
4516
doc-scrape-examples = true
4517
4518
[package.metadata.example.testbed_full_ui]
4519
hidden = true
4520
4521
[[example]]
4522
name = "tab_navigation"
4523
path = "examples/ui/tab_navigation.rs"
4524
doc-scrape-examples = true
4525
4526
[package.metadata.example.tab_navigation]
4527
name = "Tab Navigation"
4528
description = "Demonstration of Tab Navigation between UI elements"
4529
category = "UI (User Interface)"
4530
wasm = true
4531
4532
[[example]]
4533
name = "directional_navigation"
4534
path = "examples/ui/directional_navigation.rs"
4535
doc-scrape-examples = true
4536
4537
[package.metadata.example.directional_navigation]
4538
name = "Directional Navigation"
4539
description = "Demonstration of Directional Navigation between UI elements"
4540
category = "UI (User Interface)"
4541
wasm = true
4542
4543
[[example]]
4544
name = "clustered_decals"
4545
path = "examples/3d/clustered_decals.rs"
4546
doc-scrape-examples = true
4547
required-features = ["pbr_clustered_decals"]
4548
4549
[package.metadata.example.clustered_decals]
4550
name = "Clustered Decals"
4551
description = "Demonstrates clustered decals"
4552
category = "3D Rendering"
4553
wasm = false
4554
4555
[[example]]
4556
name = "light_textures"
4557
path = "examples/3d/light_textures.rs"
4558
doc-scrape-examples = true
4559
required-features = ["pbr_light_textures"]
4560
4561
[package.metadata.example.light_textures]
4562
name = "Light Textures"
4563
description = "Demonstrates light textures"
4564
category = "3D Rendering"
4565
wasm = false
4566
4567
[[example]]
4568
name = "occlusion_culling"
4569
path = "examples/3d/occlusion_culling.rs"
4570
doc-scrape-examples = true
4571
4572
[package.metadata.example.occlusion_culling]
4573
name = "Occlusion Culling"
4574
description = "Demonstration of Occlusion Culling"
4575
category = "3D Rendering"
4576
wasm = false
4577
4578
[[example]]
4579
name = "camera_controller"
4580
path = "examples/helpers/camera_controller.rs"
4581
doc-scrape-examples = true
4582
crate-type = ["lib"]
4583
4584
[package.metadata.example.camera_controller]
4585
name = "Camera Controller"
4586
description = "Example Free-Cam Styled Camera Controller"
4587
category = "Helpers"
4588
wasm = true
4589
4590
[[example]]
4591
name = "widgets"
4592
path = "examples/helpers/widgets.rs"
4593
doc-scrape-examples = true
4594
crate-type = ["lib"]
4595
4596
[package.metadata.example.widgets]
4597
name = "Widgets"
4598
description = "Example UI Widgets"
4599
category = "Helpers"
4600
wasm = true
4601
4602
[[example]]
4603
name = "no_std_library"
4604
path = "examples/no_std/library/src/lib.rs"
4605
doc-scrape-examples = true
4606
crate-type = ["lib"]
4607
4608
[package.metadata.example.no_std_library]
4609
name = "`no_std` Compatible Library"
4610
description = "Example library compatible with `std` and `no_std` targets"
4611
category = "Embedded"
4612
wasm = true
4613
4614
[[example]]
4615
name = "extended_material_bindless"
4616
path = "examples/shader/extended_material_bindless.rs"
4617
doc-scrape-examples = true
4618
4619
[package.metadata.example.extended_material_bindless]
4620
name = "Extended Bindless Material"
4621
description = "Demonstrates bindless `ExtendedMaterial`"
4622
category = "Shaders"
4623
wasm = false
4624
4625
[[example]]
4626
name = "cooldown"
4627
path = "examples/usage/cooldown.rs"
4628
doc-scrape-examples = true
4629
4630
[package.metadata.example.cooldown]
4631
name = "Cooldown"
4632
description = "Example for cooldown on button clicks"
4633
category = "Usage"
4634
wasm = true
4635
4636
[[example]]
4637
name = "hotpatching_systems"
4638
path = "examples/ecs/hotpatching_systems.rs"
4639
doc-scrape-examples = true
4640
required-features = ["hotpatching"]
4641
4642
[package.metadata.example.hotpatching_systems]
4643
name = "Hotpatching Systems"
4644
description = "Demonstrates how to hotpatch systems"
4645
category = "ECS (Entity Component System)"
4646
wasm = false
4647
4648
[[example]]
4649
name = "core_widgets"
4650
path = "examples/ui/core_widgets.rs"
4651
doc-scrape-examples = true
4652
4653
[package.metadata.example.core_widgets]
4654
name = "Core Widgets"
4655
description = "Demonstrates use of core (headless) widgets in Bevy UI"
4656
category = "UI (User Interface)"
4657
wasm = true
4658
4659
[[example]]
4660
name = "core_widgets_observers"
4661
path = "examples/ui/core_widgets_observers.rs"
4662
doc-scrape-examples = true
4663
4664
[package.metadata.example.core_widgets_observers]
4665
name = "Core Widgets (w/Observers)"
4666
description = "Demonstrates use of core (headless) widgets in Bevy UI, with Observers"
4667
category = "UI (User Interface)"
4668
wasm = true
4669
4670
[[example]]
4671
name = "scrollbars"
4672
path = "examples/ui/scrollbars.rs"
4673
doc-scrape-examples = true
4674
4675
[package.metadata.example.scrollbars]
4676
name = "Scrollbars"
4677
description = "Demonstrates use of core scrollbar in Bevy UI"
4678
category = "UI (User Interface)"
4679
wasm = true
4680
4681
[[example]]
4682
name = "feathers"
4683
path = "examples/ui/feathers.rs"
4684
doc-scrape-examples = true
4685
required-features = ["experimental_bevy_feathers"]
4686
4687
[package.metadata.example.feathers]
4688
name = "Feathers Widgets"
4689
description = "Gallery of Feathers Widgets"
4690
category = "UI (User Interface)"
4691
wasm = true
4692
hidden = true
4693
4694
[[example]]
4695
name = "render_depth_to_texture"
4696
path = "examples/shader_advanced/render_depth_to_texture.rs"
4697
doc-scrape-examples = true
4698
4699
[package.metadata.example.render_depth_to_texture]
4700
name = "Render Depth to Texture"
4701
description = "Demonstrates how to use depth-only cameras"
4702
category = "Shaders"
4703
wasm = true
4704
4705