modelio-rs 0.2.1

Safe Rust bindings for Apple's ModelIO framework — assets, meshes, materials, lights, cameras, voxels, textures, and animation on macOS
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use modelio::prelude::*;

fn main() -> modelio::Result<()> {
    let light = Light::new()?;
    light.set_light_type(LightType::Ambient);
    light.set_color_space("kCGColorSpaceSRGB")?;

    println!("light_info={:?}", light.info()?);
    println!(
        "irradiance={:?}",
        light.irradiance_at_point([0.0, 0.0, 0.0])
    );
    println!("✅ modelio light OK");
    Ok(())
}