@@ -12,6 +12,14 @@ fn main() {
12
12
..default ( )
13
13
} )
14
14
. add_plugins ( DefaultPlugins )
15
+ . insert_resource ( WireframeConfig {
16
+ // To draw the wireframe on all entities, set this to 'true'
17
+ on_all_meshes : false ,
18
+ // You can also change the default color of the wireframes, which controls:
19
+ // - all wireframes if `WireframeConfig::on_all_meshes` is set to 'true'
20
+ // - the wireframe of all entities whose `Wireframe::color` is None otherwise
21
+ default_color : Color :: AQUAMARINE ,
22
+ } )
15
23
. add_plugin ( WireframePlugin )
16
24
. add_startup_system ( setup)
17
25
. run ( ) ;
@@ -20,17 +28,9 @@ fn main() {
20
28
/// set up a simple 3D scene
21
29
fn setup (
22
30
mut commands : Commands ,
23
- mut wireframe_config : ResMut < WireframeConfig > ,
24
31
mut meshes : ResMut < Assets < Mesh > > ,
25
32
mut materials : ResMut < Assets < StandardMaterial > > ,
26
33
) {
27
- // To draw the wireframe on all entities, set this to 'true'
28
- wireframe_config. on_all_meshes = false ;
29
- // You can also change the default color of the wireframes, which controls:
30
- // - all wireframes if `WireframeConfig::on_all_meshes` is set to 'true'
31
- // - the wireframe of all entities whose `Wireframe::color` is None otherwise
32
- wireframe_config. default_color = Color :: AQUAMARINE ;
33
-
34
34
// plane
35
35
commands. spawn_bundle ( PbrBundle {
36
36
mesh : meshes. add ( Mesh :: from ( shape:: Plane { size : 5.0 } ) ) ,
0 commit comments