sa2kit 1.6.14 → 1.6.15

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 (43) hide show
  1. package/dist/audioDetection/index.js.map +1 -1
  2. package/dist/audioDetection/index.mjs.map +1 -1
  3. package/dist/auth/index.js +3 -3
  4. package/dist/auth/index.mjs +1 -1
  5. package/dist/{chunk-GGGTJETD.mjs → chunk-3WOAPLEG.mjs} +3 -3
  6. package/dist/{chunk-GGGTJETD.mjs.map → chunk-3WOAPLEG.mjs.map} +1 -1
  7. package/dist/{chunk-5D7ZFZIM.js → chunk-5YQ5B7IZ.js} +2 -2
  8. package/dist/{chunk-5D7ZFZIM.js.map → chunk-5YQ5B7IZ.js.map} +1 -1
  9. package/dist/{chunk-VZFHU553.mjs → chunk-6MQUBPKB.mjs} +2 -2
  10. package/dist/{chunk-VZFHU553.mjs.map → chunk-6MQUBPKB.mjs.map} +1 -1
  11. package/dist/{chunk-LFM5QSFW.js → chunk-A3UP56MS.js} +2 -2
  12. package/dist/{chunk-LFM5QSFW.js.map → chunk-A3UP56MS.js.map} +1 -1
  13. package/dist/{chunk-66EHKQVS.js → chunk-CLKKZSPZ.js} +2 -2
  14. package/dist/{chunk-66EHKQVS.js.map → chunk-CLKKZSPZ.js.map} +1 -1
  15. package/dist/{chunk-MRGFYQTC.mjs → chunk-CNTILN5J.mjs} +2 -2
  16. package/dist/{chunk-MRGFYQTC.mjs.map → chunk-CNTILN5J.mjs.map} +1 -1
  17. package/dist/{chunk-UUM5BIOU.js → chunk-E7RGBAYJ.js} +7 -7
  18. package/dist/{chunk-UUM5BIOU.js.map → chunk-E7RGBAYJ.js.map} +1 -1
  19. package/dist/{chunk-TGL6BATG.mjs → chunk-MW4BCIZC.mjs} +2 -2
  20. package/dist/{chunk-TGL6BATG.mjs.map → chunk-MW4BCIZC.mjs.map} +1 -1
  21. package/dist/imageCrop/index.js.map +1 -1
  22. package/dist/imageCrop/index.mjs.map +1 -1
  23. package/dist/index.js +1 -1
  24. package/dist/index.js.map +1 -1
  25. package/dist/index.mjs +1 -1
  26. package/dist/index.mjs.map +1 -1
  27. package/dist/mmd/index.d.mts +169 -5
  28. package/dist/mmd/index.d.ts +169 -5
  29. package/dist/mmd/index.js +463 -67
  30. package/dist/mmd/index.js.map +1 -1
  31. package/dist/mmd/index.mjs +463 -69
  32. package/dist/mmd/index.mjs.map +1 -1
  33. package/dist/music/index.js +16 -16
  34. package/dist/music/index.mjs +2 -2
  35. package/dist/music/server/index.js +8 -8
  36. package/dist/music/server/index.mjs +1 -1
  37. package/dist/testYourself/admin/index.js +3 -3
  38. package/dist/testYourself/admin/index.mjs +1 -1
  39. package/dist/testYourself/index.js +7 -7
  40. package/dist/testYourself/index.js.map +1 -1
  41. package/dist/testYourself/index.mjs +2 -2
  42. package/dist/testYourself/index.mjs.map +1 -1
  43. package/package.json +17 -19
