Browse Source

Examples: rename meshs (#31823)

Co-authored-by: Samuel Rigaud <rigaud@gmail.com>
Samuel Rigaud 4 months ago
parent
commit
a2c04a3296
1 changed files with 10 additions and 10 deletions
  1. 10 10
      examples/webgl_watch.html

+ 10 - 10
examples/webgl_watch.html

@@ -46,7 +46,7 @@
 			let gui, dirLight, pointLight, controls, bloomPass, fxaaPass;
 			let ready = false;
 
-			const meshs = {};
+			const meshes = {};
 			const materials = {};
 			const torad = Math.PI / 180;
 
@@ -117,7 +117,7 @@
 
 									}
 
-									meshs[ child.name ] = child;
+									meshes[ child.name ] = child;
 
 								}
 
@@ -125,7 +125,7 @@
 
 							scene.add( gltf.scene );
 
-							meshs.glass.material = new THREE.MeshPhysicalMaterial( {
+							meshes.glass.material = new THREE.MeshPhysicalMaterial( {
 								color: 0x020205,
 								transparent: true, opacity: setting.opacity,
 								metalness: 0, roughness: 0,
@@ -271,7 +271,7 @@
 
 				materials.Gold.metalness = materials.Silver.metalness = setting.metalness;
 				materials.Gold.roughness = materials.Silver.roughness = setting.roughness;
-				meshs.glass.material.opacity = setting.opacity;
+				meshes.glass.material.opacity = setting.opacity;
 
 			}
 
@@ -296,12 +296,12 @@
 				if ( hour >= 12 ) hour -= 12;
 				if ( day > 30 ) day = 30;
 
-				meshs.hour.rotation.y = - hour * 30 * torad;
-				meshs.minute.rotation.y = - minute * 6 * torad;
-				meshs.second.rotation.y = - second * 6 * torad;
-				meshs.mini_03.rotation.y = - day * 12 * torad;
-				meshs.mini_02.rotation.y = - month * 30 * torad;
-				meshs.mini_01.rotation.y = - milli * 0.36 * torad;
+				meshes.hour.rotation.y = - hour * 30 * torad;
+				meshes.minute.rotation.y = - minute * 6 * torad;
+				meshes.second.rotation.y = - second * 6 * torad;
+				meshes.mini_03.rotation.y = - day * 12 * torad;
+				meshes.mini_02.rotation.y = - month * 30 * torad;
+				meshes.mini_01.rotation.y = - milli * 0.36 * torad;
 
 			}
 

粤ICP备19079148号