cortico-world-extra-actions 0.3.19 → 0.3.20
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/package.json +1 -1
- package/src/online.js +3 -0
- package/src/world.js +2 -2
- package/tools/_tmp-download/data/shenshen-library/actions/core/cheer-hop/action.json +1 -0
- package/tools/_tmp-download/data/shenshen-library/actions/core/cheer-hop/anim.webp +1 -0
- package/tools/_tmp-download/data/shenshen-library/actions/eat/eat-dumplings/action.json +1 -0
- package/tools/_tmp-download/data/shenshen-library/actions/eat/eat-dumplings/anim.webp +1 -0
package/package.json
CHANGED
package/src/online.js
CHANGED
|
@@ -19,6 +19,9 @@ export const DEFAULT_REMOTE = '';
|
|
|
19
19
|
const MAX_LIBRARY_BYTES = 800 * 1024 * 1024; // 完整库上限
|
|
20
20
|
const MAX_ACTION_BYTES = 32 * 1024 * 1024; // 单个动作上限
|
|
21
21
|
/** 没配 remoteBase 时的兜底:GitHub Release 上的完整库(国内可能慢,但不至于完全没有)。 */
|
|
22
|
+
/** 单段动作的兜底地址:GitHub Release 上的扁平资产 `<id>.zip`(Gitee 建好后用 remoteActionBase 覆盖)。 */
|
|
23
|
+
export const FALLBACK_ACTION_BASE = 'https://github.com/MOYU-AI-Lab/cortico-world-extra-actions/releases/download/per-action';
|
|
24
|
+
|
|
22
25
|
export const FALLBACK_LIBRARY = 'https://github.com/MOYU-AI-Lab/cortico-world-extra-actions/releases/download/library/shenshen-action-library.zip';
|
|
23
26
|
/** 只收这些条目:动作库的两种格式(帧序列 / 单文件动画)。 */
|
|
24
27
|
const WANT = /(^|\/)actions\/[a-z][a-z0-9-]*\/[a-z0-9][a-z0-9-]*\/(action\.json|anim\.webp|preview\.webp|f_\d{4}\.webp)$/;
|
package/src/world.js
CHANGED
|
@@ -14,7 +14,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
14
14
|
import { EXTRA_DIR, clear, inspect, isInside, packLooksSupported, prunePack, readExtra, removeOne, save } from './writer.js';
|
|
15
15
|
import { addModules, rebuildIndex, scanLibrary } from './importer.js';
|
|
16
16
|
import { ensureStarter, installStarterLibrary, libraryHealth, restorePack, safePackName } from './starter.js';
|
|
17
|
-
import { FALLBACK_LIBRARY, actionUrl, flatActionUrl, installAction, installLibrary, libraryUrl } from './online.js';
|
|
17
|
+
import { FALLBACK_ACTION_BASE, FALLBACK_LIBRARY, actionUrl, flatActionUrl, installAction, installLibrary, libraryUrl } from './online.js';
|
|
18
18
|
import { petFigures, petState } from './pet.js';
|
|
19
19
|
|
|
20
20
|
const ID = 'extra-actions';
|
|
@@ -515,7 +515,7 @@ export class ExtraActionsWorld {
|
|
|
515
515
|
remoteActionBase() {
|
|
516
516
|
const c = this.ctx.cfg && typeof this.ctx.cfg === 'object' ? this.ctx.cfg : {};
|
|
517
517
|
const pick = (v) => (typeof v === 'string' && v.trim() ? v.trim().replace(/\/+$/, '') : '');
|
|
518
|
-
return pick(c.remoteActionBase) ||
|
|
518
|
+
return pick(c.remoteActionBase) || FALLBACK_ACTION_BASE;
|
|
519
519
|
}
|
|
520
520
|
|
|
521
521
|
/** 面板需要知道:完整库从哪下、能不能单个下。 */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"cheer-hop","category":"core","word":"cheer-hop","zh":"cheer-hop","say":"cheer-hop","clip":"actions/core/cheer-hop","frames":1,"fps":24,"seconds":1,"anim":true}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
RIFFxxxxWEBPVP8
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"eat-dumplings","category":"eat","word":"eat-dumplings","zh":"eat-dumplings","say":"eat-dumplings","clip":"actions/eat/eat-dumplings","frames":1,"fps":24,"seconds":1,"anim":true}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
RIFFxxxxWEBPVP8
|