sa2kit 1.3.0 → 1.4.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/mmd/index.d.mts +265 -3
- package/dist/mmd/index.d.ts +265 -3
- package/dist/mmd/index.js +1266 -15
- package/dist/mmd/index.js.map +1 -1
- package/dist/mmd/index.mjs +1261 -16
- package/dist/mmd/index.mjs.map +1 -1
- package/package.json +6 -1
package/dist/mmd/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as MMDPlayerBaseProps, f as MMDPlayerBaseRef, g as MMDPlayerEnhancedProps, h as MMDPlaylistProps, b as MMDPlaylistNode } from '../types-Bc_p-zAR.mjs';
|
|
2
|
-
export { M as MMDPlaylistConfig, a as MMDResourceItem, c as MMDResourceOptions,
|
|
1
|
+
import { e as MMDPlayerBaseProps, f as MMDPlayerBaseRef, g as MMDPlayerEnhancedProps, h as MMDPlaylistProps, b as MMDPlaylistNode, d as MMDResources, i as MMDStage, j as MobileOptimization } from '../types-Bc_p-zAR.mjs';
|
|
2
|
+
export { M as MMDPlaylistConfig, a as MMDResourceItem, c as MMDResourceOptions, R as ResourceOption } from '../types-Bc_p-zAR.mjs';
|
|
3
3
|
import React__default from 'react';
|
|
4
4
|
import 'three';
|
|
5
5
|
|
|
@@ -63,4 +63,266 @@ declare global {
|
|
|
63
63
|
*/
|
|
64
64
|
declare const loadAmmo: (path?: string) => Promise<any>;
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
/**
|
|
67
|
+
* MMD Visual Novel (Galgame 风格) 类型定义
|
|
68
|
+
*/
|
|
69
|
+
|
|
70
|
+
/** 单条对话/文案 */
|
|
71
|
+
interface DialogueLine {
|
|
72
|
+
/** 唯一标识 */
|
|
73
|
+
id: string;
|
|
74
|
+
/** 说话者名称(可选,不填则不显示名称栏) */
|
|
75
|
+
speaker?: string;
|
|
76
|
+
/** 说话者名称颜色 */
|
|
77
|
+
speakerColor?: string;
|
|
78
|
+
/** 对话文本内容 */
|
|
79
|
+
text: string;
|
|
80
|
+
/** 文字显示速度(毫秒/字符),默认 50 */
|
|
81
|
+
typeSpeed?: number;
|
|
82
|
+
/** 是否等待用户点击才显示下一条(默认 true) */
|
|
83
|
+
waitForClick?: boolean;
|
|
84
|
+
/** 自动等待时间(毫秒),仅在 waitForClick 为 false 时生效 */
|
|
85
|
+
autoDelay?: number;
|
|
86
|
+
/** 对话时的表情/动作切换(可选) */
|
|
87
|
+
expression?: string;
|
|
88
|
+
/** 对话时播放的音效(可选) */
|
|
89
|
+
voicePath?: string;
|
|
90
|
+
}
|
|
91
|
+
/** 视觉小说播放节点 */
|
|
92
|
+
interface VisualNovelNode {
|
|
93
|
+
/** 唯一标识 */
|
|
94
|
+
id: string;
|
|
95
|
+
/** 节点名称(用于调试) */
|
|
96
|
+
name?: string;
|
|
97
|
+
/** MMD 资源配置(模型、动作等) */
|
|
98
|
+
resources: MMDResources;
|
|
99
|
+
/** 该节点的对话数组(按顺序播放) */
|
|
100
|
+
dialogues: DialogueLine[];
|
|
101
|
+
/** 节点开始时播放的背景音乐(可选) */
|
|
102
|
+
bgmPath?: string;
|
|
103
|
+
/** 背景音乐音量 0-1(默认 0.5) */
|
|
104
|
+
bgmVolume?: number;
|
|
105
|
+
/** 节点是否循环 MMD 动画(对话期间循环,默认 true) */
|
|
106
|
+
loopAnimation?: boolean;
|
|
107
|
+
}
|
|
108
|
+
/** 视觉小说剧本配置 */
|
|
109
|
+
interface VisualNovelScript {
|
|
110
|
+
/** 剧本唯一标识 */
|
|
111
|
+
id: string;
|
|
112
|
+
/** 剧本名称 */
|
|
113
|
+
name: string;
|
|
114
|
+
/** 播放节点列表 */
|
|
115
|
+
nodes: VisualNovelNode[];
|
|
116
|
+
/** 是否在剧本结束后循环(默认 false) */
|
|
117
|
+
loop?: boolean;
|
|
118
|
+
}
|
|
119
|
+
/** 对话框主题配置 */
|
|
120
|
+
interface DialogueBoxTheme {
|
|
121
|
+
/** 对话框背景颜色 */
|
|
122
|
+
backgroundColor?: string;
|
|
123
|
+
/** 对话框边框颜色 */
|
|
124
|
+
borderColor?: string;
|
|
125
|
+
/** 对话框文字颜色 */
|
|
126
|
+
textColor?: string;
|
|
127
|
+
/** 说话者名称背景颜色 */
|
|
128
|
+
speakerBgColor?: string;
|
|
129
|
+
/** 说话者名称文字颜色 */
|
|
130
|
+
speakerTextColor?: string;
|
|
131
|
+
/** 对话框透明度 0-1(默认 0.85) */
|
|
132
|
+
opacity?: number;
|
|
133
|
+
/** 对话框模糊度(backdrop-blur,默认 8px) */
|
|
134
|
+
blur?: string;
|
|
135
|
+
/** 点击继续提示文字 */
|
|
136
|
+
continueHint?: string;
|
|
137
|
+
/** 是否显示点击继续提示(默认 true) */
|
|
138
|
+
showContinueHint?: boolean;
|
|
139
|
+
}
|
|
140
|
+
/** 视觉小说组件属性 */
|
|
141
|
+
interface MMDVisualNovelProps {
|
|
142
|
+
/** 剧本配置 */
|
|
143
|
+
script: VisualNovelScript;
|
|
144
|
+
/** 舞台配置 */
|
|
145
|
+
stage?: MMDStage;
|
|
146
|
+
/** 移动端优化配置 */
|
|
147
|
+
mobileOptimization?: MobileOptimization;
|
|
148
|
+
/** 对话框主题 */
|
|
149
|
+
dialogueTheme?: DialogueBoxTheme;
|
|
150
|
+
/** 是否自动开始(默认 true) */
|
|
151
|
+
autoStart?: boolean;
|
|
152
|
+
/** 初始节点索引(默认 0) */
|
|
153
|
+
initialNodeIndex?: number;
|
|
154
|
+
/** 初始对话索引(默认 0) */
|
|
155
|
+
initialDialogueIndex?: number;
|
|
156
|
+
/** 事件回调 */
|
|
157
|
+
onNodeChange?: (node: VisualNovelNode, index: number) => void;
|
|
158
|
+
onDialogueChange?: (dialogue: DialogueLine, index: number, nodeIndex: number) => void;
|
|
159
|
+
onScriptComplete?: () => void;
|
|
160
|
+
onError?: (error: Error) => void;
|
|
161
|
+
/** 是否显示调试信息 */
|
|
162
|
+
showDebugInfo?: boolean;
|
|
163
|
+
/** 是否显示快进按钮 */
|
|
164
|
+
showSkipButton?: boolean;
|
|
165
|
+
/** 是否显示自动播放按钮 */
|
|
166
|
+
showAutoButton?: boolean;
|
|
167
|
+
/** 是否显示历史记录按钮 */
|
|
168
|
+
showHistoryButton?: boolean;
|
|
169
|
+
/** 样式 */
|
|
170
|
+
className?: string;
|
|
171
|
+
style?: React.CSSProperties;
|
|
172
|
+
}
|
|
173
|
+
/** 对话框组件属性 */
|
|
174
|
+
interface DialogueBoxProps {
|
|
175
|
+
/** 当前对话 */
|
|
176
|
+
dialogue: DialogueLine | null;
|
|
177
|
+
/** 主题配置 */
|
|
178
|
+
theme?: DialogueBoxTheme;
|
|
179
|
+
/** 是否正在打字中 */
|
|
180
|
+
isTyping?: boolean;
|
|
181
|
+
/** 是否自动播放模式 */
|
|
182
|
+
isAutoMode?: boolean;
|
|
183
|
+
/** 点击事件 */
|
|
184
|
+
onClick?: () => void;
|
|
185
|
+
/** 跳过打字动画 */
|
|
186
|
+
onSkipTyping?: () => void;
|
|
187
|
+
/** 切换自动模式 */
|
|
188
|
+
onToggleAuto?: () => void;
|
|
189
|
+
/** 打开历史记录 */
|
|
190
|
+
onOpenHistory?: () => void;
|
|
191
|
+
/** 快进 */
|
|
192
|
+
onSkip?: () => void;
|
|
193
|
+
/** 是否显示控制按钮 */
|
|
194
|
+
showControls?: boolean;
|
|
195
|
+
/** 是否显示快进按钮 */
|
|
196
|
+
showSkipButton?: boolean;
|
|
197
|
+
/** 是否显示自动按钮 */
|
|
198
|
+
showAutoButton?: boolean;
|
|
199
|
+
/** 是否显示历史按钮 */
|
|
200
|
+
showHistoryButton?: boolean;
|
|
201
|
+
/** 样式 */
|
|
202
|
+
className?: string;
|
|
203
|
+
}
|
|
204
|
+
/** 历史记录项 */
|
|
205
|
+
interface DialogueHistoryItem {
|
|
206
|
+
nodeIndex: number;
|
|
207
|
+
dialogueIndex: number;
|
|
208
|
+
speaker?: string;
|
|
209
|
+
text: string;
|
|
210
|
+
timestamp: number;
|
|
211
|
+
}
|
|
212
|
+
/** 视觉小说组件 Ref 接口 */
|
|
213
|
+
interface MMDVisualNovelRef {
|
|
214
|
+
/** 跳转到指定节点 */
|
|
215
|
+
goToNode: (nodeIndex: number) => void;
|
|
216
|
+
/** 跳转到指定对话 */
|
|
217
|
+
goToDialogue: (dialogueIndex: number) => void;
|
|
218
|
+
/** 获取当前节点索引 */
|
|
219
|
+
getCurrentNodeIndex: () => number;
|
|
220
|
+
/** 获取当前对话索引 */
|
|
221
|
+
getCurrentDialogueIndex: () => number;
|
|
222
|
+
/** 获取对话历史 */
|
|
223
|
+
getHistory: () => DialogueHistoryItem[];
|
|
224
|
+
/** 设置自动播放模式 */
|
|
225
|
+
setAutoMode: (enabled: boolean) => void;
|
|
226
|
+
/** 跳过当前打字动画 */
|
|
227
|
+
skipTyping: () => void;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* MMDVisualNovel - Galgame 风格视觉小说组件
|
|
232
|
+
*
|
|
233
|
+
* 核心功能:
|
|
234
|
+
* - 将 MMDPlaylist 封装为 Galgame 风格
|
|
235
|
+
* - 每个节点包含:模型、动作、对话数组
|
|
236
|
+
* - 用户阅读完对话后自动切换节点
|
|
237
|
+
* - 打字机效果显示文本
|
|
238
|
+
* - 支持自动播放、快进、历史记录
|
|
239
|
+
*/
|
|
240
|
+
declare const MMDVisualNovel: React__default.ForwardRefExoticComponent<MMDVisualNovelProps & React__default.RefAttributes<MMDVisualNovelRef>>;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* DialogueBox - Galgame 风格对话框组件
|
|
244
|
+
*
|
|
245
|
+
* 功能:
|
|
246
|
+
* - 打字机效果显示文本
|
|
247
|
+
* - 说话者名称栏
|
|
248
|
+
* - 点击继续提示
|
|
249
|
+
* - 控制按钮(自动、快进、历史)
|
|
250
|
+
*/
|
|
251
|
+
declare const DialogueBox: React__default.FC<DialogueBoxProps>;
|
|
252
|
+
|
|
253
|
+
interface HistoryPanelProps {
|
|
254
|
+
/** 历史记录列表 */
|
|
255
|
+
history: DialogueHistoryItem[];
|
|
256
|
+
/** 主题配置 */
|
|
257
|
+
theme?: DialogueBoxTheme;
|
|
258
|
+
/** 关闭面板 */
|
|
259
|
+
onClose: () => void;
|
|
260
|
+
/** 样式 */
|
|
261
|
+
className?: string;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* HistoryPanel - 对话历史记录面板
|
|
265
|
+
*
|
|
266
|
+
* 显示玩家已经阅读过的所有对话
|
|
267
|
+
*/
|
|
268
|
+
declare const HistoryPanel: React__default.FC<HistoryPanelProps>;
|
|
269
|
+
|
|
270
|
+
interface LoadingOverlayProps {
|
|
271
|
+
/** 是否显示加载状态 */
|
|
272
|
+
isLoading?: boolean;
|
|
273
|
+
/** 是否显示开始界面 */
|
|
274
|
+
showStartScreen?: boolean;
|
|
275
|
+
/** 脚本名称(用于开始界面) */
|
|
276
|
+
scriptName?: string;
|
|
277
|
+
/** 加载文本 */
|
|
278
|
+
loadingText?: string;
|
|
279
|
+
/** 开始按钮文本 */
|
|
280
|
+
startText?: string;
|
|
281
|
+
/** 点击开始回调 */
|
|
282
|
+
onStart?: () => void;
|
|
283
|
+
/** 自定义类名 */
|
|
284
|
+
className?: string;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* LoadingOverlay - 加载遮罩和开始界面组件容器
|
|
288
|
+
*
|
|
289
|
+
* 用于 MMD Visual Novel 的加载状态和开始界面显示
|
|
290
|
+
* 组合了 LoadingScreen 和 StartScreen 两个独立组件
|
|
291
|
+
*/
|
|
292
|
+
declare const LoadingOverlay: React__default.FC<LoadingOverlayProps>;
|
|
293
|
+
|
|
294
|
+
interface LoadingScreenProps {
|
|
295
|
+
/** 是否显示加载状态 */
|
|
296
|
+
isLoading?: boolean;
|
|
297
|
+
/** 加载文本 */
|
|
298
|
+
loadingText?: string;
|
|
299
|
+
/** 自定义类名 */
|
|
300
|
+
className?: string;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* LoadingScreen - 加载界面组件
|
|
304
|
+
*
|
|
305
|
+
* 用于 MMD Visual Novel 的加载状态显示
|
|
306
|
+
*/
|
|
307
|
+
declare const LoadingScreen: React__default.FC<LoadingScreenProps>;
|
|
308
|
+
|
|
309
|
+
interface StartScreenProps {
|
|
310
|
+
/** 是否显示开始界面 */
|
|
311
|
+
showStartScreen?: boolean;
|
|
312
|
+
/** 脚本名称 */
|
|
313
|
+
scriptName?: string;
|
|
314
|
+
/** 开始按钮文本 */
|
|
315
|
+
startText?: string;
|
|
316
|
+
/** 点击开始回调 */
|
|
317
|
+
onStart?: () => void;
|
|
318
|
+
/** 自定义类名 */
|
|
319
|
+
className?: string;
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* StartScreen - 开始界面组件
|
|
323
|
+
*
|
|
324
|
+
* 用于 MMD Visual Novel 的开始界面显示
|
|
325
|
+
*/
|
|
326
|
+
declare const StartScreen: React__default.FC<StartScreenProps>;
|
|
327
|
+
|
|
328
|
+
export { DialogueBox, type DialogueBoxProps, type DialogueBoxTheme, type DialogueHistoryItem, type DialogueLine, HistoryPanel, LoadingOverlay, type LoadingOverlayProps, LoadingScreen, type LoadingScreenProps, MMDPlayerBase, MMDPlayerBaseProps, MMDPlayerBaseRef, MMDPlayerEnhanced, MMDPlayerEnhancedDebugInfo, MMDPlayerEnhancedProps, MMDPlaylist, MMDPlaylistDebugInfo, MMDPlaylistNode, MMDPlaylistProps, MMDResources, MMDStage, MMDVisualNovel, type MMDVisualNovelProps, type MMDVisualNovelRef, MobileOptimization, StartScreen, type StartScreenProps, type VisualNovelNode, type VisualNovelScript, loadAmmo };
|
package/dist/mmd/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as MMDPlayerBaseProps, f as MMDPlayerBaseRef, g as MMDPlayerEnhancedProps, h as MMDPlaylistProps, b as MMDPlaylistNode } from '../types-Bc_p-zAR.js';
|
|
2
|
-
export { M as MMDPlaylistConfig, a as MMDResourceItem, c as MMDResourceOptions,
|
|
1
|
+
import { e as MMDPlayerBaseProps, f as MMDPlayerBaseRef, g as MMDPlayerEnhancedProps, h as MMDPlaylistProps, b as MMDPlaylistNode, d as MMDResources, i as MMDStage, j as MobileOptimization } from '../types-Bc_p-zAR.js';
|
|
2
|
+
export { M as MMDPlaylistConfig, a as MMDResourceItem, c as MMDResourceOptions, R as ResourceOption } from '../types-Bc_p-zAR.js';
|
|
3
3
|
import React__default from 'react';
|
|
4
4
|
import 'three';
|
|
5
5
|
|
|
@@ -63,4 +63,266 @@ declare global {
|
|
|
63
63
|
*/
|
|
64
64
|
declare const loadAmmo: (path?: string) => Promise<any>;
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
/**
|
|
67
|
+
* MMD Visual Novel (Galgame 风格) 类型定义
|
|
68
|
+
*/
|
|
69
|
+
|
|
70
|
+
/** 单条对话/文案 */
|
|
71
|
+
interface DialogueLine {
|
|
72
|
+
/** 唯一标识 */
|
|
73
|
+
id: string;
|
|
74
|
+
/** 说话者名称(可选,不填则不显示名称栏) */
|
|
75
|
+
speaker?: string;
|
|
76
|
+
/** 说话者名称颜色 */
|
|
77
|
+
speakerColor?: string;
|
|
78
|
+
/** 对话文本内容 */
|
|
79
|
+
text: string;
|
|
80
|
+
/** 文字显示速度(毫秒/字符),默认 50 */
|
|
81
|
+
typeSpeed?: number;
|
|
82
|
+
/** 是否等待用户点击才显示下一条(默认 true) */
|
|
83
|
+
waitForClick?: boolean;
|
|
84
|
+
/** 自动等待时间(毫秒),仅在 waitForClick 为 false 时生效 */
|
|
85
|
+
autoDelay?: number;
|
|
86
|
+
/** 对话时的表情/动作切换(可选) */
|
|
87
|
+
expression?: string;
|
|
88
|
+
/** 对话时播放的音效(可选) */
|
|
89
|
+
voicePath?: string;
|
|
90
|
+
}
|
|
91
|
+
/** 视觉小说播放节点 */
|
|
92
|
+
interface VisualNovelNode {
|
|
93
|
+
/** 唯一标识 */
|
|
94
|
+
id: string;
|
|
95
|
+
/** 节点名称(用于调试) */
|
|
96
|
+
name?: string;
|
|
97
|
+
/** MMD 资源配置(模型、动作等) */
|
|
98
|
+
resources: MMDResources;
|
|
99
|
+
/** 该节点的对话数组(按顺序播放) */
|
|
100
|
+
dialogues: DialogueLine[];
|
|
101
|
+
/** 节点开始时播放的背景音乐(可选) */
|
|
102
|
+
bgmPath?: string;
|
|
103
|
+
/** 背景音乐音量 0-1(默认 0.5) */
|
|
104
|
+
bgmVolume?: number;
|
|
105
|
+
/** 节点是否循环 MMD 动画(对话期间循环,默认 true) */
|
|
106
|
+
loopAnimation?: boolean;
|
|
107
|
+
}
|
|
108
|
+
/** 视觉小说剧本配置 */
|
|
109
|
+
interface VisualNovelScript {
|
|
110
|
+
/** 剧本唯一标识 */
|
|
111
|
+
id: string;
|
|
112
|
+
/** 剧本名称 */
|
|
113
|
+
name: string;
|
|
114
|
+
/** 播放节点列表 */
|
|
115
|
+
nodes: VisualNovelNode[];
|
|
116
|
+
/** 是否在剧本结束后循环(默认 false) */
|
|
117
|
+
loop?: boolean;
|
|
118
|
+
}
|
|
119
|
+
/** 对话框主题配置 */
|
|
120
|
+
interface DialogueBoxTheme {
|
|
121
|
+
/** 对话框背景颜色 */
|
|
122
|
+
backgroundColor?: string;
|
|
123
|
+
/** 对话框边框颜色 */
|
|
124
|
+
borderColor?: string;
|
|
125
|
+
/** 对话框文字颜色 */
|
|
126
|
+
textColor?: string;
|
|
127
|
+
/** 说话者名称背景颜色 */
|
|
128
|
+
speakerBgColor?: string;
|
|
129
|
+
/** 说话者名称文字颜色 */
|
|
130
|
+
speakerTextColor?: string;
|
|
131
|
+
/** 对话框透明度 0-1(默认 0.85) */
|
|
132
|
+
opacity?: number;
|
|
133
|
+
/** 对话框模糊度(backdrop-blur,默认 8px) */
|
|
134
|
+
blur?: string;
|
|
135
|
+
/** 点击继续提示文字 */
|
|
136
|
+
continueHint?: string;
|
|
137
|
+
/** 是否显示点击继续提示(默认 true) */
|
|
138
|
+
showContinueHint?: boolean;
|
|
139
|
+
}
|
|
140
|
+
/** 视觉小说组件属性 */
|
|
141
|
+
interface MMDVisualNovelProps {
|
|
142
|
+
/** 剧本配置 */
|
|
143
|
+
script: VisualNovelScript;
|
|
144
|
+
/** 舞台配置 */
|
|
145
|
+
stage?: MMDStage;
|
|
146
|
+
/** 移动端优化配置 */
|
|
147
|
+
mobileOptimization?: MobileOptimization;
|
|
148
|
+
/** 对话框主题 */
|
|
149
|
+
dialogueTheme?: DialogueBoxTheme;
|
|
150
|
+
/** 是否自动开始(默认 true) */
|
|
151
|
+
autoStart?: boolean;
|
|
152
|
+
/** 初始节点索引(默认 0) */
|
|
153
|
+
initialNodeIndex?: number;
|
|
154
|
+
/** 初始对话索引(默认 0) */
|
|
155
|
+
initialDialogueIndex?: number;
|
|
156
|
+
/** 事件回调 */
|
|
157
|
+
onNodeChange?: (node: VisualNovelNode, index: number) => void;
|
|
158
|
+
onDialogueChange?: (dialogue: DialogueLine, index: number, nodeIndex: number) => void;
|
|
159
|
+
onScriptComplete?: () => void;
|
|
160
|
+
onError?: (error: Error) => void;
|
|
161
|
+
/** 是否显示调试信息 */
|
|
162
|
+
showDebugInfo?: boolean;
|
|
163
|
+
/** 是否显示快进按钮 */
|
|
164
|
+
showSkipButton?: boolean;
|
|
165
|
+
/** 是否显示自动播放按钮 */
|
|
166
|
+
showAutoButton?: boolean;
|
|
167
|
+
/** 是否显示历史记录按钮 */
|
|
168
|
+
showHistoryButton?: boolean;
|
|
169
|
+
/** 样式 */
|
|
170
|
+
className?: string;
|
|
171
|
+
style?: React.CSSProperties;
|
|
172
|
+
}
|
|
173
|
+
/** 对话框组件属性 */
|
|
174
|
+
interface DialogueBoxProps {
|
|
175
|
+
/** 当前对话 */
|
|
176
|
+
dialogue: DialogueLine | null;
|
|
177
|
+
/** 主题配置 */
|
|
178
|
+
theme?: DialogueBoxTheme;
|
|
179
|
+
/** 是否正在打字中 */
|
|
180
|
+
isTyping?: boolean;
|
|
181
|
+
/** 是否自动播放模式 */
|
|
182
|
+
isAutoMode?: boolean;
|
|
183
|
+
/** 点击事件 */
|
|
184
|
+
onClick?: () => void;
|
|
185
|
+
/** 跳过打字动画 */
|
|
186
|
+
onSkipTyping?: () => void;
|
|
187
|
+
/** 切换自动模式 */
|
|
188
|
+
onToggleAuto?: () => void;
|
|
189
|
+
/** 打开历史记录 */
|
|
190
|
+
onOpenHistory?: () => void;
|
|
191
|
+
/** 快进 */
|
|
192
|
+
onSkip?: () => void;
|
|
193
|
+
/** 是否显示控制按钮 */
|
|
194
|
+
showControls?: boolean;
|
|
195
|
+
/** 是否显示快进按钮 */
|
|
196
|
+
showSkipButton?: boolean;
|
|
197
|
+
/** 是否显示自动按钮 */
|
|
198
|
+
showAutoButton?: boolean;
|
|
199
|
+
/** 是否显示历史按钮 */
|
|
200
|
+
showHistoryButton?: boolean;
|
|
201
|
+
/** 样式 */
|
|
202
|
+
className?: string;
|
|
203
|
+
}
|
|
204
|
+
/** 历史记录项 */
|
|
205
|
+
interface DialogueHistoryItem {
|
|
206
|
+
nodeIndex: number;
|
|
207
|
+
dialogueIndex: number;
|
|
208
|
+
speaker?: string;
|
|
209
|
+
text: string;
|
|
210
|
+
timestamp: number;
|
|
211
|
+
}
|
|
212
|
+
/** 视觉小说组件 Ref 接口 */
|
|
213
|
+
interface MMDVisualNovelRef {
|
|
214
|
+
/** 跳转到指定节点 */
|
|
215
|
+
goToNode: (nodeIndex: number) => void;
|
|
216
|
+
/** 跳转到指定对话 */
|
|
217
|
+
goToDialogue: (dialogueIndex: number) => void;
|
|
218
|
+
/** 获取当前节点索引 */
|
|
219
|
+
getCurrentNodeIndex: () => number;
|
|
220
|
+
/** 获取当前对话索引 */
|
|
221
|
+
getCurrentDialogueIndex: () => number;
|
|
222
|
+
/** 获取对话历史 */
|
|
223
|
+
getHistory: () => DialogueHistoryItem[];
|
|
224
|
+
/** 设置自动播放模式 */
|
|
225
|
+
setAutoMode: (enabled: boolean) => void;
|
|
226
|
+
/** 跳过当前打字动画 */
|
|
227
|
+
skipTyping: () => void;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* MMDVisualNovel - Galgame 风格视觉小说组件
|
|
232
|
+
*
|
|
233
|
+
* 核心功能:
|
|
234
|
+
* - 将 MMDPlaylist 封装为 Galgame 风格
|
|
235
|
+
* - 每个节点包含:模型、动作、对话数组
|
|
236
|
+
* - 用户阅读完对话后自动切换节点
|
|
237
|
+
* - 打字机效果显示文本
|
|
238
|
+
* - 支持自动播放、快进、历史记录
|
|
239
|
+
*/
|
|
240
|
+
declare const MMDVisualNovel: React__default.ForwardRefExoticComponent<MMDVisualNovelProps & React__default.RefAttributes<MMDVisualNovelRef>>;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* DialogueBox - Galgame 风格对话框组件
|
|
244
|
+
*
|
|
245
|
+
* 功能:
|
|
246
|
+
* - 打字机效果显示文本
|
|
247
|
+
* - 说话者名称栏
|
|
248
|
+
* - 点击继续提示
|
|
249
|
+
* - 控制按钮(自动、快进、历史)
|
|
250
|
+
*/
|
|
251
|
+
declare const DialogueBox: React__default.FC<DialogueBoxProps>;
|
|
252
|
+
|
|
253
|
+
interface HistoryPanelProps {
|
|
254
|
+
/** 历史记录列表 */
|
|
255
|
+
history: DialogueHistoryItem[];
|
|
256
|
+
/** 主题配置 */
|
|
257
|
+
theme?: DialogueBoxTheme;
|
|
258
|
+
/** 关闭面板 */
|
|
259
|
+
onClose: () => void;
|
|
260
|
+
/** 样式 */
|
|
261
|
+
className?: string;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* HistoryPanel - 对话历史记录面板
|
|
265
|
+
*
|
|
266
|
+
* 显示玩家已经阅读过的所有对话
|
|
267
|
+
*/
|
|
268
|
+
declare const HistoryPanel: React__default.FC<HistoryPanelProps>;
|
|
269
|
+
|
|
270
|
+
interface LoadingOverlayProps {
|
|
271
|
+
/** 是否显示加载状态 */
|
|
272
|
+
isLoading?: boolean;
|
|
273
|
+
/** 是否显示开始界面 */
|
|
274
|
+
showStartScreen?: boolean;
|
|
275
|
+
/** 脚本名称(用于开始界面) */
|
|
276
|
+
scriptName?: string;
|
|
277
|
+
/** 加载文本 */
|
|
278
|
+
loadingText?: string;
|
|
279
|
+
/** 开始按钮文本 */
|
|
280
|
+
startText?: string;
|
|
281
|
+
/** 点击开始回调 */
|
|
282
|
+
onStart?: () => void;
|
|
283
|
+
/** 自定义类名 */
|
|
284
|
+
className?: string;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* LoadingOverlay - 加载遮罩和开始界面组件容器
|
|
288
|
+
*
|
|
289
|
+
* 用于 MMD Visual Novel 的加载状态和开始界面显示
|
|
290
|
+
* 组合了 LoadingScreen 和 StartScreen 两个独立组件
|
|
291
|
+
*/
|
|
292
|
+
declare const LoadingOverlay: React__default.FC<LoadingOverlayProps>;
|
|
293
|
+
|
|
294
|
+
interface LoadingScreenProps {
|
|
295
|
+
/** 是否显示加载状态 */
|
|
296
|
+
isLoading?: boolean;
|
|
297
|
+
/** 加载文本 */
|
|
298
|
+
loadingText?: string;
|
|
299
|
+
/** 自定义类名 */
|
|
300
|
+
className?: string;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* LoadingScreen - 加载界面组件
|
|
304
|
+
*
|
|
305
|
+
* 用于 MMD Visual Novel 的加载状态显示
|
|
306
|
+
*/
|
|
307
|
+
declare const LoadingScreen: React__default.FC<LoadingScreenProps>;
|
|
308
|
+
|
|
309
|
+
interface StartScreenProps {
|
|
310
|
+
/** 是否显示开始界面 */
|
|
311
|
+
showStartScreen?: boolean;
|
|
312
|
+
/** 脚本名称 */
|
|
313
|
+
scriptName?: string;
|
|
314
|
+
/** 开始按钮文本 */
|
|
315
|
+
startText?: string;
|
|
316
|
+
/** 点击开始回调 */
|
|
317
|
+
onStart?: () => void;
|
|
318
|
+
/** 自定义类名 */
|
|
319
|
+
className?: string;
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* StartScreen - 开始界面组件
|
|
323
|
+
*
|
|
324
|
+
* 用于 MMD Visual Novel 的开始界面显示
|
|
325
|
+
*/
|
|
326
|
+
declare const StartScreen: React__default.FC<StartScreenProps>;
|
|
327
|
+
|
|
328
|
+
export { DialogueBox, type DialogueBoxProps, type DialogueBoxTheme, type DialogueHistoryItem, type DialogueLine, HistoryPanel, LoadingOverlay, type LoadingOverlayProps, LoadingScreen, type LoadingScreenProps, MMDPlayerBase, MMDPlayerBaseProps, MMDPlayerBaseRef, MMDPlayerEnhanced, MMDPlayerEnhancedDebugInfo, MMDPlayerEnhancedProps, MMDPlaylist, MMDPlaylistDebugInfo, MMDPlaylistNode, MMDPlaylistProps, MMDResources, MMDStage, MMDVisualNovel, type MMDVisualNovelProps, type MMDVisualNovelRef, MobileOptimization, StartScreen, type StartScreenProps, type VisualNovelNode, type VisualNovelScript, loadAmmo };
|