Crate wow_m2

Crate wow_m2 

Source
Expand description

A parser for World of Warcraft M2 model files with version conversion support

This library allows parsing, validating, and converting M2 model files between different versions of the World of Warcraft client.

§Example

use wow_m2::model::M2Model;
use wow_m2::version::M2Version;
use wow_m2::converter::M2Converter;

// Load a model
let model = M2Model::load("path/to/model.m2").unwrap();

// Print model info
println!("Model name: {:?}", model.name);
println!("Model version: {:?}", model.header.version());
println!("Vertices: {}", model.vertices.len());

// Convert to a different version
let converter = M2Converter::new();
let converted = converter.convert(&model, M2Version::MoP).unwrap();

// Save the converted model
converted.save("path/to/converted.m2").unwrap();

Re-exports§

pub use anim::AnimFile;
pub use converter::M2Converter;
pub use error::M2Error;
pub use error::Result;
pub use model::M2Model;
pub use skin::OldSkin;
pub use skin::Skin;
pub use version::M2Version;

Modules§

anim
chunks
common
converter
error
header
io_ext
model
skin
version

Structs§

BlpTexture
Parsed information from BLP file. The structure of the type strictly follows how the file is stored on the disk for easy encoding/decoding and further transformations.

Constants§

VERSION
Library version