nightshade-api 0.42.0

Procedural high level API for the nightshade game engine
Documentation
use nightshade_api::prelude::*;

fn main() {
    let mut app = open();
    set_background(&mut app.world, Background::Color([0.02, 0.02, 0.04, 1.0]));
    show_grid(&mut app.world, false);
    set_bloom(&mut app.world, true);
    spawn_floor(&mut app.world, 12.0);

    for row in 0..5 {
        for column in 0..5 {
            let sphere = spawn_sphere(
                &mut app.world,
                vec3(column as f32 * 1.5 - 3.0, 0.5, row as f32 * 1.5 - 3.0),
            );
            set_color(&mut app.world, sphere, RED);
            set_metallic_roughness(
                &mut app.world,
                sphere,
                row as f32 / 4.0,
                column as f32 / 4.0,
            );
        }
    }

    let lineup = [
        spawn_cube(&mut app.world, vec3(-5.5, 0.5, 4.5)),
        spawn_cylinder(&mut app.world, vec3(-4.0, 0.5, 4.5)),
        spawn_cone(&mut app.world, vec3(-2.5, 0.5, 4.5)),
    ];
    for (index, entity) in lineup.into_iter().enumerate() {
        set_color(&mut app.world, entity, [GOLD, TEAL, PURPLE][index]);
    }
    let checkered = spawn_cube(&mut app.world, vec3(-5.5, 0.5, 2.5));
    set_texture(&mut app.world, checkered, "checkerboard");

    let torus = spawn_torus(&mut app.world, vec3(0.0, 2.5, 0.0));
    set_emissive(&mut app.world, torus, [1.0, 0.6, 0.1], 6.0);

    orbit_camera(&mut app.world, vec3(0.0, 1.0, 0.0), 12.0);
    while frame(&mut app) {}
}