@lrplrplrp/dsh-live2d 0.1.3 → 0.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.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  **在 DeepSeek Harness Web GUI 中渲染可拖动的 Live2D 模型,由 DSH 真实工作状态实时驱动动画,并支持眼睛跟随鼠标。**
4
4
 
5
- [English](README_EN.md) · [GitHub](https://github.com/lrplrplrp/dsh-live2d)
5
+ [English](README_EN.md) · [GitHub](https://github.com/lrplrplrp/dsh-live2d) · [![Awesome DSH Plugin](https://awesome-dsh-plugin.com/badge.svg)](https://awesome-dsh-plugin.com)
6
6
 
7
7
  ![预览图](https://raw.githubusercontent.com/lrplrplrp/dsh-live2d/main/docs/preview.png)
8
8
 
@@ -95,6 +95,37 @@ dsh web
95
95
  - **pixi-live2d-display** — Live2D Cubism SDK for Web(含 `model.focus` 视线跟随)
96
96
  - **DSH 插件系统** — `window.__ModuleLoader__` + `ctx.slots` + `webServer` SSE
97
97
 
98
+ ## 开发与源码结构
99
+
100
+ host 端只读取**单个** `lib/client.js` 原样投递给浏览器(无打包器,客户端 `require`
101
+ 无法加载本地文件)。因此客户端源码按功能拆分在 `lib/src/`,由构建脚本拼接生成
102
+ 投放产物:
103
+
104
+ ```
105
+ lib/
106
+ index.js # host 端(Node ESM)
107
+ shared/states.js # DSH 状态常量单一来源(host import,client 构建时内联)
108
+ src/ # 客户端源码分片(按文件名前缀顺序拼接)
109
+ 00-header.js # 文件头 + window.__ModuleLoader__ 包装 + React
110
+ 10-config.js # 常量、默认配置、localStorage 持久化
111
+ 20-libs.js # 本地库加载 + 音频解锁
112
+ 30-css.js # CSS 注入
113
+ 40-engine.js # Live2DEngine(渲染/动画/时间映射/点击命中)
114
+ 50-drag.js # 拖动与画布大小控制手柄
115
+ 60-state.js # DSH 状态订阅(SSE + 轮询兜底)
116
+ 70-widget.js # 主组件(画布悬浮控制图标等)
117
+ 80-settings.js # 设置页
118
+ 90-apply.js # 插件入口(slot 注入)
119
+ client.js # ⚠️ 构建产物,请勿直接编辑
120
+ ```
121
+
122
+ 修改源码后必须重新构建:
123
+
124
+ ```bash
125
+ npm run build # 生成 lib/client.js
126
+ npm run check # 校验产物与源码一致 + 语法检查
127
+ ```
128
+
98
129
  ## License
99
130
 
100
131
  MIT