Guest User

Untitled

a guest
Feb 22nd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. const LIGHT_POSITION = 50;
  2.  
  3. let light = new THREE.DirectionalLight(0xddffdd, 1);
  4. light.position.z = LIGHT_POSITION;
  5. light.position.y = -LIGHT_POSITION * 2;
  6. light.position.x = -LIGHT_POSITION;
  7. light.shadowCameraFov = 60;
  8. light.shadow.mapSize.x = 1024;
  9. light.shadow.mapSize.y = 1024;
  10. scene.add(light);
  11.  
  12. let light2 = new THREE.DirectionalLight(0xffdddd, 1);
  13. light2.position.z = LIGHT_POSITION;
  14. light2.position.x = -LIGHT_POSITION;
  15. light2.position.y = LIGHT_POSITION * 2;
  16. light2.shadow.mapSize.x = 1024;
  17. light2.shadow.mapSize.y = 1024;
  18. scene.add(light2);
  19.  
  20. let light4 = new THREE.AmbientLight(0xBBBBBB, 0.3);
  21. scene.add(light4);
  22.  
  23. this.material = new THREE.MeshStandardMaterial({color: 0xffffff,
  24. morphTargets: true,
  25. morphNormals: true,
  26. roughness: 0.8,
  27. metalness: 0.3
  28. });
  29.  
  30. this.model = new THREE.Mesh(this.geometry, this.material);
  31. this.model.castShadow = true;
  32. this.model.receiveShadow = true;
Add Comment
Please, Sign In to add comment