Skip to content

Commit

Permalink
Maybe fix sprites drawing on top of lines. (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
Toqozz committed Jun 15, 2022
1 parent f3d62f8 commit a03cac8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions examples/sprite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
commands.spawn_bundle(camera);
commands.spawn_bundle(SpriteBundle {
texture: asset_server.load("icon.png"),
transform: Transform::from_translation(Vec3::new(0.0, 0.0, 0.3)),
..default()
});
}

fn demo(mut lines: ResMut<DebugLines>) {
lines.line_colored(
Vec3::new(-400.0, 0.0, 0.0),
Vec3::new(400.0, 0.0, 0.0),
Vec3::new(-400.0, 0.0, 0.5),
Vec3::new(400.0, 0.0, 0.5),
0.9,
Color::GREEN,
);
Expand Down
2 changes: 1 addition & 1 deletion src/render_dim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ pub mod r2d {
entity: *visible_entity,
draw_function: draw_mesh2d,
pipeline,
sort_key: FloatOrd(1.0),
sort_key: FloatOrd(f32::INFINITY),
batch_range: None,
});
}
Expand Down

0 comments on commit a03cac8

Please sign in to comment.