use nightshade_api::prelude::*;
fn main() {
run(
|world| {
show_grid(world, false);
set_bloom(world, true);
set_fog(
world,
Some(Fog {
color: [0.7, 0.75, 0.85],
start: 30.0,
end: 120.0,
}),
);
spawn_floor(world, 60.0);
for index in 0..14 {
let angle = index as f32 * 0.55;
let height = 3.0 + (index as f32 * 1.7).sin().abs() * 7.0;
let distance = 9.0 + index as f32;
let center = vec3(angle.cos() * distance, height * 0.5, angle.sin() * distance);
spawn_object(
world,
Object {
position: center,
scale: vec3(2.0, height, 2.0),
color: rgb(0.35, 0.37, 0.42),
..Object::default()
},
);
let window_glow = center + vec3(0.0, height * 0.5 + 0.5, 0.0);
point_light(world, window_glow, [1.0, 0.7, 0.3], 4.0);
}
orbit_camera(world, vec3(0.0, 4.0, 0.0), 35.0);
},
|world, _| {
let hour = (8.0 + elapsed_seconds(world)) % 24.0;
set_time_of_day(world, hour);
},
)
.unwrap();
}