diff --git a/src/game/GameApp.ts b/src/game/GameApp.ts index 1058275..a4d74a9 100644 --- a/src/game/GameApp.ts +++ b/src/game/GameApp.ts @@ -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; }); diff --git a/src/game/types.ts b/src/game/types.ts index 397d3c7..b3c75b2 100644 --- a/src/game/types.ts +++ b/src/game/types.ts @@ -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[]; diff --git a/src/game/world/worldFactory.ts b/src/game/world/worldFactory.ts index 8571806..19bbba1 100644 --- a/src/game/world/worldFactory.ts +++ b/src/game/world/worldFactory.ts @@ -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,