The Blitz3d game engine uses the .b3d
extension, which is provided by this crate.
let bytes = unimplemented!();
let b3d = b3d::B3D::read(bytes).unwrap();
let vertices = b3d.node.mesh.vertices.vertices;
let positions: Vec<_> = vertices.iter().map(|v| v.position).collect();
let normals: Vec<_> = vertices.iter().map(|v| v.normal).collect();
println!("Postions: {:#?}", positions);
println!("Normals: {:#?}", normals);
- Write documentation
- Switch to binrw
- Implement bones and weights
- Add examples