dsh-mpkg-wallpaper 3.1.6 → 3.3.0
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 +62 -33
- package/README.md +62 -33
- package/lib/client.js +1660 -202
- package/lib/index.js +705 -6
- package/package.json +2 -2
package/README.en.md
CHANGED
|
@@ -4,19 +4,27 @@
|
|
|
4
4
|
|
|
5
5
|
[中文](README.md) | [English](README.en.md)
|
|
6
6
|
|
|
7
|
-
A plugin for the [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web UI (dsh web) that adds background wallpapers: **Wallpaper Engine `.mpkg` parsing, Steam Workshop raw folders, video/web/image wallpapers, a full-screen frosted blur suite, theme-color & glass appearance, a local wallpaper library, timed rotation and one-click updates**. Nearly every visual detail is adjustable.
|
|
7
|
+
A plugin for the [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web UI (dsh web) that adds background wallpapers: **Wallpaper Engine `.mpkg` parsing, Steam Workshop raw folders, video/web/image wallpapers, time-of-day switching, a full-screen frosted blur suite, theme-color & glass appearance, a local wallpaper library, timed rotation and one-click updates**. Nearly every visual detail is adjustable.
|
|
8
8
|
|
|
9
|
-
> **
|
|
9
|
+
> **One-liner**: video/image/web wallpapers play directly; **time-variation wallpapers support multi-slot auto-switching + manual slot lock**; **some web wallpapers with built-in options (e.g. Live2D portraits — resolution/language/volume) are wired into the plugin settings page and can be edited in the collapsible "Adjustable options" area**; Scene wallpapers get static-frame extraction + layer compositing as partial solutions.
|
|
10
10
|
|
|
11
11
|
## Core Features
|
|
12
12
|
|
|
13
13
|
**📦 Wallpaper sources (all supported)**
|
|
14
|
-
- **Wallpaper Engine `.mpkg`**: parsed directly in the browser (nothing uploaded to third parties); video wallpapers play their embedded mp4 / video textures; scene wallpapers extract content from the container; **time-of-day switching** picks the
|
|
14
|
+
- **Wallpaper Engine `.mpkg`**: parsed directly in the browser (nothing uploaded to third parties); video wallpapers play their embedded mp4 / video textures; scene wallpapers extract content from the container; **time-of-day switching** picks the slot matching the current system time
|
|
15
15
|
- **Steam Workshop raw folders**: auto-discovers the WE install (registry + libraryfolders.vdf, non-default drives too) and lists `video / web / scene` types; you can also point the custom folder directly at the **workshop root** (`steamapps/workshop/content/431960`) — every subfolder is auto-detected as a wallpaper
|
|
16
16
|
- **Video wallpapers**: `.mp4` plays directly (custom folder / Steam library / local file)
|
|
17
17
|
- **Web wallpapers**: HTML wallpapers load in a sandboxed iframe (experimental, with **risk preflight**: auto-tagged "⚠heavy animation" / "🌐external", see [Web wallpapers](#web-wallpapers-experimental))
|
|
18
18
|
- **Images / GIF / URLs**: local images (png/jpg/webp/gif) or image URLs (incl. data:image) as backgrounds
|
|
19
19
|
|
|
20
|
+
**⏰ Time-variation wallpapers**
|
|
21
|
+
- Supports WE **time-variation** wallpapers (projects with `morningtime / daytime / dusktime / nighttime / timevarying` properties and multiple timestamped video textures):
|
|
22
|
+
- **Auto-switch**: checks every 60s and swaps to the slot matching the current system time
|
|
23
|
+
- **Manual lock / slot override**: the settings page offers "Auto + morning / day / dusk / night" buttons — click a slot to pin that asset, click "Auto" to resume time-based switching
|
|
24
|
+
- **Lazy loading**: only the current slot's video texture is extracted (tens of MB peak); other slots are read on demand at switch time — **avoids importing all slots at once and crashing mobile browsers (OOM)**
|
|
25
|
+
- **No cross-wallpaper bleed**: switching between two time-variation wallpapers clears the previous wallpaper's slot cache, so clicking morning/day/dusk never shows the *other* wallpaper's footage
|
|
26
|
+
- Adapted via: video mpkg; scene.pkg parsed the "mpkg way" (scene.pkg is the same PKG container as mpkg — slots with embedded video textures auto-switch)
|
|
27
|
+
|
|
20
28
|
**🌊 Full-screen frosted blur suite**
|
|
21
29
|
- **Unified blur**: one slider controls the whole screen's wallpaper blur; sidebar fog thickness, chat-area follow and new-chat follow are independently adjustable
|
|
22
30
|
- **UI blur (each with own toggle + amount)**: dialogs (generic center windows + chat input), settings panel, download/confirm popups, popovers (menus/dropdowns/tooltips), mask (full-screen dim), sidebar frost (auto-lifted while a dialog is open)
|
|
@@ -25,10 +33,13 @@ A plugin for the [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harn
|
|
|
25
33
|
**🎨 Theme color & glass appearance (Aqua experiment, off by default)**
|
|
26
34
|
- **Theme color (accent)**: color picker + 6 presets driving brand buttons/sliders/selected items/links/send button (`--dsw-alias-brand-*` tokens)
|
|
27
35
|
- **Unified fog** (full-screen mask with one fog color, strength slider), **panel wallpaper-matching color** (auto sample + strength slider + custom picker), **adaptive text + blue cleanup** (brand unified, custom picker), **dark-background text readability**, **todo-list frost**
|
|
28
|
-
- Appearance tab also has:
|
|
36
|
+
- Appearance tab also has: floating cards, clock, etc.
|
|
29
37
|
|
|
30
38
|
**🎬 Lens & picture**
|
|
31
|
-
- Lens zoom (10–2000%) & pan, brightness (50–150%), light sharpen,
|
|
39
|
+
- Lens zoom (10–2000%) & pan, brightness (50–150%), light sharpen, Deep diving background box
|
|
40
|
+
|
|
41
|
+
**🎛️ Wallpaper settings (tab)**
|
|
42
|
+
- Everything directly tied to the **current wallpaper** lives here: mute (web wallpapers), mirror flip (horizontal/vertical), video playback speed (0.5–2x), adjustable options (mpkg read-only / web wallpapers editable), **decode fps cap** (24/30/48/60, ffmpeg frame-sampling), **resolution cap** (720p/1080p/2K, ffmpeg downscale to cut load), ffmpeg status with download/uninstall
|
|
32
43
|
|
|
33
44
|
**🚀 Hybrid large-file mode (default on)**
|
|
34
45
|
- mpkg streams to the DSH host → disk storage → HTTP Range streaming, **>600MB files supported**, low memory usage
|
|
@@ -44,25 +55,45 @@ A plugin for the [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harn
|
|
|
44
55
|
**🔄 Updates**
|
|
45
56
|
- "Check update" compares **versions** (semver) — un-pushed local changes don't false-positive; "Apply update" pulls the latest code from GitHub, restart to take effect
|
|
46
57
|
|
|
58
|
+
**💾 Backup & restore / settings persistence**
|
|
59
|
+
- The "Other" tab provides **backup & restore**: export appearance settings (Appearance / Unified blur / UI blur / Aqua / Other) to a **shareable JSON file**, import to restore — not the current wallpaper or scanned dirs
|
|
60
|
+
- **Settings persist to a host file**: besides localStorage, settings are written to `~/.dsh-mpkg-wallpaper/settings.json` — **survives port changes / browser-data clears** (following elysia395 v0.4.0)
|
|
61
|
+
|
|
47
62
|
## Supported Types & Status
|
|
48
63
|
|
|
49
64
|
| Type | Web behavior | Notes |
|
|
50
65
|
|---|---|---|
|
|
51
66
|
| **mpkg (video)** | ✅ Full | embedded mp4 / video textures play directly |
|
|
52
|
-
| **mpkg (scene)** | 🟡 Partial | static-frame / layer composite / preview animation (below) |
|
|
67
|
+
| **mpkg (scene)** | 🟡 Partial | static-frame / layer composite / preview animation (below); slots with video textures auto-switch |
|
|
68
|
+
| **Time-variation wallpaper** | ✅ Full | multi-slot auto-switch + manual lock, lazy loading to avoid OOM |
|
|
53
69
|
| **Video (mp4/webm)** | ✅ Full | plays directly |
|
|
54
|
-
| **Web (HTML)** | 🟡 Experimental | sandboxed iframe;
|
|
70
|
+
| **Web (HTML)** | 🟡 Experimental | sandboxed iframe; **web wallpapers with settings are wired into the plugin (below)**; **interactive-feature wallpapers not adapted yet** |
|
|
55
71
|
| **Scene raw folder (scene.pkg)** | 🟡 Partial | same as mpkg scene |
|
|
56
72
|
| **Application (.exe)** | ❌ Excluded | safety: never read/executed |
|
|
57
73
|
|
|
74
|
+
## Adjustable options & web-wallpaper settings wiring
|
|
75
|
+
|
|
76
|
+
- **mpkg wallpapers**: the project's own **adjustable options** are shown **read-only** in the collapsible "Adjustable options" area (the browser shows pre-rendered assets; apply changes in the WE app).
|
|
77
|
+
- **Web wallpapers (some wired in — Live2D portraits)**: some web wallpapers (Live2D portraits, usually with a `loadJson.json` `SettingModel`) have built-in options — now **wired into the plugin settings page**, editable in the **same collapsible "Adjustable options" area**:
|
|
78
|
+
- **Resolution 2k / 4k / 8k** (reloads the wallpaper)
|
|
79
|
+
- **Language** (per wallpaper: 中文 / 日本語 / English / Tiếng Việt / Русский …)
|
|
80
|
+
- **BGM & voice volume** (live, no reload)
|
|
81
|
+
- **Show touch-area boxes / show text box** toggles
|
|
82
|
+
- Changes are written to the wallpaper iframe's same-origin localStorage (key = skeleton name), then the wallpaper reloads
|
|
83
|
+
- **Hide the wallpaper's own settings panel**: these web wallpapers show a "Settings" button + panel in the top-right of the wallpaper surface, which can't be interacted with — the plugin **auto-hides it** on iframe load, and you operate the options via the plugin page.
|
|
84
|
+
- **Wallpapers with interactive features are not adapted yet**: web wallpapers relying on external SDKs / special interaction logic (e.g. some miHoYo event pages, or wallpapers that need login or click interaction) haven't had their built-in options wired in yet — they display fine, but **the in-plugin adjustable options are unavailable for them**.
|
|
85
|
+
|
|
86
|
+
> These editable web-wallpaper controls only appear after the plugin detects the wallpaper's `loadJson.json`; plain image/video web wallpapers or those without settings show nothing extra.
|
|
87
|
+
|
|
58
88
|
## Scene Wallpaper Adaptation
|
|
59
89
|
|
|
60
90
|
**Bottom line: WE scene wallpapers cannot be fully reproduced on the web — this is an engine-level limit, not plugin laziness.** Scene wallpapers are rendered by a proprietary engine: Live2D-style **puppet rigs (binary .mdl)**, **shader effects** (water waves / particles) and **scripts** (music-player UIs, etc.). There is no official renderer for browsers, and the formats are undocumented (RePKG only reverse-engineered PKG/TEX; MDL rigs have no public spec; the open-source [we-layerd](https://github.com/Aromatic05/we-layerd) bundles the official renderer but is **Linux Wayland only**).
|
|
61
91
|
|
|
62
|
-
The plugin offers
|
|
92
|
+
The plugin offers these partial solutions (chosen automatically by scene content):
|
|
63
93
|
|
|
64
94
|
1. **Static-frame extraction**: parses `scene.pkg` (PKG container + LZ4 + TEX decode) and picks the main texture → **high-resolution static image** (photography/illustration scenes near-original quality; tested up to 7680×4320)
|
|
65
95
|
2. **Layer compositing**: parses all `image` layers in `scene.json` (background + subject + layered character parts) and draws them **accurately composited** on a canvas using the source coordinates/sizes; time-variation scenes pick the frame for the current hour
|
|
96
|
+
3. **Time-variation "mpkg way"**: `scene.pkg` is the same PKG container as mpkg — slots with embedded video textures can be parsed the mpkg way → multi-slot auto-switching (as above)
|
|
66
97
|
|
|
67
98
|
**Not covered**: MDL puppet characters (the body is assembled from rig parts; the flat textures are nearly empty), shader wave/particle effects, scripted interactions. These fall back to the **official preview animation** (preview.gif).
|
|
68
99
|
|
|
@@ -70,21 +101,22 @@ The plugin offers two partial solutions (chosen automatically by scene content):
|
|
|
70
101
|
|
|
71
102
|
## Web Wallpapers (Experimental)
|
|
72
103
|
|
|
73
|
-
- HTML wallpapers load full-screen in a **sandboxed iframe** (`allow-scripts` isolation; does not auto-reload after refresh — refresh the page to recover if frozen)
|
|
104
|
+
- HTML wallpapers load full-screen in a **sandboxed iframe** (`allow-scripts` isolation; **mute toggle, default on**; does not auto-reload after refresh — refresh the page to recover if frozen)
|
|
74
105
|
- **Risk preflight**: auto-classified during scan; badges shown in the list and confirm dialog:
|
|
75
106
|
- **⚠heavy animation**: Spine/L2D skeletal wallpapers — may freeze on low-end devices
|
|
76
107
|
- **🌐external**: depends on external SDK/CDN (e.g. miHoYo event pages) — may fail to load
|
|
77
|
-
- Tested: webm-video-based web wallpapers (light) work; Spine skeletal ones depend on device performance
|
|
108
|
+
- Tested: webm-video-based web wallpapers (light) work; Spine skeletal ones depend on device performance; **Live2D portraits with a `loadJson.json` are wired into the plugin options** (above)
|
|
78
109
|
|
|
79
110
|
## Settings Tabs
|
|
80
111
|
|
|
81
|
-
- **Source**: master switch, hybrid, mpkg file, image/video files, custom folder (can point at the workshop root), local library (Steam scan), switching/rotation
|
|
82
|
-
- **
|
|
112
|
+
- **Source**: master switch, hybrid, mpkg file, image/video files, custom folder (can point at the workshop root), local library (Steam scan), switching/rotation, **time-variation slot lock**
|
|
113
|
+
- **Wallpaper**: mute, mirror flip (horizontal/vertical), video playback speed, adjustable options (mpkg read-only / web wallpapers editable), decode fps cap, resolution cap, ffmpeg status
|
|
114
|
+
- **Appearance**: theme color, floating, frosted blur, lens zoom/position, brightness
|
|
83
115
|
- **Unified blur**: full-screen blur + sidebar/title-bar fog, chat follow, new-chat follow
|
|
84
116
|
- **UI blur**: dialog/settings/popup/popover/mask/sidebar frost each independent
|
|
85
117
|
- **Wallpaper reveal**: sidebar/title-bar visibility, title-bar frost amount, sharpen
|
|
86
118
|
- **Aqua**: unified fog / panel tint / adaptive text experiment toggles
|
|
87
|
-
- **Other**: clock, update check/apply,
|
|
119
|
+
- **Other**: clock, update check/apply, **backup & restore**, restore all defaults
|
|
88
120
|
|
|
89
121
|
## Installation
|
|
90
122
|
|
|
@@ -121,31 +153,28 @@ Uninstall: `dsh plugin --profile web remove dsh-mpkg-wallpaper`.
|
|
|
121
153
|
|
|
122
154
|
## Limitations
|
|
123
155
|
|
|
124
|
-
- **Scene wallpapers cannot be fully dynamic on the web** (see [Scene wallpaper adaptation](#scene-wallpaper-adaptation)); adjustable options are read-only (apply changes in the WE app)
|
|
125
|
-
- **Web wallpapers are experimental**: heavy animation / external dependencies may freeze or fail (preflight tags + refresh recovery)
|
|
156
|
+
- **Scene wallpapers cannot be fully dynamic on the web** (see [Scene wallpaper adaptation](#scene-wallpaper-adaptation)); mpkg adjustable options are read-only (apply changes in the WE app)
|
|
157
|
+
- **Web wallpapers are experimental**: heavy animation / external dependencies may freeze or fail (preflight tags + refresh recovery); **web wallpapers with built-in options are partly wired in — wallpapers with interactive features are not adapted yet**
|
|
126
158
|
- **Huge assets** (pure-browser mode): standalone video >600MB, video textures >250MB, images >200MB unsupported; **hybrid mode** has no such limit
|
|
127
159
|
- Scene static-frame / layer-composite **first extraction takes a few seconds** (longer for 8K textures); afterwards served from cache
|
|
128
160
|
|
|
129
|
-
## Screenshots
|
|
130
|
-
|
|
131
|
-

|
|
132
|
-
|
|
133
|
-
*The dynamic wallpaper fills the whole UI. Sidebar collapsed, chat box centered with frosted blur; the sidebar is fully transparent so the wallpaper shows through cleanly.*
|
|
161
|
+
<!-- ## Screenshots
|
|
134
162
|
|
|
135
|
-
 -->
|
|
136
164
|
|
|
137
|
-
*
|
|
165
|
+
<!-- *The dynamic wallpaper fills the whole UI. Sidebar collapsed, chat box centered with frosted blur; the sidebar is fully transparent so the wallpaper shows through cleanly.* -->
|
|
138
166
|
|
|
139
|
-
 -->
|
|
140
168
|
|
|
141
|
-
*
|
|
169
|
+
<!-- *After adjusting panel opacity and unified blur: most UI areas are opacity-adjustable, the sidebar is semi-transparent with the wallpaper faintly visible behind.* -->
|
|
142
170
|
|
|
143
|
-
|
|
171
|
+
<!--  -->
|
|
144
172
|
|
|
145
|
-
|
|
173
|
+
<!-- *The wallpaper settings page. Beyond the screenshot, nearly everything is adjustable: unified blur, UI blur (dialogs/panels/popups/popovers/mask/sidebar frost), lens zoom & pan, wallpaper flip, theme color, sidebar/title-bar visibility, sharpen, and scene layer compositing with time-frame switching.* -->
|
|
146
174
|
|
|
147
|
-
|
|
175
|
+
<!-- Wallpapers in the screenshots are by Bilibili UP【-夜莺Night】: [author page](https://b23.tv/86CyaFw) -->
|
|
148
176
|
|
|
177
|
+
-->
|
|
149
178
|
## Bug Reports
|
|
150
179
|
|
|
151
180
|
Please include:
|
|
@@ -155,11 +184,11 @@ Please include:
|
|
|
155
184
|
|
|
156
185
|
## Security
|
|
157
186
|
|
|
158
|
-
- **No outbound network requests**: the plugin never contacts external networks; the only network activity is user-entered image URLs and HTTP to the **local DSH host** (127.0.0.1)
|
|
187
|
+
- **No outbound network requests**: the plugin never contacts external networks; the only network activity is user-entered image URLs, resources loaded by web wallpapers themselves, and HTTP to the **local DSH host** (127.0.0.1)
|
|
159
188
|
- **No secrets**: no paths, keys, tokens or personal info in the source
|
|
160
189
|
- **Open-source deps only**: DSH's own react + official slots/locale APIs; the scene.pkg extractor is adopted from [elysia395/dsh-wallpaper-engine](https://github.com/elysia395/dsh-wallpaper-engine) (MIT, credited in the file header)
|
|
161
190
|
- References: [dsh-bg-image](https://github.com/lyh9712/dsh-bg-image) (MIT, template), [unmpkg](https://github.com/aqnya/unmpkg) (GPL-3.0, mpkg format reference), [repkg](https://github.com/notscuffed/repkg) (GPL, .tex format research)
|
|
162
|
-
- Data boundary: all parsing happens locally; localStorage only stores the background and settings
|
|
191
|
+
- Data boundary: all parsing happens locally; localStorage only stores the background and settings; settings are additionally stored at `~/.dsh-mpkg-wallpaper/settings.json`
|
|
163
192
|
|
|
164
193
|
## File Structure
|
|
165
194
|
|
|
@@ -168,8 +197,8 @@ dsh-mpkg-wallpaper/
|
|
|
168
197
|
├── package.json # dsh.bundle + dsh.client declarations
|
|
169
198
|
├── cordis.patch.yml # plugin install declaration
|
|
170
199
|
├── lib/
|
|
171
|
-
│ ├── index.js # host: upload/streaming + Steam discovery + custom folders + scene routes
|
|
172
|
-
│ ├── client.js # browser: mpkg parsing + settings page + bg DOM + blur suite + library
|
|
200
|
+
│ ├── index.js # host: upload/streaming + Steam discovery + custom folders + scene routes + settings persistence
|
|
201
|
+
│ ├── client.js # browser: mpkg parsing + settings page + bg DOM + blur suite + library + time-variation/web options
|
|
173
202
|
│ └── pkg-extract.js# scene.pkg static-frame/layer extraction (PKG+LZ4+TEX, MIT, from elysia395)
|
|
174
203
|
├── tools/ # mpkg/tex/mdl reverse-engineering tools (for developers)
|
|
175
204
|
├── README.md # Chinese
|
|
@@ -179,11 +208,11 @@ dsh-mpkg-wallpaper/
|
|
|
179
208
|
## Acknowledgements
|
|
180
209
|
|
|
181
210
|
- [Bil812](https://github.com/Bil812) — proposed wallpaper tint, adaptive text and unified full-screen mask in [PR #2](https://github.com/XHR666/dsh-mpkg-wallpaper/pull/2) and maintains a fork; those ideas were absorbed as the "Aqua" experiment mode (toggles, off by default)
|
|
182
|
-
- [elysia395/dsh-wallpaper-engine](https://github.com/elysia395/dsh-wallpaper-engine) — the scene.pkg static-frame extractor (MIT); `lib/pkg-extract.js` is adopted from this project
|
|
211
|
+
- [elysia395/dsh-wallpaper-engine](https://github.com/elysia395/dsh-wallpaper-engine) — the scene.pkg static-frame extractor (MIT); `lib/pkg-extract.js` is adopted from this project; its "settings persist to host file" and "Edge canvas-compat rendering" ideas are also borrowed
|
|
183
212
|
- [awesome-dsh-plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin) community — listing & promotion
|
|
184
213
|
|
|
185
214
|
## Rendering Feasibility Research
|
|
186
215
|
|
|
187
216
|
- Full scenes (incl. Live2D puppets) can only be rendered by the proprietary engine: the WE app's native library (embedded Chromium + proprietary puppet renderer); the open-source [we-layerd](https://github.com/Aromatic05/we-layerd) (Rust) bundles the official renderer but is **Linux Wayland only**
|
|
188
217
|
- There is no mature WE scene renderer for browsers (pixeltris/wallpaper-engine-web is gone) — **independent of OS, no browser can render Live2D scenes directly**; the official renderer .so is closed-source, so it cannot be compiled to WASM
|
|
189
|
-
- This plugin's path: **static-frame extraction + layer compositing** (see [Scene wallpaper adaptation](#scene-wallpaper-adaptation)); for full dynamics use "render externally to video → video wallpaper"
|
|
218
|
+
- This plugin's path: **static-frame extraction + layer compositing + (time-variation) mpkg-way slot switching** (see [Scene wallpaper adaptation](#scene-wallpaper-adaptation)); for full dynamics use "render externally to video → video wallpaper"
|
package/README.md
CHANGED
|
@@ -4,19 +4,27 @@
|
|
|
4
4
|
|
|
5
5
|
[中文](README.md) | [English](README.en.md)
|
|
6
6
|
|
|
7
|
-
给 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web 界面(dsh web)添加背景壁纸的插件:**Wallpaper Engine `.mpkg` 解析、Steam
|
|
7
|
+
给 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web 界面(dsh web)添加背景壁纸的插件:**Wallpaper Engine `.mpkg` 解析、Steam 创意工坊原始目录、视频/网页/图片壁纸、时间变化壁纸的多时段切换、整屏虚化体系、主题色与玻璃外观、本地壁纸库、定时轮换、一键更新**。几乎每一个外观细节都可以调节。
|
|
8
8
|
|
|
9
|
-
>
|
|
9
|
+
> **一句话版本**:视频/图片/网页壁纸直接播放;**时间变化壁纸(Time Variation)支持多时段自动切换 + 手动锁定时段**;**带设置项的部分网页壁纸(如 Live2D 立绘类,含分辨率/语言/音量)已接入插件设置页,可在「可调参数」折叠区直接修改**;场景(Scene)壁纸提供静态帧提取 + 图层合成两个折中方案。
|
|
10
10
|
|
|
11
11
|
## 核心能力
|
|
12
12
|
|
|
13
13
|
**📦 壁纸来源(全部支持)**
|
|
14
|
-
- **Wallpaper Engine `.mpkg`**:浏览器内直接解析容器(不上传第三方);视频类自动播放内嵌 mp4 /
|
|
14
|
+
- **Wallpaper Engine `.mpkg`**:浏览器内直接解析容器(不上传第三方);视频类自动播放内嵌 mp4 / 视频纹理;场景类解析容器提取素材;**多时段自动切换**(按系统时间选时段素材)
|
|
15
15
|
- **Steam 创意工坊原始目录**:自动发现 WE 安装(读注册表 + libraryfolders.vdf,支持非默认盘),列出 `video / web / scene` 三种类型;也可直接把 **workshop 主目录**(`steamapps/workshop/content/431960`)设为自定义目录——每个子文件夹自动识别为一张壁纸
|
|
16
16
|
- **视频壁纸**:`.mp4` 直接播放(自定义目录 / Steam 库 / 本地文件均可)
|
|
17
17
|
- **网页壁纸**:HTML 壁纸在沙箱 iframe 中加载(实验性,带**风险预检**:自动标注「⚠重动画」「🌐外网」,见[网页壁纸](#网页壁纸web实验性))
|
|
18
18
|
- **图片 / GIF / URL**:本地图片(png/jpg/webp/gif)或图片链接(含 data:image)直接作背景
|
|
19
19
|
|
|
20
|
+
**⏰ 时间变化壁纸(Time Variation)**
|
|
21
|
+
- 支持 WE 的**时间变化**壁纸(项目里带 `morningtime / daytime / dusktime / nighttime / timevarying` 属性,含多个时段视频纹理):
|
|
22
|
+
- **自动切换**:按系统时间每 60 秒检查,跨时段自动换到对应素材
|
|
23
|
+
- **手动锁定 / 时段覆盖**:设置页提供「自动 + 清晨 / 白天 / 黄昏 / 夜晚」按钮——点击某个时段即固定为该素材,点击「自动」恢复随时间切换
|
|
24
|
+
- **按需懒加载**:只在当前时段提取视频纹理(单槽峰值约几十 MB),其余时段切换时才读取,**避免一次导入全部时段导致移动端 OOM 崩溃**
|
|
25
|
+
- **不串台**:切换不同时间变化壁纸时清空上一张的时段缓存,避免「点清晨/白天/黄昏却显示上一张壁纸画面」的串台问题
|
|
26
|
+
- 适配方式:视频类 mpkg、场景类(scene.pkg 用「mpkg 方式」解析——`scene.pkg` 与 mpkg 是同一 PKG 容器,含内嵌视频纹理的时段可自动切换)
|
|
27
|
+
|
|
20
28
|
**🌊 整屏虚化(磨砂)体系**
|
|
21
29
|
- **统一虚化**:一个条控制整屏壁纸模糊度;侧边栏白雾厚度、聊天区跟随、新会话按钮跟随独立可调
|
|
22
30
|
- **界面虚化(各自独立开关+程度)**:对话框(通用居中窗口 + 聊天输入框)、设置面板、下载/确认弹窗、弹层(菜单/下拉/提示)、遮罩(全屏背景)、侧边栏磨砂(弹窗打开时自动摘除)
|
|
@@ -25,10 +33,13 @@
|
|
|
25
33
|
**🎨 主题色与玻璃外观(Aqua 实验模式,默认全关)**
|
|
26
34
|
- **主题颜色(accent)**:取色盘 + 6 预置,驱动按钮/滑条/选中项/链接/发送键等品牌色(`--dsw-alias-brand-*` 系列 token)
|
|
27
35
|
- **统一雾**(全屏遮罩统一雾色,强度独立滑条)、**面板匹配壁纸色**(自动取色 + 强度滑条 + 自定义取色盘)、**自适应文字色 + 蓝色清理**(品牌色统一,带自定义取色盘)、**深底文字可读增强**、**任务列表磨砂**
|
|
28
|
-
- 外观 tab
|
|
36
|
+
- 外观 tab 里还有:悬浮卡片、时钟等
|
|
29
37
|
|
|
30
38
|
**🎬 镜头与画面**
|
|
31
|
-
- 镜头缩放(10–2000%)与平移、画面亮度(50–150
|
|
39
|
+
- 镜头缩放(10–2000%)与平移、画面亮度(50–150%)、轻度锐化、Deep diving 背景框
|
|
40
|
+
|
|
41
|
+
**🎛️ 壁纸设置(tab)**
|
|
42
|
+
- **当前壁纸直接相关**的都集中在这里:静音(网页壁纸)、镜像翻转(水平/垂直)、视频倍速(0.5–2x)、可调参数(mpkg 只读 / 网页壁纸可改)、**解码帧率上限**(24/30/48/60,ffmpeg 抽帧)、**分辨率上限**(720p/1080p/2K,ffmpeg 缩放降占用)、ffmpeg 状态与下载/卸载
|
|
32
43
|
|
|
33
44
|
**🚀 大文件混合模式(hybrid,默认开)**
|
|
34
45
|
- mpkg 流式上传到 DSH 宿主 → 磁盘存储 → HTTP Range 流式播放,**>600MB 大文件也支持**,内存占用极低
|
|
@@ -44,17 +55,36 @@
|
|
|
44
55
|
**🔄 更新**
|
|
45
56
|
- 「检查更新」按**版本号**对比(semver),本地未推送改动不误报;「一键更新」从 GitHub 拉最新代码写回,重启生效
|
|
46
57
|
|
|
58
|
+
**💾 备份与恢复 / 设置持久化**
|
|
59
|
+
- 「其他」tab 提供**备份与恢复**:导出外观类设置(外观 / 统一虚化 / 界面虚化 / Aqua / 其他)为**可分享的 JSON 文件**,导入即还原——不含当前壁纸与扫描目录
|
|
60
|
+
- **设置持久化到宿主端文件**:设置除浏览器 localStorage 外加存 `~/.dsh-mpkg-wallpaper/settings.json`,**换端口 / 清浏览器数据不丢失**(参考 elysia395 v0.4.0 的做法)
|
|
61
|
+
|
|
47
62
|
## 支持类型与现状
|
|
48
63
|
|
|
49
64
|
| 类型 | Web 端表现 | 说明 |
|
|
50
65
|
|---|---|---|
|
|
51
66
|
| **mpkg(视频类)** | ✅ 完整 | 内嵌 mp4 / 视频纹理直接播放 |
|
|
52
|
-
| **mpkg(场景类)** | 🟡 折中 | 静态帧提取 / 图层合成 /
|
|
67
|
+
| **mpkg(场景类)** | 🟡 折中 | 静态帧提取 / 图层合成 / 预览动图(见下);**含视频纹理时段的可自动切换** |
|
|
68
|
+
| **时间变化壁纸** | ✅ 完整 | 多时段自动切换 + 手动锁定,懒加载防 OOM |
|
|
53
69
|
| **视频(mp4/webm)** | ✅ 完整 | 直接播放 |
|
|
54
|
-
| **网页(HTML)** | 🟡 实验性 | iframe
|
|
70
|
+
| **网页(HTML)** | 🟡 实验性 | iframe 沙箱加载;**带设置项的部分网页壁纸已接入插件可改(下)**;**带可交互功能的暂未适配** |
|
|
55
71
|
| **场景原始目录(scene.pkg)** | 🟡 折中 | 同 mpkg 场景类 |
|
|
56
72
|
| **Application(exe)** | ❌ 排除 | 安全考虑,绝不读取/执行 |
|
|
57
73
|
|
|
74
|
+
## 可调参数与网页壁纸的设置接入
|
|
75
|
+
|
|
76
|
+
- **mpkg 壁纸**:项目自带的**可调参数**在「可调参数」折叠区**只读展示**(浏览器显示的是预渲染素材,修改需在壁纸引擎 App 中生效),供对照。
|
|
77
|
+
- **网页壁纸(部分已接入,Live2D 立绘类)**:部分网页壁纸(Live2D 立绘,通常含 `loadJson.json` 的 `SettingModel`)自带设置项,现在**已经接入插件设置页**——在**同一个「可调参数」折叠区**里可直接修改:
|
|
78
|
+
- **分辨率 2k / 4k / 8k**(重载生效)
|
|
79
|
+
- **语言**(按壁纸实际提供:中文 / 日本語 / English / Tiếng Việt / Русский 等)
|
|
80
|
+
- **背景音乐与语音音量**(实时生效,不重载)
|
|
81
|
+
- **显示触摸区域框 / 文本框**等开关
|
|
82
|
+
- 修改写入壁纸 iframe 的同源 localStorage(key = 骨架名),改完重载该壁纸生效
|
|
83
|
+
- **隐藏壁纸自带设置面板**:这类网页壁纸在壁纸表面右上角自带「设置」按钮 + 面板,且无法交互——插件在 iframe 加载后**自动隐藏**它(防挡住画面),设置通过插件页操作。
|
|
84
|
+
- **部分带可交互功能的壁纸暂未适配**:依赖外网 SDK / 特殊交互逻辑的网页壁纸(如部分米哈游事件页、需要登录或点击交互的壁纸),其内置设置项尚未接入,仍按原样加载——这类壁纸可正常显示,但**插件内的可调参数不可用**。
|
|
85
|
+
|
|
86
|
+
> 这类可改网页壁纸的按钮(分辨率/语言/音量等)只在识别到对应壁纸的 `loadJson.json` 后出现;普通图片/视频/无设置项的网页壁纸不显示。
|
|
87
|
+
|
|
58
88
|
## 场景壁纸(Scene)适配现状
|
|
59
89
|
|
|
60
90
|
**结论先说:WE 场景壁纸无法在 Web 端完整还原,这是引擎层面的限制,不是插件偷懒。** 原因:场景由专有引擎渲染——Live2D 式**木偶骨架(.mdl 二进制)**、**shader 特效**(水波/粒子)、**脚本**(音乐播放器 UI 等)。浏览器没有官方渲染器,格式也未公开(RePKG 只逆向过 PKG/TEX,MDL 骨架无公开文档;开源方案 [we-layerd](https://github.com/Aromatic05/we-layerd) 打包了官方渲染器但仅限 Linux Wayland 桌面)。
|
|
@@ -63,28 +93,30 @@
|
|
|
63
93
|
|
|
64
94
|
1. **静态帧提取**:解析 `scene.pkg`(PKG 容器 + LZ4 解压 + TEX 纹理解码),从场景图选取主纹理输出**高清静态图**(摄影/插画类场景可达原图画质,实测 7680×4320)
|
|
65
95
|
2. **图层合成**:解析 `scene.json` 的全部 image 图层(背景 + 主体 + 分层角色部件),按源文件坐标/尺寸在 canvas 上**精确合成完整画面**(平铺图层类场景可完整还原构图;时间变化场景按当前时段选帧)
|
|
96
|
+
3. **时间变化的 mpkg 方式**:`scene.pkg` 与 mpkg 是同一 PKG 容器,含内嵌视频纹理的时段可**按 mpkg 方式解析** → 多时段自动切换(同上述时间变化壁纸)
|
|
66
97
|
|
|
67
|
-
**无法覆盖的**:MDL
|
|
98
|
+
**无法覆盖的**:MDL 木偶人物(人物的身体由骨架拼装,纹理层几乎为空)、shader 波浪/粒子特效、脚本交互。这些场景回退**官方预览动图**(preview.gif,作者生成的动画预览)。
|
|
68
99
|
|
|
69
100
|
> 如果你需要场景壁纸的完整动态效果,现实路径:外部渲染成视频 → 用本插件的**视频壁纸**功能(Windows 用 WE 官方版录屏、Linux 用 we-layerd 录屏、移动端用壁纸引擎 App 录屏)。
|
|
70
101
|
|
|
71
102
|
## 网页壁纸(Web,实验性)
|
|
72
103
|
|
|
73
|
-
- HTML 壁纸在**沙箱 iframe** 中全屏加载(`allow-scripts`
|
|
104
|
+
- HTML 壁纸在**沙箱 iframe** 中全屏加载(`allow-scripts` 隔离;有静音开关,默认开;刷新后不自动重载——卡住时刷新页面即可恢复)
|
|
74
105
|
- **风险预检**:扫描时自动分类,列表与确认框标注:
|
|
75
106
|
- **⚠重动画**:Spine/L2D 骨骼动画壁纸,低性能设备可能卡住界面
|
|
76
107
|
- **🌐外网**:依赖外网 SDK/CDN(如米哈游事件页),加载可能失败
|
|
77
|
-
- 实测:webm 视频类网页壁纸(轻量)正常;Spine
|
|
108
|
+
- 实测:webm 视频类网页壁纸(轻量)正常;Spine 骨骼动画类视设备性能而定;**带 `loadJson.json` 设置项的 Live2D 立绘类已接入插件可改**(见上文)
|
|
78
109
|
|
|
79
110
|
## 设置分组(顶部 Tab)
|
|
80
111
|
|
|
81
|
-
- **来源**:总开关、hybrid、mpkg 文件、图片/视频文件、自定义目录(可指 workshop 主目录)、本地壁纸库(Steam
|
|
82
|
-
-
|
|
112
|
+
- **来源**:总开关、hybrid、mpkg 文件、图片/视频文件、自定义目录(可指 workshop 主目录)、本地壁纸库(Steam 扫描)、壁纸切换/轮换、**时间变化壁纸的时段锁定**
|
|
113
|
+
- **壁纸设置**:静音、镜像翻转(水平/垂直)、视频倍速、可调参数(mpkg 只读 / 网页壁纸可改)、解码帧率上限、分辨率上限、ffmpeg 状态
|
|
114
|
+
- **外观**:主题颜色、悬浮、磨砂模糊、镜头缩放/位置、亮度
|
|
83
115
|
- **统一虚化**:整屏虚化 + 侧边栏/标题栏白雾、聊天区跟随、新会话跟随
|
|
84
116
|
- **界面虚化**:对话框/设置面板/弹窗/弹层/遮罩/侧边栏磨砂各自独立
|
|
85
117
|
- **透出壁纸**:侧边栏/标题栏透出、标题栏磨砂程度、锐化
|
|
86
118
|
- **Aqua**:统一雾/面板取色/自适应文字等实验开关
|
|
87
|
-
-
|
|
119
|
+
- **其他**:时钟、更新检查/热更新、**备份与恢复**、恢复所有默认设置
|
|
88
120
|
|
|
89
121
|
## 安装
|
|
90
122
|
|
|
@@ -121,31 +153,28 @@ git clone https://github.com/XHR666/dsh-mpkg-wallpaper.git $DSH_HOME/profiles/no
|
|
|
121
153
|
|
|
122
154
|
## 限制
|
|
123
155
|
|
|
124
|
-
- **场景壁纸无法完整动态还原**(见[场景壁纸适配现状](#场景壁纸scene适配现状)
|
|
125
|
-
-
|
|
156
|
+
- **场景壁纸无法完整动态还原**(见[场景壁纸适配现状](#场景壁纸scene适配现状));mpkg 可调参数为只读展示,修改需在壁纸引擎 App 中生效
|
|
157
|
+
- **网页壁纸为实验性**:重动画/外网依赖可能卡顿或加载失败(有预检标注与刷新恢复机制);**自带设置项的部分网页壁纸已接入插件可改,带可交互功能的壁纸暂未适配**
|
|
126
158
|
- **超大素材**(纯浏览器模式):独立视频 >600MB、视频纹理 >250MB、图片 >200MB 无法处理;**hybrid 模式**无此限制
|
|
127
159
|
- 场景静态帧/图层合成的**首次提取耗时**(几秒,8K 纹理更久);之后走缓存秒开
|
|
128
160
|
|
|
129
|
-
## 截图演示
|
|
130
|
-
|
|
131
|
-

|
|
132
|
-
|
|
133
|
-
*动态壁纸铺满整个界面。此状态下侧边栏收起,聊天框位于屏幕中央并带有磨砂模糊效果;侧边栏呈全透明状态,壁纸完整透出,画面干净通透。*
|
|
161
|
+
<!-- ## 截图演示
|
|
134
162
|
|
|
135
|
-
 -->
|
|
136
164
|
|
|
137
|
-
|
|
165
|
+
<!-- *动态壁纸铺满整个界面。此状态下侧边栏收起,聊天框位于屏幕中央并带有磨砂模糊效果;侧边栏呈全透明状态,壁纸完整透出,画面干净通透。* -->
|
|
138
166
|
|
|
139
|
-
 -->
|
|
140
168
|
|
|
141
|
-
|
|
169
|
+
<!-- *通过「面板不透明度」与「统一虚化」滑条调节后的效果(图为调节后):大部分界面区域的不透明度均可调节,侧边栏半透明,壁纸在后方隐约透出。* -->
|
|
142
170
|
|
|
143
|
-
|
|
171
|
+
<!--  -->
|
|
144
172
|
|
|
145
|
-
|
|
173
|
+
<!-- *壁纸引擎背景的设置界面。截图之外,外观几乎全部可调:统一虚化(独立分组)、界面虚化(对话框/设置面板/弹窗/弹层/遮罩/侧边栏磨砂)、镜头缩放与平移、壁纸翻转、主题颜色、侧边栏/标题栏透出壁纸、标题栏磨砂程度、轻度锐化,以及场景壁纸的图层合成与时间帧切换。* -->
|
|
146
174
|
|
|
147
|
-
|
|
175
|
+
<!-- 截图中的壁纸来自 B 站 UP 主【-夜莺Night】的壁纸作品:[作者主页](https://b23.tv/86CyaFw) -->
|
|
148
176
|
|
|
177
|
+
-->
|
|
149
178
|
## 反馈 Bug
|
|
150
179
|
|
|
151
180
|
反馈问题时请附带:
|
|
@@ -155,11 +184,11 @@ Wallpaper Engine 官方帮助站 [help.wallpaperengine.io](https://help.wallpape
|
|
|
155
184
|
|
|
156
185
|
## 安全说明
|
|
157
186
|
|
|
158
|
-
- **无对外网络请求**:插件不访问任何外部网络;唯一网络行为是用户手动输入的图片 URL
|
|
187
|
+
- **无对外网络请求**:插件不访问任何外部网络;唯一网络行为是用户手动输入的图片 URL、网页壁纸自身加载的资源与**本机 DSH 宿主**(127.0.0.1)的 HTTP 通信
|
|
159
188
|
- **无敏感内容**:源码不含路径、密钥、令牌、个人信息
|
|
160
189
|
- **开源依赖**:仅 DSH 自带 react + 官方 slots/locale 接口;scene.pkg 提取器采用 [elysia395/dsh-wallpaper-engine](https://github.com/elysia395/dsh-wallpaper-engine)(MIT,文件头已署名)
|
|
161
190
|
- 参考项目:[dsh-bg-image](https://github.com/lyh9712/dsh-bg-image)(MIT,模板)、[unmpkg](https://github.com/aqnya/unmpkg)(GPL-3.0,仅参考 mpkg 二进制格式)、[repkg](https://github.com/notscuffed/repkg)(GPL,仅研究 .tex 格式)
|
|
162
|
-
- 数据边界:所有解析在本机完成;localStorage
|
|
191
|
+
- 数据边界:所有解析在本机完成;localStorage 只存背景与参数;设置另存宿主端 `~/.dsh-mpkg-wallpaper/settings.json`
|
|
163
192
|
|
|
164
193
|
## 文件结构
|
|
165
194
|
|
|
@@ -168,8 +197,8 @@ dsh-mpkg-wallpaper/
|
|
|
168
197
|
├── package.json # dsh.bundle + dsh.client 声明
|
|
169
198
|
├── cordis.patch.yml # 插件安装声明(dsh plugin add 使用)
|
|
170
199
|
├── lib/
|
|
171
|
-
│ ├── index.js # 宿主端:上传/流式播放 + Steam 发现 + 自定义目录 + 场景提取路由
|
|
172
|
-
│ ├── client.js # 浏览器端:mpkg 解析 + 设置页 + 背景 DOM + 虚化体系 + 壁纸库
|
|
200
|
+
│ ├── index.js # 宿主端:上传/流式播放 + Steam 发现 + 自定义目录 + 场景提取路由 + 设置持久化
|
|
201
|
+
│ ├── client.js # 浏览器端:mpkg 解析 + 设置页 + 背景 DOM + 虚化体系 + 壁纸库 + 时间变化/网页设置
|
|
173
202
|
│ └── pkg-extract.js# scene.pkg 静态帧/图层提取(PKG+LZ4+TEX,MIT,来自 elysia395)
|
|
174
203
|
├── tools/ # mpkg/tex/mdl 逆向解析工具(供开发者参考)
|
|
175
204
|
├── README.md # 本文件(中文)
|
|
@@ -179,11 +208,11 @@ dsh-mpkg-wallpaper/
|
|
|
179
208
|
## 致谢
|
|
180
209
|
|
|
181
210
|
- [Bil812](https://github.com/Bil812) — 在 [PR #2](https://github.com/XHR666/dsh-mpkg-wallpaper/pull/2) 提出壁纸取色、自适应文字色、全屏统一遮罩等方案并维护 fork;其中思路已吸收为「Aqua 实验」模式(可开关,默认关)
|
|
182
|
-
- [elysia395/dsh-wallpaper-engine](https://github.com/elysia395/dsh-wallpaper-engine) — scene.pkg 静态帧提取器(MIT),本插件 `lib/pkg-extract.js`
|
|
211
|
+
- [elysia395/dsh-wallpaper-engine](https://github.com/elysia395/dsh-wallpaper-engine) — scene.pkg 静态帧提取器(MIT),本插件 `lib/pkg-extract.js` 采用自该项目;其「设置持久化到宿主端文件」「Edge canvas 兼容渲染」思路也已借鉴
|
|
183
212
|
- [awesome-dsh-plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin) 社区 — 收录与推广
|
|
184
213
|
|
|
185
214
|
## 渲染可行性研究
|
|
186
215
|
|
|
187
216
|
- 完整场景(含 Live2D 木偶)只能由专有渲染器完成:壁纸引擎 App 的原生库(内嵌 Chromium + 专有 puppet 渲染);开源方案 [we-layerd](https://github.com/Aromatic05/we-layerd)(Rust)打包了官方渲染器,但**仅限 Linux Wayland** 桌面
|
|
188
217
|
- 浏览器端没有成熟的 WE 场景渲染器(pixeltris/wallpaper-engine-web 已消失)——**与操作系统无关,任何浏览器都无法直接渲染 Live2D 场景**;官方渲染器 .so 为闭源二进制,无源码无法编译成 WASM
|
|
189
|
-
- 本插件的可行路径:**静态帧提取 +
|
|
218
|
+
- 本插件的可行路径:**静态帧提取 + 图层合成 + (时间变化的)mpkg 方式时段切换**(见[场景壁纸适配现状](#场景壁纸scene适配现状));需要完整动态时用「外部渲染成视频 → 视频壁纸」方案
|