sa2kit 1.6.15 → 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.
@@ -1446,6 +1446,22 @@ interface TrackInfoProps {
1446
1446
  }
1447
1447
  declare const TrackInfo: React__default.FC<TrackInfoProps>;
1448
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
+ }
1449
1465
  /** 预设模型配置 */
1450
1466
  interface ModelPreset {
1451
1467
  /** 预设ID */
@@ -1516,6 +1532,10 @@ interface MMDARPlayerProps {
1516
1532
  initialModelVisible?: boolean;
1517
1533
  /** 放置按钮文案 */
1518
1534
  placementText?: string;
1535
+ /** AR 模式 (默认 Overlay) */
1536
+ arMode?: ARMode;
1537
+ /** 默认 AR 模式 */
1538
+ defaultARMode?: ARMode;
1519
1539
  /** 播放控制 */
1520
1540
  autoPlay?: boolean;
1521
1541
  loop?: boolean;
@@ -1524,6 +1544,7 @@ interface MMDARPlayerProps {
1524
1544
  onCameraError?: (error: Error) => void;
1525
1545
  onResourcesChange?: (resources: MMDResources) => void;
1526
1546
  onModelPlaced?: () => void;
1547
+ onARModeChange?: (mode: ARMode) => void;
1527
1548
  onLoad?: () => void;
1528
1549
  onError?: (error: Error) => void;
1529
1550
  /** 样式 */
@@ -1545,6 +1566,10 @@ interface MMDARPlayerRef {
1545
1566
  removeModel: () => void;
1546
1567
  /** 切换模型 */
1547
1568
  switchModel: (resources: MMDResources) => void;
1569
+ /** 切换 AR 模式 */
1570
+ setARMode: (mode: ARMode) => void;
1571
+ /** 获取当前 AR 模式 */
1572
+ getARMode: () => ARMode;
1548
1573
  }
1549
1574
 
1550
1575
  /**
@@ -1553,9 +1578,8 @@ interface MMDARPlayerRef {
1553
1578
  * 功能:
1554
1579
  * - 调用设备摄像头作为背景
1555
1580
  * - 点击放置模型交互
1556
- * - 叠加透明背景的 MMD 模型渲染
1557
- * - 支持前后摄像头切换
1558
- * - 设置面板支持模型/动作/音乐下拉选择
1581
+ * - 支持两种 AR 模式:叠加模式 / 世界固定模式
1582
+ * - 世界固定模式使用设备陀螺仪实现真正的 AR 体验
1559
1583
  */
1560
1584
  declare const MMDARPlayer: React__default.ForwardRefExoticComponent<MMDARPlayerProps & React__default.RefAttributes<MMDARPlayerRef>>;
1561
1585
 
@@ -2372,4 +2396,4 @@ interface FXThreePreviewProps {
2372
2396
  }
2373
2397
  declare const FXThreePreview: React__default.FC<FXThreePreviewProps>;
2374
2398
 
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 };
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 };
@@ -1446,6 +1446,22 @@ interface TrackInfoProps {
1446
1446
  }
1447
1447
  declare const TrackInfo: React__default.FC<TrackInfoProps>;
1448
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
+ }
1449
1465
  /** 预设模型配置 */
1450
1466
  interface ModelPreset {
1451
1467
  /** 预设ID */
@@ -1516,6 +1532,10 @@ interface MMDARPlayerProps {
1516
1532
  initialModelVisible?: boolean;
1517
1533
  /** 放置按钮文案 */
1518
1534
  placementText?: string;
1535
+ /** AR 模式 (默认 Overlay) */
1536
+ arMode?: ARMode;
1537
+ /** 默认 AR 模式 */
1538
+ defaultARMode?: ARMode;
1519
1539
  /** 播放控制 */
1520
1540
  autoPlay?: boolean;
1521
1541
  loop?: boolean;
@@ -1524,6 +1544,7 @@ interface MMDARPlayerProps {
1524
1544
  onCameraError?: (error: Error) => void;
1525
1545
  onResourcesChange?: (resources: MMDResources) => void;
1526
1546
  onModelPlaced?: () => void;
1547
+ onARModeChange?: (mode: ARMode) => void;
1527
1548
  onLoad?: () => void;
1528
1549
  onError?: (error: Error) => void;
1529
1550
  /** 样式 */
@@ -1545,6 +1566,10 @@ interface MMDARPlayerRef {
1545
1566
  removeModel: () => void;
1546
1567
  /** 切换模型 */
1547
1568
  switchModel: (resources: MMDResources) => void;
1569
+ /** 切换 AR 模式 */
1570
+ setARMode: (mode: ARMode) => void;
1571
+ /** 获取当前 AR 模式 */
1572
+ getARMode: () => ARMode;
1548
1573
  }
1549
1574
 
1550
1575
  /**
@@ -1553,9 +1578,8 @@ interface MMDARPlayerRef {
1553
1578
  * 功能:
1554
1579
  * - 调用设备摄像头作为背景
1555
1580
  * - 点击放置模型交互
1556
- * - 叠加透明背景的 MMD 模型渲染
1557
- * - 支持前后摄像头切换
1558
- * - 设置面板支持模型/动作/音乐下拉选择
1581
+ * - 支持两种 AR 模式:叠加模式 / 世界固定模式
1582
+ * - 世界固定模式使用设备陀螺仪实现真正的 AR 体验
1559
1583
  */
1560
1584
  declare const MMDARPlayer: React__default.ForwardRefExoticComponent<MMDARPlayerProps & React__default.RefAttributes<MMDARPlayerRef>>;
1561
1585
 
@@ -2372,4 +2396,4 @@ interface FXThreePreviewProps {
2372
2396
  }
2373
2397
  declare const FXThreePreview: React__default.FC<FXThreePreviewProps>;
2374
2398
 
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 };
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 };