Skip to content

Commit b605a6f

Browse files
committed
fix(3d): 概览模式常驻显示模块标签与功能副标题,解决 3D 物体无法对应到功能
复现确认:3D 概览中行星虽渲染但默认无标签(仅悬浮显示),且功能副标题受新手期门控(首潜完成后消失),用户看到一堆无名彩色球体,无法把物体对应到功能(内测反馈'3D物体不可用'的真实根因)。修复:① SpatialNav 在概览模式(!isInModule)默认显示标签;② AuroraModuleEntity/ModuleEntity 的功能副标题改为常驻(移除 isNewbie 门控),始终展示'隐喻名 · 功能名'(如 深潜 · 专注番茄钟)。浏览器实测:标签可见、点击行星正确跳转对应模块。
1 parent 4888fb0 commit b605a6f

3 files changed

Lines changed: 8 additions & 12 deletions

File tree

‎client/src/lib/3d/navigation/SpatialNav.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export function SpatialNav() {
115115
emissiveColor={config.emissiveColor}
116116
isHovered={hoveredModule === module.id || highlightAll}
117117
isActive={currentModule === module.id}
118-
showLabel={highlightAll}
118+
showLabel={highlightAll || !isInModule}
119119
onClick={() => handleModuleClick(module.id)}
120120
onPointerOver={() => handleHover(module.id)}
121121
onPointerOut={() => handleHover(null)}
@@ -143,7 +143,7 @@ export function SpatialNav() {
143143
orbitSpeed={config.orbitSpeed}
144144
initialAngle={config.initialAngle}
145145
isActive={currentModule === module.id}
146-
showLabel={highlightAll}
146+
showLabel={highlightAll || !isInModule}
147147
onClick={handleModuleClick}
148148
onHover={handleHover}
149149
/>

‎client/src/lib/3d/objects/AuroraModuleEntity.tsx‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { useFrame } from '@react-three/fiber';
99
import * as THREE from 'three';
1010
import { Float, Html } from '@react-three/drei';
1111
import type { ModuleId } from '../navigation/OrbitalStore';
12-
import { useIsNewbiePhase } from '@/features/onboarding/firstDive/useFirstDiveStore';
1312
import { getModuleSubtitle } from '@/features/onboarding/firstDive/moduleSubtitles';
1413

1514
export interface AuroraModuleEntityProps {
@@ -55,8 +54,7 @@ export function AuroraModuleEntity({
5554
const ringRef = useRef<THREE.Mesh>(null);
5655
const [hovered, setHovered] = useState(false);
5756
const angleRef = useRef(initialAngle);
58-
// 新手期双标签(首潜完成后自动隐去)
59-
const isNewbie = useIsNewbiePhase();
57+
// 功能副标题:隐喻名(深潜/结礁…)无法自解释,常驻直白功能名确保用户能把行星对应到功能
6058
const subtitle = getModuleSubtitle(id);
6159

6260
const config = PLANET_CONFIGS[id];
@@ -173,8 +171,8 @@ export function AuroraModuleEntity({
173171
>
174172
<div className="rounded-lg bg-slate-900/80 px-3 py-1.5 text-sm font-medium text-white backdrop-blur-sm whitespace-nowrap border border-indigo-500/30">
175173
{config.label}
176-
{/* 新手期双标签:隐喻名旁附直白副标题 */}
177-
{isNewbie && subtitle && (
174+
{/* 常驻功能副标题:隐喻名旁附直白功能名 */}
175+
{subtitle && (
178176
<span className="ml-1.5 text-xs text-white/50">· {subtitle}</span>
179177
)}
180178
</div>

‎client/src/lib/3d/objects/ModuleEntity.tsx‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { useRef } from 'react';
88
import { useFrame } from '@react-three/fiber';
99
import * as THREE from 'three';
1010
import { Float, Html } from '@react-three/drei';
11-
import { useIsNewbiePhase } from '@/features/onboarding/firstDive/useFirstDiveStore';
1211
import { getModuleSubtitle } from '@/features/onboarding/firstDive/moduleSubtitles';
1312

1413
type GeometryType = 'dodecahedron' | 'torus' | 'box' | 'sphere' | 'octahedron' | 'icosahedron';
@@ -82,8 +81,7 @@ export function ModuleEntity({
8281
}: ModuleEntityProps) {
8382
const meshRef = useRef<THREE.Mesh>(null);
8483
const materialRef = useRef<THREE.MeshStandardMaterial>(null);
85-
// 新手期双标签(首潜完成后自动隐去)
86-
const isNewbie = useIsNewbiePhase();
84+
// 功能副标题:隐喻名(深潜/结礁…)无法自解释,常驻直白功能名确保用户能把几何体对应到功能
8785
const subtitle = getModuleSubtitle(id);
8886

8987
// Each entity has a unique rotation axis and speed
@@ -160,8 +158,8 @@ export function ModuleEntity({
160158
>
161159
<div className="rounded-lg bg-slate-900/80 px-3 py-1.5 text-sm font-medium text-white backdrop-blur-sm whitespace-nowrap border border-indigo-500/30">
162160
{label}
163-
{/* 新手期双标签:隐喻名旁附直白副标题 */}
164-
{isNewbie && subtitle && (
161+
{/* 常驻功能副标题:隐喻名旁附直白功能名 */}
162+
{subtitle && (
165163
<span className="ml-1.5 text-xs text-white/50">· {subtitle}</span>
166164
)}
167165
</div>

0 commit comments

Comments
 (0)