-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSceneConfig.js
More file actions
94 lines (94 loc) · 2.28 KB
/
SceneConfig.js
File metadata and controls
94 lines (94 loc) · 2.28 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
export var COLORS = {
wall: 0xEAE0D5,
floor: 0xF0C987,
desk: 0xD2B48C,
deskLegs: 0x3A3B3C,
monitorScreen: 0x101020,
monitorFrame: 0x282828,
keyboard: 0x404040,
mouse: 0x303030,
saltLamp: 0xFF7043,
saltLampEmissive: 0xFF4500,
guitarBody: 0x8B4513,
guitarNeck: 0xD2B48C,
chairSeat: 0x252525,
chairLegs: 0x505050,
curtain: 0xADA9A0,
windowFrame: 0x4E342E,
coffeeCup: 0xFFFFFF,
coffeeLiquid: 0x6F4E37,
sceneBackground: 0xA0C8E0,
fogColor: 0xA0C8E0,
sunlight: 0xFFF5E1,
skyTop: 0x3A7CA5,
skyHorizon: 0xDDEEDD,
bookCover: 0x4A6B8A,
bookPages: 0xF5F5DC,
plantPot: 0x7A6855,
plantLeaves: 0x4CAF50,
penHolder: 0x607D8B,
penColors: [
0x212121,
0xD32F2F,
0x1976D2
]
};
export var SIZES = {
roomWidth: 8,
roomHeight: 3.5,
roomDepth: 7,
wallThickness: 0.2,
deskWidth: 1.2,
deskHeight: 0.75,
deskDepth: 0.6,
monitorWidth: 0.6,
monitorHeight: 0.35,
monitorDepth: 0.05,
saltLampRadius: 0.1,
saltLampHeight: 0.25
};
export var MATERIALS = {
default: new THREE.MeshStandardMaterial({
roughness: 0.7,
metalness: 0.1
}),
wood: function(color) {
return new THREE.MeshStandardMaterial({
color: color,
roughness: 0.8,
metalness: 0.05
});
},
metal: function(color) {
return new THREE.MeshStandardMaterial({
color: color,
roughness: 0.3,
metalness: 0.8
});
},
fabric: function(color) {
return new THREE.MeshStandardMaterial({
color: color,
roughness: 0.9,
metalness: 0.0
});
},
plastic: function(color) {
return new THREE.MeshStandardMaterial({
color: color,
roughness: 0.5,
metalness: 0.2
});
},
emissive: function(color, emissiveColor) {
var intensity = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1;
return new THREE.MeshStandardMaterial({
color: color,
emissive: emissiveColor,
emissiveIntensity: intensity,
roughness: 0.6
});
}
};
// Import THREE globally for MATERIALS
import * as THREE from 'three';