Skip to content

Commit a2c04a3

Browse files
s-rigaudSamuel Rigaud
andauthored
Examples: rename meshs (#31823)
Co-authored-by: Samuel Rigaud <[email protected]>
1 parent 1041321 commit a2c04a3

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

examples/webgl_watch.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
let gui, dirLight, pointLight, controls, bloomPass, fxaaPass;
4747
let ready = false;
4848

49-
const meshs = {};
49+
const meshes = {};
5050
const materials = {};
5151
const torad = Math.PI / 180;
5252

@@ -117,15 +117,15 @@
117117

118118
}
119119

120-
meshs[ child.name ] = child;
120+
meshes[ child.name ] = child;
121121

122122
}
123123

124124
} );
125125

126126
scene.add( gltf.scene );
127127

128-
meshs.glass.material = new THREE.MeshPhysicalMaterial( {
128+
meshes.glass.material = new THREE.MeshPhysicalMaterial( {
129129
color: 0x020205,
130130
transparent: true, opacity: setting.opacity,
131131
metalness: 0, roughness: 0,
@@ -271,7 +271,7 @@
271271

272272
materials.Gold.metalness = materials.Silver.metalness = setting.metalness;
273273
materials.Gold.roughness = materials.Silver.roughness = setting.roughness;
274-
meshs.glass.material.opacity = setting.opacity;
274+
meshes.glass.material.opacity = setting.opacity;
275275

276276
}
277277

@@ -296,12 +296,12 @@
296296
if ( hour >= 12 ) hour -= 12;
297297
if ( day > 30 ) day = 30;
298298

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;
305305

306306
}
307307

0 commit comments

Comments
 (0)