yskang

threejs-minecraft-14

Apr 15th, 2020 (edited)
465
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Ground
  2.  
  3. //const planeGeometry = new THREE.PlaneGeometry( 60, 60 );
  4. const planeGeometry = new THREE.PlaneGeometry( 80, 80 );
  5.  
  6. // ... other code snippet
  7.  
  8. plane.receiveShadow = true;
  9.  
  10. // ... other code snippet
  11.  
  12. // Set up stage light
  13.  
  14. // ... other code snippet
  15.  
  16. const pointLight = new THREE.PointLight( 0xccffcc, 1, 100 );
  17. pointLight.castShadow = true;
  18. pointLight.position.set( -30, 30, 30 );
  19. scene.add( pointLight );
  20.  
  21.  
  22. // Set up renderer
  23.  
  24. // ... other code snippet
  25. // VVV Add these two lines
  26. renderer.shadowMap.enabled = true;
  27. renderer.shadowMap.type = THREE.PCFSoftShadowMap;
Add Comment
Please, Sign In to add comment