We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0fce6f0 commit 8f1eaa6Copy full SHA for 8f1eaa6
crates/bevy_gltf/src/loader.rs
@@ -142,6 +142,13 @@ async fn load_gltf<'a, 'b>(
142
mesh.set_attribute(Mesh::ATTRIBUTE_UV_0, vertex_attribute);
143
}
144
145
+ if let Some(vertex_attribute) = reader
146
+ .read_colors(0)
147
+ .map(|v| VertexAttributeValues::Float4(v.into_rgba_f32().collect()))
148
+ {
149
+ mesh.set_attribute(Mesh::ATTRIBUTE_COLOR, vertex_attribute);
150
+ }
151
+
152
if let Some(indices) = reader.read_indices() {
153
mesh.set_indices(Some(Indices::U32(indices.into_u32().collect())));
154
};
0 commit comments