sa2kit 1.5.1 → 1.6.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/admin/index.d.mts +1 -1
- package/dist/mmd/admin/index.d.ts +1 -1
- package/dist/mmd/index.d.mts +55 -3
- package/dist/mmd/index.d.ts +55 -3
- package/dist/mmd/index.js +305 -41
- package/dist/mmd/index.js.map +1 -1
- package/dist/mmd/index.mjs +307 -44
- package/dist/mmd/index.mjs.map +1 -1
- package/dist/mmd/server/index.d.mts +1 -1
- package/dist/mmd/server/index.d.ts +1 -1
- package/dist/{types-Bc_p-zAR.d.mts → types-CsTSddwu.d.mts} +7 -0
- package/dist/{types-Bc_p-zAR.d.ts → types-CsTSddwu.d.ts} +7 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import { F as FileMetadata } from '../../types-CK4We_aI.mjs';
|
|
3
|
-
import { M as MMDPlaylistConfig, a as MMDResourceItem, b as MMDPlaylistNode, c as MMDResourceOptions, d as MMDResources } from '../../types-
|
|
3
|
+
import { M as MMDPlaylistConfig, a as MMDResourceItem, b as MMDPlaylistNode, c as MMDResourceOptions, d as MMDResources } from '../../types-CsTSddwu.mjs';
|
|
4
4
|
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';
|
|
5
5
|
import 'three';
|
|
6
6
|
import 'drizzle-orm';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import { F as FileMetadata } from '../../types-CK4We_aI.js';
|
|
3
|
-
import { M as MMDPlaylistConfig, a as MMDResourceItem, b as MMDPlaylistNode, c as MMDResourceOptions, d as MMDResources } from '../../types-
|
|
3
|
+
import { M as MMDPlaylistConfig, a as MMDResourceItem, b as MMDPlaylistNode, c as MMDResourceOptions, d as MMDResources } from '../../types-CsTSddwu.js';
|
|
4
4
|
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';
|
|
5
5
|
import 'three';
|
|
6
6
|
import 'drizzle-orm';
|
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, d as MMDResources, i as MMDStage, j as MobileOptimization } from '../types-
|
|
2
|
-
export { M as MMDPlaylistConfig, a as MMDResourceItem, c as MMDResourceOptions, R as ResourceOption } from '../types-
|
|
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-CsTSddwu.mjs';
|
|
2
|
+
export { M as MMDPlaylistConfig, a as MMDResourceItem, c as MMDResourceOptions, R as ResourceOption } from '../types-CsTSddwu.mjs';
|
|
3
3
|
import React__default from 'react';
|
|
4
4
|
import 'three';
|
|
5
5
|
|
|
@@ -87,6 +87,33 @@ interface DialogueLine {
|
|
|
87
87
|
expression?: string;
|
|
88
88
|
/** 对话时播放的音效(可选) */
|
|
89
89
|
voicePath?: string;
|
|
90
|
+
/** 对话中插入的分支选项(可选,若有则显示选项) */
|
|
91
|
+
choices?: DialogueChoice[];
|
|
92
|
+
}
|
|
93
|
+
/** 分支判定逻辑 */
|
|
94
|
+
interface BranchCondition {
|
|
95
|
+
/** 变量名 */
|
|
96
|
+
key: string;
|
|
97
|
+
/** 变量值与节点索引的映射 */
|
|
98
|
+
map: Record<string | number, number>;
|
|
99
|
+
/** 默认跳转的节点索引 */
|
|
100
|
+
defaultIndex: number;
|
|
101
|
+
}
|
|
102
|
+
/** 对话分支选项 */
|
|
103
|
+
interface DialogueChoice {
|
|
104
|
+
/** 选项文字 */
|
|
105
|
+
text: string;
|
|
106
|
+
/** 跳转到的节点索引(可选,若不填则继续当前剧情) */
|
|
107
|
+
nextNodeIndex?: number;
|
|
108
|
+
/** 跳转到的对话索引(可选,默认 0) */
|
|
109
|
+
nextDialogueIndex?: number;
|
|
110
|
+
/** 设置变量(可选,用于后续剧情判定) */
|
|
111
|
+
setVariable?: {
|
|
112
|
+
key: string;
|
|
113
|
+
value: string | number | boolean;
|
|
114
|
+
};
|
|
115
|
+
/** 选项点击后的回调(可选) */
|
|
116
|
+
onSelect?: () => void;
|
|
90
117
|
}
|
|
91
118
|
/** 视觉小说播放节点 */
|
|
92
119
|
interface VisualNovelNode {
|
|
@@ -98,6 +125,12 @@ interface VisualNovelNode {
|
|
|
98
125
|
resources: MMDResources;
|
|
99
126
|
/** 该节点的对话数组(按顺序播放) */
|
|
100
127
|
dialogues: DialogueLine[];
|
|
128
|
+
/** 节点特定的舞台配置(可选,覆盖全局配置) */
|
|
129
|
+
stage?: MMDStage;
|
|
130
|
+
/** 节点结束时的分支选项(可选,已废弃,建议使用 DialogueLine.choices) */
|
|
131
|
+
choices?: DialogueChoice[];
|
|
132
|
+
/** 节点结束时的分支判定逻辑(可选,根据变量跳转不同节点) */
|
|
133
|
+
nextCondition?: BranchCondition;
|
|
101
134
|
/** 节点开始时播放的背景音乐(可选) */
|
|
102
135
|
bgmPath?: string;
|
|
103
136
|
/** 背景音乐音量 0-1(默认 0.5) */
|
|
@@ -190,6 +223,10 @@ interface DialogueBoxProps {
|
|
|
190
223
|
onOpenHistory?: () => void;
|
|
191
224
|
/** 快进 */
|
|
192
225
|
onSkip?: () => void;
|
|
226
|
+
/** 重置相机 */
|
|
227
|
+
onResetCamera?: () => void;
|
|
228
|
+
/** 相机是否处于手动调整状态 */
|
|
229
|
+
isCameraManual?: boolean;
|
|
193
230
|
/** 是否显示控制按钮 */
|
|
194
231
|
showControls?: boolean;
|
|
195
232
|
/** 是否显示快进按钮 */
|
|
@@ -221,6 +258,10 @@ interface MMDVisualNovelRef {
|
|
|
221
258
|
getCurrentDialogueIndex: () => number;
|
|
222
259
|
/** 获取对话历史 */
|
|
223
260
|
getHistory: () => DialogueHistoryItem[];
|
|
261
|
+
/** 获取当前剧情变量 */
|
|
262
|
+
getVariables: () => Record<string, string | number | boolean>;
|
|
263
|
+
/** 设置剧情变量 */
|
|
264
|
+
setVariable: (key: string, value: string | number | boolean) => void;
|
|
224
265
|
/** 设置自动播放模式 */
|
|
225
266
|
setAutoMode: (enabled: boolean) => void;
|
|
226
267
|
/** 跳过当前打字动画 */
|
|
@@ -325,6 +366,13 @@ interface StartScreenProps {
|
|
|
325
366
|
*/
|
|
326
367
|
declare const StartScreen: React__default.FC<StartScreenProps>;
|
|
327
368
|
|
|
369
|
+
interface ChoiceMenuProps {
|
|
370
|
+
choices: DialogueChoice[];
|
|
371
|
+
onSelect: (choice: DialogueChoice) => void;
|
|
372
|
+
theme?: DialogueBoxTheme;
|
|
373
|
+
}
|
|
374
|
+
declare const ChoiceMenu: React__default.FC<ChoiceMenuProps>;
|
|
375
|
+
|
|
328
376
|
/** 音乐曲目配置 */
|
|
329
377
|
interface MusicTrack {
|
|
330
378
|
/** 唯一标识 */
|
|
@@ -337,6 +385,8 @@ interface MusicTrack {
|
|
|
337
385
|
coverUrl?: string;
|
|
338
386
|
/** MMD 资源(模型、动作、音频等) */
|
|
339
387
|
resources: MMDResources;
|
|
388
|
+
/** 曲目特定的舞台配置(可选,覆盖全局配置) */
|
|
389
|
+
stage?: MMDStage;
|
|
340
390
|
/** 预计时长(秒) */
|
|
341
391
|
duration?: number;
|
|
342
392
|
}
|
|
@@ -410,12 +460,14 @@ interface MusicControlsProps {
|
|
|
410
460
|
currentTime: number;
|
|
411
461
|
duration: number;
|
|
412
462
|
loopMode: 'list' | 'single' | 'shuffle';
|
|
463
|
+
isCameraManual?: boolean;
|
|
413
464
|
onPlayPause: () => void;
|
|
414
465
|
onNext: () => void;
|
|
415
466
|
onPrevious: () => void;
|
|
416
467
|
onSeek: (time: number) => void;
|
|
417
468
|
onToggleLoop: () => void;
|
|
418
469
|
onTogglePlaylist: () => void;
|
|
470
|
+
onResetCamera?: () => void;
|
|
419
471
|
className?: string;
|
|
420
472
|
}
|
|
421
473
|
declare const MusicControls: React__default.FC<MusicControlsProps>;
|
|
@@ -436,4 +488,4 @@ interface TrackInfoProps {
|
|
|
436
488
|
}
|
|
437
489
|
declare const TrackInfo: React__default.FC<TrackInfoProps>;
|
|
438
490
|
|
|
439
|
-
export { DialogueBox, type DialogueBoxProps, type DialogueBoxTheme, type DialogueHistoryItem, type DialogueLine, HistoryPanel, LoadingOverlay, type LoadingOverlayProps, LoadingScreen, type LoadingScreenProps, MMDMusicPlayer, type MMDMusicPlayerConfig, type MMDMusicPlayerProps, type MMDMusicPlayerRef, MMDPlayerBase, MMDPlayerBaseProps, MMDPlayerBaseRef, MMDPlayerEnhanced, MMDPlayerEnhancedDebugInfo, MMDPlayerEnhancedProps, MMDPlaylist, MMDPlaylistDebugInfo, MMDPlaylistNode, MMDPlaylistProps, MMDResources, MMDStage, MMDVisualNovel, type MMDVisualNovelProps, type MMDVisualNovelRef, MobileOptimization, MusicControls, type MusicControlsProps, type MusicTrack, PlaylistPanel, type PlaylistPanelProps, StartScreen, type StartScreenProps, TrackInfo, type TrackInfoProps, type VisualNovelNode, type VisualNovelScript, loadAmmo };
|
|
491
|
+
export { type BranchCondition, ChoiceMenu, type ChoiceMenuProps, DialogueBox, type DialogueBoxProps, type DialogueBoxTheme, type DialogueChoice, type DialogueHistoryItem, type DialogueLine, HistoryPanel, LoadingOverlay, type LoadingOverlayProps, LoadingScreen, type LoadingScreenProps, MMDMusicPlayer, type MMDMusicPlayerConfig, type MMDMusicPlayerProps, type MMDMusicPlayerRef, MMDPlayerBase, MMDPlayerBaseProps, MMDPlayerBaseRef, MMDPlayerEnhanced, MMDPlayerEnhancedDebugInfo, MMDPlayerEnhancedProps, MMDPlaylist, MMDPlaylistDebugInfo, MMDPlaylistNode, MMDPlaylistProps, MMDResources, MMDStage, MMDVisualNovel, type MMDVisualNovelProps, type MMDVisualNovelRef, MobileOptimization, MusicControls, type MusicControlsProps, type MusicTrack, PlaylistPanel, type PlaylistPanelProps, StartScreen, type StartScreenProps, TrackInfo, type TrackInfoProps, 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, d as MMDResources, i as MMDStage, j as MobileOptimization } from '../types-
|
|
2
|
-
export { M as MMDPlaylistConfig, a as MMDResourceItem, c as MMDResourceOptions, R as ResourceOption } from '../types-
|
|
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-CsTSddwu.js';
|
|
2
|
+
export { M as MMDPlaylistConfig, a as MMDResourceItem, c as MMDResourceOptions, R as ResourceOption } from '../types-CsTSddwu.js';
|
|
3
3
|
import React__default from 'react';
|
|
4
4
|
import 'three';
|
|
5
5
|
|
|
@@ -87,6 +87,33 @@ interface DialogueLine {
|
|
|
87
87
|
expression?: string;
|
|
88
88
|
/** 对话时播放的音效(可选) */
|
|
89
89
|
voicePath?: string;
|
|
90
|
+
/** 对话中插入的分支选项(可选,若有则显示选项) */
|
|
91
|
+
choices?: DialogueChoice[];
|
|
92
|
+
}
|
|
93
|
+
/** 分支判定逻辑 */
|
|
94
|
+
interface BranchCondition {
|
|
95
|
+
/** 变量名 */
|
|
96
|
+
key: string;
|
|
97
|
+
/** 变量值与节点索引的映射 */
|
|
98
|
+
map: Record<string | number, number>;
|
|
99
|
+
/** 默认跳转的节点索引 */
|
|
100
|
+
defaultIndex: number;
|
|
101
|
+
}
|
|
102
|
+
/** 对话分支选项 */
|
|
103
|
+
interface DialogueChoice {
|
|
104
|
+
/** 选项文字 */
|
|
105
|
+
text: string;
|
|
106
|
+
/** 跳转到的节点索引(可选,若不填则继续当前剧情) */
|
|
107
|
+
nextNodeIndex?: number;
|
|
108
|
+
/** 跳转到的对话索引(可选,默认 0) */
|
|
109
|
+
nextDialogueIndex?: number;
|
|
110
|
+
/** 设置变量(可选,用于后续剧情判定) */
|
|
111
|
+
setVariable?: {
|
|
112
|
+
key: string;
|
|
113
|
+
value: string | number | boolean;
|
|
114
|
+
};
|
|
115
|
+
/** 选项点击后的回调(可选) */
|
|
116
|
+
onSelect?: () => void;
|
|
90
117
|
}
|
|
91
118
|
/** 视觉小说播放节点 */
|
|
92
119
|
interface VisualNovelNode {
|
|
@@ -98,6 +125,12 @@ interface VisualNovelNode {
|
|
|
98
125
|
resources: MMDResources;
|
|
99
126
|
/** 该节点的对话数组(按顺序播放) */
|
|
100
127
|
dialogues: DialogueLine[];
|
|
128
|
+
/** 节点特定的舞台配置(可选,覆盖全局配置) */
|
|
129
|
+
stage?: MMDStage;
|
|
130
|
+
/** 节点结束时的分支选项(可选,已废弃,建议使用 DialogueLine.choices) */
|
|
131
|
+
choices?: DialogueChoice[];
|
|
132
|
+
/** 节点结束时的分支判定逻辑(可选,根据变量跳转不同节点) */
|
|
133
|
+
nextCondition?: BranchCondition;
|
|
101
134
|
/** 节点开始时播放的背景音乐(可选) */
|
|
102
135
|
bgmPath?: string;
|
|
103
136
|
/** 背景音乐音量 0-1(默认 0.5) */
|
|
@@ -190,6 +223,10 @@ interface DialogueBoxProps {
|
|
|
190
223
|
onOpenHistory?: () => void;
|
|
191
224
|
/** 快进 */
|
|
192
225
|
onSkip?: () => void;
|
|
226
|
+
/** 重置相机 */
|
|
227
|
+
onResetCamera?: () => void;
|
|
228
|
+
/** 相机是否处于手动调整状态 */
|
|
229
|
+
isCameraManual?: boolean;
|
|
193
230
|
/** 是否显示控制按钮 */
|
|
194
231
|
showControls?: boolean;
|
|
195
232
|
/** 是否显示快进按钮 */
|
|
@@ -221,6 +258,10 @@ interface MMDVisualNovelRef {
|
|
|
221
258
|
getCurrentDialogueIndex: () => number;
|
|
222
259
|
/** 获取对话历史 */
|
|
223
260
|
getHistory: () => DialogueHistoryItem[];
|
|
261
|
+
/** 获取当前剧情变量 */
|
|
262
|
+
getVariables: () => Record<string, string | number | boolean>;
|
|
263
|
+
/** 设置剧情变量 */
|
|
264
|
+
setVariable: (key: string, value: string | number | boolean) => void;
|
|
224
265
|
/** 设置自动播放模式 */
|
|
225
266
|
setAutoMode: (enabled: boolean) => void;
|
|
226
267
|
/** 跳过当前打字动画 */
|
|
@@ -325,6 +366,13 @@ interface StartScreenProps {
|
|
|
325
366
|
*/
|
|
326
367
|
declare const StartScreen: React__default.FC<StartScreenProps>;
|
|
327
368
|
|
|
369
|
+
interface ChoiceMenuProps {
|
|
370
|
+
choices: DialogueChoice[];
|
|
371
|
+
onSelect: (choice: DialogueChoice) => void;
|
|
372
|
+
theme?: DialogueBoxTheme;
|
|
373
|
+
}
|
|
374
|
+
declare const ChoiceMenu: React__default.FC<ChoiceMenuProps>;
|
|
375
|
+
|
|
328
376
|
/** 音乐曲目配置 */
|
|
329
377
|
interface MusicTrack {
|
|
330
378
|
/** 唯一标识 */
|
|
@@ -337,6 +385,8 @@ interface MusicTrack {
|
|
|
337
385
|
coverUrl?: string;
|
|
338
386
|
/** MMD 资源(模型、动作、音频等) */
|
|
339
387
|
resources: MMDResources;
|
|
388
|
+
/** 曲目特定的舞台配置(可选,覆盖全局配置) */
|
|
389
|
+
stage?: MMDStage;
|
|
340
390
|
/** 预计时长(秒) */
|
|
341
391
|
duration?: number;
|
|
342
392
|
}
|
|
@@ -410,12 +460,14 @@ interface MusicControlsProps {
|
|
|
410
460
|
currentTime: number;
|
|
411
461
|
duration: number;
|
|
412
462
|
loopMode: 'list' | 'single' | 'shuffle';
|
|
463
|
+
isCameraManual?: boolean;
|
|
413
464
|
onPlayPause: () => void;
|
|
414
465
|
onNext: () => void;
|
|
415
466
|
onPrevious: () => void;
|
|
416
467
|
onSeek: (time: number) => void;
|
|
417
468
|
onToggleLoop: () => void;
|
|
418
469
|
onTogglePlaylist: () => void;
|
|
470
|
+
onResetCamera?: () => void;
|
|
419
471
|
className?: string;
|
|
420
472
|
}
|
|
421
473
|
declare const MusicControls: React__default.FC<MusicControlsProps>;
|
|
@@ -436,4 +488,4 @@ interface TrackInfoProps {
|
|
|
436
488
|
}
|
|
437
489
|
declare const TrackInfo: React__default.FC<TrackInfoProps>;
|
|
438
490
|
|
|
439
|
-
export { DialogueBox, type DialogueBoxProps, type DialogueBoxTheme, type DialogueHistoryItem, type DialogueLine, HistoryPanel, LoadingOverlay, type LoadingOverlayProps, LoadingScreen, type LoadingScreenProps, MMDMusicPlayer, type MMDMusicPlayerConfig, type MMDMusicPlayerProps, type MMDMusicPlayerRef, MMDPlayerBase, MMDPlayerBaseProps, MMDPlayerBaseRef, MMDPlayerEnhanced, MMDPlayerEnhancedDebugInfo, MMDPlayerEnhancedProps, MMDPlaylist, MMDPlaylistDebugInfo, MMDPlaylistNode, MMDPlaylistProps, MMDResources, MMDStage, MMDVisualNovel, type MMDVisualNovelProps, type MMDVisualNovelRef, MobileOptimization, MusicControls, type MusicControlsProps, type MusicTrack, PlaylistPanel, type PlaylistPanelProps, StartScreen, type StartScreenProps, TrackInfo, type TrackInfoProps, type VisualNovelNode, type VisualNovelScript, loadAmmo };
|
|
491
|
+
export { type BranchCondition, ChoiceMenu, type ChoiceMenuProps, DialogueBox, type DialogueBoxProps, type DialogueBoxTheme, type DialogueChoice, type DialogueHistoryItem, type DialogueLine, HistoryPanel, LoadingOverlay, type LoadingOverlayProps, LoadingScreen, type LoadingScreenProps, MMDMusicPlayer, type MMDMusicPlayerConfig, type MMDMusicPlayerProps, type MMDMusicPlayerRef, MMDPlayerBase, MMDPlayerBaseProps, MMDPlayerBaseRef, MMDPlayerEnhanced, MMDPlayerEnhancedDebugInfo, MMDPlayerEnhancedProps, MMDPlaylist, MMDPlaylistDebugInfo, MMDPlaylistNode, MMDPlaylistProps, MMDResources, MMDStage, MMDVisualNovel, type MMDVisualNovelProps, type MMDVisualNovelRef, MobileOptimization, MusicControls, type MusicControlsProps, type MusicTrack, PlaylistPanel, type PlaylistPanelProps, StartScreen, type StartScreenProps, TrackInfo, type TrackInfoProps, type VisualNovelNode, type VisualNovelScript, loadAmmo };
|