diff --git a/README.md b/README.md index ee16384..9581695 100644 --- a/README.md +++ b/README.md @@ -89,10 +89,8 @@ npm run dev # http://127.0.0.1:5173/act | 页面 | 用途 | | --- | --- | -| `/acts.html` | **主页面**:全屏画布 + 三级选择器(章节 / 场景 / 细分场景)+ HUD | -| `/index.html` | MPQ 资源检查器(头、存储标志、压缩掩码分布、成员列表、精灵预览) | -| `/walk.html?sample=<你的.mpq>` | 可行走演示(D1 试玩版 `spawn.mpq` 已验证) | -| `/net.html?data=samples/fixtures&ws=ws://127.0.0.1:8787&peers=3&peer=0` | 2–4 人联机(先 `npm run net-server`) | +| `/acts.html`(或访问根路径 `/`) | **主页面**:全屏画布 + 三级选择器(章节 / 场景 / 细分场景)+ HUD | +| `/arena.html` | **战斗测试竞技场**:攻防数值数学模型、技能加成、伤害计算器(1.13c 原版公式验证) | 主页面查询参数: diff --git a/ROADMAP.md b/ROADMAP.md index 9059fb7..c3521ec 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -607,7 +607,7 @@ src/ render/ atlas renderer(WebGL2 单批次四边形 + 顶点色 tint) sim/ loop(定点 25 Hz,含追帧上限)input scene/ act-scene.ts(主场景:真地图 + 全部玩法)net-scene.ts(联机轨) -index.html walk.html net.html acts.html 四个入口 +acts.html arena.html 两个前台入口 scripts/ 夹具生成、验证脚本、打包/发布、中继服务器、浏览器验证工具 tools/go-oracle/ 独立 Go 参考解码器(差分验证用) samples/ 夹具与被 .gitignore 忽略的归档 @@ -622,10 +622,8 @@ samples/ 夹具与被 .gitignore 忽略的归档 | 页面 | 地址 | 内容 | | --- | --- | --- | -| 资源检查器 | `/` | MPQ 头/存储标志/压缩掩码分布、成员列表、精灵逐帧预览 | -| 可行走演示 | `/walk.html?sample=samples/spawn.mpq` | 真实暗黑 1 归档:CEL/CL2、调色板、8 方向走动、碰撞 | -| 联机合作 | `/net.html?...&peers=3&peer=0` | 2–4 人同一世界(保留,不在交付路径) | -| **主场景** | `/acts.html?act=1`;线上 `https://www.laiseek.xyz/diablo2/?act=1` | 等距真地图 + 真·女法师(DCC+COF,16 层/8 方向)+ 全部玩法(战斗、掉落、背包、技能、任务、NPC、存读档 K/L)。三级选择器:章节 → 场景 → 细分场景 | +| **主场景** | `/acts.html`(根路径 `/` 自动跳转);线上 `https://www.laiseek.xyz/diablo2/?act=1` | 等距真地图 + 真·女法师(DCC+COF,16 层/8 方向)+ 全部玩法(战斗、掉落、背包、技能、任务、NPC、存读档 K/L)。三级选择器:章节 → 场景 → 细分场景 | +| **战斗竞技场** | `/arena.html` | 真实战斗数学与攻防测试竞技场(1.13c 原版公式验证、技能数值测试与面板) | 操作:WASD/方向键移动,空格或 J 攻击,E/F 拾取,T 说话,1–4 选技能,K 存档,L 读档。 `acts.html` 的输入是**屏幕方向**(菱形格子相对屏幕转了 45°,按「上」沿格子对角线向上走)。 diff --git a/arena.html b/arena.html index 7bec03e..dd81213 100644 --- a/arena.html +++ b/arena.html @@ -284,7 +284,6 @@
🎮 返回战役漫步 (acts.html) - 📁 资源检视器
diff --git a/index.html b/index.html deleted file mode 100644 index 3c49b95..0000000 --- a/index.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - d2web · MPQ 资源管线 - - - -
-

d2web

- MPQ 资源管线 · 只读取你自己的归档,仓库不含任何游戏素材 -
-
-
-
把 .mpq 拖到这里,或点击选择文件
- -
- - -
-
选择一个文件查看解码结果
-
- - - diff --git a/net.html b/net.html deleted file mode 100644 index df5157f..0000000 --- a/net.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - d2web · 联机合作(M5) - - - -
-

d2web · 双人联机合作

- 资源检查器 - 真实战役场景 - 未联机 -
-

正在加载地图…

-
- -

- 移动 WASD / 方向键,空格或 J 攻击。每个浏览器页开一个(2–4 人都可以,人数用 - &peers= 指定,&peer= 是本页编号): - ?data=samples/fixtures&ws=ws://127.0.0.1:8787&peers=3&peer=0, - 另外两页把 peer 换成 1 和 2。世界由每台机器各自模拟,网络上只传按键; - 同一 tick 的哈希不一致时页面会立刻报出分歧。 -

- - - diff --git a/vite.config.ts b/vite.config.ts index dfb3ecc..d7d5a8b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -2,9 +2,8 @@ import { defineConfig } from 'vite' /** * The engine is plain TypeScript with no runtime dependencies: Vite only serves - * and bundles it. Four entries: the asset inspector (`index.html`), the walkable - * scene (`walk.html`), the two-player co-op scene (`net.html`) and the real - * campaign scene (`acts.html`). `samples/` is served in dev so all of them can + * and bundles it. Two entries: the real campaign scene (`acts.html`) and the + * combat math arena (`arena.html`). `samples/` is served in dev so all of them can * be smoke-tested over HTTP (`?sample=samples/spawn.mpq`, * `?data=samples/fixtures`). */ @@ -14,14 +13,34 @@ export default defineConfig({ port: 5173, strictPort: true, }, + plugins: [ + { + name: 'root-redirect', + configureServer(server) { + server.middlewares.use((req, res, next) => { + if (req.url === '/' || req.url === '/index.html') { + res.writeHead(302, { Location: '/acts.html' }) + res.end() + return + } + next() + }) + }, + generateBundle() { + this.emitFile({ + type: 'asset', + fileName: 'index.html', + source: + 'd2web跳转至暗黑破坏神 2 游戏主界面\n', + }) + }, + }, + ], build: { target: 'es2022', sourcemap: true, rollupOptions: { input: { - index: new URL('./index.html', import.meta.url).pathname, - walk: new URL('./walk.html', import.meta.url).pathname, - net: new URL('./net.html', import.meta.url).pathname, acts: new URL('./acts.html', import.meta.url).pathname, arena: new URL('./arena.html', import.meta.url).pathname, }, diff --git a/walk.html b/walk.html deleted file mode 100644 index f9f044a..0000000 --- a/walk.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - d2web · 可行走场景(M1) - - - -
-

d2web · M1

- 资源检查器 - — -
-
拖入 .mpq(或使用 ?sample=)后即可用 WASD / 方向键走动
- -

等待归档…

- - - -