sa2kit 1.6.8 → 1.6.10

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.
Files changed (125) hide show
  1. package/dist/calendar/index.js +10 -8
  2. package/dist/calendar/index.js.map +1 -1
  3. package/dist/calendar/index.mjs +3 -1
  4. package/dist/calendar/index.mjs.map +1 -1
  5. package/dist/calendar/routes/index.js +21 -21
  6. package/dist/calendar/routes/index.mjs +1 -1
  7. package/dist/calendar/server.js +13 -13
  8. package/dist/calendar/server.mjs +2 -2
  9. package/dist/{chunk-VHU2YGRQ.mjs → chunk-4FOBBWXW.mjs} +25 -11
  10. package/dist/chunk-4FOBBWXW.mjs.map +1 -0
  11. package/dist/{chunk-ZDRBMSTS.js → chunk-G6WRJ2H2.js} +25 -11
  12. package/dist/chunk-G6WRJ2H2.js.map +1 -0
  13. package/dist/{chunk-6WXOA4BE.mjs → chunk-GVVS4IMM.mjs} +2 -2
  14. package/dist/chunk-GVVS4IMM.mjs.map +1 -0
  15. package/dist/{chunk-AXP7KROR.js → chunk-WC5QFO3T.js} +2 -2
  16. package/dist/chunk-WC5QFO3T.js.map +1 -0
  17. package/dist/index.js +5 -5
  18. package/dist/index.js.map +1 -1
  19. package/dist/index.mjs +2 -2
  20. package/dist/index.mjs.map +1 -1
  21. package/package.json +41 -7
  22. package/dist/ConfigService-BxK06xP6.d.mts +0 -262
  23. package/dist/ConfigService-BxK06xP6.d.ts +0 -262
  24. package/dist/UniversalFileService-BuHN-jrR.d.ts +0 -515
  25. package/dist/UniversalFileService-CGGzYeeF.d.mts +0 -515
  26. package/dist/analytics/index.d.mts +0 -1084
  27. package/dist/analytics/index.d.ts +0 -1084
  28. package/dist/analytics/server/index.d.mts +0 -499
  29. package/dist/analytics/server/index.d.ts +0 -499
  30. package/dist/api/index.d.mts +0 -248
  31. package/dist/api/index.d.ts +0 -248
  32. package/dist/audioDetection/index.d.mts +0 -449
  33. package/dist/audioDetection/index.d.ts +0 -449
  34. package/dist/auth/client/index.d.mts +0 -153
  35. package/dist/auth/client/index.d.ts +0 -153
  36. package/dist/auth/components/index.d.mts +0 -227
  37. package/dist/auth/components/index.d.ts +0 -227
  38. package/dist/auth/hooks/index.d.mts +0 -31
  39. package/dist/auth/hooks/index.d.ts +0 -31
  40. package/dist/auth/index.d.mts +0 -40
  41. package/dist/auth/index.d.ts +0 -40
  42. package/dist/auth/middleware/index.d.mts +0 -75
  43. package/dist/auth/middleware/index.d.ts +0 -75
  44. package/dist/auth/routes/index.d.mts +0 -261
  45. package/dist/auth/routes/index.d.ts +0 -261
  46. package/dist/auth/schema/index.d.mts +0 -789
  47. package/dist/auth/schema/index.d.ts +0 -789
  48. package/dist/auth/services/index.d.mts +0 -48
  49. package/dist/auth/services/index.d.ts +0 -48
  50. package/dist/calendar/index.d.mts +0 -1197
  51. package/dist/calendar/index.d.ts +0 -1197
  52. package/dist/calendar/routes/index.d.mts +0 -118
  53. package/dist/calendar/routes/index.d.ts +0 -118
  54. package/dist/calendar/server.d.mts +0 -1184
  55. package/dist/calendar/server.d.ts +0 -1184
  56. package/dist/chunk-6WXOA4BE.mjs.map +0 -1
  57. package/dist/chunk-AXP7KROR.js.map +0 -1
  58. package/dist/chunk-VHU2YGRQ.mjs.map +0 -1
  59. package/dist/chunk-ZDRBMSTS.js.map +0 -1
  60. package/dist/config/index.d.mts +0 -64
  61. package/dist/config/index.d.ts +0 -64
  62. package/dist/config/server/index.d.mts +0 -1533
  63. package/dist/config/server/index.d.ts +0 -1533
  64. package/dist/drizzle-auth-service-Bxlovhv8.d.ts +0 -145
  65. package/dist/drizzle-auth-service-DZY2F1sv.d.mts +0 -145
  66. package/dist/drizzle-schema-BNhqj2AZ.d.mts +0 -1114
  67. package/dist/drizzle-schema-BNhqj2AZ.d.ts +0 -1114
  68. package/dist/enums-Dume-V5Y.d.mts +0 -16
  69. package/dist/enums-Dume-V5Y.d.ts +0 -16
  70. package/dist/i18n/index.d.mts +0 -417
  71. package/dist/i18n/index.d.ts +0 -417
  72. package/dist/imageCrop/index.d.mts +0 -165
  73. package/dist/imageCrop/index.d.ts +0 -165
  74. package/dist/index-DSel44Ke.d.mts +0 -93
  75. package/dist/index-DSel44Ke.d.ts +0 -93
  76. package/dist/index.d.mts +0 -693
  77. package/dist/index.d.ts +0 -693
  78. package/dist/logger/index.d.mts +0 -125
  79. package/dist/logger/index.d.ts +0 -125
  80. package/dist/mmd/admin/index.d.mts +0 -487
  81. package/dist/mmd/admin/index.d.ts +0 -487
  82. package/dist/mmd/index.d.mts +0 -599
  83. package/dist/mmd/index.d.ts +0 -599
  84. package/dist/mmd/server/index.d.mts +0 -138
  85. package/dist/mmd/server/index.d.ts +0 -138
  86. package/dist/music/index.d.mts +0 -74
  87. package/dist/music/index.d.ts +0 -74
  88. package/dist/music/server/index.d.mts +0 -1
  89. package/dist/music/server/index.d.ts +0 -1
  90. package/dist/request/index.d.mts +0 -51
  91. package/dist/request/index.d.ts +0 -51
  92. package/dist/storage/index.d.mts +0 -75
  93. package/dist/storage/index.d.ts +0 -75
  94. package/dist/testYourself/admin/index.d.mts +0 -58
  95. package/dist/testYourself/admin/index.d.ts +0 -58
  96. package/dist/testYourself/index.d.mts +0 -53
  97. package/dist/testYourself/index.d.ts +0 -53
  98. package/dist/testYourself/server/index.d.mts +0 -1029
  99. package/dist/testYourself/server/index.d.ts +0 -1029
  100. package/dist/types-B60F7EZZ.d.mts +0 -248
  101. package/dist/types-B60F7EZZ.d.ts +0 -248
  102. package/dist/types-BINlP9MK.d.mts +0 -286
  103. package/dist/types-BINlP9MK.d.ts +0 -286
  104. package/dist/types-BaZccpvk.d.mts +0 -48
  105. package/dist/types-BaZccpvk.d.ts +0 -48
  106. package/dist/types-CK4We_aI.d.mts +0 -270
  107. package/dist/types-CK4We_aI.d.ts +0 -270
  108. package/dist/types-CbTsi9CZ.d.mts +0 -31
  109. package/dist/types-CbTsi9CZ.d.ts +0 -31
  110. package/dist/types-CroexXnI.d.ts +0 -99
  111. package/dist/types-DmsXCWvm.d.mts +0 -99
  112. package/dist/types-Dt0oqeFM.d.mts +0 -70
  113. package/dist/types-zK6kDzDQ.d.ts +0 -70
  114. package/dist/universalExport/index.d.mts +0 -235
  115. package/dist/universalExport/index.d.ts +0 -235
  116. package/dist/universalExport/server/index.d.mts +0 -1270
  117. package/dist/universalExport/server/index.d.ts +0 -1270
  118. package/dist/universalFile/index.d.mts +0 -480
  119. package/dist/universalFile/index.d.ts +0 -480
  120. package/dist/universalFile/server/index.d.mts +0 -4516
  121. package/dist/universalFile/server/index.d.ts +0 -4516
  122. package/dist/useElectronStorage-Dj0rcorG.d.mts +0 -65
  123. package/dist/useElectronStorage-DwnNfIhl.d.ts +0 -65
  124. package/dist/utils/index.d.mts +0 -192
  125. package/dist/utils/index.d.ts +0 -192
