全站按设计预览站重做(门户改多页 + 下单页对齐)、新加载动画、金钻宇宙开场星门;站点信息集中到 site-info.js
- 门户:单页改成 index / gallery / tools / universe / links / about 六页,标记 / 样式 / 交互照预览站;内容照旧读 content/site.js - 画展:预览站作品墙 + 原有全部功能(筛选、排序、看过的、高清、本站视频、B 站、全景、动态壁纸、观展统计、外链);按最矮列投放保证时间顺序 - 加载动画 boot.js:像素钻石垒成形 → 白光 → 店名逐字 → 进度条 → 幕布上收(每个标签页只放一次,减少动效时不放) - 金钻宇宙开场 gate.js:星门(钻石 + 光谱环 + 世界线格子逐个点亮),星系画好后炸开接镜头俯冲 - 下单页:全站顶栏 / 底栏 / 页脚、宽版面、落地「怎么下单?」两张路卡 + 下过单了 + 模板样图;下单逻辑和按钮 id 不动 - 站点固定信息(域名 / 群号 / 备案号 / 邮箱)只在 assets/site-info.js,仓库是占位,正式服务器只换这一个文件 - 像素字体换成常用 3755 字 + 全部内容的子集(门户和下单页共用);旧链接 /#/板块、/#0001 自动跳新页 - 交接文档 / 星系图说明 / nginx 片段同步更新 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
/* 金钻宇宙 · 开场「星门」(2026-10-06 重做,替换原来的「星图载入中…」一行字)
|
||||
---------------------------------------------------------------------------
|
||||
three.js 在下载 / 星系在生成的这段时间,星图窗里是一道星门:
|
||||
· 中间像素钻石,外面三圈光环反向慢转;底下一排格子 = 全部世界线(写好的 + 空槽);
|
||||
· 一道光沿着格子来回扫,写好的世界线按编号一格一格点亮成它自己的颜色(空槽保持虚线);
|
||||
· 星系第一帧画好(galaxy.js 的 onReady)→ JZGate.open():光环向外炸开、格子散开、星门淡出,
|
||||
正好接上 galaxy.js 自己的镜头俯冲入场;
|
||||
· 打不开 3D(老设备 / 没 WebGL)→ JZGate.fail(说明):星门停住,换成说明文字,下面的档案照样能看;
|
||||
· 系统要求「减少动效」:不扫、不炸,直接淡出。 */
|
||||
(function () {
|
||||
'use strict';
|
||||
var gate = document.getElementById('uGate'); if (!gate) return;
|
||||
var reduce = matchMedia('(prefers-reduced-motion: reduce)').matches;
|
||||
var msg = document.getElementById('uGateMsg'), slots = document.getElementById('uGateSlots');
|
||||
var uv = window.JZP && window.JZP.universes ? window.JZP.universes() : { lit: [], empty: [], looks: {} };
|
||||
var all = uv.lit.concat(uv.empty).sort(function (a, b) { return a.no < b.no ? -1 : 1; });
|
||||
slots.innerHTML = all.map(function (u, i) {
|
||||
var lk = uv.looks[u.no] || {}, c = u.empty ? '' : (lk.accent || u.tone || '#9A6BE0');
|
||||
return '<i class="' + (u.empty ? 'e' : 'l') + '" style="--i:' + i + (c ? ';--c:' + c : '') + '" title="' + u.no + '"></i>';
|
||||
}).join('');
|
||||
gate.style.setProperty('--n', all.length);
|
||||
gate.classList.add('scan');
|
||||
var t0 = performance.now(), opened = false;
|
||||
/* 下载慢的时候换几句话,别让人以为卡死了 */
|
||||
var lines = ['正在打开星门…', '正在装载星系引擎…', '正在排布 ' + all.length + ' 条世界线…', '马上就好…'];
|
||||
var li = 0, lt = setInterval(function () { if (!opened && li < lines.length - 1) msg.textContent = lines[++li]; }, 1400);
|
||||
window.JZGate = {
|
||||
open: function () {
|
||||
if (opened) return; opened = true; clearInterval(lt);
|
||||
/* 至少让扫描走完一轮(约 1.1 秒),太快打开反而像闪了一下 */
|
||||
var wait = reduce ? 0 : Math.max(0, 1100 - (performance.now() - t0));
|
||||
setTimeout(function () {
|
||||
msg.textContent = '已点亮 ' + uv.lit.length + ' 条世界线';
|
||||
gate.classList.add('open');
|
||||
setTimeout(function () { gate.remove(); }, reduce ? 300 : 1300);
|
||||
}, wait);
|
||||
},
|
||||
fail: function (text) {
|
||||
opened = true; clearInterval(lt);
|
||||
gate.classList.remove('scan'); gate.classList.add('failed'); msg.textContent = text;
|
||||
}
|
||||
};
|
||||
})();
|
||||
@@ -1,6 +1,5 @@
|
||||
/* 金钻宇宙板块:白色客栈页面里开一扇「观星窗」,窗里是星系图;窗下是世界线档案列表(和星图联动)
|
||||
像素字 / 按钮 / 墨色都沿用门户 jz-2026 层的变量(--pixel --ink --mc-green --stone …),这里只管星图自己的东西。 */
|
||||
.skywin{--sky:#070B1C;--ui:#FFD36E;--line:rgba(127,139,200,.35);
|
||||
/* 金钻宇宙页:白色客栈页面里开一扇「观星窗」,窗里是星系图;窗下是世界线档案列表(和星图联动) */
|
||||
.skywin{--sky:#070B1C;--ui:#FFD36E;--line:rgba(127,139,200,.35);--pixel:'Fusion Pixel','OPPO Sans',sans-serif;
|
||||
position:relative;margin:6px 0 26px;padding:6px;border-radius:12px;background:rgba(255,255,255,.75);border:2px solid #fff;
|
||||
box-shadow:0 30px 60px -36px rgba(40,50,110,.55)}
|
||||
.skywin .stage{position:relative;height:min(72vh,660px);min-height:440px;border-radius:8px;overflow:hidden;background:var(--sky);color:#E8EBFA;isolation:isolate}
|
||||
@@ -26,7 +25,7 @@
|
||||
.skywin .panel .card{position:relative;padding:20px 20px 16px 24px;border-radius:8px;background:rgba(255,255,255,.96);border:2px solid #fff;color:var(--ink);box-shadow:0 30px 70px -30px rgba(0,0,0,.6)}
|
||||
.skywin .panel .card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;border-radius:8px 0 0 8px;background:var(--pc,#FFD36E)}
|
||||
.skywin .panel .card .k{font:600 12px/1 var(--font,inherit);letter-spacing:.06em;color:var(--ink-3)}
|
||||
.skywin .panel .card h2{margin:8px 0 2px;font:400 28px/1.2 var(--pixel);-webkit-font-smoothing:none}
|
||||
.skywin .panel .card h2{margin:8px 0 2px;font:400 28px/1.2 'Fusion Pixel','OPPO Sans',sans-serif;-webkit-font-smoothing:none}
|
||||
.skywin .panel .card .tg{color:var(--ink-2);font-size:14px}
|
||||
.skywin .panel .card .ds{margin:10px 0 0;font-size:14px;line-height:1.8;color:var(--ink-2)}
|
||||
.skywin .panel .card .tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
|
||||
@@ -37,9 +36,6 @@
|
||||
/* 窗角按钮 */
|
||||
.skywin .ctl{position:absolute;right:14px;top:12px;display:flex;gap:8px}
|
||||
.skywin .ctl .btn{height:34px;font-size:13px;padding:0 12px 3px}
|
||||
/* 档案卡里「回到星系图」是主按钮:门户的 .btn 是石头白方块,这里补一个绿色 .pri(同 .btn-solid) */
|
||||
.skywin .btn.pri{background:var(--mc-green);border-color:var(--mc-green-lo);color:#fff;box-shadow:inset 0 2px 0 var(--mc-green-hi),inset 0 -4px 0 var(--mc-green-lo)}
|
||||
.skywin .btn.pri:hover{background:#469A2E}
|
||||
.skywin #uBack{display:none} .skywin .stage.focus #uBack{display:inline-flex}
|
||||
.skywin .tip{position:absolute;left:18px;bottom:14px;margin:0;font-size:12px;color:#7C84B4;pointer-events:none;transition:opacity .3s}
|
||||
.skywin .stage.focus .tip{opacity:0}
|
||||
@@ -48,7 +44,6 @@
|
||||
.skywin.full .stage{position:fixed;inset:0;z-index:300;height:auto;min-height:0;border-radius:0}
|
||||
body.sky-full{overflow:hidden}
|
||||
/* 窗下:世界线列表 */
|
||||
.uni-title{margin:4px 0 14px;font-size:24px;line-height:1.3;color:var(--ink)}
|
||||
.sky-hint{display:none}
|
||||
.uni-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px;margin-bottom:14px}
|
||||
.ucell{position:relative;display:flex;flex-direction:column;gap:4px;padding:16px 16px 14px;border-radius:8px;border:2px solid rgba(255,255,255,.95);text-align:left;cursor:pointer;font:inherit;color:var(--ink);
|
||||
@@ -56,7 +51,7 @@ body.sky-full{overflow:hidden}
|
||||
.ucell:hover{transform:translateY(-2px)}
|
||||
.ucell[aria-current=true]{box-shadow:inset 0 0 0 3px var(--mc-green,#3C8527),0 18px 36px -26px rgba(80,90,170,.45)}
|
||||
.ucell .no{font:600 11px/1 ui-monospace,Menlo,monospace;letter-spacing:.14em;color:var(--ink-3)}
|
||||
.ucell h3{margin:2px 0 0;font:400 22px/1.25 var(--pixel);-webkit-font-smoothing:none}
|
||||
.ucell h3{margin:2px 0 0;font:400 22px/1.25 'Fusion Pixel','OPPO Sans',sans-serif;-webkit-font-smoothing:none}
|
||||
.ucell .tg{font-size:13px;color:var(--ink-2)}
|
||||
.ucell .go{margin-top:6px;font-size:12.5px;font-weight:700;color:var(--mc-green,#3C8527)}
|
||||
.ucell .sw{position:absolute;right:14px;top:14px;width:26px;height:26px;border-radius:50%;background:var(--sw);box-shadow:inset -5px -5px 0 rgba(0,0,0,.18),0 0 0 2px #fff}
|
||||
@@ -94,3 +89,50 @@ body.sky-full{overflow:hidden}
|
||||
.uslots{grid-template-columns:repeat(3,minmax(0,1fr))}
|
||||
}
|
||||
@media (prefers-reduced-motion:reduce){.skywin .panel,.skywin .labels,.skywin .hud,.ucell{transition:none;animation:none}}
|
||||
|
||||
/* ===== 开场星门(2026-10-06,替换「星图载入中…」):钻石 + 三圈光环 + 一排世界线格子,星系画好就向外炸开 ===== */
|
||||
.ugate{position:absolute;inset:0;z-index:6;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;pointer-events:none;
|
||||
background:radial-gradient(46% 52% at 50% 46%,rgba(255,255,255,.96) 0%,rgba(246,247,255,.9) 55%,rgba(238,240,255,.86) 100%);transition:opacity .9s ease .25s}
|
||||
.ugate-core{position:relative;width:150px;height:150px;display:grid;place-items:center}
|
||||
.ugate-core i{width:62px;height:62px;filter:drop-shadow(-6px 12px 14px rgba(255,110,140,.3)) drop-shadow(6px 12px 14px rgba(70,140,255,.3));animation:ugFloat 2.6s ease-in-out infinite}
|
||||
.ugate-ring{position:absolute;inset:0;border-radius:50%;padding:2px;background:conic-gradient(from 0deg,#FFB3C3,#FFD99A,#A9EBC6,#A6D5FF,#CDB9FF,#FFB3C3);
|
||||
-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0);
|
||||
animation:ugSpin 6s linear infinite;transition:transform .9s cubic-bezier(.2,.7,.2,1),opacity .8s ease}
|
||||
.ugate-ring.r2{inset:16%;opacity:.7;animation-duration:4.2s;animation-direction:reverse}
|
||||
.ugate-ring.r3{inset:-18%;opacity:.4;padding:1px;animation-duration:9s;border-radius:50%}
|
||||
.ugate-txt{display:flex;flex-direction:column;align-items:center;gap:6px;transition:opacity .4s ease,transform .6s ease}
|
||||
.ugate-txt b{font:400 28px/1 var(--pixel,inherit);letter-spacing:.08em;color:var(--ink,#1E2440);-webkit-font-smoothing:none}
|
||||
.ugate-txt span{font-size:13px;color:var(--ink-3,#737891)}
|
||||
.ugate-slots{display:grid;grid-template-columns:repeat(var(--n,11),18px);gap:6px;transition:opacity .5s ease}
|
||||
.ugate-slots i{position:relative;height:28px;border-radius:3px;border:1.5px dashed rgba(140,150,200,.45);background:rgba(255,255,255,.6);transition:transform .7s cubic-bezier(.2,.7,.2,1),opacity .6s ease}
|
||||
.ugate-slots i.l{border:0;background:#fff;box-shadow:inset 0 0 0 2px rgba(30,36,64,.08)}
|
||||
.ugate.scan .ugate-slots i.l{animation:ugLight .5s ease both;animation-delay:calc(180ms + var(--i) * 90ms)}
|
||||
.ugate.scan .ugate-slots::after{content:"";grid-row:1;grid-column:1/-1;height:28px;border-radius:3px;pointer-events:none;
|
||||
background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.95) 50%,transparent 100%);background-size:40% 100%;background-repeat:no-repeat;mix-blend-mode:screen;animation:ugScan 1.4s ease-in-out infinite}
|
||||
@keyframes ugLight{to{background:linear-gradient(180deg,#fff 0%,var(--c) 100%);box-shadow:0 8px 14px -6px var(--c)}}
|
||||
@keyframes ugScan{0%{background-position:-40% 0}100%{background-position:140% 0}}
|
||||
@keyframes ugSpin{to{transform:rotate(360deg)}}
|
||||
@keyframes ugFloat{50%{transform:translateY(-6px)}}
|
||||
/* 打开:光环向外炸开、格子往两边散、钻石一亮,整块淡出 —— 正好接上星系图自己的镜头俯冲 */
|
||||
.ugate.open{opacity:0}
|
||||
.ugate.open .ugate-ring{opacity:0;animation-play-state:paused}
|
||||
.ugate.open .ugate-ring.r1{transform:scale(4.2)}
|
||||
.ugate.open .ugate-ring.r2{transform:scale(5.4)}
|
||||
.ugate.open .ugate-ring.r3{transform:scale(3.4)}
|
||||
.ugate.open .ugate-core i{animation:ugFlash .7s ease forwards}
|
||||
@keyframes ugFlash{30%{transform:scale(1.25);filter:brightness(1.6) drop-shadow(0 0 22px #fff)}100%{transform:scale(.4);opacity:0}}
|
||||
.ugate.open .ugate-txt{opacity:0;transform:translateY(12px)}
|
||||
.ugate.open .ugate-slots i{opacity:0;transform:translateX(calc((var(--i) - var(--n) / 2) * 26px)) translateY(-40px) scale(.6)}
|
||||
.ugate.failed .ugate-core i,.ugate.failed .ugate-ring{animation:none}
|
||||
.ugate.failed .ugate-txt span{max-width:30em;text-align:center;color:var(--ink-2,#4A5070)}
|
||||
@media (max-width:760px){
|
||||
.ugate{gap:16px}
|
||||
.ugate-core{width:110px;height:110px}
|
||||
.ugate-core i{width:46px;height:46px}
|
||||
.ugate-slots{grid-template-columns:repeat(var(--n,11),14px);gap:4px}
|
||||
.ugate-slots i{height:22px}
|
||||
}
|
||||
@media (prefers-reduced-motion:reduce){
|
||||
.ugate-ring,.ugate-core i,.ugate.scan .ugate-slots::after{animation:none}
|
||||
.ugate.scan .ugate-slots i.l{animation:none;background:linear-gradient(180deg,#fff 0%,var(--c) 100%)}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
# 交接说明 · 金钻宇宙星系图(`portal/assets/universe/`)
|
||||
|
||||
> 状态:**已接进门户**(2026-10-05):`portal/index.html` 的「金钻宇宙」板块就是它,原来的启动仪式 / 盘符机架 / 读盘舱已删除。
|
||||
> 状态:**已接进门户**(2026-10-05);2026-10-06 起门户是多页,星系图在 `portal/universe.html`(样子按设计预览站),开场是 `gate.js` 的「星门」(星系第一帧画好才打开,接上下面的镜头俯冲)。
|
||||
> 风格参考:《绝地潜兵 2》银河战争地图 —— 旋臂星系 + 星云 + 扇区 + 补给线;每条世界线是一个星系,点进去是一颗卡通星球 + 档案卡。
|
||||
|
||||
---
|
||||
@@ -13,7 +13,7 @@
|
||||
| `assets/universe/planets.js` | 卡通星球材质库(每种「风格」= 一段着色器 + 默认参数) | 加新风格时改 |
|
||||
| `assets/universe/galaxy.js` | 引擎:画星系、星云、补给线、名牌,处理拖动 / 缩放 / 点击 / 档案卡 / 运镜 | 一般不用动 |
|
||||
| `assets/universe/universe.css` | 观星窗、档案卡、窗下世界线卡片、手机布局的样式 | 改版式时改 |
|
||||
| `portal/index.html` 里 `#view-universe` + 底部那段 `<script type="module">` | 板块骨架(窗户 / 名牌层 / HUD / 档案卡 / 卡片列表)和接线代码 | 改交互时改 |
|
||||
| `portal/universe.html`(`#skywin` + 底部那段 `<script type="module">`)+ `universe-page.css` + `gate.js` | 页面骨架(窗户 / 名牌层 / HUD / 档案卡 / 卡片列表)、接线代码、开场星门 | 改交互时改 |
|
||||
| `assets/vendor/three.module.min.js` | three.js r170(MIT,自托管,不连外网) | 不动 |
|
||||
|
||||
**没有任何贴图、模型文件**:星球、星云、星点全是着色器实时生成的,所以没有版权问题,也不用担心图片加载慢。
|
||||
@@ -211,6 +211,6 @@ myStyle: {
|
||||
|
||||
## 10. 部署注意(踩过的坑)
|
||||
|
||||
- 静态文件可能被缓存。**改了 JS / CSS 一定要换版本号**,四处一起换:`portal/index.html` 里的 `universe.css?v=`、`config.js?v=`、底部模块脚本里的 `galaxy.js?v=`,以及 `galaxy.js` 里的 `import './planets.js?v='`。
|
||||
- 静态文件可能被缓存。**改了 JS / CSS 一定要换版本号**,几处一起换:`portal/universe.html` 里的 `universe-page.css?v=`、`gate.js?v=`、`config.js?v=`、底部模块脚本里的 `galaxy.js?v=`,以及 `galaxy.js` 里的 `import './planets.js?v='` / `'./layout.js?v='`。
|
||||
2026-10-05 踩过:一个坏掉的 galaxy.js 被缓存住,修好之后打开还是「加载不出来」。
|
||||
- 检查语法要按 ES 模块检查(把文件拷成 `.mjs` 再 `node --check`),按普通脚本检查会漏掉「重复声明」这类错误。
|
||||
|
||||
Reference in New Issue
Block a user