dsh-nook 0.0.0-stage → 0.3.1
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/LICENSE +36 -0
- package/README.md +66 -2
- package/client.js +1004 -0
- package/cordis.patch.yml +23 -0
- package/icon.svg +11 -0
- package/index.js +190 -0
- package/locale/en.json +6 -0
- package/locale/ja.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +70 -4
- package/scenes/L2_2529_D3_Towns_Plazas.html +1097 -0
- package/scenes/L2_6206_D5_Markets_Shops.html +822 -0
- package/scenes/L2_6834_D6_Courtyards_Gardens.html +735 -0
- package/scenes/L2_7180_D7_NightSky_DeepSea.html +819 -0
- package/scenes/L3_1356_D2_Waterside_HotSprings.html +2726 -0
- package/scenes/L3_171_D1_Nature_Terrain.html +750 -0
- package/scenes/L3_1966_D4_Travel_Transit.html +1590 -0
- package/scenes/L3_2464_D1_Nature_Terrain.html +867 -0
- package/scenes/L3_2559_D3_Towns_Plazas.html +1099 -0
- package/scenes/L3_2869_D3_Towns_Plazas.html +2677 -0
- package/scenes/L3_3241_D2_Waterside_HotSprings.html +1821 -0
- package/scenes/L3_3557_D4_Travel_Transit.html +1872 -0
- package/scenes/L3_6122_D5_Markets_Shops.html +1084 -0
- package/scenes/L3_6184_D5_Markets_Shops.html +1479 -0
- package/scenes/L3_6362_D5_Markets_Shops.html +993 -0
- package/scenes/L3_6656_D6_Courtyards_Gardens.html +916 -0
- package/scenes/L3_6754_D6_Courtyards_Gardens.html +1013 -0
- package/scenes/L4_179_D1_Nature_Terrain.html +1628 -0
- package/scenes/L4_2585_D3_Towns_Plazas.html +1369 -0
- package/scenes/L4_3186_D2_Waterside_HotSprings.html +1669 -0
- package/scenes/L4_3679_D4_Travel_Transit.html +1256 -0
- package/scenes/L4_7283_D7_NightSky_DeepSea.html +1400 -0
- package/scenes/L4_7698_D8_Interiors_Workshops.html +760 -0
- package/scenes/L4_7733_D8_Interiors_Workshops.html +697 -0
- package/scenes/L5_1297_D2_Waterside_HotSprings.html +1018 -0
- package/scenes/L5_2090_D1_Nature_Terrain.html +1630 -0
- package/scenes/L5_3999_D4_Travel_Transit.html +2318 -0
- package/scenes/L5_6993_D6_Courtyards_Gardens.html +1732 -0
- package/scenes/L5_7365_D7_NightSky_DeepSea.html +1569 -0
- package/scenes/L5_7381_D7_NightSky_DeepSea.html +1779 -0
- package/scenes/L5_7874_D8_Interiors_Workshops.html +1488 -0
- package/scenes/L5_7993_D8_Interiors_Workshops.html +1367 -0
- package/scenes/catalog.json +197 -0
- package/scenes/three.module.min.js +6 -0
- package/scripts/build-scenes.mjs +184 -0
- package/scripts/check-scenes.mjs +296 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 FreemanHsu
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
Bundled third-party artwork and code
|
|
26
|
+
|
|
27
|
+
`scenes/*.html` are scene pages from the dataset "Fable-Kawaii-3D-ThreeJS"
|
|
28
|
+
(https://huggingface.co/datasets/liumindmind/Fable-Kawaii-3D-ThreeJS),
|
|
29
|
+
published under the MIT License. They are redistributed here unmodified except
|
|
30
|
+
for three.js being pinned to a local module copy, an injected ambient-mode
|
|
31
|
+
hook, and injected CSS that hides the pages' standalone caption/toolbar
|
|
32
|
+
overlays.
|
|
33
|
+
|
|
34
|
+
`scenes/three.module.min.js` is three.js r160, MIT License,
|
|
35
|
+
Copyright (c) 2010-2024 three.js authors
|
|
36
|
+
(https://github.com/mrdoob/three.js).
|
package/README.md
CHANGED
|
@@ -1,3 +1,67 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Nook · 角落小窝
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/dsh-nook)
|
|
4
|
+
|
|
5
|
+
**在对话的角落,安放一处安静的微缩风景。**
|
|
6
|
+
*A quiet little world in the corner of your conversation.*
|
|
7
|
+
|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
Nook 把一张治愈系 3D 微缩沙盘放在 DeepSeek Harness 对话面板的右下角。它不占正文的布局空间,四周用面板自己的底色做渐变,像一小块风景从白底里悄悄浮现。想细看就点一下——它 zoom out 铺满对话区;光标回到输入框,它自己缩回角落。
|
|
11
|
+
|
|
12
|
+
- **安静**:场景永远在文字下面,点一下才铺满,聚焦输入框就自动收回。
|
|
13
|
+
- **可换**:32 个场景(自然 / 水畔 / 城镇 / 旅途 / 集市 / 庭院 / 夜空 / 室内各 4 个),随机或指定,选择会记住。
|
|
14
|
+
- **可调**:画面浓度 35%–100%,淡到只剩一层颜色也行。
|
|
15
|
+
- **离线**:场景与 three.js 全部随包分发,运行时不联网。
|
|
16
|
+
|
|
17
|
+
## 安装
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
dsh plugin --profile web add dsh-nook
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
或在 **插件 → 添加插件** 里输入 `dsh-nook`。入口在输入框工具行、模型选择器左侧。
|
|
24
|
+
|
|
25
|
+
## 场景
|
|
26
|
+
|
|
27
|
+

|
|
28
|
+
|
|
29
|
+
菜单里按题材分组,点一下就固定下来,刷新也还在。
|
|
30
|
+
|
|
31
|
+
## 配置
|
|
32
|
+
|
|
33
|
+
`cordis.patch.yml` 里 `nook` 这一行的 `config`,改完重新激活插件生效:
|
|
34
|
+
|
|
35
|
+
| key | 默认 | 说明 |
|
|
36
|
+
| --- | --- | --- |
|
|
37
|
+
| `enabled` | `true` | 默认是否显示 |
|
|
38
|
+
| `scene` | `random` | `random` 或 `scenes/catalog.json` 里的场景 id |
|
|
39
|
+
| `opacity` | `1` | 画面浓度,0.35–1 |
|
|
40
|
+
| `rotateSeconds` | `0` | 每隔 N 秒随机换一个,0 为关闭 |
|
|
41
|
+
|
|
42
|
+
在界面里做过的选择优先于配置,存在浏览器本地。
|
|
43
|
+
|
|
44
|
+
## 致谢 / Thanks
|
|
45
|
+
|
|
46
|
+
- 场景素材全部来自 **[Fable-Kawaii-3D-ThreeJS](https://huggingface.co/datasets/liumindmind/Fable-Kawaii-3D-ThreeJS)**(作者 [liumindmind](https://huggingface.co/liumindmind),MIT 许可)。谢谢作者把这些安静又可爱的微缩世界开源出来——这个插件做的事情只是把它们放进对话的角落,并努力不打扰人。README 里的示例图也来自该数据集的官方预览图。
|
|
47
|
+
- [three.js](https://github.com/mrdoob/three.js) r160(MIT),随场景一起本地分发。
|
|
48
|
+
- 每个场景页只做了三处改动:three.js 指向本地副本、注入一个「定格/恢复」钩子、隐藏场景自带的说明浮层。
|
|
49
|
+
|
|
50
|
+
## 开发
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
node scripts/build-scenes.mjs # 重新抓取并生成场景
|
|
54
|
+
node --experimental-vm-modules scripts/check-scenes.mjs # 32 个场景构建自检
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
发布:改 `version` → `git tag v<version> && git push origin v<version>`,GitHub Actions 会先跑场景自检再 `npm publish --provenance`。
|
|
58
|
+
|
|
59
|
+
## English
|
|
60
|
+
|
|
61
|
+
**Nook** keeps one kawaii 3D diorama in the bottom-right corner of the DSH conversation. It takes no layout space and no clicks; its rim melts into the panel fill, so it reads as a small landscape surfacing out of the page. Click it to fill the conversation, focus the composer and it settles back on its own. 32 scenes, randomly picked or chosen by hand, with an adjustable presence; everything is vendored, so it never touches the network.
|
|
62
|
+
|
|
63
|
+
Scenes come from [Fable-Kawaii-3D-ThreeJS](https://huggingface.co/datasets/liumindmind/Fable-Kawaii-3D-ThreeJS) by liumindmind (MIT) — with thanks.
|
|
64
|
+
|
|
65
|
+
## License
|
|
66
|
+
|
|
67
|
+
MIT · scenes and preview images © the Fable-Kawaii-3D-ThreeJS authors (MIT) · three.js © three.js authors (MIT). See [LICENSE](LICENSE).
|