@@ -28,33 +28,37 @@ fn setup(
28
28
} ) ;
29
29
for x in 0 ..WIDTH {
30
30
for y in 0 ..HEIGHT {
31
+ // introduce spaces to break any kind of moiré pattern
32
+ if x % 10 == 0 || y % 10 == 0 {
33
+ continue ;
34
+ }
31
35
// cube
32
36
commands. spawn_bundle ( PbrBundle {
33
37
mesh : mesh. clone_weak ( ) ,
34
38
material : material. clone_weak ( ) ,
35
- transform : Transform :: from_xyz ( ( x as f32 ) * 2.0 , ( y as f32 ) * 2.0 , 0.0 ) ,
39
+ transform : Transform :: from_xyz ( ( x as f32 ) * 2.5 , ( y as f32 ) * 2.5 , 0.0 ) ,
36
40
..default ( )
37
41
} ) ;
38
42
commands. spawn_bundle ( PbrBundle {
39
43
mesh : mesh. clone_weak ( ) ,
40
44
material : material. clone_weak ( ) ,
41
45
transform : Transform :: from_xyz (
42
- ( x as f32 ) * 2.0 ,
43
- HEIGHT as f32 * 2.0 ,
44
- ( y as f32 ) * 2.0 ,
46
+ ( x as f32 ) * 2.5 ,
47
+ HEIGHT as f32 * 2.5 ,
48
+ ( y as f32 ) * 2.5 ,
45
49
) ,
46
50
..Default :: default ( )
47
51
} ) ;
48
52
commands. spawn_bundle ( PbrBundle {
49
53
mesh : mesh. clone_weak ( ) ,
50
54
material : material. clone_weak ( ) ,
51
- transform : Transform :: from_xyz ( ( x as f32 ) * 2.0 , 0.0 , ( y as f32 ) * 2.0 ) ,
55
+ transform : Transform :: from_xyz ( ( x as f32 ) * 2.5 , 0.0 , ( y as f32 ) * 2.5 ) ,
52
56
..Default :: default ( )
53
57
} ) ;
54
58
commands. spawn_bundle ( PbrBundle {
55
59
mesh : mesh. clone_weak ( ) ,
56
60
material : material. clone_weak ( ) ,
57
- transform : Transform :: from_xyz ( 0.0 , ( x as f32 ) * 2.0 , ( y as f32 ) * 2.0 ) ,
61
+ transform : Transform :: from_xyz ( 0.0 , ( x as f32 ) * 2.5 , ( y as f32 ) * 2.5 ) ,
58
62
..Default :: default ( )
59
63
} ) ;
60
64
}
@@ -66,7 +70,7 @@ fn setup(
66
70
mesh,
67
71
material,
68
72
transform : Transform {
69
- translation : Vec3 :: new ( 0.0 , HEIGHT as f32 * 2.0 , 0.0 ) ,
73
+ translation : Vec3 :: new ( 0.0 , HEIGHT as f32 * 2.5 , 0.0 ) ,
70
74
scale : Vec3 :: splat ( 5.0 ) ,
71
75
..Default :: default ( )
72
76
} ,
@@ -87,8 +91,8 @@ fn setup(
87
91
// System for rotating the camera
88
92
fn move_camera ( time : Res < Time > , mut camera_query : Query < & mut Transform , With < Camera > > ) {
89
93
let mut camera_transform = camera_query. single_mut ( ) ;
90
- camera_transform. rotate ( Quat :: from_rotation_z ( time. delta_seconds ( ) * 0.5 ) ) ;
91
- camera_transform. rotate ( Quat :: from_rotation_x ( time. delta_seconds ( ) * 0.5 ) ) ;
94
+ camera_transform. rotate ( Quat :: from_rotation_z ( time. delta_seconds ( ) * 0.15 ) ) ;
95
+ camera_transform. rotate ( Quat :: from_rotation_x ( time. delta_seconds ( ) * 0.15 ) ) ;
92
96
}
93
97
94
98
// System for printing the number of meshes on every tick of the timer
0 commit comments