dsh-pet-live2d 2.0.0 → 2.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # 更新日志
2
2
 
3
+ ## 2.0.1
4
+
5
+ **只改文档。** README 里"必须自备 Cubism Core"的说法早就过时了 —— 插件第一次用到它时会由
6
+ 宿主半区去 [Live2D 官方 CDN](https://cubism.live2d.com/sdk-web/cubismcore/live2dcubismcore.min.js)
7
+ 取一份(校验后缓存到 `%DSH_HOME%\pets\.runtime\`),之后离线也能用;
8
+ **只有访问不了外网的机器才需要手动放一份**。2.0.0 的说明还写着"必须自备",会让人白折腾一趟。
9
+
3
10
  ## 2.0.0
4
11
 
5
12
  设置界面、摸鱼机制、动作与表情的合成方式都动过一轮,所以是 2.0.0。**升级后建议看一眼
package/README.md CHANGED
@@ -34,11 +34,16 @@ git clone https://github.com/A8Chann/dsh-pet-live2d
34
34
  dsh plugin --profile web add "link:./dsh-pet-live2d/dsh-live2d-pet"
35
35
  ```
36
36
 
37
- ### 必须自备 Cubism Core
37
+ ### Cubism Core:不用手动装
38
38
 
39
- `live2dcubismcore.min.js` 是 Live2D 株式会社的**专有运行时**,不能随插件分发。
40
- 去 [Live2D 官网](https://www.live2d.com/sdk/cubism/) 下载 Cubism SDK for Web,把
41
- `Core/live2dcubismcore.min.js` 放到 `%DSH_HOME%\pets\.runtime\live2dcubismcore.min.js`。
39
+ `live2dcubismcore.min.js` 是 Live2D 株式会社的**专有运行时**,不能随插件分发 —— 但**你也不
40
+ 用自己去找**:插件第一次用到它时,宿主半区会去
41
+ [Live2D 官方 CDN](https://cubism.live2d.com/sdk-web/cubismcore/live2dcubismcore.min.js) 取一份
42
+ (校验过再发出去),并缓存到 `%DSH_HOME%\pets\.runtime\live2dcubismcore.min.js`,之后离线也能用。
43
+
44
+ 只有当这台机器**访问不了外网**时,才需要手动下载
45
+ [Cubism SDK for Web](https://www.live2d.com/sdk/cubism/)、把 `Core/live2dcubismcore.min.js`
46
+ 放到上面那个路径。
42
47
 
43
48
  ### 宠物:随包自带
44
49
 
@@ -203,7 +208,7 @@ dsh plugin --profile web add "link:./dsh-pet-live2d/dsh-live2d-pet"
203
208
  |---|---|---|
204
209
  | GET | `/api/live2d-pet/catalog` | 已安装宠物 + 各自的动作/表情清单 + 运行时 URL |
205
210
  | GET | `/api/live2d-pet/asset/<id>/<path>` | 只服务 `model3.json` **引用闭包**内的文件(白名单 Set 比对 + realpath 包含,`..` 永远匹配不上) |
206
- | GET | `/api/live2d-pet/runtime/live2dcubismcore.min.js` | 用户自备的 Cubism Core |
211
+ | GET | `/api/live2d-pet/runtime/live2dcubismcore.min.js` | Cubism Core:本地有就发本地的,没有就去 Live2D 官方 CDN 取一份并缓存(`x-live2d-core-source: cdn`);两边都拿不到才 502 |
207
212
  | GET | `/api/live2d-pet/runtime/live2d-vendor.js` | 插件内置的 MIT vendor 分包(pixi.js + 引擎),按需懒加载 |
208
213
 
209
214
  API 与资产路由默认只答本机回环请求。
@@ -251,7 +256,7 @@ cd ../../tools/browser-test && npm install && npm run suite
251
256
 
252
257
  - 插件代码:MIT
253
258
  - vendor 分包:pixi.js(MIT)+ untitled-pixi-live2d-engine(MIT),可随包分发
254
- - Cubism Core:Live2D 专有,**用户自备,本插件不内置**
259
+ - Cubism Core:Live2D 专有,**不随包分发**;缺失时由宿主半区从 Live2D 官方 CDN 取一份并缓存到本地
255
260
  - DS鲸鱼娘模型:**CC BY-NC-SA 4.0**(署名 · **非商业** · 相同方式共享),见
256
261
  [`pets/ds-whale-girl/LICENSE`](pets/ds-whale-girl/LICENSE)。
257
262
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-pet-live2d",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Live2D 桌宠插件:为 DSH Web GUI 挂一只可拖动、会跟随鼠标、能换动作与表情的 Live2D 宠物。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",