Skip to content

Commit 3778581

Browse files
authored
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
1 parent 575cc3a commit 3778581

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
3.14 KB
Loading

examples/webgl_geometry_teapot.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@
6363
camera.position.set( - 600, 550, 1300 );
6464

6565
// LIGHTS
66-
ambientLight = new THREE.AmbientLight( 0x7c7c7c, 3.0 );
66+
ambientLight = new THREE.AmbientLight( 0x7c7c7c, 2.0 );
6767

68-
light = new THREE.DirectionalLight( 0xFFFFFF, 3.0 );
68+
light = new THREE.DirectionalLight( 0xFFFFFF, 2.0 );
6969
light.position.set( 0.32, 0.39, 0.7 );
7070

7171
// RENDERER
@@ -96,7 +96,7 @@
9696
materials[ 'wireframe' ] = new THREE.MeshBasicMaterial( { wireframe: true } );
9797
materials[ 'flat' ] = new THREE.MeshPhongMaterial( { specular: 0x000000, flatShading: true, side: THREE.DoubleSide } );
9898
materials[ 'smooth' ] = new THREE.MeshLambertMaterial( { side: THREE.DoubleSide } );
99-
materials[ 'glossy' ] = new THREE.MeshPhongMaterial( { side: THREE.DoubleSide } );
99+
materials[ 'glossy' ] = new THREE.MeshPhongMaterial( { color: 0xc0c0c0, specular: 0x404040, shininess: 300, side: THREE.DoubleSide } );
100100
materials[ 'textured' ] = new THREE.MeshPhongMaterial( { map: textureMap, side: THREE.DoubleSide } );
101101
materials[ 'reflective' ] = new THREE.MeshPhongMaterial( { envMap: textureCube, side: THREE.DoubleSide } );
102102

0 commit comments

Comments
 (0)