Skip to content

Commit 9164153

Browse files
committed
Updated webgl_materials_lightmap. HemisphereLight no longer produces specular.
1 parent ff3465c commit 9164153

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

examples/webgl_materials_lightmap.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,11 @@
9999

100100
// LIGHTS
101101

102-
var hemiLight = new THREE.HemisphereLight( 0xaabbff, 0x040404, 0.3 );
103-
104-
hemiLight.position.y = 500;
105-
scene.add( hemiLight );
102+
var light = new THREE.DirectionalLight( 0xaabbff, 0.3 );
103+
light.position.x = 300;
104+
light.position.y = 250;
105+
light.position.z = -500;
106+
scene.add( light );
106107

107108
// SKYDOME
108109

@@ -114,7 +115,7 @@
114115
offset: { type: "f", value: 400 },
115116
exponent: { type: "f", value: 0.6 }
116117
};
117-
uniforms.topColor.value.copy( hemiLight.color );
118+
uniforms.topColor.value.copy( light.color );
118119

119120
var skyGeo = new THREE.SphereGeometry( 4000, 32, 15 );
120121
var skyMat = new THREE.ShaderMaterial( {

0 commit comments

Comments
 (0)