dsh-mpkg-wallpaper 3.1.2 → 3.1.4
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 +110 -158
- package/README.md +98 -144
- package/lib/client.js +688 -128
- package/lib/index.js +514 -8
- package/lib/pkg-extract.js +1384 -0
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -4,143 +4,106 @@
|
|
|
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
|
|
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.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
> **Scene wallpaper status**: Wallpaper Engine scene wallpapers (Live2D puppets + shaders + particles) are rendered by a proprietary engine and **cannot be fully adapted on the web** (see [Scene wallpaper adaptation](#scene-wallpaper-adaptation)). The plugin provides two partial solutions — **static-frame extraction** and **layer compositing** — and falls back to the official preview animation for the rest.
|
|
10
10
|
|
|
11
11
|
## Core Features
|
|
12
12
|
|
|
13
|
-
**📦
|
|
14
|
-
- **Wallpaper Engine `.mpkg`**: parsed directly in the browser (
|
|
15
|
-
- **
|
|
16
|
-
- **Video
|
|
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 asset matching the current system time; **adjustable options (read-only)** for reference in the WE app
|
|
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
|
+
- **Video wallpapers**: `.mp4` plays directly (custom folder / Steam library / local file)
|
|
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
|
+
- **Images / GIF / URLs**: local images (png/jpg/webp/gif) or image URLs (incl. data:image) as backgrounds
|
|
17
19
|
|
|
18
20
|
**🌊 Full-screen frosted blur suite**
|
|
19
|
-
- **Unified blur
|
|
20
|
-
- **UI blur (own
|
|
21
|
-
|
|
22
|
-
- **Blur settings panel**: the DSH settings panel with its own toggle + amount
|
|
23
|
-
- **Blur download/confirm popups**: this plugin's download-confirm, conflict-detection and error popups with their own toggle + amount
|
|
24
|
-
- **Blur popovers / blur mask**: menus/dropdowns/tooltips and the full-screen dim each managed separately
|
|
25
|
-
- **Sidebar frost (Aqua scheme)**: the sidebar itself becomes glass (backdrop-filter blurs the wallpaper behind it); automatically lifted while a dialog is open so the blur layer cannot trap fixed popups
|
|
21
|
+
- **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
|
+
- **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)
|
|
23
|
+
- **Title-bar frost / sidebar wallpaper visibility**: independently controlled
|
|
26
24
|
|
|
27
|
-
|
|
28
|
-
-
|
|
25
|
+
**🎨 Theme color & glass appearance (Aqua experiment, off by default)**
|
|
26
|
+
- **Theme color (accent)**: color picker + 6 presets driving brand buttons/sliders/selected items/links/send button (`--dsw-alias-brand-*` tokens)
|
|
27
|
+
- **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: **wallpaper flip** (flipX/flipY), floating cards, clock, etc.
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
- Off: pure browser mode (600MB cap)
|
|
30
|
+
**🎬 Lens & picture**
|
|
31
|
+
- Lens zoom (10–2000%) & pan, brightness (50–150%), light sharpen, wallpaper flip, Deep diving background box
|
|
33
32
|
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
- **Custom local wallpaper folder**: any folder can become a wallpaper library, with a built-in **cross-platform folder picker** (browse directories step by step)
|
|
37
|
-
- **Wallpaper switching & rotation**: one-click "Next wallpaper", or timed auto-rotation (adjustable interval)
|
|
33
|
+
**🚀 Hybrid large-file mode (default on)**
|
|
34
|
+
- mpkg streams to the DSH host → disk storage → HTTP Range streaming, **>600MB files supported**, low memory usage
|
|
38
35
|
|
|
39
|
-
|
|
40
|
-
- **
|
|
41
|
-
- **
|
|
42
|
-
- **Security boundary**: .exe/application wallpapers fully excluded (anti-malware), custom folders read images/videos only, host routes have path-traversal guards
|
|
43
|
-
- Pure-client parsing stays inside the browser sandbox — malicious mpkg cannot reach the host file system
|
|
36
|
+
**🖼️ Local wallpaper library**
|
|
37
|
+
- **Steam auto-discovery** + **custom folder** (any directory + cross-platform folder picker; .mpkg files and workshop folders can be mixed freely)
|
|
38
|
+
- **Switching & rotation**: prev/next one-click, timed auto-rotation (interval adjustable)
|
|
44
39
|
|
|
45
|
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
40
|
+
**🛡️ Safety & coexistence**
|
|
41
|
+
- **Conflict detection**: auto-disables when another wallpaper/theme plugin is detected
|
|
42
|
+
- **Security boundaries**: .exe/application wallpapers are completely excluded (virus-injection defense); custom folders only read media files; host routes validate against path traversal; web-wallpaper iframes are sandboxed
|
|
48
43
|
|
|
44
|
+
**🔄 Updates**
|
|
45
|
+
- "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
|
|
49
46
|
|
|
50
|
-
##
|
|
47
|
+
## Supported Types & Status
|
|
51
48
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
49
|
+
| Type | Web behavior | Notes |
|
|
50
|
+
|---|---|---|
|
|
51
|
+
| **mpkg (video)** | ✅ Full | embedded mp4 / video textures play directly |
|
|
52
|
+
| **mpkg (scene)** | 🟡 Partial | static-frame / layer composite / preview animation (below) |
|
|
53
|
+
| **Video (mp4/webm)** | ✅ Full | plays directly |
|
|
54
|
+
| **Web (HTML)** | 🟡 Experimental | sandboxed iframe; heavy-animation wallpapers may freeze on low-end devices |
|
|
55
|
+
| **Scene raw folder (scene.pkg)** | 🟡 Partial | same as mpkg scene |
|
|
56
|
+
| **Application (.exe)** | ❌ Excluded | safety: never read/executed |
|
|
57
57
|
|
|
58
|
+
## Scene Wallpaper Adaptation
|
|
58
59
|
|
|
59
|
-
|
|
60
|
+
**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**).
|
|
60
61
|
|
|
61
|
-
|
|
62
|
-
- **mp4/webm video files** (picked directly)
|
|
63
|
-
- **Image/GIF files** (png/jpg/webp/gif, local) and **image URLs** (including data:image)
|
|
64
|
-
- Size limits depend on the **mode**:
|
|
65
|
-
- **Hybrid mode (default on)**: mpkg is streamed to the DSH host → stored on disk → HTTP Range streaming playback. **Files >600MB are supported** (only disk space limits), with minimal memory use.
|
|
66
|
-
- **Pure browser mode (hybrid off)**: whole file **>600MB** is rejected; standalone video **>600MB**, video texture **>250MB**, image/GIF **>200MB** cannot be processed (warns and falls back to the preview); IndexedDB storage quota can also be a limit.
|
|
67
|
-
- What you get depends on the wallpaper's content:
|
|
68
|
-
- **Video wallpapers** (embedded mp4 / standalone mp4): the video plays as the background.
|
|
69
|
-
- **Scene wallpapers** (Live2D etc.): uses the author's `preview.gif` (browsers cannot render WE scenes).
|
|
70
|
-
- **Blue/green-screen layers**: falls back to the preview (the raw chroma-keyed footage would show blue/green).
|
|
62
|
+
The plugin offers two partial solutions (chosen automatically by scene content):
|
|
71
63
|
|
|
64
|
+
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
|
+
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
|
|
72
66
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
- **Scene-type wallpapers** (Live2D puppet + shader + particles): the full dynamic scene can only be rendered by the Wallpaper Engine app. The browser uses the author-generated `preview.gif`, which may look soft full-screen (zoom/sharpen helps).
|
|
76
|
-
- **Options are read-only**: the browser shows pre-rendered assets, so editing options cannot change the picture; apply them in the Wallpaper Engine app instead.
|
|
77
|
-
- **Very large assets** (pure browser mode): standalone videos >600MB, video textures >250MB, images >200MB cannot be handled (warns and falls back to the preview). In **hybrid mode** large files stream through the host — no such limit.
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
## Screenshots
|
|
81
|
-
|
|
82
|
-

|
|
83
|
-
|
|
84
|
-
*Dynamic wallpaper fills the whole UI. With the sidebar collapsed, the chat box sits centered with a frosted blur; the sidebar is fully transparent so the wallpaper shows through cleanly.*
|
|
85
|
-
|
|
86
|
-

|
|
87
|
-
|
|
88
|
-
*The effect after adjusting the **Panel opacity** and **Unified blur** sliders (as shown): opacity of most areas is adjustable, the sidebar is translucent and the wallpaper shows through faintly behind it.*
|
|
89
|
-
|
|
90
|
-

|
|
91
|
-
|
|
92
|
-
*The settings page. Beyond this screenshot, nearly every appearance aspect is adjustable: unified full-screen blur (one slider controls wallpaper blur degree), dialog / popover / mask blur, lens zoom & pan, sidebar / title-bar wallpaper visibility, title-bar frost amount, sharpen, and time-of-day switching for wallpapers that ship multiple time variants.*
|
|
93
|
-
|
|
94
|
-
The wallpapers in the screenshots are works by Bilibili creator -夜莺Night: [author homepage](https://b23.tv/86CyaFw).
|
|
67
|
+
**Not covered**: MDL puppet characters (Kal'sit, Blue Archive characters, etc. — the body is assembled from rig parts; the flat textures are nearly empty, e.g. `girl.tex` is 0.1% opaque), shader wave/particle effects, scripted interactions. These fall back to the **official preview animation** (preview.gif).
|
|
95
68
|
|
|
69
|
+
> For full dynamic scenes, the practical path: render externally to video → use the plugin's **video wallpaper** (Windows: official WE app screen-record; Linux: we-layerd; mobile: WE app screen-record).
|
|
96
70
|
|
|
97
|
-
##
|
|
71
|
+
## Web Wallpapers (Experimental)
|
|
98
72
|
|
|
99
|
-
|
|
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)
|
|
74
|
+
- **Risk preflight**: auto-classified during scan; badges shown in the list and confirm dialog:
|
|
75
|
+
- **⚠heavy animation**: Spine/L2D skeletal wallpapers — may freeze on low-end devices
|
|
76
|
+
- **🌐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
|
|
100
78
|
|
|
101
|
-
|
|
102
|
-
|---|---|
|
|
103
|
-
| Choose .mpkg | Uses preview.gif (or time-matched asset) as the dynamic background; you can also pick an mp4/webm file directly |
|
|
104
|
-
| Hybrid large-file mode | On: supports >600MB (streamed to host); Off: pure browser mode (600MB cap) |
|
|
105
|
-
| Adjustable options | The wallpaper's own parameters and current values (read-only, for reference in the Wallpaper Engine app) |
|
|
106
|
-
| Image URL / local image | Plain images or GIFs |
|
|
107
|
-
| Panel opacity | 50–100% |
|
|
108
|
-
| Frosted blur | How blurred the wallpaper itself is, 0–40px (0 = sharp) |
|
|
109
|
-
| Unified blur (own section) | One slider controls the whole screen's wallpaper blur degree (0=sharp, higher=more blurred); sidebar fog thickness, chat-area follow and new-chat follow adjustable; takes over sidebar frost and the frosted-blur slider when on (title bar keeps its own frost slider) |
|
|
110
|
-
| Dialog / settings panel / confirm popup / popover / mask blur | Each with its own toggle + amount slider; sidebar frost (Aqua scheme, auto-lifted while a dialog is open) |
|
|
111
|
-
| Lens zoom / position | Zoom (10–2000%) and pan the background; zoom out to see components at the picture edges |
|
|
112
|
-
| Sidebar / title-bar wallpaper | Toggles; off = solid opaque color for that area; title-bar frost amount adjustable independently |
|
|
113
|
-
| Local wallpaper library | Steam discovery (Windows) + custom folder (any folder + folder picker) |
|
|
114
|
-
| Wallpaper switching & rotation | "Next wallpaper" one-click switch; timed auto-rotation (adjustable interval) |
|
|
115
|
-
| Light sharpen | Improves low-res look; turn off if GIFs stutter |
|
|
79
|
+
## Settings Tabs
|
|
116
80
|
|
|
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
|
+
- **Appearance**: theme color, flip, floating, frosted blur, lens zoom/position, brightness
|
|
83
|
+
- **Unified blur**: full-screen blur + sidebar/title-bar fog, chat follow, new-chat follow
|
|
84
|
+
- **UI blur**: dialog/settings/popup/popover/mask/sidebar frost each independent
|
|
85
|
+
- **Wallpaper reveal**: sidebar/title-bar visibility, title-bar frost amount, sharpen
|
|
86
|
+
- **Aqua**: unified fog / panel tint / adaptive text experiment toggles
|
|
87
|
+
- **Other**: clock, update check/apply, reset defaults
|
|
117
88
|
|
|
118
|
-
##
|
|
89
|
+
## Installation
|
|
119
90
|
|
|
120
|
-
|
|
91
|
+
Published on npm (`dsh-mpkg-wallpaper`). Pick one:
|
|
121
92
|
|
|
122
93
|
### Option 1: dsh plugin add (recommended, market-recognized)
|
|
123
94
|
|
|
124
95
|
```bash
|
|
125
96
|
dsh plugin --profile web add dsh-mpkg-wallpaper
|
|
126
|
-
# restart dsh web, then
|
|
97
|
+
# restart dsh web, then Ctrl+F5 in the browser
|
|
127
98
|
```
|
|
128
99
|
|
|
129
|
-
|
|
130
|
-
dependencies — the plugin market recognizes it as installed, shows the download count,
|
|
131
|
-
and can manage updates.
|
|
132
|
-
|
|
133
|
-
### Option 2: pnpm manual install (pnpm-workspace profile)
|
|
100
|
+
### Option 2: pnpm manual install
|
|
134
101
|
|
|
135
102
|
```bash
|
|
136
|
-
# run in the profile directory (replace <profile> with your profile name, e.g. web)
|
|
137
103
|
pnpm --dir $DSH_HOME/profiles/<profile> add dsh-mpkg-wallpaper
|
|
138
|
-
# restart dsh web, then Ctrl+F5
|
|
104
|
+
# restart dsh web, then Ctrl+F5
|
|
139
105
|
```
|
|
140
106
|
|
|
141
|
-
Also writes into the dependency table, so the market recognizes it. No pnpm available?
|
|
142
|
-
Use Option 1 (`dsh plugin add` wraps pnpm).
|
|
143
|
-
|
|
144
107
|
### Option 3: Git clone (developers / offline)
|
|
145
108
|
|
|
146
109
|
```bash
|
|
@@ -152,86 +115,75 @@ git clone https://github.com/XHR666/dsh-mpkg-wallpaper.git $DSH_HOME/profiles/no
|
|
|
152
115
|
# restart to take effect
|
|
153
116
|
```
|
|
154
117
|
|
|
155
|
-
> Note: Option 3 is
|
|
156
|
-
> the market won't report it as installed (market display only; the wallpaper feature is
|
|
157
|
-
> unaffected). For market recognition use Option 1/2, and remove the old manual copy (the
|
|
158
|
-
> `cordis.patch.yml` insert line + plugin directory) to avoid double-loading the plugin.
|
|
118
|
+
> Note: Option 3 is not recorded in the dependency table — the market won't report it as installed (display only; functionality unaffected).
|
|
159
119
|
|
|
160
120
|
Uninstall: `dsh plugin --profile web remove dsh-mpkg-wallpaper`.
|
|
161
121
|
|
|
122
|
+
## Limitations
|
|
162
123
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
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)
|
|
126
|
+
- **Huge assets** (pure-browser mode): standalone video >600MB, video textures >250MB, images >200MB unsupported; **hybrid mode** has no such limit
|
|
127
|
+
- Scene static-frame / layer-composite **first extraction takes a few seconds** (longer for 8K textures); afterwards served from cache
|
|
167
128
|
|
|
168
|
-
##
|
|
129
|
+
## Screenshots
|
|
169
130
|
|
|
170
|
-
|
|
171
|
-
- The **original .mpkg source file** (required to reproduce the issue),
|
|
172
|
-
- Browser console output (F12 → Console), if any,
|
|
173
|
-
- Your DSH version and platform (Windows / Linux / mobile).
|
|
131
|
+

|
|
174
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.*
|
|
175
134
|
|
|
176
|
-
|
|
135
|
+

|
|
177
136
|
|
|
178
|
-
|
|
179
|
-
- **No sensitive content**: no paths, keys, tokens or personal info in the source
|
|
180
|
-
- **No third-party closed source**: depends only on DSH's bundled react and the official slots/locale interfaces
|
|
181
|
-
- Reference projects (all open source): [dsh-bg-image](https://github.com/lyh9712/dsh-bg-image) (MIT, template), [unmpkg](https://github.com/aqnya/unmpkg) (GPL-3.0, mpkg binary format only), [repkg](https://github.com/notscuffed/repkg) (GPL, .tex format research), [astc-encoder](https://github.com/ARM-software/astc-encoder) (Apache-2.0, local decode experiments)
|
|
182
|
-
- Data boundary: all parsing happens locally in the browser; localStorage only stores background data URLs and option edits
|
|
137
|
+
*After adjusting panel opacity and unified blur: most UI areas are opacity-adjustable, the sidebar is semi-transparent with the wallpaper faintly visible behind.*
|
|
183
138
|
|
|
139
|
+

|
|
184
140
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
```
|
|
188
|
-
dsh-mpkg-wallpaper/
|
|
189
|
-
├── package.json # dsh.bundle + dsh.client manifests
|
|
190
|
-
├── cordis.patch.yml # plugin install declaration (for dsh plugin add)
|
|
191
|
-
├── lib/
|
|
192
|
-
│ ├── index.js # host side: large-file upload/streaming + Steam discovery + custom folders
|
|
193
|
-
│ └── client.js # browser side: mpkg parser + settings page + background DOM + blur system + wallpaper library
|
|
194
|
-
├── tools/ # mpkg/tex/mdl reverse-engineering tools (for developers)
|
|
195
|
-
├── README.md # 中文说明
|
|
196
|
-
└── README.en.md # this file (English)
|
|
197
|
-
```
|
|
141
|
+
*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.*
|
|
198
142
|
|
|
143
|
+
Wallpapers in the screenshots are by Bilibili UP【-夜莺Night】: [author page](https://b23.tv/86CyaFw)
|
|
199
144
|
|
|
200
|
-
##
|
|
145
|
+
## Official Docs
|
|
201
146
|
|
|
202
|
-
|
|
203
|
-
- [awesome-dsh-plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin) community — listing & promotion.
|
|
147
|
+
Wallpaper Engine official help site: [help.wallpaperengine.io](https://help.wallpaperengine.io). mpkg/tex/mdl are proprietary formats without official docs (format knowledge in this plugin comes from RePKG / lwe public reverse-engineering).
|
|
204
148
|
|
|
205
|
-
##
|
|
149
|
+
## Bug Reports
|
|
206
150
|
|
|
207
|
-
|
|
151
|
+
Please include:
|
|
152
|
+
- The **original .mpkg or workshop folder** (required to reproduce)
|
|
153
|
+
- Browser console output (F12 → Console), if any
|
|
154
|
+
- Your DSH version and platform (Windows / Linux / mobile)
|
|
208
155
|
|
|
209
|
-
|
|
210
|
-
- **Custom nav icon**: replace the `NAV_ICON` constant in `lib/client.js` (default: a hand-drawn "landscape" SVG, no trademark) with your own icon (20×20, SVG data URL or base64 PNG recommended)
|
|
156
|
+
## Security
|
|
211
157
|
|
|
212
|
-
|
|
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)
|
|
159
|
+
- **No secrets**: no paths, keys, tokens or personal info in the source
|
|
160
|
+
- **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
|
+
- 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
|
|
213
163
|
|
|
214
|
-
|
|
215
|
-
|---|---|
|
|
216
|
-
| `unmpkg.py` | mpkg container parser/extractor (PKGM0014/0018) |
|
|
217
|
-
| `tex2png.py` | TEXV0005 texture decoder (DXT5/R8, etc.) |
|
|
218
|
-
| `mdl_explorer.py` | .mdl structure explorer (block tags/meshes/float sections) |
|
|
219
|
-
| `xref.py` | wallpaper64.exe string xref + disassembly (capstone) |
|
|
220
|
-
| `MDL-格式分析笔记.md` | .mdl format reverse-engineering notes (container/mesh solved, skeleton = JSON, animation WIP) |
|
|
164
|
+
## File Structure
|
|
221
165
|
|
|
222
|
-
|
|
166
|
+
```
|
|
167
|
+
dsh-mpkg-wallpaper/
|
|
168
|
+
├── package.json # dsh.bundle + dsh.client declarations
|
|
169
|
+
├── cordis.patch.yml # plugin install declaration
|
|
170
|
+
├── 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
|
|
173
|
+
│ └── pkg-extract.js# scene.pkg static-frame/layer extraction (PKG+LZ4+TEX, MIT, from elysia395)
|
|
174
|
+
├── tools/ # mpkg/tex/mdl reverse-engineering tools (for developers)
|
|
175
|
+
├── README.md # Chinese
|
|
176
|
+
└── README.en.md # English
|
|
177
|
+
```
|
|
223
178
|
|
|
224
|
-
|
|
225
|
-
- **tex**: TEXV0005; format 5 = DXT family, format 34 = embedded MP4 video texture (the 4K animation of customize wallpapers lives right in there)
|
|
226
|
-
- **mdl**: MDLV00xx block container; mesh = 8 floats/vertex; MDLS0003/0004 contain JSON skeleton poses; MDLA = animation
|
|
179
|
+
## Acknowledgements
|
|
227
180
|
|
|
228
|
-
|
|
181
|
+
- [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
|
|
183
|
+
- [awesome-dsh-plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin) community — listing & promotion
|
|
229
184
|
|
|
230
|
-
|
|
231
|
-
- There is no mature WE scene renderer for browsers ([wallgl](https://github.com/lucaschnabel42/wallgl) is a prototype without puppet support; pixeltris/wallpaper-engine-web is gone) — **regardless of OS, no browser can render Live2D scenes directly**.
|
|
232
|
-
- **Cross-platform path**: render externally into a video, then use the plugin's **video background** (MP4/WebM stored in IndexedDB, played in a looping `<video>`):
|
|
233
|
-
- **Windows**: the official Wallpaper Engine (Steam, native full-scene rendering) or the open-source [Lively Wallpaper](https://github.com/rocksdanister/lively) (video/web/app wallpapers; does not parse WE scene format) → screen-record to mp4
|
|
234
|
-
- **Linux desktop**: render with we-layerd → screen-record
|
|
235
|
-
- **Mobile**: screen-record in the Wallpaper Engine app
|
|
236
|
-
- The plugin behaves identically on every platform (Windows/Linux/macOS/mobile): preview.gif, embedded video textures and time-of-day switching all work.
|
|
185
|
+
## Rendering Feasibility Research
|
|
237
186
|
|
|
187
|
+
- 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
|
+
- 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"
|