|
86 | 86 | var params = {
|
87 | 87 | shadows: true,
|
88 | 88 | exposure: 0.68,
|
89 |
| - bulbPower: Object.keys( bulbLuminousPowers )[2], |
| 89 | + bulbPower: Object.keys( bulbLuminousPowers )[ 4 ], |
90 | 90 | hemiIrradiance: Object.keys( hemiLuminousIrradiances )[0]
|
91 | 91 | };
|
92 | 92 |
|
|
107 | 107 | camera = new THREE.PerspectiveCamera( 50, window.innerWidth / window.innerHeight, 0.1, 100 );
|
108 | 108 | camera.position.x = -4;
|
109 | 109 | camera.position.z = 4;
|
110 |
| - camera.position.y = 3; |
| 110 | + camera.position.y = 2; |
111 | 111 |
|
112 | 112 | scene = new THREE.Scene();
|
113 | 113 |
|
|
183 | 183 | } );
|
184 | 184 |
|
185 | 185 | ballMat = new THREE.MeshStandardMaterial( {
|
186 |
| - roughness: 0, |
187 |
| - metalness: 0.0, |
188 |
| - color: 0xffffff |
| 186 | + color: 0xffffff, |
| 187 | + roughness: 0.5, |
| 188 | + metalness: 1.0 |
189 | 189 | });
|
190 | 190 | textureLoader.load( "../examples/textures/planets/earth_atmos_2048.jpg", function( map ) {
|
191 |
| - map.wrapS = THREE.RepeatWrapping; |
192 |
| - map.wrapT = THREE.RepeatWrapping; |
193 | 191 | map.anisotropy = 4;
|
194 |
| - map.repeat.set( 1, 1 ); |
195 | 192 | ballMat.map = map;
|
196 | 193 | ballMat.needsUpdate = true;
|
197 | 194 | } );
|
198 | 195 | textureLoader.load( "../examples/textures/planets/earth_specular_2048.jpg", function( map ) {
|
199 |
| - map.wrapS = THREE.RepeatWrapping; |
200 |
| - map.wrapT = THREE.RepeatWrapping; |
201 | 196 | map.anisotropy = 4;
|
202 |
| - map.repeat.set( 1, 1 ); |
203 |
| - ballMat.roughnessMap = map; |
| 197 | + ballMat.metalnessMap = map; |
204 | 198 | ballMat.needsUpdate = true;
|
205 | 199 | } );
|
206 | 200 |
|
|
210 | 204 | floorMesh.rotation.x = -Math.PI / 2.0;
|
211 | 205 | scene.add( floorMesh );
|
212 | 206 |
|
213 |
| - var ballGeometry = new THREE.SphereGeometry( 0.1213, 32, 32 ); |
| 207 | + var ballGeometry = new THREE.SphereGeometry( 0.5, 32, 32 ); |
214 | 208 | var ballMesh = new THREE.Mesh( ballGeometry, ballMat );
|
215 |
| - ballMesh.position.set( 1, 0.1213, 1 ); |
| 209 | + ballMesh.position.set( 1, 0.5, 1 ); |
| 210 | + ballMesh.rotation.y = Math.PI; |
216 | 211 | ballMesh.castShadow = true;
|
217 | 212 | scene.add( ballMesh );
|
218 | 213 |
|
|
0 commit comments