rbx_mesh (0.1.1)
Published 2024-03-29 07:47:10 +00:00 by Quaternions
Installation
[registry]
default = "gitea"
[registries.gitea]
index = "sparse+ " # Sparse index
# index = " " # Git
[net]
git-fetch-with-cli = true
cargo add rbx_mesh@0.1.1
About this package
Rust parser for Roblox mesh files.
Roblox Mesh Parser
Example
use rbx_mesh::{read_versioned,mesh::{VersionedMesh,SizeOfVertex2}};
let file=std::fs::File::open("torso.mesh")?;
let input=std::io::BufReader::new(file);
let versioned_mesh=read_versioned(input)?;
match versioned_mesh{
VersionedMesh::Version1(mesh)=>println!("{:?}",mesh.vertices),
VersionedMesh::Version2(mesh)=>{
match mesh.header.sizeof_vertex{
SizeOfVertex2::Full=>println!("{:?}",mesh.vertices),
SizeOfVertex2::Truncated=>println!("{:?}",mesh.vertices_truncated),
}
},
VersionedMesh::Version3(mesh)=>{
match mesh.header.sizeof_vertex{
SizeOfVertex2::Full=>println!("{:?}",mesh.vertices),
SizeOfVertex2::Truncated=>println!("{:?}",mesh.vertices_truncated),
}
},
VersionedMesh::Version4(mesh)=>println!("{:?}",mesh.vertices),
VersionedMesh::Version5(mesh)=>println!("{:?}",mesh.vertices),
}
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Dependencies
ID | Version |
---|---|
binrw | ^0.13.3 |
lazy-regex | ^3.1.0 |
Details
2024-03-29 07:47:10 +00:00
Assets (1)
Versions (1)
View all
Cargo
11
Rhys Lloyd <krakow20@gmail.com>
MIT OR Apache-2.0
9.1 KiB
rbx_mesh-0.1.1.crate
9.1 KiB
0.1.1
2024-03-29