@seayoo-web/pixi-live2d 0.0.1 → 0.0.2

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/index.js CHANGED
@@ -21706,9 +21706,10 @@ class Th {
21706
21706
  * 播放指定分组的动作
21707
21707
  * @param group - 动作分组名称
21708
21708
  * @param no - 动作编号
21709
+ * @param priority - 动作优先级,默认值为 1
21709
21710
  */
21710
- startMotion(e, r) {
21711
- return this.model?.motion(e, r);
21711
+ startMotion(e, r, i = 1) {
21712
+ return this.model?.motion(e, r, i);
21712
21713
  }
21713
21714
  /**
21714
21715
  * 播放指定表情
@@ -21738,5 +21739,6 @@ function JT(t) {
21738
21739
  return t instanceof Error ? t : new Error(String(t));
21739
21740
  }
21740
21741
  export {
21741
- Th as Live2DViewer
21742
+ Th as Live2DViewer,
21743
+ Oa as MotionPriority
21742
21744
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@seayoo-web/pixi-live2d",
3
3
  "description": "pixi-live2d viewer",
4
- "version": "0.0.1",
4
+ "version": "0.0.2",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
@@ -42,8 +42,8 @@
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/node": "^22.13.1",
45
- "@seayoo-web/tsconfig": "^1.0.6",
46
- "@seayoo-web/utils": "^4.4.1"
45
+ "@seayoo-web/utils": "^4.4.1",
46
+ "@seayoo-web/tsconfig": "^1.0.6"
47
47
  },
48
48
  "scripts": {
49
49
  "build": "vite build && tsc --build --force --emitDeclarationOnly",
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { InternalModel, Live2DModel } from "pixi-live2d-display/cubism4";
1
+ import { InternalModel, Live2DModel, MotionPriority } from "pixi-live2d-display/cubism4";
2
2
  import * as PIXI from "pixi.js";
3
3
  declare global {
4
4
  interface Window {
@@ -28,6 +28,7 @@ export interface Live2DViewerOptions {
28
28
  /** 模型加载失败的回调函数 */
29
29
  onModelError?: (error: Error) => void;
30
30
  }
31
+ export { MotionPriority };
31
32
  export declare class Live2DViewer {
32
33
  /** 引擎加载状态 Promise,用于确保全局只加载一次 Core 库 */
33
34
  private static coreLoadingPromise;
@@ -71,8 +72,9 @@ export declare class Live2DViewer {
71
72
  * 播放指定分组的动作
72
73
  * @param group - 动作分组名称
73
74
  * @param no - 动作编号
75
+ * @param priority - 动作优先级,默认值为 1
74
76
  */
75
- startMotion(group: string, no: number): Promise<boolean> | undefined;
77
+ startMotion(group: string, no: number, priority?: MotionPriority): Promise<boolean> | undefined;
76
78
  /**
77
79
  * 播放指定表情
78
80
  * @param name - 表情名称或索引