@@ -974,6 +974,10 @@ interface MMDVisualNovelProps {
974
974
  showAutoButton?: boolean;
975
975
  /** 是否显示历史记录按钮 */
976
976
  showHistoryButton?: boolean;
977
+ /** 自定义设置面板内容 */
978
+ customSettingsContent?: React.ReactNode;
979
+ /** 自定义关于面板内容 */
980
+ customAboutContent?: React.ReactNode;
977
981
  /** 样式 */
978
982
  className?: string;
979
983
  style?: React.CSSProperties;
@@ -1041,6 +1045,8 @@ interface MMDVisualNovelRef {
1041
1045
  setAutoMode: (enabled: boolean) => void;
1042
1046
  /** 跳过当前打字动画 */
1043
1047
  skipTyping: () => void;
1048
+ /** 触发视觉特效 */
1049
+ triggerEffect?: (effect: VisualEffect) => void;
1044
1050
  }
1045
1051
 
1046
1052
  /**
@@ -1055,6 +1061,105 @@ interface MMDVisualNovelRef {
1055
1061
  */
1056
1062
  declare const MMDVisualNovel: React__default.ForwardRefExoticComponent<MMDVisualNovelProps & React__default.RefAttributes<MMDVisualNovelRef>>;
1057
1063
 
1064
+ /** 模型选项 */
1065
+ interface ModelOption {
1066
+ /** 唯一标识 */
1067
+ id: string;
1068
+ /** 显示名称 */
1069
+ name: string;
1070
+ /** 模型路径 */
1071
+ path: string | string[];
1072
+ /** 缩略图(可选) */
1073
+ thumbnail?: string;
1074
+ }
1075
+ /** 模型选择器设置属性 */
1076
+ interface ModelSelectorSettingsProps {
1077
+ /** 人物模型选项列表 */
1078
+ characterModels: ModelOption[];
1079
+ /** 场景模型选项列表 */
1080
+ stageModels: ModelOption[];
1081
+ /** 当前选中的人物模型 ID */
1082
+ selectedCharacterId: string;
1083
+ /** 当前选中的场景模型 ID */
1084
+ selectedStageId: string;
1085
+ /** 人物模型选择变化回调 */
1086
+ onCharacterChange: (id: string) => void;
1087
+ /** 场景模型选择变化回调 */
1088
+ onStageChange: (id: string) => void;
1089
+ /** 人物模型标签文字 */
1090
+ characterLabel?: string;
1091
+ /** 场景模型标签文字 */
1092
+ stageLabel?: string;
1093
+ }
1094
+ /**
1095
+ * ModelSelectorSettings - 模型选择器设置组件
1096
+ *
1097
+ * 用于在设置界面中选择人物模型和场景模型
1098
+ */
1099
+ declare const ModelSelectorSettings: React__default.FC<ModelSelectorSettingsProps>;
1100
+
1101
+ /** 模型选择器配置 */
1102
+ interface ModelSelectorConfig {
1103
+ /** 人物模型选项列表 */
1104
+ characterModels: ModelOption[];
1105
+ /** 场景模型选项列表 */
1106
+ stageModels: ModelOption[];
1107
+ /** 默认选中的人物模型 ID(不提供则使用第一个) */
1108
+ defaultCharacterId?: string;
1109
+ /** 默认选中的场景模型 ID(不提供则使用第一个) */
1110
+ defaultStageId?: string;
1111
+ /** 人物模型标签文字 */
1112
+ characterLabel?: string;
1113
+ /** 场景模型标签文字 */
1114
+ stageLabel?: string;
1115
+ }
1116
+ /** 带模型选择器的视觉小说组件属性 */
1117
+ interface MMDVisualNovelWithSelectorProps extends Omit<MMDVisualNovelProps, 'script'> {
1118
+ /** 基础剧本配置(模型路径会被选择器覆盖) */
1119
+ script: VisualNovelScript;
1120
+ /** 模型选择器配置 */
1121
+ modelSelector: ModelSelectorConfig;
1122
+ /** 模型选择变化回调 */
1123
+ onModelSelectionChange?: (characterId: string, stageId: string) => void;
1124
+ }
1125
+ /** 带模型选择器的视觉小说组件 Ref 接口 */
1126
+ interface MMDVisualNovelWithSelectorRef extends MMDVisualNovelRef {
1127
+ /** 获取当前选中的人物模型 ID */
1128
+ getSelectedCharacterId: () => string;
1129
+ /** 获取当前选中的场景模型 ID */
1130
+ getSelectedStageId: () => string;
1131
+ /** 设置人物模型 */
1132
+ setCharacterModel: (id: string) => void;
1133
+ /** 设置场景模型 */
1134
+ setStageModel: (id: string) => void;
1135
+ }
1136
+ /**
1137
+ * MMDVisualNovelWithSelector - 带模型选择器的视觉小说组件
1138
+ *
1139
+ * 功能特性:
1140
+ * - 在设置界面中提供人物模型和场景模型的下拉选择器
1141
+ * - 选择的模型会应用到剧本中的所有节点
1142
+ * - 完全兼容 MMDVisualNovel 的所有功能
1143
+ *
1144
+ * 使用示例:
1145
+ * ```tsx
1146
+ * <MMDVisualNovelWithSelector
1147
+ * script={myScript}
1148
+ * modelSelector={{
1149
+ * characterModels: [
1150
+ * { id: 'miku', name: '初音未来', path: '/models/miku.pmx' },
1151
+ * { id: 'luka', name: '巡音流歌', path: '/models/luka.pmx' },
1152
+ * ],
1153
+ * stageModels: [
1154
+ * { id: 'stage1', name: '教室', path: '/stages/classroom.pmx' },
1155
+ * { id: 'stage2', name: '公园', path: '/stages/park.pmx' },
1156
+ * ],
1157
+ * }}
1158
+ * />
1159
+ * ```
1160
+ */
1161
+ declare const MMDVisualNovelWithSelector: React__default.ForwardRefExoticComponent<MMDVisualNovelWithSelectorProps & React__default.RefAttributes<MMDVisualNovelWithSelectorRef>>;
1162
+
1058
1163
  /**
1059
1164
  * DialogueBox - Galgame 风格对话框组件
1060
1165
  *
@@ -1102,6 +1207,10 @@ interface LoadingOverlayProps {
1102
1207
  onStart?: () => void;
1103
1208
  /** 自定义类名 */
1104
1209
  className?: string;
1210
+ /** 自定义设置面板内容 */
1211
+ customSettingsContent?: React__default.ReactNode;
1212
+ /** 自定义关于面板内容 */
1213
+ customAboutContent?: React__default.ReactNode;
1105
1214
  }
