Fix planet and ship lighting regression
This commit is contained in:
@@ -1086,6 +1086,8 @@ export class GameApp {
|
||||
}
|
||||
this.camera.updateProjectionMatrix();
|
||||
|
||||
const focusedSystemId = this.findNearestSystem(this.getCameraFocus()).definition.id;
|
||||
|
||||
this.systems.forEach((system) => {
|
||||
const universe = this.viewLevel === "universe";
|
||||
|
||||
@@ -1106,6 +1108,7 @@ export class GameApp {
|
||||
});
|
||||
|
||||
system.star.visible = !universe;
|
||||
system.light.visible = !universe && system.definition.id === focusedSystemId;
|
||||
system.strategicMarker.visible = universe;
|
||||
});
|
||||
|
||||
|
||||
@@ -394,6 +394,7 @@ export interface SolarSystemInstance {
|
||||
center: THREE.Vector3;
|
||||
planets: PlanetInstance[];
|
||||
star: THREE.Object3D;
|
||||
light: THREE.PointLight;
|
||||
gravityWellRadius: number;
|
||||
orbitLines: THREE.LineLoop[];
|
||||
asteroidDecorations: THREE.Object3D[];
|
||||
|
||||
@@ -143,7 +143,7 @@ function createSolarSystem(
|
||||
root.add(glow);
|
||||
|
||||
const light = new THREE.PointLight(definition.starColor, 3.2, 2800, 1.2);
|
||||
light.castShadow = true;
|
||||
light.castShadow = false;
|
||||
root.add(light);
|
||||
|
||||
const planets = definition.planets.map((planetDefinition, index) => {
|
||||
@@ -234,6 +234,7 @@ function createSolarSystem(
|
||||
center: new THREE.Vector3(...definition.position),
|
||||
planets,
|
||||
star,
|
||||
light,
|
||||
gravityWellRadius: definition.gravityWellRadius,
|
||||
orbitLines,
|
||||
asteroidDecorations,
|
||||
|
||||
Reference in New Issue
Block a user