dsh-mpkg-wallpaper 3.13.6 → 3.13.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +3 -3
- package/README.md +3 -3
- package/lib/client.js +13 -8
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -325,7 +325,7 @@ These keys **exist and participate in the logic** but have no widget on the sett
|
|
|
325
325
|
| `aquaTintStrength` | 45 | How much of the wallpaper colour is mixed into panel tints; read at runtime |
|
|
326
326
|
| `glassColor` / `glassAlpha` | empty / 12 | Early WebGL liquid-glass leftovers: backup/restore only, **no widget and no reader** |
|
|
327
327
|
| `webInteraction` | `pointer` | Web-wallpaper interaction mode (`off`/`pointer`/`full`); use `?mpwinteract=…` or write the stored settings |
|
|
328
|
-
| `sceneRendererUrl` | `http://127.0.0.1:
|
|
328
|
+
| `sceneRendererUrl` | `http://127.0.0.1:8902/webloader/` | Scene-renderer address, overridable (default = the one-stop :8902 bench serving `/webloader/` itself; the old default was `:8899`, changed 2026-09-25) |
|
|
329
329
|
| `npVolume` | 100 | The **volume level** in the Now playing card (0..100, applied to the real element); the default profile **never writes element volume**, only your own change does |
|
|
330
330
|
| `glassWindow` | — | **Retired and deleted** (2026-09-19): no widget, no reader; covered by `settingsBlur` + `dialogBlur`/`popoverBlur` |
|
|
331
331
|
|
|
@@ -406,7 +406,7 @@ Start here when something is wrong: one click sends state back to the local host
|
|
|
406
406
|
Two different numbers — do not mix them up:
|
|
407
407
|
|
|
408
408
|
- The **main table holds 158 flags**, in the **renderer repository**, [`we-scene-demo/docs/README-DIAGNOSTICS.md`](../we-scene-demo/docs/README-DIAGNOSTICS.md) (generated by `diag-flag-check.mjs`, cross-checked against `web/diag-flags.json`).
|
|
409
|
-
- The plugin panel only ships the **common / escape-hatch table** (the 10 flags with `common:true`), appended to the renderer URL, e.g. `http://127.0.0.1:
|
|
409
|
+
- The plugin panel only ships the **common / escape-hatch table** (the 10 flags with `common:true`), appended to the renderer URL, e.g. `http://127.0.0.1:8902/webloader/?id=3719111841&audit=3`:
|
|
410
410
|
|
|
411
411
|
| Flag | Purpose | Default |
|
|
412
412
|
|---|---|---|
|
|
@@ -464,7 +464,7 @@ A "WE install" means the Steam edition of Wallpaper Engine (appid **431960**). T
|
|
|
464
464
|
|
|
465
465
|
The plugin offers two paths:
|
|
466
466
|
|
|
467
|
-
1. **External renderer iframe (preferred)**: when the local
|
|
467
|
+
1. **External renderer iframe (preferred)**: when the local renderer (default `http://127.0.0.1:8902/webloader/`, previously `:8899`) is online, the scene is mounted as an iframe (`lib/client.js:3133-3190`). If the renderer is offline or the first frame times out, a **watchdog** falls back to the static frame and says so in a hint bar; a manual "remount renderer" button is provided. The renderer address can be overridden with `sceneRendererUrl`.
|
|
468
468
|
2. **In-container asset extraction (fallback, `lib/pkg-extract.js`, MIT, adopted from [elysia395/dsh-wallpaper-engine](https://github.com/elysia395/dsh-wallpaper-engine))**:
|
|
469
469
|
- **Static frame**: parses the PKG (LZ4) and decodes TEX textures, picking the main texture by "area × format weight × path penalty" (`lib/pkg-extract.js:1422-1491`)
|
|
470
470
|
- **Layer composite**: parses every image layer of `scene.json` and composites them on a canvas using source coordinates/sizes (at most 24 layers, `lib/pkg-extract.js:1734-1829`)
|
package/README.md
CHANGED
|
@@ -326,7 +326,7 @@ node tools/build-bundle.mjs
|
|
|
326
326
|
| `aquaTintStrength` | 45 | 面板取色的壁纸主色混合比例;运行时读取(`lib/client.js:5575`),无控件 |
|
|
327
327
|
| `glassColor` / `glassAlpha` | 空 / 12 | 早期 WebGL 液态玻璃的遗留键:只随备份导出/导入与「恢复默认」走动,**无控件、无读取点**(`lib/client.js:11968`、`:11986`) |
|
|
328
328
|
| `webInteraction` | `pointer` | 网页壁纸交互档位(`off`/`pointer`/`full`):**无面板控件**,用 URL `?mpwinteract=…` 或写存档 |
|
|
329
|
-
| `sceneRendererUrl` | `http://127.0.0.1:
|
|
329
|
+
| `sceneRendererUrl` | `http://127.0.0.1:8902/webloader/` | 场景渲染器地址,可覆盖(默认 = 一站式测试台 :8902 自己直供的 `/webloader/`;旧默认是 `:8899`,2026-09-25 改) |
|
|
330
330
|
| `npVolume` | 100 | Now playing 卡片里的**音量电平**(0..100,落到真实元素);默认档**从不写元素音量**,只有你动过才写 |
|
|
331
331
|
| `glassWindow` | — | **已退役删除**(2026-09-19):无控件、无读取点,功能已被 `settingsBlur` + `dialogBlur`/`popoverBlur` 覆盖;源码与 zh/en 字典 0 残留 |
|
|
332
332
|
|
|
@@ -407,7 +407,7 @@ node tools/build-bundle.mjs
|
|
|
407
407
|
这两个数字口径不同,别混:
|
|
408
408
|
|
|
409
409
|
- **主表共 158 个开关**,在**渲染器仓**的 [`we-scene-demo/docs/README-DIAGNOSTICS.md`](../we-scene-demo/docs/README-DIAGNOSTICS.md)(由 `diag-flag-check.mjs` 生成、与 `web/diag-flags.json` 对拍)。
|
|
410
|
-
- 插件面板里只放**常用/逃生口那一张小表**(10 个,`common:true` 集合),拼在渲染器地址后面用,例如 `http://127.0.0.1:
|
|
410
|
+
- 插件面板里只放**常用/逃生口那一张小表**(10 个,`common:true` 集合),拼在渲染器地址后面用,例如 `http://127.0.0.1:8902/webloader/?id=3719111841&audit=3`:
|
|
411
411
|
|
|
412
412
|
| 开关 | 用途 | 默认 |
|
|
413
413
|
|---|---|---|
|
|
@@ -465,7 +465,7 @@ node tools/build-bundle.mjs
|
|
|
465
465
|
|
|
466
466
|
插件提供两条路径:
|
|
467
467
|
|
|
468
|
-
1. **外部渲染器 iframe
|
|
468
|
+
1. **外部渲染器 iframe(首选)**:本机渲染器(默认 `http://127.0.0.1:8902/webloader/`,旧默认 `:8899`)在线时,场景以 iframe 挂载(`lib/client.js:3133-3190`)。渲染器离线/首帧超时则由**看门狗**回退静态帧并在提示条说明,可手动「重新挂载渲染器」。渲染器地址可用 `sceneRendererUrl` 覆盖。
|
|
469
469
|
2. **容器内素材提取(兜底,`lib/pkg-extract.js`,MIT,采用自 [elysia395/dsh-wallpaper-engine](https://github.com/elysia395/dsh-wallpaper-engine))**:
|
|
470
470
|
- **静态帧**:解析 PKG(LZ4 解压)+ TEX 纹理解码,按"面积 × 格式权重 × 路径惩罚"选主纹理(`lib/pkg-extract.js:1422-1491`)
|
|
471
471
|
- **图层合成**:解析 `scene.json` 的全部 image 图层,按源坐标/尺寸在 canvas 上合成(最多 24 层,`lib/pkg-extract.js:1734-1829`)
|
package/lib/client.js
CHANGED
|
@@ -2772,7 +2772,7 @@ function mpwThumbFail(el, why) {
|
|
|
2772
2772
|
// ①(新) 网页壁纸 iframe(web wallpaper):独立沙箱层,覆盖整屏。
|
|
2773
2773
|
// ①(2026-09-13 注释更正 —— 之前写着"去掉 allow-same-origin"但属性里**并没有去掉**,
|
|
2774
2774
|
// 属于注释与代码不符,会误导安全判断。现状与事实如下:
|
|
2775
|
-
// · iframe 带 `allow-same-origin`,因此它与宿主**同源**(渲染器在 127.0.0.1:
|
|
2775
|
+
// · iframe 带 `allow-same-origin`,因此它与宿主**同源**(渲染器在 127.0.0.1:8902/webloader,
|
|
2776
2776
|
// cookie 按主机不按端口隔离 → 同 site)→ 它对插件宿主 `/api/mpkg-wallpaper/...`
|
|
2777
2777
|
// 的 fetch **会自动带上 DSH 的会话 cookie**(这是"自定义场景/缩略图上报"能工作的前提)。
|
|
2778
2778
|
// · DSH 的会话 cookie 是 `HttpOnly; SameSite=Strict; Path=/`(见 dsh-client-connection
|
|
@@ -5528,7 +5528,7 @@ function mpwThumbFail(el, why) {
|
|
|
5528
5528
|
// 链路:插件宿主 /raw 暴露容器字节(PKGM0018 场景束 / PKGV scene.pkg)
|
|
5529
5529
|
// → 渲染器页面 ?pkgurl=<该 url>(浏览器直连带 cookie,过 DSH 鉴权)
|
|
5530
5530
|
// → 渲染器 parsePkg 直接吃同族容器(RE-25 证实布局相同)→ 实时渲染。
|
|
5531
|
-
// sceneRendererUrl 可在设置里覆盖(默认本机 8899
|
|
5531
|
+
// sceneRendererUrl 可在设置里覆盖(默认本机 8902 的 `/webloader/`;旧默认是 8899,见 ISSUE0924A 第 20 点)。
|
|
5532
5532
|
// ① 渲染器可达性探测(结果缓存;未知时按可用处理,避免首次使用被误拦)
|
|
5533
5533
|
const probeSceneRenderer = () => {
|
|
5534
5534
|
try {
|
|
@@ -5558,7 +5558,12 @@ function mpwThumbFail(el, why) {
|
|
|
5558
5558
|
|
|
5559
5559
|
const mpwSceneRendererBase = () => {
|
|
5560
5560
|
try { const s = readSection(); if (s && s.sceneRendererUrl) return String(s.sceneRendererUrl) } catch {}
|
|
5561
|
-
|
|
5561
|
+
/* ①(2026-09-25 ISSUE0924A 第 20 点) 默认渲染器地址从 `http://127.0.0.1:8899/` 换成
|
|
5562
|
+
`http://127.0.0.1:8902/webloader/`:8902 是**一站式**测试台,它自己就直供渲染器面
|
|
5563
|
+
(`/webloader/`、`/bundle.js`、`/core/**`、`/pkg`、`/project`、`/diag-flags.json`,带 `X-Bench-Served: local`),
|
|
5564
|
+
实测把 8899 进程**停掉**这些路由仍全部 200 ⇒ 不必再为了壁纸渲染单独启一个 8899。
|
|
5565
|
+
尾斜杠**必须留**:下面的 `fetch(base + "diag-flags.json")` 是按字符串拼的。 */
|
|
5566
|
+
return "http://127.0.0.1:8902/webloader/";
|
|
5562
5567
|
};
|
|
5563
5568
|
const applySceneViaRenderer = (meta) => {
|
|
5564
5569
|
// meta: { rawFile, folder, title, key }
|
|
@@ -7110,7 +7115,7 @@ function mpwThumbFail(el, why) {
|
|
|
7110
7115
|
try {
|
|
7111
7116
|
const d = ev && ev.data;
|
|
7112
7117
|
if (!d || d.type !== "mpw-ln-mode") return;
|
|
7113
|
-
//
|
|
7118
|
+
// 只接受渲染器来源(**配置的那个 renderer base** 或 strict 下的不透明源 "null")——contentWindow 精确匹配优先,
|
|
7114
7119
|
// 避免任意页面控制按键;①(B6) 改走统一校验(旧规则会拒掉 Origin:"null")。
|
|
7115
7120
|
if (!mpwIsSceneFrameMsg(ev)) return;
|
|
7116
7121
|
lnMode = !!d.on;
|
|
@@ -20722,7 +20727,7 @@ body[data-mpw-modal] [role="dialog"] {
|
|
|
20722
20727
|
"scnRender.extUrl": "渲染器扩展钩子地址(sceneExtUrl,可选)",
|
|
20723
20728
|
"scnRender.report": "场景渲染上报(排障)",
|
|
20724
20729
|
"scnRender.report.desc": "开启后壁纸每 10 秒把渲染器现场(截图 + 逐层绘制台账 + 纹理统计)写到渲染器的 reports/ 目录,用于定位“坐标/可见性”问题。仅排障时开,默认关(有磁盘写入)",
|
|
20725
|
-
"scnRender.extUrl.ph": "http://127.0.0.1:
|
|
20730
|
+
"scnRender.extUrl.ph": "http://127.0.0.1:8902/webloader/",
|
|
20726
20731
|
"scnRender.extUrl.hint": "留空=不启用。填写后按 extbase 拼进场景渲染 iframe(见渲染器仓文档 EXTENSION-HOOKS.md);点「测试」验证索引可达并显示钩子数量。",
|
|
20727
20732
|
"scnRender.extUrl.save": "保存",
|
|
20728
20733
|
"scnRender.extUrl.saved": "扩展钩子地址已保存,下次应用场景壁纸生效",
|
|
@@ -20754,7 +20759,7 @@ body[data-mpw-modal] [role="dialog"] {
|
|
|
20754
20759
|
"scnRender.bigPkg": "该场景包体积较大,首帧可能较慢",
|
|
20755
20760
|
// ①(MERGED-3 1.3/2.3) 诊断开关速查区(集合 == diag-flags.json common,panel-smoke 断言)
|
|
20756
20761
|
"diag.sec": "诊断开关速查(渲染器)",
|
|
20757
|
-
"diag.sec.desc": "拼到渲染器地址后面用,如 http://127.0.0.1:
|
|
20762
|
+
"diag.sec.desc": "拼到渲染器地址后面用,如 http://127.0.0.1:8902/webloader/?id=3719111841&audit=3;常用开关如下,点「复制」拿 URL 片段。",
|
|
20758
20763
|
"diag.expand": "展开开关",
|
|
20759
20764
|
"diag.fold": "收起开关",
|
|
20760
20765
|
"diag.copy": "复制",
|
|
@@ -21531,7 +21536,7 @@ body[data-mpw-modal] [role="dialog"] {
|
|
|
21531
21536
|
"scnRender.extUrl": "Renderer extension hooks URL (sceneExtUrl, optional)",
|
|
21532
21537
|
"scnRender.report": "Scene render reporting (debug)",
|
|
21533
21538
|
"scnRender.report.desc": "When on, the wallpaper sends the renderer's live state (screenshot + per-layer draw ledger + texture stats) to the renderer's reports/ folder every 10s, to diagnose position/visibility bugs. Debug only; off by default (writes to disk)",
|
|
21534
|
-
"scnRender.extUrl.ph": "http://127.0.0.1:
|
|
21539
|
+
"scnRender.extUrl.ph": "http://127.0.0.1:8902/webloader/",
|
|
21535
21540
|
"scnRender.extUrl.hint": "Empty = disabled. When set, it is passed to the scene iframe as extbase (see the renderer repo docs EXTENSION-HOOKS.md); press Test to verify the index and show the hook count.",
|
|
21536
21541
|
"scnRender.extUrl.save": "Save",
|
|
21537
21542
|
"scnRender.extUrl.saved": "Extension hooks URL saved; takes effect the next time a scene wallpaper is applied",
|
|
@@ -21563,7 +21568,7 @@ body[data-mpw-modal] [role="dialog"] {
|
|
|
21563
21568
|
"scnRender.bigPkg": "This scene package is large; the first frame may be slow",
|
|
21564
21569
|
// ①(MERGED-3 1.3/2.3) Diagnostic flags quick reference (set == diag-flags.json common)
|
|
21565
21570
|
"diag.sec": "Diagnostic flags (renderer)",
|
|
21566
|
-
"diag.sec.desc": "Append to the renderer URL, e.g. http://127.0.0.1:
|
|
21571
|
+
"diag.sec.desc": "Append to the renderer URL, e.g. http://127.0.0.1:8902/webloader/?id=3719111841&audit=3. Common flags below; press Copy to grab the URL fragment.",
|
|
21567
21572
|
"diag.expand": "Show flags",
|
|
21568
21573
|
"diag.fold": "Hide flags",
|
|
21569
21574
|
"diag.copy": "Copy",
|
package/package.json
CHANGED