sa2kit 1.6.14 → 1.6.16

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 (53) 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 +195 -7
  28. package/dist/mmd/index.d.ts +195 -7
  29. package/dist/mmd/index.js +7340 -6702
  30. package/dist/mmd/index.js.map +1 -1
  31. package/dist/mmd/index.mjs +7338 -6703
  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/dist/{types-BINlP9MK.d.mts → types-XTo80Oi_.d.mts} +1 -1
  44. package/dist/{types-BINlP9MK.d.ts → types-XTo80Oi_.d.ts} +1 -1
  45. package/dist/universalExport/index.d.mts +70 -3
  46. package/dist/universalExport/index.d.ts +70 -3
  47. package/dist/universalExport/index.js +568 -0
  48. package/dist/universalExport/index.js.map +1 -1
  49. package/dist/universalExport/index.mjs +563 -1
  50. package/dist/universalExport/index.mjs.map +1 -1
  51. package/dist/universalExport/server/index.d.mts +1 -1
  52. package/dist/universalExport/server/index.d.ts +1 -1
  53. package/package.json +1 -1
@@ -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,52 @@ interface TrackInfoProps {
1333
1446
  }
1334
1447
  declare const TrackInfo: React__default.FC<TrackInfoProps>;
1335
1448
 
1449
+ /**
1450
+ * AR 模式枚举
1451
+ */
1452
+ declare enum ARMode {
1453
+ /**
1454
+ * 叠加模式 - 模型固定在屏幕上,跟随屏幕移动
1455
+ * 特点:简单易用,不需要陀螺仪权限
1456
+ */
1457
+ Overlay = "overlay",
1458
+ /**
1459
+ * 世界固定模式 - 真正的 AR 体验
1460
+ * 特点:模型固定在世界空间,移动设备时模型保持原位
1461
+ * 需要:设备陀螺仪/加速度计权限
1462
+ */
1463
+ WorldFixed = "world-fixed"
1464
+ }
1465
+ /** 预设模型配置 */
1466
+ interface ModelPreset {
1467
+ /** 预设ID */
1468
+ id: string;
1469
+ /** 显示名称 */
1470
+ name: string;
1471
+ /** 缩略图URL */
1472
+ thumbnail?: string;
1473
+ /** 模型路径 (.pmx) */
1474
+ modelPath: string;
1475
+ }
1476
+ /** 预设动作配置 */
1477
+ interface MotionPreset {
1478
+ /** 预设ID */
1479
+ id: string;
1480
+ /** 显示名称 */
1481
+ name: string;
1482
+ /** 动作路径 (.vmd) */
1483
+ motionPath: string;
1484
+ }
1485
+ /** 预设音乐配置 */
1486
+ interface AudioPreset {
1487
+ /** 预设ID */
1488
+ id: string;
1489
+ /** 显示名称 */
1490
+ name: string;
1491
+ /** 音乐路径 */
1492
+ audioPath: string;
1493
+ }
1336
1494
  interface MMDARPlayerProps {
1337
- /** MMD 资源配置 */
1338
- resources: MMDResources;
1339
1495
  /** 舞台配置 */
1340
1496
  stage?: MMDStage;
1341
1497
  /** 移动端优化配置 */
@@ -1358,8 +1514,28 @@ interface MMDARPlayerProps {
1358
1514
  };
1359
1515
  /** 是否开启镜像显示 (通常前置摄像头需要开启) */
1360
1516
  mirrored?: boolean;
1361
- /** 是否显示设置按钮 (允许手动输入模型和动作路径) */
1517
+ /** 是否显示设置按钮 */
1362
1518
  showSettings?: boolean;
1519
+ /** 预设模型列表 */
1520
+ modelPresets: ModelPreset[];
1521
+ /** 预设动作列表 */
1522
+ motionPresets: MotionPreset[];
1523
+ /** 预设音乐列表 (可选) */
1524
+ audioPresets?: AudioPreset[];
1525
+ /** 默认模型ID */
1526
+ defaultModelId?: string;
1527
+ /** 默认动作ID */
1528
+ defaultMotionId?: string;
1529
+ /** 默认音乐ID (可选) */
1530
+ defaultAudioId?: string;
1531
+ /** 初始时是否显示模型 (false 则需要点击放置) */
1532
+ initialModelVisible?: boolean;
1533
+ /** 放置按钮文案 */
1534
+ placementText?: string;
1535
+ /** AR 模式 (默认 Overlay) */
1536
+ arMode?: ARMode;
1537
+ /** 默认 AR 模式 */
1538
+ defaultARMode?: ARMode;
1363
1539
  /** 播放控制 */
1364
1540
  autoPlay?: boolean;
1365
1541
  loop?: boolean;
@@ -1367,6 +1543,8 @@ interface MMDARPlayerProps {
1367
1543
  onCameraReady?: (stream: MediaStream) => void;
1368
1544
  onCameraError?: (error: Error) => void;
1369
1545
  onResourcesChange?: (resources: MMDResources) => void;
1546
+ onModelPlaced?: () => void;
1547
+ onARModeChange?: (mode: ARMode) => void;
1370
1548
  onLoad?: () => void;
1371
1549
  onError?: (error: Error) => void;
1372
1550
  /** 样式 */
@@ -1382,6 +1560,16 @@ interface MMDARPlayerRef {
1382
1560
  switchCamera: () => Promise<void>;
1383
1561
  /** 截图 (包含视频背景和模型) */
1384
1562
  snapshot: () => Promise<string>;
1563
+ /** 放置模型 */
1564
+ placeModel: () => void;
1565
+ /** 移除模型(重置位置) */
1566
+ removeModel: () => void;
1567
+ /** 切换模型 */
1568
+ switchModel: (resources: MMDResources) => void;
1569
+ /** 切换 AR 模式 */
1570
+ setARMode: (mode: ARMode) => void;
1571
+ /** 获取当前 AR 模式 */
1572
+ getARMode: () => ARMode;
1385
1573
  }
1386
1574
 
1387
1575
  /**
@@ -1389,9 +1577,9 @@ interface MMDARPlayerRef {
1389
1577
  *
1390
1578
  * 功能:
1391
1579
  * - 调用设备摄像头作为背景
1392
- * - 叠加透明背景的 MMD 模型渲染
1393
- * - 支持前后摄像头切换
1394
- * - 针对 AR 场景优化模型光照与定位
1580
+ * - 点击放置模型交互
1581
+ * - 支持两种 AR 模式:叠加模式 / 世界固定模式
1582
+ * - 世界固定模式使用设备陀螺仪实现真正的 AR 体验
1395
1583
  */
1396
1584
  declare const MMDARPlayer: React__default.ForwardRefExoticComponent<MMDARPlayerProps & React__default.RefAttributes<MMDARPlayerRef>>;
1397
1585
 
@@ -2208,4 +2396,4 @@ interface FXThreePreviewProps {
2208
2396
  }
2209
2397
  declare const FXThreePreview: React__default.FC<FXThreePreviewProps>;
2210
2398
 
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 };
2399
+ export { ARMode, 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,52 @@ interface TrackInfoProps {
1333
1446
  }
1334
1447
  declare const TrackInfo: React__default.FC<TrackInfoProps>;
1335
1448
 
1449
+ /**
1450
+ * AR 模式枚举
1451
+ */
1452
+ declare enum ARMode {
1453
+ /**
1454
+ * 叠加模式 - 模型固定在屏幕上,跟随屏幕移动
1455
+ * 特点:简单易用,不需要陀螺仪权限
1456
+ */
1457
+ Overlay = "overlay",
1458
+ /**
1459
+ * 世界固定模式 - 真正的 AR 体验
1460
+ * 特点:模型固定在世界空间,移动设备时模型保持原位
1461
+ * 需要:设备陀螺仪/加速度计权限
1462
+ */
1463
+ WorldFixed = "world-fixed"
1464
+ }
1465
+ /** 预设模型配置 */
1466
+ interface ModelPreset {
1467
+ /** 预设ID */
1468
+ id: string;
1469
+ /** 显示名称 */
1470
+ name: string;
1471
+ /** 缩略图URL */
1472
+ thumbnail?: string;
1473
+ /** 模型路径 (.pmx) */
1474
+ modelPath: string;
1475
+ }
1476
+ /** 预设动作配置 */
1477
+ interface MotionPreset {
1478
+ /** 预设ID */
1479
+ id: string;
1480
+ /** 显示名称 */
1481
+ name: string;
1482
+ /** 动作路径 (.vmd) */
1483
+ motionPath: string;
1484
+ }
1485
+ /** 预设音乐配置 */
1486
+ interface AudioPreset {
1487
+ /** 预设ID */
1488
+ id: string;
1489
+ /** 显示名称 */
1490
+ name: string;
1491
+ /** 音乐路径 */
1492
+ audioPath: string;
1493
+ }
1336
1494
  interface MMDARPlayerProps {
1337
- /** MMD 资源配置 */
1338
- resources: MMDResources;
1339
1495
  /** 舞台配置 */
1340
1496
  stage?: MMDStage;
1341
1497
  /** 移动端优化配置 */
@@ -1358,8 +1514,28 @@ interface MMDARPlayerProps {
1358
1514
  };
1359
1515
  /** 是否开启镜像显示 (通常前置摄像头需要开启) */
1360
1516
  mirrored?: boolean;
1361
- /** 是否显示设置按钮 (允许手动输入模型和动作路径) */
1517
+ /** 是否显示设置按钮 */
1362
1518
  showSettings?: boolean;
1519
+ /** 预设模型列表 */
1520
+ modelPresets: ModelPreset[];
1521
+ /** 预设动作列表 */
1522
+ motionPresets: MotionPreset[];
1523
+ /** 预设音乐列表 (可选) */
1524
+ audioPresets?: AudioPreset[];
1525
+ /** 默认模型ID */
1526
+ defaultModelId?: string;
1527
+ /** 默认动作ID */
1528
+ defaultMotionId?: string;
1529
+ /** 默认音乐ID (可选) */
1530
+ defaultAudioId?: string;
1531
+ /** 初始时是否显示模型 (false 则需要点击放置) */
1532
+ initialModelVisible?: boolean;
1533
+ /** 放置按钮文案 */
1534
+ placementText?: string;
1535
+ /** AR 模式 (默认 Overlay) */
1536
+ arMode?: ARMode;
1537
+ /** 默认 AR 模式 */
1538
+ defaultARMode?: ARMode;
1363
1539
  /** 播放控制 */
1364
1540
  autoPlay?: boolean;
1365
1541
  loop?: boolean;
@@ -1367,6 +1543,8 @@ interface MMDARPlayerProps {
1367
1543
  onCameraReady?: (stream: MediaStream) => void;
1368
1544
  onCameraError?: (error: Error) => void;
1369
1545
  onResourcesChange?: (resources: MMDResources) => void;
1546
+ onModelPlaced?: () => void;
1547
+ onARModeChange?: (mode: ARMode) => void;
1370
1548
  onLoad?: () => void;
1371
1549
  onError?: (error: Error) => void;
1372
1550
  /** 样式 */
@@ -1382,6 +1560,16 @@ interface MMDARPlayerRef {
1382
1560
  switchCamera: () => Promise<void>;
1383
1561
  /** 截图 (包含视频背景和模型) */
1384
1562
  snapshot: () => Promise<string>;
1563
+ /** 放置模型 */
1564
+ placeModel: () => void;
1565
+ /** 移除模型(重置位置) */
1566
+ removeModel: () => void;
1567
+ /** 切换模型 */
1568
+ switchModel: (resources: MMDResources) => void;
1569
+ /** 切换 AR 模式 */
1570
+ setARMode: (mode: ARMode) => void;
1571
+ /** 获取当前 AR 模式 */
1572
+ getARMode: () => ARMode;
1385
1573
  }
1386
1574
 
1387
1575
  /**
@@ -1389,9 +1577,9 @@ interface MMDARPlayerRef {
1389
1577
  *
1390
1578
  * 功能:
1391
1579
  * - 调用设备摄像头作为背景
1392
- * - 叠加透明背景的 MMD 模型渲染
1393
- * - 支持前后摄像头切换
1394
- * - 针对 AR 场景优化模型光照与定位
1580
+ * - 点击放置模型交互
1581
+ * - 支持两种 AR 模式:叠加模式 / 世界固定模式
1582
+ * - 世界固定模式使用设备陀螺仪实现真正的 AR 体验
1395
1583
  */
1396
1584
  declare const MMDARPlayer: React__default.ForwardRefExoticComponent<MMDARPlayerProps & React__default.RefAttributes<MMDARPlayerRef>>;
1397
1585
 
@@ -2208,4 +2396,4 @@ interface FXThreePreviewProps {
2208
2396
  }
2209
2397
  declare const FXThreePreview: React__default.FC<FXThreePreviewProps>;
2210
2398
 
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 };
2399
+ export { ARMode, 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 };