This website requires JavaScript.
0
Issues
Pull Requests
Milestones
Explore
0
Create…
New Repository
New Migration
New Organization
public
Signed in as
public
Profile
Starred
Subscriptions
Settings
Help
Sign Out
public
/
jinzuanwork
Unwatch
1
Star
0
Fork
0
Code
Issues
Pull Requests
Actions
Packages
Projects
Releases
Wiki
Activity
Settings
Files
jinzuanwork
/
portal
/
assets
/
universe
/
or
Cancel
Edit File
Preview
Preview Changes
Spaces
Tabs
2
4
8
Wrap
No wrap
/* 金钻宇宙 · 开场「星门」(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'); var e = window.JZP ? window.JZP.esc : function (x) { return String(x).replace(/[&<>"']/g, ''); }; return '<i class="' + (u.empty ? 'e' : 'l') + '" style="--i:' + i + (c ? ';--c:' + e(c) : '') + '" title="' + e(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; } }; })();
Commit Changes
Add a Signed-off-by trailer by the committer at the end of the commit log message.
Commit directly to the
main
branch.
Create a
new branch
for this commit and start a pull request.
Commit Changes
Cancel