Open davids91 opened 11 months ago
Hey! Nice library! Hope to utilize it to its potential! Is there a possibility to support Bevy mesh formats?
In the following format for example:
// ( inside a struct ) pub(crate) positions: Vec<[f32; 3]>, pub(crate) normals: Vec<[f32; 3]>, pub(crate) uvs: Vec<[f32; 2]>, // inside the struct implementation let mut mesh = Mesh::new(PrimitiveTopology::TriangleList); mesh.insert_attribute(Mesh::ATTRIBUTE_UV_0, std::mem::take(&mut self.uvs)); mesh.insert_attribute( Mesh::ATTRIBUTE_POSITION, std::mem::take(&mut self.positions), ); mesh.insert_attribute(Mesh::ATTRIBUTE_NORMAL, std::mem::take(&mut self.normals)); mesh.set_indices(Some(mesh::Indices::U32(std::mem::take( &mut self.triangle_indices, ))));
The difference between this, and Vec<Vertex> is that the data is stored in standalone arrays, not interleaved as in the Vertex Vec.
Vec<Vertex>
I don't think this would be possible without upstream support
Hey! Nice library! Hope to utilize it to its potential! Is there a possibility to support Bevy mesh formats?
In the following format for example:
The difference between this, and
Vec<Vertex>
is that the data is stored in standalone arrays, not interleaved as in the Vertex Vec.