wallpaper-engine-dsh 0.1.4 → 0.1.5
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/lib/client.js +33 -15
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -722,8 +722,6 @@ window.__ModuleLoader__.load({
|
|
|
722
722
|
s.setProperty("--webg-saturate", String(1.15 + selection.blur * 0.028));
|
|
723
723
|
s.setProperty("--webg-glass-brightness", "1.04");
|
|
724
724
|
s.setProperty("--webg-wallpaper-blur", selection.wallpaperBlur + "px");
|
|
725
|
-
// Scaling compensates the transparent fringe CSS blur reveals at edges.
|
|
726
|
-
s.setProperty("--webg-wallpaper-scale", (1 + selection.wallpaperBlur * 0.006).toFixed(4));
|
|
727
725
|
// Canvas fit: object-fit/position for video and still wallpapers (iframes
|
|
728
726
|
// ignore object-fit — web wallpapers always fill their layer).
|
|
729
727
|
s.setProperty("--webg-fit", selection.fit);
|
|
@@ -746,7 +744,6 @@ window.__ModuleLoader__.load({
|
|
|
746
744
|
s.removeProperty("--webg-saturate");
|
|
747
745
|
s.removeProperty("--webg-glass-brightness");
|
|
748
746
|
s.removeProperty("--webg-wallpaper-blur");
|
|
749
|
-
s.removeProperty("--webg-wallpaper-scale");
|
|
750
747
|
s.removeProperty("--webg-fit");
|
|
751
748
|
s.removeProperty("--webg-position");
|
|
752
749
|
const scrim = document.getElementById(SCRIM_ID);
|
|
@@ -755,7 +752,10 @@ window.__ModuleLoader__.load({
|
|
|
755
752
|
|
|
756
753
|
// ── Settings picker ─────────────────────────────────────────────────────────
|
|
757
754
|
function SliderRow(label, min, max, step, value, onInput, suffix) {
|
|
758
|
-
|
|
755
|
+
// A Fragment of three cells — the surrounding .webg-effects grid keeps
|
|
756
|
+
// every slider starting and ending at the same x regardless of how wide
|
|
757
|
+
// the label text is (壁纸模糊 vs 暗化 vs Wallpaper blur…).
|
|
758
|
+
return React.createElement(React.Fragment, null,
|
|
759
759
|
React.createElement("span", { className: "webg-hint webg-label" }, label),
|
|
760
760
|
React.createElement("input", {
|
|
761
761
|
className: "webg-slider", type: "range",
|
|
@@ -1144,10 +1144,12 @@ window.__ModuleLoader__.load({
|
|
|
1144
1144
|
React.createElement("option", { key: POSITIONS[i], value: POSITIONS[i] }, label),
|
|
1145
1145
|
)),
|
|
1146
1146
|
),
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1147
|
+
React.createElement("div", { className: "webg-effects" },
|
|
1148
|
+
SliderRow(t.wallpaperBlur, 0, 60, 1, sel.wallpaperBlur, onWallpaperBlur, sel.wallpaperBlur + "px"),
|
|
1149
|
+
SliderRow(t.scrim, 0, 90, 5, Math.round(sel.scrim * 100), onScrim, Math.round(sel.scrim * 100) + "%"),
|
|
1150
|
+
SliderRow(t.border, 0, 90, 5, Math.round(sel.border * 100), onBorder, Math.round(sel.border * 100) + "%"),
|
|
1151
|
+
SliderRow(t.glass, 0, 40, 1, sel.blur, onBlur, sel.blur + "px"),
|
|
1152
|
+
),
|
|
1151
1153
|
),
|
|
1152
1154
|
// ── Resource monitor ──
|
|
1153
1155
|
sel.id && React.createElement("div", { className: "webg-row webg-monitor-row" },
|
|
@@ -1198,14 +1200,21 @@ window.__ModuleLoader__.load({
|
|
|
1198
1200
|
}
|
|
1199
1201
|
.webg-layer--enter { opacity: 0; }
|
|
1200
1202
|
.webg-layer--leave { opacity: 0; }
|
|
1203
|
+
/* Overscan: the media is LARGER than the layer by two blur radii on every
|
|
1204
|
+
side, so the transparent fringe CSS blur produces is clipped by the
|
|
1205
|
+
layer's overflow:hidden instead of compensated with a content-warping
|
|
1206
|
+
scale. A slight saturate keeps blurred colours from washing out. */
|
|
1201
1207
|
.webg-layer .webg-media {
|
|
1202
|
-
|
|
1208
|
+
position: absolute;
|
|
1209
|
+
inset: calc(-2 * var(--webg-wallpaper-blur, 0px));
|
|
1210
|
+
width: calc(100% + 4 * var(--webg-wallpaper-blur, 0px));
|
|
1211
|
+
height: calc(100% + 4 * var(--webg-wallpaper-blur, 0px));
|
|
1212
|
+
max-width: none; max-height: none;
|
|
1213
|
+
object-fit: var(--webg-fit, cover);
|
|
1203
1214
|
object-position: var(--webg-position, center);
|
|
1204
1215
|
display: block;
|
|
1205
1216
|
background: transparent; border: 0;
|
|
1206
|
-
filter: blur(var(--webg-wallpaper-blur, 0px));
|
|
1207
|
-
transform: scale(var(--webg-wallpaper-scale, 1));
|
|
1208
|
-
transform-origin: center;
|
|
1217
|
+
filter: blur(var(--webg-wallpaper-blur, 0px)) saturate(1.06);
|
|
1209
1218
|
}
|
|
1210
1219
|
|
|
1211
1220
|
/* Scrim: above the wallpaper (-1 > -2), below the UI. */
|
|
@@ -1272,7 +1281,7 @@ window.__ModuleLoader__.load({
|
|
|
1272
1281
|
font-size: 13px;
|
|
1273
1282
|
color: var(--dsw-alias-state-error-primary, #d44);
|
|
1274
1283
|
}
|
|
1275
|
-
.webg-label {
|
|
1284
|
+
.webg-label { white-space: nowrap; }
|
|
1276
1285
|
.webg-value { min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; }
|
|
1277
1286
|
|
|
1278
1287
|
.webg-btn {
|
|
@@ -1323,8 +1332,17 @@ window.__ModuleLoader__.load({
|
|
|
1323
1332
|
font-size: 13px; cursor: pointer;
|
|
1324
1333
|
}
|
|
1325
1334
|
|
|
1326
|
-
.webg-slider {
|
|
1327
|
-
|
|
1335
|
+
.webg-slider { width: 100%; accent-color: var(--dsw-alias-brand-primary, rgb(15, 17, 21)); }
|
|
1336
|
+
/* Effects grid: one shared grid across all slider rows, so every slider
|
|
1337
|
+
starts and ends at the same x no matter how wide its label is. */
|
|
1338
|
+
.webg-effects {
|
|
1339
|
+
display: grid;
|
|
1340
|
+
grid-template-columns: max-content 1fr 3.2em;
|
|
1341
|
+
gap: 8px 10px;
|
|
1342
|
+
align-items: center;
|
|
1343
|
+
}
|
|
1344
|
+
.webg-effects .webg-label { white-space: nowrap; }
|
|
1345
|
+
.webg-effects .webg-value { text-align: right; }
|
|
1328
1346
|
|
|
1329
1347
|
.webg-monitor-row { gap: 14px; }
|
|
1330
1348
|
.webg-fps { font-variant-numeric: tabular-nums; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wallpaper-engine-dsh",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Wallpaper Engine Video/Web wallpapers as the DSH web GUI background — discovery, sandboxed rendering, rotation lists, liquid-glass tuning.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|