@spatial-elements/core 0.1.0-beta.2 → 1.0.0-beta.11
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 +4 -2
- 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 +144 -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 +5 -3
- package/dist/catalog/CatalogTransition.d.ts.map +1 -1
- package/dist/catalog/CatalogTransition.js +207 -91
- 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 +12 -27
- 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 +20 -0
- package/dist/catalog/listDeviceOrientation.d.ts.map +1 -0
- package/dist/catalog/listDeviceOrientation.js +273 -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 +23 -11
- 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 +46 -0
- package/dist/spatial-element/messages.d.ts.map +1 -0
- package/dist/spatial-element/messages.js +46 -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 +51 -7
- 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 +62 -71
- 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/SpaceMouseAdapter.d.ts +10 -2
- package/dist/stage/SpaceMouseAdapter.d.ts.map +1 -1
- package/dist/stage/SpaceMouseAdapter.js +50 -8
- package/dist/stage/SpaceMouseAdapter.js.map +1 -1
- package/dist/stage/SpatialElementInteractionController.d.ts +24 -2
- package/dist/stage/SpatialElementInteractionController.d.ts.map +1 -1
- package/dist/stage/SpatialElementInteractionController.js +198 -45
- 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 +266 -11
- package/dist/stage/StageExperience.d.ts.map +1 -1
- package/dist/stage/StageExperience.js +673 -126
- 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 -120
- 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 +6 -11
- 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 +33 -2
- package/dist/stage/panelContext.d.ts.map +1 -1
- package/dist/stage/panelContext.js.map +1 -1
- package/dist/stage/panelFocusMath.d.ts +34 -0
- package/dist/stage/panelFocusMath.d.ts.map +1 -0
- package/dist/stage/panelFocusMath.js +79 -0
- package/dist/stage/panelFocusMath.js.map +1 -0
- 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/scalarMath.d.ts +6 -0
- package/dist/stage/scalarMath.d.ts.map +1 -0
- package/dist/stage/scalarMath.js +6 -0
- package/dist/stage/scalarMath.js.map +1 -0
- 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/spaceMousePermission.d.ts +11 -0
- package/dist/stage/spaceMousePermission.d.ts.map +1 -0
- package/dist/stage/spaceMousePermission.js +63 -0
- package/dist/stage/spaceMousePermission.js.map +1 -0
- package/dist/stage/spaceMousePlatform.d.ts +12 -0
- package/dist/stage/spaceMousePlatform.d.ts.map +1 -0
- package/dist/stage/spaceMousePlatform.js +13 -0
- package/dist/stage/spaceMousePlatform.js.map +1 -0
- 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 +10 -10
- 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 +4 -33
- package/dist/stage/stageMath.d.ts.map +1 -1
- package/dist/stage/stageMath.js +39 -110
- package/dist/stage/stageMath.js.map +1 -1
- package/dist/stage/stageTypes.d.ts +32 -4
- 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/dist/stage/webgpuSupport.d.ts +3 -0
- package/dist/stage/webgpuSupport.d.ts.map +1 -0
- package/dist/stage/webgpuSupport.js +14 -0
- package/dist/stage/webgpuSupport.js.map +1 -0
- package/logo.svg +225 -0
- package/package.json +7 -5
|
@@ -45,7 +45,16 @@ export interface StagePanelRegistration {
|
|
|
45
45
|
getElement(): HTMLElement | undefined;
|
|
46
46
|
getFrameElement(): HTMLElement | undefined;
|
|
47
47
|
getSurfaceElement(): HTMLElement | undefined;
|
|
48
|
-
getPointerReactive(): boolean;
|
|
48
|
+
getPointerReactive(): boolean | 'lift';
|
|
49
|
+
getFocusReactive?(): boolean | 'top-right';
|
|
50
|
+
/** Neighbouring panel frame that shares a corner control's exit path. */
|
|
51
|
+
getFocusAnchor?(): HTMLElement | undefined;
|
|
52
|
+
getNativeContent?(): boolean;
|
|
53
|
+
/** Runs synchronously before the native panel surface is measured and drawn. */
|
|
54
|
+
updateNativeLayout?(): void;
|
|
55
|
+
getVisible?(): boolean;
|
|
56
|
+
/** Selection is read without rebuilding the minimap model. */
|
|
57
|
+
getMinimapSelected?(): boolean;
|
|
49
58
|
getMinimapOptions(): StagePanelMinimapOptions | undefined;
|
|
50
59
|
getOptions(): LiquidGlassPanelOptions;
|
|
51
60
|
getSurface(): StagePanelSurface;
|
|
@@ -57,15 +66,37 @@ export interface StagePanelRegistration {
|
|
|
57
66
|
getMinimapDockProgress(): number;
|
|
58
67
|
/** Returns the viewport-space top edge used to anchor the rendered model. */
|
|
59
68
|
getMinimapModelTop(): number | undefined;
|
|
69
|
+
getMinimapModelLeft?(): number | undefined;
|
|
60
70
|
}
|
|
61
71
|
export interface StageViewportRegistration {
|
|
62
72
|
getElement(): HTMLElement | undefined;
|
|
63
73
|
}
|
|
64
74
|
export interface StageContext {
|
|
65
|
-
|
|
75
|
+
/** Detail-page ownership; stale route cleanup cannot reset a newer media selection. */
|
|
76
|
+
registerDetailMedia?(read: () => import('../spatial-element/types.js').SpatialElementMediaItem['kind']): () => void;
|
|
77
|
+
/** Cached browser layout metrics; unavailable during SSR. */
|
|
78
|
+
getLayoutMetrics?(mode?: 'stable' | 'visible'): import('../spatial-element/responsiveLayout.js').ResponsiveLayoutInput | undefined;
|
|
79
|
+
/** Reactive in framework adapters; false during SSR and until the GPU has painted. */
|
|
80
|
+
isEnhanced?(): boolean;
|
|
81
|
+
/** Local-driver integration is opt-in and may trigger a browser permission prompt. */
|
|
82
|
+
setSpaceMouseEnabled?(enabled: boolean): void;
|
|
83
|
+
isSpaceMouseEnabled?(): boolean;
|
|
84
|
+
isSpaceMouseDesktop?(): boolean;
|
|
85
|
+
getSpaceMouseState?(): import('./spaceMousePlatform.js').SpaceMouseState;
|
|
86
|
+
getSpaceMousePermission?(): import('./spaceMousePermission.js').SpaceMousePermission;
|
|
87
|
+
prefetchSpatialElement?(stage: import('../spatial-element/spatialElementScene.js').SpatialElementScene): void;
|
|
66
88
|
registerPanel(panel: StagePanelRegistration): () => void;
|
|
89
|
+
/** Refresh appearance from registered getters without rebinding the page or its camera. */
|
|
90
|
+
updatePanelAppearance?(): void;
|
|
67
91
|
registerViewport(viewport: StageViewportRegistration): () => void;
|
|
68
92
|
/** Restores the element camera to its initial fitted pose. */
|
|
69
93
|
resetView(): void;
|
|
94
|
+
/** True for both native fullscreen and its viewport fallback. */
|
|
95
|
+
isFullscreen?(): boolean;
|
|
96
|
+
/** Current camera zoom focus, from the fitted detail view (0) to close-up (1). */
|
|
97
|
+
getZoomFocus?(): number;
|
|
98
|
+
/** Damped UI focus shared by panels and the document-scrolled detail pane. */
|
|
99
|
+
getZoomUiFocus?(): number;
|
|
100
|
+
setFullscreen?(fullscreen: boolean): void;
|
|
70
101
|
}
|
|
71
102
|
//# sourceMappingURL=panelContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panelContext.d.ts","sourceRoot":"","sources":["../../src/stage/panelContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,KAAK,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEjF,eAAO,MAAM,iBAAiB,eAAkB,CAAC;AAEjD,uFAAuF;AACvF,eAAO,MAAM,wBAAwB,uBAAuB,CAAC;AAE7D,+FAA+F;AAC/F,eAAO,MAAM,wBAAwB,uBAAuB,CAAC;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iBAAiB,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;AAEjD,uFAAuF;AACvF,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAE7D,+FAA+F;AAC/F,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC","sourcesContent":["\nimport type { LiquidGlassPanelOptions } from './LiquidGlassPanel.js';\nimport type { StageMinimapDockedView, StagePanelSurface } from './stageTypes.js';\n\nexport const STAGE_CONTEXT_KEY = Symbol('stage');\n\n/** Notifies an active stage that externally positioned panel frames changed layout. */\nexport const STAGE_PANEL_LAYOUT_EVENT = 'stage:panel-layout';\n\n/** Notifies an active stage that an external panel visual changed without affecting layout. */\nexport const STAGE_PANEL_VISUAL_EVENT = 'stage:panel-visual';\n\nexport interface StagePanelPose {\n\twidth: number;\n\theight: number;\n\tposition: { x: number; y: number };\n}\n\nexport interface StagePanelShape {\n\tradius: number;\n\tcontentInset?: number;\n}\n\nexport type StagePanelTheme = Omit<\n\tLiquidGlassPanelOptions,\n\t'width' | 'height' | 'position' | 'radius'\n> & {\n\t/** Semantic surface style. Defaults to the WebGPU-backed `glass` mode. */\n\tsurface?: StagePanelSurface;\n};\n\n\n\nexport interface StagePanelMinimapOptions {\n\texpandedHeight?: number;\n\tinset?: number;\n\t/** Additional unbounded scale applied to the fitted model. Values below 0.2 are clamped. */\n\tmodelScale?: number;\n\t/** Model multiplier at full pointer hover. Use 1 to disable hover enlargement. */\n\thoverModelScale?: number;\n\t/** Hover multiplier used once the minimap is expanded by camera zoom. */\n\texpandedHoverModelScale?: number;\n\t/** Optional spatial-element-specific presentation used while the minimap is docked. */\n\tdockedView?: StageMinimapDockedView;\n\toverlayColor?: string | number;\n\toverlayOpacity?: number;\n\t/** Gaussian blur radius in CSS pixels. */\n\toverlayBlur?: number;\n\tcontextColor?: string | number;\n\tcontextOpacity?: number;\n\tviewportColor?: string | number;\n}\n\nexport interface StagePanelRegistration {\n\tgetContentInset(): number;\n\tgetElement(): HTMLElement | undefined;\n\tgetFrameElement(): HTMLElement | undefined;\n\tgetSurfaceElement(): HTMLElement | undefined;\n\tgetPointerReactive(): boolean;\n\tgetMinimapOptions(): StagePanelMinimapOptions | undefined;\n\tgetOptions(): LiquidGlassPanelOptions;\n\tgetSurface(): StagePanelSurface;\n\t/** Returns the opacity of the panel surface without affecting panel content. */\n\tgetSurfaceOpacity(): number;\n\t/** Returns a transient presentation scale applied to a rendered minimap model. */\n\tgetMinimapModelScale(): number;\n\t/** Returns the animated transition from the regular to the docked minimap view. */\n\tgetMinimapDockProgress(): number;\n\t/** Returns the viewport-space top edge used to anchor the rendered model. */\n\tgetMinimapModelTop(): number | undefined;\n}\n\nexport interface StageViewportRegistration {\n\tgetElement(): HTMLElement | undefined;\n}\n\nexport interface StageContext {\n\tprefetchSpatialElement?(stage: import('../spatial-element/
|
|
1
|
+
{"version":3,"file":"panelContext.js","sourceRoot":"","sources":["../../src/stage/panelContext.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;AAEjD,uFAAuF;AACvF,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAE7D,+FAA+F;AAC/F,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC","sourcesContent":["\nimport type { LiquidGlassPanelOptions } from './LiquidGlassPanel.js';\nimport type { StageMinimapDockedView, StagePanelSurface } from './stageTypes.js';\n\nexport const STAGE_CONTEXT_KEY = Symbol('stage');\n\n/** Notifies an active stage that externally positioned panel frames changed layout. */\nexport const STAGE_PANEL_LAYOUT_EVENT = 'stage:panel-layout';\n\n/** Notifies an active stage that an external panel visual changed without affecting layout. */\nexport const STAGE_PANEL_VISUAL_EVENT = 'stage:panel-visual';\n\nexport interface StagePanelPose {\n\twidth: number;\n\theight: number;\n\tposition: { x: number; y: number };\n}\n\nexport interface StagePanelShape {\n\tradius: number;\n\tcontentInset?: number;\n}\n\nexport type StagePanelTheme = Omit<\n\tLiquidGlassPanelOptions,\n\t'width' | 'height' | 'position' | 'radius'\n> & {\n\t/** Semantic surface style. Defaults to the WebGPU-backed `glass` mode. */\n\tsurface?: StagePanelSurface;\n};\n\n\n\nexport interface StagePanelMinimapOptions {\n\texpandedHeight?: number;\n\tinset?: number;\n\t/** Additional unbounded scale applied to the fitted model. Values below 0.2 are clamped. */\n\tmodelScale?: number;\n\t/** Model multiplier at full pointer hover. Use 1 to disable hover enlargement. */\n\thoverModelScale?: number;\n\t/** Hover multiplier used once the minimap is expanded by camera zoom. */\n\texpandedHoverModelScale?: number;\n\t/** Optional spatial-element-specific presentation used while the minimap is docked. */\n\tdockedView?: StageMinimapDockedView;\n\toverlayColor?: string | number;\n\toverlayOpacity?: number;\n\t/** Gaussian blur radius in CSS pixels. */\n\toverlayBlur?: number;\n\tcontextColor?: string | number;\n\tcontextOpacity?: number;\n\tviewportColor?: string | number;\n}\n\nexport interface StagePanelRegistration {\n\tgetContentInset(): number;\n\tgetElement(): HTMLElement | undefined;\n\tgetFrameElement(): HTMLElement | undefined;\n\tgetSurfaceElement(): HTMLElement | undefined;\n\tgetPointerReactive(): boolean | 'lift';\n\tgetFocusReactive?(): boolean | 'top-right';\n\t/** Neighbouring panel frame that shares a corner control's exit path. */\n\tgetFocusAnchor?(): HTMLElement | undefined;\n\tgetNativeContent?(): boolean;\n\t/** Runs synchronously before the native panel surface is measured and drawn. */\n\tupdateNativeLayout?(): void;\n\tgetVisible?(): boolean;\n\t/** Selection is read without rebuilding the minimap model. */\n\tgetMinimapSelected?(): boolean;\n\tgetMinimapOptions(): StagePanelMinimapOptions | undefined;\n\tgetOptions(): LiquidGlassPanelOptions;\n\tgetSurface(): StagePanelSurface;\n\t/** Returns the opacity of the panel surface without affecting panel content. */\n\tgetSurfaceOpacity(): number;\n\t/** Returns a transient presentation scale applied to a rendered minimap model. */\n\tgetMinimapModelScale(): number;\n\t/** Returns the animated transition from the regular to the docked minimap view. */\n\tgetMinimapDockProgress(): number;\n\t/** Returns the viewport-space top edge used to anchor the rendered model. */\n\tgetMinimapModelTop(): number | undefined;\n\tgetMinimapModelLeft?(): number | undefined;\n}\n\nexport interface StageViewportRegistration {\n\tgetElement(): HTMLElement | undefined;\n}\n\nexport interface StageContext {\n\t/** Detail-page ownership; stale route cleanup cannot reset a newer media selection. */\n\tregisterDetailMedia?(read: () => import('../spatial-element/types.js').SpatialElementMediaItem['kind']): () => void;\n\t/** Cached browser layout metrics; unavailable during SSR. */\n\tgetLayoutMetrics?(mode?: 'stable' | 'visible'): import('../spatial-element/responsiveLayout.js').ResponsiveLayoutInput | undefined;\n\t/** Reactive in framework adapters; false during SSR and until the GPU has painted. */\n\tisEnhanced?(): boolean;\n\t/** Local-driver integration is opt-in and may trigger a browser permission prompt. */\n\tsetSpaceMouseEnabled?(enabled: boolean): void;\n\tisSpaceMouseEnabled?(): boolean;\n\tisSpaceMouseDesktop?(): boolean;\n\tgetSpaceMouseState?(): import('./spaceMousePlatform.js').SpaceMouseState;\n\tgetSpaceMousePermission?(): import('./spaceMousePermission.js').SpaceMousePermission;\n\tprefetchSpatialElement?(stage: import('../spatial-element/spatialElementScene.js').SpatialElementScene): void;\n\tregisterPanel(panel: StagePanelRegistration): () => void;\n\t/** Refresh appearance from registered getters without rebinding the page or its camera. */\n\tupdatePanelAppearance?(): void;\n\tregisterViewport(viewport: StageViewportRegistration): () => void;\n\t/** Restores the element camera to its initial fitted pose. */\n\tresetView(): void;\n\t/** True for both native fullscreen and its viewport fallback. */\n\tisFullscreen?(): boolean;\n\t/** Current camera zoom focus, from the fitted detail view (0) to close-up (1). */\n\tgetZoomFocus?(): number;\n\t/** Damped UI focus shared by panels and the document-scrolled detail pane. */\n\tgetZoomUiFocus?(): number;\n\tsetFullscreen?(fullscreen: boolean): void;\n}\n"]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { LiquidGlassPanelOptions } from './LiquidGlassPanel.js';
|
|
2
|
+
/** Applies the cubic Hermite smoothstep curve with clamped endpoints. */
|
|
3
|
+
export declare function smoothstep(edge0: number, edge1: number, value: number): number;
|
|
4
|
+
/** Returns the perspective camera distance that maps viewport pixels to world units. */
|
|
5
|
+
export declare function getPerspectiveDistance(viewportHeight: number, fov: number): number;
|
|
6
|
+
/**
|
|
7
|
+
* Restores the outward screen-space drift that an off-axis panel would receive
|
|
8
|
+
* from the shared perspective while leaving its hover projection panel-local.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getPanelFocusPerspectiveOffset(position: {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
}, advance: number, cameraDistance: number): {
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
};
|
|
17
|
+
/** Computes the camera-facing travel used to clear panels during close-up zoom. */
|
|
18
|
+
export declare function getPanelFocusOffset(options: Pick<Required<LiquidGlassPanelOptions>, 'width' | 'height' | 'position'>, focus: number, viewportWidth: number, viewportHeight: number): {
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
z: number;
|
|
22
|
+
};
|
|
23
|
+
/** Chooses the least disruptive edge toward which a focused panel should travel. */
|
|
24
|
+
export declare function getPanelFocusDirection(options: Pick<Required<LiquidGlassPanelOptions>, 'width' | 'height' | 'position'>, normalizedX: number, normalizedY: number): {
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
};
|
|
28
|
+
/** Shared, eased progress for panel motion, blur, opacity and corner controls. */
|
|
29
|
+
export declare function getPanelFocusProgress(focus: number): number;
|
|
30
|
+
/** Returns panel opacity at a normalized stage UI focus level. */
|
|
31
|
+
export declare function getPanelFocusOpacity(focus: number): number;
|
|
32
|
+
/** Returns CSS content blur at a normalized stage focus level. */
|
|
33
|
+
export declare function getPanelFocusBlur(focus: number, options: Pick<Required<LiquidGlassPanelOptions>, 'width' | 'height'>): number;
|
|
34
|
+
//# sourceMappingURL=panelFocusMath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{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@@ -0,0 +1,79 @@
|
|
|
1
|
+
import * as ScalarMath from './scalarMath.js';
|
|
2
|
+
import { PANEL_FOCUS_PERSPECTIVE_MAX_SCALE, PANEL_FOCUS_MAX_OFFSET, PANEL_FOCUS_MAX_ADVANCE, PANEL_FOCUS_MIN_OPACITY, PANEL_FOCUS_MAX_BLUR } from './stageConstants.js';
|
|
3
|
+
/** Applies the cubic Hermite smoothstep curve with clamped endpoints. */
|
|
4
|
+
export function smoothstep(edge0, edge1, value) {
|
|
5
|
+
if (edge0 === edge1)
|
|
6
|
+
return value < edge0 ? 0 : 1;
|
|
7
|
+
const t = ScalarMath.clamp((value - edge0) / (edge1 - edge0), 0, 1);
|
|
8
|
+
return t * t * (3 - 2 * t);
|
|
9
|
+
}
|
|
10
|
+
/** Returns the perspective camera distance that maps viewport pixels to world units. */
|
|
11
|
+
export function getPerspectiveDistance(viewportHeight, fov) {
|
|
12
|
+
return (viewportHeight * 0.5) / Math.tan(ScalarMath.degToRad(fov * 0.5));
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Restores the outward screen-space drift that an off-axis panel would receive
|
|
16
|
+
* from the shared perspective while leaving its hover projection panel-local.
|
|
17
|
+
*/
|
|
18
|
+
export function getPanelFocusPerspectiveOffset(position, advance, cameraDistance) {
|
|
19
|
+
const safeCameraDistance = Math.max(Number.isFinite(cameraDistance) ? cameraDistance : 1, 1);
|
|
20
|
+
const safeAdvance = Math.max(Number.isFinite(advance) ? advance : 0, 0);
|
|
21
|
+
if (safeAdvance <= 0)
|
|
22
|
+
return { x: 0, y: 0 };
|
|
23
|
+
const projectionScale = ScalarMath.clamp(safeCameraDistance / Math.max(safeCameraDistance - safeAdvance, 1), 1, PANEL_FOCUS_PERSPECTIVE_MAX_SCALE);
|
|
24
|
+
const egressScale = projectionScale - 1;
|
|
25
|
+
return {
|
|
26
|
+
x: position.x * egressScale,
|
|
27
|
+
y: position.y * egressScale
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/** Computes the camera-facing travel used to clear panels during close-up zoom. */
|
|
31
|
+
export function getPanelFocusOffset(options, focus, viewportWidth, viewportHeight) {
|
|
32
|
+
if (focus <= 0.001)
|
|
33
|
+
return { x: 0, y: 0, z: 0 };
|
|
34
|
+
const edgeDistanceX = Math.max(viewportWidth * 0.5 - options.width * 0.5, 1);
|
|
35
|
+
const edgeDistanceY = Math.max(viewportHeight * 0.5 - options.height * 0.5, 1);
|
|
36
|
+
const normalizedX = options.position.x / edgeDistanceX;
|
|
37
|
+
const normalizedY = options.position.y / edgeDistanceY;
|
|
38
|
+
const direction = getPanelFocusDirection(options, normalizedX, normalizedY);
|
|
39
|
+
const horizontal = Math.abs(direction.x) > Math.abs(direction.y);
|
|
40
|
+
const axisSize = horizontal ? options.width : options.height;
|
|
41
|
+
const travel = ScalarMath.clamp(axisSize * (horizontal ? 0.16 : 0.42), horizontal ? 48 : 18, PANEL_FOCUS_MAX_OFFSET);
|
|
42
|
+
const easedFocus = getPanelFocusProgress(focus);
|
|
43
|
+
return {
|
|
44
|
+
x: direction.x * travel * easedFocus,
|
|
45
|
+
y: direction.y * travel * easedFocus,
|
|
46
|
+
z: PANEL_FOCUS_MAX_ADVANCE * easedFocus
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/** Chooses the least disruptive edge toward which a focused panel should travel. */
|
|
50
|
+
export function getPanelFocusDirection(options, normalizedX, normalizedY) {
|
|
51
|
+
const aspect = options.width / Math.max(options.height, 1);
|
|
52
|
+
const absX = Math.abs(normalizedX);
|
|
53
|
+
const absY = Math.abs(normalizedY);
|
|
54
|
+
if (aspect >= 2.4 && absY > 0.12)
|
|
55
|
+
return { x: 0, y: Math.sign(normalizedY) || 1 };
|
|
56
|
+
if (absX > absY * 0.8)
|
|
57
|
+
return { x: Math.sign(normalizedX) || 1, y: 0 };
|
|
58
|
+
if (absY > absX * 0.8)
|
|
59
|
+
return { x: 0, y: Math.sign(normalizedY) || 1 };
|
|
60
|
+
if (normalizedX * normalizedX + normalizedY * normalizedY < 0.02)
|
|
61
|
+
return { x: 0, y: options.position.y >= 0 ? 1 : -1 };
|
|
62
|
+
const length = Math.hypot(normalizedX, normalizedY);
|
|
63
|
+
return { x: normalizedX / length, y: normalizedY / length };
|
|
64
|
+
}
|
|
65
|
+
/** Shared, eased progress for panel motion, blur, opacity and corner controls. */
|
|
66
|
+
export function getPanelFocusProgress(focus) {
|
|
67
|
+
return smoothstep(0.08, 0.96, focus);
|
|
68
|
+
}
|
|
69
|
+
/** Returns panel opacity at a normalized stage UI focus level. */
|
|
70
|
+
export function getPanelFocusOpacity(focus) {
|
|
71
|
+
return ScalarMath.lerp(1, PANEL_FOCUS_MIN_OPACITY, getPanelFocusProgress(focus));
|
|
72
|
+
}
|
|
73
|
+
/** Returns CSS content blur at a normalized stage focus level. */
|
|
74
|
+
export function getPanelFocusBlur(focus, options) {
|
|
75
|
+
const shortSide = Math.max(Math.min(options.width, options.height), 1);
|
|
76
|
+
const sizeScale = ScalarMath.clamp(Math.sqrt(shortSide / 240), 0.34, 1);
|
|
77
|
+
return PANEL_FOCUS_MAX_BLUR * sizeScale * getPanelFocusProgress(focus);
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=panelFocusMath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panelFocusMath.js","sourceRoot":"","sources":["../../src/stage/panelFocusMath.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EACN,iCAAiC,EACjC,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,MAAM,qBAAqB,CAAC;AAE7B,yEAAyE;AACzE,MAAM,UAAU,UAAU,CAAC,KAAa,EAAE,KAAa,EAAE,KAAa;IACrE,IAAI,KAAK,KAAK,KAAK;QAAE,OAAO,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAClD,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C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACtD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IACpD,OAAO,EAAE,CAAC,EAAE,WAAW,GAAG,MAAM,EAAE,CAAC,EAAE,WAAW,GAAG,MAAM,EAAE,CAAC;AAC7D,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,qBAAqB,CAAC,KAAa;IAClD,OAAO,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;AACtC,CAAC;AAED,kEAAkE;AAClE,MAAM,UAAU,oBAAoB,CAAC,KAAa;IACjD,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,uBAAuB,EAAE,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC;AAClF,CAAC;AAED,kEAAkE;AAClE,MAAM,UAAU,iBAAiB,CAChC,KAAa,EACb,OAAoE;IAEpE,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;IACvE,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACxE,OAAO,oBAAoB,GAAG,SAAS,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;AACxE,CAAC","sourcesContent":["import * as ScalarMath from './scalarMath.js';\nimport type { LiquidGlassPanelOptions } from './LiquidGlassPanel.js';\nimport {\n\tPANEL_FOCUS_PERSPECTIVE_MAX_SCALE,\n\tPANEL_FOCUS_MAX_OFFSET,\n\tPANEL_FOCUS_MAX_ADVANCE,\n\tPANEL_FOCUS_MIN_OPACITY,\n\tPANEL_FOCUS_MAX_BLUR\n} from './stageConstants.js';\n\n/** Applies the cubic Hermite smoothstep curve with clamped endpoints. */\nexport function smoothstep(edge0: number, edge1: number, value: number) {\n\tif (edge0 === edge1) return value < edge0 ? 0 : 1;\n\tconst t = ScalarMath.clamp((value - edge0) / (edge1 - edge0), 0, 1);\n\treturn t * t * (3 - 2 * t);\n}\n\n/** Returns the perspective camera distance that maps viewport pixels to world units. */\nexport function getPerspectiveDistance(viewportHeight: number, fov: number) {\n\treturn (viewportHeight * 0.5) / Math.tan(ScalarMath.degToRad(fov * 0.5));\n}\n\n/**\n * Restores the outward screen-space drift that an off-axis panel would receive\n * from the shared perspective while leaving its hover projection panel-local.\n */\nexport function getPanelFocusPerspectiveOffset(\n\tposition: { x: number; y: number },\n\tadvance: number,\n\tcameraDistance: number\n) {\n\tconst safeCameraDistance = Math.max(Number.isFinite(cameraDistance) ? cameraDistance : 1, 1);\n\tconst safeAdvance = Math.max(Number.isFinite(advance) ? advance : 0, 0);\n\tif (safeAdvance <= 0) return { x: 0, y: 0 };\n\n\tconst projectionScale = ScalarMath.clamp(\n\t\tsafeCameraDistance / Math.max(safeCameraDistance - safeAdvance, 1),\n\t\t1,\n\t\tPANEL_FOCUS_PERSPECTIVE_MAX_SCALE\n\t);\n\tconst egressScale = projectionScale - 1;\n\n\treturn {\n\t\tx: position.x * egressScale,\n\t\ty: position.y * egressScale\n\t};\n}\n\n/** Computes the camera-facing travel used to clear panels during close-up zoom. */\nexport function getPanelFocusOffset(\n\toptions: Pick<Required<LiquidGlassPanelOptions>, 'width' | 'height' | 'position'>,\n\tfocus: number,\n\tviewportWidth: number,\n\tviewportHeight: number\n) {\n\tif (focus <= 0.001) return { x: 0, y: 0, z: 0 };\n\tconst edgeDistanceX = Math.max(viewportWidth * 0.5 - options.width * 0.5, 1);\n\tconst edgeDistanceY = Math.max(viewportHeight * 0.5 - options.height * 0.5, 1);\n\tconst normalizedX = options.position.x / edgeDistanceX;\n\tconst normalizedY = options.position.y / edgeDistanceY;\n\tconst direction = getPanelFocusDirection(options, normalizedX, normalizedY);\n\tconst horizontal = Math.abs(direction.x) > Math.abs(direction.y);\n\tconst axisSize = horizontal ? options.width : options.height;\n\tconst travel = ScalarMath.clamp(\n\t\taxisSize * (horizontal ? 0.16 : 0.42),\n\t\thorizontal ? 48 : 18,\n\t\tPANEL_FOCUS_MAX_OFFSET\n\t);\n\tconst easedFocus = getPanelFocusProgress(focus);\n\treturn {\n\t\tx: direction.x * travel * easedFocus,\n\t\ty: direction.y * travel * easedFocus,\n\t\tz: PANEL_FOCUS_MAX_ADVANCE * easedFocus\n\t};\n}\n\n/** Chooses the least disruptive edge toward which a focused panel should travel. */\nexport function getPanelFocusDirection(\n\toptions: Pick<Required<LiquidGlassPanelOptions>, 'width' | 'height' | 'position'>,\n\tnormalizedX: number,\n\tnormalizedY: number\n) {\n\tconst aspect = options.width / Math.max(options.height, 1);\n\tconst absX = Math.abs(normalizedX);\n\tconst absY = Math.abs(normalizedY);\n\tif (aspect >= 2.4 && absY > 0.12) return { x: 0, y: Math.sign(normalizedY) || 1 };\n\tif (absX > absY * 0.8) return { x: Math.sign(normalizedX) || 1, y: 0 };\n\tif (absY > absX * 0.8) return { x: 0, y: Math.sign(normalizedY) || 1 };\n\tif (normalizedX * normalizedX + normalizedY * normalizedY < 0.02)\n\t\treturn { x: 0, y: options.position.y >= 0 ? 1 : -1 };\n\tconst length = Math.hypot(normalizedX, normalizedY);\n\treturn { x: normalizedX / length, y: normalizedY / length };\n}\n\n/** Shared, eased progress for panel motion, blur, opacity and corner controls. */\nexport function getPanelFocusProgress(focus: number) {\n\treturn smoothstep(0.08, 0.96, focus);\n}\n\n/** Returns panel opacity at a normalized stage UI focus level. */\nexport function getPanelFocusOpacity(focus: number) {\n\treturn ScalarMath.lerp(1, PANEL_FOCUS_MIN_OPACITY, getPanelFocusProgress(focus));\n}\n\n/** Returns CSS content blur at a normalized stage focus level. */\nexport function getPanelFocusBlur(\n\tfocus: number,\n\toptions: Pick<Required<LiquidGlassPanelOptions>, 'width' | 'height'>\n) {\n\tconst shortSide = Math.max(Math.min(options.width, options.height), 1);\n\tconst sizeScale = ScalarMath.clamp(Math.sqrt(shortSide / 240), 0.34, 1);\n\treturn PANEL_FOCUS_MAX_BLUR * sizeScale * getPanelFocusProgress(focus);\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { StageRenderSettings } from './stageTypes.js';
|
|
2
|
+
export interface ResolvedStageRenderSettings {
|
|
3
|
+
maxPixelRatio: number;
|
|
4
|
+
maxPixels: number | null;
|
|
5
|
+
}
|
|
6
|
+
export declare const DEFAULT_STAGE_RENDER_SETTINGS: Readonly<ResolvedStageRenderSettings>;
|
|
7
|
+
export declare function resolveStageRenderSettings(settings?: StageRenderSettings): ResolvedStageRenderSettings;
|
|
8
|
+
/** Keep the viewport aspect ratio and allow subsampling on very large displays. */
|
|
9
|
+
export declare function getStageRenderPixelRatio(width: number, height: number, devicePixelRatio: number, settings?: Readonly<ResolvedStageRenderSettings>): number;
|
|
10
|
+
//# sourceMappingURL=renderSettings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderSettings.d.ts","sourceRoot":"","sources":["../../src/stage/renderSettings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,MAAM,WAAW,2BAA2B;IAC3C,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,2BAA2B,CAG/E,CAAC;AAEF,wBAAgB,0BAA0B,CACzC,QAAQ,GAAE,mBAAwB,GAChC,2BAA2B,CAa7B;AAED,mFAAmF;AACnF,wBAAgB,wBAAwB,CACvC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,MAAM,EACxB,QAAQ,GAAE,QAAQ,CAAC,2BAA2B,CAAiC,UAW/E"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export const DEFAULT_STAGE_RENDER_SETTINGS = {
|
|
2
|
+
maxPixelRatio: 1,
|
|
3
|
+
maxPixels: 1920 * 1080
|
|
4
|
+
};
|
|
5
|
+
export function resolveStageRenderSettings(settings = {}) {
|
|
6
|
+
return {
|
|
7
|
+
maxPixelRatio: Number.isFinite(settings.maxPixelRatio) && settings.maxPixelRatio > 0
|
|
8
|
+
? settings.maxPixelRatio
|
|
9
|
+
: DEFAULT_STAGE_RENDER_SETTINGS.maxPixelRatio,
|
|
10
|
+
maxPixels: settings.maxPixels === null
|
|
11
|
+
? null
|
|
12
|
+
: Number.isFinite(settings.maxPixels) && settings.maxPixels > 0
|
|
13
|
+
? Math.max(1, Math.floor(settings.maxPixels))
|
|
14
|
+
: DEFAULT_STAGE_RENDER_SETTINGS.maxPixels
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/** Keep the viewport aspect ratio and allow subsampling on very large displays. */
|
|
18
|
+
export function getStageRenderPixelRatio(width, height, devicePixelRatio, settings = DEFAULT_STAGE_RENDER_SETTINGS) {
|
|
19
|
+
const viewportWidth = Number.isFinite(width) && width > 0 ? width : 1;
|
|
20
|
+
const viewportHeight = Number.isFinite(height) && height > 0 ? height : 1;
|
|
21
|
+
const nativeRatio = Number.isFinite(devicePixelRatio) && devicePixelRatio > 0 ? devicePixelRatio : 1;
|
|
22
|
+
const pixelBudgetRatio = settings.maxPixels === null
|
|
23
|
+
? Infinity
|
|
24
|
+
: Math.sqrt(settings.maxPixels / (viewportWidth * viewportHeight));
|
|
25
|
+
return Math.min(nativeRatio, settings.maxPixelRatio, pixelBudgetRatio);
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=renderSettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderSettings.js","sourceRoot":"","sources":["../../src/stage/renderSettings.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,6BAA6B,GAA0C;IACnF,aAAa,EAA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I;QAC1B,CAAC,CAAC,QAAQ;QACV,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,GAAG,CAAC,aAAa,GAAG,cAAc,CAAC,CAAC,CAAC;IACrE,OAAO,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,QAAQ,CAAC,aAAa,EAAE,gBAAgB,CAAC,CAAC;AACxE,CAAC","sourcesContent":["import type { StageRenderSettings } from './stageTypes.js';\n\nexport interface ResolvedStageRenderSettings {\n\tmaxPixelRatio: number;\n\tmaxPixels: number | null;\n}\n\nexport const DEFAULT_STAGE_RENDER_SETTINGS: Readonly<ResolvedStageRenderSettings> = {\n\tmaxPixelRatio: 1,\n\tmaxPixels: 1920 * 1080\n};\n\nexport function resolveStageRenderSettings(\n\tsettings: StageRenderSettings = {}\n): ResolvedStageRenderSettings {\n\treturn {\n\t\tmaxPixelRatio:\n\t\t\tNumber.isFinite(settings.maxPixelRatio) && settings.maxPixelRatio! > 0\n\t\t\t\t? settings.maxPixelRatio!\n\t\t\t\t: DEFAULT_STAGE_RENDER_SETTINGS.maxPixelRatio,\n\t\tmaxPixels:\n\t\t\tsettings.maxPixels === null\n\t\t\t\t? null\n\t\t\t\t: Number.isFinite(settings.maxPixels) && settings.maxPixels! > 0\n\t\t\t\t\t? Math.max(1, Math.floor(settings.maxPixels!))\n\t\t\t\t\t: DEFAULT_STAGE_RENDER_SETTINGS.maxPixels\n\t};\n}\n\n/** Keep the viewport aspect ratio and allow subsampling on very large displays. */\nexport function getStageRenderPixelRatio(\n\twidth: number,\n\theight: number,\n\tdevicePixelRatio: number,\n\tsettings: Readonly<ResolvedStageRenderSettings> = DEFAULT_STAGE_RENDER_SETTINGS\n) {\n\tconst viewportWidth = Number.isFinite(width) && width > 0 ? width : 1;\n\tconst viewportHeight = Number.isFinite(height) && height > 0 ? height : 1;\n\tconst nativeRatio =\n\t\tNumber.isFinite(devicePixelRatio) && devicePixelRatio > 0 ? devicePixelRatio : 1;\n\tconst pixelBudgetRatio =\n\t\tsettings.maxPixels === null\n\t\t\t? Infinity\n\t\t\t: Math.sqrt(settings.maxPixels / (viewportWidth * viewportHeight));\n\treturn Math.min(nativeRatio, settings.maxPixelRatio, pixelBudgetRatio);\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RenderTarget } from 'three/webgpu';
|
|
2
|
-
/** Three
|
|
2
|
+
/** Three r186 diagnostic adapter only; never used for rendering or ownership. */
|
|
3
3
|
export declare function gaussianTargets(effect: unknown): RenderTarget[];
|
|
4
4
|
export declare function describeRenderTargets(groups: Readonly<Record<string, readonly RenderTarget[]>>): {
|
|
5
5
|
liveTargets: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Three
|
|
1
|
+
/** Three r186 diagnostic adapter only; never used for rendering or ownership. */
|
|
2
2
|
export function gaussianTargets(effect) {
|
|
3
3
|
const node = effect;
|
|
4
4
|
return [node?._horizontalRT, node?._verticalRT].filter((target) => Boolean(target));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderTargetInventory.js","sourceRoot":"","sources":["../../src/stage/renderTargetInventory.ts"],"names":[],"mappings":"AAEA,iFAAiF;AACjF,MAAM,UAAU,eAAe,CAAC,MAAe;IAC9C,MAAM,IAAI,GAAG,MAAkF,CAAC;IAChG,OAAO,CAAC,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAA0B,EAAE,CACzF,OAAO,CAAC,MAAM,CAAC,CACf,CAAC;AACH,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,MAAyD;IAC9F,MAAM,IAAI,GAAG,IAAI,GAAG,EAAgB,CAAC;IACrC,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,EAAE,CAClE,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QACzB,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC;YAAE,OAAO,EAAE,CAAC;QAChC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACjB,OAAO;YACN;gBACC,KAAK;gBACL,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI;gBACvB,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,KAAK,EAAE,MAAM,CAAC,WAAW;gBACzB,gBAAgB,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM;gBACxC,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI;aAC9B;SACD,CAAC;IACH,CAAC,CAAC,CACF,CAAC;IACF,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC;AACjD,CAAC","sourcesContent":["import type { RenderTarget } from 'three/webgpu';\n\n/** Three
|
|
1
|
+
{"version":3,"file":"renderTargetInventory.js","sourceRoot":"","sources":["../../src/stage/renderTargetInventory.ts"],"names":[],"mappings":"AAEA,iFAAiF;AACjF,MAAM,UAAU,eAAe,CAAC,MAAe;IAC9C,MAAM,IAAI,GAAG,MAAkF,CAAC;IAChG,OAAO,CAAC,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAA0B,EAAE,CACzF,OAAO,CAAC,MAAM,CAAC,CACf,CAAC;AACH,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,MAAyD;IAC9F,MAAM,IAAI,GAAG,IAAI,GAAG,EAAgB,CAAC;IACrC,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,EAAE,CAClE,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QACzB,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC;YAAE,OAAO,EAAE,CAAC;QAChC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACjB,OAAO;YACN;gBACC,KAAK;gBACL,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI;gBACvB,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,KAAK,EAAE,MAAM,CAAC,WAAW;gBACzB,gBAAgB,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM;gBACxC,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI;aAC9B;SACD,CAAC;IACH,CAAC,CAAC,CACF,CAAC;IACF,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC;AACjD,CAAC","sourcesContent":["import type { RenderTarget } from 'three/webgpu';\n\n/** Three r186 diagnostic adapter only; never used for rendering or ownership. */\nexport function gaussianTargets(effect: unknown): RenderTarget[] {\n\tconst node = effect as { _horizontalRT?: RenderTarget; _verticalRT?: RenderTarget } | undefined;\n\treturn [node?._horizontalRT, node?._verticalRT].filter((target): target is RenderTarget =>\n\t\tBoolean(target)\n\t);\n}\n\nexport function describeRenderTargets(groups: Readonly<Record<string, readonly RenderTarget[]>>) {\n\tconst seen = new Set<RenderTarget>();\n\tconst targets = Object.entries(groups).flatMap(([owner, values]) =>\n\t\tvalues.flatMap((target) => {\n\t\t\tif (seen.has(target)) return [];\n\t\t\tseen.add(target);\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\towner,\n\t\t\t\t\tid: target.texture.uuid,\n\t\t\t\t\twidth: target.width,\n\t\t\t\t\theight: target.height,\n\t\t\t\t\tsamples: target.samples,\n\t\t\t\t\tdepth: target.depthBuffer,\n\t\t\t\t\tcolorAttachments: target.textures.length,\n\t\t\t\t\tcolorType: target.texture.type\n\t\t\t\t}\n\t\t\t];\n\t\t})\n\t);\n\treturn { liveTargets: targets.length, targets };\n}\n"]}
|
|
@@ -4,6 +4,8 @@ type RendererStatePort = Pick<WebGPURenderer, 'getCanvasTarget' | 'setCanvasTarg
|
|
|
4
4
|
setViewport(value: Vector4): void;
|
|
5
5
|
setScissor(value: Vector4): void;
|
|
6
6
|
};
|
|
7
|
+
/** A cached uniform attachment must be complete on WebGPU and its WebGL fallback. */
|
|
8
|
+
export declare function clearFullTarget(renderer: Pick<WebGPURenderer, 'getScissorTest' | 'setScissorTest' | 'clear'>): void;
|
|
7
9
|
/** A pass borrows renderer state; failures must not poison the next output band. */
|
|
8
10
|
export declare function withRendererState<T>(renderer: RendererStatePort, draw: () => T): T;
|
|
9
11
|
/** Restore borrowed scene visibility even if a WebGPU pass throws. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rendererState.d.ts","sourceRoot":"","sources":["../../src/stage/rendererState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,OAAO,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,KAAK,iBAAiB,GAAG,IAAI,CAC5B,cAAc,EACZ,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,GACjB,eAAe,GACf,eAAe,GACf,eAAe,GACf,aAAa,GACb,YAAY,GACZ,gBAAgB,GAChB,gBAAgB,CAClB,GAAG;IAAE,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IAAC,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAA;CAAE,CAAC;AAE5E,oFAAoF;AACpF,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,CAkBlF;AAED,sEAAsE;AACtE,wBAAgB,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,CAS1F"}
|
|
1
|
+
{"version":3,"file":"rendererState.d.ts","sourceRoot":"","sources":["../../src/stage/rendererState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,OAAO,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,KAAK,iBAAiB,GAAG,IAAI,CAC5B,cAAc,EACZ,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,GACjB,eAAe,GACf,eAAe,GACf,eAAe,GACf,aAAa,GACb,YAAY,GACZ,gBAAgB,GAChB,gBAAgB,CAClB,GAAG;IAAE,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IAAC,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAA;CAAE,CAAC;AAE5E,qFAAqF;AACrF,wBAAgB,eAAe,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,EAAE,gBAAgB,GAAG,gBAAgB,GAAG,OAAO,CAAC,QAK5G;AAED,oFAAoF;AACpF,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,CAkBlF;AAED,sEAAsE;AACtE,wBAAgB,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,CAS1F"}
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
import { Color, Vector4 } from 'three/webgpu';
|
|
2
|
+
/** A cached uniform attachment must be complete on WebGPU and its WebGL fallback. */
|
|
3
|
+
export function clearFullTarget(renderer) {
|
|
4
|
+
const scissorTest = renderer.getScissorTest();
|
|
5
|
+
if (scissorTest)
|
|
6
|
+
renderer.setScissorTest(false);
|
|
7
|
+
try {
|
|
8
|
+
renderer.clear();
|
|
9
|
+
}
|
|
10
|
+
finally {
|
|
11
|
+
if (scissorTest)
|
|
12
|
+
renderer.setScissorTest(true);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
2
15
|
/** A pass borrows renderer state; failures must not poison the next output band. */
|
|
3
16
|
export function withRendererState(renderer, draw) {
|
|
4
17
|
const canvas = renderer.getCanvasTarget();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rendererState.js","sourceRoot":"","sources":["../../src/stage/rendererState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAkB9C,oFAAoF;AACpF,MAAM,UAAU,iBAAiB,CAAI,QAA2B,EAAE,IAAa;IAC9E,MAAM,MAAM,GAAG,QAAQ,CAAC,eAAe,EAAE,CAAC;IAC1C,MAAM,MAAM,GAAG,QAAQ,CAAC,eAAe,EAAE,CAAC;IAC1C,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IAClD,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,EAAE,CAAC;IACvC,MAAM,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,IAAI,OAAO,EAAE,CAAC,CAAC;IACrD,MAAM,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,IAAI,OAAO,EAAE,CAAC,CAAC;IACnD,MAAM,WAAW,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;IAC9C,IAAI,CAAC;QACJ,OAAO,IAAI,EAAE,CAAC;IACf,CAAC;YAAS,CAAC;QACV,QAAQ,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QACjC,QAAQ,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QACjC,QAAQ,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACrC,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAC/B,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAC7B,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IACtC,CAAC;AACF,CAAC;AAED,sEAAsE;AACtE,MAAM,UAAU,cAAc,CAAI,KAAsC,EAAE,IAAa;IACtF,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAClD,IAAI,CAAC;QACJ,OAAO,IAAI,EAAE,CAAC;IACf,CAAC;YAAS,CAAC;QACV,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;YAC7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;IACJ,CAAC;AACF,CAAC","sourcesContent":["import { Color, Vector4 } from 'three/webgpu';\nimport type { WebGPURenderer } from 'three/webgpu';\n\ntype RendererStatePort = Pick<\n\tWebGPURenderer,\n\t| 'getCanvasTarget'\n\t| 'setCanvasTarget'\n\t| 'getRenderTarget'\n\t| 'setRenderTarget'\n\t| 'getClearColor'\n\t| 'getClearAlpha'\n\t| 'setClearColor'\n\t| 'getViewport'\n\t| 'getScissor'\n\t| 'getScissorTest'\n\t| 'setScissorTest'\n> & { setViewport(value: Vector4): void; setScissor(value: Vector4): void };\n\n/** A pass borrows renderer state; failures must not poison the next output band. */\nexport function withRendererState<T>(renderer: RendererStatePort, draw: () => T): T {\n\tconst canvas = renderer.getCanvasTarget();\n\tconst target = renderer.getRenderTarget();\n\tconst color = renderer.getClearColor(new Color());\n\tconst alpha = renderer.getClearAlpha();\n\tconst viewport = renderer.getViewport(new Vector4());\n\tconst scissor = renderer.getScissor(new Vector4());\n\tconst scissorTest = renderer.getScissorTest();\n\ttry {\n\t\treturn draw();\n\t} finally {\n\t\trenderer.setCanvasTarget(canvas);\n\t\trenderer.setRenderTarget(target);\n\t\trenderer.setClearColor(color, alpha);\n\t\trenderer.setViewport(viewport);\n\t\trenderer.setScissor(scissor);\n\t\trenderer.setScissorTest(scissorTest);\n\t}\n}\n\n/** Restore borrowed scene visibility even if a WebGPU pass throws. */\nexport function withVisibility<T>(nodes: readonly { visible: boolean }[], draw: () => T): T {\n\tconst visible = nodes.map((node) => node.visible);\n\ttry {\n\t\treturn draw();\n\t} finally {\n\t\tnodes.forEach((node, index) => {\n\t\t\tnode.visible = visible[index];\n\t\t});\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"rendererState.js","sourceRoot":"","sources":["../../src/stage/rendererState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAkB9C,qFAAqF;AACrF,MAAM,UAAU,eAAe,CAAC,QAA6E;IAC5G,MAAM,WAAW,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;IAC9C,IAAI,WAAW;QAAE,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAChD,IAAI,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;IAAC,CAAC;YACjB,CAAC;QAAC,IAAI,WAAW;YAAE,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAAC,CAAC;AAC5D,CAAC;AAED,oFAAoF;AACpF,MAAM,UAAU,iBAAiB,CAAI,QAA2B,EAAE,IAAa;IAC9E,MAAM,MAAM,GAAG,QAAQ,CAAC,eAAe,EAAE,CAAC;IAC1C,MAAM,MAAM,GAAG,QAAQ,CAAC,eAAe,EAAE,CAAC;IAC1C,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IAClD,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,EAAE,CAAC;IACvC,MAAM,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,IAAI,OAAO,EAAE,CAAC,CAAC;IACrD,MAAM,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,IAAI,OAAO,EAAE,CAAC,CAAC;IACnD,MAAM,WAAW,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;IAC9C,IAAI,CAAC;QACJ,OAAO,IAAI,EAAE,CAAC;IACf,CAAC;YAAS,CAAC;QACV,QAAQ,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QACjC,QAAQ,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QACjC,QAAQ,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACrC,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAC/B,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAC7B,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IACtC,CAAC;AACF,CAAC;AAED,sEAAsE;AACtE,MAAM,UAAU,cAAc,CAAI,KAAsC,EAAE,IAAa;IACtF,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAClD,IAAI,CAAC;QACJ,OAAO,IAAI,EAAE,CAAC;IACf,CAAC;YAAS,CAAC;QACV,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;YAC7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;IACJ,CAAC;AACF,CAAC","sourcesContent":["import { Color, Vector4 } from 'three/webgpu';\nimport type { WebGPURenderer } from 'three/webgpu';\n\ntype RendererStatePort = Pick<\n\tWebGPURenderer,\n\t| 'getCanvasTarget'\n\t| 'setCanvasTarget'\n\t| 'getRenderTarget'\n\t| 'setRenderTarget'\n\t| 'getClearColor'\n\t| 'getClearAlpha'\n\t| 'setClearColor'\n\t| 'getViewport'\n\t| 'getScissor'\n\t| 'getScissorTest'\n\t| 'setScissorTest'\n> & { setViewport(value: Vector4): void; setScissor(value: Vector4): void };\n\n/** A cached uniform attachment must be complete on WebGPU and its WebGL fallback. */\nexport function clearFullTarget(renderer: Pick<WebGPURenderer, 'getScissorTest' | 'setScissorTest' | 'clear'>) {\n\tconst scissorTest = renderer.getScissorTest();\n\tif (scissorTest) renderer.setScissorTest(false);\n\ttry { renderer.clear(); }\n\tfinally { if (scissorTest) renderer.setScissorTest(true); }\n}\n\n/** A pass borrows renderer state; failures must not poison the next output band. */\nexport function withRendererState<T>(renderer: RendererStatePort, draw: () => T): T {\n\tconst canvas = renderer.getCanvasTarget();\n\tconst target = renderer.getRenderTarget();\n\tconst color = renderer.getClearColor(new Color());\n\tconst alpha = renderer.getClearAlpha();\n\tconst viewport = renderer.getViewport(new Vector4());\n\tconst scissor = renderer.getScissor(new Vector4());\n\tconst scissorTest = renderer.getScissorTest();\n\ttry {\n\t\treturn draw();\n\t} finally {\n\t\trenderer.setCanvasTarget(canvas);\n\t\trenderer.setRenderTarget(target);\n\t\trenderer.setClearColor(color, alpha);\n\t\trenderer.setViewport(viewport);\n\t\trenderer.setScissor(scissor);\n\t\trenderer.setScissorTest(scissorTest);\n\t}\n}\n\n/** Restore borrowed scene visibility even if a WebGPU pass throws. */\nexport function withVisibility<T>(nodes: readonly { visible: boolean }[], draw: () => T): T {\n\tconst visible = nodes.map((node) => node.visible);\n\ttry {\n\t\treturn draw();\n\t} finally {\n\t\tnodes.forEach((node, index) => {\n\t\t\tnode.visible = visible[index];\n\t\t});\n\t}\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Scalar helpers shared by native layout and the optional renderer. */
|
|
2
|
+
export declare const clamp: (value: number, min: number, max: number) => number;
|
|
3
|
+
export declare const lerp: (start: number, end: number, progress: number) => number;
|
|
4
|
+
export declare const degToRad: (degrees: number) => number;
|
|
5
|
+
export declare const radToDeg: (radians: number) => number;
|
|
6
|
+
//# sourceMappingURL=scalarMath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scalarMath.d.ts","sourceRoot":"","sources":["../../src/stage/scalarMath.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,WACzB,CAAC;AACrC,eAAO,MAAM,IAAI,GAAI,OAAO,MAAM,EAAE,KAAK,MAAM,EAAE,UAAU,MAAM,WACzB,CAAC;AACzC,eAAO,MAAM,QAAQ,GAAI,SAAS,MAAM,WAA8B,CAAC;AACvE,eAAO,MAAM,QAAQ,GAAI,SAAS,MAAM,WAA8B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Scalar helpers shared by native layout and the optional renderer. */
|
|
2
|
+
export const clamp = (value, min, max) => Math.max(min, Math.min(max, value));
|
|
3
|
+
export const lerp = (start, end, progress) => (1 - progress) * start + progress * end;
|
|
4
|
+
export const degToRad = (degrees) => (degrees * Math.PI) / 180;
|
|
5
|
+
export const radToDeg = (radians) => (radians * 180) / Math.PI;
|
|
6
|
+
//# sourceMappingURL=scalarMath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scalarMath.js","sourceRoot":"","sources":["../../src/stage/scalarMath.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW,EAAE,EAAE,CAChE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AACrC,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,KAAa,EAAE,GAAW,EAAE,QAAgB,EAAE,EAAE,CACpE,CAAC,CAAC,GAAG,QAAQ,CAAC,GAAG,KAAK,GAAG,QAAQ,GAAG,GAAG,CAAC;AACzC,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC;AACvE,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,CAAC,OAAO,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC","sourcesContent":["/** Scalar helpers shared by native layout and the optional renderer. */\nexport const clamp = (value: number, min: number, max: number) =>\n\tMath.max(min, Math.min(max, value));\nexport const lerp = (start: number, end: number, progress: number) =>\n\t(1 - progress) * start + progress * end;\nexport const degToRad = (degrees: number) => (degrees * Math.PI) / 180;\nexport const radToDeg = (radians: number) => (radians * 180) / Math.PI;\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as THREE from 'three/webgpu';
|
|
2
|
+
export interface SceneEndpointGuard {
|
|
3
|
+
/** Checks recorded values only: no scene traversal, matrix update or allocation. */
|
|
4
|
+
isValid(): boolean;
|
|
5
|
+
dispose(): void;
|
|
6
|
+
}
|
|
7
|
+
/** A narrow, static standard-material scene. Stage owns binding/size/input eligibility;
|
|
8
|
+
* Refinement owns target-write epochs and must recheck them after its GPU fence.
|
|
9
|
+
*/
|
|
10
|
+
export declare function createSceneEndpointGuard(options: {
|
|
11
|
+
scene: THREE.Scene;
|
|
12
|
+
camera: THREE.Camera;
|
|
13
|
+
model: THREE.Object3D;
|
|
14
|
+
low: THREE.Object3D;
|
|
15
|
+
high: THREE.Object3D;
|
|
16
|
+
highEnvironment?: THREE.Texture;
|
|
17
|
+
additionalScenes?: readonly THREE.Scene[];
|
|
18
|
+
additionalCameras?: readonly THREE.Camera[];
|
|
19
|
+
}): SceneEndpointGuard | undefined;
|
|
20
|
+
//# sourceMappingURL=sceneEndpointEligibility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sceneEndpointEligibility.d.ts","sourceRoot":"","sources":["../../src/stage/sceneEndpointEligibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,MAAM,WAAW,kBAAkB;IAClC,oFAAoF;IACpF,OAAO,IAAI,OAAO,CAAC;IACnB,OAAO,IAAI,IAAI,CAAC;CAChB;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE;IACjD,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC;IACnB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC;IACrB,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC;IACtB,GAAG,EAAE,KAAK,CAAC,QAAQ,CAAC;IACpB,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC;IACrB,eAAe,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC;IAChC,gBAAgB,CAAC,EAAE,SAAS,KAAK,CAAC,KAAK,EAAE,CAAC;IAC1C,iBAAiB,CAAC,EAAE,SAAS,KAAK,CAAC,MAAM,EAAE,CAAC;CAC5C,GAAG,kBAAkB,GAAG,SAAS,CA0OjC"}
|