|
46 | 46 | let gui, dirLight, pointLight, controls, bloomPass, fxaaPass; |
47 | 47 | let ready = false; |
48 | 48 |
|
49 | | - const meshs = {}; |
| 49 | + const meshes = {}; |
50 | 50 | const materials = {}; |
51 | 51 | const torad = Math.PI / 180; |
52 | 52 |
|
|
117 | 117 |
|
118 | 118 | } |
119 | 119 |
|
120 | | - meshs[ child.name ] = child; |
| 120 | + meshes[ child.name ] = child; |
121 | 121 |
|
122 | 122 | } |
123 | 123 |
|
124 | 124 | } ); |
125 | 125 |
|
126 | 126 | scene.add( gltf.scene ); |
127 | 127 |
|
128 | | - meshs.glass.material = new THREE.MeshPhysicalMaterial( { |
| 128 | + meshes.glass.material = new THREE.MeshPhysicalMaterial( { |
129 | 129 | color: 0x020205, |
130 | 130 | transparent: true, opacity: setting.opacity, |
131 | 131 | metalness: 0, roughness: 0, |
|
271 | 271 |
|
272 | 272 | materials.Gold.metalness = materials.Silver.metalness = setting.metalness; |
273 | 273 | materials.Gold.roughness = materials.Silver.roughness = setting.roughness; |
274 | | - meshs.glass.material.opacity = setting.opacity; |
| 274 | + meshes.glass.material.opacity = setting.opacity; |
275 | 275 |
|
276 | 276 | } |
277 | 277 |
|
|
296 | 296 | if ( hour >= 12 ) hour -= 12; |
297 | 297 | if ( day > 30 ) day = 30; |
298 | 298 |
|
299 | | - meshs.hour.rotation.y = - hour * 30 * torad; |
300 | | - meshs.minute.rotation.y = - minute * 6 * torad; |
301 | | - meshs.second.rotation.y = - second * 6 * torad; |
302 | | - meshs.mini_03.rotation.y = - day * 12 * torad; |
303 | | - meshs.mini_02.rotation.y = - month * 30 * torad; |
304 | | - meshs.mini_01.rotation.y = - milli * 0.36 * torad; |
| 299 | + meshes.hour.rotation.y = - hour * 30 * torad; |
| 300 | + meshes.minute.rotation.y = - minute * 6 * torad; |
| 301 | + meshes.second.rotation.y = - second * 6 * torad; |
| 302 | + meshes.mini_03.rotation.y = - day * 12 * torad; |
| 303 | + meshes.mini_02.rotation.y = - month * 30 * torad; |
| 304 | + meshes.mini_01.rotation.y = - milli * 0.36 * torad; |
305 | 305 |
|
306 | 306 | } |
307 | 307 |
|
|
0 commit comments