Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
rewin123 committed Sep 28, 2024
1 parent de3a3ce commit 3c9abef
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 19 deletions.
1 change: 0 additions & 1 deletion crates/editor_ui/src/menu_toolbars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ impl Plugin for BottomMenuPlugin {
app.init_resource::<EditorLoader>();
app.init_resource::<MenuToolbarState>();


app.add_systems(
Update,
bottom_menu
Expand Down
5 changes: 1 addition & 4 deletions crates/editor_ui/src/meshless_visualizer.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
use anyhow::anyhow;
use bevy::{
math::primitives as math_shapes,
prelude::*,
render::view::RenderLayers,
utils::HashMap,
math::primitives as math_shapes, prelude::*, render::view::RenderLayers, utils::HashMap,
};
use bevy_asset_loader::{
asset_collection::AssetCollection,
Expand Down
10 changes: 4 additions & 6 deletions crates/editor_ui/src/tools/gizmo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,12 +399,10 @@ impl EditorTool for GizmoTool {
if let Some(parent) = cell.get_entity(parent.get()) {
if let Some(parent_global) = unsafe { parent.get::<GlobalTransform>() } {
if let Some(global) = unsafe { ecell.get::<GlobalTransform>() } {
if let Some((_, transforms)) = Gizmo::new(gizmo_config)
.interact(
ui,
&[bevy_to_gizmo_transform(&global.compute_transform())],
)
{
if let Some((_, transforms)) = Gizmo::new(gizmo_config).interact(
ui,
&[bevy_to_gizmo_transform(&global.compute_transform())],
) {
disable_pan_orbit = true;
let new_transform = gizmo_to_bevy_transform(&transforms[0]);

Expand Down
19 changes: 11 additions & 8 deletions crates/prefab/src/spawn_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,17 @@ pub fn sync_spritesheet(
texture_atlas.to_texture_atlas(prefab, &mut texture_atlases, &asset_server)
{
if let Some(clip) = clips.clips.get(&clip_name.name) {
commands.entity(e).insert(SpriteBundle {
texture: texture_atlas.clone().texture.unwrap_or_default(),
transform: Transform::from_scale(Vec3::splat(6.0)),
..default()
}).insert(TextureAtlas {
layout: atlas,
index: clip.first,
});
commands
.entity(e)
.insert(SpriteBundle {
texture: texture_atlas.clone().texture.unwrap_or_default(),
transform: Transform::from_scale(Vec3::splat(6.0)),
..default()
})
.insert(TextureAtlas {
layout: atlas,
index: clip.first,
});
};
}
}
Expand Down

0 comments on commit 3c9abef

Please sign in to comment.