forked from jbuehler23/jackdaw
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasic.rs
More file actions
27 lines (25 loc) · 667 Bytes
/
basic.rs
File metadata and controls
27 lines (25 loc) · 667 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use bevy::prelude::*;
use jackdaw::EditorPlugin;
fn main() -> AppExit {
App::new()
.add_plugins((DefaultPlugins, EditorPlugin))
.add_systems(Startup, spawn_scene)
.run()
}
fn spawn_scene(mut commands: Commands) {
// Directional light with shadows, positioned away from origin
commands.spawn((
Name::new("Sun"),
DirectionalLight {
shadows_enabled: true,
illuminance: 10000.0,
..default()
},
Transform::from_xyz(10.0, 20.0, 10.0).with_rotation(Quat::from_euler(
EulerRot::XYZ,
-0.8,
0.4,
0.0,
)),
));
}