Skip to content

Commit b4035f3

Browse files
committed
Fix everything
1 parent af52662 commit b4035f3

File tree

10 files changed

+436
-443
lines changed

10 files changed

+436
-443
lines changed

src/components/Art/Art.js

Lines changed: 67 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,75 @@
1-
import React from 'react';
2-
import Picture from '../Picture/Picture';
3-
import Display from '../Display/Display';
1+
import React from "react";
2+
import Picture from "../Picture/Picture";
3+
import Display from "../Display/Display";
44

55
const Art = () => {
6-
7-
return (
8-
<>
9-
{/* liam portrait */}
10-
<Picture
11-
url={"assets/3D/Portrait/scene.gltf"}
12-
scale={[4, 4, 4]}
13-
position={[19.3, 7, 0]}
14-
rotation={[0, -Math.PI, 0]}
15-
metalness={0.9}
16-
roughness={0.9}
17-
/>
18-
<Display position={[20, 5, 0]} size={[1, 18, 11]} />
19-
20-
{/* creation of adam */}
21-
<Picture
22-
url={"assets/3D/Hands/scene.gltf"}
23-
scale={[0.1, 0.1, 0.1]}
24-
position={[34.7, 12, 12]}
25-
rotation={[0, -Math.PI / 2, Math.PI]}
26-
metalness={0}
27-
roughness={0.9}
28-
/>
6+
return (
7+
<>
8+
{/* liam portrait */}
9+
<Picture
10+
url={"/assets/3D/Portrait/scene.gltf"}
11+
scale={[4, 4, 4]}
12+
position={[19.3, 7, 0]}
13+
rotation={[0, -Math.PI, 0]}
14+
metalness={0.9}
15+
roughness={0.9}
16+
/>
17+
<Display position={[20, 5, 0]} size={[1, 18, 11]} />
2918

30-
{/* wedding */}
31-
<Picture
32-
url={"assets/3D/Wedding/scene.gltf"}
33-
scale={[2.5, 2.5, 2.5]}
34-
position={[19.3, 7, 25]}
35-
rotation={[Math.PI / 2, Math.PI, 0]}
36-
metalness={0.0}
37-
roughness={0.3}
38-
/>
39-
<Display position={[20, 5, 25]} size={[1, 18, 11]} />
19+
{/* creation of adam */}
20+
<Picture
21+
url={"/assets/3D/Hands/scene.gltf"}
22+
scale={[0.1, 0.1, 0.1]}
23+
position={[34.7, 12, 12]}
24+
rotation={[0, -Math.PI / 2, Math.PI]}
25+
metalness={0}
26+
roughness={0.9}
27+
/>
4028

41-
{/* wilson portrait */}
42-
<Picture
43-
url={"assets/3D/Wilson/scene.gltf"}
44-
scale={[2.5, 2.5, 2.5 ]}
45-
position={[-19.3, 7, 0]}
46-
rotation={[-Math.PI / 2, 0, 0]}
47-
metalness={0}
48-
roughness={0.3}
49-
/>
50-
<Display position={[-20, 5, 0]} size={[1, 18, 11]} />
29+
{/* wedding */}
30+
<Picture
31+
url={"/assets/3D/Wedding/scene.gltf"}
32+
scale={[2.5, 2.5, 2.5]}
33+
position={[19.3, 7, 25]}
34+
rotation={[Math.PI / 2, Math.PI, 0]}
35+
metalness={0.0}
36+
roughness={0.3}
37+
/>
38+
<Display position={[20, 5, 25]} size={[1, 18, 11]} />
5139

52-
{/* old man portrait */}
53-
<Picture
54-
url={"assets/3D/OldMan/scene.gltf"}
55-
scale={[4, 4, 4]}
56-
position={[-19.4, 7, 25]}
57-
rotation={[0, 0, 0]}
58-
metalness={0.9}
59-
roughness={0.9}
60-
/>
61-
<Display position={[-20, 5, 25]} size={[1, 18, 11]} />
40+
{/* wilson portrait */}
41+
<Picture
42+
url={"/assets/3D/Wilson/scene.gltf"}
43+
scale={[2.5, 2.5, 2.5]}
44+
position={[-19.3, 7, 0]}
45+
rotation={[-Math.PI / 2, 0, 0]}
46+
metalness={0}
47+
roughness={0.3}
48+
/>
49+
<Display position={[-20, 5, 0]} size={[1, 18, 11]} />
6250

63-
{/* girl portrait */}
64-
<Picture
65-
url={"assets/3D/Girl/scene.gltf"}
66-
scale={[6.5, 6.5, 6.5]}
67-
position={[-34.6, 10, 12]}
68-
rotation={[-Math.PI / 2, 0, 0]}
69-
metalness={0.7}
70-
roughness={0.8}
71-
/>
72-
73-
</>
51+
{/* old man portrait */}
52+
<Picture
53+
url={"/assets/3D/OldMan/scene.gltf"}
54+
scale={[4, 4, 4]}
55+
position={[-19.4, 7, 25]}
56+
rotation={[0, 0, 0]}
57+
metalness={0.9}
58+
roughness={0.9}
59+
/>
60+
<Display position={[-20, 5, 25]} size={[1, 18, 11]} />
7461

75-
)
76-
}
62+
{/* girl portrait */}
63+
<Picture
64+
url={"/assets/3D/Girl/scene.gltf"}
65+
scale={[6.5, 6.5, 6.5]}
66+
position={[-34.6, 10, 12]}
67+
rotation={[-Math.PI / 2, 0, 0]}
68+
metalness={0.7}
69+
roughness={0.8}
70+
/>
71+
</>
72+
);
73+
};
7774

