Fix lighting on main star.
This commit is contained in:
12
src/open.js
12
src/open.js
@@ -56,11 +56,11 @@ function addStar() {
|
||||
backMaterial.side = THREE.BackSide;
|
||||
|
||||
let star = new THREE.Mesh(frontGeometry, material);
|
||||
star.receiveShadow = true;
|
||||
star.castShadow = star.receiveShadow = true;
|
||||
coreStarGroup.add(star);
|
||||
|
||||
let backStar = new THREE.Mesh(backGeometry, backMaterial);
|
||||
backStar.receiveShadow = true;
|
||||
backStar.castShadow = backStar.receiveShadow = true;
|
||||
coreStarGroup.add(backStar);
|
||||
|
||||
let ringGeometry = generateStarRing(2, 3, 0.4);
|
||||
@@ -149,15 +149,15 @@ function initLighting() {
|
||||
let spotLight = new THREE.PointLight(0xffffff);
|
||||
spotLight.position.set(10, 10, 10);
|
||||
spotLight.castShadow = true;
|
||||
spotLight.shadow.mapSize.width = 1024; // default
|
||||
spotLight.shadow.mapSize.height = 1024; // default
|
||||
spotLight.shadow.mapSize.width = 2048; // default
|
||||
spotLight.shadow.mapSize.height = 2048; // 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
|
||||
spotLight2.shadow.mapSize.width = 2048; // default
|
||||
spotLight2.shadow.mapSize.height = 2048; // default
|
||||
scene.add(spotLight2);
|
||||
|
||||
let ambient = new THREE.AmbientLight(0x404040);
|
||||
|
||||
Reference in New Issue
Block a user