diff --git a/src/open.js b/src/open.js index 2319de0..19798f8 100644 --- a/src/open.js +++ b/src/open.js @@ -4,7 +4,6 @@ const STAR_POINTS = 5; let scene, camera, renderer; let coreStarGroup; -let lights = {}; let animation = { steps: 0, x: new Float32Array(4), @@ -154,11 +153,15 @@ function initLighting() { spotLight.shadow.mapSize.height = 1024; // default scene.add(spotLight); + let spotLight2 = new THREE.PointLight(0xffffff, 0.8); + spotLight2.position.set(-10, 0, 0); + spotLight2.castShadow = true; + spotLight2.shadow.mapSize.width = 1024; // default + spotLight2.shadow.mapSize.height = 1024; // default + scene.add(spotLight2); + let ambient = new THREE.AmbientLight(0x404040); scene.add(ambient); - - lights.spotLight = spotLight; - lights.ambient = ambient; } /**