Last active
March 20, 2018 03:34
-
-
Save RxET/edd22f2c88289c3d7e6b078350c657ff to your computer and use it in GitHub Desktop.
Three.js or There’s a hypercube in my timeline and I can’t get out
This file contains 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 letThereBeLight() { | |
//create your light - this one is white at almost full intensity | |
var directionalLight = new THREE.DirectionalLight( 0xffffff, 0.9 ); | |
// set the light direction | |
directionalLight.position.set(150, 350, 350); | |
//let it cast shadows | |
directionalLight.castShadow = true; | |
// and add it to the scene | |
scene.add( directionalLight ); | |
controls = new THREE.OrbitControls(camera, renderer.domElement) | |
animate(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment