@@ -5,6 +5,7 @@ import { STATIC_GROUP } from "./collisionGroups";
5
5
import { Car } from "./components/Car" ;
6
6
import { Cones } from "./components/Cones" ;
7
7
import { Ramp } from "./components/Ramp" ;
8
+ import { Ui } from "./components/Ui" ;
8
9
9
10
function AppWrapper ( { children } : PropsWithChildren ) {
10
11
return (
@@ -26,35 +27,38 @@ function App() {
26
27
const shadow_map_size = 2048 ;
27
28
28
29
return (
29
- < AppWrapper >
30
- < ambientLight intensity = { 0.2 } />
31
- < directionalLight
32
- position = { [ - 5 , 5 , 0 ] }
33
- shadow-camera-top = { shadow_size }
34
- shadow-camera-right = { shadow_size }
35
- shadow-camera-bottom = { - shadow_size }
36
- shadow-camera-left = { - shadow_size }
37
- shadow-mapSize-height = { shadow_map_size }
38
- shadow-mapSize-width = { shadow_map_size }
39
- castShadow
40
- ref = { lightRef }
41
- />
42
- < Car lightRef = { lightRef } />
43
- < RigidBody
44
- collisionGroups = { interactionGroups ( STATIC_GROUP ) }
45
- type = "fixed"
46
- position = { [ 0 , - 2 , 0 ] }
47
- >
48
- < mesh position = { [ 75 , 0 , 0 ] } receiveShadow >
49
- < boxGeometry args = { [ 300 , 2 , 150 ] } />
50
- < meshStandardMaterial />
51
- </ mesh >
52
- </ RigidBody >
53
- < Ramp position = { [ 30 , - 2 , 0 ] } />
54
- < Ramp position = { [ 70 , - 2 , 0 ] } />
55
- < Ramp position = { [ 110 , - 2 , 0 ] } />
56
- < Cones />
57
- </ AppWrapper >
30
+ < >
31
+ < Ui />
32
+ < AppWrapper >
33
+ < ambientLight intensity = { 0.2 } />
34
+ < directionalLight
35
+ position = { [ - 5 , 5 , 0 ] }
36
+ shadow-camera-top = { shadow_size }
37
+ shadow-camera-right = { shadow_size }
38
+ shadow-camera-bottom = { - shadow_size }
39
+ shadow-camera-left = { - shadow_size }
40
+ shadow-mapSize-height = { shadow_map_size }
41
+ shadow-mapSize-width = { shadow_map_size }
42
+ castShadow
43
+ ref = { lightRef }
44
+ />
45
+ < Car lightRef = { lightRef } />
46
+ < RigidBody
47
+ collisionGroups = { interactionGroups ( STATIC_GROUP ) }
48
+ type = "fixed"
49
+ position = { [ 0 , - 2 , 0 ] }
50
+ >
51
+ < mesh position = { [ 75 , 0 , 0 ] } receiveShadow >
52
+ < boxGeometry args = { [ 300 , 2 , 150 ] } />
53
+ < meshStandardMaterial />
54
+ </ mesh >
55
+ </ RigidBody >
56
+ < Ramp position = { [ 30 , - 2 , 0 ] } />
57
+ < Ramp position = { [ 70 , - 2 , 0 ] } />
58
+ < Ramp position = { [ 110 , - 2 , 0 ] } />
59
+ < Cones />
60
+ </ AppWrapper >
61
+ </ >
58
62
) ;
59
63
}
60
64
0 commit comments