Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## bevy_mod_outline 0.13.0 (unreleased)

###
- Added frustum culling.

### Removed
- Removed facility to warm-up invisible outlines.

### Changed
- Updated Bevy dependency to 0.19.

## bevy_mod_outline 0.12.1 (2026-05-11)

## Changed
Expand Down
14 changes: 8 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_mod_outline"
version = "0.12.1"
version = "0.13.0"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "A mesh outlining plugin for Bevy."
Expand All @@ -11,29 +11,31 @@ keywords = ["gamedev", "bevy", "outline"]
categories = ["game-engines", "rendering"]

[dependencies]
bevy = { version = "0.18", default-features = false, features = [
bevy = { version = "0.19.0-rc.1", default-features = false, features = [
"std",
"async_executor",
"bevy_log",
"bevy_color",
"bevy_image",
"bevy_anti_alias",
"bevy_pbr",
] }
bitfield = "0.15"
indexmap = "2"
interpolation = { version = "0.3", optional = true }
thiserror = "1.0"
nonmax = "0.5"
wgpu-types = "27"
wgpu-types = "29"
itertools = { version = "0.14", optional = true }

[features]
default = ["flood", "interpolation", "reflect", "scene"]
default = ["flood", "interpolation", "reflect", "world_serialisation"]
flood = ["dep:itertools"]
reflect = []
scene = ["bevy/bevy_scene"]
world_serialisation = ["bevy/bevy_world_serialization"]

[dev-dependencies]
bevy = { version = "0.18", default-features = false, features = [
bevy = { version = "0.19.0-rc.1", default-features = false, features = [
"gltf_animation",
"bevy_anti_alias",
"bevy_gltf",
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ vertex extrusion and jump flood methods.

```toml
[dependencies]
bevy_mod_outline = "0.12"
bevy_mod_outline = "0.13"
```

## Examples
Expand Down Expand Up @@ -96,6 +96,7 @@ cargo run --example picking

| This Version | Bevy version |
|--------------|--------------|
| 0.13.x | 0.19.x |
| 0.12.x | 0.18.x |
| 0.11.x | 0.17.x |
| 0.10.x | 0.16.x |
Expand All @@ -115,7 +116,7 @@ cargo run --example picking
- `interpolation` _(default)_ - Define `Lerp` trait impls using the
`interpolation` crate.
- `reflect` _(default)_ Define `Reflect` trait impls for the components.
- `scene` _(default)_ Enable the `AsyncSceneInheritOutline` component.
- `world_serialisation` _(default)_ Enable the `AsyncWorldInheritOutline` component.

## Licence

Expand Down
2 changes: 1 addition & 1 deletion examples/alpha_mask.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ fn setup(
PointLight {
color: Color::WHITE,
intensity: 1500.0,
shadows_enabled: true,
shadow_maps_enabled: true,
..default()
},
Transform::from_xyz(4.0, 8.0, 4.0),
Expand Down
14 changes: 7 additions & 7 deletions examples/animated_fox.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use std::f32::consts::PI;

use bevy::{prelude::*, scene::SceneInstance};
use bevy::{prelude::*, world_serialization::WorldInstance};
use bevy_mod_outline::{
AsyncSceneInheritOutline, AutoGenerateOutlineNormalsPlugin, OutlinePlugin, OutlineVolume,
AsyncWorldInheritOutline, AutoGenerateOutlineNormalsPlugin, OutlinePlugin, OutlineVolume,
};

#[derive(Resource)]
Expand Down Expand Up @@ -51,29 +51,29 @@ fn setup(
// Light
commands.spawn((
DirectionalLight {
shadows_enabled: true,
shadow_maps_enabled: true,
..default()
},
Transform::from_rotation(Quat::from_euler(EulerRot::ZYX, 0.0, 1.0, -PI / 4.)),
));

// Fox
commands.spawn((
SceneRoot(asset_server.load("Fox.glb#Scene0")),
WorldAssetRoot(asset_server.load("Fox.glb#Scene0")),
OutlineVolume {
visible: true,
width: 3.0,
colour: Color::srgb(1.0, 0.0, 0.0),
},
AsyncSceneInheritOutline::default(),
AsyncWorldInheritOutline::default(),
));
}

// Once the scene is loaded, start the animation
fn setup_scene_once_loaded(
mut commands: Commands,
scene_query: Query<&SceneInstance>,
scene_manager: Res<SceneSpawner>,
scene_query: Query<&WorldInstance>,
scene_manager: Res<WorldInstanceSpawner>,
mut player_query: Query<(Entity, &mut AnimationPlayer)>,
animation: Res<Fox>,
mut done: Local<bool>,
Expand Down
2 changes: 1 addition & 1 deletion examples/bloom.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use std::f32::consts::{PI, TAU};

use bevy::{
camera::Hdr,
post_process::bloom::{Bloom, BloomCompositeMode},
prelude::*,
render::view::Hdr,
};

use bevy_mod_outline::*;
Expand Down
16 changes: 8 additions & 8 deletions examples/hollow.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use std::f32::consts::{PI, TAU};

use bevy::{gltf::GltfPlugin, prelude::*, scene::SceneInstance};
use bevy::{gltf::GltfPlugin, prelude::*, world_serialization::WorldInstance};
use bevy_mod_outline::{
AsyncSceneInheritOutline, OutlinePlugin, OutlineVolume, ATTRIBUTE_OUTLINE_NORMAL,
AsyncWorldInheritOutline, OutlinePlugin, OutlineVolume, ATTRIBUTE_OUTLINE_NORMAL,
};

fn main() {
Expand Down Expand Up @@ -41,29 +41,29 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
commands.spawn((
Transform::from_rotation(Quat::from_euler(EulerRot::ZYX, 0.0, 1.0, -PI / 4.)),
DirectionalLight {
shadows_enabled: true,
shadow_maps_enabled: true,
..default()
},
));

// Hollow
commands.spawn((
SceneRoot(asset_server.load("hollow.glb#Scene0")),
WorldAssetRoot(asset_server.load("hollow.glb#Scene0")),
RotatesAndPulses,
OutlineVolume {
visible: true,
width: 0.0,
colour: Color::srgb(0.0, 0.0, 1.0),
},
AsyncSceneInheritOutline::default(),
AsyncWorldInheritOutline::default(),
));
}

// Once the scene is loaded, start the animation and add an outline
fn setup_scene_once_loaded(
mut commands: Commands,
scene_query: Query<&SceneInstance>,
scene_manager: Res<SceneSpawner>,
scene_query: Query<&WorldInstance>,
scene_manager: Res<WorldInstanceSpawner>,
name_query: Query<&Name, With<Mesh3d>>,
mut done: Local<bool>,
) {
Expand Down Expand Up @@ -103,7 +103,7 @@ fn rotates_hue(
timer: Res<Time>,
) {
for handle in query.iter() {
let material = materials.get_mut(handle.id()).unwrap();
let mut material = materials.get_mut(handle.id()).unwrap();
if let Color::Hsla(hsla) = material.base_color {
material.base_color = Color::Hsla(Hsla {
hue: (hsla.hue + 15.0 * timer.delta_secs()) % 360.0,
Expand Down
8 changes: 4 additions & 4 deletions examples/morph_targets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//! - How to read morph target names in [`name_morphs`].
//! - How to play morph target animations in [`setup_animations`].

use bevy::{prelude::*, scene::SceneInstance};
use bevy::{prelude::*, world_serialization::WorldInstance};
use bevy_mod_outline::{
AutoGenerateOutlineNormalsPlugin, InheritOutline, OutlinePlugin, OutlineVolume,
};
Expand Down Expand Up @@ -43,7 +43,7 @@ fn setup(asset_server: Res<AssetServer>, mut commands: Commands) {
mesh: asset_server.load("MorphStressTest.gltf#Mesh0/Primitive0"),
});
commands.spawn((
SceneRoot(asset_server.load("MorphStressTest.gltf#Scene0")),
WorldAssetRoot(asset_server.load("MorphStressTest.gltf#Scene0")),
OutlineVolume {
visible: true,
width: 3.0,
Expand All @@ -65,8 +65,8 @@ fn setup(asset_server: Res<AssetServer>, mut commands: Commands) {
fn setup_outlines(
mut commands: Commands,
mut has_setup: Local<bool>,
scene_query: Query<&SceneInstance>,
scene_manager: Res<SceneSpawner>,
scene_query: Query<&WorldInstance>,
scene_manager: Res<WorldInstanceSpawner>,
) {
if *has_setup {
return;
Expand Down
2 changes: 1 addition & 1 deletion examples/picking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ fn setup(
commands.spawn((
PointLight {
color: Color::srgb_u8(255, 255, 192),
shadows_enabled: true,
shadow_maps_enabled: true,
..default()
},
Transform::from_xyz(4.0, 8.0, 4.0),
Expand Down
2 changes: 1 addition & 1 deletion examples/pieces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ fn setup(
));
commands.spawn((
PointLight {
shadows_enabled: true,
shadow_maps_enabled: true,
..default()
},
Transform::from_xyz(4.0, 8.0, 4.0),
Expand Down
2 changes: 1 addition & 1 deletion examples/render_layers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fn setup(
));
commands.spawn((
PointLight {
shadows_enabled: true,
shadow_maps_enabled: true,
..default()
},
Transform::from_xyz(4.0, 8.0, 4.0),
Expand Down
2 changes: 1 addition & 1 deletion examples/shapes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ fn setup(
));
commands.spawn((
PointLight {
shadows_enabled: true,
shadow_maps_enabled: true,
..default()
},
Transform::from_xyz(4.0, 8.0, 4.0),
Expand Down
2 changes: 1 addition & 1 deletion examples/ui_aa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ fn setup(
// Add light source and camera
commands.spawn((
PointLight {
shadows_enabled: true,
shadow_maps_enabled: true,
..default()
},
Transform::from_xyz(4.0, 8.0, 4.0),
Expand Down
2 changes: 1 addition & 1 deletion src/computed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl<T: Clone> Sourced<T> {
}
} else if let Some(v) = fallback {
Sourced {
value: f(&v.clone().into()),
value: f(&v.as_ref().clone().into()),
source: Source::SetFallback,
}
} else if let Some(v) = inherit {
Expand Down
Loading
Loading