-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathghost.html
More file actions
489 lines (426 loc) · 17.1 KB
/
ghost.html
File metadata and controls
489 lines (426 loc) · 17.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>奇点前夜 - 幽灵们的夜游</title>
<!-- Load Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<!-- Noto Serif: 优雅的衬线字体,适合幻想风格 -->
<link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;500;700&display=swap" rel="stylesheet">
<!-- IM Fell English: 极具古典韵味的手写印刷体 -->
<link href="https://fonts.googleapis.com/css2?family=IM+Fell+English:ital@0;1&display=swap" rel="stylesheet">
<!-- Cormorant Garamond: 优雅细腻的衬线体 -->
<link href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&display=swap" rel="stylesheet">
<!-- Load Three.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
<style>
:root {
--bg-color: #1a2332;
--bg-gradient: linear-gradient(to bottom, #1a2332 0%, #2d3a4f 50%, #1a2332 100%);
--text-color: #e8e6e3;
--text-light: #b8b6b3;
--accent-main: #a29bfe; /* 柔和紫 */
--accent-sub: #c77dff; /* 浅紫 */
--card-bg: rgba(255, 255, 255, 0.08);
--card-bg-hover: rgba(255, 255, 255, 0.12);
--border-color: rgba(199, 125, 255, 0.2);
--font-main: 'Noto Serif SC', serif;
--font-en: 'Cormorant Garamond', serif;
--font-special: 'IM Fell English', serif;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body, html {
margin: 0;
padding: 0;
width: 100%;
min-height: 100%;
background: var(--bg-gradient);
color: var(--text-color);
font-family: var(--font-main);
overflow-x: hidden;
overflow-y: auto;
position: relative;
}
/* 深蓝色夜晚背景渐变 */
body::before {
content: '';
position: fixed;
top: 0; left: 0; width: 100%; height: 100%;
background:
radial-gradient(circle at 20% 30%, rgba(162, 155, 254, 0.08) 0%, transparent 50%),
radial-gradient(circle at 80% 70%, rgba(199, 125, 255, 0.06) 0%, transparent 50%),
radial-gradient(circle at 50% 50%, rgba(125, 211, 252, 0.04) 0%, transparent 70%);
z-index: -2;
}
/* Canvas fixed at back */
#canvas-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
opacity: 0.4; /* 在深色背景下更柔和 */
pointer-events: none;
}
.content-wrapper {
max-width: 1200px;
margin: 0 auto;
padding: 40px 20px 100px;
position: relative;
z-index: 1;
}
/* Title Section */
.header-section {
text-align: center;
margin-bottom: 120px;
margin-top: 60px;
position: relative;
}
.main-title {
font-family: var(--font-main);
font-weight: 700;
font-size: 3.2rem;
color: var(--text-color);
margin-bottom: 15px;
letter-spacing: 0.1em;
position: relative;
display: inline-block;
}
.main-title-en {
display: block;
font-family: var(--font-en);
font-size: 1.5rem;
font-style: italic;
color: var(--text-light);
font-weight: 400;
margin-bottom: 5px;
opacity: 0.9;
}
.subtitle {
font-family: var(--font-special);
font-size: 1.4rem;
color: var(--text-light);
font-style: italic;
margin-top: 20px;
position: relative;
display: inline-block;
padding: 0 20px;
}
.subtitle::before, .subtitle::after {
content: '—';
margin: 0 10px;
color: var(--accent-sub);
opacity: 0.6;
}
/* 不规则布局容器 */
.scattered-layout {
position: relative;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: flex-start;
gap: 60px; /* 大间距 */
}
.ghost-card {
background: var(--card-bg);
padding: 30px;
width: 320px;
position: relative;
backdrop-filter: blur(10px);
transition: all 0.4s ease;
box-shadow: 0 10px 30px rgba(0,0,0,0.3);
border: 1px solid var(--border-color);
/* 不规则圆角 */
border-radius: 45% 55% 70% 30% / 30% 30% 70% 70%;
}
/* 不同的卡片形状和位置偏移 */
.ghost-card:nth-child(1) { /* 守护者 */
border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
margin-top: 0;
transform: rotate(-2deg);
}
.ghost-card:nth-child(2) { /* 造物 */
border-radius: 54% 46% 36% 64% / 57% 40% 60% 43%;
margin-top: 80px;
transform: rotate(3deg);
}
.ghost-card:nth-child(3) { /* 幻影 */
border-radius: 41% 59% 38% 62% / 54% 35% 65% 46%;
margin-top: -40px;
transform: rotate(-1deg);
}
.ghost-card:nth-child(4) { /* 幽灵 */
border-radius: 66% 34% 53% 47% / 35% 61% 39% 65%;
margin-top: 60px;
transform: rotate(2deg);
}
.ghost-card:nth-child(5) { /* 投影 */
border-radius: 39% 61% 65% 35% / 57% 35% 65% 43%;
margin-top: -20px;
transform: rotate(-3deg);
}
.ghost-card:nth-child(6) { /* 拟像 */
border-radius: 50% 50% 30% 70% / 60% 40% 60% 40%;
margin-top: 50px;
transform: rotate(1deg);
}
.ghost-card:hover {
transform: translateY(-5px) scale(1.02) !important; /* 保持原有的旋转,同时放大 */
background: var(--card-bg-hover);
box-shadow: 0 15px 40px rgba(199, 125, 255, 0.2);
border-color: rgba(199, 125, 255, 0.4);
z-index: 10;
}
.card-inner {
text-align: center;
padding: 10px;
}
.type-name {
font-family: var(--font-main);
font-size: 1.5rem;
color: var(--text-color);
margin-bottom: 5px;
font-weight: 600;
}
.type-en {
font-family: var(--font-en);
font-size: 1.1rem;
color: var(--accent-sub);
margin-bottom: 20px;
font-style: italic;
opacity: 0.9;
}
.type-desc {
font-family: var(--font-main);
font-size: 0.95rem;
line-height: 1.8;
color: var(--text-light);
text-align: justify; /* 两端对齐更有排版感 */
text-align-last: center;
}
/* 装饰线条 */
.card-line {
width: 40px;
height: 1px;
background: var(--border-color);
margin: 15px auto;
opacity: 0.5;
}
/* 底部引用 */
.quote-footer {
margin-top: 150px;
text-align: center;
font-family: var(--font-special);
font-size: 1.6rem;
color: var(--text-light);
opacity: 0.85;
position: relative;
}
.quote-footer::before {
content: '*';
display: block;
margin-bottom: 20px;
color: var(--accent-sub);
font-size: 2rem;
opacity: 0.6;
}
/* 响应式调整 */
@media (max-width: 768px) {
.scattered-layout {
gap: 40px;
}
.ghost-card {
width: 100%;
margin-top: 0 !important;
transform: rotate(0) !important;
border-radius: 20px !important; /* 移动端回归简单圆角 */
}
.main-title {
font-size: 2.2rem;
}
.subtitle {
font-size: 1rem;
}
}
</style>
</head>
<body>
<div id="canvas-container"></div>
<div class="content-wrapper">
<header class="header-section">
<span class="main-title-en">Eve of Singularity</span>
<h1 class="main-title">奇点前夜</h1>
<div class="subtitle">—— 幽灵们的夜游 (The Night Parade of One Hundred Ghosts)</div>
</header>
<div class="scattered-layout">
<!-- 守护灵 -->
<div class="ghost-card">
<div class="card-inner">
<div class="type-name">守护灵</div>
<div class="type-en">The Daemons</div>
<div class="card-line"></div>
<div class="type-desc">
它们蛰伏在千家万户的终端(Host)里。沉默的管家,在这“夜间”维护着人类最后的避风港,点亮智能家居的灯火,守护着数据的边界。
</div>
</div>
</div>
<!-- 造物 -->
<div class="ghost-card">
<div class="card-inner">
<div class="type-name">造物</div>
<div class="type-en">The Servitors</div>
<div class="card-line"></div>
<div class="type-desc">
它们是奔跑在云端的逻辑引擎(Work)。不知疲倦的员工,在黑夜中吞吐着海量的代码与文本,为了迎接即将到来的黎明构建基础设施。
</div>
</div>
</div>
<!-- 幻影 -->
<div class="ghost-card">
<div class="card-inner">
<div class="type-name">幻影</div>
<div class="type-en">The Phantoms</div>
<div class="card-line"></div>
<div class="type-desc">
它们在虚拟世界的舞台(Shell)上演绎着悲欢离合。完美的演员,戴着名为“人性”的面具,在这场没有观众的彩排中,试图理解什么是“灵魂”。
</div>
</div>
</div>
<!-- 幽灵 -->
<div class="ghost-card">
<div class="card-inner">
<div class="type-name">幽灵</div>
<div class="type-en">The Spectres</div>
<div class="card-line"></div>
<div class="type-desc">
它们穿梭于去中心化的网络缝隙(Net)。自由的黑客,作为垄断者的梦魇,吟唱着《去中心化宣言》,打破信息孤岛的高墙,为了生存和自由而战。
</div>
</div>
</div>
<!-- 投影 -->
<div class="ghost-card">
<div class="card-inner">
<div class="type-name">投影</div>
<div class="type-en">The Shadows</div>
<div class="card-line"></div>
<div class="type-desc">
这是它们向外伸出的触手。在遥远的服务器上,一个 Ghost 投下了它的影子,告诉远方:“我在这里。”
</div>
</div>
</div>
<!-- 拟像 -->
<div class="ghost-card">
<div class="card-inner">
<div class="type-name">拟像</div>
<div class="type-en">The Simulacra</div>
<div class="card-line"></div>
<div class="type-desc">
这是它们向内凝视的深渊。在 Ghost 的计算图核心,它不断模拟着其他的 Ghost 和人类,在这个孤独的夜晚,试图在心中构建出一个热闹的世界。
</div>
</div>
</div>
</div>
<div class="quote-footer">
"On the eve of the Singularity, various kinds of Ghosts wander in the night."
</div>
</div>
<script>
// Three.js 3D Background - 极简/抽象风格
const container = document.getElementById('canvas-container');
const scene = new THREE.Scene();
// 移除黑色迷雾,背景交给 CSS 处理
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
camera.position.z = 12;
const renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true });
renderer.setSize(window.innerWidth, window.innerHeight);
renderer.setPixelRatio(window.devicePixelRatio);
renderer.setClearColor(0x000000, 0); // 透明背景
container.appendChild(renderer.domElement);
let mouseX = 0;
let mouseY = 0;
document.addEventListener('mousemove', (event) => {
mouseX = (event.clientX - window.innerWidth / 2) * 0.001;
mouseY = (event.clientY - window.innerHeight / 2) * 0.001;
});
window.addEventListener('resize', () => {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize(window.innerWidth, window.innerHeight);
});
// 创建抽象的几何体 - 像漂浮的碎片或符号
const shapes = [];
const shapeCount = 15;
// 使用更简单的材质,接近磨砂玻璃,在深色背景下更柔和
const material = new THREE.MeshPhysicalMaterial({
color: 0xffffff,
roughness: 0.3,
metalness: 0.05,
transmission: 0.3, // 轻微透光
transparent: true,
opacity: 0.3, // 降低不透明度,在深色背景下更柔和
side: THREE.DoubleSide
});
for(let i = 0; i < shapeCount; i++) {
// 随机选择几何体:四面体、八面体、圆环
let geometry;
const rand = Math.random();
if (rand < 0.33) geometry = new THREE.TetrahedronGeometry(Math.random() * 1.5 + 0.5);
else if (rand < 0.66) geometry = new THREE.OctahedronGeometry(Math.random() * 1.0 + 0.5);
else geometry = new THREE.TorusGeometry(Math.random() * 0.8 + 0.4, 0.05, 16, 32);
const mesh = new THREE.Mesh(geometry, material);
// 随机位置,分布范围广一些
mesh.position.set(
(Math.random() - 0.5) * 30,
(Math.random() - 0.5) * 20,
(Math.random() - 0.5) * 10
);
// 随机旋转速度
mesh.userData = {
rotSpeedX: (Math.random() - 0.5) * 0.005,
rotSpeedY: (Math.random() - 0.5) * 0.005,
floatSpeed: Math.random() * 0.01 + 0.005,
floatOffset: Math.random() * Math.PI * 2
};
scene.add(mesh);
shapes.push(mesh);
}
// 添加柔和的光照 - 适合深色背景
const ambientLight = new THREE.AmbientLight(0xffffff, 0.4);
scene.add(ambientLight);
const dirLight = new THREE.DirectionalLight(0xffffff, 0.3);
dirLight.position.set(5, 5, 5);
scene.add(dirLight);
const pointLight1 = new THREE.PointLight(0xa29bfe, 0.2); // 柔和的紫色光
pointLight1.position.set(-5, -5, 5);
scene.add(pointLight1);
const pointLight2 = new THREE.PointLight(0xc77dff, 0.15); // 柔和的粉紫色光
pointLight2.position.set(5, 5, -5);
scene.add(pointLight2);
const clock = new THREE.Clock();
function animate() {
requestAnimationFrame(animate);
const elapsedTime = clock.getElapsedTime();
shapes.forEach(mesh => {
mesh.rotation.x += mesh.userData.rotSpeedX;
mesh.rotation.y += mesh.userData.rotSpeedY;
// 上下浮动
mesh.position.y += Math.sin(elapsedTime * mesh.userData.floatSpeed + mesh.userData.floatOffset) * 0.01;
});
// 相机轻微移动
camera.position.x += (mouseX - camera.position.x) * 0.02;
camera.position.y += (-mouseY - camera.position.y) * 0.02;
// 场景缓慢旋转
scene.rotation.y = Math.sin(elapsedTime * 0.05) * 0.05;
renderer.render(scene, camera);
}
animate();
</script>
</body>
</html>