11/**
22 * AuroraDomeWorld — 浅色模式「晨曦穹顶」3D场景
3- * 天文馆般的穹顶世界:太阳系行星轨道 + 星尘粒子 + 云层
3+ * 天文馆般的穹顶世界:太阳 + 星尘粒子 + 云层(模块行星由 SpatialNav 统一渲染)
44 *
55 * @ai -context: 3D 场景:AuroraDomeWorld。
66 */
77import { useRef , useMemo } from 'react' ;
88import { useFrame } from '@react-three/fiber' ;
99import * as THREE from 'three' ;
10- import { Float } from '@react-three/drei' ;
1110import { Bloom , Vignette , ChromaticAberration } from '@react-three/postprocessing' ;
1211import { BlendFunction } from 'postprocessing' ;
1312import { SafeEffectComposer } from '../core/SafeEffectComposer' ;
1413import { usePerformanceStore } from '../core/PerformanceMonitor' ;
15- import { AuroraModuleEntity } from '../objects/AuroraModuleEntity' ;
16- import { useOrbitalStore } from '../navigation/OrbitalStore' ;
17- import type { ModuleId } from '../navigation/OrbitalStore' ;
1814
1915// ─── 天空穹顶着色器 ───────────────────────────────────────
2016const domeVertexShader = /* glsl */ `
@@ -267,47 +263,9 @@ function CloudLayer() {
267263}
268264
269265// ─── 行星轨道系统 ─────────────────────────────────────────
270- const ORBIT_CONFIGS : Array < {
271- id : ModuleId ;
272- radius : number ;
273- speed : number ;
274- initialAngle : number ;
275- } > = [
276- { id : 'dashboard' , radius : 5 , speed : 0.3 , initialAngle : 0 } ,
277- { id : 'pomodoro' , radius : 8 , speed : 0.22 , initialAngle : Math . PI * 0.33 } ,
278- { id : 'notes' , radius : 11 , speed : 0.16 , initialAngle : Math . PI * 0.77 } ,
279- { id : 'flashcards' , radius : 14 , speed : 0.12 , initialAngle : Math . PI * 1.2 } ,
280- { id : 'feynman' , radius : 17 , speed : 0.09 , initialAngle : Math . PI * 1.6 } ,
281- { id : 'inspiration' , radius : 20 , speed : 0.06 , initialAngle : Math . PI * 0.1 } ,
282- ] ;
283-
284- function PlanetarySystem ( ) {
285- const { enterModule, setHovered } = useOrbitalStore ( ) ;
286-
287- const handleClick = ( id : ModuleId ) => {
288- enterModule ( id ) ;
289- } ;
290-
291- const handleHover = ( id : ModuleId | null ) => {
292- setHovered ( id ) ;
293- } ;
294-
295- return (
296- < group >
297- { ORBIT_CONFIGS . map ( ( orbit ) => (
298- < AuroraModuleEntity
299- key = { orbit . id }
300- id = { orbit . id }
301- orbitRadius = { orbit . radius }
302- orbitSpeed = { orbit . speed }
303- initialAngle = { orbit . initialAngle }
304- onClick = { handleClick }
305- onHover = { handleHover }
306- />
307- ) ) }
308- </ group >
309- ) ;
310- }
266+ // 模块行星(可点击导航)统一由 SpatialNav 渲染并负责路由跳转。
267+ // 本场景仅作环境背景,不重复生成行星实体——否则会出现两套可点击
268+ // 行星,外层行星只改状态不跳转,导致“点击 3D 物体”与功能错位。
311269
312270// ─── 主场景组件 ───────────────────────────────────────────
313271export function AuroraDomeWorld ( ) {
@@ -333,9 +291,6 @@ export function AuroraDomeWorld() {
333291 { /* 太阳系统 */ }
334292 < SunSystem />
335293
336- { /* 行星轨道系统 */ }
337- < PlanetarySystem />
338-
339294 { /* 星尘粒子 */ }
340295 < StarDust count = { particleCount } />
341296
0 commit comments