Skip to content

Commit 2aa98ab

Browse files
authored
Port to Bevy 0.19-rc.1. (#75)
1 parent 85b1fca commit 2aa98ab

32 files changed

Lines changed: 1277 additions & 1006 deletions

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Changelog
22

3+
## bevy_mod_outline 0.13.0 (unreleased)
4+
5+
###
6+
- Added frustum culling.
7+
8+
### Removed
9+
- Removed facility to warm-up invisible outlines.
10+
11+
### Changed
12+
- Updated Bevy dependency to 0.19.
13+
314
## bevy_mod_outline 0.12.1 (2026-05-11)
415

516
## Changed

Cargo.toml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bevy_mod_outline"
3-
version = "0.12.1"
3+
version = "0.13.0"
44
edition = "2021"
55
license = "MIT OR Apache-2.0"
66
description = "A mesh outlining plugin for Bevy."
@@ -11,29 +11,31 @@ keywords = ["gamedev", "bevy", "outline"]
1111
categories = ["game-engines", "rendering"]
1212

1313
[dependencies]
14-
bevy = { version = "0.18", default-features = false, features = [
14+
bevy = { version = "0.19.0-rc.1", default-features = false, features = [
1515
"std",
1616
"async_executor",
1717
"bevy_log",
1818
"bevy_color",
1919
"bevy_image",
20+
"bevy_anti_alias",
2021
"bevy_pbr",
2122
] }
2223
bitfield = "0.15"
24+
indexmap = "2"
2325
interpolation = { version = "0.3", optional = true }
2426
thiserror = "1.0"
2527
nonmax = "0.5"
26-
wgpu-types = "27"
28+
wgpu-types = "29"
2729
itertools = { version = "0.14", optional = true }
2830

2931
[features]
30-
default = ["flood", "interpolation", "reflect", "scene"]
32+
default = ["flood", "interpolation", "reflect", "world_serialisation"]
3133
flood = ["dep:itertools"]
3234
reflect = []
33-
scene = ["bevy/bevy_scene"]
35+
world_serialisation = ["bevy/bevy_world_serialization"]
3436

3537
[dev-dependencies]
36-
bevy = { version = "0.18", default-features = false, features = [
38+
bevy = { version = "0.19.0-rc.1", default-features = false, features = [
3739
"gltf_animation",
3840
"bevy_anti_alias",
3941
"bevy_gltf",

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ vertex extrusion and jump flood methods.
1212

1313
```toml
1414
[dependencies]
15-
bevy_mod_outline = "0.12"
15+
bevy_mod_outline = "0.13"
1616
```
1717

1818
## Examples
@@ -96,6 +96,7 @@ cargo run --example picking
9696

9797
| This Version | Bevy version |
9898
|--------------|--------------|
99+
| 0.13.x | 0.19.x |
99100
| 0.12.x | 0.18.x |
100101
| 0.11.x | 0.17.x |
101102
| 0.10.x | 0.16.x |
@@ -115,7 +116,7 @@ cargo run --example picking
115116
- `interpolation` _(default)_ - Define `Lerp` trait impls using the
116117
`interpolation` crate.
117118
- `reflect` _(default)_ Define `Reflect` trait impls for the components.
118-
- `scene` _(default)_ Enable the `AsyncSceneInheritOutline` component.
119+
- `world_serialisation` _(default)_ Enable the `AsyncWorldInheritOutline` component.
119120

120121
## Licence
121122

examples/alpha_mask.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ fn setup(
7878
PointLight {
7979
color: Color::WHITE,
8080
intensity: 1500.0,
81-
shadows_enabled: true,
81+
shadow_maps_enabled: true,
8282
..default()
8383
},
8484
Transform::from_xyz(4.0, 8.0, 4.0),

examples/animated_fox.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use std::f32::consts::PI;
22

3-
use bevy::{prelude::*, scene::SceneInstance};
3+
use bevy::{prelude::*, world_serialization::WorldInstance};
44
use bevy_mod_outline::{
5-
AsyncSceneInheritOutline, AutoGenerateOutlineNormalsPlugin, OutlinePlugin, OutlineVolume,
5+
AsyncWorldInheritOutline, AutoGenerateOutlineNormalsPlugin, OutlinePlugin, OutlineVolume,
66
};
77

88
#[derive(Resource)]
@@ -51,29 +51,29 @@ fn setup(
5151
// Light
5252
commands.spawn((
5353
DirectionalLight {
54-
shadows_enabled: true,
54+
shadow_maps_enabled: true,
5555
..default()
5656
},
5757
Transform::from_rotation(Quat::from_euler(EulerRot::ZYX, 0.0, 1.0, -PI / 4.)),
5858
));
5959

6060
// Fox
6161
commands.spawn((
62-
SceneRoot(asset_server.load("Fox.glb#Scene0")),
62+
WorldAssetRoot(asset_server.load("Fox.glb#Scene0")),
6363
OutlineVolume {
6464
visible: true,
6565
width: 3.0,
6666
colour: Color::srgb(1.0, 0.0, 0.0),
6767
},
68-
AsyncSceneInheritOutline::default(),
68+
AsyncWorldInheritOutline::default(),
6969
));
7070
}
7171

7272
// Once the scene is loaded, start the animation
7373
fn setup_scene_once_loaded(
7474
mut commands: Commands,
75-
scene_query: Query<&SceneInstance>,
76-
scene_manager: Res<SceneSpawner>,
75+
scene_query: Query<&WorldInstance>,
76+
scene_manager: Res<WorldInstanceSpawner>,
7777
mut player_query: Query<(Entity, &mut AnimationPlayer)>,
7878
animation: Res<Fox>,
7979
mut done: Local<bool>,

examples/bloom.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use std::f32::consts::{PI, TAU};
22

33
use bevy::{
4+
camera::Hdr,
45
post_process::bloom::{Bloom, BloomCompositeMode},
56
prelude::*,
6-
render::view::Hdr,
77
};
88

99
use bevy_mod_outline::*;

examples/hollow.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use std::f32::consts::{PI, TAU};
22

3-
use bevy::{gltf::GltfPlugin, prelude::*, scene::SceneInstance};
3+
use bevy::{gltf::GltfPlugin, prelude::*, world_serialization::WorldInstance};
44
use bevy_mod_outline::{
5-
AsyncSceneInheritOutline, OutlinePlugin, OutlineVolume, ATTRIBUTE_OUTLINE_NORMAL,
5+
AsyncWorldInheritOutline, OutlinePlugin, OutlineVolume, ATTRIBUTE_OUTLINE_NORMAL,
66
};
77

88
fn main() {
@@ -41,29 +41,29 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
4141
commands.spawn((
4242
Transform::from_rotation(Quat::from_euler(EulerRot::ZYX, 0.0, 1.0, -PI / 4.)),
4343
DirectionalLight {
44-
shadows_enabled: true,
44+
shadow_maps_enabled: true,
4545
..default()
4646
},
4747
));
4848

4949
// Hollow
5050
commands.spawn((
51-
SceneRoot(asset_server.load("hollow.glb#Scene0")),
51+
WorldAssetRoot(asset_server.load("hollow.glb#Scene0")),
5252
RotatesAndPulses,
5353
OutlineVolume {
5454
visible: true,
5555
width: 0.0,
5656
colour: Color::srgb(0.0, 0.0, 1.0),
5757
},
58-
AsyncSceneInheritOutline::default(),
58+
AsyncWorldInheritOutline::default(),
5959
));
6060
}
6161

6262
// Once the scene is loaded, start the animation and add an outline
6363
fn setup_scene_once_loaded(
6464
mut commands: Commands,
65-
scene_query: Query<&SceneInstance>,
66-
scene_manager: Res<SceneSpawner>,
65+
scene_query: Query<&WorldInstance>,
66+
scene_manager: Res<WorldInstanceSpawner>,
6767
name_query: Query<&Name, With<Mesh3d>>,
6868
mut done: Local<bool>,
6969
) {
@@ -103,7 +103,7 @@ fn rotates_hue(
103103
timer: Res<Time>,
104104
) {
105105
for handle in query.iter() {
106-
let material = materials.get_mut(handle.id()).unwrap();
106+
let mut material = materials.get_mut(handle.id()).unwrap();
107107
if let Color::Hsla(hsla) = material.base_color {
108108
material.base_color = Color::Hsla(Hsla {
109109
hue: (hsla.hue + 15.0 * timer.delta_secs()) % 360.0,

examples/morph_targets.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//! - How to read morph target names in [`name_morphs`].
88
//! - How to play morph target animations in [`setup_animations`].
99
10-
use bevy::{prelude::*, scene::SceneInstance};
10+
use bevy::{prelude::*, world_serialization::WorldInstance};
1111
use bevy_mod_outline::{
1212
AutoGenerateOutlineNormalsPlugin, InheritOutline, OutlinePlugin, OutlineVolume,
1313
};
@@ -43,7 +43,7 @@ fn setup(asset_server: Res<AssetServer>, mut commands: Commands) {
4343
mesh: asset_server.load("MorphStressTest.gltf#Mesh0/Primitive0"),
4444
});
4545
commands.spawn((
46-
SceneRoot(asset_server.load("MorphStressTest.gltf#Scene0")),
46+
WorldAssetRoot(asset_server.load("MorphStressTest.gltf#Scene0")),
4747
OutlineVolume {
4848
visible: true,
4949
width: 3.0,
@@ -65,8 +65,8 @@ fn setup(asset_server: Res<AssetServer>, mut commands: Commands) {
6565
fn setup_outlines(
6666
mut commands: Commands,
6767
mut has_setup: Local<bool>,
68-
scene_query: Query<&SceneInstance>,
69-
scene_manager: Res<SceneSpawner>,
68+
scene_query: Query<&WorldInstance>,
69+
scene_manager: Res<WorldInstanceSpawner>,
7070
) {
7171
if *has_setup {
7272
return;

examples/picking.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ fn setup(
7575
commands.spawn((
7676
PointLight {
7777
color: Color::srgb_u8(255, 255, 192),
78-
shadows_enabled: true,
78+
shadow_maps_enabled: true,
7979
..default()
8080
},
8181
Transform::from_xyz(4.0, 8.0, 4.0),

examples/pieces.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ fn setup(
8383
));
8484
commands.spawn((
8585
PointLight {
86-
shadows_enabled: true,
86+
shadow_maps_enabled: true,
8787
..default()
8888
},
8989
Transform::from_xyz(4.0, 8.0, 4.0),

0 commit comments

Comments
 (0)