sa2kit 1.5.1 → 1.6.0

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.
@@ -1,5 +1,5 @@
1
1
  export { M as MmdPlaylist, f as MmdPlaylistNode, j as MmdPresetItem, h as MmdResourceOption, N as NewMmdPlaylist, g as NewMmdPlaylistNode, k as NewMmdPresetItem, i as NewMmdResourceOption, a as mmdPlaylistNodes, e as mmdPlaylistNodesRelations, m as mmdPlaylists, d as mmdPlaylistsRelations, c as mmdPresetItems, b as mmdResourceOptions } from '../../drizzle-schema-BNhqj2AZ.mjs';
2
- import { M as MMDPlaylistConfig } from '../../types-Bc_p-zAR.mjs';
2
+ import { M as MMDPlaylistConfig } from '../../types-CsTSddwu.mjs';
3
3
  import { U as UniversalFileService } from '../../UniversalFileService-CGGzYeeF.mjs';
4
4
  import { F as FileMetadata } from '../../types-CK4We_aI.mjs';
5
5
  import 'drizzle-orm';
@@ -1,5 +1,5 @@
1
1
  export { M as MmdPlaylist, f as MmdPlaylistNode, j as MmdPresetItem, h as MmdResourceOption, N as NewMmdPlaylist, g as NewMmdPlaylistNode, k as NewMmdPresetItem, i as NewMmdResourceOption, a as mmdPlaylistNodes, e as mmdPlaylistNodesRelations, m as mmdPlaylists, d as mmdPlaylistsRelations, c as mmdPresetItems, b as mmdResourceOptions } from '../../drizzle-schema-BNhqj2AZ.js';
2
- import { M as MMDPlaylistConfig } from '../../types-Bc_p-zAR.js';
2
+ import { M as MMDPlaylistConfig } from '../../types-CsTSddwu.js';
3
3
  import { U as UniversalFileService } from '../../UniversalFileService-BuHN-jrR.js';
4
4
  import { F as FileMetadata } from '../../types-CK4We_aI.js';
5
5
  import 'drizzle-orm';
@@ -12,6 +12,8 @@ interface MMDResources {
12
12
  audioPath?: string;
13
13
  /** 舞台/场景模型路径 (.pmx/.x) - 可选 */
14
14
  stageModelPath?: string;
15
+ /** 舞台/场景动作路径 (.vmd) - 可选 */
16
+ stageMotionPath?: string;
15
17
  /** 附加动作文件 - 可选 */
16
18
  additionalMotions?: string[];
17
19
  }
@@ -95,6 +97,8 @@ interface MMDPlayerBaseRef {
95
97
  isPlaying: () => boolean;
96
98
  /** 截图并返回 Base64 字符串 */
97
99
  snapshot: () => string;
100
+ /** 重置相机到初始位置 */
101
+ resetCamera: () => void;
98
102
  }
99
103
  /** 基础播放器属性 */
100
104
  interface MMDPlayerBaseProps {
@@ -119,6 +123,7 @@ interface MMDPlayerBaseProps {
119
123
  onPause?: () => void;
120
124
  onEnded?: () => void;
121
125
  onTimeUpdate?: (time: number) => void;
126
+ onCameraChange?: (isManual: boolean) => void;
122
127
  /** 样式 */
123
128
  className?: string;
124
129
  style?: React.CSSProperties;
@@ -149,6 +154,8 @@ interface MMDPlaylistNode {
149
154
  id: string;
150
155
  name: string;
151
156
  resources: MMDResources;
157
+ /** 节点特定的舞台配置(可选,覆盖全局配置) */
158
+ stage?: MMDStage;
152
159
  /** 该节点是否循环播放 */
153
160
  loop?: boolean;
154
161
  /** 预计时长(秒)- 用于进度计算 */
@@ -12,6 +12,8 @@ interface MMDResources {
12
12
  audioPath?: string;
13
13
  /** 舞台/场景模型路径 (.pmx/.x) - 可选 */
14
14
  stageModelPath?: string;
15
+ /** 舞台/场景动作路径 (.vmd) - 可选 */
16
+ stageMotionPath?: string;
15
17
  /** 附加动作文件 - 可选 */
16
18
  additionalMotions?: string[];
17
19
  }
@@ -95,6 +97,8 @@ interface MMDPlayerBaseRef {
95
97
  isPlaying: () => boolean;
96
98
  /** 截图并返回 Base64 字符串 */
97
99
  snapshot: () => string;
100
+ /** 重置相机到初始位置 */
101
+ resetCamera: () => void;
98
102
  }
99
103
  /** 基础播放器属性 */
100
104
  interface MMDPlayerBaseProps {
@@ -119,6 +123,7 @@ interface MMDPlayerBaseProps {
119
123
  onPause?: () => void;
120
124
  onEnded?: () => void;
121
125
  onTimeUpdate?: (time: number) => void;
126
+ onCameraChange?: (isManual: boolean) => void;
122
127
  /** 样式 */
123
128
  className?: string;
124
129
  style?: React.CSSProperties;
@@ -149,6 +154,8 @@ interface MMDPlaylistNode {
149
154
  id: string;
150
155
  name: string;
151
156
  resources: MMDResources;
157
+ /** 节点特定的舞台配置(可选,覆盖全局配置) */
158
+ stage?: MMDStage;
152
159
  /** 该节点是否循环播放 */
153
160
  loop?: boolean;
154
161
  /** 预计时长(秒)- 用于进度计算 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sa2kit",
3
- "version": "1.5.1",
3
+ "version": "1.6.0",
4
4
  "description": "A modern, type-safe React utility library with cross-platform support and platform adapters",
5
5
  "keywords": [
6
6
  "react",