Skip to content

Commit

Permalink
fix: some bundles
Browse files Browse the repository at this point in the history
  • Loading branch information
simbleau committed Feb 11, 2025
1 parent a094ab0 commit 31cb2e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 deletions.
20 changes: 4 additions & 16 deletions examples/drag_n_drop/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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));
}
}
}
Expand All @@ -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())));
}
}
}
Expand Down
6 changes: 2 additions & 4 deletions examples/scene_ui/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
));
}

Expand Down

0 comments on commit 31cb2e6

Please sign in to comment.