9 releases
0.1.8 | Dec 14, 2024 |
---|---|
0.1.7 | Sep 2, 2024 |
0.1.6 | Aug 30, 2024 |
0.1.5 | Dec 26, 2023 |
#282 in Embedded development
155 downloads per month
Used in vmdl
13KB
263 lines
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.
lib.rs
:
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(())
}
Dependencies
~4–16MB
~152K SLoC