diff --git a/bevy_b3d/src/loader.rs b/bevy_b3d/src/loader.rs index 0ec60dd..00c9568 100755 --- a/bevy_b3d/src/loader.rs +++ b/bevy_b3d/src/loader.rs @@ -5,7 +5,6 @@ use bevy::{ render::{ mesh::Indices, render_asset::RenderAssetUsages, - render_asset::RenderAssetUsages, render_resource::PrimitiveTopology, renderer::RenderDevice, texture::{CompressedImageFormats, ImageSampler, ImageType, TextureError}, @@ -203,10 +202,6 @@ fn load_mesh(b3d_mesh: &b3d::Mesh, index: u32) -> Result<(Mesh, String), B3DErro PrimitiveTopology::TriangleList, RenderAssetUsages::default(), ); - let mut mesh = Mesh::new( - PrimitiveTopology::TriangleList, - RenderAssetUsages::default(), - ); if let Some(vertex_attribute) = b3d_mesh .vertices @@ -250,7 +245,6 @@ fn load_mesh(b3d_mesh: &b3d::Mesh, index: u32) -> Result<(Mesh, String), B3DErro .into() { mesh.insert_indices(Indices::U32(vertex_attribute)); - mesh.insert_indices(Indices::U32(vertex_attribute)); } if let Err(err) = mesh.generate_tangents() {