78-
export default Art;
75+
export default Art;

src/components/Bench/Bench.js

Lines changed: 39 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import React from 'react';
2-
import { useLoader } from 'react-three-fiber';
3-
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader';
1+
import React from "react";
2+
import { useLoader } from "react-three-fiber";
3+
import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader";
44
import { useBox } from "use-cannon";
5-
import { draco } from 'drei';
5+
import { draco } from "drei";
66

77
const Bench = ({
88
url,
@@ -11,40 +11,43 @@ const Bench = ({
1111
rotation,
1212
physicsSize,
1313
physicsPosition,
14-
1514
}) => {
16-
const [ref] = useBox(() => ({
17-
type: "static",
18-
args: physicsSize,
19-
position: physicsPosition
20-
}))
15+
const [ref] = useBox(() => ({
16+
type: "static",
17+
args: physicsSize,
18+
position: physicsPosition,
19+
}));
2120

22-
const { scene } = useLoader(GLTFLoader, url, draco("https://www.gstatic.com/draco/versioned/decoders/1.4.0/"));
21+
const { scene } = useLoader(
22+
GLTFLoader,
23+
process.env.PUBLIC_URL + url,
24+
draco("https://www.gstatic.com/draco/versioned/decoders/1.4.0/")
25+
);
2326

24-
scene.traverse( function ( child ) {
25-
if ( child.isMesh ) {
26-
child.castShadow = true;
27-
child.receiveShadow = true;
28-
child.material.toneMapped = false;
29-
child.material.metalness = 0.1;
30-
child.material.roughness = 1;
31-
child.material.clearcoat= 0.9;
32-
child.material.clearcoatRoughness= 0.1;
33-
}
27+
scene.traverse(function (child) {
28+
if (child.isMesh) {
29+
child.castShadow = true;
30+
child.receiveShadow = true;
31+
child.material.toneMapped = false;
32+
child.material.metalness = 0.1;
33+
child.material.roughness = 1;
34+
child.material.clearcoat = 0.9;
35+
child.material.clearcoatRoughness = 0.1;
36+
}
3437
});
35-
36-
return (
37-
<>
38-
<mesh ref={ref}/>
39-
<primitive
40-
scale={scale}
41-
position={position}
42-
rotation={rotation}
43-
object={scene}
44-
dispose={null}
45-
/>
46-
</>
47-
);
48-
}
4938

50-
export default Bench;
39+
return (
40+
<>
41+
<mesh ref={ref} />
42+
<primitive
43+
scale={scale}
44+
position={position}
45+
rotation={rotation}
46+
object={scene}
47+
dispose={null}
48+
/>
49+
</>
50+
);
51+
};
52+
53+
export default Bench;

src/components/Building/Building.js

Lines changed: 57 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,62 @@
1-
import React from 'react';
2-
import Wall from '../Wall/Wall';
3-
import WindowFrame from '../WindowFrame/WindowFrame';
4-
import Glass from '../Glass/Glass';
1+
import React from "react";
2+
import Wall from "../Wall/Wall";
3+
import WindowFrame from "../WindowFrame/WindowFrame";
4+
import Glass from "../Glass/Glass";
55

66
const Building = () => {
7-
8-
return (
9-
<>
10-
<Wall
11-
position={[0, 0, -13.5]}
12-
modelUrl={"assets/3D/Wall/scene.gltf"}
13-
mapUrl={"assets/3D/Wall/Textures/White_Wall.jpg"}
14-
normalMapUrl={"assets/3D/Wall/Textures/White_Wall_NORMAL.jpg"}
15-
/>
7+
return (
8+
<>
9+
<Wall
10+
position={[0, 0, -13.5]}
11+
modelUrl={"/assets/3D/Wall/scene.gltf"}
12+
mapUrl={"/assets/3D/Wall/Textures/White_Wall.jpg"}
13+
normalMapUrl={"/assets/3D/Wall/Textures/White_Wall_NORMAL.jpg"}
14+
/>
1615

17-
{/* side windows */}
18-
<WindowFrame
19-
scale={[0.008, 0.008, 0.008]}
20-
position={[6.5, 8.5, -15]}
21-
rotation={[0, Math.PI ,0]}
22-
modelUrl={"assets/3D/WindowNoGlassL/scene.gltf"}
23-
mapUrl={"assets/3D/WindowNoGlassL/Textures/Material_49_baseColor.png"}
24-
/>
25-
<WindowFrame
26-
scale={[0.008, 0.008, 0.008]}
27-
position={[-6.5, 8.5, -15]}
28-
rotation={[0, Math.PI ,0]}
29-
modelUrl={"assets/3D/WindowNoGlassR/scene.gltf"}
30-
mapUrl={"assets/3D/WindowNoGlassR/Textures/Material_49_baseColor.png"}
31-
/>
32-
<Glass
33-
scale={[0.008, 0.008, 0.008]}
34-
position={[6.5, 8.5, -15]}
35-
rotation={[0, 0, 0]}
36-
url={"assets/3D/WindowGlassL/scene.gltf"}
37-
/>
38-
<Glass
39-
scale={[0.008, 0.008, 0.008]}
40-
position={[-6.5, 8.5, -15]}
41-
rotation={[0, 0, 0]}
42-
url={"assets/3D/WindowGlassR/scene.gltf"}
43-
/>
16+
{/* side windows */}
17+
<WindowFrame
18+
scale={[0.008, 0.008, 0.008]}
19+
position={[6.5, 8.5, -15]}
20+
rotation={[0, Math.PI, 0]}
21+
modelUrl={"/assets/3D/WindowNoGlassL/scene.gltf"}
22+
mapUrl={"/assets/3D/WindowNoGlassL/Textures/Material_49_baseColor.png"}
23+
/>
24+
<WindowFrame
25+
scale={[0.008, 0.008, 0.008]}
26+
position={[-6.5, 8.5, -15]}
27+
rotation={[0, Math.PI, 0]}
28+
modelUrl={"/assets/3D/WindowNoGlassR/scene.gltf"}
29+
mapUrl={"/assets/3D/WindowNoGlassR/Textures/Material_49_baseColor.png"}
30+
/>
31+
<Glass
32+
scale={[0.008, 0.008, 0.008]}
33+
position={[6.5, 8.5, -15]}
34+
rotation={[0, 0, 0]}
35+
url={"/assets/3D/WindowGlassL/scene.gltf"}
36+
/>
37+
<Glass
38+
scale={[0.008, 0.008, 0.008]}
39+
position={[-6.5, 8.5, -15]}
40+
rotation={[0, 0, 0]}
41+
url={"/assets/3D/WindowGlassR/scene.gltf"}
42+
/>
4443

45-
{/* roof */}
46-
<WindowFrame
47-
scale={[2.7, 2.7, 2.7]}
48-
position={[0, 27, 13.2]}
49-
rotation={[0, 0, 0]}
50-
modelUrl={"assets/3D/RoofNoGlass/scene.gltf"}
51-
mapUrl={"assets/3D/RoofNoGlass/Textures/Material_49_baseColor.png"}
52-
/>
53-
<Glass
54-
scale={[2.7, 2.7, 2.7]}
55-
position={[0, 27, 13.2]}
56-
rotation={[0, 0, 0]}
57-
url={"assets/3D/RoofGlass/scene.gltf"}
58-
/>
59-
</>
44+
{/* roof */}
45+
<WindowFrame
46+
scale={[2.7, 2.7, 2.7]}
47+
position={[0, 27, 13.2]}
48+
rotation={[0, 0, 0]}
49+
modelUrl={"/assets/3D/RoofNoGlass/scene.gltf"}
50+
mapUrl={"/assets/3D/RoofNoGlass/Textures/Material_49_baseColor.png"}
51+
/>
52+
<Glass
53+
scale={[2.7, 2.7, 2.7]}
54+
position={[0, 27, 13.2]}
55+
rotation={[0, 0, 0]}
56+
url={"/assets/3D/RoofGlass/scene.gltf"}
57+
/>
58+
</>
59+
);
60+
};
6061

61-
)
62-
}
63-
64-
export default Building;
62+
export default Building;

0 commit comments

Comments
 (0)