Repository navigation
Releases
檐下 · Shelter 0.3.1 — 首次提示不再挡住发送键
檐下 · Shelter 0.3.1
修一个会挡住发送键的 bug。
中文
首次安装的提示气泡「点这里切换天气」之前只做了淡出(opacity: 0),DOM 还在,200px 宽的框依然在右下角接收点击——那里正好是输入框的发送 / 暂停键,点下去会打开天气面板而不是发送。
现在:
- 隐藏状态同时设上
visibility、pointer-events: none和hidden,不再占位、不再命中; - 气泡任何时刻都不接收点击,改成「在页面任意位置点一下或按任意键」就消失;
- 卸载时移除它的 document 监听。
实测:气泡显示的 2.2s / 4s / 8s 三个时刻,pointer-events 均为 none,document.elementFromPoint 在发送键中心返回的是发送键本身,点击不会打开面板。
English
The first-run bubble ("点这里切换天气") used to be faded out with opacity: 0 only. It stayed in the DOM, so its 200 px box kept hit-testing over the corner where the send / pause button lives — a click there opened the weather panel instead of sending.
Now:
- the hidden state also sets
visibility,pointer-events: noneand thehiddenattribute; - the bubble never takes a click, shown or hidden: any click or keypress anywhere dismisses it;
- its document listeners are removed on dispose.
Verified at 2.2 s, 4 s and 8 s after mount: pointer-events stays none, document.elementFromPoint at the send button centre returns the send button, and the click no longer opens the panel.
檐下 · Shelter 0.3.0 — 雨、雪、闪电都是算出来的
檐下 · Shelter 0.3.0
Three scenes that are computed rather than drawn. This release collects everything since 0.2.1.
中文
雨 — 每滴雨按直径给终端速度 v = 9.2·√(d/3),按距离给透视 1/z,拖影长度 = 速度 × 6ms 曝光。雨丝是「尾细淡、头宽亮」的锥度,按 5 个宽度档 × 4 个长度档预烘焙成贴图;毛毛雨比大雨更斜;近处失焦加光晕。
水花 — 落点抛出 5–9 颗水珠(落速的 16%,重力 900 px/s²)、一个椭圆冠环,近处大滴再补一发中心水柱。水珠是沿飞行方向压扁的椭圆,飞行中还会振荡。
雪 — 两种晶型:树枝状聚合(2.5–7.5mm,慢、自转、深色下闪光)与霰(1.2–3.5mm,快)。共享一个位置相干的风场,相邻雪片一起摆;积雪按质量慢慢长出来。
闪电 — 递归分叉的锯齿闪电(1–3 条分叉),雷声延迟代表距离(近 0.3–0.9s / 远 1.5–2.8s),近雷在玻璃上留下 5–9 秒裂纹。
声音 — 雨、火是真实录音(约 6.7MB,宿主只读路由 + Range);雪是程序化的棕噪声风声,不需要素材。
性能:1440×709 / DPR 2 实测 60 fps(p95 16.9ms)。
English
Rain — terminal velocity from diameter (v = 9.2·√(d/3)), perspective from distance (1/z), streak length from the shutter (speed × 6 ms). Streaks taper from a thin faint tail to a bright head and are baked into sprites (5 width × 4 length buckets). Drizzle leans further in wind than heavy rain; near drops get a defocus halo.
Splashes — a landing drop throws 5–9 droplets at 16% of its impact speed under 900 px/s² of gravity, opens a crown ring, and close fat drops add a Worthington jet. Each droplet is an oblate ellipse flattened along its own velocity, oscillating while it flies.
Snow — two crystal habits: dendrite aggregates (2.5–7.5 mm, slow, spinning, twinkling in the dark) and graupel (1.2–3.5 mm, fast). They ride one position-coherent wind field, so neighbours sway together, and the bank grows from what has actually landed.
Lightning — a recursive jagged bolt with 1–3 branches; the thunder delay encodes distance (0.3–0.9 s close, 1.5–2.8 s far), and a close strike leaves a cracked pane for 5–9 s.
Audio — rain and fire are recordings (about 6.7 MB, served by the host half with Range support); snow is a procedural brown-noise wind that needs no asset.
Cost: measured 60 fps at 1440×709 / DPR 2 (p95 16.9 ms).
檐下 · Shelter 0.2.1 — 水花不是圆的
Splash droplets are no longer circles.
中文 — 溅起的水珠被画成沿自身飞行方向压扁的椭圆(长短轴比 0.70–0.97,随水滴大小变化),而且飞行中会以约 6 Hz 振荡变形,所以压扁程度是脉动的;0.5 mm 以下的小水珠保持球形——表面张力在这时占主导。椭圆的朝向跟随速度矢量,水珠越接近抛物线顶点越接近正圆。
English — Splash droplets are drawn as oblate ellipses flattened along their own velocity (aspect 0.70–0.97, scaled by droplet size) and oscillate at roughly 6 Hz while flying, so the flattening breathes. Droplets under 0.5 mm stay spherical, because surface tension wins there. The ellipse turns with the velocity vector, so a droplet reads almost round at the top of its arc.
60 fps unchanged (one extra save/rotate/ellipse per droplet, roughly 40 droplets on screen at peak).
檐下 · Shelter 0.2.0 — 物理化的雨
The rain is now computed instead of drawn.
中文
雨丝不再是「匀速竖直虚线」,每一滴都带直径和距离,其余量从物理推出来:
- 终端速度
v = 9.2·√(d/3):0.5 mm 毛毛雨约 2.2 m/s,3 mm 大雨约 8.5 m/s - 透视:屏幕速度与线宽都乘
1/z(z = 1.2–10 m) - 拖影长度
= 屏幕速度 × 6 ms 曝光,夹在 7–70 px——所以近处长、远处短 - 倾角
atan(风 / 速度):毛毛雨比大雨更斜,再叠一层慢速阵风 - 形状:尾部细淡、头部宽亮的锥度,按 5 宽度档 × 4 长度档预烘焙成贴图,每帧一次
drawImage - 落地:雨滴砸到窗台会抛出 5–9 颗水珠(重力 900 px/s²)、炸开椭圆冠环,近处大滴还会补一发几乎垂直的中心水柱
- 近处失焦:z < 2.6 m 的雨丝加一层宽 2.6 倍的 16% 透明度光晕
实测 60 fps(p95 16.9 ms,无掉帧)。
English
Rain streaks are no longer uniform vertical dashes. Every drop carries a diameter and a distance, and everything else follows:
- terminal velocity
v = 9.2·√(d/3)— 0.5 mm drizzle ≈ 2.2 m/s, 3 mm rain ≈ 8.5 m/s - perspective: screen speed and width scale by
1/z(z = 1.2–10 m) - streak length
= screen speed × 6 ms exposure, clamped to 7–70 px, so near drops draw long and far ones short - angle
atan(wind / speed): drizzle leans further than heavy rain, over a slow gust envelope - shape: thin faint tail widening to a bright head, baked into sprites (5 width × 4 length buckets), one
drawImageper drop - splashes: drops hitting the sill throw 5–9 droplets under 900 px/s² gravity, open a crown ring, and close, fat drops add a near-vertical Worthington jet
- depth of field: drops closer than 2.6 m get a 2.6× wide, 16% halo
Measured 60 fps (p95 16.9 ms, no dropped frames).
檐下 · Shelter 0.1.0
First release.
中文
檐下是给 DeepSeek Harness 的一层天气:雨、雪、炉火三种场景,配真实录音(雨 / 火 / 雷)与夜间模式。
- 配色只覆盖 47 个表面 / 文字 / 边框 / 代码块 / 滚动条令牌,不碰按钮、品牌色、链接与焦点环
- 画面是一块固定全屏 Canvas:锥形雨丝、大小不一的水珠、积雪与炉火火星
- 右下角一颗 28px 按钮,其余时间它只是安静地下雨
English
Immersive weather for DeepSeek Harness: rain, snow and hearth scenes, real ambience recordings, and a night mode.
- The palette only touches 47 surface / text / border / code / scrollbar tokens — buttons, brand colors, links and focus rings stay untouched
- One fixed full-screen canvas: tapered rain streaks, uneven droplets, snow banks, rising embers
- A single 28 px button in the corner; the rest of the time it just rains
Install
cd "$env:USERPROFILE\.dsh\profiles\desktop"
pnpm add "<path to this repo>"Then append dsh-theme-shelter to dsh.profile.bundles and reload the window.
安装
cd "$env:USERPROFILE\.dsh\profiles\desktop"
pnpm add "<仓库路径>"再把 dsh-theme-shelter 加到 dsh.profile.bundles,刷新窗口即可。