Browse Source

Fix glossy material for Teapot example (#30253)

* Fix glossy material

The glossy material for the teapot (I made this example) looks smooth, due to changes in the defaults for the MeshPhongMaterial. Changed lighting and colors & shininess power for glossy so that it looks glossy again.

* update screenshot
Eric Haines 1 year ago
parent
commit
3778581618

BIN
examples/screenshots/webgl_geometry_teapot.jpg


+ 3 - 3
examples/webgl_geometry_teapot.html

@@ -63,9 +63,9 @@
 				camera.position.set( - 600, 550, 1300 );
 
 				// LIGHTS
-				ambientLight = new THREE.AmbientLight( 0x7c7c7c, 3.0 );
+				ambientLight = new THREE.AmbientLight( 0x7c7c7c, 2.0 );
 
-				light = new THREE.DirectionalLight( 0xFFFFFF, 3.0 );
+				light = new THREE.DirectionalLight( 0xFFFFFF, 2.0 );
 				light.position.set( 0.32, 0.39, 0.7 );
 
 				// RENDERER
@@ -96,7 +96,7 @@
 				materials[ 'wireframe' ] = new THREE.MeshBasicMaterial( { wireframe: true } );
 				materials[ 'flat' ] = new THREE.MeshPhongMaterial( { specular: 0x000000, flatShading: true, side: THREE.DoubleSide } );
 				materials[ 'smooth' ] = new THREE.MeshLambertMaterial( { side: THREE.DoubleSide } );
-				materials[ 'glossy' ] = new THREE.MeshPhongMaterial( { side: THREE.DoubleSide } );
+				materials[ 'glossy' ] = new THREE.MeshPhongMaterial( { color: 0xc0c0c0, specular: 0x404040, shininess: 300, side: THREE.DoubleSide } );
 				materials[ 'textured' ] = new THREE.MeshPhongMaterial( { map: textureMap, side: THREE.DoubleSide } );
 				materials[ 'reflective' ] = new THREE.MeshPhongMaterial( { envMap: textureCube, side: THREE.DoubleSide } );
 

粤ICP备19079148号