Skip to content

Commit

Permalink
webgl_materials_envmaps_hdr: enabled shadow
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Feb 27, 2016
1 parent 21781d3 commit 2cb798d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/webgl_materials_envmaps_hdr.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
var geometry = new THREE.TorusKnotGeometry( 18, 8, 150, 20 );;
var torusMesh1 = new THREE.Mesh( geometry, standardMaterial );
torusMesh1.position.x = 0.0;
torusMesh1.castShadow = true;
scene.add( torusMesh1 );
objects.push( torusMesh1 );

Expand All @@ -153,6 +154,7 @@
var planeMesh1 = new THREE.Mesh( planeGeometry, floorMaterial );
planeMesh1.position.y = - 50;
planeMesh1.rotation.x = - Math.PI * 0.5;
planeMesh1.receiveShadow = true;
scene.add( planeMesh1 );

} );
Expand All @@ -165,12 +167,13 @@
spotLight.position.set( 10, 100, 10 );
spotLight.angle = Math.PI / 10;
spotLight.penumbra = 0.2
spotLight.castShadow = true;
scene.add( spotLight );

renderer.setClearColor( 0x0a0a0a, 0 );
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );

renderer.shadowMap.enabled = true;
container.appendChild( renderer.domElement );

renderer.gammaInput = true;
Expand Down

0 comments on commit 2cb798d

Please sign in to comment.