Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
cart committed Dec 18, 2020
1 parent af9fc1c commit 6d664bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 deletions.
11 changes: 4 additions & 7 deletions examples/tools/bevymark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,13 @@ fn mouse_handler(
let bird_y = (window.height / 2.) - HALF_BIRD_SIZE;

for count in 0..spawn_count {
let bird_position = Vec3::new(bird_x, bird_y, (counter.count + count) as f32 * 0.00001);
let mut transform = Transform::from_translation(bird_position);
transform.scale = Vec3::new(BIRD_SCALE, BIRD_SCALE, BIRD_SCALE);

let bird_z = (counter.count + count) as f32 * 0.00001;
commands
.spawn(SpriteBundle {
material: bird_material.0.clone(),
transform,
visible: Visible {
is_transparent: true,
transform: Transform {
translation: Vec3::new(bird_x, bird_y, bird_z),
scale: Vec3::splat(BIRD_SCALE),
..Default::default()
},
..Default::default()
Expand Down
16 changes: 0 additions & 16 deletions examples/ui/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,6 @@ fn setup(
..Default::default()
},
material: materials.add(Color::NONE.into()),
visible: Visible {
is_transparent: true,
..Default::default()
},
..Default::default()
})
.with_children(|parent| {
Expand Down Expand Up @@ -188,10 +184,6 @@ fn setup(
..Default::default()
},
material: materials.add(Color::rgba(1.0, 0.9, 0.9, 0.4).into()),
visible: Visible {
is_transparent: true,
..Default::default()
},
..Default::default()
});
});
Expand All @@ -206,10 +198,6 @@ fn setup(
..Default::default()
},
material: materials.add(Color::NONE.into()),
visible: Visible {
is_transparent: true,
..Default::default()
},
..Default::default()
})
.with_children(|parent| {
Expand All @@ -221,10 +209,6 @@ fn setup(
},
material: materials
.add(asset_server.load("branding/bevy_logo_dark_big.png").into()),
visible: Visible {
is_transparent: true,
..Default::default()
},
..Default::default()
});
});
Expand Down

0 comments on commit 6d664bd

Please sign in to comment.