@elizaos/app-core 2.0.0-alpha.74 → 2.0.0-alpha.76
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/App.d.ts.map +1 -0
- package/{dist/App.js → App.js} +3 -3
- package/{dist/components → components}/AdvancedPageView.d.ts.map +1 -1
- package/{dist/components → components}/AdvancedPageView.js +0 -10
- package/{dist/components → components}/CharacterView.d.ts.map +1 -1
- package/components/CharacterView.js +685 -0
- package/{dist/components → components}/ChatComposer.d.ts.map +1 -1
- package/{dist/components → components}/ChatComposer.js +4 -4
- package/{dist/components → components}/ChatView.d.ts.map +1 -1
- package/{dist/components → components}/ChatView.js +15 -0
- package/{dist/components → components}/CompanionView.js +1 -1
- package/{dist/components → components}/ConfigPageView.js +1 -1
- package/{dist/components → components}/ElizaCloudDashboard.js +1 -1
- package/{dist/components → components}/FlaminaGuide.js +1 -1
- package/{dist/components → components}/OnboardingWizard.d.ts.map +1 -1
- package/{dist/components → components}/OnboardingWizard.js +3 -2
- package/{dist/components → components}/PluginsView.d.ts.map +1 -1
- package/{dist/components → components}/PluginsView.js +1 -5
- package/{dist/components → components}/avatar/VrmEngine.d.ts +13 -0
- package/{dist/components → components}/avatar/VrmEngine.d.ts.map +1 -1
- package/{dist/components → components}/avatar/VrmEngine.js +66 -0
- package/{dist/components → components}/avatar/VrmViewer.d.ts +15 -0
- package/{dist/components → components}/avatar/VrmViewer.d.ts.map +1 -1
- package/{dist/components → components}/avatar/VrmViewer.js +56 -1
- package/{src/components/index.ts → components/index.d.ts} +1 -1
- package/{dist/components → components}/index.d.ts.map +1 -1
- package/{dist/components → components}/index.js +0 -1
- package/{dist/components → components}/onboarding/ConnectionStep.d.ts.map +1 -1
- package/{dist/components → components}/onboarding/ConnectionStep.js +12 -7
- package/{dist/components → components}/permissions/StreamingPermissions.d.ts.map +1 -1
- package/{dist/components → components}/permissions/StreamingPermissions.js +1 -1
- package/{dist/components → components}/ui-switch.js +4 -4
- package/{dist/i18n → i18n}/locales/en.json +45 -1
- package/{src/i18n → i18n}/locales/es.json +41 -0
- package/{dist/i18n → i18n}/locales/ko.json +41 -0
- package/{dist/i18n → i18n}/locales/pt.json +41 -0
- package/{dist/i18n → i18n}/locales/zh-CN.json +41 -0
- package/package.json +143 -53
- package/{dist/state → state}/AppContext.d.ts.map +1 -1
- package/{dist/state → state}/AppContext.js +38 -16
- package/{dist/styles → styles}/anime.css +1 -4
- package/{dist/styles → styles}/onboarding-game.css +125 -9
- package/.turbo/turbo-build.log +0 -2
- package/.turbo/turbo-lint$colon$check.log +0 -2
- package/.turbo/turbo-typecheck.log +0 -1
- package/dist/App.d.ts.map +0 -1
- package/dist/components/CharacterView.js +0 -719
- package/dist/components/MiladyBar.d.ts +0 -2
- package/dist/components/MiladyBar.d.ts.map +0 -1
- package/dist/components/MiladyBar.js +0 -50
- package/dist/components/MiladyBarSettings.d.ts +0 -2
- package/dist/components/MiladyBarSettings.d.ts.map +0 -1
- package/dist/components/MiladyBarSettings.js +0 -513
- package/dist/components/SecurityPageView.d.ts +0 -2
- package/dist/components/SecurityPageView.d.ts.map +0 -1
- package/dist/components/SecurityPageView.js +0 -81
- package/dist/components/index.d.ts +0 -97
- package/dist/components/milady-bar/CloudCreditsChip.d.ts +0 -2
- package/dist/components/milady-bar/CloudCreditsChip.d.ts.map +0 -1
- package/dist/components/milady-bar/CloudCreditsChip.js +0 -25
- package/dist/components/milady-bar/ProviderDropdown.d.ts +0 -13
- package/dist/components/milady-bar/ProviderDropdown.d.ts.map +0 -1
- package/dist/components/milady-bar/ProviderDropdown.js +0 -68
- package/dist/components/milady-bar/WalletSummary.d.ts +0 -2
- package/dist/components/milady-bar/WalletSummary.d.ts.map +0 -1
- package/dist/components/milady-bar/WalletSummary.js +0 -37
- package/dist/components/milady-bar/index.d.ts +0 -4
- package/dist/components/milady-bar/index.d.ts.map +0 -1
- package/dist/components/milady-bar/index.js +0 -3
- package/dist/hooks/useMiladyBar.d.ts +0 -2
- package/dist/hooks/useMiladyBar.d.ts.map +0 -1
- package/dist/hooks/useMiladyBar.js +0 -472
- package/dist/i18n/locales/es.json +0 -1195
- package/dist/package.json +0 -180
- package/src/App.tsx +0 -504
- package/src/actions/character.test.ts +0 -139
- package/src/actions/character.ts +0 -334
- package/src/actions/chat-helpers.ts +0 -100
- package/src/actions/cloud.ts +0 -59
- package/src/actions/index.ts +0 -12
- package/src/actions/lifecycle.ts +0 -175
- package/src/actions/onboarding.ts +0 -38
- package/src/actions/triggers.ts +0 -190
- package/src/ambient.d.ts +0 -33
- package/src/api/client.ts +0 -5659
- package/src/api/index.ts +0 -1
- package/src/autonomy/index.ts +0 -477
- package/src/bridge/capacitor-bridge.ts +0 -295
- package/src/bridge/electrobun-rpc.ts +0 -78
- package/src/bridge/electrobun-runtime.ts +0 -28
- package/src/bridge/index.ts +0 -5
- package/src/bridge/native-plugins.ts +0 -138
- package/src/bridge/plugin-bridge.ts +0 -352
- package/src/bridge/storage-bridge.ts +0 -162
- package/src/chat/index.ts +0 -250
- package/src/coding/index.ts +0 -43
- package/src/components/AdvancedPageView.tsx +0 -382
- package/src/components/AgentActivityBox.tsx +0 -49
- package/src/components/ApiKeyConfig.tsx +0 -222
- package/src/components/AppsPageView.tsx +0 -52
- package/src/components/AppsView.tsx +0 -293
- package/src/components/AvatarLoader.tsx +0 -104
- package/src/components/AvatarSelector.tsx +0 -223
- package/src/components/BscTradePanel.tsx +0 -549
- package/src/components/BugReportModal.tsx +0 -499
- package/src/components/CharacterRoster.tsx +0 -143
- package/src/components/CharacterView.tsx +0 -1575
- package/src/components/ChatAvatar.test.ts +0 -97
- package/src/components/ChatAvatar.tsx +0 -147
- package/src/components/ChatComposer.tsx +0 -330
- package/src/components/ChatMessage.tsx +0 -448
- package/src/components/ChatModalView.test.tsx +0 -118
- package/src/components/ChatModalView.tsx +0 -125
- package/src/components/ChatView.tsx +0 -992
- package/src/components/CloudOnboarding.tsx +0 -81
- package/src/components/CloudSourceControls.tsx +0 -85
- package/src/components/CodingAgentSettingsSection.tsx +0 -537
- package/src/components/CommandPalette.tsx +0 -284
- package/src/components/CompanionSceneHost.tsx +0 -517
- package/src/components/CompanionShell.tsx +0 -31
- package/src/components/CompanionView.tsx +0 -110
- package/src/components/ConfigPageView.tsx +0 -763
- package/src/components/ConfigSaveFooter.tsx +0 -41
- package/src/components/ConfirmModal.tsx +0 -379
- package/src/components/ConnectionFailedBanner.tsx +0 -91
- package/src/components/ConnectorsPageView.tsx +0 -13
- package/src/components/ConversationsSidebar.tsx +0 -279
- package/src/components/CustomActionEditor.tsx +0 -1127
- package/src/components/CustomActionsPanel.tsx +0 -288
- package/src/components/CustomActionsView.tsx +0 -325
- package/src/components/DatabasePageView.tsx +0 -55
- package/src/components/DatabaseView.tsx +0 -814
- package/src/components/ElizaCloudDashboard.tsx +0 -1696
- package/src/components/EmotePicker.tsx +0 -529
- package/src/components/ErrorBoundary.tsx +0 -76
- package/src/components/FineTuningView.tsx +0 -1080
- package/src/components/FlaminaGuide.test.tsx +0 -61
- package/src/components/FlaminaGuide.tsx +0 -212
- package/src/components/GameView.tsx +0 -551
- package/src/components/GameViewOverlay.tsx +0 -133
- package/src/components/GlobalEmoteOverlay.tsx +0 -152
- package/src/components/Header.test.tsx +0 -413
- package/src/components/Header.tsx +0 -400
- package/src/components/HeartbeatsView.tsx +0 -1003
- package/src/components/InventoryView.tsx +0 -393
- package/src/components/KnowledgeView.tsx +0 -1128
- package/src/components/LanguageDropdown.tsx +0 -192
- package/src/components/LifoMonitorPanel.tsx +0 -196
- package/src/components/LifoSandboxView.tsx +0 -499
- package/src/components/LoadingScreen.tsx +0 -112
- package/src/components/LogsPageView.tsx +0 -17
- package/src/components/LogsView.tsx +0 -239
- package/src/components/MediaGalleryView.tsx +0 -431
- package/src/components/MediaSettingsSection.tsx +0 -893
- package/src/components/MessageContent.tsx +0 -815
- package/src/components/MiladyBar.tsx +0 -103
- package/src/components/MiladyBarSettings.tsx +0 -872
- package/src/components/OnboardingWizard.test.tsx +0 -104
- package/src/components/OnboardingWizard.tsx +0 -249
- package/src/components/PairingView.tsx +0 -109
- package/src/components/PermissionsSection.tsx +0 -1184
- package/src/components/PluginsPageView.tsx +0 -9
- package/src/components/PluginsView.tsx +0 -3129
- package/src/components/ProviderSwitcher.tsx +0 -903
- package/src/components/RestartBanner.tsx +0 -76
- package/src/components/RuntimeView.tsx +0 -460
- package/src/components/SaveCommandModal.tsx +0 -211
- package/src/components/SecretsView.tsx +0 -569
- package/src/components/SecurityPageView.tsx +0 -242
- package/src/components/SettingsView.tsx +0 -825
- package/src/components/ShellOverlays.tsx +0 -41
- package/src/components/ShortcutsOverlay.tsx +0 -155
- package/src/components/SkillsView.tsx +0 -1435
- package/src/components/StartupFailureView.tsx +0 -63
- package/src/components/StreamView.tsx +0 -481
- package/src/components/StripeEmbeddedCheckout.tsx +0 -155
- package/src/components/SubscriptionStatus.tsx +0 -640
- package/src/components/SystemWarningBanner.tsx +0 -71
- package/src/components/ThemeToggle.tsx +0 -103
- package/src/components/TrajectoriesView.tsx +0 -526
- package/src/components/TrajectoryDetailView.tsx +0 -426
- package/src/components/TriggersView.tsx +0 -1
- package/src/components/VectorBrowserView.tsx +0 -1633
- package/src/components/VoiceConfigView.tsx +0 -674
- package/src/components/VrmStage.test.ts +0 -176
- package/src/components/VrmStage.tsx +0 -309
- package/src/components/WhatsAppQrOverlay.tsx +0 -230
- package/src/components/__tests__/chainConfig.test.ts +0 -220
- package/src/components/apps/AppDetailPane.tsx +0 -242
- package/src/components/apps/AppsCatalogGrid.tsx +0 -137
- package/src/components/apps/extensions/registry.ts +0 -13
- package/src/components/apps/extensions/types.ts +0 -9
- package/src/components/apps/helpers.ts +0 -43
- package/src/components/avatar/VrmAnimationLoader.test.ts +0 -164
- package/src/components/avatar/VrmAnimationLoader.ts +0 -151
- package/src/components/avatar/VrmBlinkController.ts +0 -118
- package/src/components/avatar/VrmCameraManager.ts +0 -407
- package/src/components/avatar/VrmEngine.ts +0 -2767
- package/src/components/avatar/VrmFootShadow.ts +0 -96
- package/src/components/avatar/VrmViewer.tsx +0 -421
- package/src/components/avatar/__tests__/VrmCameraManager.test.ts +0 -168
- package/src/components/avatar/__tests__/VrmEngine.test.ts +0 -1574
- package/src/components/avatar/mixamoVRMRigMap.ts +0 -62
- package/src/components/avatar/retargetMixamoFbxToVrm.ts +0 -144
- package/src/components/avatar/retargetMixamoGltfToVrm.ts +0 -119
- package/src/components/chainConfig.ts +0 -400
- package/src/components/companion/CompanionHeader.tsx +0 -50
- package/src/components/companion/CompanionSceneHost.tsx +0 -5
- package/src/components/companion/VrmStage.tsx +0 -2
- package/src/components/companion/__tests__/walletUtils.test.ts +0 -742
- package/src/components/companion/index.ts +0 -18
- package/src/components/companion/walletUtils.ts +0 -290
- package/src/components/companion-shell-styles.test.ts +0 -142
- package/src/components/companion-shell-styles.ts +0 -270
- package/src/components/confirm-delete-control.tsx +0 -69
- package/src/components/conversations/ConversationListItem.tsx +0 -185
- package/src/components/conversations/conversation-utils.ts +0 -151
- package/src/components/format.ts +0 -131
- package/src/components/inventory/CopyableAddress.tsx +0 -41
- package/src/components/inventory/InventoryToolbar.tsx +0 -142
- package/src/components/inventory/NftGrid.tsx +0 -99
- package/src/components/inventory/TokenLogo.tsx +0 -71
- package/src/components/inventory/TokensTable.tsx +0 -216
- package/src/components/inventory/constants.ts +0 -170
- package/src/components/inventory/index.ts +0 -29
- package/src/components/inventory/media-url.test.ts +0 -38
- package/src/components/inventory/media-url.ts +0 -36
- package/src/components/inventory/useInventoryData.ts +0 -460
- package/src/components/knowledge-upload-image.ts +0 -215
- package/src/components/labels.ts +0 -46
- package/src/components/milady-bar/CloudCreditsChip.tsx +0 -61
- package/src/components/milady-bar/ProviderDropdown.tsx +0 -166
- package/src/components/milady-bar/WalletSummary.tsx +0 -61
- package/src/components/milady-bar/index.ts +0 -3
- package/src/components/onboarding/ActivateStep.tsx +0 -34
- package/src/components/onboarding/ConnectionStep.tsx +0 -1590
- package/src/components/onboarding/IdentityStep.tsx +0 -251
- package/src/components/onboarding/OnboardingPanel.tsx +0 -39
- package/src/components/onboarding/OnboardingStepNav.tsx +0 -41
- package/src/components/onboarding/PermissionsStep.tsx +0 -20
- package/src/components/onboarding/RpcStep.tsx +0 -402
- package/src/components/permissions/PermissionIcon.tsx +0 -25
- package/src/components/permissions/StreamingPermissions.tsx +0 -413
- package/src/components/plugins/showcase-data.ts +0 -481
- package/src/components/shared/ShellHeaderControls.tsx +0 -198
- package/src/components/shared-companion-scene-context.ts +0 -15
- package/src/components/skeletons.tsx +0 -88
- package/src/components/stream/ActivityFeed.tsx +0 -113
- package/src/components/stream/AvatarPip.tsx +0 -10
- package/src/components/stream/ChatContent.tsx +0 -126
- package/src/components/stream/ChatTicker.tsx +0 -55
- package/src/components/stream/IdleContent.tsx +0 -73
- package/src/components/stream/StatusBar.tsx +0 -463
- package/src/components/stream/StreamSettings.tsx +0 -506
- package/src/components/stream/StreamTerminal.tsx +0 -94
- package/src/components/stream/StreamVoiceConfig.tsx +0 -160
- package/src/components/stream/helpers.ts +0 -134
- package/src/components/stream/overlays/OverlayLayer.tsx +0 -75
- package/src/components/stream/overlays/built-in/ActionTickerWidget.tsx +0 -64
- package/src/components/stream/overlays/built-in/AlertPopupWidget.tsx +0 -87
- package/src/components/stream/overlays/built-in/BrandingWidget.tsx +0 -51
- package/src/components/stream/overlays/built-in/CustomHtmlWidget.tsx +0 -105
- package/src/components/stream/overlays/built-in/PeonGlassWidget.tsx +0 -265
- package/src/components/stream/overlays/built-in/PeonHudWidget.tsx +0 -247
- package/src/components/stream/overlays/built-in/PeonSakuraWidget.tsx +0 -278
- package/src/components/stream/overlays/built-in/ThoughtBubbleWidget.tsx +0 -77
- package/src/components/stream/overlays/built-in/ViewerCountWidget.tsx +0 -46
- package/src/components/stream/overlays/built-in/index.ts +0 -13
- package/src/components/stream/overlays/registry.ts +0 -22
- package/src/components/stream/overlays/types.ts +0 -90
- package/src/components/stream/overlays/useOverlayLayout.ts +0 -218
- package/src/components/trajectory-format.ts +0 -50
- package/src/components/ui-badges.tsx +0 -109
- package/src/components/ui-switch.tsx +0 -57
- package/src/components/vector-browser-three.ts +0 -29
- package/src/config/branding.ts +0 -67
- package/src/config/config-catalog.ts +0 -1092
- package/src/config/config-field.tsx +0 -1924
- package/src/config/config-renderer.tsx +0 -734
- package/src/config/index.ts +0 -12
- package/src/config/ui-renderer.tsx +0 -1751
- package/src/config/ui-spec.ts +0 -256
- package/src/events/index.ts +0 -96
- package/src/hooks/index.ts +0 -14
- package/src/hooks/useBugReport.tsx +0 -43
- package/src/hooks/useCanvasWindow.ts +0 -372
- package/src/hooks/useChatAvatarVoice.ts +0 -111
- package/src/hooks/useClickOutside.ts +0 -31
- package/src/hooks/useContextMenu.ts +0 -127
- package/src/hooks/useKeyboardShortcuts.ts +0 -86
- package/src/hooks/useLifoSync.ts +0 -143
- package/src/hooks/useMemoryMonitor.ts +0 -334
- package/src/hooks/useMiladyBar.ts +0 -594
- package/src/hooks/useRenderGuard.ts +0 -43
- package/src/hooks/useRetakeCapture.ts +0 -68
- package/src/hooks/useStreamPopoutNavigation.ts +0 -27
- package/src/hooks/useTimeout.ts +0 -37
- package/src/hooks/useVoiceChat.ts +0 -1442
- package/src/hooks/useWhatsAppPairing.ts +0 -123
- package/src/i18n/index.ts +0 -76
- package/src/i18n/locales/en.json +0 -1195
- package/src/i18n/locales/ko.json +0 -1195
- package/src/i18n/locales/pt.json +0 -1195
- package/src/i18n/locales/zh-CN.json +0 -1195
- package/src/i18n/messages.ts +0 -21
- package/src/index.ts +0 -6
- package/src/navigation/index.ts +0 -286
- package/src/navigation.test.ts +0 -189
- package/src/onboarding-config.test.ts +0 -104
- package/src/onboarding-config.ts +0 -122
- package/src/platform/browser-launch.test.ts +0 -94
- package/src/platform/browser-launch.ts +0 -149
- package/src/platform/index.ts +0 -58
- package/src/platform/init.ts +0 -238
- package/src/platform/lifo.ts +0 -225
- package/src/providers/index.ts +0 -108
- package/src/shell-params.test.ts +0 -48
- package/src/shell-params.ts +0 -36
- package/src/state/AppContext.tsx +0 -6415
- package/src/state/index.ts +0 -6
- package/src/state/internal.ts +0 -91
- package/src/state/onboarding-resume.test.ts +0 -135
- package/src/state/onboarding-resume.ts +0 -263
- package/src/state/parsers.test.ts +0 -124
- package/src/state/parsers.ts +0 -309
- package/src/state/persistence.ts +0 -379
- package/src/state/shell-routing.ts +0 -39
- package/src/state/types.ts +0 -724
- package/src/state/ui-preferences.ts +0 -3
- package/src/state/useApp.ts +0 -23
- package/src/state/vrm.ts +0 -108
- package/src/styles/anime.css +0 -6324
- package/src/styles/base.css +0 -213
- package/src/styles/onboarding-game.css +0 -976
- package/src/styles/styles.css +0 -2087
- package/src/styles/xterm.css +0 -241
- package/src/types/index.ts +0 -715
- package/src/types/react-test-renderer.d.ts +0 -45
- package/src/utils/asset-url.ts +0 -110
- package/src/utils/assistant-text.ts +0 -172
- package/src/utils/clipboard.ts +0 -41
- package/src/utils/desktop-dialogs.ts +0 -80
- package/src/utils/eliza-globals.ts +0 -44
- package/src/utils/index.ts +0 -7
- package/src/utils/number-parsing.ts +0 -125
- package/src/utils/openExternalUrl.ts +0 -20
- package/src/utils/spoken-text.ts +0 -65
- package/src/utils/streaming-text.ts +0 -120
- package/src/voice/index.ts +0 -1
- package/src/voice/types.ts +0 -197
- package/src/wallet-rpc.ts +0 -176
- package/test/app/AppContext.pty-sessions.test.tsx +0 -143
- package/test/app/MessageContent.test.tsx +0 -366
- package/test/app/PermissionsOnboarding.test.tsx +0 -358
- package/test/app/PermissionsSection.test.tsx +0 -575
- package/test/app/advanced-trajectory-fine-tuning.e2e.test.ts +0 -396
- package/test/app/agent-activity-box.test.tsx +0 -132
- package/test/app/agent-transfer-lock.test.ts +0 -279
- package/test/app/api-client-electrobun-fallback.test.ts +0 -139
- package/test/app/api-client-electron-fallback.test.ts +0 -139
- package/test/app/api-client-timeout.test.ts +0 -75
- package/test/app/api-client-ws.test.ts +0 -98
- package/test/app/api-client.ws-max-reconnect.test.ts +0 -139
- package/test/app/api-client.ws-reconnect.test.ts +0 -157
- package/test/app/app-context-autonomy-events.test.ts +0 -559
- package/test/app/apps-page-view.test.ts +0 -114
- package/test/app/apps-view.test.ts +0 -768
- package/test/app/autonomous-workflows.e2e.test.ts +0 -765
- package/test/app/autonomy-events.test.ts +0 -150
- package/test/app/avatar-selector.test.tsx +0 -52
- package/test/app/bsc-trade-panel.test.tsx +0 -134
- package/test/app/bug-report-modal.test.tsx +0 -353
- package/test/app/character-action-bar-visibility.test.ts +0 -70
- package/test/app/character-customization.e2e.test.ts +0 -1384
- package/test/app/character-save-journey.test.ts +0 -1245
- package/test/app/chat-advanced-features.e2e.test.ts +0 -706
- package/test/app/chat-composer.test.tsx +0 -181
- package/test/app/chat-journey.test.ts +0 -1075
- package/test/app/chat-language-header.test.ts +0 -64
- package/test/app/chat-message.test.tsx +0 -222
- package/test/app/chat-modal-view.test.tsx +0 -191
- package/test/app/chat-routine-filter.test.ts +0 -96
- package/test/app/chat-send-lock.test.ts +0 -1465
- package/test/app/chat-stream-api-client.test.tsx +0 -390
- package/test/app/chat-view-game-modal.test.tsx +0 -661
- package/test/app/chat-view.test.tsx +0 -877
- package/test/app/cloud-api.e2e.test.ts +0 -258
- package/test/app/cloud-login-flow.e2e.test.ts +0 -494
- package/test/app/cloud-login-lock.test.ts +0 -416
- package/test/app/command-palette.test.tsx +0 -184
- package/test/app/command-registry.test.ts +0 -75
- package/test/app/companion-greeting-wave.test.tsx +0 -431
- package/test/app/companion-scene-host.test.tsx +0 -85
- package/test/app/companion-stale-conversation.test.tsx +0 -447
- package/test/app/companion-view.test.tsx +0 -690
- package/test/app/confirm-delete-control.test.ts +0 -79
- package/test/app/confirm-modal.test.tsx +0 -219
- package/test/app/connection-mode-persistence.test.ts +0 -411
- package/test/app/connectors-ui.e2e.test.ts +0 -508
- package/test/app/conversations-sidebar-game-modal.test.tsx +0 -265
- package/test/app/conversations-sidebar.test.tsx +0 -185
- package/test/app/custom-actions-smoke.test.ts +0 -387
- package/test/app/custom-avatar-api-client.test.ts +0 -207
- package/test/app/desktop-utils.test.ts +0 -145
- package/test/app/electrobun-rpc-bridge.test.ts +0 -83
- package/test/app/events.test.ts +0 -88
- package/test/app/export-import-flows.e2e.test.ts +0 -700
- package/test/app/fine-tuning-view.test.ts +0 -471
- package/test/app/game-view-auth-session.test.tsx +0 -187
- package/test/app/game-view.test.ts +0 -444
- package/test/app/global-emote-overlay.test.tsx +0 -106
- package/test/app/header-status.test.tsx +0 -149
- package/test/app/i18n.test.ts +0 -152
- package/test/app/inventory-bsc-view.test.ts +0 -940
- package/test/app/knowledge-ui.e2e.test.ts +0 -762
- package/test/app/knowledge-upload-helpers.test.ts +0 -124
- package/test/app/lifecycle-lock.test.ts +0 -267
- package/test/app/lifo-popout-utils.test.ts +0 -208
- package/test/app/lifo-safe-endpoint.test.ts +0 -34
- package/test/app/loading-screen.test.tsx +0 -45
- package/test/app/memory-monitor.test.ts +0 -331
- package/test/app/milady-bar-regression.test.tsx +0 -519
- package/test/app/milady-bar-settings.test.tsx +0 -1056
- package/test/app/milady-bar.test.tsx +0 -583
- package/test/app/navigation.test.tsx +0 -22
- package/test/app/onboarding-e2e-journey.test.ts +0 -1391
- package/test/app/onboarding-finish-lock.test.ts +0 -676
- package/test/app/onboarding-language.test.tsx +0 -160
- package/test/app/onboarding-steps.test.tsx +0 -376
- package/test/app/open-external-url.test.ts +0 -65
- package/test/app/pages-navigation-smoke.e2e.test.ts +0 -646
- package/test/app/pairing-lock.test.ts +0 -260
- package/test/app/pairing-view.test.tsx +0 -74
- package/test/app/permissions-section.test.ts +0 -432
- package/test/app/plugin-bridge.test.ts +0 -109
- package/test/app/plugins-ui.e2e.test.ts +0 -605
- package/test/app/plugins-view-game-modal.test.tsx +0 -686
- package/test/app/plugins-view-toggle-restart.test.ts +0 -129
- package/test/app/provider-dropdown-default.test.tsx +0 -300
- package/test/app/restart-banner.test.tsx +0 -205
- package/test/app/retake-capture.test.ts +0 -84
- package/test/app/sandbox-api-client.test.ts +0 -108
- package/test/app/save-command-modal.test.tsx +0 -109
- package/test/app/secrets-view.test.tsx +0 -92
- package/test/app/settings-control-styles.test.tsx +0 -142
- package/test/app/settings-reset.e2e.test.ts +0 -726
- package/test/app/settings-sections.e2e.test.ts +0 -614
- package/test/app/shared-format.test.ts +0 -44
- package/test/app/shared-switch.test.ts +0 -69
- package/test/app/shell-mode-switching.e2e.test.ts +0 -841
- package/test/app/shell-mode-tab-memory.test.tsx +0 -58
- package/test/app/shell-overlays.test.tsx +0 -50
- package/test/app/shortcuts-overlay.test.tsx +0 -111
- package/test/app/sse-interruption.test.ts +0 -122
- package/test/app/startup-asset-missing.e2e.test.ts +0 -126
- package/test/app/startup-backend-missing.e2e.test.ts +0 -126
- package/test/app/startup-chat.e2e.test.ts +0 -323
- package/test/app/startup-conversation-restore.test.tsx +0 -381
- package/test/app/startup-failure-view.test.tsx +0 -103
- package/test/app/startup-onboarding.e2e.test.ts +0 -712
- package/test/app/startup-timeout.test.tsx +0 -80
- package/test/app/startup-token-401.e2e.test.ts +0 -103
- package/test/app/stream-helpers.test.ts +0 -46
- package/test/app/stream-popout-navigation.test.tsx +0 -41
- package/test/app/stream-status-bar.test.tsx +0 -89
- package/test/app/theme-toggle.test.tsx +0 -40
- package/test/app/training-api-client.test.ts +0 -128
- package/test/app/trajectories-view.test.tsx +0 -220
- package/test/app/triggers-api-client.test.ts +0 -77
- package/test/app/triggers-navigation.test.ts +0 -113
- package/test/app/triggers-view.e2e.test.ts +0 -675
- package/test/app/update-channel-lock.test.ts +0 -259
- package/test/app/vector-browser.async-cleanup.test.tsx +0 -367
- package/test/app/vector-browser.e2e.test.ts +0 -653
- package/test/app/vrm-stage.test.tsx +0 -351
- package/test/app/vrm-viewer.test.tsx +0 -298
- package/test/app/wallet-api-save-lock.test.ts +0 -299
- package/test/app/wallet-hooks.test.ts +0 -405
- package/test/app/wallet-ui-flows.e2e.test.ts +0 -556
- package/test/avatar/asset-url.test.ts +0 -90
- package/test/avatar/avatar-selector.test.ts +0 -173
- package/test/avatar/mixamo-vrm-rig-map.test.ts +0 -111
- package/test/avatar/voice-chat-streaming-text.test.ts +0 -96
- package/test/avatar/voice-chat.test.ts +0 -391
- package/test/browser-extension/README.md +0 -138
- package/test/browser-extension/test-harness.ts +0 -499
- package/test/capacitor-plugins.e2e.test.ts +0 -168
- package/test/test-types.ts +0 -5
- package/test/ui/command-palette-commands.test.ts +0 -57
- package/test/ui/ui-renderer.test.ts +0 -39
- package/test/utils/assistant-text.test.ts +0 -68
- package/test/utils/eliza-globals.test.ts +0 -59
- package/test/utils/package-exports.test.ts +0 -70
- package/test/utils/streaming-text.test.ts +0 -89
- package/tsconfig.build.json +0 -19
- package/tsconfig.json +0 -20
- package/tsconfig.typecheck.json +0 -12
- /package/{dist/App.d.ts → App.d.ts} +0 -0
- /package/{dist/actions → actions}/character.d.ts +0 -0
- /package/{dist/actions → actions}/character.d.ts.map +0 -0
- /package/{dist/actions → actions}/character.js +0 -0
- /package/{dist/actions → actions}/chat-helpers.d.ts +0 -0
- /package/{dist/actions → actions}/chat-helpers.d.ts.map +0 -0
- /package/{dist/actions → actions}/chat-helpers.js +0 -0
- /package/{dist/actions → actions}/cloud.d.ts +0 -0
- /package/{dist/actions → actions}/cloud.d.ts.map +0 -0
- /package/{dist/actions → actions}/cloud.js +0 -0
- /package/{dist/actions → actions}/index.d.ts +0 -0
- /package/{dist/actions → actions}/index.d.ts.map +0 -0
- /package/{dist/actions → actions}/index.js +0 -0
- /package/{dist/actions → actions}/lifecycle.d.ts +0 -0
- /package/{dist/actions → actions}/lifecycle.d.ts.map +0 -0
- /package/{dist/actions → actions}/lifecycle.js +0 -0
- /package/{dist/actions → actions}/onboarding.d.ts +0 -0
- /package/{dist/actions → actions}/onboarding.d.ts.map +0 -0
- /package/{dist/actions → actions}/onboarding.js +0 -0
- /package/{dist/actions → actions}/triggers.d.ts +0 -0
- /package/{dist/actions → actions}/triggers.d.ts.map +0 -0
- /package/{dist/actions → actions}/triggers.js +0 -0
- /package/{dist/api → api}/client.d.ts +0 -0
- /package/{dist/api → api}/client.d.ts.map +0 -0
- /package/{dist/api → api}/client.js +0 -0
- /package/{dist/api → api}/index.d.ts +0 -0
- /package/{dist/api → api}/index.d.ts.map +0 -0
- /package/{dist/api → api}/index.js +0 -0
- /package/{dist/autonomy → autonomy}/index.d.ts +0 -0
- /package/{dist/autonomy → autonomy}/index.d.ts.map +0 -0
- /package/{dist/autonomy → autonomy}/index.js +0 -0
- /package/{dist/bridge → bridge}/capacitor-bridge.d.ts +0 -0
- /package/{dist/bridge → bridge}/capacitor-bridge.d.ts.map +0 -0
- /package/{dist/bridge → bridge}/capacitor-bridge.js +0 -0
- /package/{dist/bridge → bridge}/electrobun-rpc.d.ts +0 -0
- /package/{dist/bridge → bridge}/electrobun-rpc.d.ts.map +0 -0
- /package/{dist/bridge → bridge}/electrobun-rpc.js +0 -0
- /package/{dist/bridge → bridge}/electrobun-runtime.d.ts +0 -0
- /package/{dist/bridge → bridge}/electrobun-runtime.d.ts.map +0 -0
- /package/{dist/bridge → bridge}/electrobun-runtime.js +0 -0
- /package/{dist/bridge → bridge}/index.d.ts +0 -0
- /package/{dist/bridge → bridge}/index.d.ts.map +0 -0
- /package/{dist/bridge → bridge}/index.js +0 -0
- /package/{dist/bridge → bridge}/native-plugins.d.ts +0 -0
- /package/{dist/bridge → bridge}/native-plugins.d.ts.map +0 -0
- /package/{dist/bridge → bridge}/native-plugins.js +0 -0
- /package/{dist/bridge → bridge}/plugin-bridge.d.ts +0 -0
- /package/{dist/bridge → bridge}/plugin-bridge.d.ts.map +0 -0
- /package/{dist/bridge → bridge}/plugin-bridge.js +0 -0
- /package/{dist/bridge → bridge}/storage-bridge.d.ts +0 -0
- /package/{dist/bridge → bridge}/storage-bridge.d.ts.map +0 -0
- /package/{dist/bridge → bridge}/storage-bridge.js +0 -0
- /package/{dist/chat → chat}/index.d.ts +0 -0
- /package/{dist/chat → chat}/index.d.ts.map +0 -0
- /package/{dist/chat → chat}/index.js +0 -0
- /package/{dist/coding → coding}/index.d.ts +0 -0
- /package/{dist/coding → coding}/index.d.ts.map +0 -0
- /package/{dist/coding → coding}/index.js +0 -0
- /package/{dist/components → components}/AdvancedPageView.d.ts +0 -0
- /package/{dist/components → components}/AgentActivityBox.d.ts +0 -0
- /package/{dist/components → components}/AgentActivityBox.d.ts.map +0 -0
- /package/{dist/components → components}/AgentActivityBox.js +0 -0
- /package/{dist/components → components}/ApiKeyConfig.d.ts +0 -0
- /package/{dist/components → components}/ApiKeyConfig.d.ts.map +0 -0
- /package/{dist/components → components}/ApiKeyConfig.js +0 -0
- /package/{dist/components → components}/AppsPageView.d.ts +0 -0
- /package/{dist/components → components}/AppsPageView.d.ts.map +0 -0
- /package/{dist/components → components}/AppsPageView.js +0 -0
- /package/{dist/components → components}/AppsView.d.ts +0 -0
- /package/{dist/components → components}/AppsView.d.ts.map +0 -0
- /package/{dist/components → components}/AppsView.js +0 -0
- /package/{dist/components → components}/AvatarLoader.d.ts +0 -0
- /package/{dist/components → components}/AvatarLoader.d.ts.map +0 -0
- /package/{dist/components → components}/AvatarLoader.js +0 -0
- /package/{dist/components → components}/AvatarSelector.d.ts +0 -0
- /package/{dist/components → components}/AvatarSelector.d.ts.map +0 -0
- /package/{dist/components → components}/AvatarSelector.js +0 -0
- /package/{dist/components → components}/BscTradePanel.d.ts +0 -0
- /package/{dist/components → components}/BscTradePanel.d.ts.map +0 -0
- /package/{dist/components → components}/BscTradePanel.js +0 -0
- /package/{dist/components → components}/BugReportModal.d.ts +0 -0
- /package/{dist/components → components}/BugReportModal.d.ts.map +0 -0
- /package/{dist/components → components}/BugReportModal.js +0 -0
- /package/{dist/components → components}/CharacterRoster.d.ts +0 -0
- /package/{dist/components → components}/CharacterRoster.d.ts.map +0 -0
- /package/{dist/components → components}/CharacterRoster.js +0 -0
- /package/{dist/components → components}/CharacterView.d.ts +0 -0
- /package/{dist/components → components}/ChatAvatar.d.ts +0 -0
- /package/{dist/components → components}/ChatAvatar.d.ts.map +0 -0
- /package/{dist/components → components}/ChatAvatar.js +0 -0
- /package/{dist/components → components}/ChatComposer.d.ts +0 -0
- /package/{dist/components → components}/ChatMessage.d.ts +0 -0
- /package/{dist/components → components}/ChatMessage.d.ts.map +0 -0
- /package/{dist/components → components}/ChatMessage.js +0 -0
- /package/{dist/components → components}/ChatModalView.d.ts +0 -0
- /package/{dist/components → components}/ChatModalView.d.ts.map +0 -0
- /package/{dist/components → components}/ChatModalView.js +0 -0
- /package/{dist/components → components}/ChatView.d.ts +0 -0
- /package/{dist/components → components}/CloudOnboarding.d.ts +0 -0
- /package/{dist/components → components}/CloudOnboarding.d.ts.map +0 -0
- /package/{dist/components → components}/CloudOnboarding.js +0 -0
- /package/{dist/components → components}/CloudSourceControls.d.ts +0 -0
- /package/{dist/components → components}/CloudSourceControls.d.ts.map +0 -0
- /package/{dist/components → components}/CloudSourceControls.js +0 -0
- /package/{dist/components → components}/CodingAgentSettingsSection.d.ts +0 -0
- /package/{dist/components → components}/CodingAgentSettingsSection.d.ts.map +0 -0
- /package/{dist/components → components}/CodingAgentSettingsSection.js +0 -0
- /package/{dist/components → components}/CommandPalette.d.ts +0 -0
- /package/{dist/components → components}/CommandPalette.d.ts.map +0 -0
- /package/{dist/components → components}/CommandPalette.js +0 -0
- /package/{dist/components → components}/CompanionSceneHost.d.ts +0 -0
- /package/{dist/components → components}/CompanionSceneHost.d.ts.map +0 -0
- /package/{dist/components → components}/CompanionSceneHost.js +0 -0
- /package/{dist/components → components}/CompanionShell.d.ts +0 -0
- /package/{dist/components → components}/CompanionShell.d.ts.map +0 -0
- /package/{dist/components → components}/CompanionShell.js +0 -0
- /package/{dist/components → components}/CompanionView.d.ts +0 -0
- /package/{dist/components → components}/CompanionView.d.ts.map +0 -0
- /package/{dist/components → components}/ConfigPageView.d.ts +0 -0
- /package/{dist/components → components}/ConfigPageView.d.ts.map +0 -0
- /package/{dist/components → components}/ConfigSaveFooter.d.ts +0 -0
- /package/{dist/components → components}/ConfigSaveFooter.d.ts.map +0 -0
- /package/{dist/components → components}/ConfigSaveFooter.js +0 -0
- /package/{dist/components → components}/ConfirmModal.d.ts +0 -0
- /package/{dist/components → components}/ConfirmModal.d.ts.map +0 -0
- /package/{dist/components → components}/ConfirmModal.js +0 -0
- /package/{dist/components → components}/ConnectionFailedBanner.d.ts +0 -0
- /package/{dist/components → components}/ConnectionFailedBanner.d.ts.map +0 -0
- /package/{dist/components → components}/ConnectionFailedBanner.js +0 -0
- /package/{dist/components → components}/ConnectorsPageView.d.ts +0 -0
- /package/{dist/components → components}/ConnectorsPageView.d.ts.map +0 -0
- /package/{dist/components → components}/ConnectorsPageView.js +0 -0
- /package/{dist/components → components}/ConversationsSidebar.d.ts +0 -0
- /package/{dist/components → components}/ConversationsSidebar.d.ts.map +0 -0
- /package/{dist/components → components}/ConversationsSidebar.js +0 -0
- /package/{dist/components → components}/CustomActionEditor.d.ts +0 -0
- /package/{dist/components → components}/CustomActionEditor.d.ts.map +0 -0
- /package/{dist/components → components}/CustomActionEditor.js +0 -0
- /package/{dist/components → components}/CustomActionsPanel.d.ts +0 -0
- /package/{dist/components → components}/CustomActionsPanel.d.ts.map +0 -0
- /package/{dist/components → components}/CustomActionsPanel.js +0 -0
- /package/{dist/components → components}/CustomActionsView.d.ts +0 -0
- /package/{dist/components → components}/CustomActionsView.d.ts.map +0 -0
- /package/{dist/components → components}/CustomActionsView.js +0 -0
- /package/{dist/components → components}/DatabasePageView.d.ts +0 -0
- /package/{dist/components → components}/DatabasePageView.d.ts.map +0 -0
- /package/{dist/components → components}/DatabasePageView.js +0 -0
- /package/{dist/components → components}/DatabaseView.d.ts +0 -0
- /package/{dist/components → components}/DatabaseView.d.ts.map +0 -0
- /package/{dist/components → components}/DatabaseView.js +0 -0
- /package/{dist/components → components}/ElizaCloudDashboard.d.ts +0 -0
- /package/{dist/components → components}/ElizaCloudDashboard.d.ts.map +0 -0
- /package/{dist/components → components}/EmotePicker.d.ts +0 -0
- /package/{dist/components → components}/EmotePicker.d.ts.map +0 -0
- /package/{dist/components → components}/EmotePicker.js +0 -0
- /package/{dist/components → components}/ErrorBoundary.d.ts +0 -0
- /package/{dist/components → components}/ErrorBoundary.d.ts.map +0 -0
- /package/{dist/components → components}/ErrorBoundary.js +0 -0
- /package/{dist/components → components}/FineTuningView.d.ts +0 -0
- /package/{dist/components → components}/FineTuningView.d.ts.map +0 -0
- /package/{dist/components → components}/FineTuningView.js +0 -0
- /package/{dist/components → components}/FlaminaGuide.d.ts +0 -0
- /package/{dist/components → components}/FlaminaGuide.d.ts.map +0 -0
- /package/{dist/components → components}/GameView.d.ts +0 -0
- /package/{dist/components → components}/GameView.d.ts.map +0 -0
- /package/{dist/components → components}/GameView.js +0 -0
- /package/{dist/components → components}/GameViewOverlay.d.ts +0 -0
- /package/{dist/components → components}/GameViewOverlay.d.ts.map +0 -0
- /package/{dist/components → components}/GameViewOverlay.js +0 -0
- /package/{dist/components → components}/GlobalEmoteOverlay.d.ts +0 -0
- /package/{dist/components → components}/GlobalEmoteOverlay.d.ts.map +0 -0
- /package/{dist/components → components}/GlobalEmoteOverlay.js +0 -0
- /package/{dist/components → components}/Header.d.ts +0 -0
- /package/{dist/components → components}/Header.d.ts.map +0 -0
- /package/{dist/components → components}/Header.js +0 -0
- /package/{dist/components → components}/HeartbeatsView.d.ts +0 -0
- /package/{dist/components → components}/HeartbeatsView.d.ts.map +0 -0
- /package/{dist/components → components}/HeartbeatsView.js +0 -0
- /package/{dist/components → components}/InventoryView.d.ts +0 -0
- /package/{dist/components → components}/InventoryView.d.ts.map +0 -0
- /package/{dist/components → components}/InventoryView.js +0 -0
- /package/{dist/components → components}/KnowledgeView.d.ts +0 -0
- /package/{dist/components → components}/KnowledgeView.d.ts.map +0 -0
- /package/{dist/components → components}/KnowledgeView.js +0 -0
- /package/{dist/components → components}/LanguageDropdown.d.ts +0 -0
- /package/{dist/components → components}/LanguageDropdown.d.ts.map +0 -0
- /package/{dist/components → components}/LanguageDropdown.js +0 -0
- /package/{dist/components → components}/LifoMonitorPanel.d.ts +0 -0
- /package/{dist/components → components}/LifoMonitorPanel.d.ts.map +0 -0
- /package/{dist/components → components}/LifoMonitorPanel.js +0 -0
- /package/{dist/components → components}/LifoSandboxView.d.ts +0 -0
- /package/{dist/components → components}/LifoSandboxView.d.ts.map +0 -0
- /package/{dist/components → components}/LifoSandboxView.js +0 -0
- /package/{dist/components → components}/LoadingScreen.d.ts +0 -0
- /package/{dist/components → components}/LoadingScreen.d.ts.map +0 -0
- /package/{dist/components → components}/LoadingScreen.js +0 -0
- /package/{dist/components → components}/LogsPageView.d.ts +0 -0
- /package/{dist/components → components}/LogsPageView.d.ts.map +0 -0
- /package/{dist/components → components}/LogsPageView.js +0 -0
- /package/{dist/components → components}/LogsView.d.ts +0 -0
- /package/{dist/components → components}/LogsView.d.ts.map +0 -0
- /package/{dist/components → components}/LogsView.js +0 -0
- /package/{dist/components → components}/MediaGalleryView.d.ts +0 -0
- /package/{dist/components → components}/MediaGalleryView.d.ts.map +0 -0
- /package/{dist/components → components}/MediaGalleryView.js +0 -0
- /package/{dist/components → components}/MediaSettingsSection.d.ts +0 -0
- /package/{dist/components → components}/MediaSettingsSection.d.ts.map +0 -0
- /package/{dist/components → components}/MediaSettingsSection.js +0 -0
- /package/{dist/components → components}/MessageContent.d.ts +0 -0
- /package/{dist/components → components}/MessageContent.d.ts.map +0 -0
- /package/{dist/components → components}/MessageContent.js +0 -0
- /package/{dist/components → components}/OnboardingWizard.d.ts +0 -0
- /package/{dist/components → components}/PairingView.d.ts +0 -0
- /package/{dist/components → components}/PairingView.d.ts.map +0 -0
- /package/{dist/components → components}/PairingView.js +0 -0
- /package/{dist/components → components}/PermissionsSection.d.ts +0 -0
- /package/{dist/components → components}/PermissionsSection.d.ts.map +0 -0
- /package/{dist/components → components}/PermissionsSection.js +0 -0
- /package/{dist/components → components}/PluginsPageView.d.ts +0 -0
- /package/{dist/components → components}/PluginsPageView.d.ts.map +0 -0
- /package/{dist/components → components}/PluginsPageView.js +0 -0
- /package/{dist/components → components}/PluginsView.d.ts +0 -0
- /package/{dist/components → components}/ProviderSwitcher.d.ts +0 -0
- /package/{dist/components → components}/ProviderSwitcher.d.ts.map +0 -0
- /package/{dist/components → components}/ProviderSwitcher.js +0 -0
- /package/{dist/components → components}/RestartBanner.d.ts +0 -0
- /package/{dist/components → components}/RestartBanner.d.ts.map +0 -0
- /package/{dist/components → components}/RestartBanner.js +0 -0
- /package/{dist/components → components}/RuntimeView.d.ts +0 -0
- /package/{dist/components → components}/RuntimeView.d.ts.map +0 -0
- /package/{dist/components → components}/RuntimeView.js +0 -0
- /package/{dist/components → components}/SaveCommandModal.d.ts +0 -0
- /package/{dist/components → components}/SaveCommandModal.d.ts.map +0 -0
- /package/{dist/components → components}/SaveCommandModal.js +0 -0
- /package/{dist/components → components}/SecretsView.d.ts +0 -0
- /package/{dist/components → components}/SecretsView.d.ts.map +0 -0
- /package/{dist/components → components}/SecretsView.js +0 -0
- /package/{dist/components → components}/SettingsView.d.ts +0 -0
- /package/{dist/components → components}/SettingsView.d.ts.map +0 -0
- /package/{dist/components → components}/SettingsView.js +0 -0
- /package/{dist/components → components}/ShellOverlays.d.ts +0 -0
- /package/{dist/components → components}/ShellOverlays.d.ts.map +0 -0
- /package/{dist/components → components}/ShellOverlays.js +0 -0
- /package/{dist/components → components}/ShortcutsOverlay.d.ts +0 -0
- /package/{dist/components → components}/ShortcutsOverlay.d.ts.map +0 -0
- /package/{dist/components → components}/ShortcutsOverlay.js +0 -0
- /package/{dist/components → components}/SkillsView.d.ts +0 -0
- /package/{dist/components → components}/SkillsView.d.ts.map +0 -0
- /package/{dist/components → components}/SkillsView.js +0 -0
- /package/{dist/components → components}/StartupFailureView.d.ts +0 -0
- /package/{dist/components → components}/StartupFailureView.d.ts.map +0 -0
- /package/{dist/components → components}/StartupFailureView.js +0 -0
- /package/{dist/components → components}/StreamView.d.ts +0 -0
- /package/{dist/components → components}/StreamView.d.ts.map +0 -0
- /package/{dist/components → components}/StreamView.js +0 -0
- /package/{dist/components → components}/StripeEmbeddedCheckout.d.ts +0 -0
- /package/{dist/components → components}/StripeEmbeddedCheckout.d.ts.map +0 -0
- /package/{dist/components → components}/StripeEmbeddedCheckout.js +0 -0
- /package/{dist/components → components}/SubscriptionStatus.d.ts +0 -0
- /package/{dist/components → components}/SubscriptionStatus.d.ts.map +0 -0
- /package/{dist/components → components}/SubscriptionStatus.js +0 -0
- /package/{dist/components → components}/SystemWarningBanner.d.ts +0 -0
- /package/{dist/components → components}/SystemWarningBanner.d.ts.map +0 -0
- /package/{dist/components → components}/SystemWarningBanner.js +0 -0
- /package/{dist/components → components}/ThemeToggle.d.ts +0 -0
- /package/{dist/components → components}/ThemeToggle.d.ts.map +0 -0
- /package/{dist/components → components}/ThemeToggle.js +0 -0
- /package/{dist/components → components}/TrajectoriesView.d.ts +0 -0
- /package/{dist/components → components}/TrajectoriesView.d.ts.map +0 -0
- /package/{dist/components → components}/TrajectoriesView.js +0 -0
- /package/{dist/components → components}/TrajectoryDetailView.d.ts +0 -0
- /package/{dist/components → components}/TrajectoryDetailView.d.ts.map +0 -0
- /package/{dist/components → components}/TrajectoryDetailView.js +0 -0
- /package/{dist/components → components}/TriggersView.d.ts +0 -0
- /package/{dist/components → components}/TriggersView.d.ts.map +0 -0
- /package/{dist/components → components}/TriggersView.js +0 -0
- /package/{dist/components → components}/VectorBrowserView.d.ts +0 -0
- /package/{dist/components → components}/VectorBrowserView.d.ts.map +0 -0
- /package/{dist/components → components}/VectorBrowserView.js +0 -0
- /package/{dist/components → components}/VoiceConfigView.d.ts +0 -0
- /package/{dist/components → components}/VoiceConfigView.d.ts.map +0 -0
- /package/{dist/components → components}/VoiceConfigView.js +0 -0
- /package/{dist/components → components}/VrmStage.d.ts +0 -0
- /package/{dist/components → components}/VrmStage.d.ts.map +0 -0
- /package/{dist/components → components}/VrmStage.js +0 -0
- /package/{dist/components → components}/WhatsAppQrOverlay.d.ts +0 -0
- /package/{dist/components → components}/WhatsAppQrOverlay.d.ts.map +0 -0
- /package/{dist/components → components}/WhatsAppQrOverlay.js +0 -0
- /package/{dist/components → components}/apps/AppDetailPane.d.ts +0 -0
- /package/{dist/components → components}/apps/AppDetailPane.d.ts.map +0 -0
- /package/{dist/components → components}/apps/AppDetailPane.js +0 -0
- /package/{dist/components → components}/apps/AppsCatalogGrid.d.ts +0 -0
- /package/{dist/components → components}/apps/AppsCatalogGrid.d.ts.map +0 -0
- /package/{dist/components → components}/apps/AppsCatalogGrid.js +0 -0
- /package/{dist/components → components}/apps/extensions/registry.d.ts +0 -0
- /package/{dist/components → components}/apps/extensions/registry.d.ts.map +0 -0
- /package/{dist/components → components}/apps/extensions/registry.js +0 -0
- /package/{dist/components → components}/apps/extensions/types.d.ts +0 -0
- /package/{dist/components → components}/apps/extensions/types.d.ts.map +0 -0
- /package/{dist/components → components}/apps/extensions/types.js +0 -0
- /package/{dist/components → components}/apps/helpers.d.ts +0 -0
- /package/{dist/components → components}/apps/helpers.d.ts.map +0 -0
- /package/{dist/components → components}/apps/helpers.js +0 -0
- /package/{dist/components → components}/avatar/VrmAnimationLoader.d.ts +0 -0
- /package/{dist/components → components}/avatar/VrmAnimationLoader.d.ts.map +0 -0
- /package/{dist/components → components}/avatar/VrmAnimationLoader.js +0 -0
- /package/{dist/components → components}/avatar/VrmBlinkController.d.ts +0 -0
- /package/{dist/components → components}/avatar/VrmBlinkController.d.ts.map +0 -0
- /package/{dist/components → components}/avatar/VrmBlinkController.js +0 -0
- /package/{dist/components → components}/avatar/VrmCameraManager.d.ts +0 -0
- /package/{dist/components → components}/avatar/VrmCameraManager.d.ts.map +0 -0
- /package/{dist/components → components}/avatar/VrmCameraManager.js +0 -0
- /package/{dist/components → components}/avatar/VrmFootShadow.d.ts +0 -0
- /package/{dist/components → components}/avatar/VrmFootShadow.d.ts.map +0 -0
- /package/{dist/components → components}/avatar/VrmFootShadow.js +0 -0
- /package/{dist/components → components}/avatar/mixamoVRMRigMap.d.ts +0 -0
- /package/{dist/components → components}/avatar/mixamoVRMRigMap.d.ts.map +0 -0
- /package/{dist/components → components}/avatar/mixamoVRMRigMap.js +0 -0
- /package/{dist/components → components}/avatar/retargetMixamoFbxToVrm.d.ts +0 -0
- /package/{dist/components → components}/avatar/retargetMixamoFbxToVrm.d.ts.map +0 -0
- /package/{dist/components → components}/avatar/retargetMixamoFbxToVrm.js +0 -0
- /package/{dist/components → components}/avatar/retargetMixamoGltfToVrm.d.ts +0 -0
- /package/{dist/components → components}/avatar/retargetMixamoGltfToVrm.d.ts.map +0 -0
- /package/{dist/components → components}/avatar/retargetMixamoGltfToVrm.js +0 -0
- /package/{dist/components → components}/chainConfig.d.ts +0 -0
- /package/{dist/components → components}/chainConfig.d.ts.map +0 -0
- /package/{dist/components → components}/chainConfig.js +0 -0
- /package/{dist/components → components}/companion/CompanionHeader.d.ts +0 -0
- /package/{dist/components → components}/companion/CompanionHeader.d.ts.map +0 -0
- /package/{dist/components → components}/companion/CompanionHeader.js +0 -0
- /package/{dist/components → components}/companion/CompanionSceneHost.d.ts +0 -0
- /package/{dist/components → components}/companion/CompanionSceneHost.d.ts.map +0 -0
- /package/{dist/components → components}/companion/CompanionSceneHost.js +0 -0
- /package/{dist/components → components}/companion/VrmStage.d.ts +0 -0
- /package/{dist/components → components}/companion/VrmStage.d.ts.map +0 -0
- /package/{dist/components → components}/companion/VrmStage.js +0 -0
- /package/{dist/components → components}/companion/index.d.ts +0 -0
- /package/{dist/components → components}/companion/index.d.ts.map +0 -0
- /package/{dist/components → components}/companion/index.js +0 -0
- /package/{dist/components → components}/companion/walletUtils.d.ts +0 -0
- /package/{dist/components → components}/companion/walletUtils.d.ts.map +0 -0
- /package/{dist/components → components}/companion/walletUtils.js +0 -0
- /package/{dist/components → components}/companion-shell-styles.d.ts +0 -0
- /package/{dist/components → components}/companion-shell-styles.d.ts.map +0 -0
- /package/{dist/components → components}/companion-shell-styles.js +0 -0
- /package/{dist/components → components}/confirm-delete-control.d.ts +0 -0
- /package/{dist/components → components}/confirm-delete-control.d.ts.map +0 -0
- /package/{dist/components → components}/confirm-delete-control.js +0 -0
- /package/{dist/components → components}/conversations/ConversationListItem.d.ts +0 -0
- /package/{dist/components → components}/conversations/ConversationListItem.d.ts.map +0 -0
- /package/{dist/components → components}/conversations/ConversationListItem.js +0 -0
- /package/{dist/components → components}/conversations/conversation-utils.d.ts +0 -0
- /package/{dist/components → components}/conversations/conversation-utils.d.ts.map +0 -0
- /package/{dist/components → components}/conversations/conversation-utils.js +0 -0
- /package/{dist/components → components}/format.d.ts +0 -0
- /package/{dist/components → components}/format.d.ts.map +0 -0
- /package/{dist/components → components}/format.js +0 -0
- /package/{dist/components → components}/inventory/CopyableAddress.d.ts +0 -0
- /package/{dist/components → components}/inventory/CopyableAddress.d.ts.map +0 -0
- /package/{dist/components → components}/inventory/CopyableAddress.js +0 -0
- /package/{dist/components → components}/inventory/InventoryToolbar.d.ts +0 -0
- /package/{dist/components → components}/inventory/InventoryToolbar.d.ts.map +0 -0
- /package/{dist/components → components}/inventory/InventoryToolbar.js +0 -0
- /package/{dist/components → components}/inventory/NftGrid.d.ts +0 -0
- /package/{dist/components → components}/inventory/NftGrid.d.ts.map +0 -0
- /package/{dist/components → components}/inventory/NftGrid.js +0 -0
- /package/{dist/components → components}/inventory/TokenLogo.d.ts +0 -0
- /package/{dist/components → components}/inventory/TokenLogo.d.ts.map +0 -0
- /package/{dist/components → components}/inventory/TokenLogo.js +0 -0
- /package/{dist/components → components}/inventory/TokensTable.d.ts +0 -0
- /package/{dist/components → components}/inventory/TokensTable.d.ts.map +0 -0
- /package/{dist/components → components}/inventory/TokensTable.js +0 -0
- /package/{dist/components → components}/inventory/constants.d.ts +0 -0
- /package/{dist/components → components}/inventory/constants.d.ts.map +0 -0
- /package/{dist/components → components}/inventory/constants.js +0 -0
- /package/{dist/components → components}/inventory/index.d.ts +0 -0
- /package/{dist/components → components}/inventory/index.d.ts.map +0 -0
- /package/{dist/components → components}/inventory/index.js +0 -0
- /package/{dist/components → components}/inventory/media-url.d.ts +0 -0
- /package/{dist/components → components}/inventory/media-url.d.ts.map +0 -0
- /package/{dist/components → components}/inventory/media-url.js +0 -0
- /package/{dist/components → components}/inventory/useInventoryData.d.ts +0 -0
- /package/{dist/components → components}/inventory/useInventoryData.d.ts.map +0 -0
- /package/{dist/components → components}/inventory/useInventoryData.js +0 -0
- /package/{dist/components → components}/knowledge-upload-image.d.ts +0 -0
- /package/{dist/components → components}/knowledge-upload-image.d.ts.map +0 -0
- /package/{dist/components → components}/knowledge-upload-image.js +0 -0
- /package/{dist/components → components}/labels.d.ts +0 -0
- /package/{dist/components → components}/labels.d.ts.map +0 -0
- /package/{dist/components → components}/labels.js +0 -0
- /package/{dist/components → components}/onboarding/ActivateStep.d.ts +0 -0
- /package/{dist/components → components}/onboarding/ActivateStep.d.ts.map +0 -0
- /package/{dist/components → components}/onboarding/ActivateStep.js +0 -0
- /package/{dist/components → components}/onboarding/ConnectionStep.d.ts +0 -0
- /package/{dist/components → components}/onboarding/IdentityStep.d.ts +0 -0
- /package/{dist/components → components}/onboarding/IdentityStep.d.ts.map +0 -0
- /package/{dist/components → components}/onboarding/IdentityStep.js +0 -0
- /package/{dist/components → components}/onboarding/OnboardingPanel.d.ts +0 -0
- /package/{dist/components → components}/onboarding/OnboardingPanel.d.ts.map +0 -0
- /package/{dist/components → components}/onboarding/OnboardingPanel.js +0 -0
- /package/{dist/components → components}/onboarding/OnboardingStepNav.d.ts +0 -0
- /package/{dist/components → components}/onboarding/OnboardingStepNav.d.ts.map +0 -0
- /package/{dist/components → components}/onboarding/OnboardingStepNav.js +0 -0
- /package/{dist/components → components}/onboarding/PermissionsStep.d.ts +0 -0
- /package/{dist/components → components}/onboarding/PermissionsStep.d.ts.map +0 -0
- /package/{dist/components → components}/onboarding/PermissionsStep.js +0 -0
- /package/{dist/components → components}/onboarding/RpcStep.d.ts +0 -0
- /package/{dist/components → components}/onboarding/RpcStep.d.ts.map +0 -0
- /package/{dist/components → components}/onboarding/RpcStep.js +0 -0
- /package/{dist/components → components}/permissions/PermissionIcon.d.ts +0 -0
- /package/{dist/components → components}/permissions/PermissionIcon.d.ts.map +0 -0
- /package/{dist/components → components}/permissions/PermissionIcon.js +0 -0
- /package/{dist/components → components}/permissions/StreamingPermissions.d.ts +0 -0
- /package/{dist/components → components}/plugins/showcase-data.d.ts +0 -0
- /package/{dist/components → components}/plugins/showcase-data.d.ts.map +0 -0
- /package/{dist/components → components}/plugins/showcase-data.js +0 -0
- /package/{dist/components → components}/shared/ShellHeaderControls.d.ts +0 -0
- /package/{dist/components → components}/shared/ShellHeaderControls.d.ts.map +0 -0
- /package/{dist/components → components}/shared/ShellHeaderControls.js +0 -0
- /package/{dist/components → components}/shared-companion-scene-context.d.ts +0 -0
- /package/{dist/components → components}/shared-companion-scene-context.d.ts.map +0 -0
- /package/{dist/components → components}/shared-companion-scene-context.js +0 -0
- /package/{dist/components → components}/skeletons.d.ts +0 -0
- /package/{dist/components → components}/skeletons.d.ts.map +0 -0
- /package/{dist/components → components}/skeletons.js +0 -0
- /package/{dist/components → components}/stream/ActivityFeed.d.ts +0 -0
- /package/{dist/components → components}/stream/ActivityFeed.d.ts.map +0 -0
- /package/{dist/components → components}/stream/ActivityFeed.js +0 -0
- /package/{dist/components → components}/stream/AvatarPip.d.ts +0 -0
- /package/{dist/components → components}/stream/AvatarPip.d.ts.map +0 -0
- /package/{dist/components → components}/stream/AvatarPip.js +0 -0
- /package/{dist/components → components}/stream/ChatContent.d.ts +0 -0
- /package/{dist/components → components}/stream/ChatContent.d.ts.map +0 -0
- /package/{dist/components → components}/stream/ChatContent.js +0 -0
- /package/{dist/components → components}/stream/ChatTicker.d.ts +0 -0
- /package/{dist/components → components}/stream/ChatTicker.d.ts.map +0 -0
- /package/{dist/components → components}/stream/ChatTicker.js +0 -0
- /package/{dist/components → components}/stream/IdleContent.d.ts +0 -0
- /package/{dist/components → components}/stream/IdleContent.d.ts.map +0 -0
- /package/{dist/components → components}/stream/IdleContent.js +0 -0
- /package/{dist/components → components}/stream/StatusBar.d.ts +0 -0
- /package/{dist/components → components}/stream/StatusBar.d.ts.map +0 -0
- /package/{dist/components → components}/stream/StatusBar.js +0 -0
- /package/{dist/components → components}/stream/StreamSettings.d.ts +0 -0
- /package/{dist/components → components}/stream/StreamSettings.d.ts.map +0 -0
- /package/{dist/components → components}/stream/StreamSettings.js +0 -0
- /package/{dist/components → components}/stream/StreamTerminal.d.ts +0 -0
- /package/{dist/components → components}/stream/StreamTerminal.d.ts.map +0 -0
- /package/{dist/components → components}/stream/StreamTerminal.js +0 -0
- /package/{dist/components → components}/stream/StreamVoiceConfig.d.ts +0 -0
- /package/{dist/components → components}/stream/StreamVoiceConfig.d.ts.map +0 -0
- /package/{dist/components → components}/stream/StreamVoiceConfig.js +0 -0
- /package/{dist/components → components}/stream/helpers.d.ts +0 -0
- /package/{dist/components → components}/stream/helpers.d.ts.map +0 -0
- /package/{dist/components → components}/stream/helpers.js +0 -0
- /package/{dist/components → components}/stream/overlays/OverlayLayer.d.ts +0 -0
- /package/{dist/components → components}/stream/overlays/OverlayLayer.d.ts.map +0 -0
- /package/{dist/components → components}/stream/overlays/OverlayLayer.js +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/ActionTickerWidget.d.ts +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/ActionTickerWidget.d.ts.map +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/ActionTickerWidget.js +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/AlertPopupWidget.d.ts +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/AlertPopupWidget.d.ts.map +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/AlertPopupWidget.js +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/BrandingWidget.d.ts +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/BrandingWidget.d.ts.map +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/BrandingWidget.js +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/CustomHtmlWidget.d.ts +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/CustomHtmlWidget.d.ts.map +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/CustomHtmlWidget.js +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/PeonGlassWidget.d.ts +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/PeonGlassWidget.d.ts.map +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/PeonGlassWidget.js +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/PeonHudWidget.d.ts +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/PeonHudWidget.d.ts.map +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/PeonHudWidget.js +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/PeonSakuraWidget.d.ts +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/PeonSakuraWidget.d.ts.map +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/PeonSakuraWidget.js +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/ThoughtBubbleWidget.d.ts +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/ThoughtBubbleWidget.d.ts.map +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/ThoughtBubbleWidget.js +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/ViewerCountWidget.d.ts +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/ViewerCountWidget.d.ts.map +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/ViewerCountWidget.js +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/index.d.ts +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/index.d.ts.map +0 -0
- /package/{dist/components → components}/stream/overlays/built-in/index.js +0 -0
- /package/{dist/components → components}/stream/overlays/registry.d.ts +0 -0
- /package/{dist/components → components}/stream/overlays/registry.d.ts.map +0 -0
- /package/{dist/components → components}/stream/overlays/registry.js +0 -0
- /package/{dist/components → components}/stream/overlays/types.d.ts +0 -0
- /package/{dist/components → components}/stream/overlays/types.d.ts.map +0 -0
- /package/{dist/components → components}/stream/overlays/types.js +0 -0
- /package/{dist/components → components}/stream/overlays/useOverlayLayout.d.ts +0 -0
- /package/{dist/components → components}/stream/overlays/useOverlayLayout.d.ts.map +0 -0
- /package/{dist/components → components}/stream/overlays/useOverlayLayout.js +0 -0
- /package/{dist/components → components}/trajectory-format.d.ts +0 -0
- /package/{dist/components → components}/trajectory-format.d.ts.map +0 -0
- /package/{dist/components → components}/trajectory-format.js +0 -0
- /package/{dist/components → components}/ui-badges.d.ts +0 -0
- /package/{dist/components → components}/ui-badges.d.ts.map +0 -0
- /package/{dist/components → components}/ui-badges.js +0 -0
- /package/{dist/components → components}/ui-switch.d.ts +0 -0
- /package/{dist/components → components}/ui-switch.d.ts.map +0 -0
- /package/{dist/components → components}/vector-browser-three.d.ts +0 -0
- /package/{dist/components → components}/vector-browser-three.d.ts.map +0 -0
- /package/{dist/components → components}/vector-browser-three.js +0 -0
- /package/{dist/config → config}/branding.d.ts +0 -0
- /package/{dist/config → config}/branding.d.ts.map +0 -0
- /package/{dist/config → config}/branding.js +0 -0
- /package/{dist/config → config}/config-catalog.d.ts +0 -0
- /package/{dist/config → config}/config-catalog.d.ts.map +0 -0
- /package/{dist/config → config}/config-catalog.js +0 -0
- /package/{dist/config → config}/config-field.d.ts +0 -0
- /package/{dist/config → config}/config-field.d.ts.map +0 -0
- /package/{dist/config → config}/config-field.js +0 -0
- /package/{dist/config → config}/config-renderer.d.ts +0 -0
- /package/{dist/config → config}/config-renderer.d.ts.map +0 -0
- /package/{dist/config → config}/config-renderer.js +0 -0
- /package/{dist/config → config}/index.d.ts +0 -0
- /package/{dist/config → config}/index.d.ts.map +0 -0
- /package/{dist/config → config}/index.js +0 -0
- /package/{dist/config → config}/ui-renderer.d.ts +0 -0
- /package/{dist/config → config}/ui-renderer.d.ts.map +0 -0
- /package/{dist/config → config}/ui-renderer.js +0 -0
- /package/{dist/config → config}/ui-spec.d.ts +0 -0
- /package/{dist/config → config}/ui-spec.d.ts.map +0 -0
- /package/{dist/config → config}/ui-spec.js +0 -0
- /package/{dist/events → events}/index.d.ts +0 -0
- /package/{dist/events → events}/index.d.ts.map +0 -0
- /package/{dist/events → events}/index.js +0 -0
- /package/{dist/hooks → hooks}/index.d.ts +0 -0
- /package/{dist/hooks → hooks}/index.d.ts.map +0 -0
- /package/{dist/hooks → hooks}/index.js +0 -0
- /package/{dist/hooks → hooks}/useBugReport.d.ts +0 -0
- /package/{dist/hooks → hooks}/useBugReport.d.ts.map +0 -0
- /package/{dist/hooks → hooks}/useBugReport.js +0 -0
- /package/{dist/hooks → hooks}/useCanvasWindow.d.ts +0 -0
- /package/{dist/hooks → hooks}/useCanvasWindow.d.ts.map +0 -0
- /package/{dist/hooks → hooks}/useCanvasWindow.js +0 -0
- /package/{dist/hooks → hooks}/useChatAvatarVoice.d.ts +0 -0
- /package/{dist/hooks → hooks}/useChatAvatarVoice.d.ts.map +0 -0
- /package/{dist/hooks → hooks}/useChatAvatarVoice.js +0 -0
- /package/{dist/hooks → hooks}/useClickOutside.d.ts +0 -0
- /package/{dist/hooks → hooks}/useClickOutside.d.ts.map +0 -0
- /package/{dist/hooks → hooks}/useClickOutside.js +0 -0
- /package/{dist/hooks → hooks}/useContextMenu.d.ts +0 -0
- /package/{dist/hooks → hooks}/useContextMenu.d.ts.map +0 -0
- /package/{dist/hooks → hooks}/useContextMenu.js +0 -0
- /package/{dist/hooks → hooks}/useKeyboardShortcuts.d.ts +0 -0
- /package/{dist/hooks → hooks}/useKeyboardShortcuts.d.ts.map +0 -0
- /package/{dist/hooks → hooks}/useKeyboardShortcuts.js +0 -0
- /package/{dist/hooks → hooks}/useLifoSync.d.ts +0 -0
- /package/{dist/hooks → hooks}/useLifoSync.d.ts.map +0 -0
- /package/{dist/hooks → hooks}/useLifoSync.js +0 -0
- /package/{dist/hooks → hooks}/useMemoryMonitor.d.ts +0 -0
- /package/{dist/hooks → hooks}/useMemoryMonitor.d.ts.map +0 -0
- /package/{dist/hooks → hooks}/useMemoryMonitor.js +0 -0
- /package/{dist/hooks → hooks}/useRenderGuard.d.ts +0 -0
- /package/{dist/hooks → hooks}/useRenderGuard.d.ts.map +0 -0
- /package/{dist/hooks → hooks}/useRenderGuard.js +0 -0
- /package/{dist/hooks → hooks}/useRetakeCapture.d.ts +0 -0
- /package/{dist/hooks → hooks}/useRetakeCapture.d.ts.map +0 -0
- /package/{dist/hooks → hooks}/useRetakeCapture.js +0 -0
- /package/{dist/hooks → hooks}/useStreamPopoutNavigation.d.ts +0 -0
- /package/{dist/hooks → hooks}/useStreamPopoutNavigation.d.ts.map +0 -0
- /package/{dist/hooks → hooks}/useStreamPopoutNavigation.js +0 -0
- /package/{dist/hooks → hooks}/useTimeout.d.ts +0 -0
- /package/{dist/hooks → hooks}/useTimeout.d.ts.map +0 -0
- /package/{dist/hooks → hooks}/useTimeout.js +0 -0
- /package/{dist/hooks → hooks}/useVoiceChat.d.ts +0 -0
- /package/{dist/hooks → hooks}/useVoiceChat.d.ts.map +0 -0
- /package/{dist/hooks → hooks}/useVoiceChat.js +0 -0
- /package/{dist/hooks → hooks}/useWhatsAppPairing.d.ts +0 -0
- /package/{dist/hooks → hooks}/useWhatsAppPairing.d.ts.map +0 -0
- /package/{dist/hooks → hooks}/useWhatsAppPairing.js +0 -0
- /package/{dist/i18n → i18n}/index.d.ts +0 -0
- /package/{dist/i18n → i18n}/index.d.ts.map +0 -0
- /package/{dist/i18n → i18n}/index.js +0 -0
- /package/{dist/i18n → i18n}/messages.d.ts +0 -0
- /package/{dist/i18n → i18n}/messages.d.ts.map +0 -0
- /package/{dist/i18n → i18n}/messages.js +0 -0
- /package/{dist/index.d.ts → index.d.ts} +0 -0
- /package/{dist/index.d.ts.map → index.d.ts.map} +0 -0
- /package/{dist/index.js → index.js} +0 -0
- /package/{dist/navigation → navigation}/index.d.ts +0 -0
- /package/{dist/navigation → navigation}/index.d.ts.map +0 -0
- /package/{dist/navigation → navigation}/index.js +0 -0
- /package/{dist/onboarding-config.d.ts → onboarding-config.d.ts} +0 -0
- /package/{dist/onboarding-config.d.ts.map → onboarding-config.d.ts.map} +0 -0
- /package/{dist/onboarding-config.js → onboarding-config.js} +0 -0
- /package/{dist/platform → platform}/browser-launch.d.ts +0 -0
- /package/{dist/platform → platform}/browser-launch.d.ts.map +0 -0
- /package/{dist/platform → platform}/browser-launch.js +0 -0
- /package/{dist/platform → platform}/index.d.ts +0 -0
- /package/{dist/platform → platform}/index.d.ts.map +0 -0
- /package/{dist/platform → platform}/index.js +0 -0
- /package/{dist/platform → platform}/init.d.ts +0 -0
- /package/{dist/platform → platform}/init.d.ts.map +0 -0
- /package/{dist/platform → platform}/init.js +0 -0
- /package/{dist/platform → platform}/lifo.d.ts +0 -0
- /package/{dist/platform → platform}/lifo.d.ts.map +0 -0
- /package/{dist/platform → platform}/lifo.js +0 -0
- /package/{dist/providers → providers}/index.d.ts +0 -0
- /package/{dist/providers → providers}/index.d.ts.map +0 -0
- /package/{dist/providers → providers}/index.js +0 -0
- /package/{dist/shell-params.d.ts → shell-params.d.ts} +0 -0
- /package/{dist/shell-params.d.ts.map → shell-params.d.ts.map} +0 -0
- /package/{dist/shell-params.js → shell-params.js} +0 -0
- /package/{dist/state → state}/AppContext.d.ts +0 -0
- /package/{dist/state → state}/index.d.ts +0 -0
- /package/{dist/state → state}/index.d.ts.map +0 -0
- /package/{dist/state → state}/index.js +0 -0
- /package/{dist/state → state}/internal.d.ts +0 -0
- /package/{dist/state → state}/internal.d.ts.map +0 -0
- /package/{dist/state → state}/internal.js +0 -0
- /package/{dist/state → state}/onboarding-resume.d.ts +0 -0
- /package/{dist/state → state}/onboarding-resume.d.ts.map +0 -0
- /package/{dist/state → state}/onboarding-resume.js +0 -0
- /package/{dist/state → state}/parsers.d.ts +0 -0
- /package/{dist/state → state}/parsers.d.ts.map +0 -0
- /package/{dist/state → state}/parsers.js +0 -0
- /package/{dist/state → state}/persistence.d.ts +0 -0
- /package/{dist/state → state}/persistence.d.ts.map +0 -0
- /package/{dist/state → state}/persistence.js +0 -0
- /package/{dist/state → state}/shell-routing.d.ts +0 -0
- /package/{dist/state → state}/shell-routing.d.ts.map +0 -0
- /package/{dist/state → state}/shell-routing.js +0 -0
- /package/{dist/state → state}/types.d.ts +0 -0
- /package/{dist/state → state}/types.d.ts.map +0 -0
- /package/{dist/state → state}/types.js +0 -0
- /package/{dist/state → state}/ui-preferences.d.ts +0 -0
- /package/{dist/state → state}/ui-preferences.d.ts.map +0 -0
- /package/{dist/state → state}/ui-preferences.js +0 -0
- /package/{dist/state → state}/useApp.d.ts +0 -0
- /package/{dist/state → state}/useApp.d.ts.map +0 -0
- /package/{dist/state → state}/useApp.js +0 -0
- /package/{dist/state → state}/vrm.d.ts +0 -0
- /package/{dist/state → state}/vrm.d.ts.map +0 -0
- /package/{dist/state → state}/vrm.js +0 -0
- /package/{dist/styles → styles}/base.css +0 -0
- /package/{dist/styles → styles}/styles.css +0 -0
- /package/{dist/styles → styles}/xterm.css +0 -0
- /package/{dist/types → types}/index.d.ts +0 -0
- /package/{dist/types → types}/index.d.ts.map +0 -0
- /package/{dist/types → types}/index.js +0 -0
- /package/{dist/utils → utils}/asset-url.d.ts +0 -0
- /package/{dist/utils → utils}/asset-url.d.ts.map +0 -0
- /package/{dist/utils → utils}/asset-url.js +0 -0
- /package/{dist/utils → utils}/assistant-text.d.ts +0 -0
- /package/{dist/utils → utils}/assistant-text.d.ts.map +0 -0
- /package/{dist/utils → utils}/assistant-text.js +0 -0
- /package/{dist/utils → utils}/clipboard.d.ts +0 -0
- /package/{dist/utils → utils}/clipboard.d.ts.map +0 -0
- /package/{dist/utils → utils}/clipboard.js +0 -0
- /package/{dist/utils → utils}/desktop-dialogs.d.ts +0 -0
- /package/{dist/utils → utils}/desktop-dialogs.d.ts.map +0 -0
- /package/{dist/utils → utils}/desktop-dialogs.js +0 -0
- /package/{dist/utils → utils}/eliza-globals.d.ts +0 -0
- /package/{dist/utils → utils}/eliza-globals.d.ts.map +0 -0
- /package/{dist/utils → utils}/eliza-globals.js +0 -0
- /package/{dist/utils → utils}/index.d.ts +0 -0
- /package/{dist/utils → utils}/index.d.ts.map +0 -0
- /package/{dist/utils → utils}/index.js +0 -0
- /package/{dist/utils → utils}/number-parsing.d.ts +0 -0
- /package/{dist/utils → utils}/number-parsing.d.ts.map +0 -0
- /package/{dist/utils → utils}/number-parsing.js +0 -0
- /package/{dist/utils → utils}/openExternalUrl.d.ts +0 -0
- /package/{dist/utils → utils}/openExternalUrl.d.ts.map +0 -0
- /package/{dist/utils → utils}/openExternalUrl.js +0 -0
- /package/{dist/utils → utils}/spoken-text.d.ts +0 -0
- /package/{dist/utils → utils}/spoken-text.d.ts.map +0 -0
- /package/{dist/utils → utils}/spoken-text.js +0 -0
- /package/{dist/utils → utils}/streaming-text.d.ts +0 -0
- /package/{dist/utils → utils}/streaming-text.d.ts.map +0 -0
- /package/{dist/utils → utils}/streaming-text.js +0 -0
- /package/{dist/voice → voice}/index.d.ts +0 -0
- /package/{dist/voice → voice}/index.d.ts.map +0 -0
- /package/{dist/voice → voice}/index.js +0 -0
- /package/{dist/voice → voice}/types.d.ts +0 -0
- /package/{dist/voice → voice}/types.d.ts.map +0 -0
- /package/{dist/voice → voice}/types.js +0 -0
- /package/{dist/wallet-rpc.d.ts → wallet-rpc.d.ts} +0 -0
- /package/{dist/wallet-rpc.d.ts.map → wallet-rpc.d.ts.map} +0 -0
- /package/{dist/wallet-rpc.js → wallet-rpc.js} +0 -0
|
@@ -1,1574 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Smoke-level unit tests for VrmEngine.
|
|
3
|
-
*
|
|
4
|
-
* THREE.js and @pixiv/three-vrm cannot run in a headless Node/Bun environment,
|
|
5
|
-
* so every external dependency is mocked. The tests verify the engine's public
|
|
6
|
-
* API contracts — lifecycle, state transitions, emote dispatch, and animation
|
|
7
|
-
* blending — without requiring a real WebGL context.
|
|
8
|
-
*/
|
|
9
|
-
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
10
|
-
|
|
11
|
-
// ---------------------------------------------------------------------------
|
|
12
|
-
// Mocks — must be declared before VrmEngine import
|
|
13
|
-
// ---------------------------------------------------------------------------
|
|
14
|
-
|
|
15
|
-
/** Minimal mock AnimationAction returned by AnimationMixer.clipAction */
|
|
16
|
-
function createMockAction() {
|
|
17
|
-
const action = {
|
|
18
|
-
enabled: true,
|
|
19
|
-
paused: false,
|
|
20
|
-
time: 0,
|
|
21
|
-
timeScale: 1,
|
|
22
|
-
weight: 1,
|
|
23
|
-
clampWhenFinished: false,
|
|
24
|
-
reset: vi.fn(() => {
|
|
25
|
-
action.enabled = true;
|
|
26
|
-
action.paused = false;
|
|
27
|
-
action.time = 0;
|
|
28
|
-
return action;
|
|
29
|
-
}),
|
|
30
|
-
play: vi.fn(() => action),
|
|
31
|
-
stop: vi.fn(() => action),
|
|
32
|
-
crossFadeFrom: vi.fn(() => action),
|
|
33
|
-
fadeIn: vi.fn(() => action),
|
|
34
|
-
fadeOut: vi.fn(() => action),
|
|
35
|
-
setLoop: vi.fn(() => action),
|
|
36
|
-
setEffectiveTimeScale: vi.fn((value: number) => {
|
|
37
|
-
action.timeScale = value;
|
|
38
|
-
return action;
|
|
39
|
-
}),
|
|
40
|
-
setEffectiveWeight: vi.fn((value: number) => {
|
|
41
|
-
action.weight = value;
|
|
42
|
-
return action;
|
|
43
|
-
}),
|
|
44
|
-
isRunning: vi.fn(() => true),
|
|
45
|
-
getClip: vi.fn(() => ({ tracks: [{ name: "t1" }, { name: "t2" }] })),
|
|
46
|
-
};
|
|
47
|
-
return action;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const hoisted = vi.hoisted(() => {
|
|
51
|
-
const mockAction = createMockAction();
|
|
52
|
-
const mixerListeners = new Map<string, Set<(event: unknown) => void>>();
|
|
53
|
-
const addMixerListener = vi.fn(
|
|
54
|
-
(type: string, listener: (event: unknown) => void) => {
|
|
55
|
-
const listeners = mixerListeners.get(type) ?? new Set();
|
|
56
|
-
listeners.add(listener);
|
|
57
|
-
mixerListeners.set(type, listeners);
|
|
58
|
-
},
|
|
59
|
-
);
|
|
60
|
-
const removeMixerListener = vi.fn(
|
|
61
|
-
(type: string, listener: (event: unknown) => void) => {
|
|
62
|
-
const listeners = mixerListeners.get(type);
|
|
63
|
-
if (!listeners) return;
|
|
64
|
-
listeners.delete(listener);
|
|
65
|
-
if (listeners.size === 0) {
|
|
66
|
-
mixerListeners.delete(type);
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
);
|
|
70
|
-
const emitMixerEvent = (type: string, event: unknown) => {
|
|
71
|
-
const listeners = mixerListeners.get(type);
|
|
72
|
-
if (!listeners) return;
|
|
73
|
-
for (const listener of [...listeners]) {
|
|
74
|
-
listener(event);
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
const mockMixerInstance = {
|
|
78
|
-
update: vi.fn(),
|
|
79
|
-
clipAction: vi.fn(() => mockAction),
|
|
80
|
-
addEventListener: addMixerListener,
|
|
81
|
-
removeEventListener: removeMixerListener,
|
|
82
|
-
};
|
|
83
|
-
const mockRendererInstance = {
|
|
84
|
-
setPixelRatio: vi.fn(),
|
|
85
|
-
setClearColor: vi.fn(),
|
|
86
|
-
setSize: vi.fn(),
|
|
87
|
-
render: vi.fn(),
|
|
88
|
-
dispose: vi.fn(),
|
|
89
|
-
forceContextLoss: vi.fn(),
|
|
90
|
-
domElement: {} as HTMLCanvasElement,
|
|
91
|
-
shadowMap: { enabled: false, type: 0 },
|
|
92
|
-
toneMapping: 0,
|
|
93
|
-
toneMappingExposure: 1.0,
|
|
94
|
-
outputColorSpace: "",
|
|
95
|
-
};
|
|
96
|
-
const mockWebGpuRendererInstance = {
|
|
97
|
-
setPixelRatio: vi.fn(),
|
|
98
|
-
setClearColor: vi.fn(),
|
|
99
|
-
setSize: vi.fn(),
|
|
100
|
-
render: vi.fn(),
|
|
101
|
-
dispose: vi.fn(),
|
|
102
|
-
domElement: {} as HTMLCanvasElement,
|
|
103
|
-
init: vi.fn(async () => {}),
|
|
104
|
-
};
|
|
105
|
-
const mockMToonMaterialLoaderPlugin = vi.fn(
|
|
106
|
-
function MockMToonMaterialLoaderPlugin(
|
|
107
|
-
this: { parser: unknown; options: unknown },
|
|
108
|
-
parser: unknown,
|
|
109
|
-
options: unknown,
|
|
110
|
-
) {
|
|
111
|
-
this.parser = parser;
|
|
112
|
-
this.options = options;
|
|
113
|
-
},
|
|
114
|
-
);
|
|
115
|
-
const mockVRMLoaderPlugin = vi.fn(function MockVRMLoaderPlugin(
|
|
116
|
-
this: { parser: unknown; options: unknown },
|
|
117
|
-
parser: unknown,
|
|
118
|
-
options?: unknown,
|
|
119
|
-
) {
|
|
120
|
-
this.parser = parser;
|
|
121
|
-
this.options = options;
|
|
122
|
-
});
|
|
123
|
-
const mockLoaderParser = { json: {} };
|
|
124
|
-
const mockLoaderRegister = vi.fn((factory: (parser: unknown) => unknown) => {
|
|
125
|
-
factory(mockLoaderParser);
|
|
126
|
-
});
|
|
127
|
-
const mockLoaderLoadAsync = vi.fn();
|
|
128
|
-
const mockLoaderSetDRACOLoader = vi.fn();
|
|
129
|
-
const mockLoaderSetMeshoptDecoder = vi.fn();
|
|
130
|
-
const mockSparkRendererOptions: unknown[] = [];
|
|
131
|
-
const mockSplatMeshOptions: unknown[] = [];
|
|
132
|
-
const mockDracoLoaderSetDecoderConfig = vi.fn();
|
|
133
|
-
const mockDracoLoaderSetDecoderPath = vi.fn();
|
|
134
|
-
const mockDracoLoaderPreload = vi.fn();
|
|
135
|
-
const navigatorMock = { gpu: undefined as unknown };
|
|
136
|
-
const fetchMock = vi.fn();
|
|
137
|
-
const responseArrayBufferMock = vi.fn();
|
|
138
|
-
|
|
139
|
-
return {
|
|
140
|
-
addMixerListener,
|
|
141
|
-
mockDracoLoaderPreload,
|
|
142
|
-
mockDracoLoaderSetDecoderConfig,
|
|
143
|
-
mockDracoLoaderSetDecoderPath,
|
|
144
|
-
emitMixerEvent,
|
|
145
|
-
fetchMock,
|
|
146
|
-
mixerListeners,
|
|
147
|
-
mockLoaderLoadAsync,
|
|
148
|
-
mockLoaderParser,
|
|
149
|
-
mockLoaderRegister,
|
|
150
|
-
mockLoaderSetDRACOLoader,
|
|
151
|
-
mockLoaderSetMeshoptDecoder,
|
|
152
|
-
mockSparkRendererOptions,
|
|
153
|
-
mockSplatMeshOptions,
|
|
154
|
-
mockMixerInstance,
|
|
155
|
-
mockMToonMaterialLoaderPlugin,
|
|
156
|
-
mockRendererInstance,
|
|
157
|
-
responseArrayBufferMock,
|
|
158
|
-
mockVRMLoaderPlugin,
|
|
159
|
-
mockWebGpuRendererInstance,
|
|
160
|
-
navigatorMock,
|
|
161
|
-
};
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
const mockCameraInstance = {
|
|
165
|
-
position: {
|
|
166
|
-
set: vi.fn(),
|
|
167
|
-
x: 0,
|
|
168
|
-
y: 1.1,
|
|
169
|
-
z: 2.8,
|
|
170
|
-
copy: vi.fn(),
|
|
171
|
-
clone: vi.fn(() => ({ x: 0, y: 1.1, z: 2.8 })),
|
|
172
|
-
},
|
|
173
|
-
rotation: { x: 0, y: 0 },
|
|
174
|
-
aspect: 1,
|
|
175
|
-
fov: 25,
|
|
176
|
-
near: 0.01,
|
|
177
|
-
far: 1000,
|
|
178
|
-
add: vi.fn(),
|
|
179
|
-
lookAt: vi.fn(),
|
|
180
|
-
updateProjectionMatrix: vi.fn(),
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
const mockSceneInstance = {
|
|
184
|
-
add: vi.fn(),
|
|
185
|
-
remove: vi.fn(),
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
vi.mock("three", () => {
|
|
189
|
-
const LoopRepeat = 2201;
|
|
190
|
-
const LoopOnce = 2200;
|
|
191
|
-
|
|
192
|
-
// Use class syntax for everything that gets `new`-ed
|
|
193
|
-
class MockWebGLRenderer {
|
|
194
|
-
setPixelRatio = hoisted.mockRendererInstance.setPixelRatio;
|
|
195
|
-
setClearColor = hoisted.mockRendererInstance.setClearColor;
|
|
196
|
-
setSize = hoisted.mockRendererInstance.setSize;
|
|
197
|
-
render = hoisted.mockRendererInstance.render;
|
|
198
|
-
dispose = hoisted.mockRendererInstance.dispose;
|
|
199
|
-
forceContextLoss = hoisted.mockRendererInstance.forceContextLoss;
|
|
200
|
-
domElement = hoisted.mockRendererInstance.domElement;
|
|
201
|
-
shadowMap = hoisted.mockRendererInstance.shadowMap;
|
|
202
|
-
toneMapping = hoisted.mockRendererInstance.toneMapping;
|
|
203
|
-
toneMappingExposure = hoisted.mockRendererInstance.toneMappingExposure;
|
|
204
|
-
outputColorSpace = hoisted.mockRendererInstance.outputColorSpace;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
class MockScene {
|
|
208
|
-
add = mockSceneInstance.add;
|
|
209
|
-
remove = mockSceneInstance.remove;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
class MockPerspectiveCamera {
|
|
213
|
-
position = mockCameraInstance.position;
|
|
214
|
-
rotation = mockCameraInstance.rotation;
|
|
215
|
-
aspect = mockCameraInstance.aspect;
|
|
216
|
-
fov = mockCameraInstance.fov;
|
|
217
|
-
near = mockCameraInstance.near;
|
|
218
|
-
far = mockCameraInstance.far;
|
|
219
|
-
add = mockCameraInstance.add;
|
|
220
|
-
lookAt = mockCameraInstance.lookAt;
|
|
221
|
-
updateProjectionMatrix = mockCameraInstance.updateProjectionMatrix;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
class MockClock {
|
|
225
|
-
start = vi.fn();
|
|
226
|
-
stop = vi.fn();
|
|
227
|
-
getDelta = vi.fn(() => 0.016);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
class MockGroup {
|
|
231
|
-
name = "";
|
|
232
|
-
position = { set: vi.fn() };
|
|
233
|
-
scale = { set: vi.fn(), setScalar: vi.fn() };
|
|
234
|
-
add = vi.fn();
|
|
235
|
-
remove = vi.fn();
|
|
236
|
-
updateMatrixWorld = vi.fn();
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
class MockAnimationMixer {
|
|
240
|
-
update = hoisted.mockMixerInstance.update;
|
|
241
|
-
clipAction = hoisted.mockMixerInstance.clipAction;
|
|
242
|
-
addEventListener = hoisted.mockMixerInstance.addEventListener;
|
|
243
|
-
removeEventListener = hoisted.mockMixerInstance.removeEventListener;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
class MockDirectionalLight {
|
|
247
|
-
position = {
|
|
248
|
-
set: vi.fn().mockReturnValue({ normalize: vi.fn() }),
|
|
249
|
-
};
|
|
250
|
-
castShadow = false;
|
|
251
|
-
shadow = {
|
|
252
|
-
mapSize: { setScalar: vi.fn() },
|
|
253
|
-
camera: { near: 0, far: 0, left: 0, right: 0, top: 0, bottom: 0 },
|
|
254
|
-
};
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
class MockAmbientLight {}
|
|
258
|
-
|
|
259
|
-
class MockVector3 {
|
|
260
|
-
x = 0;
|
|
261
|
-
y = 0;
|
|
262
|
-
z = 0;
|
|
263
|
-
set = vi.fn().mockReturnThis();
|
|
264
|
-
add = vi.fn().mockReturnThis();
|
|
265
|
-
copy = vi.fn().mockReturnThis();
|
|
266
|
-
sub = vi.fn().mockReturnThis();
|
|
267
|
-
subVectors = vi.fn().mockReturnThis();
|
|
268
|
-
cross = vi.fn().mockReturnThis();
|
|
269
|
-
normalize = vi.fn().mockReturnThis();
|
|
270
|
-
dot = vi.fn(() => 1);
|
|
271
|
-
getWorldPosition = vi.fn().mockReturnThis();
|
|
272
|
-
getWorldDirection = vi.fn().mockReturnThis();
|
|
273
|
-
lengthSq = vi.fn(() => 1);
|
|
274
|
-
length = vi.fn(() => 1);
|
|
275
|
-
multiplyScalar = vi.fn().mockReturnThis();
|
|
276
|
-
setFromSpherical = vi.fn().mockReturnThis();
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
class MockVector2 {
|
|
280
|
-
x = 0;
|
|
281
|
-
y = 0;
|
|
282
|
-
set = vi.fn((x: number, y: number) => {
|
|
283
|
-
this.x = x;
|
|
284
|
-
this.y = y;
|
|
285
|
-
return this;
|
|
286
|
-
});
|
|
287
|
-
copy = vi.fn((value: { x: number; y: number }) => {
|
|
288
|
-
this.x = value.x;
|
|
289
|
-
this.y = value.y;
|
|
290
|
-
return this;
|
|
291
|
-
});
|
|
292
|
-
sub = vi.fn().mockReturnThis();
|
|
293
|
-
lengthSq = vi.fn(() => 0);
|
|
294
|
-
multiplyScalar = vi.fn().mockReturnThis();
|
|
295
|
-
lerp = vi.fn((value: { x: number; y: number }, alpha: number) => {
|
|
296
|
-
this.x += (value.x - this.x) * alpha;
|
|
297
|
-
this.y += (value.y - this.y) * alpha;
|
|
298
|
-
return this;
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
class MockBox3 {
|
|
303
|
-
setFromObject = vi.fn().mockReturnThis();
|
|
304
|
-
isEmpty = vi.fn(() => false);
|
|
305
|
-
min = { x: 0, y: 0, z: 0 };
|
|
306
|
-
max = { x: 0, y: 1.6, z: 0 };
|
|
307
|
-
getCenter = vi.fn(() => new MockVector3());
|
|
308
|
-
getSize = vi.fn(() => {
|
|
309
|
-
const v = new MockVector3();
|
|
310
|
-
v.x = 0.4;
|
|
311
|
-
v.y = 1.6;
|
|
312
|
-
v.z = 0.3;
|
|
313
|
-
return v;
|
|
314
|
-
});
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
class MockSpherical {
|
|
318
|
-
radius = 1;
|
|
319
|
-
phi = Math.PI / 2;
|
|
320
|
-
theta = 0;
|
|
321
|
-
setFromVector3 = vi.fn().mockReturnThis();
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
return {
|
|
325
|
-
WebGLRenderer: MockWebGLRenderer,
|
|
326
|
-
Scene: MockScene,
|
|
327
|
-
Group: MockGroup,
|
|
328
|
-
PerspectiveCamera: MockPerspectiveCamera,
|
|
329
|
-
Clock: MockClock,
|
|
330
|
-
AnimationMixer: MockAnimationMixer,
|
|
331
|
-
DirectionalLight: MockDirectionalLight,
|
|
332
|
-
AmbientLight: MockAmbientLight,
|
|
333
|
-
Vector2: MockVector2,
|
|
334
|
-
Vector3: MockVector3,
|
|
335
|
-
Box3: MockBox3,
|
|
336
|
-
Spherical: MockSpherical,
|
|
337
|
-
LoopRepeat,
|
|
338
|
-
LoopOnce,
|
|
339
|
-
PCFSoftShadowMap: 2,
|
|
340
|
-
NoToneMapping: 0,
|
|
341
|
-
SRGBColorSpace: "srgb",
|
|
342
|
-
Mesh: class MockMesh {
|
|
343
|
-
geometry = { dispose: vi.fn() };
|
|
344
|
-
material = { opacity: 1, map: { dispose: vi.fn() }, dispose: vi.fn() };
|
|
345
|
-
position = { set: vi.fn(), y: 0 };
|
|
346
|
-
rotation = { x: 0, y: 0, z: 0 };
|
|
347
|
-
receiveShadow = false;
|
|
348
|
-
},
|
|
349
|
-
PlaneGeometry: class MockPlaneGeometry {},
|
|
350
|
-
MeshBasicMaterial: class MockMeshBasicMaterial {
|
|
351
|
-
opacity = 1;
|
|
352
|
-
dispose = vi.fn();
|
|
353
|
-
},
|
|
354
|
-
CanvasTexture: class MockCanvasTexture {
|
|
355
|
-
dispose = vi.fn();
|
|
356
|
-
},
|
|
357
|
-
AnimationClip: Object.assign(
|
|
358
|
-
class MockAnimationClip {
|
|
359
|
-
tracks: unknown[] = [];
|
|
360
|
-
name = "";
|
|
361
|
-
},
|
|
362
|
-
{ findByName: vi.fn(() => null) },
|
|
363
|
-
),
|
|
364
|
-
MathUtils: {
|
|
365
|
-
clamp: vi.fn((value: number, min: number, max: number) =>
|
|
366
|
-
Math.min(Math.max(value, min), max),
|
|
367
|
-
),
|
|
368
|
-
degToRad: vi.fn((deg: number) => (deg * Math.PI) / 180),
|
|
369
|
-
lerp: vi.fn(
|
|
370
|
-
(start: number, end: number, alpha: number) =>
|
|
371
|
-
start + (end - start) * alpha,
|
|
372
|
-
),
|
|
373
|
-
},
|
|
374
|
-
};
|
|
375
|
-
});
|
|
376
|
-
|
|
377
|
-
vi.mock("three/webgpu", () => ({
|
|
378
|
-
WebGPURenderer: class MockWebGPURenderer {
|
|
379
|
-
setPixelRatio = hoisted.mockWebGpuRendererInstance.setPixelRatio;
|
|
380
|
-
setClearColor = hoisted.mockWebGpuRendererInstance.setClearColor;
|
|
381
|
-
setSize = hoisted.mockWebGpuRendererInstance.setSize;
|
|
382
|
-
render = hoisted.mockWebGpuRendererInstance.render;
|
|
383
|
-
dispose = hoisted.mockWebGpuRendererInstance.dispose;
|
|
384
|
-
domElement = hoisted.mockWebGpuRendererInstance.domElement;
|
|
385
|
-
init = hoisted.mockWebGpuRendererInstance.init;
|
|
386
|
-
},
|
|
387
|
-
}));
|
|
388
|
-
|
|
389
|
-
vi.mock("@sparkjsdev/spark", () => ({
|
|
390
|
-
SparkRenderer: class MockSparkRenderer {
|
|
391
|
-
renderOrder = 0;
|
|
392
|
-
uniforms = { numSplats: { value: 0 } };
|
|
393
|
-
focalDistance = 0;
|
|
394
|
-
apertureAngle = 0;
|
|
395
|
-
removeFromParent = vi.fn();
|
|
396
|
-
constructor(options?: { focalDistance?: number; apertureAngle?: number }) {
|
|
397
|
-
this.focalDistance = options?.focalDistance ?? 0;
|
|
398
|
-
this.apertureAngle = options?.apertureAngle ?? 0;
|
|
399
|
-
hoisted.mockSparkRendererOptions.push(options ?? {});
|
|
400
|
-
}
|
|
401
|
-
},
|
|
402
|
-
SplatModifier: class MockSplatModifier {
|
|
403
|
-
modifier: unknown;
|
|
404
|
-
constructor(modifier: unknown) {
|
|
405
|
-
this.modifier = modifier;
|
|
406
|
-
}
|
|
407
|
-
},
|
|
408
|
-
SplatGenerator: class MockSplatGenerator {},
|
|
409
|
-
SplatMesh: class MockSplatMesh {
|
|
410
|
-
initialized = Promise.resolve();
|
|
411
|
-
packedSplats = { numSplats: 0 };
|
|
412
|
-
isInitialized = true;
|
|
413
|
-
frustumCulled = false;
|
|
414
|
-
renderOrder = 0;
|
|
415
|
-
visible = true;
|
|
416
|
-
opacity = 1;
|
|
417
|
-
children: unknown[] = [];
|
|
418
|
-
position = { set: vi.fn(), y: 0 };
|
|
419
|
-
quaternion = { set: vi.fn(), identity: vi.fn() };
|
|
420
|
-
scale = { setScalar: vi.fn() };
|
|
421
|
-
worldModifier: unknown = null;
|
|
422
|
-
objectModifier: unknown = null;
|
|
423
|
-
getBoundingBox = vi.fn(() => ({
|
|
424
|
-
min: { y: 0 },
|
|
425
|
-
getCenter: vi.fn(() => ({ x: 0, y: 0, z: 0 })),
|
|
426
|
-
getSize: vi.fn(() => ({ x: 1, y: 1, z: 1 })),
|
|
427
|
-
}));
|
|
428
|
-
forEachSplat = vi.fn();
|
|
429
|
-
update = vi.fn();
|
|
430
|
-
updateGenerator = vi.fn();
|
|
431
|
-
updateVersion = vi.fn();
|
|
432
|
-
dispose = vi.fn();
|
|
433
|
-
constructor(options?: unknown) {
|
|
434
|
-
hoisted.mockSplatMeshOptions.push(options ?? {});
|
|
435
|
-
}
|
|
436
|
-
},
|
|
437
|
-
dyno: {
|
|
438
|
-
Gsplat: { type: "Gsplat" },
|
|
439
|
-
dynoBlock: vi.fn(() => ({ kind: "dynoBlock" })),
|
|
440
|
-
dynoFloat: vi.fn((value = 0) => ({ value })),
|
|
441
|
-
dynoVec3: vi.fn((value = new MockVector3()) => ({ value })),
|
|
442
|
-
dynoConst: vi.fn((_type: string, value: number) => ({ value })),
|
|
443
|
-
splitGsplat: vi.fn(() => ({
|
|
444
|
-
outputs: { center: {}, scales: {}, rgb: {}, opacity: {} },
|
|
445
|
-
})),
|
|
446
|
-
combineGsplat: vi.fn((value: unknown) => value),
|
|
447
|
-
add: vi.fn(() => ({})),
|
|
448
|
-
sub: vi.fn(() => ({})),
|
|
449
|
-
mul: vi.fn(() => ({})),
|
|
450
|
-
div: vi.fn(() => ({})),
|
|
451
|
-
abs: vi.fn(() => ({})),
|
|
452
|
-
clamp: vi.fn(() => ({})),
|
|
453
|
-
max: vi.fn(() => ({})),
|
|
454
|
-
mix: vi.fn(() => ({})),
|
|
455
|
-
smoothstep: vi.fn(() => ({})),
|
|
456
|
-
pow: vi.fn(() => ({})),
|
|
457
|
-
length: vi.fn(() => ({})),
|
|
458
|
-
swizzle: vi.fn(() => ({})),
|
|
459
|
-
},
|
|
460
|
-
}));
|
|
461
|
-
|
|
462
|
-
vi.mock("@pixiv/three-vrm", () => ({
|
|
463
|
-
MToonMaterialLoaderPlugin: hoisted.mockMToonMaterialLoaderPlugin,
|
|
464
|
-
VRMLoaderPlugin: hoisted.mockVRMLoaderPlugin,
|
|
465
|
-
VRMUtils: {
|
|
466
|
-
deepDispose: vi.fn(),
|
|
467
|
-
removeUnnecessaryVertices: vi.fn(),
|
|
468
|
-
combineSkeletons: vi.fn(),
|
|
469
|
-
},
|
|
470
|
-
}));
|
|
471
|
-
|
|
472
|
-
vi.mock("@pixiv/three-vrm/nodes", () => ({
|
|
473
|
-
MToonNodeMaterial: class MockMToonNodeMaterial {},
|
|
474
|
-
}));
|
|
475
|
-
|
|
476
|
-
vi.mock("three/examples/jsm/loaders/GLTFLoader.js", () => ({
|
|
477
|
-
GLTFLoader: class MockGLTFLoader {
|
|
478
|
-
register = hoisted.mockLoaderRegister;
|
|
479
|
-
setDRACOLoader = hoisted.mockLoaderSetDRACOLoader;
|
|
480
|
-
setMeshoptDecoder = hoisted.mockLoaderSetMeshoptDecoder;
|
|
481
|
-
loadAsync = hoisted.mockLoaderLoadAsync;
|
|
482
|
-
},
|
|
483
|
-
}));
|
|
484
|
-
|
|
485
|
-
vi.mock("three/examples/jsm/loaders/DRACOLoader.js", () => ({
|
|
486
|
-
DRACOLoader: class MockDRACOLoader {
|
|
487
|
-
setDecoderConfig = hoisted.mockDracoLoaderSetDecoderConfig;
|
|
488
|
-
setDecoderPath = hoisted.mockDracoLoaderSetDecoderPath;
|
|
489
|
-
preload = hoisted.mockDracoLoaderPreload;
|
|
490
|
-
},
|
|
491
|
-
}));
|
|
492
|
-
|
|
493
|
-
vi.mock("three/examples/jsm/libs/meshopt_decoder.module.js", () => ({
|
|
494
|
-
MeshoptDecoder: { supported: true },
|
|
495
|
-
}));
|
|
496
|
-
|
|
497
|
-
vi.mock("three/examples/jsm/controls/OrbitControls.js", () => ({
|
|
498
|
-
OrbitControls: class MockOrbitControls {
|
|
499
|
-
enablePan = true;
|
|
500
|
-
enableRotate = true;
|
|
501
|
-
enableZoom = true;
|
|
502
|
-
enableDamping = false;
|
|
503
|
-
dampingFactor = 0.05;
|
|
504
|
-
zoomSpeed = 1;
|
|
505
|
-
minDistance = 0;
|
|
506
|
-
maxDistance = Infinity;
|
|
507
|
-
minPolarAngle = 0;
|
|
508
|
-
maxPolarAngle = Math.PI;
|
|
509
|
-
target = { set: vi.fn(), copy: vi.fn(), x: 0, y: 0, z: 0 };
|
|
510
|
-
update = vi.fn();
|
|
511
|
-
dispose = vi.fn();
|
|
512
|
-
addEventListener = vi.fn();
|
|
513
|
-
removeEventListener = vi.fn();
|
|
514
|
-
enabled = true;
|
|
515
|
-
},
|
|
516
|
-
}));
|
|
517
|
-
|
|
518
|
-
vi.mock("@elizaos/app-core/utils", () => ({
|
|
519
|
-
resolveAppAssetUrl: vi.fn((p: string) => `/mock/${p}`),
|
|
520
|
-
}));
|
|
521
|
-
|
|
522
|
-
// Stub DOM APIs that VrmEngine relies on
|
|
523
|
-
const rafIds = { current: 0 };
|
|
524
|
-
Object.assign(globalThis, {
|
|
525
|
-
requestAnimationFrame: vi.fn(() => {
|
|
526
|
-
return ++rafIds.current;
|
|
527
|
-
}),
|
|
528
|
-
cancelAnimationFrame: vi.fn(),
|
|
529
|
-
});
|
|
530
|
-
|
|
531
|
-
// VrmEngine.setup() accesses window.devicePixelRatio
|
|
532
|
-
Object.assign(globalThis, {
|
|
533
|
-
window: {
|
|
534
|
-
devicePixelRatio: 1,
|
|
535
|
-
addEventListener: vi.fn(),
|
|
536
|
-
removeEventListener: vi.fn(),
|
|
537
|
-
localStorage: {
|
|
538
|
-
getItem: vi.fn(() => null),
|
|
539
|
-
setItem: vi.fn(),
|
|
540
|
-
removeItem: vi.fn(),
|
|
541
|
-
},
|
|
542
|
-
},
|
|
543
|
-
});
|
|
544
|
-
Object.defineProperty(globalThis, "navigator", {
|
|
545
|
-
configurable: true,
|
|
546
|
-
value: hoisted.navigatorMock as unknown as Navigator,
|
|
547
|
-
});
|
|
548
|
-
Object.assign(globalThis, {
|
|
549
|
-
fetch: hoisted.fetchMock,
|
|
550
|
-
});
|
|
551
|
-
|
|
552
|
-
// VrmEngine.createFootShadow accesses document.createElement
|
|
553
|
-
const mockCanvas2d = {
|
|
554
|
-
createRadialGradient: vi.fn(() => ({
|
|
555
|
-
addColorStop: vi.fn(),
|
|
556
|
-
})),
|
|
557
|
-
fillStyle: "",
|
|
558
|
-
fillRect: vi.fn(),
|
|
559
|
-
fill: vi.fn(),
|
|
560
|
-
beginPath: vi.fn(),
|
|
561
|
-
arc: vi.fn(),
|
|
562
|
-
};
|
|
563
|
-
Object.assign(globalThis, {
|
|
564
|
-
document: {
|
|
565
|
-
createElement: vi.fn(() => ({
|
|
566
|
-
width: 0,
|
|
567
|
-
height: 0,
|
|
568
|
-
getContext: vi.fn(() => mockCanvas2d),
|
|
569
|
-
})),
|
|
570
|
-
},
|
|
571
|
-
});
|
|
572
|
-
|
|
573
|
-
// ---------------------------------------------------------------------------
|
|
574
|
-
// Import after mocks
|
|
575
|
-
// ---------------------------------------------------------------------------
|
|
576
|
-
import { VrmEngine } from "../VrmEngine";
|
|
577
|
-
|
|
578
|
-
// ---------------------------------------------------------------------------
|
|
579
|
-
// Helpers
|
|
580
|
-
// ---------------------------------------------------------------------------
|
|
581
|
-
|
|
582
|
-
function createMockCanvas(): HTMLCanvasElement {
|
|
583
|
-
return {
|
|
584
|
-
clientWidth: 800,
|
|
585
|
-
clientHeight: 600,
|
|
586
|
-
getBoundingClientRect: () => ({
|
|
587
|
-
width: 800,
|
|
588
|
-
height: 600,
|
|
589
|
-
x: 0,
|
|
590
|
-
y: 0,
|
|
591
|
-
top: 0,
|
|
592
|
-
left: 0,
|
|
593
|
-
bottom: 600,
|
|
594
|
-
right: 800,
|
|
595
|
-
toJSON: () => ({}),
|
|
596
|
-
}),
|
|
597
|
-
} as unknown as HTMLCanvasElement;
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
function createMockLoadedVrm() {
|
|
601
|
-
return {
|
|
602
|
-
scene: {
|
|
603
|
-
parent: null,
|
|
604
|
-
visible: true,
|
|
605
|
-
traverse: vi.fn(),
|
|
606
|
-
updateMatrixWorld: vi.fn(),
|
|
607
|
-
scale: { setScalar: vi.fn() },
|
|
608
|
-
position: { set: vi.fn() },
|
|
609
|
-
},
|
|
610
|
-
humanoid: {
|
|
611
|
-
getNormalizedBoneNode: vi.fn(() => null),
|
|
612
|
-
},
|
|
613
|
-
springBoneManager: {
|
|
614
|
-
reset: vi.fn(),
|
|
615
|
-
},
|
|
616
|
-
};
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
async function waitForEngineReady(engine: VrmEngine): Promise<void> {
|
|
620
|
-
await engine.whenReady();
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
// ---------------------------------------------------------------------------
|
|
624
|
-
// Tests
|
|
625
|
-
// ---------------------------------------------------------------------------
|
|
626
|
-
|
|
627
|
-
describe("VrmEngine", () => {
|
|
628
|
-
let engine: VrmEngine;
|
|
629
|
-
|
|
630
|
-
beforeEach(() => {
|
|
631
|
-
vi.clearAllMocks();
|
|
632
|
-
hoisted.mixerListeners.clear();
|
|
633
|
-
hoisted.navigatorMock.gpu = undefined;
|
|
634
|
-
hoisted.fetchMock.mockResolvedValue({
|
|
635
|
-
ok: true,
|
|
636
|
-
status: 200,
|
|
637
|
-
arrayBuffer: hoisted.responseArrayBufferMock,
|
|
638
|
-
});
|
|
639
|
-
hoisted.responseArrayBufferMock.mockResolvedValue(new ArrayBuffer(8));
|
|
640
|
-
delete (window as Window & { __electrobunWindowId?: number })
|
|
641
|
-
.__electrobunWindowId;
|
|
642
|
-
delete (window as Window & { __electrobunWebviewId?: number })
|
|
643
|
-
.__electrobunWebviewId;
|
|
644
|
-
engine = new VrmEngine();
|
|
645
|
-
});
|
|
646
|
-
|
|
647
|
-
afterEach(() => {
|
|
648
|
-
engine.dispose();
|
|
649
|
-
});
|
|
650
|
-
|
|
651
|
-
// ── 1. Setup / dispose lifecycle ─────────────────────────────────
|
|
652
|
-
describe("setup / dispose lifecycle", () => {
|
|
653
|
-
it("creates an engine without throwing", () => {
|
|
654
|
-
expect(engine).toBeInstanceOf(VrmEngine);
|
|
655
|
-
});
|
|
656
|
-
|
|
657
|
-
it("is not initialized before setup()", () => {
|
|
658
|
-
expect(engine.isInitialized()).toBe(false);
|
|
659
|
-
});
|
|
660
|
-
|
|
661
|
-
it("is initialized after setup()", async () => {
|
|
662
|
-
const canvas = createMockCanvas();
|
|
663
|
-
engine.setup(canvas, vi.fn());
|
|
664
|
-
await waitForEngineReady(engine);
|
|
665
|
-
expect(engine.isInitialized()).toBe(true);
|
|
666
|
-
});
|
|
667
|
-
|
|
668
|
-
it("dispose() does not throw on an un-initialized engine", () => {
|
|
669
|
-
expect(() => engine.dispose()).not.toThrow();
|
|
670
|
-
});
|
|
671
|
-
|
|
672
|
-
it("dispose() cleans up after setup()", async () => {
|
|
673
|
-
const canvas = createMockCanvas();
|
|
674
|
-
engine.setup(canvas, vi.fn());
|
|
675
|
-
await waitForEngineReady(engine);
|
|
676
|
-
expect(engine.isInitialized()).toBe(true);
|
|
677
|
-
|
|
678
|
-
engine.dispose();
|
|
679
|
-
expect(engine.isInitialized()).toBe(false);
|
|
680
|
-
});
|
|
681
|
-
|
|
682
|
-
it("can be setup() again after dispose()", async () => {
|
|
683
|
-
const canvas = createMockCanvas();
|
|
684
|
-
engine.setup(canvas, vi.fn());
|
|
685
|
-
await waitForEngineReady(engine);
|
|
686
|
-
engine.dispose();
|
|
687
|
-
expect(engine.isInitialized()).toBe(false);
|
|
688
|
-
|
|
689
|
-
engine.setup(canvas, vi.fn());
|
|
690
|
-
await waitForEngineReady(engine);
|
|
691
|
-
expect(engine.isInitialized()).toBe(true);
|
|
692
|
-
});
|
|
693
|
-
|
|
694
|
-
it("re-setup with the same canvas reuses the engine (no dispose)", async () => {
|
|
695
|
-
const canvas = createMockCanvas();
|
|
696
|
-
// Assign domElement so the "same canvas" check passes
|
|
697
|
-
hoisted.mockRendererInstance.domElement = canvas;
|
|
698
|
-
|
|
699
|
-
const cb1 = vi.fn();
|
|
700
|
-
const cb2 = vi.fn();
|
|
701
|
-
engine.setup(canvas, cb1);
|
|
702
|
-
await waitForEngineReady(engine);
|
|
703
|
-
engine.setup(canvas, cb2);
|
|
704
|
-
expect(engine.isInitialized()).toBe(true);
|
|
705
|
-
// dispose should not have been called between the two setups
|
|
706
|
-
expect(hoisted.mockRendererInstance.dispose).not.toHaveBeenCalled();
|
|
707
|
-
});
|
|
708
|
-
|
|
709
|
-
it("pauses and resumes the render loop without disposing the scene", async () => {
|
|
710
|
-
const canvas = createMockCanvas();
|
|
711
|
-
engine.setup(canvas, vi.fn());
|
|
712
|
-
await waitForEngineReady(engine);
|
|
713
|
-
|
|
714
|
-
expect(globalThis.requestAnimationFrame).toHaveBeenCalledTimes(1);
|
|
715
|
-
|
|
716
|
-
engine.setPaused(true);
|
|
717
|
-
expect(globalThis.cancelAnimationFrame).toHaveBeenCalledTimes(1);
|
|
718
|
-
expect(hoisted.mockRendererInstance.dispose).not.toHaveBeenCalled();
|
|
719
|
-
|
|
720
|
-
engine.setPaused(false);
|
|
721
|
-
expect(globalThis.requestAnimationFrame).toHaveBeenCalledTimes(2);
|
|
722
|
-
});
|
|
723
|
-
|
|
724
|
-
it("waits for the renderer to finish initializing", async () => {
|
|
725
|
-
const canvas = createMockCanvas();
|
|
726
|
-
engine.setup(canvas, vi.fn());
|
|
727
|
-
|
|
728
|
-
await expect(engine.whenReady()).resolves.toBeUndefined();
|
|
729
|
-
expect(engine.isInitialized()).toBe(true);
|
|
730
|
-
});
|
|
731
|
-
|
|
732
|
-
it("defaults to WebGLRenderer when navigator.gpu is available", async () => {
|
|
733
|
-
hoisted.navigatorMock.gpu = {};
|
|
734
|
-
const canvas = createMockCanvas();
|
|
735
|
-
|
|
736
|
-
engine.setup(canvas, vi.fn());
|
|
737
|
-
await waitForEngineReady(engine);
|
|
738
|
-
|
|
739
|
-
const engineAny = engine as unknown as { rendererBackend: string };
|
|
740
|
-
expect(engineAny.rendererBackend).toBe("webgl");
|
|
741
|
-
expect(hoisted.mockWebGpuRendererInstance.init).not.toHaveBeenCalled();
|
|
742
|
-
expect(hoisted.mockRendererInstance.setPixelRatio).toHaveBeenCalledWith(
|
|
743
|
-
1,
|
|
744
|
-
);
|
|
745
|
-
});
|
|
746
|
-
|
|
747
|
-
it("uses WebGPURenderer when navigator.gpu is available and opted in", async () => {
|
|
748
|
-
hoisted.navigatorMock.gpu = {};
|
|
749
|
-
(
|
|
750
|
-
window.localStorage.getItem as ReturnType<typeof vi.fn>
|
|
751
|
-
).mockReturnValueOnce("webgpu");
|
|
752
|
-
const canvas = createMockCanvas();
|
|
753
|
-
|
|
754
|
-
engine.setup(canvas, vi.fn());
|
|
755
|
-
await waitForEngineReady(engine);
|
|
756
|
-
|
|
757
|
-
const engineAny = engine as unknown as { rendererBackend: string };
|
|
758
|
-
expect(engineAny.rendererBackend).toBe("webgpu");
|
|
759
|
-
expect(hoisted.mockWebGpuRendererInstance.init).toHaveBeenCalledTimes(1);
|
|
760
|
-
expect(
|
|
761
|
-
hoisted.mockWebGpuRendererInstance.setPixelRatio,
|
|
762
|
-
).toHaveBeenCalledWith(1);
|
|
763
|
-
});
|
|
764
|
-
|
|
765
|
-
it("uses WebGPURenderer by default in Electrobun runtime", async () => {
|
|
766
|
-
hoisted.navigatorMock.gpu = {};
|
|
767
|
-
(
|
|
768
|
-
window as Window & { __electrobunWindowId?: number }
|
|
769
|
-
).__electrobunWindowId = 1;
|
|
770
|
-
const canvas = createMockCanvas();
|
|
771
|
-
|
|
772
|
-
engine.setup(canvas, vi.fn());
|
|
773
|
-
await waitForEngineReady(engine);
|
|
774
|
-
|
|
775
|
-
const engineAny = engine as unknown as { rendererBackend: string };
|
|
776
|
-
expect(engineAny.rendererBackend).toBe("webgpu");
|
|
777
|
-
expect(hoisted.mockWebGpuRendererInstance.init).toHaveBeenCalledTimes(1);
|
|
778
|
-
});
|
|
779
|
-
|
|
780
|
-
it("cleans up WebGL resources during dispose()", async () => {
|
|
781
|
-
const canvas = createMockCanvas();
|
|
782
|
-
engine.setup(canvas, vi.fn());
|
|
783
|
-
await waitForEngineReady(engine);
|
|
784
|
-
|
|
785
|
-
engine.dispose();
|
|
786
|
-
|
|
787
|
-
expect(hoisted.mockRendererInstance.dispose).toHaveBeenCalled();
|
|
788
|
-
});
|
|
789
|
-
});
|
|
790
|
-
|
|
791
|
-
// ── 2. playEmote doesn't throw ───────────────────────────────────
|
|
792
|
-
describe("playEmote", () => {
|
|
793
|
-
it("returns immediately when VRM is not loaded (no mixer)", async () => {
|
|
794
|
-
const canvas = createMockCanvas();
|
|
795
|
-
engine.setup(canvas, vi.fn());
|
|
796
|
-
await waitForEngineReady(engine);
|
|
797
|
-
// No VRM loaded — playEmote should resolve silently
|
|
798
|
-
await expect(
|
|
799
|
-
engine.playEmote("/mock/emote.glb", 2, false),
|
|
800
|
-
).resolves.toBeUndefined();
|
|
801
|
-
});
|
|
802
|
-
|
|
803
|
-
it("stopEmote() does not throw when no emote is playing", async () => {
|
|
804
|
-
const canvas = createMockCanvas();
|
|
805
|
-
engine.setup(canvas, vi.fn());
|
|
806
|
-
await waitForEngineReady(engine);
|
|
807
|
-
expect(() => engine.stopEmote()).not.toThrow();
|
|
808
|
-
});
|
|
809
|
-
});
|
|
810
|
-
|
|
811
|
-
// ── 3. State transitions ─────────────────────────────────────────
|
|
812
|
-
describe("state transitions", () => {
|
|
813
|
-
it("initial state has no VRM loaded", () => {
|
|
814
|
-
const state = engine.getState();
|
|
815
|
-
expect(state.vrmLoaded).toBe(false);
|
|
816
|
-
expect(state.vrmName).toBeNull();
|
|
817
|
-
expect(state.idlePlaying).toBe(false);
|
|
818
|
-
expect(state.idleTime).toBe(0);
|
|
819
|
-
expect(state.idleTracks).toBe(0);
|
|
820
|
-
});
|
|
821
|
-
|
|
822
|
-
it("state after setup still has no VRM loaded", async () => {
|
|
823
|
-
const canvas = createMockCanvas();
|
|
824
|
-
engine.setup(canvas, vi.fn());
|
|
825
|
-
await waitForEngineReady(engine);
|
|
826
|
-
const state = engine.getState();
|
|
827
|
-
expect(state.vrmLoaded).toBe(false);
|
|
828
|
-
expect(state.vrmName).toBeNull();
|
|
829
|
-
});
|
|
830
|
-
|
|
831
|
-
it("state after dispose resets to initial", async () => {
|
|
832
|
-
const canvas = createMockCanvas();
|
|
833
|
-
engine.setup(canvas, vi.fn());
|
|
834
|
-
await waitForEngineReady(engine);
|
|
835
|
-
engine.dispose();
|
|
836
|
-
const state = engine.getState();
|
|
837
|
-
expect(state.vrmLoaded).toBe(false);
|
|
838
|
-
expect(state.vrmName).toBeNull();
|
|
839
|
-
expect(state.idlePlaying).toBe(false);
|
|
840
|
-
});
|
|
841
|
-
|
|
842
|
-
it("getState() returns the VrmEngineState shape", () => {
|
|
843
|
-
const state = engine.getState();
|
|
844
|
-
const keys = Object.keys(state).sort();
|
|
845
|
-
expect(keys).toEqual(
|
|
846
|
-
[
|
|
847
|
-
"idlePlaying",
|
|
848
|
-
"idleTime",
|
|
849
|
-
"idleTracks",
|
|
850
|
-
"loadError",
|
|
851
|
-
"revealStarted",
|
|
852
|
-
"vrmLoaded",
|
|
853
|
-
"vrmName",
|
|
854
|
-
].sort(),
|
|
855
|
-
);
|
|
856
|
-
});
|
|
857
|
-
});
|
|
858
|
-
|
|
859
|
-
// ── 4. Public setters ────────────────────────────────────────────
|
|
860
|
-
describe("public setters", () => {
|
|
861
|
-
it("setMouthOpen clamps values to [0, 1]", () => {
|
|
862
|
-
expect(() => engine.setMouthOpen(0)).not.toThrow();
|
|
863
|
-
expect(() => engine.setMouthOpen(1)).not.toThrow();
|
|
864
|
-
expect(() => engine.setMouthOpen(-0.5)).not.toThrow();
|
|
865
|
-
expect(() => engine.setMouthOpen(2.0)).not.toThrow();
|
|
866
|
-
});
|
|
867
|
-
|
|
868
|
-
it("setSpeaking toggles without throwing", () => {
|
|
869
|
-
expect(() => engine.setSpeaking(true)).not.toThrow();
|
|
870
|
-
expect(() => engine.setSpeaking(false)).not.toThrow();
|
|
871
|
-
});
|
|
872
|
-
|
|
873
|
-
it("setCameraAnimation merges partial config", () => {
|
|
874
|
-
expect(() => engine.setCameraAnimation({ enabled: false })).not.toThrow();
|
|
875
|
-
expect(() =>
|
|
876
|
-
engine.setCameraAnimation({ swayAmplitude: 0.1, speed: 1.5 }),
|
|
877
|
-
).not.toThrow();
|
|
878
|
-
});
|
|
879
|
-
|
|
880
|
-
it("setCompanionZoomNormalized clamps to the supported range", () => {
|
|
881
|
-
const engineAny = engine as unknown as { companionZoomTarget: number };
|
|
882
|
-
|
|
883
|
-
engine.setCompanionZoomNormalized(-0.5);
|
|
884
|
-
expect(engineAny.companionZoomTarget).toBe(0);
|
|
885
|
-
|
|
886
|
-
engine.setCompanionZoomNormalized(1.4);
|
|
887
|
-
expect(engineAny.companionZoomTarget).toBe(1);
|
|
888
|
-
});
|
|
889
|
-
|
|
890
|
-
it("queues the first world reveal until the VRM is ready", async () => {
|
|
891
|
-
const canvas = createMockCanvas();
|
|
892
|
-
engine.setup(canvas, vi.fn());
|
|
893
|
-
await waitForEngineReady(engine);
|
|
894
|
-
|
|
895
|
-
const engineAny = engine as unknown as {
|
|
896
|
-
worldReveal: {
|
|
897
|
-
waitingForVrm: boolean;
|
|
898
|
-
syncToTeleport: boolean;
|
|
899
|
-
progress: number;
|
|
900
|
-
controller: {
|
|
901
|
-
mesh: {
|
|
902
|
-
objectModifier: unknown;
|
|
903
|
-
updateGenerator: ReturnType<typeof vi.fn>;
|
|
904
|
-
updateVersion: ReturnType<typeof vi.fn>;
|
|
905
|
-
};
|
|
906
|
-
};
|
|
907
|
-
} | null;
|
|
908
|
-
};
|
|
909
|
-
|
|
910
|
-
await engine.setWorldUrl("/worlds/companion-day.spz");
|
|
911
|
-
|
|
912
|
-
expect(engineAny.worldReveal?.waitingForVrm).toBe(true);
|
|
913
|
-
expect(engineAny.worldReveal?.syncToTeleport).toBe(false);
|
|
914
|
-
expect(engineAny.worldReveal?.progress).toBe(0);
|
|
915
|
-
expect(
|
|
916
|
-
engineAny.worldReveal?.controller.mesh.objectModifier,
|
|
917
|
-
).toBeTruthy();
|
|
918
|
-
expect(
|
|
919
|
-
engineAny.worldReveal?.controller.mesh.updateGenerator,
|
|
920
|
-
).toHaveBeenCalled();
|
|
921
|
-
expect(
|
|
922
|
-
engineAny.worldReveal?.controller.mesh.updateVersion,
|
|
923
|
-
).toHaveBeenCalled();
|
|
924
|
-
});
|
|
925
|
-
|
|
926
|
-
it("resize() handles zero or negative dimensions gracefully", async () => {
|
|
927
|
-
const canvas = createMockCanvas();
|
|
928
|
-
engine.setup(canvas, vi.fn());
|
|
929
|
-
await waitForEngineReady(engine);
|
|
930
|
-
expect(() => engine.resize(0, 0)).not.toThrow();
|
|
931
|
-
expect(() => engine.resize(-1, 600)).not.toThrow();
|
|
932
|
-
expect(() => engine.resize(800, -1)).not.toThrow();
|
|
933
|
-
expect(() => engine.resize(1024, 768)).not.toThrow();
|
|
934
|
-
});
|
|
935
|
-
|
|
936
|
-
it("resize() is a no-op before setup()", () => {
|
|
937
|
-
expect(() => engine.resize(800, 600)).not.toThrow();
|
|
938
|
-
});
|
|
939
|
-
|
|
940
|
-
it("configures Spark native depth of field for world rendering", async () => {
|
|
941
|
-
const canvas = createMockCanvas();
|
|
942
|
-
engine.setup(canvas, vi.fn());
|
|
943
|
-
await waitForEngineReady(engine);
|
|
944
|
-
|
|
945
|
-
await engine.setWorldUrl("/worlds/companion-day.spz");
|
|
946
|
-
|
|
947
|
-
expect(hoisted.mockSplatMeshOptions.at(-1)).toMatchObject({
|
|
948
|
-
url: "/worlds/companion-day.spz",
|
|
949
|
-
});
|
|
950
|
-
expect(hoisted.mockSparkRendererOptions.at(-1)).toMatchObject({
|
|
951
|
-
apertureAngle: 0,
|
|
952
|
-
clipXY: 1.08,
|
|
953
|
-
focalDistance: 5,
|
|
954
|
-
maxStdDev: 2.35,
|
|
955
|
-
minAlpha: 0.0016,
|
|
956
|
-
view: expect.objectContaining({
|
|
957
|
-
depthBias: 1,
|
|
958
|
-
sortDistance: 0.035,
|
|
959
|
-
sortRadial: true,
|
|
960
|
-
sort360: false,
|
|
961
|
-
}),
|
|
962
|
-
});
|
|
963
|
-
|
|
964
|
-
const engineAny = engine as unknown as {
|
|
965
|
-
sparkRenderer: { focalDistance: number; apertureAngle: number };
|
|
966
|
-
updateSparkDepthOfField: (camera: {
|
|
967
|
-
position: { distanceTo: (target: unknown) => number };
|
|
968
|
-
}) => void;
|
|
969
|
-
};
|
|
970
|
-
engineAny.updateSparkDepthOfField({
|
|
971
|
-
position: { distanceTo: () => 4 },
|
|
972
|
-
});
|
|
973
|
-
|
|
974
|
-
expect(engineAny.sparkRenderer.focalDistance).toBe(4);
|
|
975
|
-
expect(engineAny.sparkRenderer.apertureAngle).toBeCloseTo(
|
|
976
|
-
2 * Math.atan(0.0125 / 4),
|
|
977
|
-
);
|
|
978
|
-
});
|
|
979
|
-
|
|
980
|
-
it("uses theme-specific floor offsets for companion worlds", async () => {
|
|
981
|
-
mockSceneInstance.add.mockClear();
|
|
982
|
-
|
|
983
|
-
const canvas = createMockCanvas();
|
|
984
|
-
engine.setup(canvas, vi.fn());
|
|
985
|
-
await waitForEngineReady(engine);
|
|
986
|
-
|
|
987
|
-
await engine.setWorldUrl("/worlds/companion-day.spz");
|
|
988
|
-
const daySplat = mockSceneInstance.add.mock.calls.at(-1)?.[0] as {
|
|
989
|
-
position: { set: ReturnType<typeof vi.fn> };
|
|
990
|
-
};
|
|
991
|
-
|
|
992
|
-
await engine.setWorldUrl("/worlds/companion-night.spz");
|
|
993
|
-
const nightSplat = mockSceneInstance.add.mock.calls.at(-1)?.[0] as {
|
|
994
|
-
position: { set: ReturnType<typeof vi.fn> };
|
|
995
|
-
};
|
|
996
|
-
|
|
997
|
-
const dayPosition = daySplat.position.set.mock.calls.at(-1) ?? [];
|
|
998
|
-
const nightPosition = nightSplat.position.set.mock.calls.at(-1) ?? [];
|
|
999
|
-
|
|
1000
|
-
expect(dayPosition[0]).toBeCloseTo(0, 5);
|
|
1001
|
-
expect(dayPosition[1]).toBeCloseTo(-0.35, 5);
|
|
1002
|
-
expect(dayPosition[2]).toBeCloseTo(0, 5);
|
|
1003
|
-
expect(nightPosition[0]).toBeCloseTo(0, 5);
|
|
1004
|
-
expect(nightPosition[1]).toBeCloseTo(-0.95, 5);
|
|
1005
|
-
expect(nightPosition[2]).toBeCloseTo(0, 5);
|
|
1006
|
-
});
|
|
1007
|
-
|
|
1008
|
-
it("starts a pending world reveal when the teleport dissolve begins", async () => {
|
|
1009
|
-
const canvas = createMockCanvas();
|
|
1010
|
-
engine.setup(canvas, vi.fn());
|
|
1011
|
-
await waitForEngineReady(engine);
|
|
1012
|
-
|
|
1013
|
-
await engine.setWorldUrl("/worlds/companion-day.spz");
|
|
1014
|
-
|
|
1015
|
-
const engineAny = engine as unknown as {
|
|
1016
|
-
teleportProgress: number;
|
|
1017
|
-
startPendingWorldReveal: (syncToTeleport: boolean) => void;
|
|
1018
|
-
worldReveal: {
|
|
1019
|
-
waitingForVrm: boolean;
|
|
1020
|
-
syncToTeleport: boolean;
|
|
1021
|
-
progress: number;
|
|
1022
|
-
controller: {
|
|
1023
|
-
mesh: {
|
|
1024
|
-
objectModifier: unknown;
|
|
1025
|
-
updateGenerator: ReturnType<typeof vi.fn>;
|
|
1026
|
-
};
|
|
1027
|
-
};
|
|
1028
|
-
} | null;
|
|
1029
|
-
};
|
|
1030
|
-
|
|
1031
|
-
engineAny.teleportProgress = 0.35;
|
|
1032
|
-
engineAny.startPendingWorldReveal(true);
|
|
1033
|
-
|
|
1034
|
-
expect(engineAny.worldReveal?.waitingForVrm).toBe(false);
|
|
1035
|
-
expect(engineAny.worldReveal?.syncToTeleport).toBe(true);
|
|
1036
|
-
expect(engineAny.worldReveal?.progress).toBeCloseTo(0.35);
|
|
1037
|
-
expect(
|
|
1038
|
-
engineAny.worldReveal?.controller.mesh.objectModifier,
|
|
1039
|
-
).toBeTruthy();
|
|
1040
|
-
expect(
|
|
1041
|
-
engineAny.worldReveal?.controller.mesh.updateGenerator,
|
|
1042
|
-
).toHaveBeenCalled();
|
|
1043
|
-
});
|
|
1044
|
-
|
|
1045
|
-
it("keeps the previous world alive while the next world dissolves in", async () => {
|
|
1046
|
-
const canvas = createMockCanvas();
|
|
1047
|
-
engine.setup(canvas, vi.fn());
|
|
1048
|
-
await waitForEngineReady(engine);
|
|
1049
|
-
|
|
1050
|
-
await engine.setWorldUrl("/worlds/companion-day.spz");
|
|
1051
|
-
|
|
1052
|
-
const engineAny = engine as unknown as {
|
|
1053
|
-
vrmReady: boolean;
|
|
1054
|
-
worldMesh: {
|
|
1055
|
-
opacity: number;
|
|
1056
|
-
objectModifier: unknown;
|
|
1057
|
-
dispose: ReturnType<typeof vi.fn>;
|
|
1058
|
-
} | null;
|
|
1059
|
-
worldReveal: {
|
|
1060
|
-
waitingForVrm: boolean;
|
|
1061
|
-
syncToTeleport: boolean;
|
|
1062
|
-
progress: number;
|
|
1063
|
-
duration: number;
|
|
1064
|
-
controller: {
|
|
1065
|
-
progressUniform: { value: number };
|
|
1066
|
-
mesh: {
|
|
1067
|
-
opacity: number;
|
|
1068
|
-
objectModifier: unknown;
|
|
1069
|
-
dispose: ReturnType<typeof vi.fn>;
|
|
1070
|
-
};
|
|
1071
|
-
radius: number;
|
|
1072
|
-
};
|
|
1073
|
-
incoming: {
|
|
1074
|
-
progressUniform: { value: number };
|
|
1075
|
-
mesh: {
|
|
1076
|
-
opacity: number;
|
|
1077
|
-
objectModifier: unknown;
|
|
1078
|
-
dispose: ReturnType<typeof vi.fn>;
|
|
1079
|
-
};
|
|
1080
|
-
radius: number;
|
|
1081
|
-
};
|
|
1082
|
-
outgoing: {
|
|
1083
|
-
progressUniform: { value: number };
|
|
1084
|
-
mesh: {
|
|
1085
|
-
opacity: number;
|
|
1086
|
-
objectModifier: unknown;
|
|
1087
|
-
dispose: ReturnType<typeof vi.fn>;
|
|
1088
|
-
};
|
|
1089
|
-
radius: number;
|
|
1090
|
-
} | null;
|
|
1091
|
-
} | null;
|
|
1092
|
-
updateWorldReveal: (stableDelta: number) => void;
|
|
1093
|
-
};
|
|
1094
|
-
|
|
1095
|
-
const firstWorld = engineAny.worldMesh;
|
|
1096
|
-
expect(firstWorld).toBeTruthy();
|
|
1097
|
-
|
|
1098
|
-
engineAny.vrmReady = true;
|
|
1099
|
-
await engine.setWorldUrl("/worlds/companion-night.spz");
|
|
1100
|
-
const secondWorld = engineAny.worldMesh;
|
|
1101
|
-
|
|
1102
|
-
expect(secondWorld).toBeTruthy();
|
|
1103
|
-
expect(secondWorld).not.toBe(firstWorld);
|
|
1104
|
-
expect(firstWorld?.dispose).not.toHaveBeenCalled();
|
|
1105
|
-
expect(engineAny.worldReveal?.waitingForVrm).toBe(false);
|
|
1106
|
-
expect(engineAny.worldReveal?.syncToTeleport).toBe(false);
|
|
1107
|
-
expect(engineAny.worldReveal?.incoming.mesh).toBe(secondWorld);
|
|
1108
|
-
expect(engineAny.worldReveal?.outgoing?.mesh).toBe(firstWorld);
|
|
1109
|
-
expect(engineAny.worldReveal?.controller.mesh).toBe(secondWorld);
|
|
1110
|
-
expect(engineAny.worldReveal?.incoming.radius).toBeCloseTo(
|
|
1111
|
-
engineAny.worldReveal?.outgoing?.radius ?? 0,
|
|
1112
|
-
);
|
|
1113
|
-
expect(engineAny.worldReveal?.incoming.mesh.objectModifier).toBeTruthy();
|
|
1114
|
-
expect(engineAny.worldReveal?.outgoing?.mesh.objectModifier).toBeTruthy();
|
|
1115
|
-
|
|
1116
|
-
const halfDuration = (engineAny.worldReveal?.duration ?? 0) / 2;
|
|
1117
|
-
engineAny.updateWorldReveal(halfDuration);
|
|
1118
|
-
expect(engineAny.worldReveal?.progress).toBeCloseTo(0.5, 5);
|
|
1119
|
-
expect(engineAny.worldReveal?.incoming.progressUniform.value).toBeCloseTo(
|
|
1120
|
-
0.25,
|
|
1121
|
-
5,
|
|
1122
|
-
);
|
|
1123
|
-
expect(
|
|
1124
|
-
engineAny.worldReveal?.outgoing?.progressUniform.value,
|
|
1125
|
-
).toBeCloseTo(0.25, 5);
|
|
1126
|
-
expect(firstWorld?.dispose).not.toHaveBeenCalled();
|
|
1127
|
-
for (let i = 0; i < 32 && engineAny.worldReveal; i++) {
|
|
1128
|
-
engineAny.updateWorldReveal(0.4);
|
|
1129
|
-
}
|
|
1130
|
-
expect(engineAny.worldReveal).toBeNull();
|
|
1131
|
-
expect(firstWorld?.dispose).toHaveBeenCalled();
|
|
1132
|
-
expect(secondWorld?.opacity).toBe(1);
|
|
1133
|
-
});
|
|
1134
|
-
});
|
|
1135
|
-
|
|
1136
|
-
// ── 5. Animation blending basics ─────────────────────────────────
|
|
1137
|
-
describe("animation blending", () => {
|
|
1138
|
-
it("stopEmote calls fadeOut on any active emote action", () => {
|
|
1139
|
-
const engineAny = engine as unknown as {
|
|
1140
|
-
emoteAction: ReturnType<typeof createMockAction> | null;
|
|
1141
|
-
idleAction: ReturnType<typeof createMockAction> | null;
|
|
1142
|
-
emoteTimeout: ReturnType<typeof setTimeout> | null;
|
|
1143
|
-
};
|
|
1144
|
-
|
|
1145
|
-
const fakeEmoteAction = createMockAction();
|
|
1146
|
-
const fakeIdleAction = createMockAction();
|
|
1147
|
-
engineAny.emoteAction = fakeEmoteAction;
|
|
1148
|
-
engineAny.idleAction = fakeIdleAction;
|
|
1149
|
-
|
|
1150
|
-
engine.stopEmote();
|
|
1151
|
-
|
|
1152
|
-
expect(fakeIdleAction.crossFadeFrom).toHaveBeenCalledWith(
|
|
1153
|
-
fakeEmoteAction,
|
|
1154
|
-
0.4,
|
|
1155
|
-
false,
|
|
1156
|
-
);
|
|
1157
|
-
expect(fakeIdleAction.play).toHaveBeenCalled();
|
|
1158
|
-
expect(engineAny.emoteAction).toBeNull();
|
|
1159
|
-
});
|
|
1160
|
-
|
|
1161
|
-
it("playEmote crossfades from the current emote instead of bouncing through idle", async () => {
|
|
1162
|
-
const engineAny = engine as unknown as {
|
|
1163
|
-
vrm: object | null;
|
|
1164
|
-
mixer: {
|
|
1165
|
-
clipAction: ReturnType<typeof vi.fn>;
|
|
1166
|
-
addEventListener: ReturnType<typeof vi.fn>;
|
|
1167
|
-
removeEventListener: ReturnType<typeof vi.fn>;
|
|
1168
|
-
} | null;
|
|
1169
|
-
idleAction: ReturnType<typeof createMockAction> | null;
|
|
1170
|
-
emoteAction: ReturnType<typeof createMockAction> | null;
|
|
1171
|
-
loadEmoteClipCached: ReturnType<typeof vi.fn>;
|
|
1172
|
-
};
|
|
1173
|
-
const nextEmoteAction = createMockAction();
|
|
1174
|
-
const currentEmoteAction = createMockAction();
|
|
1175
|
-
const idleAction = createMockAction();
|
|
1176
|
-
|
|
1177
|
-
engineAny.vrm = {
|
|
1178
|
-
scene: {
|
|
1179
|
-
parent: null,
|
|
1180
|
-
},
|
|
1181
|
-
};
|
|
1182
|
-
engineAny.mixer = {
|
|
1183
|
-
clipAction: vi.fn(() => nextEmoteAction),
|
|
1184
|
-
addEventListener: vi.fn(),
|
|
1185
|
-
removeEventListener: vi.fn(),
|
|
1186
|
-
};
|
|
1187
|
-
engineAny.idleAction = idleAction;
|
|
1188
|
-
engineAny.emoteAction = currentEmoteAction;
|
|
1189
|
-
engineAny.loadEmoteClipCached = vi.fn().mockResolvedValue({});
|
|
1190
|
-
|
|
1191
|
-
await engine.playEmote("/mock/emote.glb", 2, false);
|
|
1192
|
-
|
|
1193
|
-
expect(nextEmoteAction.crossFadeFrom).toHaveBeenCalledWith(
|
|
1194
|
-
currentEmoteAction,
|
|
1195
|
-
0.4,
|
|
1196
|
-
false,
|
|
1197
|
-
);
|
|
1198
|
-
expect(idleAction.fadeIn).not.toHaveBeenCalled();
|
|
1199
|
-
expect(engineAny.emoteAction).toBe(nextEmoteAction);
|
|
1200
|
-
});
|
|
1201
|
-
|
|
1202
|
-
it("restores idle as soon as a one-shot emote finishes", async () => {
|
|
1203
|
-
const engineAny = engine as unknown as {
|
|
1204
|
-
vrm: object | null;
|
|
1205
|
-
mixer: typeof hoisted.mockMixerInstance | null;
|
|
1206
|
-
idleAction: ReturnType<typeof createMockAction> | null;
|
|
1207
|
-
emoteAction: ReturnType<typeof createMockAction> | null;
|
|
1208
|
-
loadEmoteClipCached: ReturnType<typeof vi.fn>;
|
|
1209
|
-
};
|
|
1210
|
-
const nextEmoteAction = createMockAction();
|
|
1211
|
-
const idleAction = createMockAction();
|
|
1212
|
-
|
|
1213
|
-
engineAny.vrm = {
|
|
1214
|
-
scene: {
|
|
1215
|
-
parent: null,
|
|
1216
|
-
},
|
|
1217
|
-
};
|
|
1218
|
-
engineAny.mixer = hoisted.mockMixerInstance;
|
|
1219
|
-
engineAny.idleAction = idleAction;
|
|
1220
|
-
engineAny.emoteAction = null;
|
|
1221
|
-
engineAny.loadEmoteClipCached = vi
|
|
1222
|
-
.fn()
|
|
1223
|
-
.mockResolvedValue({ duration: 1.25 });
|
|
1224
|
-
hoisted.mockMixerInstance.clipAction.mockReturnValue(nextEmoteAction);
|
|
1225
|
-
|
|
1226
|
-
await engine.playEmote("/mock/emote.glb", 4, false);
|
|
1227
|
-
hoisted.emitMixerEvent("finished", {
|
|
1228
|
-
type: "finished",
|
|
1229
|
-
action: nextEmoteAction,
|
|
1230
|
-
direction: 1,
|
|
1231
|
-
});
|
|
1232
|
-
|
|
1233
|
-
expect(idleAction.play).toHaveBeenCalled();
|
|
1234
|
-
expect(idleAction.crossFadeFrom).toHaveBeenCalledWith(
|
|
1235
|
-
nextEmoteAction,
|
|
1236
|
-
0.4,
|
|
1237
|
-
false,
|
|
1238
|
-
);
|
|
1239
|
-
expect(engineAny.emoteAction).toBeNull();
|
|
1240
|
-
expect(
|
|
1241
|
-
hoisted.mockMixerInstance.removeEventListener,
|
|
1242
|
-
).toHaveBeenCalledWith("finished", expect.any(Function));
|
|
1243
|
-
});
|
|
1244
|
-
|
|
1245
|
-
it("re-enables idle before blending back from an emote", () => {
|
|
1246
|
-
const engineAny = engine as unknown as {
|
|
1247
|
-
emoteAction: ReturnType<typeof createMockAction> | null;
|
|
1248
|
-
idleAction: ReturnType<typeof createMockAction> | null;
|
|
1249
|
-
};
|
|
1250
|
-
const fakeEmoteAction = createMockAction();
|
|
1251
|
-
const fakeIdleAction = createMockAction();
|
|
1252
|
-
fakeIdleAction.enabled = false;
|
|
1253
|
-
fakeIdleAction.paused = true;
|
|
1254
|
-
|
|
1255
|
-
engineAny.emoteAction = fakeEmoteAction;
|
|
1256
|
-
engineAny.idleAction = fakeIdleAction;
|
|
1257
|
-
|
|
1258
|
-
engine.stopEmote();
|
|
1259
|
-
|
|
1260
|
-
expect(fakeIdleAction.enabled).toBe(true);
|
|
1261
|
-
expect(fakeIdleAction.paused).toBe(false);
|
|
1262
|
-
expect(fakeIdleAction.setEffectiveTimeScale).toHaveBeenCalledWith(1);
|
|
1263
|
-
expect(fakeIdleAction.setEffectiveWeight).toHaveBeenCalledWith(1);
|
|
1264
|
-
expect(fakeIdleAction.crossFadeFrom).toHaveBeenCalledWith(
|
|
1265
|
-
fakeEmoteAction,
|
|
1266
|
-
0.4,
|
|
1267
|
-
false,
|
|
1268
|
-
);
|
|
1269
|
-
});
|
|
1270
|
-
|
|
1271
|
-
it("uses the requested emote duration for one-shot fallback timing", async () => {
|
|
1272
|
-
const setTimeoutSpy = vi.spyOn(globalThis, "setTimeout");
|
|
1273
|
-
const engineAny = engine as unknown as {
|
|
1274
|
-
vrm: object | null;
|
|
1275
|
-
mixer: typeof hoisted.mockMixerInstance | null;
|
|
1276
|
-
idleAction: ReturnType<typeof createMockAction> | null;
|
|
1277
|
-
emoteAction: ReturnType<typeof createMockAction> | null;
|
|
1278
|
-
loadEmoteClipCached: ReturnType<typeof vi.fn>;
|
|
1279
|
-
};
|
|
1280
|
-
const nextEmoteAction = createMockAction();
|
|
1281
|
-
const idleAction = createMockAction();
|
|
1282
|
-
|
|
1283
|
-
try {
|
|
1284
|
-
engineAny.vrm = {
|
|
1285
|
-
scene: {
|
|
1286
|
-
parent: null,
|
|
1287
|
-
},
|
|
1288
|
-
};
|
|
1289
|
-
engineAny.mixer = hoisted.mockMixerInstance;
|
|
1290
|
-
engineAny.idleAction = idleAction;
|
|
1291
|
-
engineAny.emoteAction = null;
|
|
1292
|
-
engineAny.loadEmoteClipCached = vi
|
|
1293
|
-
.fn()
|
|
1294
|
-
.mockResolvedValue({ duration: 0.75 });
|
|
1295
|
-
hoisted.mockMixerInstance.clipAction.mockReturnValue(nextEmoteAction);
|
|
1296
|
-
|
|
1297
|
-
await engine.playEmote("/mock/emote.glb", 4, false);
|
|
1298
|
-
|
|
1299
|
-
expect(setTimeoutSpy).toHaveBeenLastCalledWith(
|
|
1300
|
-
expect.any(Function),
|
|
1301
|
-
4100,
|
|
1302
|
-
);
|
|
1303
|
-
} finally {
|
|
1304
|
-
engine.stopEmote();
|
|
1305
|
-
setTimeoutSpy.mockRestore();
|
|
1306
|
-
}
|
|
1307
|
-
});
|
|
1308
|
-
|
|
1309
|
-
it("stopEmote clears pending emote timeout", () => {
|
|
1310
|
-
const engineAny = engine as unknown as {
|
|
1311
|
-
emoteTimeout: ReturnType<typeof setTimeout> | null;
|
|
1312
|
-
};
|
|
1313
|
-
engineAny.emoteTimeout = setTimeout(() => {}, 10_000);
|
|
1314
|
-
|
|
1315
|
-
engine.stopEmote();
|
|
1316
|
-
|
|
1317
|
-
expect(engineAny.emoteTimeout).toBeNull();
|
|
1318
|
-
});
|
|
1319
|
-
|
|
1320
|
-
it("stopEmote restores idle lazily when the idle action is missing", () => {
|
|
1321
|
-
const fakeEmoteAction = createMockAction();
|
|
1322
|
-
const restoreIdleAfterEmote = vi.fn();
|
|
1323
|
-
const vrm = { scene: { parent: null } };
|
|
1324
|
-
const mixer = { clipAction: vi.fn() };
|
|
1325
|
-
const engineAny = engine as unknown as {
|
|
1326
|
-
emoteAction: ReturnType<typeof createMockAction> | null;
|
|
1327
|
-
idleAction: ReturnType<typeof createMockAction> | null;
|
|
1328
|
-
vrm: typeof vrm | null;
|
|
1329
|
-
mixer: typeof mixer | null;
|
|
1330
|
-
restoreIdleAfterEmote: ReturnType<typeof vi.fn>;
|
|
1331
|
-
};
|
|
1332
|
-
|
|
1333
|
-
engineAny.emoteAction = fakeEmoteAction;
|
|
1334
|
-
engineAny.idleAction = null;
|
|
1335
|
-
engineAny.vrm = vrm;
|
|
1336
|
-
engineAny.mixer = mixer;
|
|
1337
|
-
engineAny.restoreIdleAfterEmote = restoreIdleAfterEmote;
|
|
1338
|
-
|
|
1339
|
-
engine.stopEmote();
|
|
1340
|
-
|
|
1341
|
-
expect(restoreIdleAfterEmote).toHaveBeenCalledWith(
|
|
1342
|
-
fakeEmoteAction,
|
|
1343
|
-
0.4,
|
|
1344
|
-
vrm,
|
|
1345
|
-
mixer,
|
|
1346
|
-
);
|
|
1347
|
-
expect(engineAny.emoteAction).toBeNull();
|
|
1348
|
-
});
|
|
1349
|
-
|
|
1350
|
-
it("emote clip cache starts empty and is cleared on dispose", () => {
|
|
1351
|
-
const engineAny = engine as unknown as {
|
|
1352
|
-
emoteClipCache: Map<string, unknown>;
|
|
1353
|
-
};
|
|
1354
|
-
expect(engineAny.emoteClipCache.size).toBe(0);
|
|
1355
|
-
|
|
1356
|
-
engineAny.emoteClipCache.set("test.glb", {});
|
|
1357
|
-
expect(engineAny.emoteClipCache.size).toBe(1);
|
|
1358
|
-
|
|
1359
|
-
engine.dispose();
|
|
1360
|
-
expect(engineAny.emoteClipCache.size).toBe(0);
|
|
1361
|
-
});
|
|
1362
|
-
|
|
1363
|
-
it("emoteRequestId is not incremented when no VRM is loaded", async () => {
|
|
1364
|
-
const engineAny = engine as unknown as {
|
|
1365
|
-
emoteRequestId: number;
|
|
1366
|
-
};
|
|
1367
|
-
const initial = engineAny.emoteRequestId;
|
|
1368
|
-
|
|
1369
|
-
// playEmote bails early (no VRM loaded) before incrementing the id
|
|
1370
|
-
await engine.playEmote("/mock/emote.glb", 2, false);
|
|
1371
|
-
expect(engineAny.emoteRequestId).toBe(initial);
|
|
1372
|
-
});
|
|
1373
|
-
});
|
|
1374
|
-
|
|
1375
|
-
// ── 6. loadVrmFromUrl guards ─────────────────────────────────────
|
|
1376
|
-
describe("loadVrmFromUrl guards", () => {
|
|
1377
|
-
it("throws when engine is not initialized", async () => {
|
|
1378
|
-
await expect(
|
|
1379
|
-
engine.loadVrmFromUrl("http://example.com/model.vrm"),
|
|
1380
|
-
).rejects.toThrow("VrmEngine not initialized");
|
|
1381
|
-
});
|
|
1382
|
-
|
|
1383
|
-
it("registers WebGPU-compatible VRM material loading when WebGPU is active", async () => {
|
|
1384
|
-
hoisted.navigatorMock.gpu = {};
|
|
1385
|
-
(
|
|
1386
|
-
window.localStorage.getItem as ReturnType<typeof vi.fn>
|
|
1387
|
-
).mockReturnValueOnce("webgpu");
|
|
1388
|
-
hoisted.mockLoaderLoadAsync.mockRejectedValueOnce(
|
|
1389
|
-
new Error("stop-after-register"),
|
|
1390
|
-
);
|
|
1391
|
-
const canvas = createMockCanvas();
|
|
1392
|
-
engine.setup(canvas, vi.fn());
|
|
1393
|
-
await waitForEngineReady(engine);
|
|
1394
|
-
|
|
1395
|
-
await expect(
|
|
1396
|
-
engine.loadVrmFromUrl("http://example.com/model.vrm"),
|
|
1397
|
-
).rejects.toThrow("stop-after-register");
|
|
1398
|
-
|
|
1399
|
-
expect(hoisted.mockMToonMaterialLoaderPlugin).toHaveBeenCalledTimes(1);
|
|
1400
|
-
expect(hoisted.mockLoaderSetMeshoptDecoder).toHaveBeenCalledWith(
|
|
1401
|
-
expect.objectContaining({ supported: true }),
|
|
1402
|
-
);
|
|
1403
|
-
expect(hoisted.mockLoaderSetDRACOLoader).toHaveBeenCalledTimes(1);
|
|
1404
|
-
expect(hoisted.mockDracoLoaderSetDecoderConfig).toHaveBeenCalledWith({
|
|
1405
|
-
type: "wasm",
|
|
1406
|
-
});
|
|
1407
|
-
expect(hoisted.mockDracoLoaderSetDecoderPath).toHaveBeenCalledWith(
|
|
1408
|
-
expect.stringContaining("vrm-decoders/draco/"),
|
|
1409
|
-
);
|
|
1410
|
-
expect(hoisted.mockDracoLoaderPreload).toHaveBeenCalledTimes(1);
|
|
1411
|
-
expect(hoisted.mockMToonMaterialLoaderPlugin).toHaveBeenCalledWith(
|
|
1412
|
-
hoisted.mockLoaderParser,
|
|
1413
|
-
expect.objectContaining({
|
|
1414
|
-
materialType: expect.any(Function),
|
|
1415
|
-
}),
|
|
1416
|
-
);
|
|
1417
|
-
expect(hoisted.mockVRMLoaderPlugin).toHaveBeenCalledWith(
|
|
1418
|
-
hoisted.mockLoaderParser,
|
|
1419
|
-
expect.any(Object),
|
|
1420
|
-
);
|
|
1421
|
-
});
|
|
1422
|
-
|
|
1423
|
-
it("captures load errors in engine state", async () => {
|
|
1424
|
-
hoisted.mockLoaderLoadAsync.mockRejectedValueOnce(
|
|
1425
|
-
new Error("meshopt decode failed"),
|
|
1426
|
-
);
|
|
1427
|
-
const canvas = createMockCanvas();
|
|
1428
|
-
engine.setup(canvas, vi.fn());
|
|
1429
|
-
await waitForEngineReady(engine);
|
|
1430
|
-
|
|
1431
|
-
await expect(
|
|
1432
|
-
engine.loadVrmFromUrl("http://example.com/model.vrm"),
|
|
1433
|
-
).rejects.toThrow("meshopt decode failed");
|
|
1434
|
-
|
|
1435
|
-
expect(engine.getState().loadError).toBe("meshopt decode failed");
|
|
1436
|
-
});
|
|
1437
|
-
|
|
1438
|
-
it("fetches gzipped assets and parses the decompressed buffer", async () => {
|
|
1439
|
-
const parseResult = { userData: { vrm: undefined } };
|
|
1440
|
-
hoisted.mockLoaderLoadAsync.mockResolvedValueOnce(parseResult);
|
|
1441
|
-
const compressed = new Uint8Array([0x1f, 0x8b, 0x08, 0x00]).buffer;
|
|
1442
|
-
hoisted.responseArrayBufferMock.mockResolvedValueOnce(compressed);
|
|
1443
|
-
|
|
1444
|
-
class MockDecompressionStream {
|
|
1445
|
-
readable = new ReadableStream<Uint8Array>();
|
|
1446
|
-
writable = new WritableStream<Uint8Array>();
|
|
1447
|
-
}
|
|
1448
|
-
|
|
1449
|
-
const originalDecompressionStream = globalThis.DecompressionStream;
|
|
1450
|
-
Object.assign(globalThis, {
|
|
1451
|
-
DecompressionStream:
|
|
1452
|
-
MockDecompressionStream as unknown as typeof DecompressionStream,
|
|
1453
|
-
});
|
|
1454
|
-
|
|
1455
|
-
const pipeThroughSpy = vi
|
|
1456
|
-
.spyOn(Blob.prototype, "stream")
|
|
1457
|
-
.mockReturnValue({
|
|
1458
|
-
pipeThrough: vi.fn(() => new ReadableStream<Uint8Array>()),
|
|
1459
|
-
} as unknown as ReturnType<Blob["stream"]>);
|
|
1460
|
-
const responseArrayBuffer = vi
|
|
1461
|
-
.spyOn(Response.prototype, "arrayBuffer")
|
|
1462
|
-
.mockResolvedValueOnce(new ArrayBuffer(16));
|
|
1463
|
-
|
|
1464
|
-
const canvas = createMockCanvas();
|
|
1465
|
-
engine.setup(canvas, vi.fn());
|
|
1466
|
-
await waitForEngineReady(engine);
|
|
1467
|
-
|
|
1468
|
-
await expect(
|
|
1469
|
-
engine.loadVrmFromUrl("http://example.com/model.vrm.gz"),
|
|
1470
|
-
).rejects.toThrow("Loaded asset is not a VRM");
|
|
1471
|
-
|
|
1472
|
-
expect(hoisted.fetchMock).toHaveBeenCalledWith(
|
|
1473
|
-
"http://example.com/model.vrm.gz",
|
|
1474
|
-
);
|
|
1475
|
-
expect(pipeThroughSpy).toHaveBeenCalledTimes(1);
|
|
1476
|
-
expect(responseArrayBuffer).toHaveBeenCalledTimes(1);
|
|
1477
|
-
expect(hoisted.mockLoaderLoadAsync).toHaveBeenCalledWith(
|
|
1478
|
-
expect.stringMatching(/^blob:/),
|
|
1479
|
-
);
|
|
1480
|
-
|
|
1481
|
-
responseArrayBuffer.mockRestore();
|
|
1482
|
-
pipeThroughSpy.mockRestore();
|
|
1483
|
-
Object.assign(globalThis, {
|
|
1484
|
-
DecompressionStream: originalDecompressionStream,
|
|
1485
|
-
});
|
|
1486
|
-
});
|
|
1487
|
-
});
|
|
1488
|
-
|
|
1489
|
-
describe("camera framing transitions", () => {
|
|
1490
|
-
it("keeps the initial avatar load camera framing immediate", async () => {
|
|
1491
|
-
const canvas = createMockCanvas();
|
|
1492
|
-
engine.setup(canvas, vi.fn());
|
|
1493
|
-
await waitForEngineReady(engine);
|
|
1494
|
-
|
|
1495
|
-
const engineAny = engine as unknown as {
|
|
1496
|
-
cameraManager: {
|
|
1497
|
-
centerAndFrame: ReturnType<typeof vi.fn>;
|
|
1498
|
-
ensureFacingCamera: ReturnType<typeof vi.fn>;
|
|
1499
|
-
};
|
|
1500
|
-
configureAvatarLookTracking: ReturnType<typeof vi.fn>;
|
|
1501
|
-
loadAndPlayIdle: ReturnType<typeof vi.fn>;
|
|
1502
|
-
playTeleportReveal: ReturnType<typeof vi.fn>;
|
|
1503
|
-
startPendingWorldReveal: ReturnType<typeof vi.fn>;
|
|
1504
|
-
isCameraTransitioning: boolean;
|
|
1505
|
-
transitionDuration: number;
|
|
1506
|
-
};
|
|
1507
|
-
const vrm = createMockLoadedVrm();
|
|
1508
|
-
|
|
1509
|
-
engineAny.cameraManager.centerAndFrame = vi.fn((_vrm, camera) => {
|
|
1510
|
-
camera.fov = 31;
|
|
1511
|
-
});
|
|
1512
|
-
engineAny.cameraManager.ensureFacingCamera = vi.fn();
|
|
1513
|
-
engineAny.configureAvatarLookTracking = vi.fn();
|
|
1514
|
-
engineAny.loadAndPlayIdle = vi.fn().mockResolvedValue(undefined);
|
|
1515
|
-
engineAny.playTeleportReveal = vi.fn().mockResolvedValue(undefined);
|
|
1516
|
-
engineAny.startPendingWorldReveal = vi.fn();
|
|
1517
|
-
hoisted.mockLoaderLoadAsync.mockResolvedValueOnce({ userData: { vrm } });
|
|
1518
|
-
|
|
1519
|
-
await engine.loadVrmFromUrl("http://example.com/model.vrm");
|
|
1520
|
-
|
|
1521
|
-
expect(engineAny.cameraManager.centerAndFrame).toHaveBeenCalledTimes(1);
|
|
1522
|
-
expect(engineAny.isCameraTransitioning).toBe(false);
|
|
1523
|
-
expect(engineAny.transitionDuration).toBe(0.8);
|
|
1524
|
-
});
|
|
1525
|
-
|
|
1526
|
-
it("smoothly transitions the camera when switching avatars", async () => {
|
|
1527
|
-
const canvas = createMockCanvas();
|
|
1528
|
-
engine.setup(canvas, vi.fn());
|
|
1529
|
-
await waitForEngineReady(engine);
|
|
1530
|
-
|
|
1531
|
-
const engineAny = engine as unknown as {
|
|
1532
|
-
vrm: {
|
|
1533
|
-
scene: {
|
|
1534
|
-
parent: { remove: ReturnType<typeof vi.fn> } | null;
|
|
1535
|
-
};
|
|
1536
|
-
} | null;
|
|
1537
|
-
cameraManager: {
|
|
1538
|
-
centerAndFrame: ReturnType<typeof vi.fn>;
|
|
1539
|
-
ensureFacingCamera: ReturnType<typeof vi.fn>;
|
|
1540
|
-
};
|
|
1541
|
-
configureAvatarLookTracking: ReturnType<typeof vi.fn>;
|
|
1542
|
-
loadAndPlayIdle: ReturnType<typeof vi.fn>;
|
|
1543
|
-
playTeleportReveal: ReturnType<typeof vi.fn>;
|
|
1544
|
-
startPendingWorldReveal: ReturnType<typeof vi.fn>;
|
|
1545
|
-
isCameraTransitioning: boolean;
|
|
1546
|
-
transitionDuration: number;
|
|
1547
|
-
};
|
|
1548
|
-
const previousParent = { remove: vi.fn() };
|
|
1549
|
-
const vrm = createMockLoadedVrm();
|
|
1550
|
-
|
|
1551
|
-
engineAny.vrm = {
|
|
1552
|
-
scene: {
|
|
1553
|
-
parent: previousParent,
|
|
1554
|
-
},
|
|
1555
|
-
};
|
|
1556
|
-
engineAny.cameraManager.centerAndFrame = vi.fn((_vrm, camera) => {
|
|
1557
|
-
camera.fov = 36;
|
|
1558
|
-
});
|
|
1559
|
-
engineAny.cameraManager.ensureFacingCamera = vi.fn();
|
|
1560
|
-
engineAny.configureAvatarLookTracking = vi.fn();
|
|
1561
|
-
engineAny.loadAndPlayIdle = vi.fn().mockResolvedValue(undefined);
|
|
1562
|
-
engineAny.playTeleportReveal = vi.fn().mockResolvedValue(undefined);
|
|
1563
|
-
engineAny.startPendingWorldReveal = vi.fn();
|
|
1564
|
-
hoisted.mockLoaderLoadAsync.mockResolvedValueOnce({ userData: { vrm } });
|
|
1565
|
-
|
|
1566
|
-
await engine.loadVrmFromUrl("http://example.com/model.vrm");
|
|
1567
|
-
|
|
1568
|
-
expect(previousParent.remove).toHaveBeenCalledTimes(1);
|
|
1569
|
-
expect(engineAny.cameraManager.centerAndFrame).toHaveBeenCalledTimes(1);
|
|
1570
|
-
expect(engineAny.isCameraTransitioning).toBe(true);
|
|
1571
|
-
expect(engineAny.transitionDuration).toBe(3);
|
|
1572
|
-
});
|
|
1573
|
-
});
|
|
1574
|
-
});
|