From 4866148a21b5c54d18f1fbba8a7b8eea13bf99ee Mon Sep 17 00:00:00 2001 From: Robin KAY Date: Wed, 8 Nov 2023 23:17:42 +0000 Subject: [PATCH] Add pulsing outline to hollow example. --- examples/hollow.rs | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/examples/hollow.rs b/examples/hollow.rs index 5757f46..2efb6c7 100644 --- a/examples/hollow.rs +++ b/examples/hollow.rs @@ -20,13 +20,18 @@ fn main() { .add_systems(Startup, setup) .add_systems( Update, - (setup_scene_once_loaded, rotates, rotates_hue, close_on_esc), + ( + setup_scene_once_loaded, + rotates_and_pulses, + rotates_hue, + close_on_esc, + ), ) .run(); } #[derive(Component)] -struct Rotates; +struct RotatesAndPulses; #[derive(Component)] struct RotatesHue; @@ -55,11 +60,11 @@ fn setup(mut commands: Commands, asset_server: Res) { scene: asset_server.load("hollow.glb#Scene0"), ..default() }) - .insert(Rotates) + .insert(RotatesAndPulses) .insert(OutlineBundle { outline: OutlineVolume { visible: true, - width: 7.5, + width: 0.0, colour: Color::BLUE, }, stencil: OutlineStencil { @@ -97,11 +102,17 @@ fn setup_scene_once_loaded( } } -fn rotates(mut query: Query<&mut Transform, With>, timer: Res