@seayoo-web/pixi-live2d 0.1.0 → 0.1.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/dist/core-DiacFOEI.js +7111 -0
- package/dist/cubism4.es-B18JJVJM.js +3116 -0
- package/dist/index.js +7105 -4
- package/package.json +17 -17
- package/types/index.d.ts +6 -0
- package/dist/cubism4.es-lCEfB7RP.js +0 -3608
- package/dist/index-CuNStzp0.js +0 -18424
package/package.json
CHANGED
|
@@ -1,30 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seayoo-web/pixi-live2d",
|
|
3
|
+
"version": "0.1.1",
|
|
3
4
|
"description": "pixi-live2d viewer",
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"
|
|
5
|
+
"keywords": [
|
|
6
|
+
"pixi-live2d"
|
|
7
|
+
],
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"author": "web@seayoo.com",
|
|
8
10
|
"source": "./index.ts",
|
|
9
|
-
"types": "./types/index.d.ts",
|
|
10
|
-
"sideEffects": false,
|
|
11
11
|
"files": [
|
|
12
12
|
"dist",
|
|
13
13
|
"types",
|
|
14
14
|
"docs",
|
|
15
15
|
"README.md"
|
|
16
16
|
],
|
|
17
|
+
"type": "module",
|
|
18
|
+
"sideEffects": false,
|
|
19
|
+
"main": "./dist/index.js",
|
|
20
|
+
"module": "./dist/index.js",
|
|
21
|
+
"types": "./types/index.d.ts",
|
|
17
22
|
"publishConfig": {
|
|
18
23
|
"access": "public"
|
|
19
24
|
},
|
|
20
|
-
"engines": {
|
|
21
|
-
"node": ">=22"
|
|
22
|
-
},
|
|
23
|
-
"keywords": [
|
|
24
|
-
"pixi-live2d"
|
|
25
|
-
],
|
|
26
|
-
"author": "web@seayoo.com",
|
|
27
|
-
"license": "MIT",
|
|
28
25
|
"dependencies": {
|
|
29
26
|
"@pixi/constants": "6.5.2",
|
|
30
27
|
"@pixi/core": "6.5.2",
|
|
@@ -43,13 +40,16 @@
|
|
|
43
40
|
"devDependencies": {
|
|
44
41
|
"@types/node": "^22.13.1",
|
|
45
42
|
"@seayoo-web/tsconfig": "^1.0.6",
|
|
46
|
-
"@seayoo-web/utils": "^4.
|
|
43
|
+
"@seayoo-web/utils": "^4.5.2"
|
|
44
|
+
},
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=22"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
49
49
|
"build": "vite build && tsc --build --force --emitDeclarationOnly",
|
|
50
50
|
"type-check": "tsc --noEmit",
|
|
51
|
-
"lint": "
|
|
52
|
-
"lint:fix": "
|
|
51
|
+
"lint": "oxlint -c ../../oxlint.config.mjs",
|
|
52
|
+
"lint:fix": "oxlint -c ../../oxlint.config.mjs --fix",
|
|
53
53
|
"prepublish": "pnpm lint:fix && pnpm build",
|
|
54
54
|
"test": "vitest --dom",
|
|
55
55
|
"coverage": "vitest run --coverage"
|
package/types/index.d.ts
CHANGED
|
@@ -36,6 +36,8 @@ export interface Live2DViewerOptions {
|
|
|
36
36
|
onModelError?: (error: Error) => void;
|
|
37
37
|
}
|
|
38
38
|
export declare class Live2DViewer {
|
|
39
|
+
/** 单例 PIXI 应用 */
|
|
40
|
+
static sharedApp: PIXI.Application | null;
|
|
39
41
|
/** 引擎加载状态 Promise,用于确保全局只加载一次 Core 库 */
|
|
40
42
|
private static coreLoadingPromise;
|
|
41
43
|
/**
|
|
@@ -43,6 +45,10 @@ export declare class Live2DViewer {
|
|
|
43
45
|
* @param url - Core 库的 URL 地址
|
|
44
46
|
*/
|
|
45
47
|
static loadCubismCore(url?: string): Promise<void>;
|
|
48
|
+
/** 最新发起的加载任务 token,防频繁加载的竞态泄漏 */
|
|
49
|
+
private static loadingToken;
|
|
50
|
+
/** 整个页面生命周期内 Cubism 渲染管线是否已完成首次预热 */
|
|
51
|
+
private static hasWarmedUp;
|
|
46
52
|
/** PIXI 应用实例 */
|
|
47
53
|
app: PIXI.Application;
|
|
48
54
|
/** Live2D 模型实例 */
|