14 lines
511 B
Rust
14 lines
511 B
Rust
|
fn main() {
|
||
|
let stages = std::fs::read_dir("game/stages").unwrap();
|
||
|
for stage in stages {
|
||
|
let stage = stage.unwrap();
|
||
|
let bytes: Vec<u8> = std::fs::read(stage.path()).unwrap();
|
||
|
let data = roead::byml::Byml::from_binary(bytes).unwrap();
|
||
|
let map = data.into_map().unwrap();
|
||
|
let mtx: Vec<f32> =
|
||
|
map.get("ProjMatrix").unwrap().as_array().unwrap().into_iter().map(|a| a.as_float().unwrap()).collect();
|
||
|
let mat4 = glam::Mat4::from_cols_slice(&mtx);
|
||
|
println!("{:?}", mat4);
|
||
|
}
|
||
|
}
|