Skip to content

Commit

Permalink
renamed VertexFormat & VertexAttributeValues
Browse files Browse the repository at this point in the history
  • Loading branch information
mockersf committed May 2, 2021
1 parent 44edcad commit ad17b5f
Show file tree
Hide file tree
Showing 6 changed files with 315 additions and 315 deletions.
10 changes: 5 additions & 5 deletions crates/bevy_gltf/src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,35 +116,35 @@ async fn load_gltf<'a, 'b>(

if let Some(vertex_attribute) = reader
.read_positions()
.map(|v| VertexAttributeValues::Float3(v.collect()))
.map(|v| VertexAttributeValues::Float32x3(v.collect()))
{
mesh.set_attribute(Mesh::ATTRIBUTE_POSITION, vertex_attribute);
}

if let Some(vertex_attribute) = reader
.read_normals()
.map(|v| VertexAttributeValues::Float3(v.collect()))
.map(|v| VertexAttributeValues::Float32x3(v.collect()))
{
mesh.set_attribute(Mesh::ATTRIBUTE_NORMAL, vertex_attribute);
}

if let Some(vertex_attribute) = reader
.read_tangents()
.map(|v| VertexAttributeValues::Float4(v.collect()))
.map(|v| VertexAttributeValues::Float32x4(v.collect()))
{
mesh.set_attribute(Mesh::ATTRIBUTE_TANGENT, vertex_attribute);
}

if let Some(vertex_attribute) = reader
.read_tex_coords(0)
.map(|v| VertexAttributeValues::Float2(v.into_f32().collect()))
.map(|v| VertexAttributeValues::Float32x2(v.into_f32().collect()))
{
mesh.set_attribute(Mesh::ATTRIBUTE_UV_0, vertex_attribute);
}

if let Some(vertex_attribute) = reader
.read_colors(0)
.map(|v| VertexAttributeValues::Float4(v.into_rgba_f32().collect()))
.map(|v| VertexAttributeValues::Float32x4(v.into_rgba_f32().collect()))
{
mesh.set_attribute(Mesh::ATTRIBUTE_COLOR, vertex_attribute);
}
Expand Down
Loading

0 comments on commit ad17b5f

Please sign in to comment.