@@ -1,248 +0,0 @@
1
- import { Vector3 } from 'three';
2
-
3
- /** MMD 资源配置 */
4
- interface MMDResources {
5
- /** 模型文件路径 (.pmx/.pmd) */
6
- modelPath: string;
7
- /** 动作文件路径 (.vmd) - 可选 */
8
- motionPath?: string;
9
- /** 相机动画路径 (.vmd) - 可选 */
10
- cameraPath?: string;
11
- /** 音频文件路径 - 可选 */
12
- audioPath?: string;
13
- /** 舞台/场景模型路径 (.pmx/.x) - 可选 */
14
- stageModelPath?: string | string[];
15
- /** 舞台/场景动作路径 (.vmd) - 可选 */
16
- stageMotionPath?: string;
17
- /** 附加动作文件 - 可选 */
18
- additionalMotions?: string[];
19
- }
20
- /** 资源列表项 - 用于预设切换 */
21
- interface MMDResourceItem {
22
- id: string;
23
- name: string;
24
- resources: MMDResources;
25
- thumbnail?: string;
26
- description?: string;
27
- }
28
- /** 资源选项 - 用于自由组合 */
29
- interface ResourceOption {
30
- id: string;
31
- name: string;
32
- path: string;
33
- thumbnail?: string;
34
- }
35
- interface MMDResourceOptions {
36
- models: ResourceOption[];
37
- motions: ResourceOption[];
38
- cameras?: ResourceOption[];
39
- audios?: ResourceOption[];
40
- stages?: ResourceOption[];
41
- }
42
- /** 舞台/场景配置 */
43
- interface MMDStage {
44
- /** 背景颜色 */
45
- backgroundColor?: string;
46
- /** 背景图片 URL */
47
- backgroundImage?: string;
48
- /** 是否启用物理模拟 (默认 true) */
49
- enablePhysics?: boolean;
50
- /** 物理引擎路径 (ammo.wasm.js 的路径) */
51
- physicsPath?: string;
52
- /** 是否启用阴影 (默认 true) */
53
- enableShadow?: boolean;
54
- /** 环境光强度 (默认 0.5) */
55
- ambientLightIntensity?: number;
56
- /** 方向光强度 (默认 0.8) */
57
- directionalLightIntensity?: number;
58
- /** 相机初始位置 */
59
- cameraPosition?: {
60
- x: number;
61
- y: number;
62
- z: number;
63
- } | Vector3;
64
- /** 相机目标点 */
65
- cameraTarget?: {
66
- x: number;
67
- y: number;
68
- z: number;
69
- } | Vector3;
70
- /** 渲染特效模式 (默认 'default') */
71
- renderEffect?: 'default' | 'outline' | 'bloom' | 'outline+bloom';
72
- /** 描边效果配置 */
73
- outlineOptions?: OutlineOptions;
74
- /** 辉光效果配置 */
75
- bloomOptions?: BloomOptions;
76
- /** 三渲二(Toon)效果配置 */
77
- toonOptions?: ToonOptions;
78
- }
79
- /** 三渲二(Toon)效果配置 */
80
- interface ToonOptions {
81
- /** 是否启用增强三渲二 (默认 false) */
82
- enabled?: boolean;
83
- /** 是否强制使用硬色阶 (默认 false) */
84
- forceHardShading?: boolean;
85
- /** 材质光泽度 (默认 0, 越小越有 2D 感) */
86
- shininess?: number;
87
- /** 是否启用边缘光 (Rim Light) */
88
- rimLight?: boolean;
89
- }
90
- /** 移动端优化配置 */
91
- interface MobileOptimization {
92
- /** 是否启用优化 (默认 true) */
93
- enabled: boolean;
94
- /** 像素比 (默认 1.0, 桌面端通常为 window.devicePixelRatio) */
95
- pixelRatio?: number;
96
- /** 是否强制关闭物理引擎 (默认 false) */
97
- disablePhysics?: boolean;
98
- /** 是否降低阴影质量 (默认 true) */
99
- reduceShadowQuality?: boolean;
100
- }
101
- /** 描边效果配置 */
102
- interface OutlineOptions {
103
- /** 是否启用描边 (默认 false) */
104
- enabled?: boolean;
105
- /** 描边粗细 (默认 0.003) */
106
- thickness?: number;
107
- /** 描边颜色 (默认 '#000000') */
108
- color?: string;
109
- }
110
- /** 辉光效果配置 */
111
- interface BloomOptions {
112
- /** 是否启用辉光 (默认 false) */
113
- enabled?: boolean;
114
- /** 辉光强度 (默认 1.0) */
115
- strength?: number;
116
- /** 辉光半径 (默认 0.4) */
117
- radius?: number;
118
- /** 辉光阈值 (默认 0.8) */
119
- threshold?: number;
120
- }
121
- /** MMDPlayerBase Ref 接口 */
122
- interface MMDPlayerBaseRef {
123
- /** 开始播放 */
124
- play: () => void;
125
- /** 暂停播放 */
126
- pause: () => void;
127
- /** 停止播放 (重置到开头) */
128
- stop: () => void;
129
- /** 跳转到指定时间 (秒) */
130
- seek: (time: number) => void;
131
- /** 获取当前播放时间 */
132
- getCurrentTime: () => number;
133
- /** 获取总时长 */
134
- getDuration: () => number;
135
- /** 获取播放状态 */
136
- isPlaying: () => boolean;
137
- /** 截图并返回 Base64 字符串 */
138
- snapshot: () => string;
139
- /** 重置相机到初始位置 */
140
- resetCamera: () => void;
141
- }
142
- /** 基础播放器属性 */
143
- interface MMDPlayerBaseProps {
144
- /** 资源配置 */
145
- resources: MMDResources;
146
- /** 舞台配置 */
147
- stage?: MMDStage;
148
- /** 移动端优化配置 */
149
- mobileOptimization?: MobileOptimization;
150
- /** 播放控制 */
151
- autoPlay?: boolean;
152
- loop?: boolean;
153
- volume?: number;
154
- muted?: boolean;
155
- /** 调试与辅助 */
156
- showAxes?: boolean;
157
- /** 渲染特效配置 */
158
- renderEffect?: 'default' | 'outline' | 'bloom' | 'outline+bloom';
159
- /** 描边效果配置 */
160
- outlineOptions?: OutlineOptions;
161
- /** 辉光效果配置 */
162
- bloomOptions?: BloomOptions;
163
- /** 三渲二(Toon)效果配置 */
164
- toonOptions?: ToonOptions;
165
- /** 事件回调 */
166
- onLoad?: () => void;
167
- onLoadProgress?: (progress: number, item: string) => void;
168
- onError?: (error: Error) => void;
169
- onPlay?: () => void;
170
- onPause?: () => void;
171
- onEnded?: () => void;
172
- onTimeUpdate?: (time: number) => void;
173
- onCameraChange?: (isManual: boolean) => void;
174
- /** 样式 */
175
- className?: string;
176
- style?: React.CSSProperties;
177
- }
178
- /** 增强播放器属性 */
179
- interface MMDPlayerEnhancedProps extends Omit<MMDPlayerBaseProps, 'resources'> {
180
- /** 单一资源模式 */
181
- resources?: MMDResources;
182
- /** 列表模式资源 */
183
- resourcesList?: MMDResourceItem[];
184
- /** 自由组合模式选项 */
185
- resourceOptions?: MMDResourceOptions;
186
- /** 列表模式下的默认 ID */
187
- defaultResourceId?: string;
188
- /** 自由组合模式下的默认选择 */
189
- defaultSelection?: {
190
- modelId?: string;
191
- motionId?: string;
192
- cameraId?: string;
193
- audioId?: string;
194
- stageId?: string;
195
- };
196
- /** 是否显示调试信息面板 */
197
- showDebugInfo?: boolean;
198
- }
199
- /** 播放列表节点 */
200
- interface MMDPlaylistNode {
201
- id: string;
202
- name: string;
203
- resources: MMDResources;
204
- /** 节点特定的舞台配置(可选,覆盖全局配置) */
205
- stage?: MMDStage;
206
- /** 该节点是否循环播放 */
207
- loop?: boolean;
208
- /** 预计时长(秒)- 用于进度计算 */
209
- duration?: number;
210
- /** 缩略图 */
211
- thumbnail?: string;
212
- }
213
- /** 播放列表配置 */
214
- interface MMDPlaylistConfig {
215
- id: string;
216
- name: string;
217
- nodes: MMDPlaylistNode[];
218
- /** 整个播放列表是否循环 */
219
- loop?: boolean;
220
- /** 预加载策略
221
- * - 'none': 不预加载 (默认)
222
- * - 'next': 预加载下一个节点
223
- * - 'all': 预加载所有节点
224
- */
225
- preload?: 'none' | 'next' | 'all';
226
- /** 是否自动播放 */
227
- autoPlay?: boolean;
228
- }
229
- /** 播放列表组件属性 */
230
- interface MMDPlaylistProps {
231
- /** 播放列表配置 */
232
- playlist: MMDPlaylistConfig;
233
- /** 舞台配置 */
234
- stage?: MMDStage;
235
- /** 移动端优化配置 */
236
- mobileOptimization?: MobileOptimization;
237
- /** 事件回调 */
238
- onNodeChange?: (node: MMDPlaylistNode, index: number) => void;
239
- onPlaylistComplete?: () => void;
240
- onError?: (error: Error) => void;
241
- /** 是否显示调试信息面板 */
242
- showDebugInfo?: boolean;
243
- /** 样式 */
244
- className?: string;
245
- style?: React.CSSProperties;
246
- }
247
-
248
- export type { BloomOptions as B, MMDPlaylistConfig as M, OutlineOptions as O, ResourceOption as R, ToonOptions as T, MMDResourceItem as a, MMDPlaylistNode as b, MMDResourceOptions as c, MMDResources as d, MMDPlayerBaseProps as e, MMDPlayerBaseRef as f, MMDPlayerEnhancedProps as g, MMDPlaylistProps as h, MMDStage as i, MobileOptimization as j };
@@ -1,248 +0,0 @@
1
- import { Vector3 } from 'three';
2
-
3
- /** MMD 资源配置 */
4
- interface MMDResources {
5
- /** 模型文件路径 (.pmx/.pmd) */
6
- modelPath: string;
7
- /** 动作文件路径 (.vmd) - 可选 */
8
- motionPath?: string;
9
- /** 相机动画路径 (.vmd) - 可选 */
10
- cameraPath?: string;
11
- /** 音频文件路径 - 可选 */
12
- audioPath?: string;
13
- /** 舞台/场景模型路径 (.pmx/.x) - 可选 */
14
- stageModelPath?: string | string[];
15
- /** 舞台/场景动作路径 (.vmd) - 可选 */
16
- stageMotionPath?: string;
17
- /** 附加动作文件 - 可选 */
18
- additionalMotions?: string[];
19
- }
20
- /** 资源列表项 - 用于预设切换 */
21
- interface MMDResourceItem {
22
- id: string;
23
- name: string;
24
- resources: MMDResources;
25
- thumbnail?: string;
26
- description?: string;
27
- }
28
- /** 资源选项 - 用于自由组合 */
29
- interface ResourceOption {
30
- id: string;
31
- name: string;
32
- path: string;
33
- thumbnail?: string;
34
- }
35
- interface MMDResourceOptions {
36
- models: ResourceOption[];
37
- motions: ResourceOption[];
38
- cameras?: ResourceOption[];
39
- audios?: ResourceOption[];
40
- stages?: ResourceOption[];
41
- }
42
- /** 舞台/场景配置 */
43
- interface MMDStage {
44
- /** 背景颜色 */
45
- backgroundColor?: string;
46
- /** 背景图片 URL */
47
- backgroundImage?: string;
48
- /** 是否启用物理模拟 (默认 true) */
49
- enablePhysics?: boolean;
50
- /** 物理引擎路径 (ammo.wasm.js 的路径) */
51
- physicsPath?: string;
52
- /** 是否启用阴影 (默认 true) */
53
- enableShadow?: boolean;
54
- /** 环境光强度 (默认 0.5) */
55
- ambientLightIntensity?: number;
56
- /** 方向光强度 (默认 0.8) */
57
- directionalLightIntensity?: number;
58
- /** 相机初始位置 */
59
- cameraPosition?: {
60
- x: number;
61
- y: number;
62
- z: number;
63
- } | Vector3;
64
- /** 相机目标点 */
65
- cameraTarget?: {
66
- x: number;
67
- y: number;
68
- z: number;
69
- } | Vector3;
70
- /** 渲染特效模式 (默认 'default') */
71
- renderEffect?: 'default' | 'outline' | 'bloom' | 'outline+bloom';
72
- /** 描边效果配置 */
73
- outlineOptions?: OutlineOptions;
74
- /** 辉光效果配置 */
75
- bloomOptions?: BloomOptions;
76
- /** 三渲二(Toon)效果配置 */
77
- toonOptions?: ToonOptions;
78
- }
79
- /** 三渲二(Toon)效果配置 */
80
- interface ToonOptions {
81
- /** 是否启用增强三渲二 (默认 false) */
82
- enabled?: boolean;
83
- /** 是否强制使用硬色阶 (默认 false) */
84
- forceHardShading?: boolean;
85
- /** 材质光泽度 (默认 0, 越小越有 2D 感) */
86
- shininess?: number;
87
- /** 是否启用边缘光 (Rim Light) */
88
- rimLight?: boolean;
89
- }
90
- /** 移动端优化配置 */
91
- interface MobileOptimization {
92
- /** 是否启用优化 (默认 true) */
93
- enabled: boolean;
94
- /** 像素比 (默认 1.0, 桌面端通常为 window.devicePixelRatio) */
95
- pixelRatio?: number;
96
- /** 是否强制关闭物理引擎 (默认 false) */
97
- disablePhysics?: boolean;
98
- /** 是否降低阴影质量 (默认 true) */
99
- reduceShadowQuality?: boolean;
100
- }
101
- /** 描边效果配置 */
102
- interface OutlineOptions {
103
- /** 是否启用描边 (默认 false) */
104
- enabled?: boolean;
105
- /** 描边粗细 (默认 0.003) */
106
- thickness?: number;
107
- /** 描边颜色 (默认 '#000000') */
108
- color?: string;
109
- }
110
- /** 辉光效果配置 */
111
- interface BloomOptions {
112
- /** 是否启用辉光 (默认 false) */
113
- enabled?: boolean;
114
- /** 辉光强度 (默认 1.0) */
115
- strength?: number;
116
- /** 辉光半径 (默认 0.4) */
117
- radius?: number;
118
- /** 辉光阈值 (默认 0.8) */
119
- threshold?: number;
120
- }
121
- /** MMDPlayerBase Ref 接口 */
122
- interface MMDPlayerBaseRef {
123
- /** 开始播放 */
124
- play: () => void;
125
- /** 暂停播放 */
126
- pause: () => void;
127
- /** 停止播放 (重置到开头) */
128
- stop: () => void;
129
- /** 跳转到指定时间 (秒) */
130
- seek: (time: number) => void;
131
- /** 获取当前播放时间 */
132
- getCurrentTime: () => number;
133
- /** 获取总时长 */
134
- getDuration: () => number;
135
- /** 获取播放状态 */
136
- isPlaying: () => boolean;
137
- /** 截图并返回 Base64 字符串 */
138
- snapshot: () => string;
139
- /** 重置相机到初始位置 */
140
- resetCamera: () => void;
141
- }
142
- /** 基础播放器属性 */
143
- interface MMDPlayerBaseProps {
144
- /** 资源配置 */
145
- resources: MMDResources;
146
- /** 舞台配置 */
147
- stage?: MMDStage;
148
- /** 移动端优化配置 */
149
- mobileOptimization?: MobileOptimization;
150
- /** 播放控制 */
151
- autoPlay?: boolean;
152
- loop?: boolean;
153
- volume?: number;
154
- muted?: boolean;
155
- /** 调试与辅助 */
156
- showAxes?: boolean;
157
- /** 渲染特效配置 */
158
- renderEffect?: 'default' | 'outline' | 'bloom' | 'outline+bloom';
159
- /** 描边效果配置 */
160
- outlineOptions?: OutlineOptions;
161
- /** 辉光效果配置 */
162
- bloomOptions?: BloomOptions;
163
- /** 三渲二(Toon)效果配置 */
164
- toonOptions?: ToonOptions;
165
- /** 事件回调 */
166
- onLoad?: () => void;
167
- onLoadProgress?: (progress: number, item: string) => void;
168
- onError?: (error: Error) => void;
169
- onPlay?: () => void;
170
- onPause?: () => void;
171
- onEnded?: () => void;
172
- onTimeUpdate?: (time: number) => void;
173
- onCameraChange?: (isManual: boolean) => void;
174
- /** 样式 */
175
- className?: string;
176
- style?: React.CSSProperties;
177
- }
178
- /** 增强播放器属性 */
179
- interface MMDPlayerEnhancedProps extends Omit<MMDPlayerBaseProps, 'resources'> {
180
- /** 单一资源模式 */
181
- resources?: MMDResources;
182
- /** 列表模式资源 */
183
- resourcesList?: MMDResourceItem[];
184
- /** 自由组合模式选项 */
185
- resourceOptions?: MMDResourceOptions;
186
- /** 列表模式下的默认 ID */
187
- defaultResourceId?: string;
188
- /** 自由组合模式下的默认选择 */
189
- defaultSelection?: {
190
- modelId?: string;
191
- motionId?: string;
192
- cameraId?: string;
193
- audioId?: string;
194
- stageId?: string;
195
- };
196
- /** 是否显示调试信息面板 */
197
- showDebugInfo?: boolean;
198
- }
199
- /** 播放列表节点 */
200
- interface MMDPlaylistNode {
201
- id: string;
202
- name: string;
203
- resources: MMDResources;
204
- /** 节点特定的舞台配置(可选,覆盖全局配置) */
205
- stage?: MMDStage;
206
- /** 该节点是否循环播放 */
207
- loop?: boolean;
208
- /** 预计时长(秒)- 用于进度计算 */
209
- duration?: number;
210
- /** 缩略图 */
211
- thumbnail?: string;
212
- }
213
- /** 播放列表配置 */
214
- interface MMDPlaylistConfig {
215
- id: string;
216
- name: string;
217
- nodes: MMDPlaylistNode[];
218
- /** 整个播放列表是否循环 */
219
- loop?: boolean;
220
- /** 预加载策略
221
- * - 'none': 不预加载 (默认)
222
- * - 'next': 预加载下一个节点
223
- * - 'all': 预加载所有节点
224
- */
225
- preload?: 'none' | 'next' | 'all';
226
- /** 是否自动播放 */
227
- autoPlay?: boolean;
228
- }
229
- /** 播放列表组件属性 */
230
- interface MMDPlaylistProps {
231
- /** 播放列表配置 */
232
- playlist: MMDPlaylistConfig;
233
- /** 舞台配置 */
234
- stage?: MMDStage;
235
- /** 移动端优化配置 */
236
- mobileOptimization?: MobileOptimization;
237
- /** 事件回调 */
238
- onNodeChange?: (node: MMDPlaylistNode, index: number) => void;
239
- onPlaylistComplete?: () => void;
240
- onError?: (error: Error) => void;
241
- /** 是否显示调试信息面板 */
242
- showDebugInfo?: boolean;
243
- /** 样式 */
244
- className?: string;
245
- style?: React.CSSProperties;
246
- }
247
-
248
- export type { BloomOptions as B, MMDPlaylistConfig as M, OutlineOptions as O, ResourceOption as R, ToonOptions as T, MMDResourceItem as a, MMDPlaylistNode as b, MMDResourceOptions as c, MMDResources as d, MMDPlayerBaseProps as e, MMDPlayerBaseRef as f, MMDPlayerEnhancedProps as g, MMDPlaylistProps as h, MMDStage as i, MobileOptimization as j };