Skip to content

Commit 3eac416

Browse files
authored
Merge pull request mrdoob#15915 from Mugen87/dev26
Examples: Clean up webgl_shaders_ocean example
2 parents fd690f1 + 31f3136 commit 3eac416

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

examples/webgl_shaders_ocean.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,11 @@
115115

116116
var uniforms = sky.material.uniforms;
117117

118-
uniforms[ "turbidity" ].value = 10;
119-
uniforms[ "rayleigh" ].value = 2;
120-
uniforms[ "luminance" ].value = 1;
121-
uniforms[ "mieCoefficient" ].value = 0.005;
122-
uniforms[ "mieDirectionalG" ].value = 0.8;
118+
uniforms[ 'turbidity' ].value = 10;
119+
uniforms[ 'rayleigh' ].value = 2;
120+
uniforms[ 'luminance' ].value = 1;
121+
uniforms[ 'mieCoefficient' ].value = 0.005;
122+
uniforms[ 'mieDirectionalG' ].value = 0.8;
123123

124124
var parameters = {
125125
distance: 400,
@@ -140,8 +140,8 @@
140140
light.position.y = parameters.distance * Math.sin( phi ) * Math.sin( theta );
141141
light.position.z = parameters.distance * Math.sin( phi ) * Math.cos( theta );
142142

143-
sky.material.uniforms[ "sunPosition" ].value = light.position.copy( light.position );
144-
water.material.uniforms[ "sunDirection" ].value.copy( light.position ).normalize();
143+
sky.material.uniforms[ 'sunPosition' ].value = light.position.copy( light.position );
144+
water.material.uniforms[ 'sunDirection' ].value.copy( light.position ).normalize();
145145

146146
cubeCamera.update( renderer, scene );
147147

@@ -187,7 +187,7 @@
187187
controls.target.set( 0, 10, 0 );
188188
controls.minDistance = 40.0;
189189
controls.maxDistance = 200.0;
190-
camera.lookAt( controls.target );
190+
controls.update();
191191

192192
//
193193

@@ -242,7 +242,7 @@
242242
sphere.rotation.x = time * 0.5;
243243
sphere.rotation.z = time * 0.51;
244244

245-
water.material.uniforms[ "time" ].value += 1.0 / 60.0;
245+
water.material.uniforms[ 'time' ].value += 1.0 / 60.0;
246246

247247
renderer.render( scene, camera );
248248

0 commit comments

Comments
 (0)