10 releases
Uses new Rust 2024
0.2.0 | Mar 4, 2025 |
---|---|
0.1.8 | Dec 14, 2024 |
0.1.7 | Sep 2, 2024 |
0.1.6 | Aug 30, 2024 |
0.1.5 | Dec 26, 2023 |
#870 in Game dev
149 downloads per month
Used in vmdl
13KB
263 lines
Utility for loading assets from tf2 data files.
Supports loading assets like models and textures from the tf2 data directory. The tf2 data directory should be
automatically detected when installed to steam, or you can use the TF_DIR
environment variable to overwrite the data
directory.
Supports loading both plain file data and data embedded in vpk
files.
#
fn main() -> Result<(), LoaderError> {
let loader = Loader::new()?;
if let Some(model) = loader.load("models/props_gameplay/resupply_locker.mdl")? {
println!("resupply_locker.mdl is {} bytes large", model.len());
}
Ok(())
}
tf-asset-loader
Utility for loading assets from tf2 data files.
Supports loading assets like models and textures from the tf2 data directory. The tf2 data directory should be
automatically detected when installed to steam, or you can use the TF_DIR
environment variable to overwrite the data
directory.
Supports loading both plain file data, data embedded in vpk
files and data embedded in bsp
maps.
Dependencies
~4–14MB
~142K SLoC