Skip to content

Commit b0f871a

Browse files
committed
style(3d): 场景背景去紫感,穹顶极光色退役靛蓝/青
1 parent f202b97 commit b0f871a

3 files changed

Lines changed: 17 additions & 11 deletions

File tree

‎client/src/lib/3d/core/SceneProvider.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function ThemeAwareEnvironment() {
5050
useEffect(() => {
5151
if (theme === 'deep-sea') {
5252
scene.fog = new THREE.FogExp2('#0a0a2e', 0.03);
53-
scene.background = new THREE.Color('#0a0a2e');
53+
scene.background = new THREE.Color('#0A1620');
5454
} else {
5555
scene.fog = new THREE.FogExp2('#e8f4f8', 0.015);
5656
scene.background = new THREE.Color('#e8f4f8');
@@ -135,7 +135,7 @@ export function SceneProvider({ children, interactive = false }: SceneProviderPr
135135
camera={{ fov: 60, near: 0.1, far: 1000, position: [0, 0, 10] }}
136136
dpr={[1, 2]}
137137
style={{ background: 'transparent' }}
138-
onCreated={({ gl, scene }) => {
138+
onCreated={({ gl }) => {
139139
gl.toneMapping = THREE.ACESFilmicToneMapping;
140140
gl.toneMappingExposure = 1.0;
141141
gl.shadowMap.enabled = true;

‎client/src/lib/3d/scenes/AuroraDomeWorld.tsx‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const domeFragmentShader = /* glsl */ `
4141
function SkyDome() {
4242
const uniforms = useMemo(() => ({
4343
uColorTop: { value: new THREE.Color('#FCD34D') },
44-
uColorMid: { value: new THREE.Color('#60A5FA') },
44+
uColorMid: { value: new THREE.Color('#4A7DB0') },
4545
uColorBottom: { value: new THREE.Color('#F8FAFC') },
4646
}), []);
4747

@@ -114,13 +114,12 @@ function SunSystem() {
114114

115115
// ─── 极光效果 ─────────────────────────────────────────────
116116
function AuroraBorealis() {
117-
const meshRef = useRef<THREE.Mesh>(null);
118117
const timeRef = useRef(0);
119118

120119
const uniforms = useMemo(() => ({
121120
uTime: { value: 0 },
122-
uColorA: { value: new THREE.Color('#22D3EE') },
123-
uColorB: { value: new THREE.Color('#818CF8') },
121+
uColorA: { value: new THREE.Color('#6FB4E8') },
122+
uColorB: { value: new THREE.Color('#9FB8D8') },
124123
uColorC: { value: new THREE.Color('#34D399') },
125124
}), []);
126125

@@ -307,7 +306,7 @@ function CloudLayer() {
307306
const cloudsRef = useRef<THREE.Group>(null);
308307

309308
const cloudData = useMemo(() => {
310-
return Array.from({ length: 8 }, (_, i) => ({
309+
return Array.from({ length: 8 }, () => ({
311310
position: [
312311
(Math.random() - 0.5) * 50,
313312
12 + Math.random() * 25,
@@ -393,7 +392,7 @@ export function AuroraDomeWorld() {
393392
<mesh position={[0, 12, 25]} rotation={[-0.2, Math.PI * 0.7, 0]}>
394393
<planeGeometry args={[50, 18, 48, 48]} />
395394
<shaderMaterial
396-
uniforms={{ uTime: { value: 0 }, uColorA: { value: new THREE.Color('#34D399') }, uColorB: { value: new THREE.Color('#FCD34D') }, uColorC: { value: new THREE.Color('#818CF8') } }}
395+
uniforms={{ uTime: { value: 0 }, uColorA: { value: new THREE.Color('#34D399') }, uColorB: { value: new THREE.Color('#FCD34D') }, uColorC: { value: new THREE.Color('#9FB8D8') } }}
397396
vertexShader={`varying vec2 vUv;varying vec3 vPosition;void main(){vUv=uv;vPosition=position;gl_Position=projectionMatrix*modelViewMatrix*vec4(position,1.0);}`}
398397
fragmentShader={`
399398
uniform float uTime;uniform vec3 uColorA;uniform vec3 uColorB;uniform vec3 uColorC;varying vec2 vUv;varying vec3 vPosition;

‎client/src/lib/3d/scenes/DeepSeaWorld.tsx‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ import { OrderRipples } from '../objects/OrderRipples';
1515
import { TideBreath } from '../objects/TideBreath';
1616
import { StrataField } from '../objects/StrataField';
1717
import { ParticleSystem } from '../objects/ParticleSystem';
18+
import { JellyfishField } from '../objects/JellyfishField';
19+
import { FishSchool } from '../objects/FishSchool';
20+
import { LeviathanShadow } from '../objects/LeviathanShadow';
1821

1922
// ─── 深海背景着色器(渐变+深渊光感) ─────────────────
2023
const abyssVertexShader = `
@@ -69,8 +72,8 @@ const abyssFragmentShader = `
6972
/** 深海背景穹顶 */
7073
function AbyssDome() {
7174
const uniforms = useMemo(() => ({
72-
uColorTop: { value: new THREE.Color('#0A1628') },
73-
uColorMid: { value: new THREE.Color('#0D1F3C') },
75+
uColorTop: { value: new THREE.Color('#0A1620') },
76+
uColorMid: { value: new THREE.Color('#0F1F2E') },
7477
uColorBottom: { value: new THREE.Color('#0A0E1A') },
7578
uGlowColor: { value: new THREE.Color('#1A5276') },
7679
uTime: { value: 0 },
@@ -213,7 +216,6 @@ function CausticLight() {
213216

214217
// ─── 体积光柱(God rays 简化版) ─────────────────────
215218
function LightRays() {
216-
const meshRef = useRef<THREE.Mesh>(null);
217219
const timeRef = useRef(0);
218220

219221
const uniforms = useMemo(() => ({
@@ -355,6 +357,11 @@ export function DeepSeaWorld() {
355357
<TideBreath />
356358
<StrataField />
357359

360+
{/* 深海生命层(2026-08-07 新增):鱼群=思绪游弋,水母=灵感浮现,巨影=未知敬畏 */}
361+
<FishSchool />
362+
<JellyfishField />
363+
<LeviathanShadow />
364+
358365
{/* 后处理 — ── 临时诊断:完全禁用 composer,验证实体是否因此可见 ── */}
359366
{null}
360367
</group>

0 commit comments

Comments
 (0)