From 31cb2e6de12e103c08a98f1b44f4f184f5776630 Mon Sep 17 00:00:00 2001 From: "Spencer C. Imbleau" Date: Mon, 10 Feb 2025 20:20:31 -0500 Subject: [PATCH] fix: some bundles --- examples/drag_n_drop/src/main.rs | 20 ++++---------------- examples/scene_ui/src/main.rs | 6 ++---- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/examples/drag_n_drop/src/main.rs b/examples/drag_n_drop/src/main.rs index 4d757bd..0858034 100644 --- a/examples/drag_n_drop/src/main.rs +++ b/examples/drag_n_drop/src/main.rs @@ -116,10 +116,7 @@ fn button_system( }; let handle = asset_server.add(svg); commands.trigger(CleanupEvent); - commands.spawn(VelloSvgBundle { - asset: VelloSvgHandle(handle), - ..default() - }); + commands.spawn(VelloSvgHandle(handle)); } else if file_name.ends_with(".json") { let lottie = match bevy_vello::integrations::lottie::load_lottie_from_bytes(&file) { Ok(lottie) => lottie, @@ -130,10 +127,7 @@ fn button_system( }; let handle = asset_server.add(lottie); commands.trigger(CleanupEvent); - commands.spawn(VelloLottieBundle { - asset: VelloLottieHandle(handle), - ..default() - }); + commands.spawn(VelloLottieHandle(handle)); } } } @@ -156,16 +150,10 @@ fn drag_and_drop( let lottie_ext = OsStr::new("json"); if ext == svg_ext { commands.trigger(CleanupEvent); - commands.spawn(VelloSvgBundle { - asset: VelloSvgHandle(asset_server.load(path_buf.clone())), - ..default() - }); + commands.spawn(VelloSvgHandle(asset_server.load(path_buf.clone()))); } else if ext == lottie_ext { commands.trigger(CleanupEvent); - commands.spawn(VelloLottieBundle { - asset: VelloLottieHandle(asset_server.load(path_buf.clone())), - ..default() - }); + commands.spawn(VelloLottieHandle(asset_server.load(path_buf.clone()))); } } } diff --git a/examples/scene_ui/src/main.rs b/examples/scene_ui/src/main.rs index 07d9216..e15dbe0 100644 --- a/examples/scene_ui/src/main.rs +++ b/examples/scene_ui/src/main.rs @@ -30,10 +30,8 @@ fn setup_ui(mut commands: Commands) { }, BorderColor(css::FUCHSIA.with_alpha(0.5).into()), Interaction::default(), - VelloSceneBundle { - coordinate_space: CoordinateSpace::ScreenSpace, - ..default() - }, + VelloScene::new(), + CoordinateSpace::ScreenSpace, )); }