From 2343bbc97411398498f2c33c5bf2b590797444dd Mon Sep 17 00:00:00 2001 From: Schmarni Date: Mon, 15 Sep 2025 08:23:47 +0200 Subject: [PATCH] chore(lines): a bit of cleanup Signed-off-by: Schmarni --- src/nodes/drawable/lines.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/nodes/drawable/lines.rs b/src/nodes/drawable/lines.rs index f4b0a29..7a1555a 100644 --- a/src/nodes/drawable/lines.rs +++ b/src/nodes/drawable/lines.rs @@ -95,12 +95,7 @@ fn build_line_mesh( None => { // if we couldn't get the lines entity then we need to gen the mesh later lines.gen_mesh.store(true, Ordering::Relaxed); - let e = cmds.spawn(( - Name::new("LinesNode"), - SpatialNode(Arc::downgrade(&lines.spatial)), - )); - _ = lines.entity.set(e.id().into()); - e + continue; } } .remove::(); @@ -211,7 +206,7 @@ fn build_line_mesh( RenderAssetUsages::RENDER_WORLD, ); mesh.insert_indices(Indices::U32(vertex_indices)); - mesh.insert_attribute(Mesh::ATTRIBUTE_POSITION, vertex_positions.clone()); + mesh.insert_attribute(Mesh::ATTRIBUTE_POSITION, vertex_positions); mesh.insert_attribute(Mesh::ATTRIBUTE_NORMAL, vertex_normals); mesh.insert_attribute(Mesh::ATTRIBUTE_COLOR, vertex_colors); @@ -226,7 +221,7 @@ fn build_line_mesh( base_color: Color::WHITE, perceptual_roughness: 1.0, // TODO: this should be Blend - alpha_mode: AlphaMode::Opaque, + alpha_mode: AlphaMode::Blend, emissive: Color::srgba_u8(128 / 4, 128 / 4, 128 / 4, 255).into(), ..default() },