1106
1215
  /**
1107
1216
  * LoadingOverlay - 加载遮罩和开始界面组件容器
@@ -1141,6 +1250,10 @@ interface StartScreenProps {
1141
1250
  onStart?: () => void;
1142
1251
  /** 自定义类名 */
1143
1252
  className?: string;
1253
+ /** 自定义设置面板内容 */
1254
+ customSettingsContent?: React__default.ReactNode;
1255
+ /** 自定义关于面板内容 */
1256
+ customAboutContent?: React__default.ReactNode;
1144
1257
  }
1145
1258
  /**
1146
1259
  * StartScreen - 开始界面组件
@@ -1333,9 +1446,36 @@ interface TrackInfoProps {
1333
1446
  }
1334
1447
  declare const TrackInfo: React__default.FC<TrackInfoProps>;
1335
1448
 
1449
+ /** 预设模型配置 */
1450
+ interface ModelPreset {
1451
+ /** 预设ID */
1452
+ id: string;
1453
+ /** 显示名称 */
1454
+ name: string;
1455
+ /** 缩略图URL */
1456
+ thumbnail?: string;
1457
+ /** 模型路径 (.pmx) */
1458
+ modelPath: string;
1459
+ }
1460
+ /** 预设动作配置 */
1461
+ interface MotionPreset {
1462
+ /** 预设ID */
1463
+ id: string;
1464
+ /** 显示名称 */
1465
+ name: string;
1466
+ /** 动作路径 (.vmd) */
1467
+ motionPath: string;
1468
+ }
1469
+ /** 预设音乐配置 */
1470
+ interface AudioPreset {
1471
+ /** 预设ID */
1472
+ id: string;
1473
+ /** 显示名称 */
1474
+ name: string;
1475
+ /** 音乐路径 */
1476
+ audioPath: string;
1477
+ }
1336
1478
  interface MMDARPlayerProps {
1337
- /** MMD 资源配置 */
1338
- resources: MMDResources;
1339
1479
  /** 舞台配置 */
1340
1480
  stage?: MMDStage;
1341
1481
  /** 移动端优化配置 */
@@ -1358,8 +1498,24 @@ interface MMDARPlayerProps {
1358
1498
  };
1359
1499
  /** 是否开启镜像显示 (通常前置摄像头需要开启) */
1360
1500
  mirrored?: boolean;
1361
- /** 是否显示设置按钮 (允许手动输入模型和动作路径) */
1501
+ /** 是否显示设置按钮 */
1362
1502
  showSettings?: boolean;
1503
+ /** 预设模型列表 */
1504
+ modelPresets: ModelPreset[];
1505
+ /** 预设动作列表 */
1506
+ motionPresets: MotionPreset[];
1507
+ /** 预设音乐列表 (可选) */
1508
+ audioPresets?: AudioPreset[];
1509
+ /** 默认模型ID */
1510
+ defaultModelId?: string;
1511
+ /** 默认动作ID */
1512
+ defaultMotionId?: string;
1513
+ /** 默认音乐ID (可选) */
1514
+ defaultAudioId?: string;
1515
+ /** 初始时是否显示模型 (false 则需要点击放置) */
1516
+ initialModelVisible?: boolean;
1517
+ /** 放置按钮文案 */
1518
+ placementText?: string;
1363
1519
  /** 播放控制 */
1364
1520
  autoPlay?: boolean;
1365
1521
  loop?: boolean;
@@ -1367,6 +1523,7 @@ interface MMDARPlayerProps {
1367
1523
  onCameraReady?: (stream: MediaStream) => void;
1368
1524
  onCameraError?: (error: Error) => void;
1369
1525
  onResourcesChange?: (resources: MMDResources) => void;
1526
+ onModelPlaced?: () => void;
1370
1527
  onLoad?: () => void;
1371
1528
  onError?: (error: Error) => void;
1372
1529
  /** 样式 */
@@ -1382,6 +1539,12 @@ interface MMDARPlayerRef {
1382
1539
  switchCamera: () => Promise<void>;
1383
1540
  /** 截图 (包含视频背景和模型) */
1384
1541
  snapshot: () => Promise<string>;
1542
+ /** 放置模型 */
1543
+ placeModel: () => void;
1544
+ /** 移除模型(重置位置) */
1545
+ removeModel: () => void;
1546
+ /** 切换模型 */
1547
+ switchModel: (resources: MMDResources) => void;
1385
1548
  }
1386
1549
 
1387
1550
  /**
@@ -1389,9 +1552,10 @@ interface MMDARPlayerRef {
1389
1552
  *
1390
1553
  * 功能:
1391
1554
  * - 调用设备摄像头作为背景
1555
+ * - 点击放置模型交互
1392
1556
  * - 叠加透明背景的 MMD 模型渲染
1393
1557
  * - 支持前后摄像头切换
1394
- * - 针对 AR 场景优化模型光照与定位
1558
+ * - 设置面板支持模型/动作/音乐下拉选择
1395
1559
  */
1396
1560
  declare const MMDARPlayer: React__default.ForwardRefExoticComponent<MMDARPlayerProps & React__default.RefAttributes<MMDARPlayerRef>>;
1397
1561
 
@@ -2208,4 +2372,4 @@ interface FXThreePreviewProps {
2208
2372
  }
2209
2373
  declare const FXThreePreview: React__default.FC<FXThreePreviewProps>;
2210
2374
 
2211
- export { type BranchCondition, CheerButton, type CheerButtonProps, CheerParticles, type CheerParticlesProps, type CheerParticlesRef, ChoiceMenu, type ChoiceMenuProps, DialogueBox, type DialogueBoxProps, type DialogueBoxTheme, type DialogueChoice, type DialogueHistoryItem, type DialogueLine, type EffectFileType, type FXComment, type FXController, type FXDefine, type FXEffect, type FXFileConfig, type FXMergeStrategy, type FXParameter, FXParser, type FXParserOptions, type FXPass, type FXShaderFunction, type FXStaticVariable, type FXSummary, type FXTechnique, type FXTexture, FXThreePreview, type FXThreePreviewProps, FXToThreeAdapter, FXViewer, type FXViewerProps, type GLSLShader, type GLSLShaders, HLSLToGLSLConverter, HistoryPanel, LoadingOverlay, type LoadingOverlayProps, LoadingScreen, type LoadingScreenProps, LoopConfirmDialog, MMDARPlayer, type MMDARPlayerProps, type MMDARPlayerRef, type MMDDiagnosticReport, MMDLightingDebugPanel, type MMDLightingDebugPanelProps, type MMDLightingParams, type MMDLoaderConfig, MMDMusicPlayer, type MMDMusicPlayerConfig, type MMDMusicPlayerProps, type MMDMusicPlayerRef, MMDPlayerBase, MMDPlayerBaseProps, MMDPlayerBaseRef, MMDPlayerEnhanced, MMDPlayerEnhancedDebugInfo, MMDPlayerEnhancedProps, MMDPlaylist, MMDPlaylistDebugInfo, MMDPlaylistNode, MMDPlaylistProps, MMDResources, type MMDSceneRefs, MMDStage, MMDVisualNovel, type MMDVisualNovelProps, type MMDVisualNovelRef, type MaterialTextureMapping, MobileOptimization, MultiFXAdapter, type MultiFXAdapterOptions, MusicControls, type MusicControlsProps, type MusicTrack, PMXEditor, PMXEditor$1 as PMXEditorCore, type PMXEditorProps, PMXExporter, type PMXHeader, type PMXMaterial, type PMXModelInfo, type PMXParseResult, PMXParser, type PMXTexture, type PMXVertex, PMXViewer, type PMXViewerProps, PlaylistPanel, type PlaylistPanelProps, type SphereTextureDiagnostic, StartScreen, type StartScreenProps, type ThreeMaterialConfig, type ThreeRenderConfig, TrackInfo, type TrackInfoProps, type VisualEffect, type VisualNovelNode, type VisualNovelScript, addDefaultSphereTextures, checkModelSphereDefinition, checkSphereTextures, compareFXEffects, configureMaterialsForMMD, configureRendererForMMD, createMMDLights, diagnoseMaterialsMMD, exportFXToJSON, exportFXToMarkdown, extractTexturePaths, filterDefinesByPrefix, fullSphereDiagnostic, generateAllToonTextures, generateToonTexture, getColorParameters, getConfigSummaryText, getFeatureFlags, getTextureDefines, hasFeature, inspectMaterial, listAllMaterials, loadAmmo, printDiagnosticReport, printModelSphereInfo, printSphereDiagnostic, quickDiagnose, validateFXEffect };
2375
+ export { type AudioPreset, type BranchCondition, CheerButton, type CheerButtonProps, CheerParticles, type CheerParticlesProps, type CheerParticlesRef, ChoiceMenu, type ChoiceMenuProps, DialogueBox, type DialogueBoxProps, type DialogueBoxTheme, type DialogueChoice, type DialogueHistoryItem, type DialogueLine, type EffectFileType, type FXComment, type FXController, type FXDefine, type FXEffect, type FXFileConfig, type FXMergeStrategy, type FXParameter, FXParser, type FXParserOptions, type FXPass, type FXShaderFunction, type FXStaticVariable, type FXSummary, type FXTechnique, type FXTexture, FXThreePreview, type FXThreePreviewProps, FXToThreeAdapter, FXViewer, type FXViewerProps, type GLSLShader, type GLSLShaders, HLSLToGLSLConverter, HistoryPanel, LoadingOverlay, type LoadingOverlayProps, LoadingScreen, type LoadingScreenProps, LoopConfirmDialog, MMDARPlayer, type MMDARPlayerProps, type MMDARPlayerRef, type MMDDiagnosticReport, MMDLightingDebugPanel, type MMDLightingDebugPanelProps, type MMDLightingParams, type MMDLoaderConfig, MMDMusicPlayer, type MMDMusicPlayerConfig, type MMDMusicPlayerProps, type MMDMusicPlayerRef, MMDPlayerBase, MMDPlayerBaseProps, MMDPlayerBaseRef, MMDPlayerEnhanced, MMDPlayerEnhancedDebugInfo, MMDPlayerEnhancedProps, MMDPlaylist, MMDPlaylistDebugInfo, MMDPlaylistNode, MMDPlaylistProps, MMDResources, type MMDSceneRefs, MMDStage, MMDVisualNovel, type MMDVisualNovelProps, type MMDVisualNovelRef, MMDVisualNovelWithSelector, type MMDVisualNovelWithSelectorProps, type MMDVisualNovelWithSelectorRef, type MaterialTextureMapping, MobileOptimization, type ModelOption, type ModelPreset, type ModelSelectorConfig, ModelSelectorSettings, type ModelSelectorSettingsProps, type MotionPreset, MultiFXAdapter, type MultiFXAdapterOptions, MusicControls, type MusicControlsProps, type MusicTrack, PMXEditor, PMXEditor$1 as PMXEditorCore, type PMXEditorProps, PMXExporter, type PMXHeader, type PMXMaterial, type PMXModelInfo, type PMXParseResult, PMXParser, type PMXTexture, type PMXVertex, PMXViewer, type PMXViewerProps, PlaylistPanel, type PlaylistPanelProps, type SphereTextureDiagnostic, StartScreen, type StartScreenProps, type ThreeMaterialConfig, type ThreeRenderConfig, TrackInfo, type TrackInfoProps, type VisualEffect, type VisualNovelNode, type VisualNovelScript, addDefaultSphereTextures, checkModelSphereDefinition, checkSphereTextures, compareFXEffects, configureMaterialsForMMD, configureRendererForMMD, createMMDLights, diagnoseMaterialsMMD, exportFXToJSON, exportFXToMarkdown, extractTexturePaths, filterDefinesByPrefix, fullSphereDiagnostic, generateAllToonTextures, generateToonTexture, getColorParameters, getConfigSummaryText, getFeatureFlags, getTextureDefines, hasFeature, inspectMaterial, listAllMaterials, loadAmmo, printDiagnosticReport, printModelSphereInfo, printSphereDiagnostic, quickDiagnose, validateFXEffect };
@@ -974,6 +974,10 @@ interface MMDVisualNovelProps {
974
974
  showAutoButton?: boolean;
975
975
  /** 是否显示历史记录按钮 */
976
976
  showHistoryButton?: boolean;
977
+ /** 自定义设置面板内容 */
978
+ customSettingsContent?: React.ReactNode;
979
+ /** 自定义关于面板内容 */
980
+ customAboutContent?: React.ReactNode;
977
981
  /** 样式 */
978
982
  className?: string;
979
983
  style?: React.CSSProperties;
@@ -1041,6 +1045,8 @@ interface MMDVisualNovelRef {
1041
1045
  setAutoMode: (enabled: boolean) => void;
1042
1046
  /** 跳过当前打字动画 */
1043
1047
  skipTyping: () => void;
1048
+ /** 触发视觉特效 */
1049
+ triggerEffect?: (effect: VisualEffect) => void;
1044
1050
  }
1045
1051
 
1046
1052
  /**
@@ -1055,6 +1061,105 @@ interface MMDVisualNovelRef {
1055
1061
  */
1056
1062
  declare const MMDVisualNovel: React__default.ForwardRefExoticComponent<MMDVisualNovelProps & React__default.RefAttributes<MMDVisualNovelRef>>;
1057
1063
 
1064
+ /** 模型选项 */
1065
+ interface ModelOption {
1066
+ /** 唯一标识 */
1067
+ id: string;
1068
+ /** 显示名称 */
1069
+ name: string;
1070
+ /** 模型路径 */
1071
+ path: string | string[];
1072
+ /** 缩略图(可选) */
1073
+ thumbnail?: string;
1074
+ }
1075
+ /** 模型选择器设置属性 */
1076
+ interface ModelSelectorSettingsProps {
1077
+ /** 人物模型选项列表 */
1078
+ characterModels: ModelOption[];
1079
+ /** 场景模型选项列表 */
1080
+ stageModels: ModelOption[];
1081
+ /** 当前选中的人物模型 ID */
1082
+ selectedCharacterId: string;
1083
+ /** 当前选中的场景模型 ID */
1084
+ selectedStageId: string;
1085
+ /** 人物模型选择变化回调 */
1086
+ onCharacterChange: (id: string) => void;
1087
+ /** 场景模型选择变化回调 */
1088
+ onStageChange: (id: string) => void;
1089
+ /** 人物模型标签文字 */
1090
+ characterLabel?: string;
1091
+ /** 场景模型标签文字 */
1092
+ stageLabel?: string;
1093
+ }
1094
+ /**
1095
+ * ModelSelectorSettings - 模型选择器设置组件
1096
+ *
1097
+ * 用于在设置界面中选择人物模型和场景模型
1098
+ */
1099
+ declare const ModelSelectorSettings: React__default.FC<ModelSelectorSettingsProps>;
1100
+
1101
+ /** 模型选择器配置 */
1102
+ interface ModelSelectorConfig {
1103
+ /** 人物模型选项列表 */
1104
+ characterModels: ModelOption[];
1105
+ /** 场景模型选项列表 */
1106
+ stageModels: ModelOption[];
1107
+ /** 默认选中的人物模型 ID(不提供则使用第一个) */
1108
+ defaultCharacterId?: string;
1109
+ /** 默认选中的场景模型 ID(不提供则使用第一个) */
1110
+ defaultStageId?: string;
1111
+ /** 人物模型标签文字 */
1112
+ characterLabel?: string;
1113
+ /** 场景模型标签文字 */
1114
+ stageLabel?: string;
1115
+ }
1116
+ /** 带模型选择器的视觉小说组件属性 */
1117
+ interface MMDVisualNovelWithSelectorProps extends Omit<MMDVisualNovelProps, 'script'> {
1118
+ /** 基础剧本配置(模型路径会被选择器覆盖) */
1119
+ script: VisualNovelScript;
1120
+ /** 模型选择器配置 */
1121
+ modelSelector: ModelSelectorConfig;
1122
+ /** 模型选择变化回调 */
1123
+ onModelSelectionChange?: (characterId: string, stageId: string) => void;
1124
+ }
1125
+ /** 带模型选择器的视觉小说组件 Ref 接口 */
1126
+ interface MMDVisualNovelWithSelectorRef extends MMDVisualNovelRef {
1127
+ /** 获取当前选中的人物模型 ID */
1128
+ getSelectedCharacterId: () => string;
1129
+ /** 获取当前选中的场景模型 ID */
1130
+ getSelectedStageId: () => string;
1131
+ /** 设置人物模型 */
1132
+ setCharacterModel: (id: string) => void;
1133
+ /** 设置场景模型 */
1134
+ setStageModel: (id: string) => void;
1135
+ }
1136
+ /**
1137
+ * MMDVisualNovelWithSelector - 带模型选择器的视觉小说组件
1138
+ *
1139
+ * 功能特性:
1140
+ * - 在设置界面中提供人物模型和场景模型的下拉选择器
1141
+ * - 选择的模型会应用到剧本中的所有节点
1142
+ * - 完全兼容 MMDVisualNovel 的所有功能
1143
+ *
1144
+ * 使用示例:
1145
+ * ```tsx
1146
+ * <MMDVisualNovelWithSelector
1147
+ * script={myScript}
1148
+ * modelSelector={{
1149
+ * characterModels: [
1150
+ * { id: 'miku', name: '初音未来', path: '/models/miku.pmx' },
1151
+ * { id: 'luka', name: '巡音流歌', path: '/models/luka.pmx' },
1152
+ * ],
1153
+ * stageModels: [
1154
+ * { id: 'stage1', name: '教室', path: '/stages/classroom.pmx' },
1155
+ * { id: 'stage2', name: '公园', path: '/stages/park.pmx' },
1156
+ * ],
1157
+ * }}
1158
+ * />
1159
+ * ```
1160
+ */
1161
+ declare const MMDVisualNovelWithSelector: React__default.ForwardRefExoticComponent<MMDVisualNovelWithSelectorProps & React__default.RefAttributes<MMDVisualNovelWithSelectorRef>>;
1162
+
1058
1163
  /**
1059
1164
  * DialogueBox - Galgame 风格对话框组件
1060
1165
  *
@@ -1102,6 +1207,10 @@ interface LoadingOverlayProps {
1102
1207
  onStart?: () => void;
1103
1208
  /** 自定义类名 */
1104
1209
  className?: string;
1210
+ /** 自定义设置面板内容 */
1211
+ customSettingsContent?: React__default.ReactNode;
1212
+ /** 自定义关于面板内容 */
1213
+ customAboutContent?: React__default.ReactNode;
1105
1214
  }
1106
1215
  /**
1107
1216
  * LoadingOverlay - 加载遮罩和开始界面组件容器
@@ -1141,6 +1250,10 @@ interface StartScreenProps {
1141
1250
  onStart?: () => void;
1142
1251
  /** 自定义类名 */
1143
1252
  className?: string;
1253
+ /** 自定义设置面板内容 */
1254
+ customSettingsContent?: React__default.ReactNode;
1255
+ /** 自定义关于面板内容 */
1256
+ customAboutContent?: React__default.ReactNode;
1144
1257
  }
1145
1258
  /**
1146
1259
  * StartScreen - 开始界面组件
@@ -1333,9 +1446,36 @@ interface TrackInfoProps {
1333
1446
  }
1334
1447
  declare const TrackInfo: React__default.FC<TrackInfoProps>;
1335
1448
 
1449
+ /** 预设模型配置 */
1450
+ interface ModelPreset {
1451
+ /** 预设ID */
1452
+ id: string;
1453
+ /** 显示名称 */
1454
+ name: string;
1455
+ /** 缩略图URL */
1456
+ thumbnail?: string;
1457
+ /** 模型路径 (.pmx) */
1458
+ modelPath: string;
1459
+ }
1460
+ /** 预设动作配置 */
1461
+ interface MotionPreset {
1462
+ /** 预设ID */
1463
+ id: string;
1464
+ /** 显示名称 */
1465
+ name: string;
1466
+ /** 动作路径 (.vmd) */
1467
+ motionPath: string;
1468
+ }
1469
+ /** 预设音乐配置 */
1470
+ interface AudioPreset {
1471
+ /** 预设ID */
1472
+ id: string;
1473
+ /** 显示名称 */
1474
+ name: string;
1475
+ /** 音乐路径 */
1476
+ audioPath: string;
1477
+ }
1336
1478
  interface MMDARPlayerProps {
1337
- /** MMD 资源配置 */
1338
- resources: MMDResources;
1339
1479
  /** 舞台配置 */
1340
1480
  stage?: MMDStage;
1341
1481
  /** 移动端优化配置 */
@@ -1358,8 +1498,24 @@ interface MMDARPlayerProps {
1358
1498
  };
1359
1499
  /** 是否开启镜像显示 (通常前置摄像头需要开启) */
1360
1500
  mirrored?: boolean;
1361
- /** 是否显示设置按钮 (允许手动输入模型和动作路径) */
1501
+ /** 是否显示设置按钮 */
1362
1502
  showSettings?: boolean;
1503
+ /** 预设模型列表 */
1504
+ modelPresets: ModelPreset[];
1505
+ /** 预设动作列表 */
1506
+ motionPresets: MotionPreset[];
1507
+ /** 预设音乐列表 (可选) */
1508
+ audioPresets?: AudioPreset[];
1509
+ /** 默认模型ID */
1510
+ defaultModelId?: string;
1511
+ /** 默认动作ID */
1512
+ defaultMotionId?: string;
1513
+ /** 默认音乐ID (可选) */
1514
+ defaultAudioId?: string;
1515
+ /** 初始时是否显示模型 (false 则需要点击放置) */
1516
+ initialModelVisible?: boolean;
1517
+ /** 放置按钮文案 */
1518
+ placementText?: string;
1363
1519
  /** 播放控制 */
1364
1520
  autoPlay?: boolean;
1365
1521
  loop?: boolean;
@@ -1367,6 +1523,7 @@ interface MMDARPlayerProps {
1367
1523
  onCameraReady?: (stream: MediaStream) => void;
1368
1524
  onCameraError?: (error: Error) => void;
1369
1525
  onResourcesChange?: (resources: MMDResources) => void;
1526
+ onModelPlaced?: () => void;
1370
1527
  onLoad?: () => void;
1371
1528
  onError?: (error: Error) => void;
1372
1529
  /** 样式 */
@@ -1382,6 +1539,12 @@ interface MMDARPlayerRef {
1382
1539
  switchCamera: () => Promise<void>;
1383
1540
  /** 截图 (包含视频背景和模型) */
1384
1541
  snapshot: () => Promise<string>;
1542
+ /** 放置模型 */
1543
+ placeModel: () => void;
1544
+ /** 移除模型(重置位置) */
1545
+ removeModel: () => void;
1546
+ /** 切换模型 */
1547
+ switchModel: (resources: MMDResources) => void;
1385
1548
  }
1386
1549
 
1387
1550
  /**
@@ -1389,9 +1552,10 @@ interface MMDARPlayerRef {
1389
1552
  *
1390
1553
  * 功能:
1391
1554
  * - 调用设备摄像头作为背景
1555
+ * - 点击放置模型交互
1392
1556
  * - 叠加透明背景的 MMD 模型渲染
1393
1557
  * - 支持前后摄像头切换
1394
- * - 针对 AR 场景优化模型光照与定位
1558
+ * - 设置面板支持模型/动作/音乐下拉选择
1395
1559
  */
1396
1560
  declare const MMDARPlayer: React__default.ForwardRefExoticComponent<MMDARPlayerProps & React__default.RefAttributes<MMDARPlayerRef>>;
1397
1561
 
@@ -2208,4 +2372,4 @@ interface FXThreePreviewProps {
2208
2372
  }
2209
2373
  declare const FXThreePreview: React__default.FC<FXThreePreviewProps>;
2210
2374
 
2211
- export { type BranchCondition, CheerButton, type CheerButtonProps, CheerParticles, type CheerParticlesProps, type CheerParticlesRef, ChoiceMenu, type ChoiceMenuProps, DialogueBox, type DialogueBoxProps, type DialogueBoxTheme, type DialogueChoice, type DialogueHistoryItem, type DialogueLine, type EffectFileType, type FXComment, type FXController, type FXDefine, type FXEffect, type FXFileConfig, type FXMergeStrategy, type FXParameter, FXParser, type FXParserOptions, type FXPass, type FXShaderFunction, type FXStaticVariable, type FXSummary, type FXTechnique, type FXTexture, FXThreePreview, type FXThreePreviewProps, FXToThreeAdapter, FXViewer, type FXViewerProps, type GLSLShader, type GLSLShaders, HLSLToGLSLConverter, HistoryPanel, LoadingOverlay, type LoadingOverlayProps, LoadingScreen, type LoadingScreenProps, LoopConfirmDialog, MMDARPlayer, type MMDARPlayerProps, type MMDARPlayerRef, type MMDDiagnosticReport, MMDLightingDebugPanel, type MMDLightingDebugPanelProps, type MMDLightingParams, type MMDLoaderConfig, MMDMusicPlayer, type MMDMusicPlayerConfig, type MMDMusicPlayerProps, type MMDMusicPlayerRef, MMDPlayerBase, MMDPlayerBaseProps, MMDPlayerBaseRef, MMDPlayerEnhanced, MMDPlayerEnhancedDebugInfo, MMDPlayerEnhancedProps, MMDPlaylist, MMDPlaylistDebugInfo, MMDPlaylistNode, MMDPlaylistProps, MMDResources, type MMDSceneRefs, MMDStage, MMDVisualNovel, type MMDVisualNovelProps, type MMDVisualNovelRef, type MaterialTextureMapping, MobileOptimization, MultiFXAdapter, type MultiFXAdapterOptions, MusicControls, type MusicControlsProps, type MusicTrack, PMXEditor, PMXEditor$1 as PMXEditorCore, type PMXEditorProps, PMXExporter, type PMXHeader, type PMXMaterial, type PMXModelInfo, type PMXParseResult, PMXParser, type PMXTexture, type PMXVertex, PMXViewer, type PMXViewerProps, PlaylistPanel, type PlaylistPanelProps, type SphereTextureDiagnostic, StartScreen, type StartScreenProps, type ThreeMaterialConfig, type ThreeRenderConfig, TrackInfo, type TrackInfoProps, type VisualEffect, type VisualNovelNode, type VisualNovelScript, addDefaultSphereTextures, checkModelSphereDefinition, checkSphereTextures, compareFXEffects, configureMaterialsForMMD, configureRendererForMMD, createMMDLights, diagnoseMaterialsMMD, exportFXToJSON, exportFXToMarkdown, extractTexturePaths, filterDefinesByPrefix, fullSphereDiagnostic, generateAllToonTextures, generateToonTexture, getColorParameters, getConfigSummaryText, getFeatureFlags, getTextureDefines, hasFeature, inspectMaterial, listAllMaterials, loadAmmo, printDiagnosticReport, printModelSphereInfo, printSphereDiagnostic, quickDiagnose, validateFXEffect };
2375
+ export { type AudioPreset, type BranchCondition, CheerButton, type CheerButtonProps, CheerParticles, type CheerParticlesProps, type CheerParticlesRef, ChoiceMenu, type ChoiceMenuProps, DialogueBox, type DialogueBoxProps, type DialogueBoxTheme, type DialogueChoice, type DialogueHistoryItem, type DialogueLine, type EffectFileType, type FXComment, type FXController, type FXDefine, type FXEffect, type FXFileConfig, type FXMergeStrategy, type FXParameter, FXParser, type FXParserOptions, type FXPass, type FXShaderFunction, type FXStaticVariable, type FXSummary, type FXTechnique, type FXTexture, FXThreePreview, type FXThreePreviewProps, FXToThreeAdapter, FXViewer, type FXViewerProps, type GLSLShader, type GLSLShaders, HLSLToGLSLConverter, HistoryPanel, LoadingOverlay, type LoadingOverlayProps, LoadingScreen, type LoadingScreenProps, LoopConfirmDialog, MMDARPlayer, type MMDARPlayerProps, type MMDARPlayerRef, type MMDDiagnosticReport, MMDLightingDebugPanel, type MMDLightingDebugPanelProps, type MMDLightingParams, type MMDLoaderConfig, MMDMusicPlayer, type MMDMusicPlayerConfig, type MMDMusicPlayerProps, type MMDMusicPlayerRef, MMDPlayerBase, MMDPlayerBaseProps, MMDPlayerBaseRef, MMDPlayerEnhanced, MMDPlayerEnhancedDebugInfo, MMDPlayerEnhancedProps, MMDPlaylist, MMDPlaylistDebugInfo, MMDPlaylistNode, MMDPlaylistProps, MMDResources, type MMDSceneRefs, MMDStage, MMDVisualNovel, type MMDVisualNovelProps, type MMDVisualNovelRef, MMDVisualNovelWithSelector, type MMDVisualNovelWithSelectorProps, type MMDVisualNovelWithSelectorRef, type MaterialTextureMapping, MobileOptimization, type ModelOption, type ModelPreset, type ModelSelectorConfig, ModelSelectorSettings, type ModelSelectorSettingsProps, type MotionPreset, MultiFXAdapter, type MultiFXAdapterOptions, MusicControls, type MusicControlsProps, type MusicTrack, PMXEditor, PMXEditor$1 as PMXEditorCore, type PMXEditorProps, PMXExporter, type PMXHeader, type PMXMaterial, type PMXModelInfo, type PMXParseResult, PMXParser, type PMXTexture, type PMXVertex, PMXViewer, type PMXViewerProps, PlaylistPanel, type PlaylistPanelProps, type SphereTextureDiagnostic, StartScreen, type StartScreenProps, type ThreeMaterialConfig, type ThreeRenderConfig, TrackInfo, type TrackInfoProps, type VisualEffect, type VisualNovelNode, type VisualNovelScript, addDefaultSphereTextures, checkModelSphereDefinition, checkSphereTextures, compareFXEffects, configureMaterialsForMMD, configureRendererForMMD, createMMDLights, diagnoseMaterialsMMD, exportFXToJSON, exportFXToMarkdown, extractTexturePaths, filterDefinesByPrefix, fullSphereDiagnostic, generateAllToonTextures, generateToonTexture, getColorParameters, getConfigSummaryText, getFeatureFlags, getTextureDefines, hasFeature, inspectMaterial, listAllMaterials, loadAmmo, printDiagnosticReport, printModelSphereInfo, printSphereDiagnostic, quickDiagnose, validateFXEffect };