
Entity Mapping, Cloning, Disabling, and more
2025-02-10
This Week in Bevy rendering takes even more advantage of the retained rendering world that was merged into 0.15. Scene spawning, entity cloning, and entity disabling all saw progress this week which is just more proof that the next release will be a big one yet again.
Out in the community we get a flashback to Advent of Code 2024 with Bevy-based visualizations for the puzzles, procedural audio generation for car engines, and 3d scan data being used.
The This Week in Bevy site also got an update to Leptos 0.7 in preparation for some more changes coming soon 👀
Entity Mapping and Cloning
The recent Relationships functionality put extra stress on the current entity mapping system which #17687 resolved by improving entity mapping and cloning which are both closely related to Scene spawning functionality.
Components now have first-class mapping behavior and new attributes to go along with it and next steps are looking to use the improvements to spawn Scenes.
#[derive(Component, Reflect)]
#[reflect(Component)]
struct Inventory {
size: usize,
#[entities]
items: Vec<Entity>,
}
weak_handle!
Writing a shader module that can be distributed on crates.io and imported by Bevy users typically requires a manually initialized Handle
and using load_internal_asset!
.
const SHADER: Handle<Shader> = Handle::weak_from_u128(314685653797097581405914117016993910609);
#17384 introduces a weak_handle!
macro which now accepts uuids, making it easier to pick a number that doesn't conflict with anything else.
const SHADER: Handle<Shader> = weak_handle!("1347c9b7-c46a-48e7-b7b8-023a354b7cac");
editing materials on gltfs
How to change the material on an entity in a scene spawned from a gltf asset is a common question that as of #17677 now has an official example in the Bevy repo.
cargo run --example edit_material_on_gltf
text shadow
#17559 adds support for text shadow to bevy_ui. This is a basic text shadow implemented by replicating the text with and offset and color. Future implementations could support a blur radius.
Retained Bins
A PhaseItem
is rendered as part of a render phase (which you can learn about in the custom_phase_item
example. Batchable phase items are stored in bins, which as of #17698 are now retained from frame to frame instead of being reconstructed.
Cold Specialization
Materials (really, pipelines) can be specialized to modify the RenderPipelineDescriptor
. As of #17567 pipeline ids are cached and only recomputed when necessary.
Atmosphere LUT parameterization
Improvements to procedural atmospheric scattering were implemented in #17555.
Disabled entity marker component
Building on DefaultQueryFilters, #17514 introduces an initial Disabled
marker. This component is a first-party marker for entity disabling.
Alice's Merge Train is a maintainer-level view into active PRs, both those that are merging and those that need work.

Showcase
Bevy work from the #showcase channel in Discord and around the internet. Use hashtag #bevyengine.

Tree Mesh Generation
showcase
Tree mesh generation in Bevy, which is live on a web deployment to play with.

Standing Around
showcase
A day/night cycle with a character standing around near a fountain of magic.
bevy_defer + axum demo
showcase
This demo forms a webserver you can attach to any of your bevy projects to serve files or whatever else.
fn main() {
App::new()
.add_plugins(WevyServerPlugins)
.insert_resource(RouterWrapper(
Router::new().route("/owo", get(owo_get)),
))
.add_systems(Startup, setup)
.run();
println!("Hello, world!");
}
fn setup(mut commands: Commands) {
commands.spawn(Transform {
translation: Vec3::new(69.0, 420.0, 2025.0),
rotation: Default::default(),
scale: Default::default(),
});
}
async fn owo_get() -> String {
AsyncWorld
.query_single::<&Transform>()
.get_mut(|q| -> String {
serde_json::to_string(q).unwrap()
})
.unwrap()
}


Varg: Doors and Mirrors
showcase
Varg, a love letter to the classic MS-DOS “boomer” shooter genre, got doors and (fake) mirrors in this dev update.

Advent of Code 2024 Visualizations
showcase
Visualizations in Bevy for all 25 days of Advent of Code 2024 often built with exclusively ui nodes.


Splash Rats
showcase
Grokka Games's debut title has been in a pseudo-stealth mode and they've decided to start posting more dev updates. Splash Rats is a physics-based 2d co-op action game with liquid physics. Development is quite early, especially on visuals, but mechanics and physics have had a decent amount of work.

Input rebinding menu
showcase
A bindings menu originally made for a game and extracted into a standalone example for bevy_enhanced_input.

Crates
New releases to crates.io and substantial updates to existing projects

bevy_behave
crate_release
bevy_behave is a behavior tree crate which does on-demand spawning for task nodes, and uses observers for non-entity tasks

bevy_mod_skinned_aabb 0.1.0
crate_release
bevy_mod_skinned_aabb automatically calculates AABBs for skinned meshes. This is a community-driven fix for disappearing meshes.

bevy_child_window 0.1
crate_release
bevy_child_window provides a way to embed a child window within the Bevy parent window. It currently works on Windows and macOS.
bevy_webview_wry v0.2.0
crate_release
bevy_webview_wry added support for embedded HTML, which combined with support for bevy_child_window enables displaying a webview inside of a child window.

bevy_lit v0.6
crate_release
bevy_lit is a 2D lighting library.
0.6 brings the ability to use any Mesh2d
or texture as an occluder, better performance using Jump Flood, and a new tint_occluder to control whether occlusion areas should tint with ambient light.

Bevy Replicon 0.30.0
crate_release
bevy_replicon 0.30 introduces remote triggers. The API is similar to networked events.
app.add_client_trigger::<DummyEvent>(
ChannelKind::Ordered,
)
.add_observer(receive_events)
.add_systems(
Update,
send_events.run_if(client_connected),
);
fn send_events(mut commands: Commands) {
commands.client_trigger(DummyEvent);
}
fn receive_events(
trigger: Trigger<FromClient<DummyEvent>>,
) {
info!(
"received event {:?} from {:?}",
trigger.event, trigger.client_id
);
}

Devlogs
vlog style updates from long-term projects

Educational
Tutorials, deep dives, and other information on developing Bevy applications, games, and plugins

Making a Car Engine Sound with Leat & Bevy
educational
Leat is a pure-rust visual node-based dataflow language that is capable of designing a patch, exporting it to files, and import into Bevy. The goal is to enable the creation of dynamic sounds and procedural music that reacts to gameplay. This video covers creating and using such a sound to generate car engine audio
Tiny ci improvements authored by mockersf
Add a test for direct recursion in required components. authored by ElliottjPierce
`queue_sprites` comment fix authored by ickshonpe
feat: impl `Ease` for `Isometry[2/3]d` authored by RobWalt
Run handle_lifetime only when AudioSink is added to the world authored by silvestrpredko
Fix cursor hotspot out of bounds when flipping authored by mgi388
anti-alias outside the edges of UI nodes, not across them authored by ickshonpe
Use more headers in AsBindGroup docs authored by IceSentry
Implement `Serialize`/`Deserialize` for entity collections authored by Jondolf
Revert "Fix rounding bug in camera projection (#16828)" authored by hukasu
Fix Maya-exported rigs by not trying to topologically sort glTF nodes. authored by pcwalton
Expose ObserverDescriptor fields authored by cBournhonesque
Add simple Disabled marker authored by NiseVoid
Move sprite batches to resource authored by tychedelia
Improve ergonomics of `platform_support`'s `Instant` authored by Mathspy
Fix Taffy viewport node leaks authored by ickshonpe
Fixing `ValArithmeticError` typo and unused variant authored by eckz
Add basic debug checks for read-only `UnsafeWorldCell` authored by joseph-gio
Improve docs for `WorldQuery` authored by alice-i-cecile
Added `try_map_unchanged`. authored by mintlu8
Warnings and docs for exponential denormalization in rotate functions (alternative to #17604) authored by Novakasa
Fix access checks for DeferredWorld as SystemParam. authored by chescock
Implementing Reflect on *MeshBuilder types authored by eckz
Atmosphere LUT parameterization improvements authored by mate-h
Improve `TextSpan` docs authored by rparrett
Revert #17631 authored by ickshonpe
Add required serde_derive feature flag to bevy_ecs authored by alice-i-cecile
Fix text-2d. authored by tychedelia
Make `batch_and_prepare_binned_render_phase` only record information about the first batch in each batch set. authored by pcwalton
Add `edit_material_on_gltf` example authored by hukasu
Schedule build pass authored by Neo-Zhixing
Weak handle migration authored by SludgePhD
Introduce methods on QueryState to obtain a Query authored by chescock
Add `weak_handle!` convenience macro authored by SludgePhD
Add missing return in default `Relationship::on_insert` impl authored by grind086
Isolate component registration authored by ElliottjPierce
Add a Sphere to `anisotropy` example authored by hukasu
Split `Component::register_component_hooks` into individual methods authored by bushrat011899
Fix a couple of doc typos authored by theotherphil
Basic UI text shadows authored by ickshonpe
Move `Item` and `fetch` to `QueryData` from `WorldQuery` authored by couyit
Change `GhostNode` into a unit type authored by ickshonpe
Cold Specialization authored by tychedelia
implement UniqueEntitySlice authored by Victoronz
Don't reallocate work item buffers every frame. authored by pcwalton
Don't mark a previous mesh transform as changed if it didn't actually change. authored by pcwalton
Bump to `uuid` 1.13.1 and enable `js` on `wasm` targets authored by bushrat011899
Improved Entity Mapping and Cloning authored by cart
Missing UI glpyhs fix authored by ickshonpe
Include the material bind group in the shadow batch set key. authored by pcwalton
EaseFunction svg graphs in doc authored by SpecificProtagonist
Tidy up `easing_functions` example authored by rparrett
Fix rounding in steps easing function authored by rparrett
Retain bins from frame to frame. authored by pcwalton
Want to contribute to Bevy?
Here you can find two types of potential contribution: Pull Requests that might need review and Issues that might need to be worked on.
Pull Requests Opened this week
Add user supplied mesh tag authored by tychedelia
Improve cubic segment bezier functionality authored by hocop
Better macro errors for get_struct_fields authored by ecoskey
Add a `RelatedTo` filter for querying relations authored by alice-i-cecile
Remove `camera` from UiBatch authored by ickshonpe
added an example showing how to use with_rect authored by fjkorf
Skip camera look ups in queue uinodes authored by ickshonpe
Add relative position reporting to UI picking authored by bytemunch
Use dual-source blending for rendering the sky authored by ecoskey
Shorten the 'world lifetime returned from `QueryLens::query()`. authored by chescock
Primitive 3d custom tangents authored by hukasu
Add checked methods to add vertex attributes to mesh only if values is not empty authored by hukasu
feat(mobile): unify build settings and plugin logic for mobile and desktop authored by devxpain
Add scroll functionality to bevy_picking authored by colepoirier
Use `target_abi = "sim"` instead of `ios_simulator` feature authored by madsmtm
Generalized and atomic staging utils authored by ElliottjPierce
feat(ecs): implement fallible observer systems authored by JeanMertz
Replace `!Send` resources with `thread_local!` authored by joshua-holmes
make bevy math publishable authored by mockersf
Fix cloning entities with multiple `linked_spawn` relationships authored by eugineerd
`Query::get_many` should not check for duplicates authored by chescock
feat(log): support customizing default log formatting authored by JeanMertz
Fix documentation of `Entities::get` authored by urben1680
Fix motion vector computation after #17688. authored by pcwalton
Expose method to update the internal ticks of Ref and Mut authored by cBournhonesque
DRAFT: `no_std` support for `bevy` and `bevy_internal` authored by bushrat011899
deprecated generate_view_layouts in favor of layout_entries (#17537) authored by Utope
feat(utils): add `OptionExt` trait for `Result` conversion authored by JeanMertz
Issues Opened this week
Design of bevy_a11y is BSN-unfriendly authored by viridia
VisibilityRange dithering artifacts when TAA or SSAO are enabled authored by tgerpheide
`CubicSegment` lacks functionality of `CubicCurve` authored by hocop
monitor_info takes an extremely long time creating windows authored by ColonelThirtyTwo
`Okhsl` and `Okhsv` support for bevy_color authored by realhackcraft
`WorldQuery` types for working with relationships authored by alice-i-cecile
Expose `bevy_math::curve::easing::easing_functions` to public authored by vveisard
🐢 Eliminate `!Send` resources by supporting `Send` and `!Send` `World` in the same binary authored by joshua-holmes
`Item` and `fetch` should be moved to `QueryData` from `WorldQuery` authored by alice-i-cecile
Attempting to load a GltfPrimitive directly from a file path causes it to be stuck loading forever. authored by rydb
Basis Doesn't Work on Wasm Target authored by anlumo
rustc-LLVM ERROR: out of memory when compiling example authored by 39george
bevy_ecs system stepping tests are failing and are not tested in CI authored by alice-i-cecile
Add a way to detect what input modality (e.g. gamepad, KBM) is used authored by alice-i-cecile
Global Illumination Scenarios authored by Pyxrs
🐢 Make `!Send` resources `thread_local!` authored by joshua-holmes
The outer circumference of the sprrite deviates authored by sakurw
🐢 Make `World` truly `Send` and create feature flag for `!Send` `World` authored by joshua-holmes
Text2d always uses the primary window's scale factor authored by ickshonpe
SOUNDNESS: Query should not be `Copy` authored by alice-i-cecile
Input event not emitted when hovering / focused on wry webview child window authored by tnthung
allow ordering systems registered in computed and source state transition events authored by bananaturtlesandwich
Text Picking authored by bytemunch
Unexpected AabbCast2d aabb_collision_at with small max distance value authored by bread-mountain4
getrandom v0.2.15 blocks uuid and compiling to wasm authored by Wehzie
Improve multithreading support for render command encoding authored by PPakalns
expose parse & parse_some from bevy_remote crate authored by Utope
`gltf_skinned_mesh` example panics authored by rparrett
Pull `bevy_ecs::label` out into its own separate crate authored by ItsDoot
Change defaults with Local<> to be more ergonomic authored by newclarityex
Allow `Image` to be created without data authored by tychedelia
Support more "step" easing modes authored by rparrett
System param validation error message for `Option<Single<&Thing>>` when there are two `Thing`s is confusing authored by scvalex
Wireframe on `2d_shapes` example is just an outline authored by hukasu