@spatial-elements/core 0.1.0-beta.2 → 1.0.0-beta.10
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/README.md +16 -13
- package/dist/catalog/CarouselDeviceCamera.d.ts +20 -0
- package/dist/catalog/CarouselDeviceCamera.d.ts.map +1 -0
- package/dist/catalog/CarouselDeviceCamera.js +58 -0
- package/dist/catalog/CarouselDeviceCamera.js.map +1 -0
- package/dist/catalog/CarouselGlassCompositor.d.ts +14 -3
- package/dist/catalog/CarouselGlassCompositor.d.ts.map +1 -1
- package/dist/catalog/CarouselGlassCompositor.js +164 -28
- package/dist/catalog/CarouselGlassCompositor.js.map +1 -1
- package/dist/catalog/CarouselGround.d.ts +43 -0
- package/dist/catalog/CarouselGround.d.ts.map +1 -0
- package/dist/catalog/CarouselGround.js +270 -0
- package/dist/catalog/CarouselGround.js.map +1 -0
- package/dist/catalog/CarouselSectionSurfaces.d.ts +10 -0
- package/dist/catalog/CarouselSectionSurfaces.d.ts.map +1 -0
- package/dist/catalog/CarouselSectionSurfaces.js +55 -0
- package/dist/catalog/CarouselSectionSurfaces.js.map +1 -0
- package/dist/catalog/CatalogDepthBlur.d.ts +45 -0
- package/dist/catalog/CatalogDepthBlur.d.ts.map +1 -0
- package/dist/catalog/CatalogDepthBlur.js +190 -0
- package/dist/catalog/CatalogDepthBlur.js.map +1 -0
- package/dist/catalog/CatalogEndpointRegistry.d.ts +2 -0
- package/dist/catalog/CatalogEndpointRegistry.d.ts.map +1 -1
- package/dist/catalog/CatalogEndpointRegistry.js +2 -0
- package/dist/catalog/CatalogEndpointRegistry.js.map +1 -1
- package/dist/catalog/CatalogGeometryFade.d.ts +5 -1
- package/dist/catalog/CatalogGeometryFade.d.ts.map +1 -1
- package/dist/catalog/CatalogGeometryFade.js +45 -9
- package/dist/catalog/CatalogGeometryFade.js.map +1 -1
- package/dist/catalog/CatalogModelOutline.d.ts +33 -0
- package/dist/catalog/CatalogModelOutline.d.ts.map +1 -0
- package/dist/catalog/CatalogModelOutline.js +143 -0
- package/dist/catalog/CatalogModelOutline.js.map +1 -0
- package/dist/catalog/CatalogNavigationRegistry.d.ts +44 -0
- package/dist/catalog/CatalogNavigationRegistry.d.ts.map +1 -0
- package/dist/catalog/CatalogNavigationRegistry.js +66 -0
- package/dist/catalog/CatalogNavigationRegistry.js.map +1 -0
- package/dist/catalog/CatalogPreparation.d.ts +3 -3
- package/dist/catalog/CatalogPreparation.d.ts.map +1 -1
- package/dist/catalog/CatalogPreparation.js +10 -7
- package/dist/catalog/CatalogPreparation.js.map +1 -1
- package/dist/catalog/CatalogSpatialElementLayer.d.ts +175 -5
- package/dist/catalog/CatalogSpatialElementLayer.d.ts.map +1 -1
- package/dist/catalog/CatalogSpatialElementLayer.js +739 -121
- package/dist/catalog/CatalogSpatialElementLayer.js.map +1 -1
- package/dist/catalog/CatalogTransition.d.ts +4 -2
- package/dist/catalog/CatalogTransition.d.ts.map +1 -1
- package/dist/catalog/CatalogTransition.js +206 -90
- package/dist/catalog/CatalogTransition.js.map +1 -1
- package/dist/catalog/CatalogWarmOutputContext.d.ts +39 -0
- package/dist/catalog/CatalogWarmOutputContext.d.ts.map +1 -0
- package/dist/catalog/CatalogWarmOutputContext.js +159 -0
- package/dist/catalog/CatalogWarmOutputContext.js.map +1 -0
- package/dist/catalog/EarlyNavigationCoordinator.d.ts +35 -0
- package/dist/catalog/EarlyNavigationCoordinator.d.ts.map +1 -0
- package/dist/catalog/EarlyNavigationCoordinator.js +103 -0
- package/dist/catalog/EarlyNavigationCoordinator.js.map +1 -0
- package/dist/catalog/NavigationFeedback.d.ts +12 -0
- package/dist/catalog/NavigationFeedback.d.ts.map +1 -0
- package/dist/catalog/NavigationFeedback.js +40 -0
- package/dist/catalog/NavigationFeedback.js.map +1 -0
- package/dist/catalog/PreparationGate.d.ts +4 -0
- package/dist/catalog/PreparationGate.d.ts.map +1 -1
- package/dist/catalog/PreparationGate.js +1 -0
- package/dist/catalog/PreparationGate.js.map +1 -1
- package/dist/catalog/SourceDomClipping.d.ts +8 -0
- package/dist/catalog/SourceDomClipping.d.ts.map +1 -0
- package/dist/catalog/SourceDomClipping.js +74 -0
- package/dist/catalog/SourceDomClipping.js.map +1 -0
- package/dist/catalog/SourceDomMotion.d.ts +28 -0
- package/dist/catalog/SourceDomMotion.d.ts.map +1 -0
- package/dist/catalog/SourceDomMotion.js +111 -0
- package/dist/catalog/SourceDomMotion.js.map +1 -0
- package/dist/catalog/SpatialGeometryCapture.d.ts +9 -0
- package/dist/catalog/SpatialGeometryCapture.d.ts.map +1 -1
- package/dist/catalog/SpatialGeometryCapture.js +11 -1
- package/dist/catalog/SpatialGeometryCapture.js.map +1 -1
- package/dist/catalog/SpatialPageRegistry.d.ts +18 -0
- package/dist/catalog/SpatialPageRegistry.d.ts.map +1 -0
- package/dist/catalog/SpatialPageRegistry.js +21 -0
- package/dist/catalog/SpatialPageRegistry.js.map +1 -0
- package/dist/catalog/StagedCatalogTransition.d.ts +74 -0
- package/dist/catalog/StagedCatalogTransition.d.ts.map +1 -0
- package/dist/catalog/StagedCatalogTransition.js +270 -0
- package/dist/catalog/StagedCatalogTransition.js.map +1 -0
- package/dist/catalog/cardModelFit.d.ts +7 -0
- package/dist/catalog/cardModelFit.d.ts.map +1 -0
- package/dist/catalog/cardModelFit.js +16 -0
- package/dist/catalog/cardModelFit.js.map +1 -0
- package/dist/catalog/cardProjection.d.ts +39 -0
- package/dist/catalog/cardProjection.d.ts.map +1 -0
- package/dist/catalog/cardProjection.js +110 -0
- package/dist/catalog/cardProjection.js.map +1 -0
- package/dist/catalog/carouselMotion.d.ts +74 -0
- package/dist/catalog/carouselMotion.d.ts.map +1 -0
- package/dist/catalog/carouselMotion.js +185 -0
- package/dist/catalog/carouselMotion.js.map +1 -0
- package/dist/catalog/carouselPanelProjection.d.ts.map +1 -1
- package/dist/catalog/carouselPanelProjection.js +48 -11
- package/dist/catalog/carouselPanelProjection.js.map +1 -1
- package/dist/catalog/carouselProximity.d.ts +11 -0
- package/dist/catalog/carouselProximity.d.ts.map +1 -0
- package/dist/catalog/carouselProximity.js +13 -0
- package/dist/catalog/carouselProximity.js.map +1 -0
- package/dist/catalog/carouselSupport.d.ts +4 -0
- package/dist/catalog/carouselSupport.d.ts.map +1 -0
- package/dist/catalog/carouselSupport.js +30 -0
- package/dist/catalog/carouselSupport.js.map +1 -0
- package/dist/catalog/catalogActivationFocus.d.ts +5 -0
- package/dist/catalog/catalogActivationFocus.d.ts.map +1 -0
- package/dist/catalog/catalogActivationFocus.js +39 -0
- package/dist/catalog/catalogActivationFocus.js.map +1 -0
- package/dist/catalog/catalogDomSnapshot.d.ts +18 -0
- package/dist/catalog/catalogDomSnapshot.d.ts.map +1 -0
- package/dist/catalog/catalogDomSnapshot.js +51 -0
- package/dist/catalog/catalogDomSnapshot.js.map +1 -0
- package/dist/catalog/catalogJourney.d.ts +4 -1
- package/dist/catalog/catalogJourney.d.ts.map +1 -1
- package/dist/catalog/catalogJourney.js +7 -15
- package/dist/catalog/catalogJourney.js.map +1 -1
- package/dist/catalog/catalogPage.d.ts +7 -3
- package/dist/catalog/catalogPage.d.ts.map +1 -1
- package/dist/catalog/catalogPage.js.map +1 -1
- package/dist/catalog/catalogPose.d.ts +54 -6
- package/dist/catalog/catalogPose.d.ts.map +1 -1
- package/dist/catalog/catalogPose.js +100 -23
- package/dist/catalog/catalogPose.js.map +1 -1
- package/dist/catalog/catalogRecipes.d.ts +3 -2
- package/dist/catalog/catalogRecipes.d.ts.map +1 -1
- package/dist/catalog/catalogRecipes.js +10 -25
- package/dist/catalog/catalogRecipes.js.map +1 -1
- package/dist/catalog/catalogTransitionViewport.d.ts +9 -0
- package/dist/catalog/catalogTransitionViewport.d.ts.map +1 -0
- package/dist/catalog/catalogTransitionViewport.js +13 -0
- package/dist/catalog/catalogTransitionViewport.js.map +1 -0
- package/dist/catalog/catalogViewLink.d.ts +2 -0
- package/dist/catalog/catalogViewLink.d.ts.map +1 -1
- package/dist/catalog/catalogViewLink.js +10 -2
- package/dist/catalog/catalogViewLink.js.map +1 -1
- package/dist/catalog/deviceYaw.d.ts +21 -0
- package/dist/catalog/deviceYaw.d.ts.map +1 -0
- package/dist/catalog/deviceYaw.js +87 -0
- package/dist/catalog/deviceYaw.js.map +1 -0
- package/dist/catalog/listDeviceOrientation.d.ts +17 -0
- package/dist/catalog/listDeviceOrientation.d.ts.map +1 -0
- package/dist/catalog/listDeviceOrientation.js +262 -0
- package/dist/catalog/listDeviceOrientation.js.map +1 -0
- package/dist/catalog/spatialElementAssets.d.ts +5 -5
- package/dist/catalog/spatialElementAssets.d.ts.map +1 -1
- package/dist/catalog/spatialElementAssets.js.map +1 -1
- package/dist/catalog/spatialElementLodPair.d.ts +2 -1
- package/dist/catalog/spatialElementLodPair.d.ts.map +1 -1
- package/dist/catalog/spatialElementLodPair.js.map +1 -1
- package/dist/catalog/stagedDetailGeometry.d.ts +37 -0
- package/dist/catalog/stagedDetailGeometry.d.ts.map +1 -0
- package/dist/catalog/stagedDetailGeometry.js +55 -0
- package/dist/catalog/stagedDetailGeometry.js.map +1 -0
- package/dist/catalog/stagedDockGeometry.d.ts +66 -0
- package/dist/catalog/stagedDockGeometry.d.ts.map +1 -0
- package/dist/catalog/stagedDockGeometry.js +66 -0
- package/dist/catalog/stagedDockGeometry.js.map +1 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/spatial-element/ResponsiveViewportMetrics.d.ts +18 -0
- package/dist/spatial-element/ResponsiveViewportMetrics.d.ts.map +1 -0
- package/dist/spatial-element/ResponsiveViewportMetrics.js +68 -0
- package/dist/spatial-element/ResponsiveViewportMetrics.js.map +1 -0
- package/dist/spatial-element/SectionSurfaceRegistry.d.ts +2 -0
- package/dist/spatial-element/SectionSurfaceRegistry.d.ts.map +1 -0
- package/dist/spatial-element/SectionSurfaceRegistry.js +2 -0
- package/dist/spatial-element/SectionSurfaceRegistry.js.map +1 -0
- package/dist/spatial-element/SpatialElementDockController.d.ts +22 -10
- package/dist/spatial-element/SpatialElementDockController.d.ts.map +1 -1
- package/dist/spatial-element/SpatialElementDockController.js +228 -96
- package/dist/spatial-element/SpatialElementDockController.js.map +1 -1
- package/dist/spatial-element/SpatialElementPaneController.d.ts +67 -0
- package/dist/spatial-element/SpatialElementPaneController.d.ts.map +1 -0
- package/dist/spatial-element/SpatialElementPaneController.js +246 -0
- package/dist/spatial-element/SpatialElementPaneController.js.map +1 -0
- package/dist/spatial-element/activeDetailSection.d.ts +8 -0
- package/dist/spatial-element/activeDetailSection.d.ts.map +1 -0
- package/dist/spatial-element/activeDetailSection.js +19 -0
- package/dist/spatial-element/activeDetailSection.js.map +1 -0
- package/dist/spatial-element/layoutTokens.json +228 -0
- package/dist/spatial-element/messages.d.ts +34 -0
- package/dist/spatial-element/messages.d.ts.map +1 -0
- package/dist/spatial-element/messages.js +34 -0
- package/dist/spatial-element/messages.js.map +1 -0
- package/dist/spatial-element/responsiveLayout.d.ts +1353 -0
- package/dist/spatial-element/responsiveLayout.d.ts.map +1 -0
- package/dist/spatial-element/responsiveLayout.js +210 -0
- package/dist/spatial-element/responsiveLayout.js.map +1 -0
- package/dist/spatial-element/sectionBackground.d.ts +3 -0
- package/dist/spatial-element/sectionBackground.d.ts.map +1 -0
- package/dist/spatial-element/sectionBackground.js +2 -0
- package/dist/spatial-element/sectionBackground.js.map +1 -0
- package/dist/spatial-element/spatialElement.d.ts +17 -12
- package/dist/spatial-element/spatialElement.d.ts.map +1 -1
- package/dist/spatial-element/spatialElement.js +33 -6
- package/dist/spatial-element/spatialElement.js.map +1 -1
- package/dist/spatial-element/spatialElementDock.d.ts +15 -0
- package/dist/spatial-element/spatialElementDock.d.ts.map +1 -1
- package/dist/spatial-element/spatialElementDock.js +22 -0
- package/dist/spatial-element/spatialElementDock.js.map +1 -1
- package/dist/spatial-element/spatialElementGeometry.d.ts +22 -0
- package/dist/spatial-element/spatialElementGeometry.d.ts.map +1 -0
- package/dist/spatial-element/spatialElementGeometry.js +40 -0
- package/dist/spatial-element/spatialElementGeometry.js.map +1 -0
- package/dist/spatial-element/spatialElementMedia.d.ts +16 -0
- package/dist/spatial-element/spatialElementMedia.d.ts.map +1 -0
- package/dist/spatial-element/spatialElementMedia.js +29 -0
- package/dist/spatial-element/spatialElementMedia.js.map +1 -0
- package/dist/spatial-element/spatialElementScene.d.ts +16 -0
- package/dist/spatial-element/spatialElementScene.d.ts.map +1 -0
- package/dist/spatial-element/spatialElementScene.js +22 -0
- package/dist/spatial-element/spatialElementScene.js.map +1 -0
- package/dist/spatial-element/spatialElementSectionRegistry.d.ts +6 -25
- package/dist/spatial-element/spatialElementSectionRegistry.d.ts.map +1 -1
- package/dist/spatial-element/spatialElementSectionRegistry.js +6 -63
- package/dist/spatial-element/spatialElementSectionRegistry.js.map +1 -1
- package/dist/spatial-element/spatialTheme.d.ts +27 -0
- package/dist/spatial-element/spatialTheme.d.ts.map +1 -0
- package/dist/spatial-element/spatialTheme.js +83 -0
- package/dist/spatial-element/spatialTheme.js.map +1 -0
- package/dist/spatial-element/types.d.ts +117 -36
- package/dist/spatial-element/types.d.ts.map +1 -1
- package/dist/spatial-element/types.js.map +1 -1
- package/dist/stage/BackgroundLayerOutput.d.ts +76 -0
- package/dist/stage/BackgroundLayerOutput.d.ts.map +1 -0
- package/dist/stage/BackgroundLayerOutput.js +333 -0
- package/dist/stage/BackgroundLayerOutput.js.map +1 -0
- package/dist/stage/DeviceGeometryMotion.d.ts +13 -0
- package/dist/stage/DeviceGeometryMotion.d.ts.map +1 -0
- package/dist/stage/DeviceGeometryMotion.js +37 -0
- package/dist/stage/DeviceGeometryMotion.js.map +1 -0
- package/dist/stage/LiquidGlassPanel.d.ts +7 -0
- package/dist/stage/LiquidGlassPanel.d.ts.map +1 -1
- package/dist/stage/LiquidGlassPanel.js +46 -5
- package/dist/stage/LiquidGlassPanel.js.map +1 -1
- package/dist/stage/MinimapController.d.ts +4 -1
- package/dist/stage/MinimapController.d.ts.map +1 -1
- package/dist/stage/MinimapController.js +57 -66
- package/dist/stage/MinimapController.js.map +1 -1
- package/dist/stage/ModelPointerPreview.d.ts +22 -0
- package/dist/stage/ModelPointerPreview.d.ts.map +1 -0
- package/dist/stage/ModelPointerPreview.js +71 -0
- package/dist/stage/ModelPointerPreview.js.map +1 -0
- package/dist/stage/PageBindingController.d.ts +10 -0
- package/dist/stage/PageBindingController.d.ts.map +1 -1
- package/dist/stage/PageBindingController.js +45 -5
- package/dist/stage/PageBindingController.js.map +1 -1
- package/dist/stage/PanelPresentationController.d.ts +21 -1
- package/dist/stage/PanelPresentationController.d.ts.map +1 -1
- package/dist/stage/PanelPresentationController.js +190 -31
- package/dist/stage/PanelPresentationController.js.map +1 -1
- package/dist/stage/SpatialElementInteractionController.d.ts +19 -1
- package/dist/stage/SpatialElementInteractionController.d.ts.map +1 -1
- package/dist/stage/SpatialElementInteractionController.js +134 -13
- package/dist/stage/SpatialElementInteractionController.js.map +1 -1
- package/dist/stage/SpatialElementPresentationController.d.ts +14 -2
- package/dist/stage/SpatialElementPresentationController.d.ts.map +1 -1
- package/dist/stage/SpatialElementPresentationController.js +47 -2
- package/dist/stage/SpatialElementPresentationController.js.map +1 -1
- package/dist/stage/SpatialElementRefinement.d.ts +34 -1
- package/dist/stage/SpatialElementRefinement.d.ts.map +1 -1
- package/dist/stage/SpatialElementRefinement.js +175 -37
- package/dist/stage/SpatialElementRefinement.js.map +1 -1
- package/dist/stage/StageExperience.d.ts +263 -10
- package/dist/stage/StageExperience.d.ts.map +1 -1
- package/dist/stage/StageExperience.js +655 -124
- package/dist/stage/StageExperience.js.map +1 -1
- package/dist/stage/StageFullscreenController.d.ts +17 -0
- package/dist/stage/StageFullscreenController.d.ts.map +1 -0
- package/dist/stage/StageFullscreenController.js +90 -0
- package/dist/stage/StageFullscreenController.js.map +1 -0
- package/dist/stage/StagePanelRuntime.d.ts +2 -1
- package/dist/stage/StagePanelRuntime.d.ts.map +1 -1
- package/dist/stage/StagePanelRuntime.js.map +1 -1
- package/dist/stage/StageRenderPipeline.d.ts +90 -2
- package/dist/stage/StageRenderPipeline.d.ts.map +1 -1
- package/dist/stage/StageRenderPipeline.js +494 -119
- package/dist/stage/StageRenderPipeline.js.map +1 -1
- package/dist/stage/VirtualScrollController.d.ts +7 -0
- package/dist/stage/VirtualScrollController.d.ts.map +1 -1
- package/dist/stage/VirtualScrollController.js +63 -6
- package/dist/stage/VirtualScrollController.js.map +1 -1
- package/dist/stage/inertLease.d.ts +2 -0
- package/dist/stage/inertLease.d.ts.map +1 -0
- package/dist/stage/inertLease.js +18 -0
- package/dist/stage/inertLease.js.map +1 -0
- package/dist/stage/interactionGuidance.d.ts +22 -0
- package/dist/stage/interactionGuidance.d.ts.map +1 -0
- package/dist/stage/interactionGuidance.js +53 -0
- package/dist/stage/interactionGuidance.js.map +1 -0
- package/dist/stage/interactionOutline.d.ts +14 -0
- package/dist/stage/interactionOutline.d.ts.map +1 -0
- package/dist/stage/interactionOutline.js +59 -0
- package/dist/stage/interactionOutline.js.map +1 -0
- package/dist/stage/minimap/MinimapGeometry.d.ts.map +1 -1
- package/dist/stage/minimap/MinimapGeometry.js +29 -0
- package/dist/stage/minimap/MinimapGeometry.js.map +1 -1
- package/dist/stage/minimap/MinimapModel.d.ts +2 -1
- package/dist/stage/minimap/MinimapModel.d.ts.map +1 -1
- package/dist/stage/minimap/MinimapModel.js +34 -4
- package/dist/stage/minimap/MinimapModel.js.map +1 -1
- package/dist/stage/minimap/MinimapModelGeometry.d.ts +21 -0
- package/dist/stage/minimap/MinimapModelGeometry.d.ts.map +1 -0
- package/dist/stage/minimap/MinimapModelGeometry.js +68 -0
- package/dist/stage/minimap/MinimapModelGeometry.js.map +1 -0
- package/dist/stage/minimap/MinimapProjection.d.ts +7 -0
- package/dist/stage/minimap/MinimapProjection.d.ts.map +1 -1
- package/dist/stage/minimap/MinimapProjection.js +14 -13
- package/dist/stage/minimap/MinimapProjection.js.map +1 -1
- package/dist/stage/minimap/MinimapState.d.ts +3 -8
- package/dist/stage/minimap/MinimapState.d.ts.map +1 -1
- package/dist/stage/minimap/MinimapState.js.map +1 -1
- package/dist/stage/mouseHover.d.ts +9 -0
- package/dist/stage/mouseHover.d.ts.map +1 -0
- package/dist/stage/mouseHover.js +55 -0
- package/dist/stage/mouseHover.js.map +1 -0
- package/dist/stage/panelContext.d.ts +27 -2
- package/dist/stage/panelContext.d.ts.map +1 -1
- package/dist/stage/panelContext.js.map +1 -1
- package/dist/stage/renderSettings.d.ts +10 -0
- package/dist/stage/renderSettings.d.ts.map +1 -0
- package/dist/stage/renderSettings.js +27 -0
- package/dist/stage/renderSettings.js.map +1 -0
- package/dist/stage/renderTargetInventory.d.ts +1 -1
- package/dist/stage/renderTargetInventory.js +1 -1
- package/dist/stage/renderTargetInventory.js.map +1 -1
- package/dist/stage/rendererState.d.ts +2 -0
- package/dist/stage/rendererState.d.ts.map +1 -1
- package/dist/stage/rendererState.js +13 -0
- package/dist/stage/rendererState.js.map +1 -1
- package/dist/stage/sceneEndpointEligibility.d.ts +20 -0
- package/dist/stage/sceneEndpointEligibility.d.ts.map +1 -0
- package/dist/stage/sceneEndpointEligibility.js +363 -0
- package/dist/stage/sceneEndpointEligibility.js.map +1 -0
- package/dist/stage/scrollFrame.d.ts +2 -0
- package/dist/stage/scrollFrame.d.ts.map +1 -1
- package/dist/stage/scrollFrame.js +18 -5
- package/dist/stage/scrollFrame.js.map +1 -1
- package/dist/stage/spatialElementFrame.d.ts.map +1 -1
- package/dist/stage/spatialElementFrame.js +5 -1
- package/dist/stage/spatialElementFrame.js.map +1 -1
- package/dist/stage/stageConstants.d.ts +3 -3
- package/dist/stage/stageConstants.d.ts.map +1 -1
- package/dist/stage/stageConstants.js +6 -6
- package/dist/stage/stageConstants.js.map +1 -1
- package/dist/stage/stageDom.d.ts +2 -0
- package/dist/stage/stageDom.d.ts.map +1 -1
- package/dist/stage/stageDom.js +10 -1
- package/dist/stage/stageDom.js.map +1 -1
- package/dist/stage/stageMath.d.ts +9 -10
- package/dist/stage/stageMath.d.ts.map +1 -1
- package/dist/stage/stageMath.js +23 -21
- package/dist/stage/stageMath.js.map +1 -1
- package/dist/stage/stageTypes.d.ts +30 -3
- package/dist/stage/stageTypes.d.ts.map +1 -1
- package/dist/stage/stageTypes.js.map +1 -1
- package/dist/stage/stageVisualTest.d.ts +24 -1
- package/dist/stage/stageVisualTest.d.ts.map +1 -1
- package/dist/stage/stageVisualTest.js.map +1 -1
- package/logo.svg +188 -0
- package/package.json +7 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CatalogSpatialElementLayer.js","sourceRoot":"","sources":["../../src/catalog/CatalogSpatialElementLayer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEnE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAE7E,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EACN,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,EACvB,8BAA8B,EAC9B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACN,2BAA2B,EAC3B,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,MAAM,EACN,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,0BAA0B,EAAoC,MAAM,wCAAwC,CAAC;AACtH,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AACtG,OAAO,EAAE,oBAAoB,EAA4B,MAAM,kBAAkB,CAAC;AAClF,OAAO,EA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c,GAAG,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;IACxC,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;IAC5C,MAAM,CAAC,SAAS,CAAC,cAAc,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC;IAC9D,OAAO,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC,OAAO,CACjC,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,EACvC,QAAQ,CAAC,KAAK,CAAC,cAAc,EAAE,QAAQ,CAAC,EACxC,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CACjC,CAAC;AACH,CAAC","sourcesContent":["import { CatalogGeometryFade } from './CatalogGeometryFade.js';\nimport { recordCarouselPanel } from './carouselPanelProjection.js';\nimport type { SpatialElementProjection } from './SpatialGeometryCapture.js';\nimport { prepareSpatialElementFrame } from '../stage/spatialElementFrame.js';\nimport type { SpatialElementRefinement } from '../stage/SpatialElementRefinement.js';\nimport { resolveSpatialElementLodPair } from './spatialElementLodPair.js';\nimport * as THREE from 'three/webgpu';\nimport type { SpatialListItem, SpatialStageConfig } from '../spatial-element/types.js';\nimport { getStageVisualScrollPosition } from '../stage/scrollFrame.js';\nimport {\n\tgetCameraOrbitQuaternion,\n\tgetPanelPointerInfluence,\n\tgetPanelPointerRotation,\n\tsetPanelLocalPerspectiveMatrix\n} from '../stage/stageMath.js';\nimport {\n\tapplyModelMaterialOverrides,\n\tcenterAndScale,\n\tgetMeshBounds,\n\tgetMeshMaterials,\n\tisMesh\n} from '../stage/stageSceneUtils.js';\nimport { SpatialElementAssetManager, type SpatialElementAssetInstance } from './assets/SpatialElementAssetManager.js';\nimport { getSpatialElementEntityKey } from './spatialElementAssets.js';\nimport { applyCatalogMaterialOpacity, captureCatalogMaterialOpacity } from './catalogPresentation.js';\nimport { CATALOG_POSE_CHANGED, type CatalogPoseProvider } from './catalogPose.js';\nimport { getProjectiveCssMatrix3d, type CssProjectionQuad } from '../stage/cssProjection.js';\nimport { CarouselGlassCompositor } from './CarouselGlassCompositor.js';\n\ninterface Rect {\n\tleft: number;\n\ttop: number;\n\twidth: number;\n\theight: number;\n}\n\ninterface CatalogActor {\n\tkey: string;\n\tbrandId: string;\n\tspatialElementId: string;\n\toccurrence?: string;\n\tpose?: CatalogPoseProvider;\n\tclip?: Rect;\n\tband?: 'front' | 'rear';\n\tstage: SpatialStageConfig;\n\tinstance: SpatialElementAssetInstance;\n\tmodel: THREE.Group;\n\troot: THREE.Group;\n\ttilt: THREE.Group;\n\tview: THREE.Group;\n\tradius: number;\n\thitCorners: THREE.Vector3[];\n\treferencePoint: THREE.Vector3;\n\toverrides: Set<THREE.Material>;\n\tmaterials: ReturnType<typeof captureCatalogMaterialOpacity>;\n\tcard?: HTMLElement;\n\tslot?: HTMLElement;\n\tcardRect?: Rect;\n\tslotRect?: Rect;\n\tscrollX: number;\n\tscrollY: number;\n\trotationX: number;\n\trotationY: number;\n\tlift: number;\n\trendered: boolean;\n}\n\ninterface Handoff {\n\tsourceEnvironmentIntensity: number;\n\tsourceEnvironment: THREE.Texture | null;\n\thigh?: THREE.Object3D;\n\tblend?: SpatialElementRefinement;\n\tblendProgress?: number;\n\thighEnvironment?: THREE.Texture;\n\tactor: CatalogActor;\n\tsourceClip: THREE.Matrix4;\n\tsourceModel: THREE.Matrix4;\n\tsourceCamera: THREE.Matrix4;\n\ttarget?: {\n\t\tcamera: THREE.PerspectiveCamera;\n\t\tmodel: THREE.Object3D;\n\t\tprogress: number;\n\t\tenvironmentIntensity?: number;\n\t};\n}\n\n/** Removes irrelevant homogeneous scale so the reference point follows a continuous screen path. */\nexport function normalizeSpatialElementClipMatrix(matrix: THREE.Matrix4, point: THREE.Vector3) {\n\tconst clip = new THREE.Vector4(point.x, point.y, point.z, 1).applyMatrix4(matrix);\n\tif (clip.w > 0.000001) matrix.multiplyScalar(1 / clip.w);\n\treturn matrix;\n}\n\n/** Factor camera-relative rotation out of clip space before interpolating framing.\n * Interpolating complete MVP matrices collapses opposite rotations into a flat image.\n * Residual matrices retain authored shear and exact endpoint projections.\n */\nexport function getSpatialElementHandoffProjection(\n\tsourceClip: THREE.Matrix4,\n\ttargetClip: THREE.Matrix4,\n\tprogress: number,\n\tmodelWorld: THREE.Matrix4,\n\tcameraWorld: THREE.Matrix4,\n\tposes: {\n\t\tsourceModel: THREE.Matrix4;\n\t\tsourceCamera: THREE.Matrix4;\n\t\ttargetModel: THREE.Matrix4;\n\t\ttargetCamera: THREE.Matrix4;\n\t\treference?: THREE.Vector3;\n\t},\n\ttarget = new THREE.Matrix4()\n) {\n\tconst t = THREE.MathUtils.clamp(progress, 0, 1);\n\tconst rotation = (model: THREE.Matrix4, camera: THREE.Matrix4) => {\n\t\tconst q = new THREE.Quaternion();\n\t\tcamera.clone().invert().multiply(model).decompose(new THREE.Vector3(), q, new THREE.Vector3());\n\t\treturn q.normalize();\n\t};\n\tconst from = rotation(poses.sourceModel, poses.sourceCamera);\n\tconst to = rotation(poses.targetModel, poses.targetCamera);\n\tconst a = sourceClip\n\t\t.clone()\n\t\t.multiply(new THREE.Matrix4().makeRotationFromQuaternion(from.clone().invert()));\n\tconst b = targetClip\n\t\t.clone()\n\t\t.multiply(new THREE.Matrix4().makeRotationFromQuaternion(to.clone().invert()));\n\tfor (let i = 0; i < 16; i++)\n\t\ttarget.elements[i] = THREE.MathUtils.lerp(a.elements[i], b.elements[i], t);\n\ttarget.multiply(new THREE.Matrix4().makeRotationFromQuaternion(from.slerp(to, t)));\n\t// Keep the framing anchor on its screen path even for an off-centre asset pivot.\n\tconst point = poses.reference ?? new THREE.Vector3();\n\tconst project = (matrix: THREE.Matrix4) =>\n\t\tnew THREE.Vector4(point.x, point.y, point.z, 1).applyMatrix4(matrix);\n\tconst start = project(sourceClip),\n\t\tend = project(targetClip),\n\t\tcurrent = project(target);\n\tconst dx = THREE.MathUtils.lerp(start.x / start.w, end.x / end.w, t) - current.x / current.w;\n\tconst dy = THREE.MathUtils.lerp(start.y / start.w, end.y / end.w, t) - current.y / current.w;\n\ttarget.premultiply(new THREE.Matrix4().makeTranslation(dx, dy, 0));\n\treturn target.multiply(modelWorld.clone().invert()).multiply(cameraWorld);\n}\n\n/** Lightweight catalog geometry sharing the stage's renderer and foreground canvas. */\nexport class CatalogSpatialElementLayer {\n\tgetRenderTargets() {\n\t\treturn [\n\t\t\t...this.glass.getRenderTargets(),\n\t\t\t...this.geometryFade.getRenderTargets(),\n\t\t\t...(this.handoff?.blend?.getRenderTargets() ?? [])\n\t\t];\n\t}\n\tprivate readonly scene = new THREE.Scene();\n\tprivate passes = 0;\n\tgetStats() {\n\t\treturn {\n\t\t\tinstances: this.actors.size,\n\t\t\tdetachedInstances: this.detachedInstances,\n\t\t\tvisible: [...this.actors.values()].filter((actor) => actor.root.visible).length,\n\t\t\tpasses: this.passes,\n\t\t\tglass: this.glass.getStats(),\n\t\t\tactors: [...this.actors.values()].map((actor) => ({\n\t\t\t\tspatialElementId: actor.spatialElementId,\n\t\t\t\tband: actor.band,\n\t\t\t\tclip: actor.clip ? { ...actor.clip } : undefined,\n\t\t\t\topacity: this.exitOpacity * (actor.materials[0]?.material.opacity ?? 0),\n\t\t\t\tmaterialOpacity: actor.materials[0]?.material.opacity ?? 0,\n\t\t\t\tdepthWrite: actor.materials[0]?.material.depthWrite\n\t\t\t}))\n\t\t};\n\t}\n\tprivate readonly glass = new CarouselGlassCompositor();\n\tprivate readonly geometryFade = new CatalogGeometryFade();\n\tprivate readonly handoffScene = new THREE.Scene();\n\tprivate readonly camera = new THREE.PerspectiveCamera(45, 1, 1, 4000);\n\t// The carousel sits ~2500 units from the lens. A near plane of 1 wastes depth\n\t// precision and makes closely spaced CAD surfaces fight after the longer-lens change.\n\tprivate readonly carouselCamera = new THREE.PerspectiveCamera(45, 1, 250, 6000);\n\tprivate readonly carouselFog = new THREE.Fog(0xffffff, 2700, 4000);\n\tprivate readonly handoffCamera = new THREE.PerspectiveCamera();\n\tprivate readonly actors = new Map<string, CatalogActor>();\n\tprivate readonly requests = new Set<AbortController>();\n\tprivate readonly desired = new Set<string>();\n\tprivate readonly spatialElements = new Map<string, { brandId: string; spatialElement: SpatialListItem }>();\n\tprivate readonly loadingKeys = new Set<string>();\n\tprivate readonly failedKeys = new Set<string>();\n\tprivate readonly motion = window.matchMedia('(prefers-reduced-motion: reduce)');\n\tprivate readonly pointer = { x: 0, y: 0, active: false };\n\tprivate handoff?: Handoff;\n\tprivate handoffPoint?: { x: number; y: number };\n\tprivate generation = 0;\n\tprivate disposed = false;\n\tprivate layoutDirty = true;\n\tprivate layoutObserver = new ResizeObserver(() => this.resize());\n\tprivate queueDirty = true;\n\tprivate lastScrollX = Number.NaN;\n\tprivate lastScrollY = Number.NaN;\n\tprivate lastTime = 0;\n\tprivate exitOpacity = 1;\n\tprivate transitionActive = false;\n\tprivate destinationSpatialElement?: string;\n\tprivate destinationOccurrences = new Set<string>();\n\tprivate detachedInstances = 0;\n\tprivate readonly pointerMove = (event: PointerEvent) => {\n\t\tif (event.pointerType !== 'mouse' && event.pointerType !== 'pen') return;\n\t\tthis.pointer.x = event.clientX;\n\t\tthis.pointer.y = event.clientY;\n\t\tthis.pointer.active = true;\n\t\tthis.invalidate();\n\t};\n\tprivate readonly pointerLeave = () => {\n\t\tthis.pointer.active = false;\n\t\tthis.invalidate();\n\t};\n\tprivate readonly resize = () => {\n\t\tthis.layoutDirty = true;\n\t\tthis.queueDirty = true;\n\t\tthis.invalidate();\n\t};\n\tprivate readonly motionChange = () => this.invalidate();\n\tsetPageBackground(value: string) {\n\t\t(this.scene.fog as THREE.Fog).color.set(value);\n\t\tthis.carouselFog.color.set(value);\n\t\tthis.invalidate();\n\t}\n\n\tconstructor(\n\t\tprivate readonly assets: SpatialElementAssetManager,\n\t\tprivate readonly invalidate: () => void\n\t) {\n\t\tthis.scene.environmentIntensity = 0.5;\n\t\tthis.scene.fog = new THREE.Fog(0xffffff, 1200, 2500);\n\t\tthis.handoffScene.fog = this.scene.fog;\n\t\tthis.handoffScene.environmentIntensity = 0.5;\n\t\tthis.carouselCamera.position.z = 2500;\n\t\tthis.carouselCamera.updateMatrixWorld();\n\t\tthis.camera.position.z = 1000;\n\t\tthis.camera.updateMatrixWorld();\n\t\twindow.addEventListener('pointermove', this.pointerMove, { passive: true });\n\t\twindow.addEventListener('pointerleave', this.pointerLeave);\n\t\twindow.addEventListener('blur', this.pointerLeave);\n\t\twindow.addEventListener('resize', this.resize);\n\t\tthis.motion.addEventListener('change', this.motionChange);\n\t\twindow.addEventListener(CATALOG_POSE_CHANGED, this.motionChange);\n\t}\n\n\tasync setSpatialElements(brandId: string, spatialElements: SpatialListItem[]) {\n\t\tif (this.disposed) return;\n\t\tconst generation = ++this.generation;\n\t\tthis.layoutObserver.disconnect();\n\t\tconst page = document.querySelector('[data-catalog-list]');\n\t\tif (page) {\n\t\t\tthis.layoutObserver.observe(page);\n\t\t\tfor (const section of page.querySelectorAll('section')) this.layoutObserver.observe(section);\n\t\t}\n\t\tfor (const request of this.requests) request.abort();\n\t\tthis.requests.clear();\n\t\tthis.loadingKeys.clear();\n\t\tthis.failedKeys.clear();\n\t\tthis.desired.clear();\n\t\tthis.spatialElements.clear();\n\t\tfor (const spatialElement of spatialElements) {\n\t\t\tif (!spatialElement.stage) continue;\n\t\t\tconst key = JSON.stringify([\n\t\t\t\tgetSpatialElementEntityKey(brandId, spatialElement.id),\n\t\t\t\tspatialElement.occurrence ?? null\n\t\t\t]);\n\t\t\tthis.desired.add(key);\n\t\t\tthis.spatialElements.set(key, { brandId, spatialElement });\n\t\t}\n\t\tfor (const actor of this.actors.values()) {\n\t\t\tactor.pose = this.spatialElements.get(actor.key)?.spatialElement.pose ?? actor.pose;\n\t\t\tif (this.handoff && actor.rendered) continue;\n\t\t\tif (\n\t\t\t\tthis.handoff?.actor !== actor &&\n\t\t\t\t(!this.desired.has(actor.key) ||\n\t\t\t\t\tJSON.stringify(actor.stage) !==\n\t\t\t\t\t\tJSON.stringify(this.spatialElements.get(actor.key)?.spatialElement.stage))\n\t\t\t)\n\t\t\t\tthis.disposeActor(actor);\n\t\t}\n\t\tthis.layoutDirty = true;\n\t\tthis.queueDirty = false;\n\t\tawait this.loadVisibleSpatialElements(generation);\n\t\tthis.invalidate();\n\t}\n\n\tprivate async loadVisibleSpatialElements(generation: number) {\n\t\tif (this.disposed || generation !== this.generation) return;\n\t\tconst remaining = Math.min(\n\t\t\t2 - this.requests.size,\n\t\t\t16 - this.actors.size - this.detachedInstances - this.requests.size\n\t\t);\n\t\tif (remaining <= 0) return;\n\t\tconst candidates = [...this.spatialElements.entries()]\n\t\t\t.filter(([key, { brandId, spatialElement }]) => {\n\t\t\t\tif (this.actors.has(key) || this.loadingKeys.has(key) || this.failedKeys.has(key))\n\t\t\t\t\treturn false;\n\t\t\t\tconst list = document.querySelector<HTMLElement>(\n\t\t\t\t\t`[data-catalog-list][data-brand-id=\"${CSS.escape(brandId)}\"]`\n\t\t\t\t);\n\t\t\t\tconst slot = list?.querySelector<HTMLElement>(\n\t\t\t\t\t`[data-catalog-geometry][data-spatial-element-id=\"${CSS.escape(spatialElement.id)}\"]${spatialElement.occurrence ? `[data-catalog-occurrence=\"${CSS.escape(spatialElement.occurrence)}\"]` : ''}`\n\t\t\t\t);\n\t\t\t\tconst rect = slot?.getBoundingClientRect();\n\t\t\t\treturn (\n\t\t\t\t\trect &&\n\t\t\t\t\trect.top < window.innerHeight + 300 &&\n\t\t\t\t\trect.bottom > -300 &&\n\t\t\t\t\trect.left < window.innerWidth &&\n\t\t\t\t\trect.right > 0\n\t\t\t\t);\n\t\t\t})\n\t\t\t.slice(0, remaining);\n\t\tif (!candidates.length) return;\n\t\tawait Promise.all(\n\t\t\tcandidates.map(async ([key, { brandId, spatialElement }]) => {\n\t\t\t\tif (!spatialElement.stage) return;\n\t\t\t\tconst request = new AbortController();\n\t\t\t\tthis.requests.add(request);\n\t\t\t\tthis.loadingKeys.add(key);\n\t\t\t\tconst lease = this.assets.acquire(\n\t\t\t\t\tresolveSpatialElementLodPair(spatialElement.stage.glb, spatialElement.stage.lodPair)?.low ?? {\n\t\t\t\t\t\turl: spatialElement.stage.glb,\n\t\t\t\t\t\tformat: 'glb',\n\t\t\t\t\t\trevision: 'legacy-unversioned',\n\t\t\t\t\t\trequirements: { decoders: ['draco'], extensions: [] }\n\t\t\t\t\t},\n\t\t\t\t\t{ signal: request.signal }\n\t\t\t\t);\n\t\t\t\tlet instance: SpatialElementAssetInstance | undefined;\n\t\t\t\ttry {\n\t\t\t\t\tinstance = await lease.createInstance();\n\t\t\t\t\tif (this.disposed || generation !== this.generation) {\n\t\t\t\t\t\tinstance.dispose();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst actor = this.createActor(key, brandId, spatialElement.id, spatialElement.stage, instance);\n\t\t\t\t\tactor.occurrence = spatialElement.occurrence;\n\t\t\t\t\tactor.pose = spatialElement.pose;\n\t\t\t\t\tthis.actors.set(key, actor);\n\t\t\t\t\tthis.scene.add(actor.root);\n\t\t\t\t\tthis.layoutDirty = true;\n\t\t\t\t\tthis.invalidate();\n\t\t\t\t} catch (error) {\n\t\t\t\t\tinstance?.dispose();\n\t\t\t\t\tif (!(error instanceof DOMException && error.name === 'AbortError')) {\n\t\t\t\t\t\tif (generation === this.generation) this.failedKeys.add(key);\n\t\t\t\t\t\tconsole.warn(`Catalog preview unavailable for ${spatialElement.id}`, error);\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tlease.release();\n\t\t\t\t\tthis.requests.delete(request);\n\t\t\t\t\tif (generation === this.generation) this.loadingKeys.delete(key);\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t\tawait this.loadVisibleSpatialElements(generation);\n\t}\n\n\tupdate(renderer: THREE.WebGPURenderer, environment: THREE.Texture | null, now: number) {\n\t\tif (this.disposed) return false;\n\t\tconst width = Math.max(window.innerWidth, 1);\n\t\tconst height = Math.max(window.innerHeight, 1);\n\t\tthis.camera.coordinateSystem = renderer.coordinateSystem;\n\t\tthis.camera.aspect = width / height;\n\t\tthis.camera.fov = THREE.MathUtils.radToDeg(2 * Math.atan(height / 2000));\n\t\tthis.camera.updateProjectionMatrix();\n\t\tthis.carouselCamera.coordinateSystem = renderer.coordinateSystem;\n\t\tthis.carouselCamera.aspect = width / height;\n\t\tthis.carouselCamera.fov = THREE.MathUtils.radToDeg(2 * Math.atan(height / 5000));\n\t\tthis.carouselCamera.updateProjectionMatrix();\n\t\tthis.scene.environment = environment;\n\t\tthis.handoffScene.environment = this.handoff?.sourceEnvironment ?? environment;\n\t\tconst scroll = getStageVisualScrollPosition();\n\t\tif (scroll.scrollX !== this.lastScrollX || scroll.scrollY !== this.lastScrollY) {\n\t\t\tthis.lastScrollX = scroll.scrollX;\n\t\t\tthis.lastScrollY = scroll.scrollY;\n\t\t\tthis.queueDirty = true;\n\t\t}\n\t\tif (this.layoutDirty) this.measureActors(scroll.scrollX, scroll.scrollY);\n\t\tconst delta = Math.min(this.lastTime ? (now - this.lastTime) / 1000 : 1 / 60, 0.05);\n\t\tthis.lastTime = now;\n\t\tlet animating = false;\n\t\tthis.glass.beginFrame();\n\n\t\tfor (const actor of this.actors.values()) {\n\t\t\tif (this.handoff?.actor === actor) continue;\n\t\t\tif (this.handoff) {\n\t\t\t\t// The outgoing DOM has been snapshotted. Keep these already-rendered\n\t\t\t\t// spatialElements at their captured screen pose until the shared fade completes.\n\t\t\t\tactor.root.visible = actor.rendered && actor.root.visible && this.exitOpacity > 0.001;\n\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!actor.card?.isConnected || !actor.slot?.isConnected) {\n\t\t\t\tactor.root.visible = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst card = actor.cardRect;\n\t\t\tconst slot = actor.slotRect;\n\t\t\tif (!card || !slot) continue;\n\t\t\tconst dx = actor.scrollX - scroll.scrollX;\n\t\t\tconst dy = actor.scrollY - scroll.scrollY;\n\t\t\tif (slot.top + dy > height + 700 || slot.top + dy + slot.height < -700) {\n\t\t\t\tthis.disposeActor(actor);\n\t\t\t\tthis.queueDirty = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tactor.root.visible =\n\t\t\t\tthis.exitOpacity > 0.001 &&\n\t\t\t\tslot.top + dy < height + 96 &&\n\t\t\t\tslot.top + dy + slot.height > -96 &&\n\t\t\t\tslot.left + dx < width &&\n\t\t\t\tslot.left + dx + slot.width > 0;\n\t\t\tif (!actor.root.visible) continue;\n\n\t\t\tif (actor.pose) {\n\t\t\t\tconst pose = actor.pose.read();\n\t\t\t\tactor.band = pose.front ? 'front' : 'rear';\n\t\t\t\tactor.root.visible &&= pose.visible;\n\t\t\t\tapplyCatalogMaterialOpacity(actor.materials, pose.opacity);\n\t\t\t\tconst compact = slot.width < 700;\n\t\t\t\t// Anchor each coupled group at its spatialElement, so recession cannot pull neighbours together.\n\t\t\t\tconst x = slot.left + dx + slot.width * (pose.x - (compact ? 0 : 0.19));\n\t\t\t\tconst y = slot.top + dy + slot.height * pose.y;\n\t\t\t\tconst perspective = 1 - pose.depth / this.carouselCamera.position.z;\n\t\t\t\tactor.root.matrix.makeTranslation(\n\t\t\t\t\t(x - width / 2) * perspective,\n\t\t\t\t\t(height / 2 - y) * perspective,\n\t\t\t\t\tpose.depth\n\t\t\t\t);\n\t\t\t\tactor.root.matrixWorldNeedsUpdate = true;\n\t\t\t\t// One physical group transform for spatialElement, panel surface and DOM projection.\n\t\t\t\tactor.tilt.scale.setScalar(perspective * (pose.size / 0.82));\n\t\t\t\tactor.tilt.rotation.set(0, pose.yaw, 0);\n\t\t\t\tactor.tilt.position.set(0, 0, 0);\n\t\t\t\tactor.view.position.set(0, compact ? slot.height / 2 - 180 : 0, 0);\n\t\t\t\tactor.view.scale.setScalar(\n\t\t\t\t\t(Math.min(slot.width, compact ? 360 : slot.height) * 0.82) / (actor.radius * 2)\n\t\t\t\t);\n\t\t\t\tactor.root.updateMatrixWorld(true);\n\t\t\t\tconst hitTarget = actor.card.querySelector<HTMLElement>('.spatial-element-target');\n\t\t\t\tif (hitTarget) {\n\t\t\t\t\t// Project cached model bounds, not the framing sphere: empty foreground\n\t\t\t\t\t// margins must not intercept clicks on visible neighbouring spatialElements.\n\t\t\t\t\tlet left = Infinity,\n\t\t\t\t\t\ttop = Infinity,\n\t\t\t\t\t\tright = -Infinity,\n\t\t\t\t\t\tbottom = -Infinity;\n\t\t\t\t\tconst point = new THREE.Vector3();\n\t\t\t\t\tfor (const corner of actor.hitCorners) {\n\t\t\t\t\t\tpoint.copy(corner).applyMatrix4(actor.view.matrixWorld).project(this.carouselCamera);\n\t\t\t\t\t\tconst px = ((point.x + 1) * width) / 2 - slot.left - dx;\n\t\t\t\t\t\tconst py = ((1 - point.y) * height) / 2 - slot.top - dy;\n\t\t\t\t\t\tleft = Math.min(left, px);\n\t\t\t\t\t\tright = Math.max(right, px);\n\t\t\t\t\t\ttop = Math.min(top, py);\n\t\t\t\t\t\tbottom = Math.max(bottom, py);\n\t\t\t\t\t}\n\t\t\t\t\thitTarget.style.left = `${(left + right) / 2}px`;\n\t\t\t\t\thitTarget.style.top = `${(top + bottom) / 2}px`;\n\t\t\t\t\thitTarget.style.width = `${right - left}px`;\n\t\t\t\t\thitTarget.style.height = `${bottom - top}px`;\n\t\t\t\t\thitTarget.style.maxWidth = 'none';\n\t\t\t\t}\n\t\t\t\tconst panel = actor.card.querySelector<HTMLElement>('.summary');\n\t\t\t\tif (panel) {\n\t\t\t\t\tconst pw = panel.offsetWidth,\n\t\t\t\t\t\tph = panel.offsetHeight;\n\t\t\t\t\tconst matrix = actor.tilt.matrixWorld\n\t\t\t\t\t\t.clone()\n\t\t\t\t\t\t.multiply(\n\t\t\t\t\t\t\tnew THREE.Matrix4().makeTranslation(\n\t\t\t\t\t\t\t\tcompact ? 0 : slot.width * 0.39,\n\t\t\t\t\t\t\t\tcompact ? slot.height / 2 - 360 - ph / 2 : 0,\n\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\tconst corners = [\n\t\t\t\t\t\t[-pw / 2, ph / 2],\n\t\t\t\t\t\t[pw / 2, ph / 2],\n\t\t\t\t\t\t[pw / 2, -ph / 2],\n\t\t\t\t\t\t[-pw / 2, -ph / 2]\n\t\t\t\t\t].map(([x, y]) => {\n\t\t\t\t\t\tconst point = new THREE.Vector3(x, y, 0)\n\t\t\t\t\t\t\t.applyMatrix4(matrix)\n\t\t\t\t\t\t\t.project(this.carouselCamera);\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tx: ((point.x + 1) * width) / 2 - slot.left - dx,\n\t\t\t\t\t\t\ty: ((1 - point.y) * height) / 2 - slot.top - dy\n\t\t\t\t\t\t};\n\t\t\t\t\t}) as unknown as CssProjectionQuad;\n\t\t\t\t\tpanel.style.transform = getProjectiveCssMatrix3d(corners, pw, ph) ?? '';\n\t\t\t\t\trecordCarouselPanel(\n\t\t\t\t\t\tpanel,\n\t\t\t\t\t\tcorners.map((point) => ({\n\t\t\t\t\t\t\tx: point.x + slot.left + dx,\n\t\t\t\t\t\t\ty: point.y + slot.top + dy\n\t\t\t\t\t\t})) as unknown as CssProjectionQuad,\n\t\t\t\t\t\tpw,\n\t\t\t\t\t\tph\n\t\t\t\t\t);\n\t\t\t\t\tconst hidden =\n\t\t\t\t\t\tactor.card.style.visibility === 'hidden' || panel.style.visibility === 'hidden';\n\t\t\t\t\tthis.glass.panel(\n\t\t\t\t\t\tactor.card,\n\t\t\t\t\t\tmatrix,\n\t\t\t\t\t\tpw,\n\t\t\t\t\t\tph,\n\t\t\t\t\t\thidden ? 0 : pose.panelOpacity * this.exitOpacity\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tactor.clip = {\n\t\t\t\t\tleft: 0,\n\t\t\t\t\ttop: slot.top + dy,\n\t\t\t\t\twidth,\n\t\t\t\t\theight: slot.height\n\t\t\t\t};\n\t\t\t\tif (this.isDestinationActor(actor)) actor.root.visible = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tactor.tilt.scale.setScalar(1);\n\t\t\tconst centerX = card.left + dx + card.width / 2;\n\t\t\tconst centerY = card.top + dy + card.height / 2;\n\t\t\tconst px = this.pointer.x - centerX;\n\t\t\tconst py = this.pointer.y - centerY;\n\t\t\tconst distance = Math.hypot(\n\t\t\t\tMath.max(Math.abs(px) - card.width / 2, 0),\n\t\t\t\tMath.max(Math.abs(py) - card.height / 2, 0)\n\t\t\t);\n\t\t\tconst influence =\n\t\t\t\tthis.pointer.active && !this.motion.matches && !this.transitionActive\n\t\t\t\t\t? getPanelPointerInfluence(distance, card.width, card.height)\n\t\t\t\t\t: 0;\n\t\t\tconst rotation = getPanelPointerRotation(\n\t\t\t\tpx / (card.width / 2),\n\t\t\t\tpy / (card.height / 2),\n\t\t\t\tinfluence,\n\t\t\t\tcard.width,\n\t\t\t\tcard.height\n\t\t\t);\n\t\t\t// CSS has a downward Y axis; use the same physical rotation as DETAIL panels.\n\t\t\tconst targets = [\n\t\t\t\t-THREE.MathUtils.radToDeg(rotation.x),\n\t\t\t\tTHREE.MathUtils.radToDeg(rotation.y),\n\t\t\t\t-influence * 8\n\t\t\t];\n\t\t\tconst previous = [actor.rotationX, actor.rotationY, actor.lift];\n\t\t\tconst values = previous.map((value, index) => {\n\t\t\t\tconst next = this.motion.matches\n\t\t\t\t\t? targets[index]\n\t\t\t\t\t: THREE.MathUtils.damp(value, targets[index], 14, delta);\n\t\t\t\treturn Math.abs(next - targets[index]) < 0.01 ? targets[index] : next;\n\t\t\t});\n\t\t\t[actor.rotationX, actor.rotationY, actor.lift] = values;\n\t\t\tanimating ||= values.some((value, index) => value !== targets[index]);\n\t\t\tactor.card.style.setProperty('--catalog-rotate-x', `${actor.rotationX}deg`);\n\t\t\tactor.card.style.setProperty('--catalog-rotate-y', `${actor.rotationY}deg`);\n\t\t\tactor.card.style.setProperty('--catalog-lift', `${actor.lift}px`);\n\t\t\tsetPanelLocalPerspectiveMatrix(\n\t\t\t\tactor.root.matrix,\n\t\t\t\tcenterX - width / 2,\n\t\t\t\theight / 2 - centerY,\n\t\t\t\t0,\n\t\t\t\t1000\n\t\t\t);\n\t\t\tactor.root.matrixWorldNeedsUpdate = true;\n\t\t\tactor.tilt.rotation.set(\n\t\t\t\t-THREE.MathUtils.degToRad(actor.rotationX),\n\t\t\t\tTHREE.MathUtils.degToRad(actor.rotationY),\n\t\t\t\t0\n\t\t\t);\n\t\t\tactor.tilt.position.y = -actor.lift;\n\t\t\tactor.view.position.set(\n\t\t\t\tslot.left + slot.width / 2 - card.left - card.width / 2,\n\t\t\t\tcard.top + card.height / 2 - slot.top - slot.height / 2,\n\t\t\t\t0\n\t\t\t);\n\t\t\tactor.view.scale.setScalar((Math.min(slot.width, slot.height) * 0.84) / (actor.radius * 2));\n\t\t\tif (this.isDestinationActor(actor)) actor.root.visible = false;\n\t\t}\n\t\tif (this.queueDirty) {\n\t\t\tthis.queueDirty = false;\n\t\t\tvoid this.loadVisibleSpatialElements(this.generation);\n\t\t}\n\t\tthis.glass.endFrame();\n\t\treturn animating;\n\t}\n\n\tdraw(renderer: THREE.WebGPURenderer, band: 'rear' | 'front') {\n\t\tthis.passes++;\n\t\tconst width = window.innerWidth,\n\t\t\theight = window.innerHeight;\n\t\tconst all = [...this.actors.values()].filter(\n\t\t\t(actor) => actor.root.visible && this.handoff?.actor !== actor\n\t\t);\n\t\tfor (const actor of all) actor.root.visible = (actor.band ?? 'front') === band;\n\t\tthis.geometryFade.render(renderer, this.exitOpacity, () => {\n\t\t\trenderer.clearDepth();\n\t\t\tconst shown = [...this.actors.values()].filter(\n\t\t\t\t(actor) => actor.root.visible && this.handoff?.actor !== actor\n\t\t\t);\n\t\t\tconst clipped = shown.filter((actor) => actor.clip);\n\t\t\tfor (const actor of clipped) actor.root.visible = false;\n\t\t\trenderer.render(this.scene, this.camera);\n\t\t\tif (clipped.length) {\n\t\t\t\tconst oldScissor = renderer.getScissor(new THREE.Vector4());\n\t\t\t\tconst oldTest = renderer.getScissorTest();\n\t\t\t\tfor (const actor of shown) actor.root.visible = false;\n\t\t\t\t// One submission per section viewport, with shared depth among its ring spatialElements.\n\t\t\t\tconst groups = new Map<string, CatalogActor[]>();\n\t\t\t\tfor (const actor of clipped) {\n\t\t\t\t\tconst key = JSON.stringify(actor.clip);\n\t\t\t\t\tgroups.set(key, [...(groups.get(key) ?? []), actor]);\n\t\t\t\t}\n\t\t\t\tfor (const group of groups.values()) {\n\t\t\t\t\tconst rect = group[0].clip!;\n\t\t\t\t\tconst left = Math.max(0, rect.left),\n\t\t\t\t\t\ttop = Math.max(0, rect.top);\n\t\t\t\t\tconst right = Math.min(width, rect.left + rect.width),\n\t\t\t\t\t\tbottom = Math.min(height, rect.top + rect.height);\n\t\t\t\t\tif (right <= left || bottom <= top) continue;\n\t\t\t\t\trenderer.setScissor(left, top, right - left, bottom - top);\n\t\t\t\t\trenderer.setScissorTest(true);\n\t\t\t\t\tfor (const actor of group) actor.root.visible = true;\n\t\t\t\t\tconst fog = this.scene.fog;\n\t\t\t\t\tthis.scene.fog = this.carouselFog;\n\t\t\t\t\ttry {\n\t\t\t\t\t\trenderer.render(this.scene, this.carouselCamera);\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tthis.scene.fog = fog;\n\t\t\t\t\t}\n\t\t\t\t\tfor (const actor of group) actor.root.visible = false;\n\t\t\t\t}\n\t\t\t\trenderer.setScissor(oldScissor);\n\t\t\t\trenderer.setScissorTest(oldTest);\n\t\t\t}\n\t\t\tfor (const actor of shown) actor.root.visible = true;\n\t\t\tfor (const actor of this.actors.values()) {\n\t\t\t\tif (actor.root.visible && this.handoff?.actor !== actor) {\n\t\t\t\t\tactor.rendered = true;\n\t\t\t\t\tactor.card?.setAttribute('data-catalog-model-ready', '');\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tfor (const actor of all) actor.root.visible = true;\n\t\tif (band === 'front' && this.handoff) this.renderHandoff(renderer);\n\t}\n\n\t/** Rear elements are the backdrop source, independent of DETAIL High/HDR ownership. */\n\thasCarousel() {\n\t\treturn [...this.actors.values()].some((actor) => Boolean(actor.pose));\n\t}\n\n\trenderRear(renderer: THREE.WebGPURenderer) {\n\t\tthis.glass.render(renderer, this.carouselCamera, () => this.draw(renderer, 'rear'));\n\t}\n\n\t/** Warm the existing Low material passes in an offscreen preparation target. */\n\trenderForPreparation(renderer: THREE.WebGPURenderer) {\n\t\tthis.geometryFade.render(renderer, 0.5, () => renderer.render(this.scene, this.camera));\n\t}\n\n\t/** Applies only to outgoing list actors; the shared handoff geometry keeps its authored alpha. */\n\tsetExitOpacity(opacity: number, active = false) {\n\t\tthis.exitOpacity = Number.isFinite(opacity) ? Math.min(1, Math.max(0, opacity)) : 0;\n\t\tthis.transitionActive = active;\n\t\tthis.invalidate();\n\t}\n\n\tcapture(spatialElementId: string, occurrence?: string) {\n\t\tconst actor = [...this.actors.values()].find(\n\t\t\t(item) =>\n\t\t\t\titem.spatialElementId === spatialElementId &&\n\t\t\t\tthis.desired.has(item.key) &&\n\t\t\t\t(occurrence\n\t\t\t\t\t? item.occurrence === occurrence\n\t\t\t\t\t: !item.occurrence || item.card?.hasAttribute('data-catalog-selected'))\n\t\t);\n\t\tif (!actor?.rendered || !actor.root.visible) return false;\n\t\tthis.finishHandoff();\n\t\tthis.handoffPoint = undefined;\n\t\tactor.model.updateWorldMatrix(true, true);\n\t\tconst camera = actor.pose ? this.carouselCamera : this.camera;\n\t\tthis.handoffScene.fog = actor.pose ? this.carouselFog : this.scene.fog;\n\t\tcamera.updateMatrixWorld();\n\t\tconst sourceModel = actor.model.matrixWorld.clone();\n\t\tconst sourceClip = normalizeSpatialElementClipMatrix(\n\t\t\tnew THREE.Matrix4()\n\t\t\t\t.multiplyMatrices(camera.projectionMatrix, camera.matrixWorldInverse)\n\t\t\t\t.multiply(sourceModel),\n\t\t\tactor.referencePoint\n\t\t);\n\t\tthis.handoff = {\n\t\t\tsourceEnvironmentIntensity: this.scene.environmentIntensity,\n\t\t\tsourceEnvironment: this.scene.environment,\n\t\t\tactor,\n\t\t\tsourceClip,\n\t\t\tsourceModel,\n\t\t\tsourceCamera: camera.matrixWorld.clone()\n\t\t};\n\t\tapplyCatalogMaterialOpacity(actor.materials, 1);\n\t\tactor.root.removeFromParent();\n\t\tthis.handoffScene.add(actor.model);\n\t\tactor.model.matrixAutoUpdate = false;\n\t\tactor.model.matrix.copy(sourceModel);\n\t\tthis.invalidate();\n\t\treturn true;\n\t}\n\n\t/** Last submitted geometry position; diagnostics never advance animation or read DOM layout. */\n\tsetDestinationSpatialElement(spatialElementId?: string) {\n\t\tthis.destinationSpatialElement = spatialElementId;\n\t\tif (!spatialElementId) this.destinationOccurrences.clear();\n\t\tthis.invalidate();\n\t}\n\n\tsetDestinationOccurrences(endpoints: { spatialElementId: string; occurrence?: string }[]) {\n\t\tthis.destinationOccurrences = new Set(\n\t\t\tendpoints.map((p) => JSON.stringify([p.spatialElementId, p.occurrence]))\n\t\t);\n\t\tthis.invalidate();\n\t}\n\n\tprivate isDestinationActor(actor: CatalogActor) {\n\t\treturn (\n\t\t\tthis.destinationOccurrences.has(JSON.stringify([actor.spatialElementId, actor.occurrence])) ||\n\t\t\t(actor.spatialElementId === this.destinationSpatialElement &&\n\t\t\t\t(!actor.occurrence || actor.card?.hasAttribute('data-catalog-selected')))\n\t\t);\n\t}\n\n\tgetDestinationProjection(spatialElementId: string, occurrence?: string): SpatialElementProjection | undefined {\n\t\tconst actor = [...this.actors.values()].find(\n\t\t\t(item) =>\n\t\t\t\titem.spatialElementId === spatialElementId &&\n\t\t\t\t(occurrence\n\t\t\t\t\t? item.occurrence === occurrence\n\t\t\t\t\t: !item.occurrence || item.card?.hasAttribute('data-catalog-selected'))\n\t\t);\n\t\tif (!actor?.slot?.isConnected) return;\n\t\tconst rect = actor.slot.getBoundingClientRect();\n\t\tif (\n\t\t\trect.width <= 0 ||\n\t\t\trect.height <= 0 ||\n\t\t\t(actor.pose\n\t\t\t\t? rect.right <= 0 || rect.bottom <= 0 || rect.left >= innerWidth || rect.top >= innerHeight\n\t\t\t\t: rect.left < 0 || rect.top < 0 || rect.right > innerWidth || rect.bottom > innerHeight)\n\t\t)\n\t\t\treturn;\n\t\tactor.model.updateWorldMatrix(true, true);\n\t\tconst camera = actor.pose ? this.carouselCamera : this.camera;\n\t\treturn {\n\t\t\tenvironmentIntensity: this.scene.environmentIntensity,\n\t\t\tfog: actor.pose ? this.carouselFog : this.scene.fog,\n\t\t\tviewportClip: actor.clip ? { ...actor.clip } : undefined,\n\t\t\tmodel: actor.model.matrixWorld.clone(),\n\t\t\tcamera: camera.matrixWorld.clone(),\n\t\t\tclip: normalizeSpatialElementClipMatrix(\n\t\t\t\tnew THREE.Matrix4()\n\t\t\t\t\t.multiplyMatrices(camera.projectionMatrix, camera.matrixWorldInverse)\n\t\t\t\t\t.multiply(actor.model.matrixWorld),\n\t\t\t\tnew THREE.Vector3()\n\t\t\t)\n\t\t};\n\t}\n\n\tgetHandoffPoint() {\n\t\treturn this.handoff && this.handoffPoint ? { ...this.handoffPoint } : null;\n\t}\n\n\t/** Detach the last submitted moving element without releasing the actor's Low instance. */\n\tdetachHandoff() {\n\t\tconst handoff = this.handoff;\n\t\tif (!handoff) return;\n\t\tconst actor = handoff.actor;\n\t\tconst model = actor.model;\n\t\tmodel.updateWorldMatrix(true, true);\n\t\tconst camera = this.handoffPoint\n\t\t\t? this.handoffCamera\n\t\t\t: actor.pose\n\t\t\t\t? this.carouselCamera\n\t\t\t\t: this.camera;\n\t\tcamera.updateMatrixWorld();\n\t\tconst projection = {\n\t\t\tfog: actor.pose ? this.carouselFog : this.scene.fog,\n\t\t\tviewportClip: actor.clip ? { ...actor.clip } : undefined,\n\t\t\tmodel: model.matrixWorld.clone(),\n\t\t\tcamera: camera.matrixWorld.clone(),\n\t\t\tclip: normalizeSpatialElementClipMatrix(\n\t\t\t\tnew THREE.Matrix4()\n\t\t\t\t\t.multiplyMatrices(camera.projectionMatrix, camera.matrixWorldInverse)\n\t\t\t\t\t.multiply(model.matrixWorld),\n\t\t\t\tnew THREE.Vector3()\n\t\t\t),\n\t\t\tenvironmentIntensity: this.handoffPoint\n\t\t\t\t? this.handoffScene.environmentIntensity\n\t\t\t\t: handoff.sourceEnvironmentIntensity\n\t\t};\n\t\tthis.handoff = undefined;\n\t\tif (this.actors.get(actor.key) === actor) this.actors.delete(actor.key);\n\t\tthis.detachedInstances++;\n\t\tlet released = false;\n\t\treturn {\n\t\t\tmodel,\n\t\t\tprojection,\n\t\t\treferencePoint: actor.referencePoint.clone(),\n\t\t\tenvironment: handoff.sourceEnvironment,\n\t\t\thighEnvironment: handoff.highEnvironment,\n\t\t\trelease: () => {\n\t\t\t\tif (!released) {\n\t\t\t\t\treleased = true;\n\t\t\t\t\tthis.detachedInstances--;\n\t\t\t\t\tthis.disposeActor(actor);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n\n\tsetHandoffTarget(target: {\n\t\tcamera: THREE.PerspectiveCamera;\n\t\tmodel: THREE.Object3D;\n\t\tprogress: number;\n\t\tenvironmentIntensity?: number;\n\t}) {\n\t\tif (!this.handoff) return;\n\t\tthis.handoff.target = target;\n\t\tthis.invalidate();\n\t}\n\n\tsetHighHandoff(\n\t\thigh: THREE.Object3D | undefined,\n\t\tblend: SpatialElementRefinement | undefined,\n\t\tprogress: number,\n\t\tenvironment?: THREE.Texture\n\t) {\n\t\tif (this.handoff)\n\t\t\tObject.assign(this.handoff, {\n\t\t\t\thigh,\n\t\t\t\tblend,\n\t\t\t\tblendProgress: progress,\n\t\t\t\thighEnvironment: environment\n\t\t\t});\n\t}\n\n\tfinishHandoff() {\n\t\tconst handoff = this.handoff;\n\t\tif (!handoff) return;\n\t\tthis.handoff = undefined;\n\t\tconst actor = handoff.actor;\n\t\tapplyCatalogMaterialOpacity(actor.materials, 1);\n\t\tif (this.desired.has(actor.key)) {\n\t\t\tapplyCatalogMaterialOpacity(actor.materials, 1);\n\t\t\tactor.model.matrixAutoUpdate = true;\n\t\t\tactor.model.updateMatrix();\n\t\t\tactor.view.add(actor.model);\n\t\t\tthis.scene.add(actor.root);\n\t\t\tthis.layoutDirty = true;\n\t\t} else this.disposeActor(actor);\n\t\tfor (const other of this.actors.values()) {\n\t\t\tif (!this.desired.has(other.key)) this.disposeActor(other);\n\t\t}\n\t\tthis.invalidate();\n\t}\n\n\t/** Crossfade the stationary Low overlay against the revealed background hero. */\n\tsetHandoffOpacity(opacity: number) {\n\t\tif (this.handoff) applyCatalogMaterialOpacity(this.handoff.actor.materials, opacity);\n\t}\n\n\tdispose() {\n\t\tthis.glass.dispose();\n\t\tthis.geometryFade.dispose();\n\t\tif (this.disposed) return;\n\t\tthis.disposed = true;\n\t\tthis.generation += 1;\n\t\tfor (const request of this.requests) request.abort();\n\t\tthis.requests.clear();\n\t\tthis.handoff = undefined;\n\t\tfor (const actor of this.actors.values()) this.disposeActor(actor);\n\t\twindow.removeEventListener('pointermove', this.pointerMove);\n\t\twindow.removeEventListener('pointerleave', this.pointerLeave);\n\t\twindow.removeEventListener('blur', this.pointerLeave);\n\t\twindow.removeEventListener('resize', this.resize);\n\t\tthis.motion.removeEventListener('change', this.motionChange);\n\t\twindow.removeEventListener(CATALOG_POSE_CHANGED, this.motionChange);\n\t\tthis.layoutObserver.disconnect();\n\t}\n\n\tprivate createActor(\n\t\tkey: string,\n\t\tbrandId: string,\n\t\tspatialElementId: string,\n\t\tstage: SpatialStageConfig,\n\t\tinstance: SpatialElementAssetInstance\n\t): CatalogActor {\n\t\tconst pair = resolveSpatialElementLodPair(stage.glb, stage.lodPair);\n\t\tconst rotation = pair ? undefined : stage.model?.rotation;\n\t\tif (rotation)\n\t\t\tinstance.scene.rotation.set(\n\t\t\t\tinstance.scene.rotation.x + (rotation.x ?? 0),\n\t\t\t\tinstance.scene.rotation.y + (rotation.y ?? 0),\n\t\t\t\tinstance.scene.rotation.z + (rotation.z ?? 0)\n\t\t\t);\n\t\tapplyModelMaterialOverrides(instance.scene, stage.model?.materialOverrides);\n\t\tconst overrides = new Set<THREE.Material>();\n\t\tconst excluded = new Set(stage.model?.excludeMeshes ?? []);\n\t\tinstance.scene.traverse((object) => {\n\t\t\tif (!isMesh(object)) return;\n\t\t\tif (excluded.has(object.name)) object.visible = false;\n\t\t\tif (stage.model?.materialOverrides?.[object.name])\n\t\t\t\tgetMeshMaterials(object).forEach((material) => overrides.add(material));\n\t\t});\n\t\tconst sourceBounds = getMeshBounds(instance.scene, (mesh) => !excluded.has(mesh.name));\n\t\tif (sourceBounds.isEmpty()) {\n\t\t\tfor (const material of overrides) material.dispose();\n\t\t\tthrow new Error('Catalog asset contains no spatialElement geometry');\n\t\t}\n\t\tconst referencePoint = sourceBounds.getCenter(new THREE.Vector3());\n\t\tconst model = new THREE.Group();\n\t\tlet bounds: THREE.Box3;\n\t\tif (pair) {\n\t\t\tbounds = prepareSpatialElementFrame(model, instance.scene, pair, stage.model ?? {});\n\t\t\treferencePoint.set(0, 0, 0);\n\t\t} else {\n\t\t\tmodel.add(instance.scene);\n\t\t\tcenterAndScale(model, (mesh) => !excluded.has(mesh.name));\n\t\t\tbounds = getMeshBounds(model, (mesh) => !excluded.has(mesh.name));\n\t\t}\n\t\tif (bounds.isEmpty()) {\n\t\t\tfor (const material of overrides) material.dispose();\n\t\t\tthrow new Error('Catalog asset contains no spatialElement geometry');\n\t\t}\n\t\tconst radius = Math.max(bounds.getBoundingSphere(new THREE.Sphere()).radius, 0.001);\n\t\tconst root = new THREE.Group();\n\t\troot.matrixAutoUpdate = false;\n\t\tconst tilt = new THREE.Group();\n\t\tconst view = new THREE.Group();\n\t\tview.quaternion.copy(\n\t\t\tgetCameraOrbitQuaternion(stage.camera?.azimuth, stage.camera?.elevation).invert()\n\t\t);\n\t\troot.add(tilt);\n\t\ttilt.add(view);\n\t\tview.add(model);\n\t\tconst materials = captureCatalogMaterialOpacity(model);\n\t\tapplyCatalogMaterialOpacity(materials, 1);\n\t\treturn {\n\t\t\tkey,\n\t\t\tbrandId,\n\t\t\tspatialElementId,\n\t\t\tstage,\n\t\t\tinstance,\n\t\t\tmodel,\n\t\t\troot,\n\t\t\ttilt,\n\t\t\tview,\n\t\t\tradius,\n\t\t\thitCorners: [bounds.min.x, bounds.max.x].flatMap((x) =>\n\t\t\t\t[bounds.min.y, bounds.max.y].flatMap((y) =>\n\t\t\t\t\t[bounds.min.z, bounds.max.z].map((z) => new THREE.Vector3(x, y, z))\n\t\t\t\t)\n\t\t\t),\n\t\t\treferencePoint,\n\t\t\toverrides,\n\t\t\tmaterials,\n\t\t\tscrollX: 0,\n\t\t\tscrollY: 0,\n\t\t\trotationX: 0,\n\t\t\trotationY: 0,\n\t\t\tlift: 0,\n\t\t\trendered: false\n\t\t};\n\t}\n\n\tprivate measureActors(scrollX: number, scrollY: number) {\n\t\tif (this.handoff) return;\n\t\tconst measured: Array<{ actor: CatalogActor; previousTransform: string }> = [];\n\t\tfor (const actor of this.actors.values()) {\n\t\t\tconst list = document.querySelector<HTMLElement>(\n\t\t\t\t`[data-catalog-list][data-brand-id=\"${CSS.escape(actor.brandId)}\"]`\n\t\t\t);\n\t\t\tactor.slot =\n\t\t\t\tlist?.querySelector<HTMLElement>(\n\t\t\t\t\t`[data-catalog-geometry][data-spatial-element-id=\"${CSS.escape(actor.spatialElementId)}\"]${actor.occurrence ? `[data-catalog-occurrence=\"${CSS.escape(actor.occurrence)}\"]` : ''}`\n\t\t\t\t) ?? undefined;\n\t\t\tactor.card =\n\t\t\t\tactor.slot?.closest<HTMLElement>('[data-catalog-card], [data-carousel-spatial-element]') ??\n\t\t\t\tundefined;\n\t\t\tif (!actor.card || !actor.slot) continue;\n\t\t\tmeasured.push({ actor, previousTransform: actor.card.style.transform });\n\t\t\tactor.card.style.transform = 'none';\n\t\t}\n\t\t// Batch neutral-pose writes, measurements, and restoration to avoid per-card layout thrashing.\n\t\tfor (const { actor } of measured) {\n\t\t\tactor.cardRect = actor.card!.getBoundingClientRect();\n\t\t\tactor.slotRect = actor.slot!.getBoundingClientRect();\n\t\t\tactor.scrollX = scrollX;\n\t\t\tactor.scrollY = scrollY;\n\t\t}\n\t\tfor (const { actor, previousTransform } of measured)\n\t\t\tactor.card!.style.transform = previousTransform;\n\t\tthis.layoutDirty = false;\n\t}\n\n\tprivate renderHandoff(renderer: THREE.WebGPURenderer) {\n\t\tconst handoff = this.handoff!;\n\t\tconst target = handoff.target;\n\t\t// Otherwise Renderer would replace the custom projection on its first WebGPU draw.\n\t\tthis.handoffCamera.coordinateSystem = renderer.coordinateSystem;\n\t\tif (target && target.camera.coordinateSystem !== renderer.coordinateSystem) {\n\t\t\ttarget.camera.coordinateSystem = renderer.coordinateSystem;\n\t\t\ttarget.camera.updateProjectionMatrix();\n\t\t}\n\t\tconst progress = THREE.MathUtils.clamp(target?.progress ?? 0, 0, 1);\n\t\tthis.handoffScene.environmentIntensity = THREE.MathUtils.lerp(\n\t\t\thandoff.sourceEnvironmentIntensity,\n\t\t\ttarget?.environmentIntensity ?? 0.5,\n\t\t\tprogress\n\t\t);\n\t\ttarget?.model.updateWorldMatrix(true, true);\n\t\ttarget?.camera.updateMatrixWorld();\n\t\tconst targetModel = target?.model.matrixWorld ?? handoff.sourceModel;\n\t\tconst targetCamera = target?.camera.matrixWorld ?? handoff.sourceCamera;\n\t\tconst targetClip = target\n\t\t\t? normalizeSpatialElementClipMatrix(\n\t\t\t\t\tnew THREE.Matrix4()\n\t\t\t\t\t\t.multiplyMatrices(target.camera.projectionMatrix, target.camera.matrixWorldInverse)\n\t\t\t\t\t\t.multiply(targetModel),\n\t\t\t\t\thandoff.actor.referencePoint\n\t\t\t\t)\n\t\t\t: handoff.sourceClip;\n\t\tconst modelWorld = interpolatePose(handoff.sourceModel, targetModel, progress);\n\t\tconst cameraWorld = interpolatePose(handoff.sourceCamera, targetCamera, progress);\n\t\thandoff.actor.model.matrix.copy(modelWorld);\n\t\thandoff.actor.model.matrixWorldNeedsUpdate = true;\n\t\tcameraWorld.decompose(\n\t\t\tthis.handoffCamera.position,\n\t\t\tthis.handoffCamera.quaternion,\n\t\t\tthis.handoffCamera.scale\n\t\t);\n\t\tthis.handoffCamera.updateMatrixWorld();\n\t\tgetSpatialElementHandoffProjection(\n\t\t\thandoff.sourceClip,\n\t\t\ttargetClip,\n\t\t\tprogress,\n\t\t\tmodelWorld,\n\t\t\tthis.handoffCamera.matrixWorld,\n\t\t\t{\n\t\t\t\tsourceModel: handoff.sourceModel,\n\t\t\t\tsourceCamera: handoff.sourceCamera,\n\t\t\t\ttargetModel,\n\t\t\t\ttargetCamera,\n\t\t\t\treference: handoff.actor.referencePoint\n\t\t\t},\n\t\t\tthis.handoffCamera.projectionMatrix\n\t\t);\n\t\tthis.handoffCamera.projectionMatrixInverse.copy(this.handoffCamera.projectionMatrix).invert();\n\t\trenderer.clearDepth();\n\t\tif (handoff.high && handoff.blend && (handoff.blendProgress ?? 0) > 0) {\n\t\t\tconst high = handoff.high;\n\t\t\tconst parent = high.parent;\n\t\t\tconst visibility = high.visible;\n\t\t\tconst children = [...handoff.actor.model.children];\n\t\t\tconst environment = this.handoffScene.environment;\n\t\t\thandoff.actor.model.add(high);\n\t\t\ttry {\n\t\t\t\thandoff.blend.render(\n\t\t\t\t\trenderer,\n\t\t\t\t\t(useHigh) => {\n\t\t\t\t\t\tfor (const child of children) child.visible = !useHigh;\n\t\t\t\t\t\thigh.visible = useHigh;\n\t\t\t\t\t\tthis.handoffScene.environment = useHigh\n\t\t\t\t\t\t\t? (handoff.highEnvironment ?? environment)\n\t\t\t\t\t\t\t: environment;\n\t\t\t\t\t\trenderer.clear();\n\t\t\t\t\t\trenderer.render(this.handoffScene, this.handoffCamera);\n\t\t\t\t\t},\n\t\t\t\t\tfalse,\n\t\t\t\t\thandoff.blendProgress\n\t\t\t\t);\n\t\t\t} finally {\n\t\t\t\tfor (const child of children) child.visible = true;\n\t\t\t\tif (parent) parent.add(high);\n\t\t\t\telse high.removeFromParent();\n\t\t\t\thigh.visible = visibility;\n\t\t\t\tthis.handoffScene.environment = environment;\n\t\t\t}\n\t\t} else renderer.render(this.handoffScene, this.handoffCamera);\n\t\tconst point = handoff.actor.referencePoint\n\t\t\t.clone()\n\t\t\t.applyMatrix4(handoff.actor.model.matrixWorld)\n\t\t\t.project(this.handoffCamera);\n\t\tthis.handoffPoint = {\n\t\t\tx: ((point.x + 1) * window.innerWidth) / 2,\n\t\t\ty: ((1 - point.y) * window.innerHeight) / 2\n\t\t};\n\t}\n\n\tprivate disposeActor(actor: CatalogActor) {\n\t\tactor.root.removeFromParent();\n\t\tactor.model.removeFromParent();\n\t\tactor.card?.removeAttribute('data-catalog-model-ready');\n\t\tactor.card?.style.removeProperty('--catalog-rotate-x');\n\t\tactor.card?.style.removeProperty('--catalog-rotate-y');\n\t\tactor.card?.style.removeProperty('--catalog-lift');\n\t\tfor (const material of actor.overrides) material.dispose();\n\t\tactor.instance.dispose();\n\t\tif (this.actors.get(actor.key) === actor) this.actors.delete(actor.key);\n\t}\n}\n\nexport function interpolatePose(source: THREE.Matrix4, target: THREE.Matrix4, progress: number) {\n\tif (progress === 0) return source.clone();\n\tif (progress === 1) return target.clone();\n\tconst position = new THREE.Vector3();\n\tconst rotation = new THREE.Quaternion();\n\tconst scale = new THREE.Vector3();\n\tconst targetPosition = new THREE.Vector3();\n\tconst targetRotation = new THREE.Quaternion();\n\tconst targetScale = new THREE.Vector3();\n\tsource.decompose(position, rotation, scale);\n\ttarget.decompose(targetPosition, targetRotation, targetScale);\n\treturn new THREE.Matrix4().compose(\n\t\tposition.lerp(targetPosition, progress),\n\t\trotation.slerp(targetRotation, progress),\n\t\tscale.lerp(targetScale, progress)\n\t);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"CatalogSpatialElementLayer.js","sourceRoot":"","sources":["../../src/catalog/CatalogSpatialElementLayer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,oBAAo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,CAAC,KAAK,KAAK;YAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACzE,CAAC;CACD;AAED,MAAM,UAAU,eAAe,CAAC,MAAqB,EAAE,MAAqB,EAAE,QAAgB;IAC7F,IAAI,QAAQ,KAAK,CAAC;QAAE,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC;IAC1C,IAAI,QAAQ,KAAK,CAAC;QAAE,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC;IAC1C,MAAM,QAAQ,GAAG,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;IACrC,MAAM,QAAQ,GAAG,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;IACxC,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;IAClC,MAAM,cAAc,GAAG,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;IAC3C,MAAM,cAAc,GAAG,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;IAC9C,MAAM,WAAW,GAAG,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;IACxC,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;IAC5C,MAAM,CAAC,SAAS,CAAC,cAAc,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC;IAC9D,OAAO,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC,OAAO,CACjC,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,EACvC,QAAQ,CAAC,KAAK,CAAC,cAAc,EAAE,QAAQ,CAAC,EACxC,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CACjC,CAAC;AACH,CAAC","sourcesContent":["import { CatalogGeometryFade } from './CatalogGeometryFade.js';\nimport { CarouselDeviceCamera } from './CarouselDeviceCamera.js';\nimport { isCatalogActivationFocus } from './catalogActivationFocus.js';\nimport { isDeviceOrientationPaused, getListDeviceYaw, getListDevicePitch, getListDeviceRoll, subscribeListDeviceYaw } from './listDeviceOrientation.js';\nimport { cardModelFit } from './cardModelFit.js';\nimport { createStagedDetailGeometry } from './stagedDetailGeometry.js';\nimport { createStagedDockGeometry, type StagedDockTargetOptions } from './stagedDockGeometry.js';\nimport { sourceDomProjectiveMatrix } from './SourceDomMotion.js';\nimport { withRendererState } from '../stage/rendererState.js';\nimport { resolveDetailLayout, type LayoutRect } from '../spatial-element/responsiveLayout.js';\nimport { CatalogDepthBlur, type BlurRect } from './CatalogDepthBlur.js';\nimport { CatalogModelOutline } from './CatalogModelOutline.js';\nimport { DEFAULT_INTERACTION_THEME } from '../stage/stageConstants.js';\nimport type { StageInteractionTheme } from '../stage/stageTypes.js';\nimport { recordCarouselPanel } from './carouselPanelProjection.js';\nimport type { SpatialElementProjection } from './SpatialGeometryCapture.js';\nimport { prepareSpatialElementFrame } from '../stage/spatialElementFrame.js';\nimport type { SpatialElementRefinement } from '../stage/SpatialElementRefinement.js';\nimport { resolveSpatialElementLodPair } from './spatialElementLodPair.js';\nimport * as THREE from 'three/webgpu';\nimport type { SpatialListItem } from '../spatial-element/types.js';\nimport { getSpatialElementScene, hasSpatialElementScene, type SpatialElementScene } from '../spatial-element/spatialElementScene.js';\nimport { getStageVisualScrollPosition } from '../stage/scrollFrame.js';\nimport {\n\tgetCameraOrbitQuaternion,\n\tgetPanelPointerInfluence,\n\tgetPanelPointerRotation,\n\tsetPanelLocalPerspectiveMatrix\n} from '../stage/stageMath.js';\nimport {\n\tapplyModelMaterialOverrides,\n\tcenterAndScale,\n\tgetMeshBounds,\n\tgetMeshBoundsPoints,\n\tgetMeshMaterials,\n\tisMesh\n} from '../stage/stageSceneUtils.js';\nimport { SpatialElementAssetManager, type SpatialElementAssetInstance } from './assets/SpatialElementAssetManager.js';\nimport { getSpatialElementEntityKey } from './spatialElementAssets.js';\nimport { applyCatalogMaterialOpacity, captureCatalogMaterialOpacity } from './catalogPresentation.js';\nimport { CATALOG_POSE_CHANGED, type CatalogPoseProvider } from './catalogPose.js';\nimport { getProjectiveCssMatrix3d, type CssProjectionQuad } from '../stage/cssProjection.js';\nimport { CarouselGlassCompositor } from './CarouselGlassCompositor.js';\nimport { CarouselGround } from './CarouselGround.js';\nimport { CarouselSectionSurfaces } from './CarouselSectionSurfaces.js';\nimport { carouselProximity } from './carouselProximity.js';\nimport { carouselSupport } from './carouselSupport.js';\nimport type { CatalogWarmOutputContext } from './CatalogWarmOutputContext.js';\n\ninterface Rect {\n\tleft: number;\n\ttop: number;\n\twidth: number;\n\theight: number;\n}\n\ninterface CatalogActor {\n\tkey: string;\n\tbrandId: string;\n\tspatialElementId: string;\n\toccurrence?: string;\n\tpose?: CatalogPoseProvider;\n\tclip?: Rect;\n\tband?: 'front' | 'rear';\n\tstage: SpatialElementScene;\n\tinstance: SpatialElementAssetInstance;\n\tmodel: THREE.Group;\n\t/** Canonical import frame; interaction transforms live on ancestors, never in this descriptor. */\n\tdetailFrame: THREE.Matrix4;\n\tdetailBounds: THREE.Box3;\n\t/** Actual included Low bounds, before catalog placement; declared pair bounds can be larger. */\n\tdetailLowBounds: THREE.Box3;\n\tdetailLowBoundsPoints: THREE.Vector3[];\n\troot: THREE.Group;\n\ttilt: THREE.Group;\n\tview: THREE.Group;\n\tviewOrientation: THREE.Quaternion;\n\tradius: number;\n\thitCorners: THREE.Vector3[];\n\tfitCorners: THREE.Vector3[];\n\tsupportPoints: THREE.Vector3[];\n\tcardScale: number;\n\thover: number;\n\tblur?: number;\n\trenderRect?: BlurRect;\n\treferencePoint: THREE.Vector3;\n\toverrides: Set<THREE.Material>;\n\tmaterials: ReturnType<typeof captureCatalogMaterialOpacity>;\n\tcard?: HTMLElement;\n\tslot?: HTMLElement;\n\tcardRect?: Rect;\n\tslotRect?: Rect;\n\t/** Measured section surface; translated with scroll without per-frame DOM reads. */\n\tsectionRect?: Rect;\n\thitTarget?: HTMLElement;\n\tsummaryPanel?: HTMLElement;\n\tsummarySize?: { width: number; height: number };\n\tsummaryOrigin?: { x: number; y: number };\n\tscrollX: number;\n\tscrollY: number;\n\trotationX: number;\n\trotationY: number;\n\tdeviceYaw: number;\n\tdevicePitch: number;\n\tdeviceRoll: number;\n\tlift: number;\n\trendered: boolean;\n}\n\ninterface Handoff {\n\tsourceEnvironmentIntensity: number;\n\tsourceEnvironment: THREE.Texture | null;\n\thigh?: THREE.Object3D;\n\tblend?: SpatialElementRefinement;\n\tblendProgress?: number;\n\thighEnvironment?: THREE.Texture;\n\tactor: CatalogActor;\n\tsourceClip: THREE.Matrix4;\n\tsourceModel: THREE.Matrix4;\n\tsourceCamera: THREE.Matrix4;\n\ttarget?: {\n\t\tcamera: THREE.PerspectiveCamera;\n\t\tmodel: THREE.Object3D;\n\t\tprogress: number;\n\t\tenvironmentIntensity?: number;\n\t};\n}\n\n/** Removes irrelevant homogeneous scale so the reference point follows a continuous screen path. */\nexport function normalizeSpatialElementClipMatrix(matrix: THREE.Matrix4, point: THREE.Vector3) {\n\tconst clip = new THREE.Vector4(point.x, point.y, point.z, 1).applyMatrix4(matrix);\n\tif (clip.w > 0.000001) matrix.multiplyScalar(1 / clip.w);\n\treturn matrix;\n}\n\n/** Factor camera-relative rotation out of clip space before interpolating framing.\n * Interpolating complete MVP matrices collapses opposite rotations into a flat image.\n * Residual matrices retain authored shear and exact endpoint projections.\n */\nexport function getSpatialElementHandoffProjection(\n\tsourceClip: THREE.Matrix4,\n\ttargetClip: THREE.Matrix4,\n\tprogress: number,\n\tmodelWorld: THREE.Matrix4,\n\tcameraWorld: THREE.Matrix4,\n\tposes: {\n\t\tsourceModel: THREE.Matrix4;\n\t\tsourceCamera: THREE.Matrix4;\n\t\ttargetModel: THREE.Matrix4;\n\t\ttargetCamera: THREE.Matrix4;\n\t\treference?: THREE.Vector3;\n\t},\n\ttarget = new THREE.Matrix4()\n) {\n\tconst t = THREE.MathUtils.clamp(progress, 0, 1);\n\tconst rotation = (model: THREE.Matrix4, camera: THREE.Matrix4) => {\n\t\tconst q = new THREE.Quaternion();\n\t\tcamera.clone().invert().multiply(model).decompose(new THREE.Vector3(), q, new THREE.Vector3());\n\t\treturn q.normalize();\n\t};\n\tconst from = rotation(poses.sourceModel, poses.sourceCamera);\n\tconst to = rotation(poses.targetModel, poses.targetCamera);\n\tconst a = sourceClip\n\t\t.clone()\n\t\t.multiply(new THREE.Matrix4().makeRotationFromQuaternion(from.clone().invert()));\n\tconst b = targetClip\n\t\t.clone()\n\t\t.multiply(new THREE.Matrix4().makeRotationFromQuaternion(to.clone().invert()));\n\tfor (let i = 0; i < 16; i++)\n\t\ttarget.elements[i] = THREE.MathUtils.lerp(a.elements[i], b.elements[i], t);\n\ttarget.multiply(new THREE.Matrix4().makeRotationFromQuaternion(from.slerp(to, t)));\n\t// Keep the framing anchor on its screen path even for an off-centre asset pivot.\n\tconst point = poses.reference ?? new THREE.Vector3();\n\tconst project = (matrix: THREE.Matrix4) =>\n\t\tnew THREE.Vector4(point.x, point.y, point.z, 1).applyMatrix4(matrix);\n\tconst start = project(sourceClip),\n\t\tend = project(targetClip),\n\t\tcurrent = project(target);\n\tconst dx = THREE.MathUtils.lerp(start.x / start.w, end.x / end.w, t) - current.x / current.w;\n\tconst dy = THREE.MathUtils.lerp(start.y / start.w, end.y / end.w, t) - current.y / current.w;\n\ttarget.premultiply(new THREE.Matrix4().makeTranslation(dx, dy, 0));\n\treturn target.multiply(modelWorld.clone().invert()).multiply(cameraWorld);\n}\n\n/** Lightweight catalog geometry sharing the stage's renderer and foreground canvas. */\nexport class CatalogSpatialElementLayer {\n\tgetRenderTargets() {\n\t\treturn [\n\t\t\t...this.outline.getRenderTargets(),\n\t\t\t...this.depthBlur.getRenderTargets(),\n\t\t\t...this.glass.getRenderTargets(),\n\t\t\t...this.ground.getRenderTargets(),\n\t\t\t...this.geometryFade.getRenderTargets(),\n\t\t\t...(this.handoff?.blend?.getRenderTargets() ?? [])\n\t\t];\n\t}\n\tprivate readonly scene = new THREE.Scene();\n\tprivate passes = 0;\n\tgetRenderActivity() {\n\t\treturn { camera: this.carouselDeviceCamera.getRenderActivity(), pointer: { ...this.pointer },\n\t\t\tlayoutDirty: this.layoutDirty, queueDirty: this.queueDirty, loadingActors: this.loadingKeys.size,\n\t\t\tpreparing: this.stagedPreparing, warmups: this.stagedWarmups,\n\t\t\tselected: this.carouselSelection?.spatialElementId ?? null,\n\t\t\tactors: [...this.actors.values()].map(actor => ({ spatialElementId: actor.spatialElementId,\n\t\t\t\tvisible: actor.root.visible, hover: actor.hover, rotationX: actor.rotationX, rotationY: actor.rotationY,\n\t\t\t\tlift: actor.lift, deviceYaw: actor.deviceYaw, devicePitch: actor.devicePitch, deviceRoll: actor.deviceRoll,\n\t\t\t\tmaterialReady: this.stagedMaterialReady(actor) })) };\n\t}\n\tgetStats(renderer?: THREE.WebGPURenderer, warmOutput?: CatalogWarmOutputContext) {\n\t\tconst signature = renderer && (!warmOutput || warmOutput.isCurrent(renderer)) ? this.stagedSignature(renderer, warmOutput) : undefined;\n\t\tconst stagedReady = (actor: CatalogActor) => Boolean(!this.stagedReadinessBlocked && signature &&\n\t\t\tactor.rendered && actor.root.visible && this.desired.has(actor.key) && this.stagedMaterialReady(actor) &&\n\t\t\tthis.stagedPrepared.get(actor) === signature);\n\t\treturn {\n\t\t\tinstances: this.actors.size,\n\t\t\tdeviceCamera: { pitch: this.carouselDeviceCamera.angles.x, yaw: this.carouselDeviceCamera.angles.y, roll: this.carouselDeviceCamera.angles.z },\n\t\t\tdetachedInstances: this.detachedInstances,\n\t\t\tvisible: [...this.actors.values()].filter((actor) => actor.root.visible).length,\n\t\t\tpasses: this.passes,\n\t\t\tstagedPreparation: { preparing: this.stagedPreparing,\n\t\t\t\treadyActors: [...this.actors.values()].filter(stagedReady).length,\n\t\t\t\trevision: this.stagedWarmRevision, warmups: this.stagedWarmups, failures: this.stagedWarmFailures,\n\t\t\t\tsourceFrozen: this.stagedSourceFrozen },\n\t\t\tglass: this.glass.getStats(),\n\t\t\tground: this.ground.getStats(),\n\t\t\tdepthBlur: this.depthBlur.getStats(),\n\t\t\toutline: this.outline.getStats(),\n\t\t\tactors: [...this.actors.values()].map((actor) => ({\n\t\t\t\tspatialElementId: actor.spatialElementId,\n\t\t\t\tstagedReady: stagedReady(actor),\n\t\t\t\tprojectedCenter: actor.view.getWorldPosition(new THREE.Vector3()).project(actor.pose ? this.carouselCamera : this.camera).toArray(),\n\t\t\t\tband: actor.band,\n\t\t\t\tclip: actor.clip ? { ...actor.clip } : undefined,\n\t\t\t\topacity: this.exitOpacity * (actor.materials[0]?.material.opacity ?? 0),\n\t\t\t\tmaterialOpacity: actor.materials[0]?.material.opacity ?? 0,\n\t\t\t\tdepthWrite: actor.materials[0]?.material.depthWrite,\n\t\t\t\tmodelScale: actor.view.scale.x, modelDepth: actor.view.position.z,\n\t\t\t\tblur: actor.blur ?? 0,\n\t\t\t\thover: actor.hover,\n\t\t\t\tproximityTilt: { x: actor.rotationX, y: actor.rotationY },\n\t\t\t\tdeviceTilt: { yaw: actor.deviceYaw, pitch: actor.devicePitch, roll: actor.deviceRoll }\n\t\t\t}))\n\t\t};\n\t}\n\tprivate readonly depthBlur = new CatalogDepthBlur();\n\tprivate readonly outline = new CatalogModelOutline();\n\tprivate readonly sectionSurfaces = new CarouselSectionSurfaces();\n\tprivate readonly glass = new CarouselGlassCompositor(this.depthBlur);\n\tprivate readonly ground = new CarouselGround();\n\tprivate readonly geometryFade = new CatalogGeometryFade();\n\tprivate readonly handoffScene = new THREE.Scene();\n\tprivate readonly camera = new THREE.PerspectiveCamera(45, 1, 1, 4000);\n\t// The carousel sits ~2500 units from the lens. A near plane of 1 wastes depth\n\t// precision and makes closely spaced CAD surfaces fight after the longer-lens change.\n\tprivate readonly carouselCamera = new THREE.PerspectiveCamera(45, 1, 250, 6000);\n\tprivate readonly carouselUiCamera = new THREE.PerspectiveCamera();\n\tprivate readonly carouselDeviceCamera = new CarouselDeviceCamera();\n\tprivate carouselSelection?: CatalogActor;\n\n\tprivate readonly handoffCamera = new THREE.PerspectiveCamera();\n\tprivate readonly actors = new Map<string, CatalogActor>();\n\tprivate readonly requests = new Set<AbortController>();\n\tprivate readonly desired = new Set<string>();\n\tprivate readonly spatialElements = new Map<string, { brandId: string; spatialElement: SpatialListItem }>();\n\tprivate readonly loadingKeys = new Set<string>();\n\tprivate readonly failedKeys = new Set<string>();\n\tprivate readonly motion = window.matchMedia('(prefers-reduced-motion: reduce)');\n\tprivate readonly unsubscribeDeviceYaw: () => void;\n\tprivate readonly pointer = { x: 0, y: 0, active: false, pressed: false };\n\tprivate readonly focusVisible = new WeakMap<HTMLElement, boolean>();\n\tprivate activationFocusFrame = 0;\n\tprivate activationFocusRequest?: object;\n\tprivate handoff?: Handoff;\n\tprivate stagedPanel?: { card: HTMLElement; matrix: THREE.Matrix4 };\n\tprivate stagedPanelOpacity = 1;\n\tprivate stagedSourceFrozen = false;\n\tprivate stagedSourceCapture?: { front: object; rear: object; signature?: string };\n\tprivate groundPoseSettled = false;\n\tprivate stagedPreparing = false;\n\tprivate stagedReadinessBlocked = false;\n\tprivate stagedWarmRevision = 0;\n\tprivate stagedWarmups = 0;\n\tprivate stagedWarmFailures = 0;\n\tprivate readonly stagedPrepared = new WeakMap<CatalogActor, string>();\n\tprivate readonly stagedWarmFailed = new WeakMap<CatalogActor, string>();\n\tprivate handoffPoint?: { x: number; y: number };\n\tprivate generation = 0;\n\tprivate disposed = false;\n\tprivate layoutDirty = true;\n\tprivate layoutObserver = new ResizeObserver(() => this.resize());\n\tprivate queueDirty = true;\n\tprivate lastScrollX = Number.NaN;\n\tprivate lastScrollY = Number.NaN;\n\tprivate lastTime = 0;\n\tprivate exitOpacity = 1;\n\tprivate transitionActive = false;\n\tprivate destinationSpatialElement?: string;\n\tprivate destinationOccurrences = new Set<string>();\n\tprivate detachedInstances = 0;\n\tprivate readonly pointerMove = (event: PointerEvent) => {\n\t\tif (event.pointerType !== 'mouse') {\n\t\t\tthis.pointerLeave();\n\t\t\treturn;\n\t\t}\n\t\tif (this.pointer.active && this.pointer.x === event.clientX && this.pointer.y === event.clientY)\n\t\t\treturn;\n\t\tthis.pointer.x = event.clientX;\n\t\tthis.pointer.y = event.clientY;\n\t\tthis.pointer.active = true;\n\t\tthis.invalidate();\n\t};\n\tprivate readonly pointerDown = (event: PointerEvent) => {\n\t\tif (event.pointerType !== 'mouse') this.pointerLeave();\n\t\tif (this.pointer.pressed) return;\n\t\tthis.pointer.pressed = true;\n\t\tthis.invalidate();\n\t};\n\tprivate readonly pointerUp = () => {\n\t\tif (!this.pointer.pressed) return;\n\t\tthis.pointer.pressed = false;\n\t\tthis.invalidate();\n\t};\n\tprivate readonly pointerLeave = () => {\n\t\tif (!this.pointer.active) return;\n\t\tthis.pointer.active = false;\n\t\tthis.pointer.pressed = false;\n\t\tthis.invalidate();\n\t};\n\tprivate readonly resize = () => {\n\t\tthis.stagedSourceCapture = undefined;\n\t\tthis.stagedWarmRevision++;\n\t\tthis.layoutDirty = true;\n\t\tthis.queueDirty = true;\n\t\tthis.invalidate();\n\t};\n\tprivate readFocusVisible(target?: HTMLElement) {\n\t\tif (!target) return false;\n\t\tconst visible = target.matches?.(':focus-visible') ?? false;\n\t\tthis.focusVisible.set(target, visible);\n\t\treturn visible;\n\t}\n\tprivate cancelActivationFocusRequest() {\n\t\tif (this.activationFocusFrame) cancelAnimationFrame(this.activationFocusFrame);\n\t\tthis.activationFocusFrame = 0;\n\t\tthis.activationFocusRequest = undefined;\n\t}\n\tprivate deferActivationFocusRequest() {\n\t\tif (this.activationFocusRequest) return;\n\t\tconst request = this.activationFocusRequest = {};\n\t\tthis.activationFocusFrame = requestAnimationFrame(() => {\n\t\t\tif (this.activationFocusRequest !== request) return;\n\t\t\tthis.activationFocusRequest = undefined;\n\t\t\tthis.activationFocusFrame = 0;\n\t\t\tif (!this.disposed && !this.transitionActive) this.invalidate();\n\t\t});\n\t}\n\tprivate readonly focusChange = (event: FocusEvent) => {\n\t\tconst actor = [...this.actors.values()].find(actor =>\n\t\t\t(actor.pose ? actor.hitTarget : actor.card) === event.target);\n\t\tconst target = actor && (actor.pose ? actor.hitTarget : actor.card);\n\t\tif (!actor || !target) return;\n\t\t// focusout has already lost :focus-visible. Remember the state actually\n\t\t// consumed by the last frame (or preceding focusin), including autofocus.\n\t\tconst before = this.focusVisible.get(target) ?? false;\n\t\tconst after = event.type === 'focusin' && (target.matches?.(':focus-visible') ?? false);\n\t\tthis.focusVisible.set(target, after);\n\t\tif (before === after || this.transitionActive || (actor.pose && this.pointer.pressed)) return;\n\t\t// A carousel pointer outline already has the same target value of one.\n\t\t// Keep keyboard and genuine hover changes synchronous, without a timer.\n\t\tif (actor.pose && this.pointer.active && target.hasAttribute('data-mouse-hover')) return;\n\t\t// This is only our own programmatic link focus, never Tab/hover/press work.\n\t\t// Let Kit's first repaint opportunity stay light; an accepted transition can\n\t\t// consume the focus in its first frame. Otherwise request the ordinary next\n\t\t// Stage frame, even when the click was vetoed or no router is installed.\n\t\tif (isCatalogActivationFocus(event) && actor.pose?.read().front) {\n\t\t\tthis.deferActivationFocusRequest();\n\t\t\treturn;\n\t\t}\n\t\tthis.invalidate();\n\t};\n\tprivate readonly motionChange = () => this.invalidate();\n\tsetPageBackground(value: string) {\n\t\tthis.stagedSourceCapture = undefined;\n\t\t(this.scene.fog as THREE.Fog).color.set(value);\n\n\t\tthis.invalidate();\n\t}\n\n\tconstructor(\n\t\tprivate readonly assets: SpatialElementAssetManager,\n\t\tprivate readonly invalidate: () => void,\n\t\tprivate readonly interactionTheme: () => StageInteractionTheme = () => DEFAULT_INTERACTION_THEME\n\t) {\n\t\tthis.unsubscribeDeviceYaw = subscribeListDeviceYaw(() => {\n\t\t\tif (!this.transitionActive && [...this.actors.values()].some(actor =>\n\t\t\t\tactor.root.visible && actor.card?.closest('[data-device-orientation]')))\n\t\t\t\tthis.invalidate();\n\t\t});\n\t\tthis.scene.environmentIntensity = 0.5;\n\t\tthis.scene.fog = new THREE.Fog(0xffffff, 1200, 2500);\n\t\tthis.handoffScene.fog = this.scene.fog;\n\t\tthis.handoffScene.environmentIntensity = 0.5;\n\t\tthis.carouselCamera.position.z = 2500;\n\t\tthis.carouselCamera.updateMatrixWorld();\n\t\tthis.camera.position.z = 1000;\n\t\tthis.camera.updateMatrixWorld();\n\t\twindow.addEventListener('pointermove', this.pointerMove, { passive: true });\n\t\twindow.addEventListener('pointerdown', this.pointerDown, { capture: true, passive: true });\n\t\twindow.addEventListener('pointerup', this.pointerUp, { passive: true });\n\t\twindow.addEventListener('pointercancel', this.pointerUp, { passive: true });\n\t\twindow.addEventListener('focusin', this.focusChange);\n\t\twindow.addEventListener('focusout', this.focusChange);\n\t\twindow.addEventListener('pointerleave', this.pointerLeave);\n\t\twindow.addEventListener('blur', this.pointerLeave);\n\t\twindow.addEventListener('resize', this.resize);\n\t\tthis.motion.addEventListener('change', this.motionChange);\n\t\twindow.addEventListener(CATALOG_POSE_CHANGED, this.motionChange);\n\t}\n\n\tasync setSpatialElements(brandId: string, spatialElements: SpatialListItem[]) {\n\t\tif (this.disposed) return;\n\t\tthis.stagedSourceCapture = undefined;\n\t\tthis.cancelActivationFocusRequest();\n\t\tconst generation = ++this.generation;\n\t\tthis.layoutObserver.disconnect();\n\t\tconst page = document.querySelector('[data-catalog-list]');\n\t\tif (page) {\n\t\t\tthis.layoutObserver.observe(page);\n\t\t\tfor (const section of page.querySelectorAll('section, section > .ps-section-surface')) this.layoutObserver.observe(section);\n\t\t}\n\t\tfor (const request of this.requests) request.abort();\n\t\tthis.requests.clear();\n\t\tthis.loadingKeys.clear();\n\t\tthis.failedKeys.clear();\n\t\tthis.desired.clear();\n\t\tthis.spatialElements.clear();\n\t\tfor (const spatialElement of spatialElements) {\n\t\t\tif (!hasSpatialElementScene(spatialElement)) continue;\n\t\t\tconst key = JSON.stringify([\n\t\t\t\tgetSpatialElementEntityKey(brandId, spatialElement.id),\n\t\t\t\tspatialElement.occurrence ?? null\n\t\t\t]);\n\t\t\tthis.desired.add(key);\n\t\t\tthis.spatialElements.set(key, { brandId, spatialElement });\n\t\t}\n\t\tfor (const actor of this.actors.values()) {\n\t\t\tconst nextElement = this.spatialElements.get(actor.key)?.spatialElement;\n\t\t\tactor.pose = nextElement?.pose ?? actor.pose;\n\t\t\tif (this.handoff && actor.rendered) continue;\n\t\t\tif (\n\t\t\t\tthis.handoff?.actor !== actor &&\n\t\t\t\t(!this.desired.has(actor.key) ||\n\t\t\t\t\tJSON.stringify(actor.stage) !==\n\t\t\t\t\t\tJSON.stringify(nextElement && hasSpatialElementScene(nextElement) ? getSpatialElementScene(nextElement) : undefined))\n\t\t\t)\n\t\t\t\tthis.disposeActor(actor);\n\t\t}\n\t\tthis.layoutDirty = true;\n\t\tthis.queueDirty = false;\n\t\tawait this.loadVisibleSpatialElements(generation);\n\t\tthis.invalidate();\n\t}\n\n\tprivate async loadVisibleSpatialElements(generation: number) {\n\t\tif (this.disposed || generation !== this.generation) return;\n\t\tconst remaining = Math.min(\n\t\t\t2 - this.requests.size,\n\t\t\t16 - this.actors.size - this.detachedInstances - this.requests.size\n\t\t);\n\t\tif (remaining <= 0) return;\n\t\tconst candidates = [...this.spatialElements.entries()]\n\t\t\t.filter(([key, { brandId, spatialElement }]) => {\n\t\t\t\tif (this.actors.has(key) || this.loadingKeys.has(key) || this.failedKeys.has(key))\n\t\t\t\t\treturn false;\n\t\t\t\tconst list = document.querySelector<HTMLElement>(\n\t\t\t\t\t`[data-catalog-list][data-brand-id=\"${CSS.escape(brandId)}\"]`\n\t\t\t\t);\n\t\t\t\tconst slot = list?.querySelector<HTMLElement>(\n\t\t\t\t\t`[data-catalog-geometry][data-spatial-element-id=\"${CSS.escape(spatialElement.id)}\"]${spatialElement.occurrence ? `[data-catalog-occurrence=\"${CSS.escape(spatialElement.occurrence)}\"]` : ''}`\n\t\t\t\t);\n\t\t\t\tconst rect = slot?.getBoundingClientRect();\n\t\t\t\tconst margin = spatialElement.pose ? 700 : 300;\n\t\t\t\treturn (\n\t\t\t\t\trect &&\n\t\t\t\t\trect.top < window.innerHeight + margin &&\n\t\t\t\t\trect.bottom > -margin &&\n\t\t\t\t\trect.left < window.innerWidth &&\n\t\t\t\t\trect.right > 0\n\t\t\t\t);\n\t\t\t})\n\t\t\t.slice(0, remaining);\n\t\tif (!candidates.length) return;\n\t\tawait Promise.all(\n\t\t\tcandidates.map(async ([key, { brandId, spatialElement }]) => {\n\t\t\t\tif (!hasSpatialElementScene(spatialElement)) return;\n\t\t\t\tconst request = new AbortController();\n\t\t\t\tthis.requests.add(request);\n\t\t\t\tthis.loadingKeys.add(key);\n\t\t\t\tconst lease = this.assets.acquire(\n\t\t\t\t\tgetSpatialElementScene(spatialElement).lodPair!.low,\n\t\t\t\t\t{ signal: request.signal }\n\t\t\t\t);\n\t\t\t\tlet instance: SpatialElementAssetInstance | undefined;\n\t\t\t\ttry {\n\t\t\t\t\tinstance = await lease.createInstance();\n\t\t\t\t\tif (this.disposed || generation !== this.generation) {\n\t\t\t\t\t\tinstance.dispose();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst actor = this.createActor(key, brandId, spatialElement.id, getSpatialElementScene(spatialElement), instance);\n\t\t\t\t\tactor.occurrence = spatialElement.occurrence;\n\t\t\t\t\tactor.pose = spatialElement.pose;\n\t\t\t\t\tthis.stagedSourceCapture = undefined;\n\t\t\t\t\tthis.actors.set(key, actor);\n\t\t\t\t\tthis.scene.add(actor.root);\n\t\t\t\t\tthis.layoutDirty = true;\n\t\t\t\t\tthis.invalidate();\n\t\t\t\t} catch (error) {\n\t\t\t\t\tinstance?.dispose();\n\t\t\t\t\tif (!(error instanceof DOMException && error.name === 'AbortError')) {\n\t\t\t\t\t\tif (generation === this.generation) this.failedKeys.add(key);\n\t\t\t\t\t\tconsole.warn(`Catalog preview unavailable for ${spatialElement.id}`, error);\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tlease.release();\n\t\t\t\t\tthis.requests.delete(request);\n\t\t\t\t\tif (generation === this.generation) this.loadingKeys.delete(key);\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t\tawait this.loadVisibleSpatialElements(generation);\n\t}\n\n\tupdate(renderer: THREE.WebGPURenderer, environment: THREE.Texture | null, now: number) {\n\t\tif (this.disposed) return false;\n\t\tconst width = Math.max(window.innerWidth, 1);\n\t\tconst height = Math.max(window.innerHeight, 1);\n\t\tthis.camera.coordinateSystem = renderer.coordinateSystem;\n\t\tthis.camera.aspect = width / height;\n\t\tthis.camera.fov = THREE.MathUtils.radToDeg(2 * Math.atan(height / 2000));\n\t\tthis.camera.updateProjectionMatrix();\n\t\tthis.carouselCamera.coordinateSystem = renderer.coordinateSystem;\n\t\tthis.carouselCamera.aspect = width / height;\n\t\tthis.carouselCamera.fov = THREE.MathUtils.radToDeg(2 * Math.atan(height / 5000));\n\t\tthis.carouselCamera.updateProjectionMatrix();\n\t\tthis.carouselUiCamera.copy(this.carouselCamera);\n\t\tthis.carouselUiCamera.position.set(0, 0, 2500);\n\t\tthis.carouselUiCamera.quaternion.identity();\n\t\tthis.carouselUiCamera.updateMatrixWorld(true);\n\t\tthis.scene.environment = environment;\n\t\tthis.handoffScene.environment = this.handoff?.sourceEnvironment ?? environment;\n\t\tconst scroll = getStageVisualScrollPosition();\n\t\tif (scroll.scrollX !== this.lastScrollX || scroll.scrollY !== this.lastScrollY) {\n\t\t\tthis.lastScrollX = scroll.scrollX;\n\t\t\tthis.lastScrollY = scroll.scrollY;\n\t\t\tthis.queueDirty = true;\n\t\t}\n\t\tif (this.layoutDirty) this.measureActors(scroll.scrollX, scroll.scrollY);\n\t\tthis.sectionSurfaces.update(scroll.scrollX, scroll.scrollY, this.exitOpacity);\n\t\tconst delta = Math.min(this.lastTime ? (now - this.lastTime) / 1000 : 1 / 60, 0.05);\n\t\tthis.lastTime = now;\n\t\tlet animating = false;\n\t\tconst projectCarousels: (() => void)[] = [];\n\t\tlet selected: CatalogActor | undefined;\n\t\tif (this.stagedPanel) this.glass.retainFrame(this.stagedPanel.card, this.stagedPanel.matrix, this.exitOpacity, this.stagedPanelOpacity);\n\t\telse this.glass.beginFrame();\n\t\tif (!this.handoff) this.ground.beginFrame();\n\n\t\tfor (const actor of this.actors.values()) {\n\t\t\tif (this.handoff?.actor === actor) continue;\n\t\t\tif (this.handoff || this.stagedSourceFrozen) {\n\t\t\t\t// The outgoing DOM has been snapshotted. Keep these already-rendered\n\t\t\t\t// spatialElements at their captured screen pose until the shared fade completes.\n\t\t\t\tactor.root.visible = actor.rendered && actor.root.visible && this.exitOpacity > 0.001;\n\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!actor.card?.isConnected || !actor.slot?.isConnected) {\n\t\t\t\tactor.root.visible = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst card = actor.cardRect;\n\t\t\tconst slot = actor.slotRect;\n\t\t\tif (!card || !slot) continue;\n\t\t\tconst dx = actor.scrollX - scroll.scrollX;\n\t\t\tconst dy = actor.scrollY - scroll.scrollY;\n\t\t\tif (slot.top + dy > height + 700 || slot.top + dy + slot.height < -700) {\n\t\t\t\tthis.disposeActor(actor);\n\t\t\t\tthis.queueDirty = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Free-standing carousel geometry may still be on screen after its\n\t\t\t// semantic section has left it. Keep the same margin as asset residency.\n\t\t\tconst margin = actor.pose ? 700 : 96;\n\t\t\tactor.root.visible =\n\t\t\t\tthis.exitOpacity > 0.001 &&\n\t\t\t\tslot.top + dy < height + margin &&\n\t\t\t\tslot.top + dy + slot.height > -margin &&\n\t\t\t\tslot.left + dx < width &&\n\t\t\t\tslot.left + dx + slot.width > 0;\n\t\t\tif (!actor.root.visible) continue;\n\n\t\t\tif (actor.pose) {\n\t\t\t\tactor.view.quaternion.copy(actor.viewOrientation);\n\t\t\t\tconst pose = actor.pose.read();\n\t\t\t\tconst approach = this.pointer.active && !this.pointer.pressed && !this.transitionActive &&\n\t\t\t\t\t!this.motion.matches && actor.renderRect && pose.visible\n\t\t\t\t\t? carouselProximity(this.pointer.x, this.pointer.y, actor.renderRect) : { x: 0, y: 0 };\n\t\t\t\tfor (const [property, target] of [['rotationX', approach.x], ['rotationY', approach.y]] as const) {\n\t\t\t\t\tactor[property] = this.motion.matches ? 0 : THREE.MathUtils.damp(actor[property], target, 12, delta);\n\t\t\t\t\tif (Math.abs(actor[property] - target) < 0.0001) actor[property] = target;\n\t\t\t\t\tanimating ||= actor[property] !== target;\n\t\t\t\t}\n\t\t\t\t// Add the remaining sensor response only to the focus model. The camera keeps 25%.\n\t\t\t\tconst sensorEnabled = pose.front && !this.motion.matches && !this.transitionActive &&\n\t\t\t\t\tactor.card.closest('[data-device-orientation]');\n\t\t\t\tfor (const [property, target] of [\n\t\t\t\t\t['deviceYaw', sensorEnabled ? -getListDeviceYaw() * 0.75 : 0],\n\t\t\t\t\t['devicePitch', sensorEnabled ? -getListDevicePitch() * 0.75 : 0],\n\t\t\t\t\t['deviceRoll', sensorEnabled ? -getListDeviceRoll() * 0.75 : 0]\n\t\t\t\t] as const) {\n\t\t\t\t\tif (!this.motion.matches && isDeviceOrientationPaused()) continue;\n\t\t\t\t\tactor[property] = this.motion.matches ? 0 : THREE.MathUtils.damp(actor[property], target, 40, delta);\n\t\t\t\t\tif (Math.abs(actor[property] - target) < 0.01) actor[property] = target;\n\t\t\t\t\tanimating ||= actor[property] !== target;\n\t\t\t\t}\n\t\t\t\tconst hoverTarget = !this.transitionActive && !this.pointer.pressed &&\n\t\t\t\t\t((this.pointer.active && actor.hitTarget?.hasAttribute('data-mouse-hover')) ||\n\t\t\t\t\t\tthis.readFocusVisible(actor.hitTarget)) ? 1 : 0;\n\t\t\t\tactor.hover = this.motion.matches ? hoverTarget : THREE.MathUtils.damp(actor.hover, hoverTarget, 18, delta);\n\t\t\t\tif (Math.abs(actor.hover - hoverTarget) < 0.01) actor.hover = hoverTarget;\n\t\t\t\tanimating ||= actor.hover !== hoverTarget;\n\t\t\t\t// Reuse the outline's settled hover state: inspecting a neighbour brings it\n\t\t\t\t// into focus without changing selection or allocating another render target.\n\t\t\t\tactor.blur = (pose.blur ?? 0) * (1 - actor.hover);\n\t\t\t\tactor.band = pose.front ? 'front' : 'rear';\n\t\t\t\tactor.root.visible &&= pose.visible;\n\t\t\t\tapplyCatalogMaterialOpacity(actor.materials, pose.opacity);\n\t\t\t\tconst framing = pose.framing;\n\t\t\t\tconst compact = framing?.compact ?? width < 840;\n\t\t\t\tconst frame = framing ? Math.min(framing.fit.width, framing.fit.height) : Math.min(slot.width, compact ? 360 : slot.height);\n\t\t\t\t// Every seat shares one scene origin. Depth now determines projected size\n\t\t\t\t// and spacing naturally, including scroll parallax and the foreground advance.\n\t\t\t\tconst anchorX = framing ? framing.fit.x + framing.fit.width / 2 : slot.width * (compact ? 0.5 : 0.31);\n\t\t\t\tconst anchorY = framing ? framing.fit.y + framing.fit.height / 2 : compact ? 180 : slot.height * 0.54;\n\t\t\t\tconst x = slot.left + dx + (pose.orbit ? anchorX : slot.width * (pose.x - (framing || compact ? 0 : 0.19)));\n\t\t\t\tconst y = slot.top + dy + (pose.orbit ? anchorY : slot.height * pose.y);\n\t\t\t\tconst perspective = pose.orbit ? 1 : 1 - pose.depth / 2500;\n\t\t\t\tactor.root.matrix.makeTranslation(\n\t\t\t\t\t(x - width / 2) * perspective + (pose.orbit?.x ?? 0),\n\t\t\t\t\t(height / 2 - y) * perspective + (pose.orbit?.y ?? 0),\n\t\t\t\t\tpose.depth\n\t\t\t\t);\n\t\t\t\tactor.root.matrixWorldNeedsUpdate = true;\n\t\t\t\t// Geometry follows the seat and pointer; panel projection below excludes pointer tilt.\n\t\t\t\tactor.tilt.scale.setScalar(pose.orbit ? 1 : perspective * (pose.size / 0.82));\n\t\t\t\tactor.tilt.rotation.set((pose.orbit?.pitch ?? 0) + actor.rotationX, pose.yaw + actor.rotationY, 0);\n\t\t\t\tactor.tilt.position.set(0, 0, 0);\n\t\t\t\t// Keep compact models in the 360px visual area even as their parent shrinks.\n\t\t\t\t// Scaling the old offset pulled side previews down into the summary panel.\n\t\t\t\tactor.view.position.set(0, compact && !pose.orbit\n\t\t\t\t\t? (slot.height - 360) * pose.y / (pose.size / 0.82)\n\t\t\t\t\t: 0, 0);\n\t\t\t\tactor.view.scale.setScalar(\n\t\t\t\t\t(frame * 0.82) / (actor.radius * 2)\n\t\t\t\t);\n\t\t\t\tlet groundMatrix: THREE.Matrix4 | undefined;\n\t\t\t\tif (pose.orbit && actor.root.visible) {\n\t\t\t\t\tconst floor = frame * 0.32;\n\t\t\t\t\tconst pitch = pose.orbit.pitch;\n\t\t\t\t\t// Stand every model on the same plane, including wide or short assets.\n\t\t\t\t\tactor.tilt.updateMatrix();\n\t\t\t\t\tactor.view.updateMatrix();\n\t\t\t\t\tconst upright = new THREE.Matrix4().makeRotationX(-pitch).multiply(actor.tilt.matrix);\n\t\t\t\t\tconst bottom = Math.min(...actor.supportPoints.map(point =>\n\t\t\t\t\t\tpoint.clone().applyMatrix4(actor.view.matrix).applyMatrix4(upright).y));\n\t\t\t\t\tactor.view.position.y += (-floor - bottom) / upright.elements[5];\n\t\t\t\t\tactor.view.updateMatrix();\n\t\t\t\t\tgroundMatrix = new THREE.Matrix4().makeTranslation(x - width / 2, height / 2 - y, 0)\n\t\t\t\t\t\t.multiply(new THREE.Matrix4().makeRotationX(pitch))\n\t\t\t\t\t\t.multiply(new THREE.Matrix4().makeTranslation(0, -floor, 0));\n\t\t\t\t}\n\t\t\t\t// Apply after floor fitting so the model centre and UI anchors remain fixed.\n\t\t\t\tactor.view.quaternion.setFromEuler(new THREE.Euler(THREE.MathUtils.degToRad(actor.devicePitch), THREE.MathUtils.degToRad(actor.deviceYaw), THREE.MathUtils.degToRad(actor.deviceRoll), 'ZXY'))\n\t\t\t\t\t.multiply(actor.viewOrientation);\n\t\t\t\tactor.root.updateMatrixWorld(true);\n\t\t\t\tactor.clip = actor.sectionRect\n\t\t\t\t\t? { ...actor.sectionRect, left: actor.sectionRect.left + dx, top: actor.sectionRect.top + dy }\n\t\t\t\t\t: { left: 0, top: 0, width, height };\n\t\t\t\tif (groundMatrix) this.ground.shadow(actor, actor.model, groundMatrix, 0.14 * pose.opacity, actor.clip);\n\t\t\t\tif (pose.front && actor.root.visible && (!selected || pose.panelOpacity > (selected.pose?.read().panelOpacity ?? 0))) selected = actor;\n\t\t\t\tprojectCarousels.push(() => {\n\t\t\t\t\tconst hitTarget = actor.hitTarget;\n\t\t\t\t\tif (hitTarget) {\n\t\t\t\t\t\t// Project cached model bounds, not the framing sphere: empty foreground\n\t\t\t\t\t\t// margins must not intercept clicks on visible neighbouring spatialElements.\n\t\t\t\t\t\tlet left = Infinity,\n\t\t\t\t\t\t\ttop = Infinity,\n\t\t\t\t\t\t\tright = -Infinity,\n\t\t\t\t\t\t\tbottom = -Infinity;\n\t\t\t\t\t\tconst point = new THREE.Vector3();\n\t\t\t\t\t\tfor (const corner of actor.hitCorners) {\n\t\t\t\t\t\t\tpoint.copy(corner).applyMatrix4(actor.view.matrixWorld).project(this.carouselCamera);\n\t\t\t\t\t\t\tconst px = ((point.x + 1) * width) / 2 - slot.left - dx;\n\t\t\t\t\t\t\tconst py = ((1 - point.y) * height) / 2 - slot.top - dy;\n\t\t\t\t\t\t\tleft = Math.min(left, px);\n\t\t\t\t\t\t\tright = Math.max(right, px);\n\t\t\t\t\t\t\ttop = Math.min(top, py);\n\t\t\t\t\t\t\tbottom = Math.max(bottom, py);\n\t\t\t\t\t\t}\n\t\t\t\t\t\thitTarget.style.left = `${(left + right) / 2}px`;\n\t\t\t\t\t\thitTarget.style.top = `${(top + bottom) / 2}px`;\n\t\t\t\t\t\thitTarget.style.width = `${right - left}px`;\n\t\t\t\t\t\thitTarget.style.height = `${bottom - top}px`;\n\t\t\t\t\t\thitTarget.style.maxWidth = 'none';\n\t\t\t\t\t\tactor.renderRect = { left: left + slot.left + dx, top: top + slot.top + dy,\n\t\t\t\t\t\t\twidth: right - left, height: bottom - top };\n\t\t\t\t\t}\n\t\t\t\t\tconst panel = actor.summaryPanel;\n\t\t\t\t\tif (panel && actor.summarySize) {\n\t\t\t\t\t\tconst { width: pw, height: ph } = actor.summarySize;\n\t\t\t\t\t\t// The panel follows the seat and its yaw, but not the elevated\n\t\t\t\t\t\t// product view. At rest it is parallel to the screen, also on mobile.\n\t\t\t\t\t\tconst panelFrame = pose.orbit\n\t\t\t\t\t\t\t? actor.root.matrixWorld.clone().multiply(new THREE.Matrix4().makeRotationY(pose.yaw))\n\t\t\t\t\t\t\t: actor.tilt.matrixWorld.clone();\n\t\t\t\t\t\tconst matrix = panelFrame\n\t\t\t\t\t\t\t.multiply(\n\t\t\t\t\t\t\t\tnew THREE.Matrix4().makeTranslation(\n\t\t\t\t\t\t\t\t\tframing ? framing.summary.x + pw / 2 - anchorX : compact ? 0 : slot.width * 0.39,\n\t\t\t\t\t\t\t\t\tframing ? anchorY - (framing.summary.anchorY - (framing.summary.alignment === 'end' ? ph / 2 : 0)) : compact ? (pose.orbit ? 180 : slot.height / 2) - 360 - ph / 2 : 0,\n\t\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\tconst corners = [\n\t\t\t\t\t\t\t[-pw / 2, ph / 2],\n\t\t\t\t\t\t\t[pw / 2, ph / 2],\n\t\t\t\t\t\t\t[pw / 2, -ph / 2],\n\t\t\t\t\t\t\t[-pw / 2, -ph / 2]\n\t\t\t\t\t\t].map(([x, y]) => {\n\t\t\t\t\t\t\tconst point = new THREE.Vector3(x, y, 0)\n\t\t\t\t\t\t\t\t.applyMatrix4(matrix)\n\t\t\t\t\t\t\t\t.project(this.carouselUiCamera);\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tx: ((point.x + 1) * width) / 2 - slot.left - dx,\n\t\t\t\t\t\t\t\ty: ((1 - point.y) * height) / 2 - slot.top - dy\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}) as unknown as CssProjectionQuad;\n\t\t\t\t\t\t// The semantic summary keeps its intrinsic layout slot before and after\n\t\t\t\t\t\t// enhancement. Project relative to that slot instead of moving it to (0, 0).\n\t\t\t\t\t\tconst origin = actor.summaryOrigin ?? { x: 0, y: 0 };\n\t\t\t\t\t\tconst localCorners = corners.map(({ x, y }) => ({\n\t\t\t\t\t\t\tx: x - origin.x, y: y - origin.y\n\t\t\t\t\t\t})) as unknown as CssProjectionQuad;\n\t\t\t\t\t\tpanel.style.transform = getProjectiveCssMatrix3d(localCorners, pw, ph) ?? '';\n\t\t\t\t\t\trecordCarouselPanel(\n\t\t\t\t\t\t\tpanel,\n\t\t\t\t\t\t\tcorners.map((point) => ({\n\t\t\t\t\t\t\t\tx: point.x + slot.left + dx,\n\t\t\t\t\t\t\t\ty: point.y + slot.top + dy\n\t\t\t\t\t\t\t})) as unknown as CssProjectionQuad,\n\t\t\t\t\t\t\tpw,\n\t\t\t\t\t\t\tph\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst hidden =\n\t\t\t\t\t\t\tactor.card!.style.visibility === 'hidden' || panel.style.visibility === 'hidden';\n\t\t\t\t\t\tthis.glass.panel(\n\t\t\t\t\t\t\tactor.card!,\n\t\t\t\t\t\t\tmatrix,\n\t\t\t\t\t\t\tpw,\n\t\t\t\t\t\t\tph,\n\t\t\t\t\t\t\thidden ? 0 : pose.panelOpacity * this.exitOpacity,\n\t\t\t\t\t\t\t(1 - pose.panelOpacity) * 6,\n\t\t\t\t\t\t\tactor.clip\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif (this.isDestinationActor(actor)) actor.root.visible = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tactor.tilt.scale.setScalar(1);\n\t\t\tconst centerX = card.left + dx + card.width / 2;\n\t\t\tconst centerY = card.top + dy + card.height / 2;\n\t\t\tconst px = this.pointer.x - centerX;\n\t\t\tconst py = this.pointer.y - centerY;\n\t\t\tconst distance = Math.hypot(\n\t\t\t\tMath.max(Math.abs(px) - card.width / 2, 0),\n\t\t\t\tMath.max(Math.abs(py) - card.height / 2, 0)\n\t\t\t);\n\t\t\tconst influence =\n\t\t\t\tthis.pointer.active && !this.motion.matches && !this.transitionActive\n\t\t\t\t\t? getPanelPointerInfluence(distance, card.width, card.height)\n\t\t\t\t\t: 0;\n\t\t\tconst rotation = getPanelPointerRotation(\n\t\t\t\tpx / (card.width / 2),\n\t\t\t\tpy / (card.height / 2),\n\t\t\t\tinfluence,\n\t\t\t\tcard.width,\n\t\t\t\tcard.height\n\t\t\t);\n\t\t\t// CSS has a downward Y axis; use the same physical rotation as DETAIL panels.\n\t\t\tconst targets = [\n\t\t\t\t-THREE.MathUtils.radToDeg(rotation.x),\n\t\t\t\tTHREE.MathUtils.radToDeg(rotation.y),\n\t\t\t\t-influence * 8,\n\t\t\t\t!this.motion.matches && !this.transitionActive &&\n\t\t\t\t\t((this.pointer.active && distance === 0) || this.readFocusVisible(actor.card)) ? 1 : 0\n\t\t\t];\n\t\t\tconst previous = [actor.rotationX, actor.rotationY, actor.lift, actor.hover];\n\t\t\tconst values = previous.map((value, index) => {\n\t\t\t\tconst next = this.motion.matches\n\t\t\t\t\t? targets[index]\n\t\t\t\t\t: THREE.MathUtils.damp(value, targets[index], 14, delta);\n\t\t\t\treturn Math.abs(next - targets[index]) < 0.01 ? targets[index] : next;\n\t\t\t});\n\t\t\t[actor.rotationX, actor.rotationY, actor.lift, actor.hover] = values;\n\t\t\tanimating ||= values.some((value, index) => value !== targets[index]);\n\t\t\tactor.card.style.setProperty('--catalog-rotate-x', `${actor.rotationX}deg`);\n\t\t\tactor.card.style.setProperty('--catalog-rotate-y', `${actor.rotationY}deg`);\n\t\t\tactor.card.style.setProperty('--catalog-lift', `${actor.lift}px`);\n\t\t\tsetPanelLocalPerspectiveMatrix(\n\t\t\t\tactor.root.matrix,\n\t\t\t\tcenterX - width / 2,\n\t\t\t\theight / 2 - centerY,\n\t\t\t\t0,\n\t\t\t\t1000\n\t\t\t);\n\t\t\tactor.root.matrixWorldNeedsUpdate = true;\n\t\t\tactor.tilt.rotation.set(\n\t\t\t\t-THREE.MathUtils.degToRad(actor.rotationX),\n\t\t\t\tTHREE.MathUtils.degToRad(actor.rotationY),\n\t\t\t\t0\n\t\t\t);\n\t\t\tactor.tilt.position.y = -actor.lift;\n\t\t\tactor.view.position.set(\n\t\t\t\tslot.left + slot.width / 2 - card.left - card.width / 2,\n\t\t\t\tcard.top + card.height / 2 - slot.top - slot.height / 2,\n\t\t\t\t96 * actor.hover\n\t\t\t);\n\t\t\tactor.view.scale.setScalar(actor.cardScale * (1 + 0.12 * actor.hover));\n\t\t\tconst deviceEnabled = !this.motion.matches && !this.transitionActive &&\n\t\t\t\tactor.card.closest('[data-device-orientation]');\n\t\t\t// Sensor motion remains available on hybrids even with a stationary mouse cursor.\n\t\t\tfor (const [property, target] of [\n\t\t\t\t['deviceYaw', deviceEnabled ? -getListDeviceYaw() : 0],\n\t\t\t\t['devicePitch', deviceEnabled ? -getListDevicePitch() : 0],\n\t\t\t\t['deviceRoll', deviceEnabled ? -getListDeviceRoll() : 0]\n\t\t\t] as const) {\n\t\t\t\tif (!this.motion.matches && isDeviceOrientationPaused()) continue;\n\t\t\t\tactor[property] = this.motion.matches ? 0 : THREE.MathUtils.damp(actor[property], target, 40, delta);\n\t\t\t\tif (Math.abs(actor[property] - target) < 0.01) actor[property] = target;\n\t\t\t\tanimating ||= actor[property] !== target;\n\t\t\t}\n\t\t\t// Rotate around the model's own centre, leaving the panel and copy still.\n\t\t\tactor.view.rotation.set(THREE.MathUtils.degToRad(actor.devicePitch), THREE.MathUtils.degToRad(actor.deviceYaw), THREE.MathUtils.degToRad(actor.deviceRoll), 'ZXY');\n\t\t\tactor.view.quaternion.multiply(actor.viewOrientation);\n\t\t\tif (this.isDestinationActor(actor)) actor.root.visible = false;\n\t\t}\n\t\tif (!this.transitionActive && !this.handoff && !this.stagedSourceFrozen) {\n\t\t\tconst pivot = selected?.view.getWorldPosition(new THREE.Vector3()) ?? new THREE.Vector3();\n\t\t\tconst enabled = selected?.card?.closest('[data-device-orientation]');\n\t\t\tif (this.motion.matches || !isDeviceOrientationPaused()) animating = this.carouselDeviceCamera.update(this.carouselCamera,\n\t\t\t\tenabled ? getListDeviceYaw() : 0, enabled ? getListDevicePitch() : 0,\n\t\t\t\tenabled ? getListDeviceRoll() : 0, delta, this.motion.matches) || animating;\n\t\t\tanimating = this.carouselDeviceCamera.orbit(this.carouselCamera, pivot, delta,\n\t\t\t\t!this.motion.matches && (this.pointer.pressed || this.carouselSelection !== selected)) || animating;\n\t\t\tthis.carouselSelection = selected;\n\t\t}\n\t\tfor (const project of projectCarousels) project();\n\t\tif (this.queueDirty && !this.handoff && !this.stagedSourceFrozen) {\n\t\t\tthis.queueDirty = false;\n\t\t\tvoid this.loadVisibleSpatialElements(this.generation);\n\t\t}\n\t\tthis.glass.endFrame(this.stagedPanel?.card);\n\t\tif (!this.handoff) this.ground.endFrame();\n\t\tthis.groundPoseSettled = !animating;\n\t\treturn animating;\n\t}\n\n\tdraw(renderer: THREE.WebGPURenderer, band: 'rear' | 'front', warmOutput?: CatalogWarmOutputContext) {\n\t\tconst width = window.innerWidth,\n\t\t\theight = window.innerHeight;\n\t\tconst all = [...this.actors.values()].filter(\n\t\t\t(actor) => actor.root.visible && this.handoff?.actor !== actor\n\t\t);\n\t\tif (!all.some((actor) => (actor.band ?? 'front') === band)) {\n\t\t\tif (band === 'front' && this.handoff) this.renderHandoff(renderer);\n\t\t\treturn;\n\t\t}\n\t\tthis.passes++;\n\t\tfor (const actor of all) actor.root.visible = (actor.band ?? 'front') === band;\n\t\tthis.geometryFade.render(renderer, this.exitOpacity, () => {\n\t\t\trenderer.clearDepth();\n\t\t\tconst shown = [...this.actors.values()].filter(\n\t\t\t\t(actor) => actor.root.visible && this.handoff?.actor !== actor\n\t\t\t);\n\t\t\tconst clipped = shown.filter((actor) => actor.clip);\n\t\t\tfor (const actor of clipped) actor.root.visible = false;\n\t\t\tif (shown.length > clipped.length) renderer.render(this.scene, this.camera);\n\t\t\tif (clipped.length) {\n\t\t\t\tconst oldScissor = renderer.getScissor(new THREE.Vector4());\n\t\t\t\tconst oldTest = renderer.getScissorTest();\n\t\t\t\tfor (const actor of shown) actor.root.visible = false;\n\t\t\t\t// One submission per section viewport, with shared depth among its ring spatialElements.\n\t\t\t\tconst groups = new Map<string, CatalogActor[]>();\n\t\t\t\tfor (const actor of clipped) {\n\t\t\t\t\tconst key = JSON.stringify(actor.clip);\n\t\t\t\t\tgroups.set(key, [...(groups.get(key) ?? []), actor]);\n\t\t\t\t}\n\t\t\t\tfor (const group of groups.values()) {\n\t\t\t\t\tconst rect = group[0].clip!;\n\t\t\t\t\tconst left = Math.max(0, rect.left),\n\t\t\t\t\t\ttop = Math.max(0, rect.top);\n\t\t\t\t\tconst right = Math.min(width, rect.left + rect.width),\n\t\t\t\t\t\tbottom = Math.min(height, rect.top + rect.height);\n\t\t\t\t\tif (right <= left || bottom <= top) continue;\n\t\t\t\t\trenderer.setScissor(left, top, right - left, bottom - top);\n\t\t\t\t\trenderer.setScissorTest(true);\n\t\t\t\t\tconst fog = this.scene.fog;\n\t\t\t\t\tthis.scene.fog = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (group.some((actor) => ((actor.blur ?? 0) >= 0.05 || actor.hover > 0) && actor.renderRect)) {\n\t\t\t\t\t\t\t// Resolve far-to-near into the same output; scratch buffers are shared by every seat.\n\t\t\t\t\t\t\tgroup.sort((a, b) => a.root.matrix.elements[14] - b.root.matrix.elements[14]);\n\t\t\t\t\t\t\tfor (const actor of group) {\n\t\t\t\t\t\t\t\tactor.root.visible = true;\n\t\t\t\t\t\t\t\tthis.depthBlur.render(renderer, this.carouselCamera, actor.renderRect ?? rect,\n\t\t\t\t\t\t\t\t\tactor.blur ?? 0, (camera) => renderer.render(this.scene, camera), rect);\n\t\t\t\t\t\t\t\tif (actor.hover > 0 && actor.renderRect)\n\t\t\t\t\t\t\t\t\tthis.outline.render(renderer, this.carouselCamera, actor.model, actor.renderRect, rect,\n\t\t\t\t\t\t\t\t\t\tactor.hover * (actor.materials[0]?.material.opacity ?? 1), this.interactionTheme(), warmOutput);\n\t\t\t\t\t\t\t\tactor.root.visible = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfor (const actor of group) actor.root.visible = true;\n\t\t\t\t\t\t\trenderer.render(this.scene, this.carouselCamera);\n\t\t\t\t\t\t}\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tthis.scene.fog = fog;\n\t\t\t\t\t}\n\t\t\t\t\tfor (const actor of group) actor.root.visible = false;\n\t\t\t\t}\n\t\t\t\trenderer.setScissor(oldScissor);\n\t\t\t\trenderer.setScissorTest(oldTest);\n\t\t\t}\n\t\t\tfor (const actor of shown) actor.root.visible = true;\n\t\t\tfor (const actor of this.actors.values()) {\n\t\t\t\tif (actor.root.visible && this.handoff?.actor !== actor) {\n\t\t\t\t\tactor.rendered = true;\n\t\t\t\t\tactor.card?.setAttribute('data-catalog-model-ready', '');\n\t\t\t\t}\n\t\t\t}\n\t\t}, warmOutput, this.frozenSourceForBand(band, warmOutput));\n\t\tfor (const actor of all) actor.root.visible = true;\n\t\tif (band === 'front' && this.handoff) this.renderHandoff(renderer);\n\t}\n\n\t/** Rear elements are the backdrop source, independent of DETAIL High/HDR ownership. */\n\thasCarousel() {\n\t\treturn [...this.actors.values()].some((actor) => Boolean(actor.pose));\n\t}\n\t/** A retained glass panel outlives its source actors during staged reveal. */\n\thasRearOutput() {\n\t\treturn this.glass.hasActivePanels() || (this.exitOpacity > 0 && this.hasCarousel());\n\t}\n\n\trenderRear(renderer: THREE.WebGPURenderer, warmOutput?: CatalogWarmOutputContext) {\n\t\tthis.glass.render(renderer, this.carouselUiCamera, () => {\n\t\t\t// The full per-shadow signature is valid during normal focus/hover frames too;\n\t\t\t// any changed source/camera pose falls back to live rendering immediately.\n\t\t\tthis.ground.draw(renderer, this.carouselCamera, this.exitOpacity,\n\t\t\t\ttrue, this.stagedSignature(renderer), this.stagedPreparing, warmOutput);\n\t\t\tthis.draw(renderer, 'rear', warmOutput);\n\t\t}, this.exitOpacity === 0);\n\t}\n\n\t/** Warm the existing Low material passes in an offscreen preparation target. */\n\trenderForPreparation(renderer: THREE.WebGPURenderer) {\n\t\tconst visible = [...this.actors.values()].filter(actor => actor.root.visible);\n\t\tthis.geometryFade.render(renderer, 0.5, () => {\n\t\t\tconst fog = this.scene.fog;\n\t\t\ttry {\n\t\t\t\t// Three shares a mesh/material/context owner across cameras. Rendering a\n\t\t\t\t// Carousel mesh with List fog replaces its live no-fog owner and bindings.\n\t\t\t\tfor (const actor of visible) actor.root.visible = !actor.pose;\n\t\t\t\tif (visible.some(actor => !actor.pose)) renderer.render(this.scene, this.camera);\n\t\t\t\tfor (const actor of visible) actor.root.visible = Boolean(actor.pose);\n\t\t\t\tif (visible.some(actor => actor.pose)) {\n\t\t\t\t\tthis.scene.fog = null;\n\t\t\t\t\trenderer.render(this.scene, this.carouselCamera);\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tthis.scene.fog = fog;\n\t\t\t\tfor (const actor of visible) actor.root.visible = true;\n\t\t\t}\n\t\t});\n\t}\n\n\t/** Applies only to outgoing list actors; the shared handoff geometry keeps its authored alpha. */\n\tsetExitOpacity(opacity: number, active = false) {\n\t\tthis.exitOpacity = Number.isFinite(opacity) ? Math.min(1, Math.max(0, opacity)) : 0;\n\t\tthis.transitionActive = active;\n\t\tif (active) this.cancelActivationFocusRequest();\n\t\tthis.invalidate();\n\t}\n\n\tcapture(spatialElementId: string, occurrence?: string) {\n\t\tconst actor = [...this.actors.values()].find(\n\t\t\t(item) =>\n\t\t\t\titem.spatialElementId === spatialElementId &&\n\t\t\t\tthis.desired.has(item.key) &&\n\t\t\t\t(occurrence\n\t\t\t\t\t? item.occurrence === occurrence\n\t\t\t\t\t: !item.occurrence || item.card?.hasAttribute('data-catalog-selected'))\n\t\t);\n\t\tif (!actor?.rendered || !actor.root.visible) return false;\n\t\tthis.stagedSourceCapture = undefined;\n\t\tthis.finishHandoff();\n\t\tthis.handoffPoint = undefined;\n\t\tactor.model.updateWorldMatrix(true, true);\n\t\tconst camera = actor.pose ? this.carouselCamera : this.camera;\n\t\tthis.handoffScene.fog = actor.pose ? null : this.scene.fog;\n\t\tcamera.updateMatrixWorld();\n\t\tconst sourceModel = actor.model.matrixWorld.clone();\n\t\tconst sourceClip = normalizeSpatialElementClipMatrix(\n\t\t\tnew THREE.Matrix4()\n\t\t\t\t.multiplyMatrices(camera.projectionMatrix, camera.matrixWorldInverse)\n\t\t\t\t.multiply(sourceModel),\n\t\t\tactor.referencePoint\n\t\t);\n\t\tthis.handoff = {\n\t\t\tsourceEnvironmentIntensity: this.scene.environmentIntensity,\n\t\t\tsourceEnvironment: this.scene.environment,\n\t\t\tactor,\n\t\t\tsourceClip,\n\t\t\tsourceModel,\n\t\t\tsourceCamera: camera.matrixWorld.clone()\n\t\t};\n\t\tapplyCatalogMaterialOpacity(actor.materials, 1);\n\t\tactor.root.removeFromParent();\n\t\tthis.handoffScene.add(actor.model);\n\t\tactor.model.matrixAutoUpdate = false;\n\t\tactor.model.matrix.copy(sourceModel);\n\t\tthis.invalidate();\n\t\treturn true;\n\t}\n\n\t/** Computes the known detail endpoint from an already prepared Low actor, before any route mounts. */\n\tgetStagedDetailTarget(spatialElementId: string, occurrence: string | undefined, fit: LayoutRect,\n\t\tviewport: { width: number; height: number }, target?: StagedDockTargetOptions,\n\t\tcoordinateSystem: THREE.PerspectiveCamera['coordinateSystem'] = THREE.WebGPUCoordinateSystem) {\n\t\tconst actor = [...this.actors.values()].find(item => item.spatialElementId === spatialElementId &&\n\t\t\tthis.desired.has(item.key) && (occurrence ? item.occurrence === occurrence :\n\t\t\t\t!item.occurrence || item.card?.hasAttribute('data-catalog-selected')));\n\t\tif (!actor?.rendered || !actor.root.visible) return;\n\t\tif (target && resolveDetailLayout(target.layout).dock) {\n\t\t\treturn createStagedDockGeometry({ layout: target.layout, viewport,\n\t\t\t\tlowBounds: actor.detailLowBounds, lowBoundsPoints: actor.detailLowBoundsPoints, modelMatrix: actor.detailFrame,\n\t\t\t\tcenter: actor.detailBounds.getCenter(new THREE.Vector3()),\n\t\t\t\tcamera: actor.stage.camera ?? {}, minimap: target.minimap, coordinateSystem });\n\t\t}\n\t\treturn createStagedDetailGeometry(actor.detailBounds, actor.detailFrame, actor.stage.camera ?? {}, viewport, fit, coordinateSystem);\n\t}\n\n\tprivate stagedSignature(renderer: THREE.WebGPURenderer, warmOutput?: CatalogWarmOutputContext) {\n\t\tconst size = renderer.getDrawingBufferSize(new THREE.Vector2());\n\t\treturn `${this.stagedWarmRevision}:${innerWidth}:${innerHeight}:${size.x}:${size.y}:${renderer.coordinateSystem}:${this.scene.environment?.uuid ?? ''}${warmOutput ? `:${warmOutput.profileKey}` : ''}`;\n\t}\n\tprivate stagedCandidates(renderer: THREE.WebGPURenderer, warmOutput?: CatalogWarmOutputContext) {\n\t\tconst signature = this.stagedSignature(renderer, warmOutput);\n\t\treturn [...this.actors.values()].filter(actor => actor.rendered && actor.root.visible &&\n\t\t\tthis.stagedMaterialReady(actor) &&\n\t\t\tthis.stagedPrepared.get(actor) !== signature && this.stagedWarmFailed.get(actor) !== signature);\n\t}\n\tprivate stagedMaterialReady(actor: CatalogActor) {\n\t\t// Capture restores authored opacity. A still-fading carousel seat would\n\t\t// otherwise change transparent/depth-write pipeline variants at the click.\n\t\treturn actor.materials.every(({ material, transparent, depthWrite }) =>\n\t\t\tmaterial.transparent === transparent && material.depthWrite === depthWrite);\n\t}\n\tneedsStagedPreparation(renderer: THREE.WebGPURenderer, warmOutput?: CatalogWarmOutputContext) {\n\t\treturn (!warmOutput || warmOutput.isCurrent(renderer)) && !this.disposed && !this.stagedPreparing && !this.handoff && !this.stagedSourceFrozen &&\n\t\t\t(this.stagedCandidates(renderer, warmOutput).length > 0 || (this.groundPoseSettled &&\n\t\t\t\tthis.ground.needsCachePreparation(this.carouselCamera, this.stagedSignature(renderer))));\n\t}\n\tisStagedDetailReady(spatialElementId: string, occurrence: string | undefined, renderer: THREE.WebGPURenderer, warmOutput?: CatalogWarmOutputContext) {\n\t\tconst actor = [...this.actors.values()].find(item => item.spatialElementId === spatialElementId &&\n\t\t\tthis.desired.has(item.key) && (occurrence ? item.occurrence === occurrence :\n\t\t\t\t!item.occurrence || item.card?.hasAttribute('data-catalog-selected')));\n\t\treturn Boolean((!warmOutput || warmOutput.isCurrent(renderer)) && !this.stagedReadinessBlocked && actor?.rendered && actor.root.visible && this.stagedMaterialReady(actor) &&\n\t\t\tthis.stagedPrepared.get(actor) === this.stagedSignature(renderer, warmOutput));\n\t}\n\t/** Idle-only: warm the exact existing Low fade and handoff passes before a click can claim them. */\n\tasync prepareStagedNavigation(renderer: THREE.WebGPURenderer, warmOutput?: CatalogWarmOutputContext) {\n\t\tif (!this.needsStagedPreparation(renderer, warmOutput)) return;\n\t\tconst actors = this.stagedCandidates(renderer, warmOutput), signature = this.stagedSignature(renderer, warmOutput);\n\t\t// Ground pixels are independent of the outer composite profile. Preserve their live-draw key.\n\t\tconst groundSignature = this.stagedSignature(renderer);\n\t\tconst warmRear = actors.some(actor => Boolean(actor.pose)) || (this.groundPoseSettled &&\n\t\t\tthis.ground.needsCachePreparation(this.carouselCamera, groundSignature));\n\t\tthis.stagedPreparing = true;\n\t\tthis.stagedReadinessBlocked = true;\n\t\tconst fog = this.scene.fog, environment = this.handoffScene.environment, handoffFog = this.handoffScene.fog;\n\t\tconst exitOpacity = this.exitOpacity;\n\t\tconst outlines = actors.filter(actor => actor.pose && actor.clip && actor.renderRect);\n\t\tconst hover = outlines.map(actor => actor.hover);\n\t\tconst handoffCamera = this.handoffCamera.clone();\n\t\ttry {\n\t\t\ttry { const draw = () => withRendererState(renderer, () => {\n\t\t\t\t// The default keeps the real Canvas output variant. An opt-in scratch\n\t\t\t\t// context retains Canvas-semantic owners without drawing to a Canvas.\n\t\t\t\trenderer.setRenderTarget(warmOutput?.target ?? null);\n\t\t\t\trenderer.setScissor(0, 0, 0, 0); renderer.setScissorTest(true);\n\t\t\t\t// Exercise the actual output bands. A glass carousel renders its rear\n\t\t\t\t// actors into an RGBA8 backdrop before compositing, and defocused seats\n\t\t\t\t// use additional resolve passes. A direct scene render misses those\n\t\t\t\t// target/pipeline variants despite compiling the same model shaders.\n\t\t\t\tthis.exitOpacity = 0.5;\n\t\t\t\t// Focus fires before Kit's beforeNavigate callback. Prepare its first\n\t\t\t\t// outline while idle so that pre-navigation frame cannot compile it.\n\t\t\t\tfor (const actor of outlines) actor.hover = Math.max(actor.hover, 0.5);\n\t\t\t\tif (warmRear) {\n\t\t\t\t\tif (this.groundPoseSettled) this.ground.prepareCaches(renderer, this.carouselCamera, groundSignature);\n\t\t\t\t\tthis.renderRear(renderer, warmOutput);\n\t\t\t\t\tthis.ground.prepareWindingVariants(renderer, this.carouselCamera);\n\t\t\t\t}\n\t\t\t\tthis.draw(renderer, 'front', warmOutput);\n\t\t\t\t// The fade pass warms offscreen output. The ordinary focused source\n\t\t\t\t// needs the Canvas variant too, without submitting visible pixels.\n\t\t\t\tfor (const actor of outlines) {\n\t\t\t\t\trenderer.setRenderTarget(warmOutput?.target ?? null);\n\t\t\t\t\trenderer.setScissor(0, 0, 0, 0); renderer.setScissorTest(true);\n\t\t\t\t\tthis.outline.render(renderer, this.carouselCamera, actor.model, actor.renderRect!, actor.clip!,\n\t\t\t\t\t\t0.5, this.interactionTheme(), warmOutput);\n\t\t\t\t}\n\t\t\t\tthis.handoffScene.environment = this.scene.environment;\n\t\t\t\tfor (const actor of actors) {\n\t\t\t\t\tconst model = actor.model, parent = model.parent;\n\t\t\t\t\tconst matrix = model.matrix.clone(), auto = model.matrixAutoUpdate;\n\t\t\t\t\tmodel.updateWorldMatrix(true, true);\n\t\t\t\t\tconst world = model.matrixWorld.clone();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.handoffScene.fog = actor.pose ? null : fog;\n\t\t\t\t\t\tthis.handoffCamera.copy(actor.pose ? this.carouselCamera : this.camera);\n\t\t\t\t\t\tthis.handoffCamera.coordinateSystem = renderer.coordinateSystem;\n\t\t\t\t\t\tthis.handoffCamera.updateProjectionMatrix();\n\t\t\t\t\t\tthis.handoffScene.add(model); model.matrixAutoUpdate = false; model.matrix.copy(world);\n\t\t\t\t\t\tmodel.matrixWorldNeedsUpdate = true;\n\t\t\t\t\t\trenderer.render(this.handoffScene, this.handoffCamera);\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif (parent) parent.add(model); else model.removeFromParent();\n\t\t\t\t\t\tmodel.matrixAutoUpdate = auto; model.matrix.copy(matrix); model.matrixWorldNeedsUpdate = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}); if (warmOutput) warmOutput.borrow(renderer, draw); else draw(); } finally {\n\t\t\t\t// Restore borrowed scene state before yielding to GPU completion; a\n\t\t\t\t// normal render or fallback navigation can run while that wait is pending.\n\t\t\t\tthis.exitOpacity = exitOpacity;\n\t\t\t\toutlines.forEach((actor, index) => { actor.hover = hover[index]; });\n\t\t\t\tthis.scene.fog = fog; this.handoffScene.environment = environment; this.handoffScene.fog = handoffFog;\n\t\t\t\tthis.handoffCamera.copy(handoffCamera);\n\t\t\t\t// Optional shadow pixels must not revoke already fenced actor readiness.\n\t\t\t\t// Keep preparation serialized, but unblock only after every borrowed\n\t\t\t\t// render/scene value is restored. New actor passes still await the fence.\n\t\t\t\tif (!actors.length) this.stagedReadinessBlocked = false;\n\t\t\t}\n\t\t\tconst device = (renderer.backend as unknown as { device?: GPUDevice }).device;\n\t\t\tawait device?.queue.onSubmittedWorkDone();\n\t\t\tif ((!warmOutput || warmOutput.isCurrent(renderer)) && !this.disposed && !this.handoff && !this.stagedSourceFrozen && signature === this.stagedSignature(renderer, warmOutput)) {\n\t\t\t\tthis.stagedWarmups++;\n\t\t\t\tfor (const actor of actors) if (this.actors.get(actor.key) === actor) this.stagedPrepared.set(actor, signature);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tthis.stagedWarmFailures++;\n\t\t\tfor (const actor of actors) this.stagedWarmFailed.set(actor, signature);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tthis.stagedPreparing = false;\n\t\t\tthis.stagedReadinessBlocked = false;\n\t\t}\n\t}\n\tfreezeStagedSource() {\n\t\tthis.stagedSourceFrozen = true;\n\t\tthis.stagedSourceCapture = { front: {}, rear: {} };\n\t}\n\tprivate frozenSourceForBand(band: 'front' | 'rear', warmOutput?: CatalogWarmOutputContext) {\n\t\tconst capture = this.stagedSourceCapture;\n\t\tif (!this.stagedSourceFrozen || !capture || this.stagedPreparing || warmOutput) return;\n\t\t// Frozen actors keep their pose, but projection, HDR or outline settings can\n\t\t// still change through the stage. Any such change ends reuse for this freeze.\n\t\tconst fog = this.scene.fog as THREE.Fog | null;\n\t\tconst signature = JSON.stringify([window.innerWidth, window.innerHeight,\n\t\t\tthis.scene.environment?.uuid, this.scene.environment?.version, this.scene.environmentIntensity,\n\t\t\tfog?.color.getHex(), fog?.near, fog?.far, this.interactionTheme()]);\n\t\tif (capture.signature !== undefined && capture.signature !== signature) {\n\t\t\tthis.stagedSourceCapture = undefined;\n\t\t\treturn;\n\t\t}\n\t\tcapture.signature = signature;\n\t\treturn capture[band];\n\t}\n\n\t/** Move the existing glass mesh with the actual DOM quad, without resizing its resources. */\n\tsetStagedPanel(card: HTMLElement, corners: CssProjectionQuad, width: number, height: number) {\n\t\tif (card.dataset.carouselSurface !== 'glass') return true;\n\t\tif (!this.glass.hasPanel(card)) return false;\n\t\tconst matrix = sourceDomProjectiveMatrix(corners, width, height);\n\t\tif (!matrix) return false;\n\t\tconst screenToWorld = new THREE.Matrix4().makeTranslation(-innerWidth / 2, innerHeight / 2, 0)\n\t\t\t.multiply(new THREE.Matrix4().makeScale(1, -1, 1));\n\t\tconst planeToLocal = new THREE.Matrix4().makeTranslation(width / 2, height / 2, 0)\n\t\t\t.multiply(new THREE.Matrix4().makeScale(1, -1, 1));\n\t\tthis.stagedPanel = { card, matrix: screenToWorld.multiply(new THREE.Matrix4().fromArray(matrix)).multiply(planeToLocal) };\n\t\treturn true;\n\t}\n\tsetStagedPanelOpacity(opacity: number) { this.stagedPanelOpacity = THREE.MathUtils.clamp(opacity, 0, 1); this.invalidate(); }\n\tfinishStagedPanel() {\n\t\tthis.stagedPanel = undefined; this.stagedSourceFrozen = false; this.stagedSourceCapture = undefined;\n\t\tthis.stagedPanelOpacity = 1; this.invalidate();\n\t}\n\n\t/** Last submitted geometry position; diagnostics never advance animation or read DOM layout. */\n\tsetDestinationSpatialElement(spatialElementId?: string) {\n\t\tthis.destinationSpatialElement = spatialElementId;\n\t\tif (!spatialElementId) this.destinationOccurrences.clear();\n\t\tthis.invalidate();\n\t}\n\n\tsetDestinationOccurrences(endpoints: { spatialElementId: string; occurrence?: string }[]) {\n\t\tthis.destinationOccurrences = new Set(\n\t\t\tendpoints.map((p) => JSON.stringify([p.spatialElementId, p.occurrence]))\n\t\t);\n\t\tthis.invalidate();\n\t}\n\n\tprivate isDestinationActor(actor: CatalogActor) {\n\t\treturn (\n\t\t\tthis.destinationOccurrences.has(JSON.stringify([actor.spatialElementId, actor.occurrence])) ||\n\t\t\t(actor.spatialElementId === this.destinationSpatialElement &&\n\t\t\t\t(!actor.occurrence || actor.card?.hasAttribute('data-catalog-selected')))\n\t\t);\n\t}\n\n\tgetDestinationProjection(spatialElementId: string, occurrence?: string): SpatialElementProjection | undefined {\n\t\tconst actor = [...this.actors.values()].find(\n\t\t\t(item) =>\n\t\t\t\titem.spatialElementId === spatialElementId &&\n\t\t\t\t(occurrence\n\t\t\t\t\t? item.occurrence === occurrence\n\t\t\t\t\t: !item.occurrence || item.card?.hasAttribute('data-catalog-selected'))\n\t\t);\n\t\tif (!actor?.slot?.isConnected) return;\n\t\tconst rect = actor.slot.getBoundingClientRect();\n\t\tconst visibleRect = actor.pose && actor.renderRect ? actor.renderRect : rect;\n\t\tif (\n\t\t\trect.width <= 0 ||\n\t\t\trect.height <= 0 ||\n\t\t\t(actor.pose\n\t\t\t\t? visibleRect.left + visibleRect.width <= 0 || visibleRect.top + visibleRect.height <= 0 ||\n\t\t\t\t\tvisibleRect.left >= innerWidth || visibleRect.top >= innerHeight\n\t\t\t\t: rect.left < 0 || rect.top < 0 || rect.right > innerWidth || rect.bottom > innerHeight)\n\t\t)\n\t\t\treturn;\n\t\tactor.model.updateWorldMatrix(true, true);\n\t\tconst camera = actor.pose ? this.carouselCamera : this.camera;\n\t\treturn {\n\t\t\tenvironmentIntensity: this.scene.environmentIntensity,\n\t\t\tfog: actor.pose ? null : this.scene.fog,\n\t\t\tviewportClip: actor.clip ? { ...actor.clip } : undefined,\n\t\t\tmodel: actor.model.matrixWorld.clone(),\n\t\t\tcamera: camera.matrixWorld.clone(),\n\t\t\tclip: normalizeSpatialElementClipMatrix(\n\t\t\t\tnew THREE.Matrix4()\n\t\t\t\t\t.multiplyMatrices(camera.projectionMatrix, camera.matrixWorldInverse)\n\t\t\t\t\t.multiply(actor.model.matrixWorld),\n\t\t\t\tnew THREE.Vector3()\n\t\t\t)\n\t\t};\n\t}\n\n\tgetHandoffPoint() {\n\t\treturn this.handoff && this.handoffPoint ? { ...this.handoffPoint } : null;\n\t}\n\n\t/** Detach the last submitted moving element without releasing the actor's Low instance. */\n\tdetachHandoff() {\n\t\tconst handoff = this.handoff;\n\t\tif (!handoff) return;\n\t\tthis.stagedSourceCapture = undefined;\n\t\tconst actor = handoff.actor;\n\t\tconst model = actor.model;\n\t\tmodel.updateWorldMatrix(true, true);\n\t\tconst camera = this.handoffPoint\n\t\t\t? this.handoffCamera\n\t\t\t: actor.pose\n\t\t\t\t? this.carouselCamera\n\t\t\t\t: this.camera;\n\t\tcamera.updateMatrixWorld();\n\t\tconst projection = {\n\t\t\tfog: actor.pose ? null : this.scene.fog,\n\t\t\tviewportClip: actor.clip ? { ...actor.clip } : undefined,\n\t\t\tmodel: model.matrixWorld.clone(),\n\t\t\tcamera: camera.matrixWorld.clone(),\n\t\t\tclip: normalizeSpatialElementClipMatrix(\n\t\t\t\tnew THREE.Matrix4()\n\t\t\t\t\t.multiplyMatrices(camera.projectionMatrix, camera.matrixWorldInverse)\n\t\t\t\t\t.multiply(model.matrixWorld),\n\t\t\t\tnew THREE.Vector3()\n\t\t\t),\n\t\t\tenvironmentIntensity: this.handoffPoint\n\t\t\t\t? this.handoffScene.environmentIntensity\n\t\t\t\t: handoff.sourceEnvironmentIntensity\n\t\t};\n\t\tthis.handoff = undefined;\n\t\tif (this.actors.get(actor.key) === actor) this.actors.delete(actor.key);\n\t\tthis.detachedInstances++;\n\t\tlet released = false;\n\t\tconst release = () => {\n\t\t\tif (released) return;\n\t\t\treleased = true; this.detachedInstances--; this.disposeActor(actor);\n\t\t};\n\t\treturn {\n\t\t\tmodel,\n\t\t\tprojection,\n\t\t\treferencePoint: actor.referencePoint.clone(),\n\t\t\tenvironment: handoff.sourceEnvironment,\n\t\t\thighEnvironment: handoff.highEnvironment,\n\t\t\trelease,\n\t\t\t/** A pre-commit cancellation returns the same prepared instance to its live source. */\n\t\t\trestore: () => {\n\t\t\t\tif (released) return false;\n\t\t\t\tif (this.disposed || !this.desired.has(actor.key) || !actor.slot?.isConnected) { release(); return false; }\n\t\t\t\treleased = true; this.detachedInstances--;\n\t\t\t\tthis.stagedSourceCapture = undefined;\n\t\t\t\tactor.model.matrixAutoUpdate = true; actor.model.updateMatrix();\n\t\t\t\tactor.view.add(actor.model); this.scene.add(actor.root);\n\t\t\t\tthis.actors.set(actor.key, actor); this.layoutDirty = true; this.invalidate();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t}\n\n\tsetHandoffTarget(target: {\n\t\tcamera: THREE.PerspectiveCamera;\n\t\tmodel: THREE.Object3D;\n\t\tprogress: number;\n\t\tenvironmentIntensity?: number;\n\t}) {\n\t\tif (!this.handoff) return;\n\t\tthis.handoff.target = target;\n\t\tthis.invalidate();\n\t}\n\n\tsetHighHandoff(\n\t\thigh: THREE.Object3D | undefined,\n\t\tblend: SpatialElementRefinement | undefined,\n\t\tprogress: number,\n\t\tenvironment?: THREE.Texture\n\t) {\n\t\tif (this.handoff)\n\t\t\tObject.assign(this.handoff, {\n\t\t\t\thigh,\n\t\t\t\tblend,\n\t\t\t\tblendProgress: progress,\n\t\t\t\thighEnvironment: environment\n\t\t\t});\n\t}\n\n\tfinishHandoff() {\n\t\tconst handoff = this.handoff;\n\t\tif (!handoff) return;\n\t\tthis.stagedSourceCapture = undefined;\n\t\tthis.handoff = undefined;\n\t\tconst actor = handoff.actor;\n\t\tapplyCatalogMaterialOpacity(actor.materials, 1);\n\t\tif (this.desired.has(actor.key)) {\n\t\t\tapplyCatalogMaterialOpacity(actor.materials, 1);\n\t\t\tactor.model.matrixAutoUpdate = true;\n\t\t\tactor.model.updateMatrix();\n\t\t\tactor.view.add(actor.model);\n\t\t\tthis.scene.add(actor.root);\n\t\t\tthis.layoutDirty = true;\n\t\t} else this.disposeActor(actor);\n\t\tfor (const other of this.actors.values()) {\n\t\t\tif (!this.desired.has(other.key)) this.disposeActor(other);\n\t\t}\n\t\tthis.invalidate();\n\t}\n\n\t/** Crossfade the stationary Low overlay against the revealed background hero. */\n\tsetHandoffOpacity(opacity: number) {\n\t\tif (this.handoff) applyCatalogMaterialOpacity(this.handoff.actor.materials, opacity);\n\t}\n\n\tdispose() {\n\t\tthis.stagedSourceCapture = undefined;\n\t\tthis.cancelActivationFocusRequest();\n\t\tthis.ground.dispose();\n\t\tthis.glass.dispose();\n\t\tthis.sectionSurfaces.dispose();\n\t\tthis.depthBlur.dispose();\n\t\tthis.geometryFade.dispose();\n\t\tthis.outline.dispose();\n\t\tif (this.disposed) return;\n\t\tthis.disposed = true;\n\t\tthis.unsubscribeDeviceYaw();\n\t\tthis.generation += 1;\n\t\tfor (const request of this.requests) request.abort();\n\t\tthis.requests.clear();\n\t\tthis.handoff = undefined;\n\t\tfor (const actor of this.actors.values()) this.disposeActor(actor);\n\t\twindow.removeEventListener('pointermove', this.pointerMove);\n\t\twindow.removeEventListener('pointerdown', this.pointerDown, true);\n\t\twindow.removeEventListener('pointerup', this.pointerUp);\n\t\twindow.removeEventListener('pointercancel', this.pointerUp);\n\t\twindow.removeEventListener('focusin', this.focusChange);\n\t\twindow.removeEventListener('focusout', this.focusChange);\n\t\twindow.removeEventListener('pointerleave', this.pointerLeave);\n\t\twindow.removeEventListener('blur', this.pointerLeave);\n\t\twindow.removeEventListener('resize', this.resize);\n\t\tthis.motion.removeEventListener('change', this.motionChange);\n\t\twindow.removeEventListener(CATALOG_POSE_CHANGED, this.motionChange);\n\t\tthis.layoutObserver.disconnect();\n\t}\n\n\tprivate createActor(\n\t\tkey: string,\n\t\tbrandId: string,\n\t\tspatialElementId: string,\n\t\tstage: SpatialElementScene,\n\t\tinstance: SpatialElementAssetInstance\n\t): CatalogActor {\n\t\tconst pair = resolveSpatialElementLodPair(stage.glb, stage.lodPair);\n\t\tconst rotation = pair ? undefined : stage.model?.rotation;\n\t\tif (rotation)\n\t\t\tinstance.scene.rotation.set(\n\t\t\t\tinstance.scene.rotation.x + (rotation.x ?? 0),\n\t\t\t\tinstance.scene.rotation.y + (rotation.y ?? 0),\n\t\t\t\tinstance.scene.rotation.z + (rotation.z ?? 0)\n\t\t\t);\n\t\tapplyModelMaterialOverrides(instance.scene, stage.model?.materialOverrides);\n\t\tconst overrides = new Set<THREE.Material>();\n\t\tconst excluded = new Set(stage.model?.excludeMeshes ?? []);\n\t\tinstance.scene.traverse((object) => {\n\t\t\tif (!isMesh(object)) return;\n\t\t\tif (excluded.has(object.name)) object.visible = false;\n\t\t\tif (stage.model?.materialOverrides?.[object.name])\n\t\t\t\tgetMeshMaterials(object).forEach((material) => overrides.add(material));\n\t\t});\n\t\tconst sourceBounds = getMeshBounds(instance.scene, (mesh) => !excluded.has(mesh.name));\n\t\tif (sourceBounds.isEmpty()) {\n\t\t\tfor (const material of overrides) material.dispose();\n\t\t\tthrow new Error('Catalog asset contains no spatialElement geometry');\n\t\t}\n\t\tconst referencePoint = sourceBounds.getCenter(new THREE.Vector3());\n\t\tconst model = new THREE.Group();\n\t\tlet bounds: THREE.Box3;\n\t\tif (pair) {\n\t\t\tbounds = prepareSpatialElementFrame(model, instance.scene, pair, stage.model ?? {});\n\t\t\treferencePoint.set(0, 0, 0);\n\t\t} else {\n\t\t\tmodel.add(instance.scene);\n\t\t\tcenterAndScale(model, (mesh) => !excluded.has(mesh.name));\n\t\t\tbounds = getMeshBounds(model, (mesh) => !excluded.has(mesh.name));\n\t\t}\n\t\tif (bounds.isEmpty()) {\n\t\t\tfor (const material of overrides) material.dispose();\n\t\t\tthrow new Error('Catalog asset contains no spatialElement geometry');\n\t\t}\n\t\tconst detailLowBounds = getMeshBounds(model, (mesh) => !excluded.has(mesh.name));\n\t\tconst detailLowBoundsPoints = getMeshBoundsPoints(model, (mesh) => !excluded.has(mesh.name));\n\t\tconst radius = Math.max(bounds.getBoundingSphere(new THREE.Sphere()).radius, 0.001);\n\t\tconst root = new THREE.Group();\n\t\troot.matrixAutoUpdate = false;\n\t\tconst tilt = new THREE.Group();\n\t\tconst view = new THREE.Group();\n\t\tview.quaternion.copy(\n\t\t\tgetCameraOrbitQuaternion(stage.camera?.azimuth, stage.camera?.elevation).invert()\n\t\t);\n\t\tconst supportPoints = carouselSupport(model, view.quaternion);\n\t\troot.add(tilt);\n\t\ttilt.add(view);\n\t\tview.add(model);\n\t\tconst materials = captureCatalogMaterialOpacity(model);\n\t\tapplyCatalogMaterialOpacity(materials, 1);\n\t\tconst hitCorners = [bounds.min.x, bounds.max.x].flatMap((x) =>\n\t\t\t[bounds.min.y, bounds.max.y].flatMap((y) =>\n\t\t\t\t[bounds.min.z, bounds.max.z].map((z) => new THREE.Vector3(x, y, z))\n\t\t\t)\n\t\t);\n\t\treturn {\n\t\t\tkey,\n\t\t\tbrandId,\n\t\t\tspatialElementId,\n\t\t\tstage,\n\t\t\tinstance,\n\t\t\tmodel,\n\t\t\tdetailFrame: model.matrix.clone(),\n\t\t\tdetailBounds: bounds.clone(),\n\t\t\tdetailLowBounds,\n\t\t\tdetailLowBoundsPoints,\n\t\t\troot,\n\t\t\ttilt,\n\t\t\tview,\n\t\t\tviewOrientation: view.quaternion.clone(),\n\t\t\tradius,\n\t\t\thitCorners,\n\t\t\tfitCorners: hitCorners.map((corner) => corner.clone().applyQuaternion(view.quaternion)),\n\t\t\tsupportPoints,\n\t\t\tcardScale: 1,\n\t\t\thover: 0,\n\t\t\treferencePoint,\n\t\t\toverrides,\n\t\t\tmaterials,\n\t\t\tscrollX: 0,\n\t\t\tscrollY: 0,\n\t\t\trotationX: 0,\n\t\t\trotationY: 0,\n\t\t\tdeviceYaw: 0,\n\t\t\tdevicePitch: 0,\n\t\t\tdeviceRoll: 0,\n\t\t\tlift: 0,\n\t\t\trendered: false\n\t\t};\n\t}\n\n\tprivate measureActors(scrollX: number, scrollY: number) {\n\t\tif (this.handoff || this.stagedSourceFrozen) return;\n\t\tconst measured: Array<{ actor: CatalogActor; previousTransform: string }> = [];\n\t\tfor (const actor of this.actors.values()) {\n\t\t\tconst list = document.querySelector<HTMLElement>(\n\t\t\t\t`[data-catalog-list][data-brand-id=\"${CSS.escape(actor.brandId)}\"]`\n\t\t\t);\n\t\t\tactor.slot =\n\t\t\t\tlist?.querySelector<HTMLElement>(\n\t\t\t\t\t`[data-catalog-geometry][data-spatial-element-id=\"${CSS.escape(actor.spatialElementId)}\"]${actor.occurrence ? `[data-catalog-occurrence=\"${CSS.escape(actor.occurrence)}\"]` : ''}`\n\t\t\t\t) ?? undefined;\n\t\t\tactor.card =\n\t\t\t\tactor.slot?.closest<HTMLElement>('[data-catalog-card], [data-carousel-spatial-element]') ??\n\t\t\t\tundefined;\n\t\t\tif (!actor.card || !actor.slot) continue;\n\t\t\tmeasured.push({ actor, previousTransform: actor.card.style.transform });\n\t\t\tactor.card.style.transform = 'none';\n\t\t}\n\t\t// Batch neutral-pose writes, measurements, and restoration to avoid per-card layout thrashing.\n\t\tconst surfaces = new Map<HTMLElement, Rect>();\n\t\tfor (const { actor } of measured) {\n\t\t\tactor.cardRect = actor.card!.getBoundingClientRect();\n\t\t\tactor.slotRect = actor.slot!.getBoundingClientRect();\n\t\t\tif (!actor.pose)\n\t\t\t\tactor.cardScale = cardModelFit(actor.fitCorners, actor.slotRect.width, actor.slotRect.height);\n\t\t\tif (actor.pose) {\n\t\t\t\tconst surface = actor.card!.closest('[data-section-background-size]')\n\t\t\t\t\t?.querySelector<HTMLElement>(':scope > .ps-section-surface');\n\t\t\t\tif (surface && !surfaces.has(surface)) {\n\t\t\t\t\tconst { left, top, width, height } = surface.getBoundingClientRect();\n\t\t\t\t\tsurfaces.set(surface, { left, top, width, height });\n\t\t\t\t}\n\t\t\t\tactor.sectionRect = surface ? surfaces.get(surface) : undefined;\n\t\t\t\tactor.hitTarget = actor.card!.querySelector<HTMLElement>('.spatial-element-target') ?? undefined;\n\t\t\t\tconst panel = actor.card!.querySelector<HTMLElement>('.summary') ?? undefined;\n\t\t\t\tif (actor.summaryPanel && actor.summaryPanel !== panel)\n\t\t\t\t\tthis.layoutObserver.unobserve(actor.summaryPanel);\n\t\t\t\tactor.summaryPanel = panel;\n\t\t\t\tactor.summarySize = panel ? { width: panel.offsetWidth, height: panel.offsetHeight } : undefined;\n\t\t\t\tactor.summaryOrigin = panel ? { x: panel.offsetLeft ?? 0, y: panel.offsetTop ?? 0 } : undefined;\n\t\t\t\t// Summary content can resize without changing its section's fixed height.\n\t\t\t\tif (panel) this.layoutObserver.observe(panel);\n\t\t\t}\n\t\t\tactor.scrollX = scrollX;\n\t\t\tactor.scrollY = scrollY;\n\t\t}\n\t\tthis.sectionSurfaces.sync(surfaces, scrollX, scrollY);\n\t\tfor (const { actor, previousTransform } of measured)\n\t\t\tactor.card!.style.transform = previousTransform;\n\t\tthis.layoutDirty = false;\n\t}\n\n\tprivate renderHandoff(renderer: THREE.WebGPURenderer) {\n\t\tconst handoff = this.handoff!;\n\t\tconst target = handoff.target;\n\t\t// Otherwise Renderer would replace the custom projection on its first WebGPU draw.\n\t\tthis.handoffCamera.coordinateSystem = renderer.coordinateSystem;\n\t\tif (target && target.camera.coordinateSystem !== renderer.coordinateSystem) {\n\t\t\ttarget.camera.coordinateSystem = renderer.coordinateSystem;\n\t\t\ttarget.camera.updateProjectionMatrix();\n\t\t}\n\t\tconst progress = THREE.MathUtils.clamp(target?.progress ?? 0, 0, 1);\n\t\tthis.handoffScene.environmentIntensity = THREE.MathUtils.lerp(\n\t\t\thandoff.sourceEnvironmentIntensity,\n\t\t\ttarget?.environmentIntensity ?? 0.5,\n\t\t\tprogress\n\t\t);\n\t\ttarget?.model.updateWorldMatrix(true, true);\n\t\ttarget?.camera.updateMatrixWorld();\n\t\tconst targetModel = target?.model.matrixWorld ?? handoff.sourceModel;\n\t\tconst targetCamera = target?.camera.matrixWorld ?? handoff.sourceCamera;\n\t\tconst targetClip = target\n\t\t\t? normalizeSpatialElementClipMatrix(\n\t\t\t\t\tnew THREE.Matrix4()\n\t\t\t\t\t\t.multiplyMatrices(target.camera.projectionMatrix, target.camera.matrixWorldInverse)\n\t\t\t\t\t\t.multiply(targetModel),\n\t\t\t\t\thandoff.actor.referencePoint\n\t\t\t\t)\n\t\t\t: handoff.sourceClip;\n\t\tconst modelWorld = interpolatePose(handoff.sourceModel, targetModel, progress);\n\t\tconst cameraWorld = interpolatePose(handoff.sourceCamera, targetCamera, progress);\n\t\thandoff.actor.model.matrix.copy(modelWorld);\n\t\thandoff.actor.model.matrixWorldNeedsUpdate = true;\n\t\tcameraWorld.decompose(\n\t\t\tthis.handoffCamera.position,\n\t\t\tthis.handoffCamera.quaternion,\n\t\t\tthis.handoffCamera.scale\n\t\t);\n\t\tthis.handoffCamera.updateMatrixWorld();\n\t\tgetSpatialElementHandoffProjection(\n\t\t\thandoff.sourceClip,\n\t\t\ttargetClip,\n\t\t\tprogress,\n\t\t\tmodelWorld,\n\t\t\tthis.handoffCamera.matrixWorld,\n\t\t\t{\n\t\t\t\tsourceModel: handoff.sourceModel,\n\t\t\t\tsourceCamera: handoff.sourceCamera,\n\t\t\t\ttargetModel,\n\t\t\t\ttargetCamera,\n\t\t\t\treference: handoff.actor.referencePoint\n\t\t\t},\n\t\t\tthis.handoffCamera.projectionMatrix\n\t\t);\n\t\tthis.handoffCamera.projectionMatrixInverse.copy(this.handoffCamera.projectionMatrix).invert();\n\t\trenderer.clearDepth();\n\t\tif (handoff.high && handoff.blend && (handoff.blendProgress ?? 0) > 0) {\n\t\t\tconst high = handoff.high;\n\t\t\tconst parent = high.parent;\n\t\t\tconst visibility = high.visible;\n\t\t\tconst children = [...handoff.actor.model.children];\n\t\t\tconst environment = this.handoffScene.environment;\n\t\t\thandoff.actor.model.add(high);\n\t\t\ttry {\n\t\t\t\thandoff.blend.render(\n\t\t\t\t\trenderer,\n\t\t\t\t\t(useHigh) => {\n\t\t\t\t\t\tfor (const child of children) child.visible = !useHigh;\n\t\t\t\t\t\thigh.visible = useHigh;\n\t\t\t\t\t\tthis.handoffScene.environment = useHigh\n\t\t\t\t\t\t\t? (handoff.highEnvironment ?? environment)\n\t\t\t\t\t\t\t: environment;\n\t\t\t\t\t\trenderer.clear();\n\t\t\t\t\t\trenderer.render(this.handoffScene, this.handoffCamera);\n\t\t\t\t\t},\n\t\t\t\t\tfalse,\n\t\t\t\t\thandoff.blendProgress\n\t\t\t\t);\n\t\t\t} finally {\n\t\t\t\tfor (const child of children) child.visible = true;\n\t\t\t\tif (parent) parent.add(high);\n\t\t\t\telse high.removeFromParent();\n\t\t\t\thigh.visible = visibility;\n\t\t\t\tthis.handoffScene.environment = environment;\n\t\t\t}\n\t\t} else renderer.render(this.handoffScene, this.handoffCamera);\n\t\tconst point = handoff.actor.referencePoint\n\t\t\t.clone()\n\t\t\t.applyMatrix4(handoff.actor.model.matrixWorld)\n\t\t\t.project(this.handoffCamera);\n\t\tthis.handoffPoint = {\n\t\t\tx: ((point.x + 1) * window.innerWidth) / 2,\n\t\t\ty: ((1 - point.y) * window.innerHeight) / 2\n\t\t};\n\t}\n\n\tprivate disposeActor(actor: CatalogActor) {\n\t\tthis.stagedSourceCapture = undefined;\n\t\tthis.outline.release(actor.model);\n\t\tif (actor.summaryPanel) this.layoutObserver.unobserve(actor.summaryPanel);\n\t\tactor.root.removeFromParent();\n\t\tactor.model.removeFromParent();\n\t\tactor.card?.removeAttribute('data-catalog-model-ready');\n\t\tactor.card?.style.removeProperty('--catalog-rotate-x');\n\t\tactor.card?.style.removeProperty('--catalog-rotate-y');\n\t\tactor.card?.style.removeProperty('--catalog-lift');\n\t\tfor (const material of actor.overrides) material.dispose();\n\t\tactor.instance.dispose();\n\t\tif (this.actors.get(actor.key) === actor) this.actors.delete(actor.key);\n\t}\n}\n\nexport function interpolatePose(source: THREE.Matrix4, target: THREE.Matrix4, progress: number) {\n\tif (progress === 0) return source.clone();\n\tif (progress === 1) return target.clone();\n\tconst position = new THREE.Vector3();\n\tconst rotation = new THREE.Quaternion();\n\tconst scale = new THREE.Vector3();\n\tconst targetPosition = new THREE.Vector3();\n\tconst targetRotation = new THREE.Quaternion();\n\tconst targetScale = new THREE.Vector3();\n\tsource.decompose(position, rotation, scale);\n\ttarget.decompose(targetPosition, targetRotation, targetScale);\n\treturn new THREE.Matrix4().compose(\n\t\tposition.lerp(targetPosition, progress),\n\t\trotation.slerp(targetRotation, progress),\n\t\tscale.lerp(targetScale, progress)\n\t);\n}\n"]}
|