Skip to content

Instantly share code, notes, and snippets.

@nklsrh
Created July 10, 2013 02:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nklsrh/5963087 to your computer and use it in GitHub Desktop.
Save nklsrh/5963087 to your computer and use it in GitHub Desktop.
// create a point light
pointLight = new THREE.PointLight(0xF8D898);
// set its position
pointLight.position.x = -1000;
pointLight.position.y = 0;
pointLight.position.z = 1000;
pointLight.intensity = 2.9;
pointLight.distance = 10000;
scene.add(pointLight);
// add a spot light
// this is important for casting shadows
spotLight = new THREE.SpotLight(0xF8D898);
spotLight.position.set(0, 0, 460);
spotLight.intensity = 1.5;
spotLight.castShadow = true;
scene.add(spotLight);
// MAGIC SHADOW CREATOR DELUXE EDITION with Lights PackTM DLC
renderer.shadowMapEnabled = true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment