|
115 | 115 |
|
116 | 116 | var uniforms = sky.material.uniforms;
|
117 | 117 |
|
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; |
123 | 123 |
|
124 | 124 | var parameters = {
|
125 | 125 | distance: 400,
|
|
140 | 140 | light.position.y = parameters.distance * Math.sin( phi ) * Math.sin( theta );
|
141 | 141 | light.position.z = parameters.distance * Math.sin( phi ) * Math.cos( theta );
|
142 | 142 |
|
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(); |
145 | 145 |
|
146 | 146 | cubeCamera.update( renderer, scene );
|
147 | 147 |
|
|
187 | 187 | controls.target.set( 0, 10, 0 );
|
188 | 188 | controls.minDistance = 40.0;
|
189 | 189 | controls.maxDistance = 200.0;
|
190 |
| - camera.lookAt( controls.target ); |
| 190 | + controls.update(); |
191 | 191 |
|
192 | 192 | //
|
193 | 193 |
|
|
242 | 242 | sphere.rotation.x = time * 0.5;
|
243 | 243 | sphere.rotation.z = time * 0.51;
|
244 | 244 |
|
245 |
| - water.material.uniforms[ "time" ].value += 1.0 / 60.0; |
| 245 | + water.material.uniforms[ 'time' ].value += 1.0 / 60.0; |
246 | 246 |
|
247 | 247 | renderer.render( scene, camera );
|
248 | 248 |
|
|
0 commit comments