forked from jbuehler23/jackdaw
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbasic.rs
More file actions
34 lines (32 loc) · 911 Bytes
/
Copy pathbasic.rs
File metadata and controls
34 lines (32 loc) · 911 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
28
29
30
31
32
33
34
use bevy::prelude::*;
use jackdaw::prelude::*;
fn main() -> AppExit {
App::new()
// log errors instead of panicking
.set_error_handler(bevy::ecs::error::error)
.add_plugins((
DefaultPlugins.set(editor_window_plugin()),
EnhancedInputPlugin,
PhysicsPlugins::default(),
EditorPlugins::default(),
))
.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 {
shadow_maps_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,
)),
));
}