Created
February 3, 2019 18:32
-
-
Save Davisonpro/63076b6bc94279eca21e6c59b5ac7554 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createLights() { | |
globalLight = new THREE.AmbientLight(0xffffff, .9); | |
shadowLight = new THREE.DirectionalLight(0xffffff, 1); | |
shadowLight.position.set(-30, 40, 20); | |
shadowLight.castShadow = true; | |
shadowLight.shadow.camera.left = -400; | |
shadowLight.shadow.camera.right = 400; | |
shadowLight.shadow.camera.top = 400; | |
shadowLight.shadow.camera.bottom = -400; | |
shadowLight.shadow.camera.near = 1; | |
shadowLight.shadow.camera.far = 2000; | |
shadowLight.shadow.mapSize.width = shadowLight.shadow.mapSize.height = 2048; | |
scene.add(globalLight); | |
scene.add(shadowLight); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment