@crystaldesign/real-time-viewer-next 26.11.0-beta.18
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/build/esm/DeckCutoutSubsystem-76dfe828.js +2536 -0
- package/build/esm/SunLensflare-e4ab3f81.js +483 -0
- package/build/esm/WaterSurface-93383fdf.js +2041 -0
- package/build/esm/index-920dd901.js +23273 -0
- package/build/esm/index.js +32 -0
- package/build/types/real-time-viewer-next/src/RealTimeRendererNext.d.ts +58 -0
- package/build/types/real-time-viewer-next/src/RealTimeRendererNext.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/analyzerComponents.d.ts +23 -0
- package/build/types/real-time-viewer-next/src/analyzerComponents.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/analyzerStageContext.d.ts +9 -0
- package/build/types/real-time-viewer-next/src/analyzerStageContext.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/capture/applyShot.d.ts +8 -0
- package/build/types/real-time-viewer-next/src/capture/applyShot.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/capture/blob.d.ts +11 -0
- package/build/types/real-time-viewer-next/src/capture/blob.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/capture/materialMute.d.ts +16 -0
- package/build/types/real-time-viewer-next/src/capture/materialMute.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/capture/shotState.d.ts +24 -0
- package/build/types/real-time-viewer-next/src/capture/shotState.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/capture/types.d.ts +80 -0
- package/build/types/real-time-viewer-next/src/capture/types.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/capture/useCaptureEngine.d.ts +7 -0
- package/build/types/real-time-viewer-next/src/capture/useCaptureEngine.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/config/descriptor.d.ts +156 -0
- package/build/types/real-time-viewer-next/src/config/descriptor.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/config/descriptor.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/config/descriptor.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/config/environment.config.d.ts +511 -0
- package/build/types/real-time-viewer-next/src/config/environment.config.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/config/environment.config.test.d.ts +5 -0
- package/build/types/real-time-viewer-next/src/config/environment.config.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/BBoxPreloader.d.ts +15 -0
- package/build/types/real-time-viewer-next/src/core/BBoxPreloader.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/FloorGrid.d.ts +3 -0
- package/build/types/real-time-viewer-next/src/core/FloorGrid.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/GeoBBoxReporter.d.ts +10 -0
- package/build/types/real-time-viewer-next/src/core/GeoBBoxReporter.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/GeoInstance.d.ts +13 -0
- package/build/types/real-time-viewer-next/src/core/GeoInstance.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/PaletteDragPreview.d.ts +19 -0
- package/build/types/real-time-viewer-next/src/core/PaletteDragPreview.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/PerfLog.d.ts +38 -0
- package/build/types/real-time-viewer-next/src/core/PerfLog.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/PlannerGrid.d.ts +83 -0
- package/build/types/real-time-viewer-next/src/core/PlannerGrid.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/R3FAssetBoundary.d.ts +31 -0
- package/build/types/real-time-viewer-next/src/core/R3FAssetBoundary.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/RTVErrorBoundary.d.ts +16 -0
- package/build/types/real-time-viewer-next/src/core/RTVErrorBoundary.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/SceneRenderer.d.ts +3 -0
- package/build/types/real-time-viewer-next/src/core/SceneRenderer.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/SceneTree.d.ts +16 -0
- package/build/types/real-time-viewer-next/src/core/SceneTree.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/VariantMeshOverride.d.ts +62 -0
- package/build/types/real-time-viewer-next/src/core/VariantMeshOverride.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/camera/CameraController.d.ts +3 -0
- package/build/types/real-time-viewer-next/src/core/camera/CameraController.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/camera/cameraAnimationEngine.d.ts +69 -0
- package/build/types/real-time-viewer-next/src/core/camera/cameraAnimationEngine.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/camera/cameraPoseBook.d.ts +24 -0
- package/build/types/real-time-viewer-next/src/core/camera/cameraPoseBook.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/camera/controlsLock.d.ts +25 -0
- package/build/types/real-time-viewer-next/src/core/camera/controlsLock.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/camera/sectorLimits.d.ts +38 -0
- package/build/types/real-time-viewer-next/src/core/camera/sectorLimits.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/camera/sectorLimits.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/core/camera/sectorLimits.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/camera/useAutoFrame.d.ts +29 -0
- package/build/types/real-time-viewer-next/src/core/camera/useAutoFrame.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/camera/useAutoRotate.d.ts +8 -0
- package/build/types/real-time-viewer-next/src/core/camera/useAutoRotate.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/camera/useCameraActions.d.ts +13 -0
- package/build/types/real-time-viewer-next/src/core/camera/useCameraActions.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/camera/useCameraAnimation.d.ts +15 -0
- package/build/types/real-time-viewer-next/src/core/camera/useCameraAnimation.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/camera/useCameraConstraints.d.ts +25 -0
- package/build/types/real-time-viewer-next/src/core/camera/useCameraConstraints.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/camera/useCameraSmoothing.d.ts +57 -0
- package/build/types/real-time-viewer-next/src/core/camera/useCameraSmoothing.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/camera/useMaterialFade.d.ts +5 -0
- package/build/types/real-time-viewer-next/src/core/camera/useMaterialFade.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/camera/useViewModeTransition.d.ts +19 -0
- package/build/types/real-time-viewer-next/src/core/camera/useViewModeTransition.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/dimension-lines/DimensionLine2D.d.ts +28 -0
- package/build/types/real-time-viewer-next/src/core/dimension-lines/DimensionLine2D.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/dimension-lines/DimensionLines2D.d.ts +3 -0
- package/build/types/real-time-viewer-next/src/core/dimension-lines/DimensionLines2D.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/dimension-lines/DimensionLines3D.d.ts +3 -0
- package/build/types/real-time-viewer-next/src/core/dimension-lines/DimensionLines3D.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/dimension-lines/dimensionGeometry.d.ts +34 -0
- package/build/types/real-time-viewer-next/src/core/dimension-lines/dimensionGeometry.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/dimension-lines/dimensionLineBuilders.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/core/dimension-lines/dimensionLineBuilders.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/dimension-lines/dimensionLineBuilders2D.d.ts +82 -0
- package/build/types/real-time-viewer-next/src/core/dimension-lines/dimensionLineBuilders2D.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/dimension-lines/dimensionLineBuilders3D.d.ts +76 -0
- package/build/types/real-time-viewer-next/src/core/dimension-lines/dimensionLineBuilders3D.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/dimension-lines/dimensionLines.config.d.ts +25 -0
- package/build/types/real-time-viewer-next/src/core/dimension-lines/dimensionLines.config.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/dimension-lines/dimensionLines.config.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/core/dimension-lines/dimensionLines.config.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/dimension-lines/index.d.ts +3 -0
- package/build/types/real-time-viewer-next/src/core/dimension-lines/index.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/dimension-lines/useDimensionFade.d.ts +12 -0
- package/build/types/real-time-viewer-next/src/core/dimension-lines/useDimensionFade.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/dimension-lines/useLabelScale.d.ts +11 -0
- package/build/types/real-time-viewer-next/src/core/dimension-lines/useLabelScale.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/dimension-lines/utils.d.ts +26 -0
- package/build/types/real-time-viewer-next/src/core/dimension-lines/utils.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/EnvironmentDome.d.ts +14 -0
- package/build/types/real-time-viewer-next/src/core/environment/EnvironmentDome.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/EnvironmentSceneLoader.d.ts +14 -0
- package/build/types/real-time-viewer-next/src/core/environment/EnvironmentSceneLoader.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/EnvironmentSources.d.ts +33 -0
- package/build/types/real-time-viewer-next/src/core/environment/EnvironmentSources.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/EnvironmentSunLensflare.d.ts +3 -0
- package/build/types/real-time-viewer-next/src/core/environment/EnvironmentSunLensflare.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/LightingRig.d.ts +28 -0
- package/build/types/real-time-viewer-next/src/core/environment/LightingRig.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/PlainGround.d.ts +21 -0
- package/build/types/real-time-viewer-next/src/core/environment/PlainGround.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/RuntimePerfAdjuster.d.ts +15 -0
- package/build/types/real-time-viewer-next/src/core/environment/RuntimePerfAdjuster.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/SceneEnvironment.d.ts +19 -0
- package/build/types/real-time-viewer-next/src/core/environment/SceneEnvironment.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/SkydomeBackground.d.ts +11 -0
- package/build/types/real-time-viewer-next/src/core/environment/SkydomeBackground.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/SunLensflare.d.ts +29 -0
- package/build/types/real-time-viewer-next/src/core/environment/SunLensflare.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/SunLensflareLazy.d.ts +11 -0
- package/build/types/real-time-viewer-next/src/core/environment/SunLensflareLazy.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/adaptive.config.d.ts +24 -0
- package/build/types/real-time-viewer-next/src/core/environment/adaptive.config.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/adaptive.config.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/core/environment/adaptive.config.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/DeckCutoutArticleSync.d.ts +22 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/DeckCutoutArticleSync.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/DeckCutoutCollar.d.ts +15 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/DeckCutoutCollar.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/DeckCutoutLazy.d.ts +10 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/DeckCutoutLazy.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/DeckCutoutSubsystem.d.ts +9 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/DeckCutoutSubsystem.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/anchorElements.d.ts +40 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/anchorElements.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/anchorElements.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/anchorElements.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/articleFootprint.d.ts +62 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/articleFootprint.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/articleFootprint.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/articleFootprint.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/buildCollarGeometry.d.ts +25 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/buildCollarGeometry.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/buildCollarGeometry.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/buildCollarGeometry.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/collectDeckTriangles.d.ts +86 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/collectDeckTriangles.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/deriveWaterVolume.d.ts +28 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/deriveWaterVolume.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/deriveWaterVolume.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/deriveWaterVolume.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/measureArticle.d.ts +49 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/measureArticle.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/measureArticle.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/measureArticle.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/measureDiagnostics.d.ts +20 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/measureDiagnostics.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/useCollarTextures.d.ts +16 -0
- package/build/types/real-time-viewer-next/src/core/environment/deckCutout/useCollarTextures.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/dome.config.d.ts +191 -0
- package/build/types/real-time-viewer-next/src/core/environment/dome.config.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/dome.config.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/core/environment/dome.config.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/ground.config.d.ts +130 -0
- package/build/types/real-time-viewer-next/src/core/environment/ground.config.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/ground.config.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/core/environment/ground.config.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/lighting.config.d.ts +297 -0
- package/build/types/real-time-viewer-next/src/core/environment/lighting.config.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/lighting.config.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/core/environment/lighting.config.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/scene.config.d.ts +440 -0
- package/build/types/real-time-viewer-next/src/core/environment/scene.config.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/scene.config.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/core/environment/scene.config.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/useEnvironmentMap.d.ts +19 -0
- package/build/types/real-time-viewer-next/src/core/environment/useEnvironmentMap.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/environment/useStudioLightEffects.d.ts +28 -0
- package/build/types/real-time-viewer-next/src/core/environment/useStudioLightEffects.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/frameOrder.d.ts +91 -0
- package/build/types/real-time-viewer-next/src/core/frameOrder.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/handles.d.ts +35 -0
- package/build/types/real-time-viewer-next/src/core/handles.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/interaction/AccessoryDropController.d.ts +9 -0
- package/build/types/real-time-viewer-next/src/core/interaction/AccessoryDropController.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/interaction/AccessoryFollowController.d.ts +15 -0
- package/build/types/real-time-viewer-next/src/core/interaction/AccessoryFollowController.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/interaction/DragController.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/core/interaction/DragController.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/interaction/ElementOverlay.d.ts +16 -0
- package/build/types/real-time-viewer-next/src/core/interaction/ElementOverlay.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/interaction/ElementOverlayIcons.d.ts +18 -0
- package/build/types/real-time-viewer-next/src/core/interaction/ElementOverlayIcons.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/interaction/FreeGridLayer.d.ts +10 -0
- package/build/types/real-time-viewer-next/src/core/interaction/FreeGridLayer.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/interaction/InteractionGuides.d.ts +3 -0
- package/build/types/real-time-viewer-next/src/core/interaction/InteractionGuides.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/interaction/accessoryCellTargeting.d.ts +31 -0
- package/build/types/real-time-viewer-next/src/core/interaction/accessoryCellTargeting.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/interaction/selection.config.d.ts +65 -0
- package/build/types/real-time-viewer-next/src/core/interaction/selection.config.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/interaction/selection.config.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/core/interaction/selection.config.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/interaction/useAccessoryMoveDrag.d.ts +21 -0
- package/build/types/real-time-viewer-next/src/core/interaction/useAccessoryMoveDrag.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/interaction/useElementInteraction.d.ts +35 -0
- package/build/types/real-time-viewer-next/src/core/interaction/useElementInteraction.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/lazySubsystems.d.ts +16 -0
- package/build/types/real-time-viewer-next/src/core/lazySubsystems.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/materials/MaterialContext.d.ts +23 -0
- package/build/types/real-time-viewer-next/src/core/materials/MaterialContext.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/materials/MaterialManager.d.ts +4 -0
- package/build/types/real-time-viewer-next/src/core/materials/MaterialManager.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/materials/apply.d.ts +17 -0
- package/build/types/real-time-viewer-next/src/core/materials/apply.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/materials/caches.d.ts +44 -0
- package/build/types/real-time-viewer-next/src/core/materials/caches.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/materials/factory.d.ts +37 -0
- package/build/types/real-time-viewer-next/src/core/materials/factory.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/materials/materials.config.d.ts +13 -0
- package/build/types/real-time-viewer-next/src/core/materials/materials.config.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/materials/materials.config.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/core/materials/materials.config.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/materials/textureCache.d.ts +26 -0
- package/build/types/real-time-viewer-next/src/core/materials/textureCache.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/materials/types.d.ts +5 -0
- package/build/types/real-time-viewer-next/src/core/materials/types.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/meshBVH.d.ts +22 -0
- package/build/types/real-time-viewer-next/src/core/meshBVH.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/meshBVH.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/core/meshBVH.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/postprocessing/PostProcessingDynamicEffects.d.ts +11 -0
- package/build/types/real-time-viewer-next/src/core/postprocessing/PostProcessingDynamicEffects.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/postprocessing/PostProcessingStack.d.ts +28 -0
- package/build/types/real-time-viewer-next/src/core/postprocessing/PostProcessingStack.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/postprocessing/applyRendererToneMapping.d.ts +10 -0
- package/build/types/real-time-viewer-next/src/core/postprocessing/applyRendererToneMapping.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/postprocessing/index.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/core/postprocessing/index.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/postprocessing/postProcessing.config.d.ts +453 -0
- package/build/types/real-time-viewer-next/src/core/postprocessing/postProcessing.config.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/postprocessing/postProcessing.config.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/core/postprocessing/postProcessing.config.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/renderer.config.d.ts +55 -0
- package/build/types/real-time-viewer-next/src/core/renderer.config.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/renderer.config.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/core/renderer.config.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/shadows/SceneShadowSystem.d.ts +18 -0
- package/build/types/real-time-viewer-next/src/core/shadows/SceneShadowSystem.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/shadows/SunShadow.d.ts +29 -0
- package/build/types/real-time-viewer-next/src/core/shadows/SunShadow.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/shadows/index.d.ts +4 -0
- package/build/types/real-time-viewer-next/src/core/shadows/index.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/shadows/shadowMapSize.d.ts +20 -0
- package/build/types/real-time-viewer-next/src/core/shadows/shadowMapSize.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/shadows/shadowMapSize.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/core/shadows/shadowMapSize.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/shadows/shadowRegistry.d.ts +24 -0
- package/build/types/real-time-viewer-next/src/core/shadows/shadowRegistry.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/shadows/shadows.config.d.ts +75 -0
- package/build/types/real-time-viewer-next/src/core/shadows/shadows.config.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/shadows/shadows.config.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/core/shadows/shadows.config.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/shadows/useShadowDirty.d.ts +14 -0
- package/build/types/real-time-viewer-next/src/core/shadows/useShadowDirty.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/shadows/useShadowFlags.d.ts +28 -0
- package/build/types/real-time-viewer-next/src/core/shadows/useShadowFlags.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/shadows/useShadowRebake.d.ts +14 -0
- package/build/types/real-time-viewer-next/src/core/shadows/useShadowRebake.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/useFrameloopVisibility.d.ts +37 -0
- package/build/types/real-time-viewer-next/src/core/useFrameloopVisibility.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/view2d/DockingPoints2D.d.ts +17 -0
- package/build/types/real-time-viewer-next/src/core/view2d/DockingPoints2D.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/view2d/Element2DPlane.d.ts +18 -0
- package/build/types/real-time-viewer-next/src/core/view2d/Element2DPlane.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/view2d/ElementAnnotation2D.d.ts +16 -0
- package/build/types/real-time-viewer-next/src/core/view2d/ElementAnnotation2D.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/view2d/Scene2DOverlay.d.ts +10 -0
- package/build/types/real-time-viewer-next/src/core/view2d/Scene2DOverlay.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/viewMode/ViewModeRuntimeContext.d.ts +20 -0
- package/build/types/real-time-viewer-next/src/core/viewMode/ViewModeRuntimeContext.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/viewMode/index.d.ts +4 -0
- package/build/types/real-time-viewer-next/src/core/viewMode/index.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/viewMode/selectViewModeRuntime.d.ts +9 -0
- package/build/types/real-time-viewer-next/src/core/viewMode/selectViewModeRuntime.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/viewMode/selectViewModeRuntime.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/core/viewMode/selectViewModeRuntime.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/viewMode/types.d.ts +67 -0
- package/build/types/real-time-viewer-next/src/core/viewMode/types.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/water/CausticReceiver.d.ts +49 -0
- package/build/types/real-time-viewer-next/src/core/water/CausticReceiver.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/water/CausticsTexture.d.ts +48 -0
- package/build/types/real-time-viewer-next/src/core/water/CausticsTexture.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/water/Heightfield.d.ts +88 -0
- package/build/types/real-time-viewer-next/src/core/water/Heightfield.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/water/PoolHeightMap.d.ts +36 -0
- package/build/types/real-time-viewer-next/src/core/water/PoolHeightMap.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/water/RefractionCapture.d.ts +73 -0
- package/build/types/real-time-viewer-next/src/core/water/RefractionCapture.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/water/RefractionCapture.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/core/water/RefractionCapture.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/water/SceneCapture.d.ts +66 -0
- package/build/types/real-time-viewer-next/src/core/water/SceneCapture.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/water/WaterSurface.d.ts +8 -0
- package/build/types/real-time-viewer-next/src/core/water/WaterSurface.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/water/WaterSurfaceLazy.d.ts +10 -0
- package/build/types/real-time-viewer-next/src/core/water/WaterSurfaceLazy.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/water/WaterSurfaceRenderer.d.ts +71 -0
- package/build/types/real-time-viewer-next/src/core/water/WaterSurfaceRenderer.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/water/useCausticReceivers.d.ts +11 -0
- package/build/types/real-time-viewer-next/src/core/water/useCausticReceivers.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/water/useWaterPointer.d.ts +13 -0
- package/build/types/real-time-viewer-next/src/core/water/useWaterPointer.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/water/useWaveSimulation.d.ts +44 -0
- package/build/types/real-time-viewer-next/src/core/water/useWaveSimulation.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/water/useWaveSimulation.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/core/water/useWaveSimulation.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/water/water.config.d.ts +90 -0
- package/build/types/real-time-viewer-next/src/core/water/water.config.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/water/water.config.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/core/water/water.config.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/water/waterDebug.d.ts +14 -0
- package/build/types/real-time-viewer-next/src/core/water/waterDebug.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/water/waterShaders.d.ts +9 -0
- package/build/types/real-time-viewer-next/src/core/water/waterShaders.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/water/waterSurfaceMaterial.d.ts +21 -0
- package/build/types/real-time-viewer-next/src/core/water/waterSurfaceMaterial.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/core/water/waterUniforms.d.ts +51 -0
- package/build/types/real-time-viewer-next/src/core/water/waterUniforms.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/hooks/useAssembledScene.d.ts +17 -0
- package/build/types/real-time-viewer-next/src/hooks/useAssembledScene.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/hooks/useHostPropsSync.d.ts +20 -0
- package/build/types/real-time-viewer-next/src/hooks/useHostPropsSync.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/index.d.ts +17 -0
- package/build/types/real-time-viewer-next/src/index.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/internals.d.ts +61 -0
- package/build/types/real-time-viewer-next/src/internals.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/loadingGates.d.ts +34 -0
- package/build/types/real-time-viewer-next/src/loadingGates.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/parser/parseRenderScript.d.ts +51 -0
- package/build/types/real-time-viewer-next/src/parser/parseRenderScript.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/parser/types.d.ts +58 -0
- package/build/types/real-time-viewer-next/src/parser/types.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/presets/mergePresetBundle.d.ts +33 -0
- package/build/types/real-time-viewer-next/src/presets/mergePresetBundle.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/presets/polyfaser-planner.d.ts +4 -0
- package/build/types/real-time-viewer-next/src/presets/polyfaser-planner.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/presets/polyfaser-pool.d.ts +4 -0
- package/build/types/real-time-viewer-next/src/presets/polyfaser-pool.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/presets/polyfaserPlannerOverride.d.ts +9 -0
- package/build/types/real-time-viewer-next/src/presets/polyfaserPlannerOverride.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/presets/villa-cliff.d.ts +4 -0
- package/build/types/real-time-viewer-next/src/presets/villa-cliff.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/publicApi.d.ts +35 -0
- package/build/types/real-time-viewer-next/src/publicApi.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/publicPath.d.ts +1 -0
- package/build/types/real-time-viewer-next/src/publicPath.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/store/index.d.ts +18 -0
- package/build/types/real-time-viewer-next/src/store/index.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/store/shared.d.ts +25 -0
- package/build/types/real-time-viewer-next/src/store/shared.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/store/slices/accessory.d.ts +147 -0
- package/build/types/real-time-viewer-next/src/store/slices/accessory.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/store/slices/analyzerGate.d.ts +15 -0
- package/build/types/real-time-viewer-next/src/store/slices/analyzerGate.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/store/slices/camera.d.ts +66 -0
- package/build/types/real-time-viewer-next/src/store/slices/camera.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/store/slices/capture.d.ts +60 -0
- package/build/types/real-time-viewer-next/src/store/slices/capture.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/store/slices/config.d.ts +52 -0
- package/build/types/real-time-viewer-next/src/store/slices/config.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/store/slices/deckCutout.d.ts +29 -0
- package/build/types/real-time-viewer-next/src/store/slices/deckCutout.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/store/slices/environment.d.ts +47 -0
- package/build/types/real-time-viewer-next/src/store/slices/environment.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/store/slices/glGeneration.d.ts +18 -0
- package/build/types/real-time-viewer-next/src/store/slices/glGeneration.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/store/slices/hostSelection.test.d.ts +5 -0
- package/build/types/real-time-viewer-next/src/store/slices/hostSelection.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/store/slices/interaction.d.ts +53 -0
- package/build/types/real-time-viewer-next/src/store/slices/interaction.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/store/slices/performanceProfile.d.ts +71 -0
- package/build/types/real-time-viewer-next/src/store/slices/performanceProfile.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/store/slices/plannerUi.d.ts +46 -0
- package/build/types/real-time-viewer-next/src/store/slices/plannerUi.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/store/slices/scene.d.ts +26 -0
- package/build/types/real-time-viewer-next/src/store/slices/scene.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/store/slices/sceneLoad.d.ts +75 -0
- package/build/types/real-time-viewer-next/src/store/slices/sceneLoad.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/store/slices/sceneLoad.test.d.ts +5 -0
- package/build/types/real-time-viewer-next/src/store/slices/sceneLoad.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/store/slices/selection.d.ts +66 -0
- package/build/types/real-time-viewer-next/src/store/slices/selection.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/store/slices/versions.d.ts +34 -0
- package/build/types/real-time-viewer-next/src/store/slices/versions.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/store/slices/viewMode.d.ts +16 -0
- package/build/types/real-time-viewer-next/src/store/slices/viewMode.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/store/types.d.ts +96 -0
- package/build/types/real-time-viewer-next/src/store/types.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/testUtils/deepDiff.d.ts +26 -0
- package/build/types/real-time-viewer-next/src/testUtils/deepDiff.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/testUtils/deepDiff.test.d.ts +11 -0
- package/build/types/real-time-viewer-next/src/testUtils/deepDiff.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/testUtils/divaCoreMock.d.ts +47 -0
- package/build/types/real-time-viewer-next/src/testUtils/divaCoreMock.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/testUtils/resolvedConfigSnapshots.d.ts +36 -0
- package/build/types/real-time-viewer-next/src/testUtils/resolvedConfigSnapshots.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/testUtils/structuredClonePolyfill.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/testUtils/structuredClonePolyfill.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/types/accessoryGrids.d.ts +134 -0
- package/build/types/real-time-viewer-next/src/types/accessoryGrids.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/types/camera.d.ts +288 -0
- package/build/types/real-time-viewer-next/src/types/camera.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/types/environment.d.ts +146 -0
- package/build/types/real-time-viewer-next/src/types/environment.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/types/plannerUi.d.ts +68 -0
- package/build/types/real-time-viewer-next/src/types/plannerUi.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/types/scene2d.d.ts +168 -0
- package/build/types/real-time-viewer-next/src/types/scene2d.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/bootPhase.d.ts +75 -0
- package/build/types/real-time-viewer-next/src/utils/bootPhase.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/bootPhase.test.d.ts +5 -0
- package/build/types/real-time-viewer-next/src/utils/bootPhase.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/camera.d.ts +8 -0
- package/build/types/real-time-viewer-next/src/utils/camera.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/cameraFraming.d.ts +47 -0
- package/build/types/real-time-viewer-next/src/utils/cameraFraming.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/collisionTargets.d.ts +34 -0
- package/build/types/real-time-viewer-next/src/utils/collisionTargets.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/collisionTargets.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/utils/collisionTargets.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/cursorStack.d.ts +21 -0
- package/build/types/real-time-viewer-next/src/utils/cursorStack.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/detectDeviceTier.d.ts +24 -0
- package/build/types/real-time-viewer-next/src/utils/detectDeviceTier.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/detectDeviceTier.test.d.ts +5 -0
- package/build/types/real-time-viewer-next/src/utils/detectDeviceTier.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/dockingGroups.d.ts +7 -0
- package/build/types/real-time-viewer-next/src/utils/dockingGroups.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/elementIds.d.ts +27 -0
- package/build/types/real-time-viewer-next/src/utils/elementIds.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/equirectCache.d.ts +45 -0
- package/build/types/real-time-viewer-next/src/utils/equirectCache.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/equirectUrl.d.ts +22 -0
- package/build/types/real-time-viewer-next/src/utils/equirectUrl.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/equirectUrl.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/utils/equirectUrl.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/footprint.d.ts +15 -0
- package/build/types/real-time-viewer-next/src/utils/footprint.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/footprint.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/utils/footprint.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/footprintTrace.d.ts +55 -0
- package/build/types/real-time-viewer-next/src/utils/footprintTrace.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/footprintTrace.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/utils/footprintTrace.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/geoViewAngle.d.ts +17 -0
- package/build/types/real-time-viewer-next/src/utils/geoViewAngle.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/gltfLoader.d.ts +34 -0
- package/build/types/real-time-viewer-next/src/utils/gltfLoader.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/gridGeometryApi.d.ts +17 -0
- package/build/types/real-time-viewer-next/src/utils/gridGeometryApi.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/localUVSampler.d.ts +89 -0
- package/build/types/real-time-viewer-next/src/utils/localUVSampler.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/localUVSampler.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/utils/localUVSampler.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/overlayGeometry.d.ts +28 -0
- package/build/types/real-time-viewer-next/src/utils/overlayGeometry.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/overlayGeometry.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/utils/overlayGeometry.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/planarTransform.d.ts +20 -0
- package/build/types/real-time-viewer-next/src/utils/planarTransform.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/planarTransform.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/utils/planarTransform.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/polygon2d.d.ts +25 -0
- package/build/types/real-time-viewer-next/src/utils/polygon2d.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/preloadEnvironment.d.ts +15 -0
- package/build/types/real-time-viewer-next/src/utils/preloadEnvironment.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/profiles.d.ts +113 -0
- package/build/types/real-time-viewer-next/src/utils/profiles.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/profiles.test.d.ts +17 -0
- package/build/types/real-time-viewer-next/src/utils/profiles.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/rasterMask.d.ts +31 -0
- package/build/types/real-time-viewer-next/src/utils/rasterMask.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/rasterMask.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/utils/rasterMask.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/resolveEnvironment.d.ts +16 -0
- package/build/types/real-time-viewer-next/src/utils/resolveEnvironment.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/resolveGridCells.d.ts +35 -0
- package/build/types/real-time-viewer-next/src/utils/resolveGridCells.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/scene.d.ts +3 -0
- package/build/types/real-time-viewer-next/src/utils/scene.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/screenProjection.d.ts +42 -0
- package/build/types/real-time-viewer-next/src/utils/screenProjection.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/screenProjection.test.d.ts +2 -0
- package/build/types/real-time-viewer-next/src/utils/screenProjection.test.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/selectionScopeNames.d.ts +6 -0
- package/build/types/real-time-viewer-next/src/utils/selectionScopeNames.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/selectionScopeScene.d.ts +8 -0
- package/build/types/real-time-viewer-next/src/utils/selectionScopeScene.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/smoothDamp.d.ts +19 -0
- package/build/types/real-time-viewer-next/src/utils/smoothDamp.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/sunAngles.d.ts +29 -0
- package/build/types/real-time-viewer-next/src/utils/sunAngles.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/suspense.d.ts +11 -0
- package/build/types/real-time-viewer-next/src/utils/suspense.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/whiteRoomPreset.d.ts +48 -0
- package/build/types/real-time-viewer-next/src/utils/whiteRoomPreset.d.ts.map +1 -0
- package/build/types/real-time-viewer-next/src/utils/withRenderTarget.d.ts +48 -0
- package/build/types/real-time-viewer-next/src/utils/withRenderTarget.d.ts.map +1 -0
- package/build/umd/114.real-time-viewer-next.umd.min.js +2 -0
- package/build/umd/114.real-time-viewer-next.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/699.real-time-viewer-next.umd.min.js +2 -0
- package/build/umd/699.real-time-viewer-next.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/964.real-time-viewer-next.umd.min.js +2 -0
- package/build/umd/964.real-time-viewer-next.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/real-time-viewer-next.umd.min.js +2 -0
- package/build/umd/real-time-viewer-next.umd.min.js.LICENSE.txt +117 -0
- package/build/umd/report.html +38 -0
- package/package.json +31 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveGridCells.d.ts","sourceRoot":"","sources":["../../../../../src/utils/resolveGridCells.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,QAAQ,EAAoB,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAyBjI;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,iBAAiB,EAAE,GAAG,IAAI,EACtC,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAI,EAC3B,eAAe,EAAE,MAAM,GACtB,gBAAgB,EAAE,CA+BpB;AAYD;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,gBAAgB,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAI,GAAG,gBAAgB,GAAG,IAAI,CA+DxH;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAMjG;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAGtG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scene.d.ts","sourceRoot":"","sources":["../../../../../src/utils/scene.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtC,wBAAgB,eAAe,CAAC,GAAG,EAAE,QAAQ,GAAG,OAAO,CAOtD"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Vector3 } from 'three';
|
|
2
|
+
import type { Camera } from 'three';
|
|
3
|
+
/** A point in client (viewport) pixels — the space of `PointerEvent.clientX/clientY`. */
|
|
4
|
+
export interface ClientPoint {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Projects a world point into client pixels, so the result can be compared
|
|
10
|
+
* directly against a pointer's `clientX`/`clientY`.
|
|
11
|
+
*
|
|
12
|
+
* `rect` is the canvas' `getBoundingClientRect()`: its size scales NDC to pixels
|
|
13
|
+
* and its origin shifts canvas-local pixels into the client frame. Writes into
|
|
14
|
+
* `out` and returns it; `world` is left untouched.
|
|
15
|
+
*/
|
|
16
|
+
export declare function worldToClientPx(world: Vector3, camera: Camera, rect: DOMRect, out: ClientPoint): ClientPoint;
|
|
17
|
+
/**
|
|
18
|
+
* Screen-space angle in degrees of `direction` anchored at `origin`, measured
|
|
19
|
+
* the way CSS `rotate()` does (clockwise from +x, y down).
|
|
20
|
+
*
|
|
21
|
+
* Read from the projected axis rather than from a fixed convention, so it holds
|
|
22
|
+
* for any camera orientation: the caller can hand the angle straight to a CSS
|
|
23
|
+
* transform and the glyph stays aligned with the world axis.
|
|
24
|
+
*
|
|
25
|
+
* `direction` is added to `origin` as given — normalize it first when the
|
|
26
|
+
* camera is perspective, where the projected angle depends on its length.
|
|
27
|
+
*/
|
|
28
|
+
export declare function projectedDirectionAngleDeg(origin: Vector3, direction: Vector3, camera: Camera, viewportWidth: number, viewportHeight: number): number;
|
|
29
|
+
/** Does `direction` point toward the right half of the screen for this camera? Ties count as right. */
|
|
30
|
+
export declare function pointsScreenRight(direction: Vector3, camera: Camera): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Partial perspective scaling for a constant-pixel-size sprite: `(refDistance /
|
|
33
|
+
* distance) ^ damping`, clamped.
|
|
34
|
+
*
|
|
35
|
+
* `damping` 0 keeps the sprite at a constant size, 1 gives full 1:1 perspective
|
|
36
|
+
* growth; in between the sprite follows the perspective enough to read as
|
|
37
|
+
* attached to the scene without becoming untouchably small or dominant at
|
|
38
|
+
* extreme zooms. Returns 1 for a non-positive distance (a camera sitting on the
|
|
39
|
+
* anchor), where the ratio is meaningless.
|
|
40
|
+
*/
|
|
41
|
+
export declare function dampedDistanceScale(distance: number, refDistance: number, damping: number, min: number, max: number): number;
|
|
42
|
+
//# sourceMappingURL=screenProjection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screenProjection.d.ts","sourceRoot":"","sources":["../../../../../src/utils/screenProjection.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAOpC,yFAAyF;AACzF,MAAM,WAAW,WAAW;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,WAAW,GAAG,WAAW,CAK5G;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,OAAO,EAClB,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,MAAM,GACrB,MAAM,CAMR;AAED,uGAAuG;AACvG,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAG7E;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAG5H"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screenProjection.test.d.ts","sourceRoot":"","sources":["../../../../../src/utils/screenProjection.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logical selection scope: the selected root element plus every descendant name in
|
|
3
|
+
* {@link ElementHierarchy.childrenOfName} — same scope as `useElementInteraction` “selected” / drag ancestry.
|
|
4
|
+
*/
|
|
5
|
+
export declare function selectionScopeNames(rootName: string | null, getDescendants: (elementName: string) => string[]): string[];
|
|
6
|
+
//# sourceMappingURL=selectionScopeNames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectionScopeNames.d.ts","sourceRoot":"","sources":["../../../../../src/utils/selectionScopeNames.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,cAAc,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,EAAE,GAChD,MAAM,EAAE,CAGV"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Object3D, Scene } from 'three';
|
|
2
|
+
/**
|
|
3
|
+
* Resolves logical element names to drawable `Object3D`s in the Three scene for post-processing
|
|
4
|
+
* (Outline, SelectiveBloom, etc.). Each name is looked up with `scene.getObjectByName`; meshes and
|
|
5
|
+
* similar drawables under each root are collected; duplicates are removed by `uuid`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function collectDrawableTargetsForElementNames(scene: Scene, names: string[]): Object3D[];
|
|
8
|
+
//# sourceMappingURL=selectionScopeScene.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectionScopeScene.d.ts","sourceRoot":"","sources":["../../../../../src/utils/selectionScopeScene.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAG7C;;;;GAIG;AACH,wBAAgB,qCAAqC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAuB/F"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Vector3, Vector3Like } from 'three';
|
|
2
|
+
/** Velocity accumulator passed to {@link smoothDampScalar}. */
|
|
3
|
+
export interface ScalarVel {
|
|
4
|
+
value: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Critically-damped scalar smoothing — Game Programming Gems 4 / Unity
|
|
8
|
+
* `Mathf.SmoothDamp` without the overshoot guard. Padé approximation of
|
|
9
|
+
* `exp(-omega·dt)`, stable for any `dt`. Mutates `vel` in place; returns
|
|
10
|
+
* the next value.
|
|
11
|
+
*
|
|
12
|
+
* The overshoot guard is omitted deliberately: Unity snaps to target and zeroes `vel` when the Padé
|
|
13
|
+
* step crosses the target, which fires inappropriately for a moving target carrying input momentum
|
|
14
|
+
* (a fast release) and kills the chase velocity. Sub-pixel oscillation near a stationary target is
|
|
15
|
+
* invisible; losing the release momentum is not.
|
|
16
|
+
*/
|
|
17
|
+
export declare function smoothDampScalar(current: number, target: number, vel: ScalarVel, smoothTime: number, dt: number): number;
|
|
18
|
+
export declare function smoothDampVec3(current: Vector3, target: Vector3Like, vel: Vector3, smoothTime: number, dt: number): void;
|
|
19
|
+
//# sourceMappingURL=smoothDamp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smoothDamp.d.ts","sourceRoot":"","sources":["../../../../../src/utils/smoothDamp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AASlD,+DAA+D;AAC/D,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAWxH;AAQD,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAUxH"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ResolvedEnvironmentConfig } from '../types/environment';
|
|
2
|
+
/**
|
|
3
|
+
* Convert sun azimuth / elevation (degrees) to a unit direction vector.
|
|
4
|
+
*
|
|
5
|
+
* Azimuth: 0° = North (+Z), 90° = East (+X), 180° = South (−Z), 270° = West (−X).
|
|
6
|
+
* Elevation: 0° = horizon, 90° = zenith (straight up).
|
|
7
|
+
*
|
|
8
|
+
* The returned vector points **from the origin toward the sun** — suitable for
|
|
9
|
+
* use as a DirectionalLight position (scaled by an arbitrary distance).
|
|
10
|
+
*/
|
|
11
|
+
export declare function sunAnglesToDirection(azimuthDeg: number, elevationDeg: number): [number, number, number];
|
|
12
|
+
/**
|
|
13
|
+
* Convert a direction vector back to azimuth / elevation (degrees).
|
|
14
|
+
* Inverse of `sunAnglesToDirection`.
|
|
15
|
+
*/
|
|
16
|
+
export declare function directionToSunAngles(dir: [number, number, number]): {
|
|
17
|
+
azimuth: number;
|
|
18
|
+
elevation: number;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Unit vector from the scene origin **toward the sun** — same convention as
|
|
22
|
+
* {@link sunAnglesToDirection} and the directional light position in {@link LightingRig}.
|
|
23
|
+
* Use this for procedural sky, shadows, and any effect that must match sun lighting.
|
|
24
|
+
*
|
|
25
|
+
* When sun lighting is fully off (`false`), returns the default dial position (45°, 45°)
|
|
26
|
+
* so the skydome still matches a neutral “default sun” if shown without the light.
|
|
27
|
+
*/
|
|
28
|
+
export declare function lightingSunTowardDirection(sun: ResolvedEnvironmentConfig['lighting']['sun']): [number, number, number];
|
|
29
|
+
//# sourceMappingURL=sunAngles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sunAngles.d.ts","sourceRoot":"","sources":["../../../../../src/utils/sunAngles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAItE;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CASvG;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAa1G;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,yBAAyB,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAGtH"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal suspense cache: runs `fn` once per key tuple and suspends the component (throws the
|
|
3
|
+
* promise into the nearest `<Suspense>` boundary) until it resolves; every later render with the
|
|
4
|
+
* same keys returns the value synchronously, so known keys re-mount without a fallback flash.
|
|
5
|
+
* Concurrent callers with the same keys share one `fn` run. Entries live until
|
|
6
|
+
* {@link clearSuspenseCache}.
|
|
7
|
+
*/
|
|
8
|
+
export declare function suspend<T>(fn: () => Promise<T>, keys: readonly unknown[]): T;
|
|
9
|
+
/** Drops all cached results. Call when the owners of the cached values dispose them. */
|
|
10
|
+
export declare function clearSuspenseCache(): void;
|
|
11
|
+
//# sourceMappingURL=suspense.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suspense.d.ts","sourceRoot":"","sources":["../../../../../src/utils/suspense.ts"],"names":[],"mappings":"AAkBA;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,OAAO,EAAE,GAAG,CAAC,CA0B5E;AAED,wFAAwF;AACxF,wBAAgB,kBAAkB,IAAI,IAAI,CAGzC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { CameraConfig } from '../types/camera';
|
|
2
|
+
import type { DimensionLineUnit } from '../core/dimension-lines/dimensionLines.config';
|
|
3
|
+
import type { PerformanceProfileMode, PerformanceProfiles } from '../types/environment';
|
|
4
|
+
/** Preset-level defaults for a host's CREATE_IMAGE (plan image) capture. */
|
|
5
|
+
export interface RTVCreateImageDefaults {
|
|
6
|
+
/** Captured image width in px. */
|
|
7
|
+
width?: number;
|
|
8
|
+
/** Captured image height in px. */
|
|
9
|
+
height?: number;
|
|
10
|
+
/** Output formats — one image per entry. */
|
|
11
|
+
formats?: ('png' | 'jpeg')[];
|
|
12
|
+
/** JPEG encoding quality 0..1. */
|
|
13
|
+
jpegQuality?: number;
|
|
14
|
+
/** Render frames to wait before the shutter, covering async font/texture loads. */
|
|
15
|
+
settleFrames?: number;
|
|
16
|
+
/** How long the 2D scene must stay unchanged before it counts as settled, in ms. */
|
|
17
|
+
stableMs?: number;
|
|
18
|
+
/** 2D shot framing padding (1 = element bounds fill the frame exactly). */
|
|
19
|
+
cameraPadding?: number;
|
|
20
|
+
/**
|
|
21
|
+
* Dimension styling for the captured plan. Unset = the capture keeps the on-screen look; set
|
|
22
|
+
* only where a construction drawing should be dimensioned differently from the viewer.
|
|
23
|
+
*/
|
|
24
|
+
dimensionLineUnit?: DimensionLineUnit;
|
|
25
|
+
/** Drop the unit suffix in the captured plan's labels — "4300" instead of "4300 mm". */
|
|
26
|
+
dimensionLineHideUnit?: boolean;
|
|
27
|
+
/** Dimension line and label color in the captured plan. */
|
|
28
|
+
dimensionLineColor?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A complete scene preset: profile bundle + optional camera config — the same shape the
|
|
32
|
+
* analyzer's Export button produces and a catalog's RTV_PRESET meta tag carries.
|
|
33
|
+
*/
|
|
34
|
+
export interface RTVPresetBundle {
|
|
35
|
+
profileMode?: PerformanceProfileMode;
|
|
36
|
+
profiles: PerformanceProfiles;
|
|
37
|
+
camera?: CameraConfig;
|
|
38
|
+
/** CREATE_IMAGE capture defaults; the host's `createImageConfig` overrides field-wise. */
|
|
39
|
+
createImage?: RTVCreateImageDefaults;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The white-room preset — the production hosts' default environment (web-planner-react
|
|
43
|
+
* passes it via `config` unless the catalog overrides it with an RTV_PRESET meta tag).
|
|
44
|
+
* Ships in rtv-next so hosts don't depend on the analyzer package; the analyzer's
|
|
45
|
+
* `white-room` registry preset re-exports this object (single source).
|
|
46
|
+
*/
|
|
47
|
+
export declare const WHITE_ROOM_PRESET: RTVPresetBundle;
|
|
48
|
+
//# sourceMappingURL=whiteRoomPreset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whiteRoomPreset.d.ts","sourceRoot":"","sources":["../../../../../src/utils/whiteRoomPreset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,KAAK,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAExF,4EAA4E;AAC5E,MAAM,WAAW,sBAAsB;IACrC,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,CAAC,KAAK,GAAG,MAAM,CAAC,EAAE,CAAC;IAC7B,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mFAAmF;IACnF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oFAAoF;IACpF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,wFAAwF;IACxF,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,2DAA2D;IAC3D,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,WAAW,CAAC,EAAE,sBAAsB,CAAC;IACrC,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,0FAA0F;IAC1F,WAAW,CAAC,EAAE,sBAAsB,CAAC;CACtC;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,eAiI/B,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ColorRepresentation, Plane, ToneMapping, WebGLRenderer, WebGLRenderTarget } from 'three';
|
|
2
|
+
/**
|
|
3
|
+
* Renderer state an off-screen pass may take over for its duration. Every
|
|
4
|
+
* property listed here is snapshotted before the pass and put back after it, so
|
|
5
|
+
* the main R3F render that follows in the same frame sees the renderer exactly
|
|
6
|
+
* as it left it. A leaked property shows up as a colour shift, a wrong clear
|
|
7
|
+
* alpha, or geometry clipped by a plane nobody installed.
|
|
8
|
+
*/
|
|
9
|
+
export interface RenderTargetPassOptions {
|
|
10
|
+
/** Target to bind for the pass. `null` binds the default framebuffer. */
|
|
11
|
+
target: WebGLRenderTarget | null;
|
|
12
|
+
/**
|
|
13
|
+
* Clear colour for the pass, applied together with {@link clearAlpha} via
|
|
14
|
+
* `setClearColor`. Omit to leave the clear colour alone.
|
|
15
|
+
*/
|
|
16
|
+
clearColor?: ColorRepresentation;
|
|
17
|
+
/**
|
|
18
|
+
* Clear alpha for the pass. Applied via `setClearColor` when
|
|
19
|
+
* {@link clearColor} is given, via `setClearAlpha` on its own otherwise —
|
|
20
|
+
* the alpha-only form leaves the clear colour's RGB untouched.
|
|
21
|
+
*/
|
|
22
|
+
clearAlpha?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Tone mapping for the pass. Off-screen captures that feed a shader want the
|
|
25
|
+
* LINEAR scene colour; tone mapping belongs on the final present, not on an
|
|
26
|
+
* intermediate.
|
|
27
|
+
*/
|
|
28
|
+
toneMapping?: ToneMapping;
|
|
29
|
+
/**
|
|
30
|
+
* Clipping planes for the pass. Assigned, not mutated, so a cached array
|
|
31
|
+
* reference downstream code may hold stays intact. An empty array is ignored
|
|
32
|
+
* (it would clear whatever clipping the renderer already has).
|
|
33
|
+
*/
|
|
34
|
+
clippingPlanes?: Plane[];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Run `pass` with the renderer bound to an off-screen target, then restore
|
|
38
|
+
* every property the options took over.
|
|
39
|
+
*
|
|
40
|
+
* `pass` may re-bind the target itself (a ping-pong sim writing two buffers, or
|
|
41
|
+
* a re-bind to pick up render-target-owned scissor state) — the restore uses
|
|
42
|
+
* the target captured before the pass, not whatever is bound at the end.
|
|
43
|
+
*
|
|
44
|
+
* Restore order is render target FIRST: putting tone mapping / clear state back
|
|
45
|
+
* while the off-screen target is still bound thrashes renderer state for no gain.
|
|
46
|
+
*/
|
|
47
|
+
export declare function withRenderTarget(renderer: WebGLRenderer, options: RenderTargetPassOptions, pass: (renderer: WebGLRenderer) => void): void;
|
|
48
|
+
//# sourceMappingURL=withRenderTarget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withRenderTarget.d.ts","sourceRoot":"","sources":["../../../../../src/utils/withRenderTarget.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEvG;;;;;;GAMG;AACH,MAAM,WAAW,uBAAuB;IACtC,yEAAyE;IACzE,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACjC;;;OAGG;IACH,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;OAIG;IACH,cAAc,CAAC,EAAE,KAAK,EAAE,CAAC;CAC1B;AAWD;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,aAAa,EAAE,OAAO,EAAE,uBAAuB,EAAE,IAAI,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,IAAI,GAAG,IAAI,CAsCzI"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 114.real-time-viewer-next.umd.min.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignRealTimeViewerNext=self.webpackChunkCrystaldesignRealTimeViewerNext||[]).push([[114],{3114:(r,t,a)=>{a.r(t),a.d(t,{SunLensflare:()=>SunLensflare});var o=a(7080),i=a(7363),u=a(3946),c=a(4088),l=a(6831),d=a(7514);function _createForOfIteratorHelper(r,t){var a="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!a){if(Array.isArray(r)||(a=function _unsupportedIterableToArray(r,t){if(r){if("string"==typeof r)return _arrayLikeToArray(r,t);var a={}.toString.call(r).slice(8,-1);return"Object"===a&&r.constructor&&(a=r.constructor.name),"Map"===a||"Set"===a?Array.from(r):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(r,t):void 0}}(r))||t&&r&&"number"==typeof r.length){a&&(r=a);var o=0,i=function F(){};return{s:i,n:function n(){return o>=r.length?{done:!0}:{done:!1,value:r[o++]}},e:function e(r){throw r},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,c=!0,l=!1;return{s:function s(){a=a.call(r)},n:function n(){var r=a.next();return c=r.done,r},e:function e(r){l=!0,u=r},f:function f(){try{c||null==a.return||a.return()}finally{if(l)throw u}}}}function _arrayLikeToArray(r,t){(null==t||t>r.length)&&(t=r.length);for(var a=0,o=Array(t);a<t;a++)o[a]=r[a];return o}var p=256,m=[[0,1],[.04,.8],[.12,.36],[.3,.13],[.6,.035],[1,0]],v=[[0,.55],[.35,.2],[.7,.04],[1,0]],y=[[0,0],[.55,0],[.72,.45],[.8,.5],[.9,.12],[1,0]];function drawFlareSprite(r){var t=document.createElement("canvas");t.width=p,t.height=p;var a=t.getContext("2d");if(!a)return t;var i,u=128,c=a.createRadialGradient(u,u,0,u,u,u),l=_createForOfIteratorHelper(r);try{for(l.s();!(i=l.n()).done;){var d=(0,o.Z)(i.value,2),m=d[0],v=d[1];c.addColorStop(m,"rgba(255,246,232,".concat(v,")"))}}catch(r){l.e(r)}finally{l.f()}return a.fillStyle=c,a.fillRect(0,0,p,p),t}function drawHexSprite(){var r=document.createElement("canvas");r.width=p,r.height=p;var t=r.getContext("2d");if(!t)return r;var a=128,i=102.4;t.save(),t.translate(512,0),t.shadowOffsetX=-512,t.shadowBlur=12.8,t.shadowColor="rgba(255,246,232,1)",t.beginPath();for(var u=0;u<6;u++){var c=Math.PI/3*u+Math.PI/6,l=a+Math.cos(c)*i,d=a+Math.sin(c)*i;0===u?t.moveTo(l,d):t.lineTo(l,d)}t.closePath(),t.fillStyle="rgba(255,246,232,1)",t.fill(),t.restore();for(var m=t.createRadialGradient(a,a,0,a,a,i),v=0,y=[[0,.35],[.55,.45],[.85,1],[1,.8]];v<y.length;v++){var h=(0,o.Z)(y[v],2),g=h[0],w=h[1];m.addColorStop(g,"rgba(255,255,255,".concat(w,")"))}return t.globalCompositeOperation="destination-in",t.fillStyle=m,t.fillRect(0,0,p,p),r}var h=[{mapIndex:0,size:1e3,along:0,opacity:1},{mapIndex:2,size:70,along:.16,opacity:.5,tint:"#ffd9a0"},{mapIndex:2,size:130,along:.45,opacity:.35,tint:"#9fd8ff"},{mapIndex:3,size:210,along:.52,opacity:.3,tint:"#ffe9c8"},{mapIndex:1,size:70,along:.68,opacity:.5,tint:"#ffb37d"},{mapIndex:1,size:60,along:1,opacity:.5}],g=.018,w=.2,M=[[0,0,2],[1,0,1],[-1,0,1],[0,1,1],[0,-1,1],[.7071,.7071,1],[-.7071,.7071,1],[.7071,-.7071,1],[-.7071,-.7071,1]];function SunLensflare(r){var t=r.sunDirection,a=r.color,p=void 0===a?"#ffffff":a,S=r.distanceScale,b=void 0===S?1:S,x=r.sizeScale,I=void 0===x?1:x,R=r.occlusionEnabled,P=void 0===R||R,z=(0,c.D)((function(r){return r.scene})),k=(0,i.useMemo)((function(){return[drawFlareSprite(m),drawFlareSprite(v),drawHexSprite(),drawFlareSprite(y)].map((function(r){var t=new l.ROQ(r);return t.colorSpace=l.KI_,t}))}),[]);(0,i.useEffect)((function(){return function(){k.forEach((function(r){return r.dispose()}))}}),[k]);var j=(0,i.useRef)(null),A=(0,i.useRef)([]),C=(0,i.useMemo)((function(){return new l.Pa4}),[]),T=(0,i.useMemo)((function(){return new l.Pa4}),[]),O=(0,i.useMemo)((function(){return new l.Pa4}),[]),E=(0,i.useMemo)((function(){return new l.Pa4}),[]),_=(0,i.useMemo)((function(){return new l.Pa4}),[]),V=(0,i.useMemo)((function(){return new l.Pa4}),[]),L=(0,i.useMemo)((function(){return new l.Pa4}),[]),Z=(0,i.useMemo)((function(){return new l.Pa4}),[]),G=(0,i.useMemo)((function(){return new l.Pa4}),[]),H=(0,i.useMemo)((function(){return new l.Pa4}),[]),N=(0,i.useMemo)((function(){return new l.iMs}),[]),W=(0,i.useRef)([]),B=(0,i.useRef)(1),D=(0,i.useRef)(0),Q=(0,i.useRef)(0),X=(0,i.useRef)(0),q=(0,i.useRef)([]),K=(0,i.useRef)(Number.MAX_SAFE_INTEGER),U=Math.max(10,200*b),Y=(0,i.useMemo)((function(){var r=new l.Ilk(p);return h.map((function(t){var a;return new l.Ilk(null!==(a=t.tint)&&void 0!==a?a:"#ffffff").multiply(r)}))}),[p]);return(0,c.F)((function(r){var a=r.camera,i=j.current;if(i){a.getWorldPosition(O),T.set(t[0],t[1],t[2]).normalize(),C.copy(T).multiplyScalar(U).add(O),E.copy(C).applyMatrix4(a.matrixWorldInverse);var u=function viewZInFront(r){return r<0}(E.z);if(P){_.set(1,0,0).applyQuaternion(a.quaternion).normalize(),V.set(0,1,0).applyQuaternion(a.quaternion).normalize();var c=X.current++;if(u&&c%3==0){for(var l=function getOccluders(r,t,a,o){if(o.current+=1,o.current<12&&a.current.length>0)return a.current;o.current=0;var i=a.current;return i.length=0,r.traverseVisible((function(r){if(void 0===t.getObjectById(r.id)&&"no-occlusion"!==r.userData.lensflare){var a=r;!0!==a.isInstancedMesh&&!0!==a.isSkinnedMesh&&!0===a.isMesh&&i.push(r)}})),i}(z,i,q,K),d=0,p=0,m=0,v=0,y=0,S=0;S<M.length;S++){var b=(0,o.Z)(M[S],3),x=b[0],I=b[1],R=b[2];L.copy(T).addScaledVector(_,x*g).addScaledVector(V,I*g).normalize(),N.near=.1,N.far=1e4,N.set(O,L);var k=W.current;k.length=0,N.intersectObjects(l,!1,k);var Y=k.length>0?0:1;d+=R,p+=Y*R,m+=x*Y*R,v+=I*Y*R,0===S&&(y=Y)}var $=.4*(d>0?p/d:0)+.6*y,J=p>1e-4?m/p:0,ee=p>1e-4?v/p:0,re=B.current;B.current=Math.min(1,Math.max(0,re+($-re)*w)),D.current+=(J-D.current)*w,Q.current+=(ee-Q.current)*w}else u||(B.current*=.8);var ne=U*g*.75;Z.copy(_).multiplyScalar(D.current*ne).addScaledVector(V,Q.current*ne),H.copy(C).add(Z)}else B.current=u?1:0,D.current=0,Q.current=0,H.copy(C);var te=B.current;if(i.visible=u&&te>.01,i.visible){i.position.copy(H),E.copy(H).project(a);var ae=E.x,oe=E.y,ie=1-(Math.hypot(ae,oe)-.35)/1.15;ie=(ie=Math.min(1,Math.max(0,ie)))*ie*(3-2*ie);for(var ue=i.children.length,ce=0;ce<ue;ce++){var le=h[ce],se=i.children[ce],fe=1-2*le.along;G.set(ae*fe,oe*fe,.5).unproject(a).sub(O).normalize(),se.position.copy(G).multiplyScalar(U).add(O).sub(i.position);var de=A.current[ce];de&&(de.opacity=le.opacity*te*(0===le.along?1:ie))}}}})),(0,d.jsx)("group",{ref:j,frustumCulled:!1,children:h.map((function(r,t){var a=.022222222222222223*r.size*I;return(0,d.jsx)("group",{children:(0,d.jsx)(u.V,{follow:!0,lockX:!1,lockY:!1,lockZ:!1,children:(0,d.jsxs)("mesh",{renderOrder:1e4,children:[(0,d.jsx)("planeGeometry",{args:[a,a]}),(0,d.jsx)("meshBasicMaterial",{ref:function ref(r){A.current[t]=r},map:k[r.mapIndex],color:Y[t],transparent:!0,opacity:r.opacity,depthTest:!1,depthWrite:!1,toneMapped:!1,blending:l.WMw})]})})},t)}))})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! filename:114 */
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 699.real-time-viewer-next.umd.min.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignRealTimeViewerNext=self.webpackChunkCrystaldesignRealTimeViewerNext||[]).push([[699],{1699:(t,r,a)=>{a.r(r),a.d(r,{WaterSurface:()=>WaterSurface});var o=a(7363),i=a(4208),l=a(4088),c=a(6831),u=a(5590),h=a(7582),d=a(5150),v=a(2942);function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a={}.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var o=0,i=function F(){};return{s:i,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();return c=t.done,t},e:function e(t){u=!0,l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,o=Array(r);a<r;a++)o[a]=t[a];return o}var p=function(){return(0,h.Z)((function PoolHeightMap(){(0,u.Z)(this,PoolHeightMap),(0,d.Z)(this,"rt",void 0),(0,d.Z)(this,"overrideMaterial",void 0),(0,d.Z)(this,"camera",void 0),(0,d.Z)(this,"lastCenter",new c.Pa4(1/0,1/0,1/0)),(0,d.Z)(this,"lastHalf",new c.Pa4(0,0,0)),(0,d.Z)(this,"lastGeometryVersion",-1),(0,d.Z)(this,"age",120),this.rt=new c.dd2(256,256,{type:c.cLu,format:c.wk1,depthBuffer:!0,stencilBuffer:!1,minFilter:c.wem,magFilter:c.wem}),this.camera=new c.iKG(-1,1,1,-1,.01,1),this.overrideMaterial=new c.jyz({vertexShader:"\n uniform vec3 uVolumeCenter;\n uniform vec3 uPoolHalf;\n varying float vHeightEncoded;\n void main() {\n vec4 worldPosition = vec4(position, 1.0);\n #ifdef USE_INSTANCING\n worldPosition = instanceMatrix * worldPosition;\n #endif\n worldPosition = modelMatrix * worldPosition;\n vHeightEncoded = (worldPosition.y - uVolumeCenter.y + uPoolHalf.y) / (3.0 * uPoolHalf.y);\n gl_Position = projectionMatrix * viewMatrix * worldPosition;\n }\n",fragmentShader:"\n varying float vHeightEncoded;\n void main() {\n gl_FragColor = vec4(vHeightEncoded, 0.0, 0.0, 1.0);\n }\n",uniforms:{uVolumeCenter:{value:new c.Pa4},uPoolHalf:{value:new c.Pa4(1,1,1)}},side:c.ehD})}),[{key:"texture",get:function get(){return this.rt.texture}},{key:"updateCamera",value:function updateCamera(t,r){var a=this.camera;a.up.set(0,0,-1),a.position.set(t.x,t.y+.3,t.z),a.lookAt(t.x,t.y-r.y,t.z),a.left=-r.x,a.right=r.x,a.top=-r.z,a.bottom=r.z,a.near=.01,a.far=.3+r.y+.5,a.updateProjectionMatrix(),a.updateMatrixWorld(!0)}},{key:"renderIfNeeded",value:function renderIfNeeded(t,r,a,o,i,l){var u=this;if(this.age+=1,!(i!==this.lastGeometryVersion||!a.equals(this.lastCenter)||!o.equals(this.lastHalf)||this.age>=120))return!1;this.overrideMaterial.uniforms.uVolumeCenter.value.copy(a),this.overrideMaterial.uniforms.uPoolHalf.value.copy(o),this.updateCamera(a,o);var h,d=[],p=_createForOfIteratorHelper(l);try{for(p.s();!(h=p.n()).done;){var m=h.value;m&&m.visible&&(m.visible=!1,d.push(m))}}catch(t){p.e(t)}finally{p.f()}r.traverse((function(t){var r=t;if(t.visible){if(r.isLine||r.isPoints||r.isSprite)return t.visible=!1,void d.push(t);if(r.isMesh){var a=t,o=a.material,i=function receives(t){if(!(t instanceof c.Wid))return!1;if(t.transparent||t.opacity<1)return!1;var r=t.transmission;return!("number"==typeof r&&r>0)};(Array.isArray(o)?o.some(i):i(o))||(a.visible=!1,d.push(a))}}}));var g=r.overrideMaterial,y=r.background;try{(0,v.s)(t,{target:this.rt,clearColor:0,clearAlpha:1},(function(){t.clear(!0,!0,!1),r.background=null,r.overrideMaterial=u.overrideMaterial,t.render(r,u.camera)}))}finally{r.overrideMaterial=g,r.background=y;for(var x=0,w=d;x<w.length;x++){w[x].visible=!0}}return this.lastCenter.copy(a),this.lastHalf.copy(o),this.lastGeometryVersion=i,this.age=0,!0}},{key:"dispose",value:function dispose(){this.rt.dispose(),this.overrideMaterial.dispose()}}])}();function SceneCapture_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function SceneCapture_unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return SceneCapture_arrayLikeToArray(t,r);var a={}.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?SceneCapture_arrayLikeToArray(t,r):void 0}}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var o=0,i=function F(){};return{s:i,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();return c=t.done,t},e:function e(t){u=!0,l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function SceneCapture_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,o=Array(r);a<r;a++)o[a]=t[a];return o}var m=new c.ZzF,g=function(){return(0,h.Z)((function SceneCapture(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,u.Z)(this,SceneCapture),(0,d.Z)(this,"rt",void 0),(0,d.Z)(this,"width",0),(0,d.Z)(this,"height",0),this.rt=new c.dd2(1,1,{type:c.cLu,format:null!==(t=r.format)&&void 0!==t?t:c.wk1,depthBuffer:!0,stencilBuffer:!1,minFilter:c.wem,magFilter:c.wem}),this.width=1,this.height=1}),[{key:"texture",get:function get(){return this.rt.texture}},{key:"resizeIfNeeded",value:function resizeIfNeeded(t,r,a){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=Math.max(1,Math.round(t*a*o)),l=Math.max(1,Math.round(r*a*o));return(i!==this.width||l!==this.height)&&(this.rt.setSize(i,l),this.width=i,this.height=l,!0)}},{key:"render",value:function render(t,r,a,o,i,l,u){var h,d=this,p=[],g=SceneCapture_createForOfIteratorHelper(o);try{for(g.s();!(h=g.n()).done;){var y=h.value;y&&y.visible&&(y.visible=!1,p.push(y))}}catch(t){g.e(t)}finally{g.f()}u&&r.traverse((function(t){var r=t;if(r.isMesh&&r.visible){var a=r.geometry;if(a){null===a.boundingBox&&a.computeBoundingBox();var o=a.boundingBox;o&&(m.copy(o).applyMatrix4(r.matrixWorld),m.intersectsBox(u)||(r.visible=!1,p.push(r)))}}})),this.rt.scissorTest=!1;var x=r.background;r.background=null;try{(0,v.s)(t,{target:this.rt,toneMapping:c.uL9,clearAlpha:0,clippingPlanes:i},(function(){t.clear(!0,!0,!1),l&&(d.rt.scissor.copy(l),d.rt.scissorTest=!0,t.setRenderTarget(d.rt));try{t.render(r,a)}finally{d.rt.scissorTest=!1}}))}finally{r.background=x;for(var w=0,b=p;w<b.length;w++){b[w].visible=!0}}}},{key:"dispose",value:function dispose(){this.rt.dispose()}}])}(),y=a(8133),x=new c.ZzF,w=new c.iWj,b=new c.yGw,S=new c.Ltg,P=new c.Ltg,C=new c.FM8;var M=function(){return(0,h.Z)((function RefractionCapture(){(0,u.Z)(this,RefractionCapture),(0,d.Z)(this,"capture",new g),(0,d.Z)(this,"clipPlanes",[new c.JOQ(new c.Pa4(-1,0,0),0),new c.JOQ(new c.Pa4(1,0,0),0),new c.JOQ(new c.Pa4(0,-1,0),0),new c.JOQ(new c.Pa4(0,1,0),0),new c.JOQ(new c.Pa4(0,0,-1),0),new c.JOQ(new c.Pa4(0,0,1),0)]),(0,d.Z)(this,"framesSinceCapture",15),(0,d.Z)(this,"capturedViewProj",new c.yGw),(0,d.Z)(this,"capturedBox",new c.ZzF),(0,d.Z)(this,"capturedGeometryVersion",-1)}),[{key:"texture",get:function get(){return this.capture.texture}},{key:"update",value:function update(t){var r=t.renderer,a=t.camera,o=t.material,i=t.volumeCenter,l=t.poolHalf,c=this.capture.resizeIfNeeded(t.cssWidth,t.cssHeight,r.getPixelRatio(),.5);o.uniforms.uSceneColor.value=this.capture.texture,r.getDrawingBufferSize(C),o.uniforms.uResolution.value.set(1/Math.max(1,C.x),1/Math.max(1,C.y));var u=i.x,h=i.y,d=i.z,v=l.x+.25,p=l.y,m=l.z+.25;this.clipPlanes[0].constant=u+v,this.clipPlanes[1].constant=v-u,this.clipPlanes[2].constant=h,this.clipPlanes[3].constant=p-h,this.clipPlanes[4].constant=d+m,this.clipPlanes[5].constant=m-d,x.min.set(u-v,h-p-.4,d-m),x.max.set(u+v,h+.4,d+m),a.updateMatrixWorld(),b.multiplyMatrices(a.projectionMatrix,a.matrixWorldInverse),w.setFromProjectionMatrix(b);var g=t.sceneMutating||t.geometryVersion!==this.capturedGeometryVersion||!x.equals(this.capturedBox)||!function matricesApproxEqual(t,r,a){for(var o=t.elements,i=r.elements,l=0;l<16;l++)if(Math.abs(o[l]-i[l])>a)return!1;return!0}(b,this.capturedViewProj,1e-6);if(this.framesSinceCapture+=1,function isCaptureDue(t,r,a){return a||t>=(r?1:15)}(this.framesSinceCapture,g,c)&&w.intersectsBox(x)){var M=function fitScissorToBox(t,r,a,o,i,l){for(var c=1/0,u=1/0,h=-1/0,d=-1/0,v=0;v<8;v++){if(P.set(1&v?t.max.x:t.min.x,2&v?t.max.y:t.min.y,4&v?t.max.z:t.min.z,1).applyMatrix4(r),P.w<=1e-6)return!1;var p=P.x/P.w,m=P.y/P.w;p<c&&(c=p),p>h&&(h=p),m<u&&(u=m),m>d&&(d=m)}var g=i*a+1,y=i*o+1,x=Math.max(0,Math.floor((.5*c+.5)*a-g)),w=Math.max(0,Math.floor((.5*u+.5)*o-y)),b=Math.min(a,Math.ceil((.5*h+.5)*a+g)),S=Math.min(o,Math.ceil((.5*d+.5)*o+y));return!(b<=x||S<=w)&&(l.set(x,w,b-x,S-w),!0)}(x,b,this.capture.width,this.capture.height,.03,S);(0,y.Jm)(!0);try{this.capture.render(r,t.scene,a,[t.surfaceMesh],this.clipPlanes,M?S:null,x)}finally{(0,y.Jm)(!1)}this.framesSinceCapture=0,this.capturedViewProj.copy(b),this.capturedBox.copy(x),this.capturedGeometryVersion=t.geometryVersion}}},{key:"dispose",value:function dispose(){this.capture.dispose()}}])}();var H=a(7534),z="\n const float IOR_AIR = 1.0;\n const float IOR_WATER = 1.333;\n uniform vec3 light;\n uniform vec3 uPoolHalf; // (halfX, depth, halfZ) — see file header\n uniform sampler2D water;\n\n vec2 intersectCube(vec3 origin, vec3 ray, vec3 cubeMin, vec3 cubeMax) {\n vec3 tMin = (cubeMin - origin) / ray;\n vec3 tMax = (cubeMax - origin) / ray;\n vec3 t1 = min(tMin, tMax);\n vec3 t2 = max(tMin, tMax);\n float tNear = max(max(t1.x, t1.y), t1.z);\n float tFar = min(min(t2.x, t2.y), t2.z);\n return vec2(tNear, tFar);\n }\n";function heightSamplerGLSL(t,r){return"\n float ".concat(t,"(vec2 xz) {\n float encoded = texture2D(").concat(r,", xz / (2.0 * uPoolHalf.xz) + 0.5).r;\n return clamp(encoded * 3.0 * uPoolHalf.y - uPoolHalf.y, -uPoolHalf.y, 0.0);\n }\n")}function heightFieldMarchGLSL(t){var r=t.name,a=t.sampler,o=t.coarseSteps,i=t.guardShallowRays,l=["for (int k = 0; k < 3; k++) {"," p += ray * ((".concat(a,"(p.xz) - p.y) / ray.y);"),"}"],c=i?["if (ray.y < -0.001) {"].concat((0,H.Z)(l.map((function(t){return" ".concat(t)}))),["}"]):l;return"\n vec3 ".concat(r,"(vec3 origin, vec3 ray) {\n vec2 t = intersectCube(origin, ray, vec3(-uPoolHalf.x, -uPoolHalf.y, -uPoolHalf.z), vec3(uPoolHalf.x, 2.0 * uPoolHalf.y, uPoolHalf.z));\n float tEnd = max(t.y, 0.0);\n float lo = 0.0;\n float hi = tEnd;\n bool crossed = false;\n for (int i = 1; i <= ").concat(o,"; i++) {\n float ti = tEnd * float(i) / ").concat(o.toFixed(1),";\n vec3 p = origin + ray * ti;\n if (p.y <= ").concat(a,"(p.xz)) {\n hi = ti;\n crossed = true;\n break;\n }\n lo = ti;\n }\n if (!crossed) {\n vec3 p = origin + ray * tEnd;\n").concat(c.map((function(t){return" ".concat(t)})).join("\n"),"\n return p;\n }\n for (int j = 0; j < 4; j++) {\n float mid = 0.5 * (lo + hi);\n vec3 pm = origin + ray * mid;\n if (pm.y <= ").concat(a,"(pm.xz)) {\n hi = mid;\n } else {\n lo = mid;\n }\n }\n return origin + ray * (0.5 * (lo + hi));\n }\n")}var R="\n ".concat(z,"\n ").concat('\n uniform float uWaterClarity;\n uniform vec3 uWallColor; // MOD #1: replaces sampler2D tiles\n uniform vec3 uSkyHorizonColor; // MOD #2: drives sampleProceduralSky\n uniform vec3 uSkyZenithColor; // MOD #2: drives sampleProceduralSky\n uniform sampler2D causticTex;\n\n // MOD #2: replaces textureCube(sky, ray). Two-color vertical gradient.\n vec3 sampleProceduralSky(vec3 ray) {\n float t = clamp(ray.y * 0.5 + 0.5, 0.0, 1.0);\n return mix(uSkyHorizonColor, uSkyZenithColor, pow(t, 1.5));\n }\n\n // Sample the heightfield at a WORLD-METER xz position. The heightfield\n // texture\'s UV [0, 1]² spans the full pool footprint [-halfX, +halfX] ×\n // [-halfZ, +halfZ].\n vec4 sampleWaterAt(vec2 worldXZ) {\n return texture2D(water, worldXZ / (2.0 * uPoolHalf.xz) + 0.5);\n }\n\n // Sample the caustic texture for a point at WORLD-METER position. The\n // caustic texture indexes by "where would the light from this point have\n // come from at the water surface", projected back along refractedLight.\n // Mapping mirrors the caustics-vertex gl_Position write:\n // clip_xz = 0.75 * (point.xz - point.y * slope) / uPoolHalf.xz\n // Both vertex and fragment use this identical formula so reading and\n // writing into the texture are consistent across the full pool.\n vec4 sampleCausticAt(vec3 point, vec3 refractedLight) {\n vec2 lookup = (point.xz - point.y * refractedLight.xz / refractedLight.y) / uPoolHalf.xz;\n return texture2D(causticTex, 0.75 * lookup * 0.5 + 0.5);\n }\n\n vec3 getWallColor(vec3 point) {\n float scale = 0.5;\n\n vec3 wallColor;\n vec3 normal;\n // Wall detection: a tiny relative epsilon (0.1% of pool half-extent) so\n // we still recognise points sitting exactly on the wall geometry while\n // being tolerant of floating-point noise in the ray-march hit positions.\n if (abs(point.x) > uPoolHalf.x * 0.999) {\n wallColor = uWallColor; // MOD #1\n normal = vec3(-point.x, 0.0, 0.0);\n } else if (abs(point.z) > uPoolHalf.z * 0.999) {\n wallColor = uWallColor; // MOD #1\n normal = vec3(0.0, 0.0, -point.z);\n } else {\n wallColor = uWallColor; // MOD #1\n normal = vec3(0.0, 1.0, 0.0);\n }\n\n scale /= mix(length(point), 1.0, uWaterClarity); /* pool ambient occlusion */\n\n /* caustics */\n vec3 refractedLight = -refract(-light, vec3(0.0, 1.0, 0.0), IOR_AIR / IOR_WATER);\n float diffuse = max(0.0, dot(refractedLight, normal));\n vec4 info = sampleWaterAt(point.xz);\n if (point.y < info.r) {\n vec4 caustic = sampleCausticAt(point, refractedLight);\n scale += diffuse * caustic.r * 2.0 * caustic.g;\n } else {\n /* shadow for the rim of the pool */\n vec2 t = intersectCube(point, refractedLight, vec3(-uPoolHalf.x, -uPoolHalf.y, -uPoolHalf.z), vec3(uPoolHalf.x, 2.0 * uPoolHalf.y, uPoolHalf.z));\n diffuse *= 1.0 / (1.0 + exp(-200.0 / (1.0 + 10.0 * (t.y - t.x)) * (point.y + refractedLight.y * t.y - uPoolHalf.y / 6.0)));\n\n scale += diffuse * 0.5;\n }\n\n return wallColor * scale;\n }\n',"\n uniform vec3 eye;\n // Screen-space refraction inputs. The host renders the scene minus the\n // water surface itself to uSceneColor once per frame (SceneCapture.ts);\n // the surface then samples that texture at its own screen UV. This\n // replaces the demo's in-shader intersectCube + getWallColor AABB\n // raytrace so the underwater view shows the ACTUAL pool geo in the scene.\n uniform sampler2D uSceneColor;\n uniform vec2 uResolution;\n uniform float uUseScreenSpaceRefraction;\n uniform vec3 uRefractionFallbackColor;\n // Grazing-angle ceiling of the Schlick fresnel, in [fresnelBase, 1.0]. The\n // standard formula reaches 1.0 at cosI = 0, which on steep wave fronts reads\n // as harsh bright streaks (env.water.fresnelMax).\n uniform float uFresnelMax;\n // MOD #7 debug views (0 in production):\n // 4 = LANDING — ramp of the landing height the caustic composite\n // anchors to at this pixel (caustic texture .b at the marched\n // view-ray hit). Downstream of the height map AND caustics pass.\n // 5 = HEIGHTMAP — the raw PoolHeightMap capture painted over the pool\n // footprint. Upstream: exactly what the top-down pass recorded.\n uniform float uCausticDebugMode;\n // Pool receiving-geometry height map (PoolHeightMap.ts) — PRODUCTION\n // input: the SSR composite marches the view ray against it to find the\n // displayed wall/floor point. Also drives debug view 5.\n uniform sampler2D uPoolHeightMap;\n varying vec3 vWaterPos;\n\n // Landing-height debug ramp. Magenta = no data (encoded 0: cleared height\n // map texel, or a caustic ray that landed at the analytic volume floor);\n // blue = volume floor, green = mid-depth, red = waterline.\n vec3 rtvLandingRamp(float encoded) {\n if (encoded < 0.002) return vec3(1.0, 0.0, 1.0);\n float t = clamp(encoded * 3.0, 0.0, 1.0);\n return t < 0.5 ? mix(vec3(0.0, 0.2, 1.0), vec3(0.0, 1.0, 0.2), t * 2.0) : mix(vec3(0.0, 1.0, 0.2), vec3(1.0, 0.1, 0.0), t * 2.0 - 1.0);\n }\n\n ").concat(heightSamplerGLSL("rtvSampleHeight","uPoolHeightMap"),"\n\n // Height-field normal from central differences. Steep wall bands in the\n // map tilt it toward horizontal, so walls get a proper light-incidence\n // term without any analytic-AABB face detection.\n vec3 rtvHeightFieldNormal(vec2 xz) {\n float eps = uPoolHalf.x / 128.0;\n float hxp = rtvSampleHeight(xz + vec2(eps, 0.0));\n float hxm = rtvSampleHeight(xz - vec2(eps, 0.0));\n float hzp = rtvSampleHeight(xz + vec2(0.0, eps));\n float hzm = rtvSampleHeight(xz - vec2(0.0, eps));\n return normalize(vec3(hxm - hxp, 2.0 * eps, hzm - hzp));\n }\n\n /* MOD #7 — find the displayed geometry point along the straight view ray by\n marching it against the pool height map. Runs per FRAGMENT, hence the\n coarser 12-step pass; see heightFieldMarchGLSL for the algorithm. */\n ").concat(heightFieldMarchGLSL({name:"rtvMarchViewRay",sampler:"rtvSampleHeight",coarseSteps:12,guardShallowRays:!0}),"\n\n /*\n * Screen-space refraction sampler.\n *\n * gl_FragCoord.xy * uResolution (with uResolution = 1/drawingBuffer)\n * gives the current fragment's screen UV — the same UV the SceneCapture\n * target was written with, and the UV we sample at. Refraction is flat:\n * the sample is never displaced by the wave normal.\n *\n * The SceneCapture pass clips everything outside the water bbox via\n * six clipping planes installed on the renderer, so any fragment of\n * geometry that sits outside the water volume (above, below, beside\n * the pool) is discarded — those screen pixels stay at the cleared\n * alpha = 0 in the capture.\n *\n * When the sample is alpha=0 (or near-black, since a cleared capture\n * pixel reads as opaque-but-zero on some drivers) — a tall wave crest\n * peeking above the original waterline, so behind it on screen there's\n * no captured geo — return uRefractionFallbackColor, a host-configurable\n * deep-water tint surfaced as a Leva colour picker.\n */\n // Treat cleared / clipped capture pixels as a miss even if alpha is wrong.\n bool rtvSceneCaptureMissed(vec4 s) {\n return s.a < 0.5 || (s.r + s.g + s.b) < 0.02;\n }\n\n vec3 sampleScreenSpaceRefraction(vec3 viewRay, vec3 waterColor) {\n vec2 sampleUV = gl_FragCoord.xy * uResolution;\n vec4 sceneSample = texture2D(uSceneColor, sampleUV);\n\n // Live caustic composite. The capture is rendered with the caustic\n // receivers SUSPENDED (see setCausticReceiversSuspended) so still-scene\n // captures stay byte-identical for the throttle; the animated caustic\n // term is applied here every frame instead.\n //\n // MOD #7 — the hit marches the STRAIGHT view ray, not the refracted\n // one: the capture is an unrefracted straight-view render sampled at\n // the fragment's own screen UV, so the geometry displayed at this\n // fragment lies along the camera ray.\n float causticBoost = 1.0;\n vec3 refractedLight = -refract(-light, vec3(0.0, 1.0, 0.0), IOR_AIR / IOR_WATER);\n vec3 hit = rtvMarchViewRay(vWaterPos, viewRay);\n vec3 hitNormal = rtvHeightFieldNormal(hit.xz);\n float diffuseTerm = max(0.0, dot(refractedLight, hitNormal));\n vec4 info = sampleWaterAt(hit.xz);\n if (hit.y < info.r) {\n vec4 caustic = sampleCausticAt(hit, refractedLight);\n // Landing-height shadow, same rule as the receivers: a hit clearly\n // below the ray's landing is behind the surface that caught the\n // light. b == 0 is the no-data sentinel → no occlusion.\n float landingY = caustic.b * 3.0 * uPoolHalf.y - uPoolHalf.y;\n float occlusion = 1.0 - step(0.002, caustic.b) * smoothstep(0.05, 0.2, landingY - hit.y);\n // Hard ceiling on the contribution: at concave edges the tilted\n // height-field normal and the fold-compressed caustic can multiply\n // into an outline far brighter than the open-floor pattern.\n causticBoost += min(diffuseTerm * caustic.r * 2.0 * caustic.g * occlusion, 0.8);\n }\n\n // The fallback gets the boost too so a caustic band doesn't cut off\n // abruptly at the valid-sample/fallback boundary.\n if (rtvSceneCaptureMissed(sceneSample)) {\n return uRefractionFallbackColor * causticBoost;\n }\n return sceneSample.rgb * causticBoost * waterColor;\n }\n\n vec3 getSurfaceRayColor(vec3 origin, vec3 ray, vec3 waterColor) {\n vec3 color;\n if (ray.y < 0.0) {\n vec2 t = intersectCube(origin, ray, vec3(-uPoolHalf.x, -uPoolHalf.y, -uPoolHalf.z), vec3(uPoolHalf.x, 2.0 * uPoolHalf.y, uPoolHalf.z));\n color = getWallColor(origin + ray * t.y);\n } else {\n vec2 t = intersectCube(origin, ray, vec3(-uPoolHalf.x, -uPoolHalf.y, -uPoolHalf.z), vec3(uPoolHalf.x, 2.0 * uPoolHalf.y, uPoolHalf.z));\n vec3 hit = origin + ray * t.y;\n if (hit.y < uPoolHalf.y / 6.0) {\n color = getWallColor(hit);\n } else {\n color = sampleProceduralSky(ray); // MOD #2\n color += vec3(pow(max(0.0, dot(light, ray)), 5000.0)) * vec3(10.0, 8.0, 6.0);\n }\n }\n if (ray.y < 0.0) color *= waterColor;\n return color;\n }\n\n void main() {\n vec2 coord = vWaterPos.xz / (2.0 * uPoolHalf.xz) + 0.5;\n vec4 info = texture2D(water, coord);\n\n // HEIGHTMAP debug view — the raw PoolHeightMap capture over the pool\n // footprint (same UV the caustics pass samples with).\n if (uCausticDebugMode > 4.5) {\n gl_FragColor = vec4(rtvLandingRamp(texture2D(uPoolHeightMap, coord).r), 1.0);\n return;\n }\n\n /* make water look more \"peaked\" */\n for (int i = 0; i < 5; i++) {\n coord += info.ba * 0.005;\n info = texture2D(water, coord);\n }\n\n vec3 normal = vec3(info.b, sqrt(max(0.0, 1.0 - dot(info.ba, info.ba))), info.a);\n vec3 incomingRay = normalize(vWaterPos - eye);\n\n /* above water */\n vec3 reflectedRay = reflect(incomingRay, normal);\n vec3 refractedRay = refract(incomingRay, normal, IOR_AIR / IOR_WATER);\n\n // LANDING debug view — the landing height the composite uses at this\n // pixel, computed with the same view-ray march as production.\n if (uCausticDebugMode > 3.5) {\n vec3 dbgRefractedLight = -refract(-light, vec3(0.0, 1.0, 0.0), IOR_AIR / IOR_WATER);\n vec3 dbgHit = rtvMarchViewRay(vWaterPos, incomingRay);\n gl_FragColor = vec4(rtvLandingRamp(sampleCausticAt(dbgHit, dbgRefractedLight).b), 1.0);\n return;\n }\n\n float fresnelBase = mix(0.25, 0.05, uWaterClarity);\n // Schlick fresnel. CRITICAL: clamp the cos-incidence term to [0, 1]\n // BEFORE the pow(). On steep wave fronts dot(normal, -incomingRay)\n // can slip slightly above 1.0 (fp error) — then 1.0 - dot becomes\n // negative and pow(negative, 3.0) is undefined in GLSL → NaN.\n // The NaN propagates into fresnel and into mix(refracted, reflected,\n // fresnel), and the framebuffer write clamps NaN to 0, producing\n // pure-black wave-front streaks. The clamp keeps fresnel a well-\n // defined float in [fresnelBase, uFresnelMax] everywhere.\n float cosI = clamp(dot(normal, -incomingRay), 0.0, 1.0);\n float fresnel = mix(fresnelBase, uFresnelMax, pow(1.0 - cosI, 3.0));\n\n vec3 abovewaterColor = mix(vec3(0.25, 1.0, 1.25), vec3(1.0), uWaterClarity);\n vec3 reflectedColor = getSurfaceRayColor(vWaterPos, reflectedRay, abovewaterColor);\n // Refraction path: screen-space sample of the captured scene texture when\n // uUseScreenSpaceRefraction is on, falling back to the demo's in-shader\n // AABB raytrace otherwise. Both paths share the same abovewaterColor tint\n // so toggling between them doesn't shift the overall hue.\n vec3 refractedColor;\n if (uUseScreenSpaceRefraction > 0.5) {\n refractedColor = sampleScreenSpaceRefraction(incomingRay, abovewaterColor);\n } else {\n refractedColor = getSurfaceRayColor(vWaterPos, refractedRay, abovewaterColor);\n }\n\n gl_FragColor = vec4(mix(refractedColor, reflectedColor, fresnel), 1.0);\n }\n"),k="\n ".concat(z,"\n uniform float uCausticIntensity; // MOD #4\n // MOD #7 — receiving-geometry height map (PoolHeightMap.ts). R channel:\n // volume-local height as (y + poolHalf.y) / (3 * poolHalf.y); the cleared\n // texture (0) decodes to the floor plane.\n uniform sampler2D uHeightMap;\n uniform float uHeightMapEnabled;\n varying vec3 oldPos;\n varying vec3 newPos;\n varying vec3 vRay;\n varying float vEdgeFade;\n\n ").concat(heightSamplerGLSL("causticSampleHeight","uHeightMap"),"\n\n /* Runs per VERTEX of the caustic mesh, so it affords a 24-step coarse pass;\n see heightFieldMarchGLSL for the algorithm. */\n ").concat(heightFieldMarchGLSL({name:"causticMarchLightRay",sampler:"causticSampleHeight",coarseSteps:24,guardShallowRays:!1}),"\n\n /* Land the ray on the receiving geometry. Without a height map: the\n demo's AABB clip + flat-floor projection. With one: march the ray\n against the height map — walls, ROUNDED CORNERS and stairs all\n terminate rays at their real position. (The analytic AABB attributes\n corner rays to the wrong wall face: square box vs rounded pool.)\n The caustic-clip lookup is invariant to where along the ray we stop. */\n vec3 project(vec3 origin, vec3 ray, vec3 refractedLight) {\n if (uHeightMapEnabled < 0.5) {\n vec2 tcube = intersectCube(origin, ray, vec3(-uPoolHalf.x, -uPoolHalf.y, -uPoolHalf.z), vec3(uPoolHalf.x, 2.0 * uPoolHalf.y, uPoolHalf.z));\n origin += ray * tcube.y;\n float tplane = (-origin.y - uPoolHalf.y) / refractedLight.y;\n return origin + refractedLight * tplane;\n }\n return causticMarchLightRay(origin, ray);\n }\n\n void main() {\n vec4 info = texture2D(water, position.xy / (2.0 * uPoolHalf.xz) + 0.5);\n info.ba *= uCausticIntensity; // MOD #4: was *= 0.5\n vec3 normal = vec3(info.b, sqrt(max(0.0, 1.0 - dot(info.ba, info.ba))), info.a);\n\n /* project the vertices along the refracted vertex ray */\n vec3 refractedLight = refract(-light, vec3(0.0, 1.0, 0.0), IOR_AIR / IOR_WATER);\n vRay = refract(-light, normal, IOR_AIR / IOR_WATER);\n oldPos = project(position.xzy, refractedLight, refractedLight);\n newPos = project(position.xzy + vec3(0.0, info.r, 0.0), vRay, refractedLight);\n\n // Concave-edge fade. Grazing light makes the landing mapping\n // near-singular at riser bases and wall coves — wave-normal jitter\n // funnels rays onto the exact corner line, which the area-ratio math\n // rewards with harsh max-brightness dashes. Fade landings that are\n // FLAT at their own position (small-radius gradient) but have a STEEP\n // feature nearby (large-radius gradient) — the signature of a concave\n // base line. Wall-FACE landings are steep at both radii and therefore\n // never faded; open floor is flat at both and also untouched.\n vEdgeFade = 1.0;\n if (uHeightMapEnabled > 0.5) {\n float epsNear = uPoolHalf.x / 128.0;\n float epsFar = uPoolHalf.x / 24.0;\n float gxN = causticSampleHeight(newPos.xz + vec2(epsNear, 0.0)) - causticSampleHeight(newPos.xz - vec2(epsNear, 0.0));\n float gzN = causticSampleHeight(newPos.xz + vec2(0.0, epsNear)) - causticSampleHeight(newPos.xz - vec2(0.0, epsNear));\n float gxF = causticSampleHeight(newPos.xz + vec2(epsFar, 0.0)) - causticSampleHeight(newPos.xz - vec2(epsFar, 0.0));\n float gzF = causticSampleHeight(newPos.xz + vec2(0.0, epsFar)) - causticSampleHeight(newPos.xz - vec2(0.0, epsFar));\n float flatHere = 1.0 - smoothstep(0.2, 0.6, length(vec2(gxN, gzN)) / (2.0 * epsNear));\n float steepNearby = smoothstep(0.25, 0.6, length(vec2(gxF, gzF)) / (2.0 * epsFar));\n vEdgeFade = 1.0 - steepNearby * flatHere;\n }\n\n // Caustic-clip output mirrors sampleCausticAt exactly: same projection,\n // same uPoolHalf.xz divide, same 0.75 margin. With slope = 0 (vertical\n // sun) this lands the pool floor [-uPoolHalf.xz, +uPoolHalf.xz] in\n // caustic-clip [-0.75, +0.75], leaving a 25% border for slanted-sun\n // projection drift.\n vec2 lookup = (newPos.xz - newPos.y * refractedLight.xz / refractedLight.y) / uPoolHalf.xz;\n gl_Position = vec4(0.75 * lookup, 0.0, 1.0);\n }\n"),A="\n ".concat(z,"\n varying vec3 oldPos;\n varying vec3 newPos;\n varying vec3 vRay;\n varying float vEdgeFade;\n\n void main() {\n /* if the triangle gets smaller, it gets brighter, and vice versa */\n float oldArea = length(dFdx(oldPos)) * length(dFdy(oldPos));\n float newArea = length(dFdx(newPos)) * length(dFdy(newPos));\n // vEdgeFade suppresses the fold-caustic line at concave height-field\n // edges (riser bases, wall coves) — see CAUSTICS_VERTEX.\n gl_FragColor = vec4(oldArea / newArea * 0.2 * vEdgeFade, 1.0, 0.0, 0.0);\n\n vec3 refractedLight = refract(-light, vec3(0.0, 1.0, 0.0), IOR_AIR / IOR_WATER);\n\n /* shadow for the rim of the pool */\n vec2 t = intersectCube(newPos, -refractedLight, vec3(-uPoolHalf.x, -uPoolHalf.y, -uPoolHalf.z), vec3(uPoolHalf.x, 2.0 * uPoolHalf.y, uPoolHalf.z));\n gl_FragColor.r *= 1.0 / (1.0 + exp(-200.0 / (1.0 + 10.0 * (t.y - t.x)) * (newPos.y - refractedLight.y * t.y - uPoolHalf.y / 6.0)));\n\n // MOD #7 — landing height into the blue channel (same normalization as\n // the height map). Consumers occlude fragments clearly below it.\n gl_FragColor.b = clamp((newPos.y + uPoolHalf.y) / (3.0 * uPoolHalf.y), 0.0, 1.0);\n }\n"),T={vertex:"\n uniform sampler2D water;\n uniform vec3 uPoolHalf;\n varying vec3 vWaterPos;\n void main() {\n vec4 info = texture2D(water, position.xz / (2.0 * uPoolHalf.xz) + 0.5);\n vWaterPos = vec3(position.x, info.r, position.z);\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position.x, info.r, position.z, 1.0);\n }\n",fragment:R},D={vertex:k,fragment:A};function ownKeys(t,r){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),a.push.apply(a,o)}return a}function _objectSpread(t){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(a),!0).forEach((function(r){(0,d.Z)(t,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):ownKeys(Object(a)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))}))}return t}function buildSharedUniformValues(t){var r,a,o,i,l,u,h,d;return{light:{value:(null!==(r=t.light)&&void 0!==r?r:new c.Pa4(.7071,.7071,0)).clone()},water:{value:null!==(a=t.water)&&void 0!==a?a:null},causticTex:{value:null!==(o=t.causticTex)&&void 0!==o?o:null},uPoolHalf:{value:(null!==(i=t.uPoolHalf)&&void 0!==i?i:new c.Pa4(1,1,1)).clone()},uWallColor:{value:(null!==(l=t.uWallColor)&&void 0!==l?l:new c.Pa4(.7,.78,.85)).clone()},uSkyHorizonColor:{value:(null!==(u=t.uSkyHorizonColor)&&void 0!==u?u:new c.Pa4(.78,.85,.95)).clone()},uSkyZenithColor:{value:(null!==(h=t.uSkyZenithColor)&&void 0!==h?h:new c.Pa4(.18,.36,.78)).clone()},uWaterClarity:{value:null!==(d=t.uWaterClarity)&&void 0!==d?d:0}}}function updateSharedUniforms(t,r){var a=t.uniforms;r.light&&a.light.value.copy(r.light),void 0!==r.water&&(a.water.value=r.water),void 0!==r.causticTex&&(a.causticTex.value=r.causticTex),r.uPoolHalf&&a.uPoolHalf.value.copy(r.uPoolHalf),r.uWallColor&&a.uWallColor.value.copy(r.uWallColor),r.uSkyHorizonColor&&a.uSkyHorizonColor.value.copy(r.uSkyHorizonColor),r.uSkyZenithColor&&a.uSkyZenithColor.value.copy(r.uSkyZenithColor),void 0!==r.uWaterClarity&&(a.uWaterClarity.value=r.uWaterClarity)}var W=a(82),L="\n varying vec2 coord;\n void main() {\n coord = position.xy * 0.5 + 0.5;\n gl_Position = vec4(position.xyz, 1.0);\n }\n",I="\n const float PI = 3.141592653589793;\n uniform sampler2D tSrc;\n uniform vec2 center; // pool-normalized [-1, 1]\n uniform float radius; // WORLD METERS\n uniform float strength;\n uniform vec2 poolHalf; // (vx, vz) world half-extents (meters)\n varying vec2 coord;\n void main() {\n vec4 info = texture2D(tSrc, coord);\n\n vec2 texelWorld = (coord * 2.0 - 1.0) * poolHalf;\n vec2 centerWorld = center * poolHalf;\n float drop = max(0.0, 1.0 - distance(texelWorld, centerWorld) / radius);\n drop = 0.5 - cos(drop * PI) * 0.5;\n info.r += drop * strength;\n\n gl_FragColor = info;\n }\n",O="\n uniform sampler2D tSrc;\n uniform vec2 delta;\n uniform float damping;\n varying vec2 coord;\n void main() {\n /* get vertex info */\n vec4 info = texture2D(tSrc, coord);\n\n /* calculate average neighbor height */\n vec2 dx = vec2(delta.x, 0.0);\n vec2 dy = vec2(0.0, delta.y);\n float average = (\n texture2D(tSrc, coord - dx).r +\n texture2D(tSrc, coord - dy).r +\n texture2D(tSrc, coord + dx).r +\n texture2D(tSrc, coord + dy).r\n ) * 0.25;\n\n /* change the velocity to move toward the average */\n info.g += (average - info.r) * 2.0;\n\n /* attenuate the velocity a little so waves do not last forever */\n info.g *= damping;\n\n /* move the vertex along the velocity */\n info.r += info.g;\n\n gl_FragColor = info;\n }\n",Z="\n uniform sampler2D tSrc;\n uniform vec2 delta;\n varying vec2 coord;\n void main() {\n /* get vertex info */\n vec4 info = texture2D(tSrc, coord);\n\n /* update the normal */\n vec3 dx = vec3(delta.x, texture2D(tSrc, vec2(coord.x + delta.x, coord.y)).r - info.r, 0.0);\n vec3 dy = vec3(0.0, texture2D(tSrc, vec2(coord.x, coord.y + delta.y)).r - info.r, delta.y);\n info.ba = normalize(cross(dy, dx)).xz;\n\n gl_FragColor = info;\n }\n",E=function(){return(0,h.Z)((function Heightfield(){var t,r,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,u.Z)(this,Heightfield),(0,d.Z)(this,"sizeX",void 0),(0,d.Z)(this,"sizeY",void 0),(0,d.Z)(this,"delta",void 0),(0,d.Z)(this,"poolHalf",void 0),(0,d.Z)(this,"rtA",void 0),(0,d.Z)(this,"rtB",void 0),(0,d.Z)(this,"scene",void 0),(0,d.Z)(this,"camera",void 0),(0,d.Z)(this,"quad",void 0),(0,d.Z)(this,"dropMat",void 0),(0,d.Z)(this,"updateMat",void 0),(0,d.Z)(this,"normalMat",void 0),(0,d.Z)(this,"clearedOnce",!1),this.sizeX=null!==(t=a.sizeX)&&void 0!==t?t:256,this.sizeY=null!==(r=a.sizeY)&&void 0!==r?r:this.sizeX,this.delta=new c.FM8(1/this.sizeX,1/this.sizeY),this.poolHalf=new c.FM8(1,1),a.poolHalf&&this.poolHalf.copy(a.poolHalf);var o={type:c.cLu,format:c.wk1,wrapS:c.uWy,wrapT:c.uWy,magFilter:c.wem,minFilter:c.wem,depthBuffer:!1,stencilBuffer:!1};this.rtA=new c.dd2(this.sizeX,this.sizeY,o),this.rtB=new c.dd2(this.sizeX,this.sizeY,o),this.scene=new c.xsS,this.camera=new c.iKG(-1,1,1,-1,0,1),this.quad=new c.Kj0(new c._12(2,2)),this.scene.add(this.quad),this.dropMat=new c.jyz({vertexShader:L,fragmentShader:I,uniforms:{tSrc:{value:null},center:{value:new c.FM8(0,0)},radius:{value:.1},strength:{value:.01},poolHalf:{value:this.poolHalf}},depthTest:!1,depthWrite:!1}),this.updateMat=new c.jyz({vertexShader:L,fragmentShader:O,uniforms:{tSrc:{value:null},delta:{value:this.delta},damping:{value:.995}},depthTest:!1,depthWrite:!1}),this.normalMat=new c.jyz({vertexShader:L,fragmentShader:Z,uniforms:{tSrc:{value:null},delta:{value:this.delta}},depthTest:!1,depthWrite:!1})}),[{key:"currentTexture",get:function get(){return this.rtA.texture}},{key:"ensureCleared",value:function ensureCleared(t){var r=this;this.clearedOnce||((0,v.s)(t,{target:this.rtA,clearColor:0,clearAlpha:0},(function(){t.clear(!0,!0,!0),t.setRenderTarget(r.rtB),t.clear(!0,!0,!0)})),this.clearedOnce=!0)}},{key:"renderPass",value:function renderPass(t,r){this.quad.material=r,t.setRenderTarget(this.rtB),t.render(this.scene,this.camera),t.setRenderTarget(null);var a=[this.rtB,this.rtA];this.rtA=a[0],this.rtB=a[1]}},{key:"addDrop",value:function addDrop(t,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.1,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.01;this.ensureCleared(t),this.dropMat.uniforms.tSrc.value=this.rtA.texture,this.dropMat.uniforms.center.value.copy(r),this.dropMat.uniforms.radius.value=a,this.dropMat.uniforms.strength.value=o,this.renderPass(t,this.dropMat)}},{key:"step",value:function step(t){this.ensureCleared(t),this.updateMat.uniforms.tSrc.value=this.rtA.texture,this.renderPass(t,this.updateMat)}},{key:"setDamping",value:function setDamping(t){this.updateMat.uniforms.damping.value=t}},{key:"updateNormals",value:function updateNormals(t){this.ensureCleared(t),this.normalMat.uniforms.tSrc.value=this.rtA.texture,this.renderPass(t,this.normalMat)}},{key:"dispose",value:function dispose(){this.rtA.dispose(),this.rtB.dispose(),this.dropMat.dispose(),this.updateMat.dispose(),this.normalMat.dispose(),this.quad.geometry.dispose()}}])}(),_=function(){return(0,h.Z)((function CausticsTexture(){var t,r,a,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,u.Z)(this,CausticsTexture),(0,d.Z)(this,"size",void 0),(0,d.Z)(this,"poolHalf",void 0),(0,d.Z)(this,"rt",void 0),(0,d.Z)(this,"scene",void 0),(0,d.Z)(this,"camera",void 0),(0,d.Z)(this,"quad",void 0),(0,d.Z)(this,"material",void 0),this.size=null!==(t=o.size)&&void 0!==t?t:1024;var i=null!==(r=o.detail)&&void 0!==r?r:200;this.poolHalf=(null!==(a=o.poolHalf)&&void 0!==a?a:new c.Pa4(1,1,1)).clone(),this.rt=new c.dd2(this.size,this.size,{type:c.ywz,format:c.wk1,depthBuffer:!1,stencilBuffer:!1}),this.scene=new c.xsS,this.camera=new c.iKG(-1,1,1,-1,0,1),this.material=new c.jyz({vertexShader:D.vertex,fragmentShader:D.fragment,uniforms:{light:{value:new c.Pa4(.7071,.7071,0)},water:{value:null},uPoolHalf:{value:this.poolHalf.clone()},uCausticIntensity:{value:.5},uHeightMap:{value:null},uHeightMapEnabled:{value:0}},depthTest:!1,depthWrite:!1});var l=this.poolHalf.x,h=this.poolHalf.z,v=Math.max(l,h),p=i/Math.max(.001,2*v),m=Math.max(32,Math.round(2*l*p)),g=Math.max(32,Math.round(2*h*p));this.quad=new c.Kj0(new c._12(2*l,2*h,m,g),this.material),this.scene.add(this.quad)}),[{key:"texture",get:function get(){return this.rt.texture}},{key:"render",value:function render(t){var r=this;(0,v.s)(t,{target:this.rt,clearColor:0,clearAlpha:0},(function(){t.clear(!0,!1,!1),t.render(r.scene,r.camera)}))}},{key:"setHeightfield",value:function setHeightfield(t){this.material.uniforms.water.value=t}},{key:"setLight",value:function setLight(t,r,a){this.material.uniforms.light.value.set(t,r,a)}},{key:"setIntensity",value:function setIntensity(t){this.material.uniforms.uCausticIntensity.value=t}},{key:"setHeightMap",value:function setHeightMap(t){this.material.uniforms.uHeightMap.value=t,this.material.uniforms.uHeightMapEnabled.value=t?1:0}},{key:"dispose",value:function dispose(){this.rt.dispose(),this.material.dispose(),this.quad.geometry.dispose()}}])}();function useWaveSimulation_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function useWaveSimulation_unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return useWaveSimulation_arrayLikeToArray(t,r);var a={}.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?useWaveSimulation_arrayLikeToArray(t,r):void 0}}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var o=0,i=function F(){};return{s:i,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();return c=t.done,t},e:function e(t){u=!0,l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function useWaveSimulation_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,o=Array(r);a<r;a++)o[a]=t[a];return o}var j=function(){return(0,h.Z)((function SubstepAccumulator(){(0,u.Z)(this,SubstepAccumulator),(0,d.Z)(this,"leftover",0)}),[{key:"take",value:function take(t,r){this.leftover+=t*Math.min(r,.06666666666666667);var a=Math.floor(this.leftover);return this.leftover-=a,a}},{key:"reset",value:function reset(){this.leftover=0}}])}();var B={off:0,overlay:1,isolate:2,mask:3,landing:4,heightmap:5};var N=a(120),V=a(7514);function WaterSurfaceRenderer(t){var r=t.position,a=t.volumeSize,u=t.sunDirection,h=t.wallColor,d=t.skyHorizonColor,v=t.skyZenithColor,m=t.heightfieldSize,g=t.causticTextureSize,y=t.substeps,x=t.ambientDropPeriod,w=t.pointerStrength,b=t.causticIntensity,S=t.waterClarity,P=t.useScreenSpaceRefraction,C=t.refractionFallbackColor,H=t.fresnelMax,z=t.causticDebugMode,R=(0,o.useRef)(null),k=(0,o.useRef)(null),A=(0,l.D)((function(t){return t.gl})),D=(0,l.D)((function(t){return t.camera})),L=(0,l.D)((function(t){return t.scene})),I=(0,l.D)((function(t){return t.size})),O=(0,o.useRef)(null);null===O.current&&(O.current=new M);var Z=(0,o.useRef)(null);null===Z.current&&(Z.current=new p);var G=(0,o.useMemo)((function(){return new c.Pa4(a[0]/2,a[1],a[2]/2)}),[a[0],a[1],a[2]]),X=function useWaveSimulation(t){var r=t.poolHalf,a=t.heightfieldSize,i=t.causticTextureSize,u=t.substeps,h=t.ambientDropPeriod,d=(0,l.D)((function(t){return t.gl})),v=(0,o.useRef)(null),p=(0,o.useRef)(null),m=(0,o.useRef)([]),g=(0,o.useRef)(!1),y=(0,o.useRef)(0),x=(0,o.useRef)(new j),w=(0,o.useMemo)((function(){var t=r.x,o=r.z,i=a/(2*Math.max(t,o));return{sizeX:Math.max(32,Math.round(2*t*i)),sizeY:Math.max(32,Math.round(2*o*i)),poolHalfX:t,poolHalfZ:o,poolDepth:r.y}}),[r.x,r.y,r.z,a]);return(0,o.useEffect)((function(){var t=new E({sizeX:w.sizeX,sizeY:w.sizeY,poolHalf:new c.FM8(w.poolHalfX,w.poolHalfZ)}),r=new _({poolHalf:new c.Pa4(w.poolHalfX,w.poolDepth,w.poolHalfZ),size:i});return v.current=t,p.current=r,g.current=!1,x.current.reset(),function(){t.dispose(),r.dispose(),v.current=null,p.current=null}}),[w,i]),{queueDrop:(0,o.useCallback)((function(t,r,a){m.current.push({center:t,radius:r,strength:a})}),[]),advance:function advance(t){var r=v.current,a=p.current;if(!r||!a)return!1;if(!g.current){for(var o=0;o<10;o++){var i=2*Math.random()-1,l=2*Math.random()-1;r.addDrop(d,new c.FM8(i,l),.3,1&o?.04:-.04)}g.current=!0}if(h>0&&(y.current+=t,y.current>=h)){y.current=0;var w=2*Math.random()-1,b=2*Math.random()-1;r.addDrop(d,new c.FM8(w,b),.24,.04)}if(m.current.length>0){var S,P=useWaveSimulation_createForOfIteratorHelper(m.current);try{for(P.s();!(S=P.n()).done;){var C=S.value;r.addDrop(d,C.center,C.radius,C.strength)}}catch(t){P.e(t)}finally{P.f()}m.current.length=0}var M=60*u;if(M>0){r.setDamping(Math.pow(.547,1/M));for(var H=x.current.take(M,t),z=0;z<H;z++)r.step(d)}return r.updateNormals(d),!0},setHeightMap:function setHeightMap(t){var r;null===(r=p.current)||void 0===r||r.setHeightMap(t)},renderCaustics:function renderCaustics(t,r){var a=v.current,o=p.current;a&&o&&(o.setHeightfield(a.currentTexture),o.setLight(t.x,t.y,t.z),o.setIntensity(r),o.render(d))},get heightTexture(){var t,r;return null!==(t=null===(r=v.current)||void 0===r?void 0:r.currentTexture)&&void 0!==t?t:null},get causticTexture(){var t,r;return null!==(t=null===(r=p.current)||void 0===r?void 0:r.texture)&&void 0!==t?t:null}}}({poolHalf:G,heightfieldSize:m,causticTextureSize:g,substeps:y,ambientDropPeriod:x}),q=function useWaterPointer(t,r){var a=(0,o.useCallback)((function(r,a){r.uv&&t(new c.FM8(2*r.uv.x-1,1-2*r.uv.y),.1,a)}),[t]);return{onPointerMove:(0,o.useCallback)((function(t){return a(t,.01*r)}),[a,r]),onPointerDown:(0,o.useCallback)((function(t){return a(t,.04*r)}),[a,r])}}(X.queueDrop,w),Y=(0,o.useMemo)((function(){var t=function segs(t){return Math.max(32,Math.min(256,Math.round(50*t)))},r=new c._12(2*G.x,2*G.z,t(2*G.x),t(2*G.z));r.rotateX(Math.PI/2);for(var a=r.attributes.normal.array,o=1;o<a.length;o+=3)a[o]=1;return r}),[G.x,G.z]),J=(0,o.useMemo)((function(){return new c._12(2*G.x,2*G.z)}),[G.x,G.z]),K=(0,o.useMemo)((function(){return new c.vBJ({colorWrite:!1,depthWrite:!1,side:c.ehD})}),[]),Q=(0,o.useMemo)((function(){return function createWaterSurfaceAboveMaterial(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new c.jyz({vertexShader:T.vertex,fragmentShader:T.fragment,uniforms:_objectSpread(_objectSpread({},buildSharedUniformValues(r)),{},{eye:{value:(null!==(t=r.eye)&&void 0!==t?t:new c.Pa4(0,5,5)).clone()},uSceneColor:{value:null},uResolution:{value:new c.FM8(1,1)},uUseScreenSpaceRefraction:{value:0},uRefractionFallbackColor:{value:new c.Pa4(.039,.145,.251)},uFresnelMax:{value:1},uCausticDebugMode:{value:0},uPoolHeightMap:{value:null}}),transparent:!1,side:c.ehD})}({uPoolHalf:G.clone(),uWallColor:colorToVec3(h),uSkyHorizonColor:colorToVec3(d),uSkyZenithColor:colorToVec3(v)})}),[]);(0,o.useEffect)((function(){return function(){Y.dispose(),J.dispose()}}),[Y,J]),(0,o.useEffect)((function(){return function(){K.dispose(),Q.dispose()}}),[K,Q]),(0,o.useEffect)((function(){updateSharedUniforms(Q,{uPoolHalf:G}),W.f.poolHalf.copy(G)}),[G,Q]),(0,o.useEffect)((function(){return function(){(0,W.g)()}}),[]),(0,o.useEffect)((function(){return function(){var t,r;null===(t=O.current)||void 0===t||t.dispose(),O.current=null,null===(r=Z.current)||void 0===r||r.dispose(),Z.current=null}}),[]),(0,o.useEffect)((function(){var t=colorToVec3(h),r=colorToVec3(d),a=colorToVec3(v);updateSharedUniforms(Q,{uWallColor:t,uSkyHorizonColor:r,uSkyZenithColor:a,uWaterClarity:S})}),[h,d,v,S,Q]),(0,o.useEffect)((function(){var t=colorToVec3(C);Q.uniforms.uRefractionFallbackColor.value.copy(t)}),[C,Q]);var $=(0,o.useRef)(new c.Pa4),ee=(0,o.useRef)(new c.Pa4);return(0,l.F)((function(t,r){if(X.advance(r)){var a=R.current;if(a){var o=a.position;$.current.set(D.position.x-o.x,D.position.y-o.y,D.position.z-o.z)}else $.current.copy(D.position);ee.current.set(u[0],u[1],u[2]).normalize(),a&&a.getWorldPosition(W.f.volumeCenter);var l=i.tb.getState(),c=l.articleVersion+l.decorVersion,h=Z.current;h&&(h.renderIfNeeded(A,L,W.f.volumeCenter,G,c,[a]),X.setHeightMap(h.texture)),X.renderCaustics(ee.current,b),updateSharedUniforms(Q,{water:X.heightTexture,causticTex:X.causticTexture,light:ee.current}),Q.uniforms.eye.value.copy($.current);var d=O.current;d&&P&&d.update({renderer:A,scene:L,camera:D,material:Q,surfaceMesh:k.current,volumeCenter:W.f.volumeCenter,poolHalf:G,cssWidth:I.width,cssHeight:I.height,geometryVersion:c,sceneMutating:l.isDragging||null!==l.accessoryMove}),Q.uniforms.uUseScreenSpaceRefraction.value=P?1:0,Q.uniforms.uFresnelMax.value=H,W.f.waterTex=X.heightTexture,W.f.causticTex=X.causticTexture,W.f.light.copy(ee.current),function publishCausticDebugMode(t,r){var a=B[r];W.f.causticDebugMode=a<=3?a:0,t.uniforms.uCausticDebugMode.value=a}(Q,z),Q.uniforms.uPoolHeightMap.value=h?h.texture:null,W.f.enabled=!0}}),N.l.WATER_CAPTURE),(0,V.jsxs)("group",{ref:R,position:r,children:[(0,V.jsx)("mesh",{ref:k,geometry:Y,material:Q,raycast:U}),(0,V.jsx)("mesh",{geometry:J,material:K,rotation:[-Math.PI/2,0,0],onPointerMove:q.onPointerMove,onPointerDown:q.onPointerDown})]})}var U=function NOOP_RAYCAST(){};function colorToVec3(t){var r=new c.Ilk(t);return new c.Pa4(r.r,r.g,r.b)}var G=a(7067);function WaterSurface(){var t,r,a=(0,i.tb)((function(t){return t.resolvedEnvironment.water})),l=(0,i.tb)((function(t){return t.resolvedEnvironment.lighting.sun})),c=(0,i.tb)((function(t){return t.waterVolumeOverride})),u=a.causticSun,h=(0,o.useMemo)((function(){return u?(0,G.mo)(u.azimuth,u.elevation):(0,G.ww)(l)}),[u,l]);return(0,V.jsx)(WaterSurfaceRenderer,{position:null!==(t=null==c?void 0:c.center)&&void 0!==t?t:a.volume.center,volumeSize:null!==(r=null==c?void 0:c.size)&&void 0!==r?r:a.volume.size,sunDirection:h,wallColor:a.wallColor,skyHorizonColor:a.skyHorizonColor,skyZenithColor:a.skyZenithColor,waterClarity:a.waterClarity,ambientDropPeriod:a.ambientDropPeriod,pointerStrength:a.pointerStrength,heightfieldSize:a.heightfieldSize,causticTextureSize:a.causticTextureSize,causticIntensity:a.causticIntensity,useScreenSpaceRefraction:a.useScreenSpaceRefraction,refractionFallbackColor:a.refractionFallbackColor,fresnelMax:a.fresnelMax,causticDebugMode:a.causticDebugMode,substeps:a.waveSpeed})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! filename:699 */
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 964.real-time-viewer-next.umd.min.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunkCrystaldesignRealTimeViewerNext=self.webpackChunkCrystaldesignRealTimeViewerNext||[]).push([[964],{6964:(t,r,a)=>{a.r(r),a.d(r,{DeckCutoutSubsystem:()=>DeckCutoutSubsystem});var o=a(7363),i=a(7080),l=a(5150),u=a(4088),c=a(4208),m=a(8683),v=a(6831),h=a(8141),p="Element#",y=new v.ZzF,g=new v.ZzF;function topLevelElements(t){return t.filter((function(t){for(var r=t.parent;r;r=r.parent)if(r.name.startsWith(p))return!1;return!0}))}function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a={}.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var o=0,i=function F(){};return{s:i,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();return u=t.done,t},e:function e(t){c=!0,l=t},f:function f(){try{u||null==a.return||a.return()}finally{if(c)throw l}}}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,o=Array(r);a<r;a++)o[a]=t[a];return o}function matchArticleRule(t,r){var a,o=_createForOfIteratorHelper(t);try{for(o.s();!(a=o.n()).done;){var i=a.value,l=i.match.trim();if(""===l||"*"===l)return i;if(void 0!==r)if(l.split(",").map((function(t){return t.trim()})).filter((function(t){return t.length>0})).some((function(t){return r.includes(t)})))return i}}catch(t){o.e(t)}finally{o.f()}return null}var x=a(7534);function polygon2d_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function polygon2d_unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return polygon2d_arrayLikeToArray(t,r);var a={}.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?polygon2d_arrayLikeToArray(t,r):void 0}}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var o=0,i=function F(){};return{s:i,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();return u=t.done,t},e:function e(t){c=!0,l=t},f:function f(){try{u||null==a.return||a.return()}finally{if(c)throw l}}}}function polygon2d_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,o=Array(r);a<r;a++)o[a]=t[a];return o}var b=1e-9;function polygonSignedArea(t){for(var r=0,a=0;a<t.length;a++){var o=(0,i.Z)(t[a],2),l=o[0],u=o[1],c=(0,i.Z)(t[(a+1)%t.length],2),m=c[0];r+=l*c[1]-m*u}return r/2}function simplifyChain(t,r,a){if(t.length<3)for(var o=0;o<t.length-1;o++)a.push(t[o]);else{for(var l=(0,i.Z)(t[0],2),u=l[0],c=l[1],m=(0,i.Z)(t[t.length-1],2),v=m[0],h=m[1],p=Math.hypot(v-u,h-c)||b,y=-1,g=-1,x=1;x<t.length-1;x++){var M=(0,i.Z)(t[x],2),A=M[0],S=M[1],w=Math.abs((v-u)*(c-S)-(u-A)*(h-c))/p;w>y&&(y=w,g=x)}y<=r?a.push(t[0]):(simplifyChain(t.slice(0,g+1),r,a),simplifyChain(t.slice(g),r,a))}}function simplifyClosedPolygon(t,r){if(t.length<4||r<=0)return(0,x.Z)(t);for(var a=(0,i.Z)(t[0],2),o=a[0],l=a[1],u=1,c=-1,m=1;m<t.length;m++){var v=Math.hypot(t[m][0]-o,t[m][1]-l);v>c&&(c=v,u=m)}var h=[];return simplifyChain(t.slice(0,u+1),r,h),simplifyChain([].concat((0,x.Z)(t.slice(u)),[t[0]]),r,h),h}function segmentsCross(t,r,a,o,i,l,u,c){var m=function cross(t,r,a,o,i,l){return(a-t)*(l-r)-(o-r)*(i-t)},v=m(t,r,a,o,i,l),h=m(t,r,a,o,u,c),p=m(i,l,u,c,t,r),y=m(i,l,u,c,a,o);return(v>0&&h<0||v<0&&h>0)&&(p>0&&y<0||p<0&&y>0)}function ensureSimplePolygon(t){if(t.length<3)return null;if(function isSimplePolygon(t){var r=t.length;if(r<4)return!0;for(var a=0;a<r;a++)for(var o=(0,i.Z)(t[a],2),l=o[0],u=o[1],c=(0,i.Z)(t[(a+1)%r],2),m=c[0],v=c[1],h=a+1;h<r;h++)if(h!==a+1&&(0!==a||h!==r-1)){var p=(0,i.Z)(t[h],2),y=p[0],g=p[1],x=(0,i.Z)(t[(h+1)%r],2);if(segmentsCross(l,u,m,v,y,g,x[0],x[1]))return!1}return!0}(t))return Math.abs(polygonSignedArea(t))<=b?null:{points:(0,x.Z)(t),repaired:!1};var r=function convexHull(t){if(t.length<3)return(0,x.Z)(t);var r=(0,x.Z)(t).sort((function(t,r){return t[0]-r[0]||t[1]-r[1]})),a=function cross(t,r,a){return(r[0]-t[0])*(a[1]-t[1])-(r[1]-t[1])*(a[0]-t[0])},o=function build(t){var r,o=[],i=polygon2d_createForOfIteratorHelper(t);try{for(i.s();!(r=i.n()).done;){for(var l=r.value;o.length>=2&&a(o[o.length-2],o[o.length-1],l)<=0;)o.pop();o.push(l)}}catch(t){i.e(t)}finally{i.f()}return o},i=o(r),l=o((0,x.Z)(r).reverse());return[].concat((0,x.Z)(i.slice(0,-1)),(0,x.Z)(l.slice(0,-1)))}(t);return r.length<3||Math.abs(polygonSignedArea(r))<=b?null:{points:r,repaired:!0}}function rasterMask_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function rasterMask_unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return rasterMask_arrayLikeToArray(t,r);var a={}.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?rasterMask_arrayLikeToArray(t,r):void 0}}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var o=0,i=function F(){};return{s:i,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();return u=t.done,t},e:function e(t){c=!0,l=t},f:function f(){try{u||null==a.return||a.return()}finally{if(c)throw l}}}}function rasterMask_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,o=Array(r);a<r;a++)o[a]=t[a];return o}function closeMask(t,r,a,o){if(!(o<1)){var i=new Uint8Array(t.length);boxPassX(t,i,r,a,o,!0),boxPassZ(i,t,r,a,o,!0),boxPassX(t,i,r,a,o,!1),boxPassZ(i,t,r,a,o,!1)}}function fillEnclosed(t,r,a){for(var o=new Uint8Array(t.length),i=[],l=function visit(r){0===t[r]&&0===o[r]&&(o[r]=1,i.push(r))},u=0;u<r;u++)l(u),l((a-1)*r+u);for(var c=0;c<a;c++)l(c*r),l(c*r+r-1);for(;i.length>0;){var m=i.pop(),v=m%r,h=(m-v)/r;v>0&&l(m-1),v<r-1&&l(m+1),h>0&&l(m-r),h<a-1&&l(m+r)}for(var p=0,y=0;y<t.length;y++)0===t[y]&&0===o[y]&&(t[y]=1,p+=1);return p}function offsetMask(t,r,a,o,i){var l=new Uint8Array(t.length);boxPassX(t,l,r,a,o,i),boxPassZ(l,t,r,a,o,i)}function windowSizes(t,r){for(var a=new Int32Array(r),o=0;o<r;o++)a[o]=Math.min(r-1,o+t)-Math.max(0,o-t)+1;return a}function boxPassX(t,r,a,o,i,l){for(var u=windowSizes(i,a),c=0;c<o;c++){for(var m=c*a,v=0,h=0;h<=i&&h<a;h++)v+=t[m+h];for(var p=0;p<a;p++){r[m+p]=(l?v>0:v===u[p])?1:0;var y=p-i,g=p+i+1;y>=0&&(v-=t[m+y]),g<a&&(v+=t[m+g])}}}function boxPassZ(t,r,a,o,i,l){for(var u=new Int32Array(a),c=windowSizes(i,o),m=0;m<=i&&m<o;m++)for(var v=m*a,h=0;h<a;h++)u[h]+=t[v+h];for(var p=0;p<o;p++){for(var y=p*a,g=c[p],x=0;x<a;x++)r[y+x]=(l?u[x]>0:u[x]===g)?1:0;var b=p-i,M=p+i+1;if(b>=0)for(var A=b*a,S=0;S<a;S++)u[S]-=t[A+S];if(M<o)for(var w=M*a,k=0;k<a;k++)u[k]+=t[w+k]}}var M=[[],[[3,0]],[[0,1]],[[3,1]],[[1,2]],[[3,0],[1,2]],[[0,2]],[[3,2]],[[2,3]],[[0,2]],[[0,1],[2,3]],[[1,2]],[[1,3]],[[0,1]],[[3,0]],[]];function marchingSquaresLoops(t,r,a,o,l,u){for(var c=function edgeKey(t,a,o){return 0===t?2*(o*r+a):2===t?2*((o+1)*r+a):3===t?2*(o*r+a)+1:2*(o*r+a+1)+1},m=function edgePoint(t){var a=Math.floor(t/2),i=a%r,c=Math.floor(a/r);return t%2==0?[o+(i+1)*u,l+(c+.5)*u]:[o+(i+.5)*u,l+(c+1)*u]},v=new Map,h=function link(t,r){var a=v.get(t);a?a.push(r):v.set(t,[r]);var o=v.get(r);o?o.push(t):v.set(r,[t])},p=0;p<a-1;p++)for(var y=0;y<r-1;y++){var g=t[p*r+y]|t[p*r+y+1]<<1|t[(p+1)*r+y+1]<<2|t[(p+1)*r+y]<<3;if(0!==g&&15!==g){var x,b=rasterMask_createForOfIteratorHelper(M[g]);try{for(b.s();!(x=b.n()).done;){var A=(0,i.Z)(x.value,2),S=A[0],w=A[1];h(c(S,y,p),c(w,y,p))}}catch(t){b.e(t)}finally{b.f()}}}var k,C=new Set,Z=[],T=rasterMask_createForOfIteratorHelper(v.keys());try{var O=function _loop(){var t=k.value;if(C.has(t))return 1;for(var r=[],a=t,o=-1;!C.has(a);){var i;C.add(a),r.push(m(a));var l=(null!==(i=v.get(a))&&void 0!==i?i:[]).find((function(t){return t!==o&&!C.has(t)}));if(void 0===l)break;o=a,a=l}r.length>=3&&Z.push(r)};for(T.s();!(k=T.n()).done;)O()}catch(t){T.e(t)}finally{T.f()}return Z}var A=16e6;function articleFootprint_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function articleFootprint_unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return articleFootprint_arrayLikeToArray(t,r);var a={}.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?articleFootprint_arrayLikeToArray(t,r):void 0}}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var o=0,i=function F(){};return{s:i,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();return u=t.done,t},e:function e(t){c=!0,l=t},f:function f(){try{u||null==a.return||a.return()}finally{if(c)throw l}}}}function articleFootprint_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,o=Array(r);a<r;a++)o[a]=t[a];return o}var S=new v.yGw,w=new v.Pa4;function traceArticleFootprint(t,r,a,o,l,u,c){var m,v=[],h=[],p=articleFootprint_createForOfIteratorHelper(t);try{for(p.s();!(m=p.n()).done;){m.value.traverse((function(t){var r=t;if(r.isMesh&&r.visible){var a=r.geometry.getAttribute("position");a&&(v.push(r),h.push("".concat(r.name,":").concat(a.count)))}}))}}catch(t){p.e(t)}finally{p.f()}if(0===v.length)return null;var y=a.maxX-a.minX,g=a.maxY-a.minY,x=a.maxZ-a.minZ,b="".concat(o.toFixed(3),"|").concat(a.maxY.toFixed(3),"|").concat(l.toFixed(3),"|").concat(y.toFixed(3),"x").concat(g.toFixed(3),"x").concat(x.toFixed(3),"|").concat(h.join(","));if(!c.current||c.current.signature!==b){var M,k=performance.now(),C=[],Z=0,T=0,O=articleFootprint_createForOfIteratorHelper(v);try{for(O.s();!(M=O.n()).done;){var X=M.value,E=X.geometry,I=E.getAttribute("position");T+=I.count,S.multiplyMatrices(r,X.matrixWorld);for(var D=new Float32Array(3*I.count),L=0;L<I.count;L++)w.set(I.getX(L),I.getY(L),I.getZ(L)).applyMatrix4(S),D[3*L]=w.x,D[3*L+1]=w.y,D[3*L+2]=w.z;for(var _=E.index,j=_?Math.floor(_.count/3):Math.floor(I.count/3),z=0;z<j;z++){var N=_?_.getX(3*z):3*z,P=_?_.getX(3*z+1):3*z+1,R=_?_.getX(3*z+2):3*z+2,Y=D[3*N+1],U=D[3*P+1],H=D[3*R+1];Y<o&&U<o&&H<o||(C.push(D[3*N],D[3*N+2],D[3*P],D[3*P+2],D[3*R],D[3*R+2]),Z+=1)}}}catch(t){O.e(t)}finally{O.f()}var W=function traceFootprintFromTriangles(t){var r,a,o,l,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=null!==(r=u.cellSize)&&void 0!==r?r:.005,m=null!==(a=u.simplifyTolerance)&&void 0!==a?a:c,v=null!==(o=u.closeGap)&&void 0!==o?o:.02,h=v<=0?0:Math.max(1,Math.round(v/(2*c))),p=null!==(l=u.offset)&&void 0!==l?l:0,y=Math.round(Math.abs(p)/c),g=p>0,x=Math.floor(t.length/6);if(x<1||c<=0)return[];for(var b=1/0,M=-1/0,S=1/0,w=-1/0,k=0;k<6*x;k+=2){var C=t[k],Z=t[k+1];C<b&&(b=C),C>M&&(M=C),Z<S&&(S=Z),Z>w&&(w=Z)}if(!Number.isFinite(b)||M-b<c||w-S<c)return[];var T=h+(g?y:0)+1,O=b-T*c,X=S-T*c,E=Math.ceil((M-b)/c)+2*T+1,I=Math.ceil((w-S)/c)+2*T+1;if(E*I>A)return[];for(var D=new Uint8Array(E*I),L=function cellOf(t,r,a){return Math.min(a-T-1,Math.max(T,Math.floor((t-r)/c)))},_=function mark(t,r){D[L(r,X,I)*E+L(t,O,E)]=1},j=0;j<x;j++){var z=6*j,N=t[z],P=t[z+1],R=t[z+2],Y=t[z+3],U=t[z+4],H=t[z+5];_(N,P),_(R,Y),_(U,H);var W=Math.abs((R-N)*(H-P)-(U-N)*(Y-P)),B=Math.max(Math.hypot(R-N,Y-P),Math.hypot(U-R,H-Y),Math.hypot(N-U,P-H));if((B>1e-9?W/B:0)<1.5*c)for(var V=0,q=[[N,P,R,Y],[R,Y,U,H],[U,H,N,P]];V<q.length;V++)for(var G=(0,i.Z)(q[V],4),$=G[0],K=G[1],J=G[2],Q=G[3],ee=Math.ceil(Math.hypot(J-$,Q-K)/(.7*c)),te=1;te<ee;te++){var re=te/ee;_($+(J-$)*re,K+(Q-K)*re)}for(var ne=L(Math.min(P,Y,H),X,I),ae=L(Math.max(P,Y,H),X,I),oe=ne;oe<=ae;oe++){for(var ie=X+(oe+.5)*c,le=1/0,ue=-1/0,ce=0;ce<3;ce++){var fe=0===ce?N:1===ce?R:U,se=0===ce?P:1===ce?Y:H,me=0===ce?R:1===ce?U:N,de=0===ce?Y:1===ce?H:P;if(se!==de&&!(ie<Math.min(se,de)||ie>=Math.max(se,de))){var ve=fe+(ie-se)/(de-se)*(me-fe);ve<le&&(le=ve),ve>ue&&(ue=ve)}}if(!(le>ue)){var he=Math.max(T,Math.ceil((le-O)/c-.5)),pe=Math.min(E-T-1,Math.floor((ue-O)/c-.5));he<=pe&&D.fill(1,oe*E+he,oe*E+pe+1)}}}closeMask(D,E,I,h);var ye=fillEnclosed(D,E,I);y>=1&&offsetMask(D,E,I,y,g);var ge=u.diagnostics;if(ge){ge.enclosedFilled=ye;for(var xe=0,be=0;be<D.length;be++)xe+=D[be];ge.filledCells=xe}var Me=marchingSquaresLoops(D,E,I,O,X,c);if(ge&&(ge.loops=Me.length),0===Me.length)return[];for(var Ae=Me[0],Se=Math.abs(polygonSignedArea(Ae)),Fe=Se,we=1;we<Me.length;we++){var ke=Math.abs(polygonSignedArea(Me[we]));Fe+=ke,ke>Se&&(Se=ke,Ae=Me[we])}var Ce=simplifyClosedPolygon(Ae,m);return ge&&(ge.chosenAreaShare=Fe>0?Se/Fe:0,ge.pointsBeforeSimplify=Ae.length,ge.pointsAfterSimplify=Ce.length),Ce.length>=3?Ce:[]}(C,{cellSize:.005,offset:l,diagnostics:u});return c.current={signature:b,relPoints:W.map((function(t){var r=(0,i.Z)(t,2),o=r[0],l=r[1];return[o-a.minX,l-a.minZ]})),triCount:Z,vertexCount:T},{points:W,triCount:Z,vertexCount:T,retraced:!0,traceMs:performance.now()-k}}var B=c.current,V=B.relPoints,q=B.triCount,G=B.vertexCount;return{points:V.map((function(t){var r=(0,i.Z)(t,2),o=r[0],l=r[1];return[o+a.minX,l+a.minZ]})),triCount:q,vertexCount:G,retraced:!1,traceMs:0}}function anchorElements_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function anchorElements_unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return anchorElements_arrayLikeToArray(t,r);var a={}.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?anchorElements_arrayLikeToArray(t,r):void 0}}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var o=0,i=function F(){};return{s:i,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();return u=t.done,t},e:function e(t){c=!0,l=t},f:function f(){try{u||null==a.return||a.return()}finally{if(c)throw l}}}}function anchorElements_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,o=Array(r);a<r;a++)o[a]=t[a];return o}var k=.001,C=new v.Pa4,Z=new v.Pa4;function anchorDelta1D(t,r,a,o,i,l){return"min"===t?r-a+l-o:"max"===t?r+a-l-i:r+l-(o+i)/2}var T=new v.Vkp,O=new v.Pa4,X=new v.Pa4,E=new v.Pa4;var I=a(4399);function ownKeys(t,r){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),a.push.apply(a,o)}return a}function _objectSpread(t){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(a),!0).forEach((function(r){(0,l.Z)(t,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):ownKeys(Object(a)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))}))}return t}var D=(0,m.getLogger)("RealTimeViewer","DeckCutoutArticleSync");function DeckCutoutArticleSync(){var t=(0,u.D)((function(t){return t.scene})),r=(0,c.tb)((function(t){return JSON.stringify(t.resolvedEnvironment.scene.deckCutout)})),a=(0,o.useMemo)((function(){return JSON.parse(r)}),[r]),l=(0,c.tb)((function(t){return t.setWaterVolumeOverride})),m=(0,c.tb)((function(t){return t.setDeckCutoutFootprintOverride})),x=(0,o.useRef)(0),b=(0,o.useRef)(0),M=(0,o.useRef)(!1),A=(0,o.useRef)(null),S=(0,o.useRef)(null),w=(0,o.useRef)(!1),L=(0,o.useRef)(0),_=a.enabled&&a.articleSync.enabled,j=_&&a.elementAnchor.enabled,z=_&&a.waterSync.enabled;(0,o.useEffect)((function(){return _||m(null),function(){return m(null)}}),[_,m]),(0,o.useEffect)((function(){var t=function clear(){Object.keys(c.tb.getState().elementAnchorOffsets).length>0&&c.tb.getState().setElementAnchorOffsets({})};return j||t(),t}),[j]),(0,o.useEffect)((function(){return z||l(null),function(){return l(null)}}),[z,l]);var N=(0,o.useMemo)((function(){return a.nodeMatch.split(",").map((function(t){return t.trim()})).filter((function(t){return t.length>0}))}),[a.nodeMatch]),P=(0,c.tb)((function(t){return t.articleVersion})),R=(0,c.tb)((function(t){return t.decorVersion}));return(0,o.useEffect)((function(){_&&(w.current=!0,L.current=0)}),[P,R,_]),(0,u.F)((function(){if(_&&0!==N.length&&(x.current+=1,w.current||x.current%30==1)){var r=c.tb.getState(),o=r.waterVolumeOverride,u=r.deckCutoutFootprintOverride,P=!1,R=function finishMeasure(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t)return L.current=0,void(w.current=!1);var r=c.tb.getState(),a=P||r.waterVolumeOverride!==o||r.deckCutoutFootprintOverride!==u;if(a)return L.current=0,void(w.current=!0);L.current+=1,L.current>=3&&(w.current=!1)};b.current+=1;var Y=function measureArticle(t,r,a){var o,i,l=[],u=[],c=[];if(g.makeEmpty(),t.traverse((function(t){var o;if(0===c.length){var i=t;i.isMesh&&r.some((function(t){return i.name.includes(t)}))&&c.push(i)}if(t.name.startsWith(p)&&(l.push(t),y.setFromObject(t),!y.isEmpty())){g.union(y);var m=null===(o=a.get((0,h.zs)(t.name)))||void 0===o?void 0:o.articleCodex;void 0!==m&&u.push({codex:m,area:(y.max.x-y.min.x)*(y.max.z-y.min.z)})}})),u.sort((function(t,r){return r.area-t.area})),g.isEmpty())return null;var m=c[0];if(!m)return null;var x=(new v.yGw).copy(m.matrixWorld).invert(),b=m.geometry;b.boundingBox||b.computeBoundingBox();var M=null!==(o=null===(i=b.boundingBox)||void 0===i?void 0:i.max.y)&&void 0!==o?o:0,A=g.min.y;return g.applyMatrix4(x),{rect:{minX:g.min.x,maxX:g.max.x,minY:g.min.y,maxY:g.max.y,minZ:g.min.z,maxZ:g.max.z},worldBottomY:A,elementObjects:l,codexesByArea:u,floorWorld:m.matrixWorld,floorLocal:x,floorTopY:M}}(t,N,c.tb.getState().elementsInfo);if(!Y)return l(null),m(null),void R(!0);var U=function pickArticleRule(t,r){var a,o,i=null===(a=r[0])||void 0===a?void 0:a.codex,l=matchArticleRule(t,void 0),u=articleFootprint_createForOfIteratorHelper(r);try{for(u.s();!(o=u.n()).done;){var c=o.value,m=matchArticleRule(t,c.codex);if(m){l=m,i=c.codex;break}}}catch(t){u.e(t)}finally{u.f()}return{rule:l,primaryCodex:i}}(a.articleRules,Y.codexesByArea),H=U.rule,W=U.primaryCodex,B=function deriveArticleFootprint(t,r,a,o){var l,u,c={points:null,rim:null,sampledCount:0,source:"",repairNote:"",tracedBounds:"",trace:{filledCells:0,enclosedFilled:0,loops:0,chosenAreaShare:0,pointsBeforeSimplify:0,pointsAfterSimplify:0}};if(!r||!r.footprintFromGeometry)return c;var m=t.rect,v=t.floorLocal,h=t.floorTopY,p=t.elementObjects,y=m.maxX-m.minX,g=m.maxZ-m.minZ,x=traceArticleFootprint(topLevelElements(p),v,m,h-r.footprintSliceDepth,a,c.trace,o),b=1/0,M=-1/0,A=1/0,S=-1/0;if(x&&x.points.length>=3){var w,k=articleFootprint_createForOfIteratorHelper(x.points);try{for(k.s();!(w=k.n()).done;){var C=(0,i.Z)(w.value,2),Z=C[0],T=C[1];Z<b&&(b=Z),Z>M&&(M=Z),T<A&&(A=T),T>S&&(S=T)}}catch(t){k.e(t)}finally{k.f()}b+=a,M-=a,A+=a,S-=a,c.tracedBounds="X [".concat(b.toFixed(2),", ").concat(M.toFixed(2),"] Z [").concat(A.toFixed(2),", ").concat(S.toFixed(2),"]")}if(x&&M>b&&M-b>=.6*y&&S-A>=.6*g){var O;c.rim={minX:b,maxX:M,minZ:A,maxZ:S};var X=ensureSimplePolygon(x.points);return null!=X&&X.repaired&&(c.repairNote=" | HULL-REPAIRED, traced outline self-intersects (concavities lost)"),null===X&&(c.repairNote=" | outline UNUSABLE even as a hull"),c.points=null!==(O=null==X?void 0:X.points)&&void 0!==O?O:null,c.sampledCount=x.points.length,c.source=x.retraced?"geometry traced in ".concat(x.traceMs.toFixed(1)," ms (").concat(x.vertexCount," verts, ").concat(x.triCount," tris in slice)"):"geometry cached (".concat(x.triCount," tris in slice)"),c}return c.points=function measuredRectFootprint(t,r){var a=t.minX-r,o=t.maxX+r,i=t.minZ-r,l=t.maxZ+r;return o-a<.1||l-i<.1?null:[[a,i],[o,i],[o,l],[a,l]]}(m,a),c.sampledCount=null!==(l=null===(u=c.points)||void 0===u?void 0:u.length)&&void 0!==l?l:0,c.source=M>b?"geometry: TRACE COVERS ONLY ".concat(((M-b)/y*100).toFixed(0),"%×").concat(((S-A)/g*100).toFixed(0),"% of the article — fell back to the measured rect"):"geometry: NO TRIANGLES ABOVE THE SLICE PLANE — fell back to the measured rect",c}(Y,H,a.articleSync.margin,S),V=B.rim?_objectSpread(_objectSpread({},Y.rect),B.rim):Y.rect,q=function measureLog(t){var r,a,o,l,u=t.measurement,c=t.rule,m=t.primaryCodex,v=t.footprint,h=t.hole,p=u.rect,y=u.floorTopY,g=v.points,x=g?g.reduce((function(t,r){var a=(0,i.Z)(r,2),o=a[0],l=a[1];return[Math.min(t[0],o),Math.max(t[1],o),Math.min(t[2],l),Math.max(t[3],l)]}),[1/0,-1/0,1/0,-1/0]):null,b="".concat(null!=m?m:"","|").concat(null!==(r=null==c?void 0:c.match)&&void 0!==r?r:"","|").concat(v.sampledCount,"|").concat(null!==(a=null==g?void 0:g.length)&&void 0!==a?a:0,"|").concat(null!==(o=null==x?void 0:x.map((function(t){return t.toFixed(2)})).join(","))&&void 0!==o?o:""),M=p.maxX-p.minX,A=p.maxZ-p.minZ,S=c&&c.footprintFromGeometry?" | Y: deck top ".concat(y.toFixed(2),", article [").concat(p.minY.toFixed(2),", ").concat(p.maxY.toFixed(2),"], slice keeps ≥ ").concat((y-c.footprintSliceDepth).toFixed(2)):"";if(""===v.source)l=" | NO outline rule matched this codex → NO COLLAR, the authored hole stays fully open";else if(x&&g){var w=[x[0]-(h.centerX-h.halfExtentX),h.centerX+h.halfExtentX-x[1],x[2]-(h.centerZ-h.halfExtentZ),h.centerZ+h.halfExtentZ-x[3]].map((function(t){return t.toFixed(2)}));l=" | measured ".concat(M.toFixed(2),"×").concat(A.toFixed(2))+(""===v.tracedBounds?"":" | traced ".concat(v.sampledCount," pts ").concat(v.tracedBounds))+" | outline ".concat(g.length," pts X [").concat(x[0].toFixed(2),", ").concat(x[1].toFixed(2),"] Z [").concat(x[2].toFixed(2),", ").concat(x[3].toFixed(2),"]")+" | hole X [".concat((h.centerX-h.halfExtentX).toFixed(2),", ").concat((h.centerX+h.halfExtentX).toFixed(2),"] Z [").concat((h.centerZ-h.halfExtentZ).toFixed(2),", ").concat((h.centerZ+h.halfExtentZ).toFixed(2),"]")+" | slack X ".concat(w[0],"/").concat(w[1]," Z ").concat(w[2],"/").concat(w[3])+" | ".concat(v.source).concat(v.repairNote)+(v.trace.loops>0?" | trace: ".concat(v.trace.filledCells," cells (").concat(v.trace.enclosedFilled," filled in), ").concat(v.trace.loops," loop(s), kept ").concat((100*v.trace.chosenAreaShare).toFixed(0),"% of contour area, ").concat(v.trace.pointsBeforeSimplify," → ").concat(v.trace.pointsAfterSimplify," pts"):"")}else l=" | ".concat(v.source," produced NO usable outline (").concat(v.sampledCount," pts)").concat(v.repairNote," → NO COLLAR, the authored hole stays fully open");return{key:b,message:"[DeckCutout] article codex: ".concat(null!=m?m:"(unknown)"," → rule: ").concat(c?"'".concat(c.match,"'"):"(none — articleSync globals)").concat(S).concat(l)}}({measurement:Y,rule:H,primaryCodex:W,footprint:B,hole:a.authoredHole});A.current!==q.key&&(A.current=q.key,D.debug(q.message));var G=j?function deriveElementAnchor(t){var r=t.rect,a=t.hole,o=t.anchor,i=t.floorWorld,l=t.elementObjects,u=t.deckTopLocalY,c=t.currentOffsets,m=anchorDelta1D(o.anchorX,a.centerX,a.halfExtentX,r.minX,r.maxX,o.offsetX),v=anchorDelta1D(o.anchorZ,a.centerZ,a.halfExtentZ,r.minZ,r.maxZ,o.offsetZ),p=(r.minX+r.maxX)/2,y=(r.minZ+r.maxZ)/2,g=r.maxY,x=(o.alignTopToDeck?u-g:0)+o.offsetY;C.set(p+m,g+x,y+v).applyMatrix4(i),Z.set(p,g,y).applyMatrix4(i);var b=C.x-Z.x,M=C.y-Z.y,A=C.z-Z.z;if(Math.abs(b)<k&&Math.abs(M)<k&&Math.abs(A)<k)return null;var S=topLevelElements(l);if(0===S.length)return null;var w,T={},O=anchorElements_createForOfIteratorHelper(S);try{for(O.s();!(w=O.n()).done;){var X,E=w.value,I=(0,h.zs)(E.name),D=null!==(X=c[I])&&void 0!==X?X:[0,0,0];T[I]=[D[0]+b,D[1]+M,D[2]+A]}}catch(t){O.e(t)}finally{O.f()}return{delta:{dx:m,dy:x,dz:v},offsets:T}}({rect:V,hole:a.authoredHole,anchor:a.elementAnchor,floorWorld:Y.floorWorld,elementObjects:Y.elementObjects,deckTopLocalY:Y.floorTopY,currentOffsets:c.tb.getState().elementAnchorOffsets}):null;P=null!==G,G&&c.tb.getState().setElementAnchorOffsets(G.offsets);var $=G?function shiftRect(t,r){return{minX:t.minX+r.dx,maxX:t.maxX+r.dx,minY:t.minY+r.dy,maxY:t.maxY+r.dy,minZ:t.minZ+r.dz,maxZ:t.maxZ+r.dz}}(V,G.delta):V;m(B.points&&G?B.points.map((function(t){var r=(0,i.Z)(t,2),a=r[0],o=r[1];return[a+G.delta.dx,o+G.delta.dz]})):B.points),M.current||null===c.tb.getState().deckCutoutFootprintOverride||(M.current=!0,(0,I._m)("deck: first footprint published",{measures:b.current})),z&&l(function deriveWaterVolume(t){var r=t.rect,a=t.waterSync,o=t.floorWorld,i=t.articleWorldBottomY,l=t.waterlineY,u=a.inset,c=Math.max(r.maxX-r.minX-2*u,.1),m=Math.max(r.maxZ-r.minZ-2*u,.1);O.set((r.minX+r.maxX)/2+a.offsetX,0,(r.minZ+r.maxZ)/2+a.offsetZ),O.applyMatrix4(o),T.setFromMatrix4(o),X.set(c,0,0).applyMatrix3(T),E.set(0,0,m).applyMatrix3(T);var v=Math.abs(X.x)+Math.abs(E.x),h=Math.abs(X.z)+Math.abs(E.z),p=Math.max(l-i,.5);return{center:[O.x,l,O.z],size:[v,p,h]}}({rect:$,waterSync:a.waterSync,floorWorld:Y.floorWorld,articleWorldBottomY:Y.worldBottomY,waterlineY:c.tb.getState().resolvedEnvironment.water.volume.center[1]})),R()}})),null}var L=12,_=1e-12;function solve3(t,r){var a=t[0]*(t[4]*t[8]-t[5]*t[7])-t[1]*(t[3]*t[8]-t[5]*t[6])+t[2]*(t[3]*t[7]-t[4]*t[6]);if(Math.abs(a)<_)return null;return[function d(r,a,o){return r*(t[4]*t[8]-t[5]*t[7])-t[1]*(a*t[8]-t[5]*o)+t[2]*(a*t[7]-t[4]*o)}(r[0],r[1],r[2])/a,(t[0]*(r[1]*t[8]-t[5]*r[2])-r[0]*(t[3]*t[8]-t[5]*t[6])+t[2]*(t[3]*r[2]-r[1]*t[6]))/a,(t[0]*(t[4]*r[2]-r[1]*t[7])-t[1]*(t[3]*r[2]-r[1]*t[6])+r[0]*(t[3]*t[7]-t[4]*t[6]))/a]}function fitAffineUV(t,r){var a=3*r;if(a<3)return null;for(var o=0,i=0,l=0,u=0,c=0,m=0,v=0,h=0,p=0,y=0,g=0,x=0;x<a;x++){var b=4*x,M=t[b],A=t[b+1],S=t[b+2],w=t[b+3];o+=M*M,i+=M*A,l+=M,u+=A*A,c+=A,m+=M*S,v+=A*S,h+=S,p+=M*w,y+=A*w,g+=w}var k=[o,i,l,i,u,c,l,c,a],C=solve3(k,[m,v,h]),Z=solve3(k,[p,y,g]);if(!C||!Z)return null;for(var T=0,O=0;O<a;O++){var X=4*O,E=t[X],I=t[X+1],D=C[0]*E+C[1]*I+C[2]-t[X+2],L=Z[0]*E+Z[1]*I+Z[2]-t[X+3];T+=D*D+L*L}var j=(Math.hypot(C[0],C[1])+Math.hypot(Z[0],Z[1]))/2,z=Math.sqrt(T/a);return{ux:C[0],uz:C[1],u0:C[2],vx:Z[0],vz:Z[1],v0:Z[2],residualMetres:j>_?z/j:1/0}}function segmentDistanceSq(t,r,a,o,i,l){var u=i-a,c=l-o,m=u*u+c*c,v=m<_?0:Math.max(0,Math.min(1,((t-a)*u+(r-o)*c)/m)),h=a+v*u-t,p=o+v*c-r;return h*h+p*p}function triangleDistanceSq(t,r,a,o,i,l,u,c){if((i-a)*(c-o)-(u-a)*(l-o)==0)return 1/0;var m=(i-a)*(r-o)-(l-o)*(t-a),v=(u-i)*(r-l)-(c-l)*(t-i),h=(a-u)*(r-c)-(o-c)*(t-u);return m>=0&&v>=0&&h>=0||m<=0&&v<=0&&h<=0?0:Math.min(segmentDistanceSq(t,r,a,o,i,l),segmentDistanceSq(t,r,i,l,u,c),segmentDistanceSq(t,r,u,c,a,o))}function nearestTriangleLinear(t,r,a,o){for(var i=1/0,l=-1,u=0;u<r;u++){var c=u*L,m=triangleDistanceSq(a,o,t[c],t[c+1],t[c+4],t[c+5],t[c+8],t[c+9]);if(m<i&&(i=m,l=u,0===m))break}return l}var j=1e7;function isFiniteXZ(t,r,a,o,i,l){return Number.isFinite(t)&&Number.isFinite(r)&&Number.isFinite(a)&&Number.isFinite(o)&&Number.isFinite(i)&&Number.isFinite(l)}function gridDim(t,r){return Math.min(256,Math.max(1,Math.ceil(t/r)))}function cellOf(t,r,a,o){var i=Math.floor((t-r)/a);return i<0?0:i>=o?o-1:i}function buildTriangleGridIndex(t,r){if(r<64)return null;for(var a=1/0,o=-1/0,i=1/0,l=-1/0,u=0,c=0,m=0;m<r;m++){var v=m*L,h=t[v],p=t[v+1],y=t[v+4],g=t[v+5],x=t[v+8],b=t[v+9];if(isFiniteXZ(h,p,y,g,x,b)){var M=Math.min(h,y,x),A=Math.max(h,y,x),S=Math.min(p,g,b),w=Math.max(p,g,b);M<a&&(a=M),A>o&&(o=A),S<i&&(i=S),w>l&&(l=w),u+=Math.max(A-M,w-S),c+=1}}if(c<64||r-c>.25*r)return null;var k=o-a,C=l-i,Z=Math.max(k,C);if(!(Z>0))return null;var T=k*C/c,O=Math.max(u/c,T>0?Math.sqrt(T):0,Z/256),X=gridDim(k,O),E=gridDim(C,O),I=Math.max(1024,4*c);X*E>I&&(X=gridDim(k,O*=Math.sqrt(X*E/I)),E=gridDim(C,O));for(var D=X*E,_=new Int32Array(4*r),j=new Int32Array(D+1),z=[],N=0;N<r;N++){var P=N*L,R=t[P],Y=t[P+1],U=t[P+4],H=t[P+5],W=t[P+8],B=t[P+9];if(isFiniteXZ(R,Y,U,H,W,B)&&(U-R)*(B-Y)-(W-R)*(H-Y)!=0){var V=cellOf(Math.min(R,U,W),a,O,X),q=cellOf(Math.max(R,U,W),a,O,X),G=cellOf(Math.min(Y,H,B),i,O,E),$=cellOf(Math.max(Y,H,B),i,O,E);if((q-V+1)*($-G+1)>64)_[4*N]=-1,z.push(N);else{_[4*N]=V,_[4*N+1]=q,_[4*N+2]=G,_[4*N+3]=$;for(var K=G;K<=$;K++)for(var J=V;J<=q;J++)j[K*X+J+1]+=1}}else _[4*N]=-1,z.push(N)}if(z.length>.25*r)return null;for(var Q=0;Q<D;Q++)j[Q+1]+=j[Q];for(var ee=new Int32Array(j[D]),te=j.slice(0,D),re=0;re<r;re++){var ne=_[4*re];if(!(ne<0))for(var ae=_[4*re+1],oe=_[4*re+2],ie=_[4*re+3],le=oe;le<=ie;le++)for(var ue=ne;ue<=ae;ue++){var ce=le*X+ue;ee[te[ce]]=re,te[ce]+=1}}return{triangleCount:r,minX:a,minZ:i,cellSize:O,cols:X,rows:E,cellStart:j,cellItems:ee,extras:Int32Array.from(z)}}function sampleNearestTriangleUV(t,r,a,o,i){var l=i&&i.triangleCount===r?function nearestTriangleIndexed(t,r,a,o){var i=o.minX,l=o.minZ,u=o.cellSize,c=o.cols,m=o.rows,v=o.cellStart,h=o.cellItems,p=o.extras,y=Math.floor((r-i)/u),g=Math.floor((a-l)/u);if(!Number.isFinite(y)||!Number.isFinite(g)||Math.abs(y)>j||Math.abs(g)>j)return nearestTriangleLinear(t,o.triangleCount,r,a);for(var x=1/0,b=-1,M=function consider(o){var i=o*L,l=triangleDistanceSq(r,a,t[i],t[i+1],t[i+4],t[i+5],t[i+8],t[i+9]);(l<x||l===x&&o<b)&&(x=l,b=o)},A=function scanCell(t){for(var r=v[t+1],a=v[t];a<r;a++)M(h[a])},S=0;S<p.length;S++)M(p[S]);for(var w=Math.max(0,-y,y-c+1,-g,g-m+1),k=Math.max(y,c-1-y,g,m-1-g),C=w;C<=k;C++){var Z=y-C,T=y+C,O=g-C,X=g+C,E=Math.max(0,Z),I=Math.min(c-1,T);if(O>=0&&O<m)for(var D=E;D<=I;D++)A(O*c+D);if(C>0){if(X>=0&&X<m)for(var _=E;_<=I;_++)A(X*c+_);var z=Math.max(0,O+1),N=Math.min(m-1,X-1);if(Z>=0&&Z<c)for(var P=z;P<=N;P++)A(P*c+Z);if(T>=0&&T<c)for(var R=z;R<=N;R++)A(R*c+T)}var Y=Math.min(r-(i+Z*u),i+(T+1)*u-r,a-(l+O*u),l+(X+1)*u-a);if(Y>0&&x<Y*Y*(1-1e-9))return b}return b}(t,a,o,i):nearestTriangleLinear(t,r,a,o);if(l<0)return null;var u=l*L,c=t[u],m=t[u+1],v=t[u+4],h=t[u+5],p=t[u+8],y=t[u+9],g=(h-y)*(c-p)+(p-v)*(m-y);if(Math.abs(g)<_)return null;var x=((h-y)*(a-p)+(p-v)*(o-y))/g,b=((y-m)*(a-p)+(c-p)*(o-y))/g,M=1-x-b;return[x*t[u+2]+b*t[u+6]+M*t[u+10],x*t[u+3]+b*t[u+7]+M*t[u+11]]}function collectDeckTriangles_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function collectDeckTriangles_unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return collectDeckTriangles_arrayLikeToArray(t,r);var a={}.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?collectDeckTriangles_arrayLikeToArray(t,r):void 0}}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var o=0,i=function F(){};return{s:i,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();return u=t.done,t},e:function e(t){c=!0,l=t},f:function f(){try{u||null==a.return||a.return()}finally{if(c)throw l}}}}function collectDeckTriangles_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,o=Array(r);a<r;a++)o[a]=t[a];return o}var z=.005,N=new v.yGw,P=new v.Vkp,R=new v.Pa4,Y=new v.Pa4;function sampleDeckSurface(t,r){var a,o,i,l,u,c=function meshesMatching(t,r){var a=[];return t.traverse((function(t){var o=t;o.isMesh&&r.some((function(t){return o.name.includes(t)}))&&a.push(o)})),a}(t,r),m=null!==(a=c[0])&&void 0!==a?a:null;if(!m)return{reference:null,surface:null};var h=m.geometry;h.boundingBox||h.computeBoundingBox();var p,y,g=function patternAttributeName(t){var r=Array.isArray(t)?t[0]:t;return r instanceof v.Wid&&r.map?0===r.map.channel?"uv":"uv".concat(r.map.channel):"uv"}(m.material),x=function collectDeckTriangles(t,r,a){var o,i=N.copy(r.matrixWorld).invert().clone(),l=[],u={minX:1/0,maxX:-1/0,minZ:1/0,maxZ:-1/0},c=collectDeckTriangles_createForOfIteratorHelper(t);try{for(c.s();!(o=c.n()).done;){var m,v=o.value,h=v.geometry,p=h.getAttribute("position"),y=null!==(m=h.getAttribute(a))&&void 0!==m?m:h.getAttribute("uv");if(p&&y){var g=h.getAttribute("normal");N.multiplyMatrices(i,v.matrixWorld);for(var x=new Float32Array(3*p.count),b=0;b<p.count;b++)R.set(p.getX(b),p.getY(b),p.getZ(b)).applyMatrix4(N),x[3*b]=R.x,x[3*b+1]=R.y,x[3*b+2]=R.z,R.x<u.minX&&(u.minX=R.x),R.x>u.maxX&&(u.maxX=R.x),R.z<u.minZ&&(u.minZ=R.z),R.z>u.maxZ&&(u.maxZ=R.z);var M=new Float32Array(g?g.count:0);if(g){P.getNormalMatrix(N);for(var A=0;A<g.count;A++)Y.set(g.getX(A),g.getY(A),g.getZ(A)).applyMatrix3(P).normalize(),M[A]=Y.y}var S=-1/0;if(!g){for(var w=1/0,k=-1/0,C=0;C<p.count;C++){var Z=x[3*C+1];Z<w&&(w=Z),Z>k&&(k=Z)}S=(w+k)/2}for(var T=h.index,O=T?Math.floor(T.count/3):Math.floor(p.count/3),X=0;X<O;X++){var E=T?T.getX(3*X):3*X,I=T?T.getX(3*X+1):3*X+1,D=T?T.getX(3*X+2):3*X+2;if(g?M[E]>=.9&&M[I]>=.9&&M[D]>=.9:x[3*E+1]>S&&x[3*I+1]>S&&x[3*D+1]>S)for(var _=0,j=[E,I,D];_<j.length;_++){var z=j[_];l.push(x[3*z],x[3*z+2],y.getX(z),y.getY(z))}}}}}catch(t){c.e(t)}finally{c.f()}var U=l.length/L;return U<1?null:{triangles:new Float32Array(l),triangleCount:U,extent:u}}(c,m,g),b=h.boundingBox;return{reference:m,surface:{meshName:m.name,topY:null!==(o=null==b?void 0:b.max.y)&&void 0!==o?o:0,slabThickness:b?b.max.y-b.min.y:0,material:x?(p=Array.isArray(m.material)?m.material[0]:m.material,y=p.clone(),y instanceof v.Wid&&(y.aoMap=null,y.lightMap=null),y.needsUpdate=!0,y):null,triangles:null!==(i=null==x?void 0:x.triangles)&&void 0!==i?i:null,triangleCount:null!==(l=null==x?void 0:x.triangleCount)&&void 0!==l?l:0,triangleIndex:x?buildTriangleGridIndex(x.triangles,x.triangleCount):null,attributeName:g,uvFit:x?fitAffineUV(x.triangles,x.triangleCount):null,extent:null!==(u=null==x?void 0:x.extent)&&void 0!==u?u:null}}}var U=.001;var H=(0,m.getLogger)("RealTimeViewer","DeckCutoutCollar"),W=new v.dpR;var B=a(7514);function DeckCutoutCollar_createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function DeckCutoutCollar_unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return DeckCutoutCollar_arrayLikeToArray(t,r);var a={}.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?DeckCutoutCollar_arrayLikeToArray(t,r):void 0}}(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var o=0,i=function F(){};return{s:i,n:function n(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function e(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();return u=t.done,t},e:function e(t){c=!0,l=t},f:function f(){try{u||null==a.return||a.return()}finally{if(c)throw l}}}}function DeckCutoutCollar_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,o=Array(r);a<r;a++)o[a]=t[a];return o}var V=(0,m.getLogger)("RealTimeViewer","DeckCutoutCollar"),q=!1;function DeckCutoutCollar(){var t,r=(0,u.D)((function(t){return t.scene})),a=(0,c.tb)((function(t){return JSON.stringify(t.resolvedEnvironment.scene.deckCutout)})),l=(0,o.useMemo)((function(){return JSON.parse(a)}),[a]),m=(0,c.tb)((function(t){return t.deckCutoutFootprintOverride})),h=(0,c.tb)((function(t){return t.decorVersion})),p=function useCollarTextures(t){var r=t.mapUrl,a=t.normalMapUrl,l=t.roughnessMapUrl,u=(0,o.useState)(null),c=(0,i.Z)(u,2),m=c[0],h=c[1];return(0,o.useEffect)((function(){if(""!==r){var t=!0,o=[],u=function load(r){return""===r?Promise.resolve(null):W.loadAsync(r).then((function(r){return t?(o.push(r),r):(r.dispose(),null)}),(function(){return H.debug("[DeckCutoutCollar] collar texture failed to load: ".concat(r)),null}))};return Promise.all([u(r),u(a),u(l)]).then((function(r){var a=(0,i.Z)(r,3),o=a[0],l=a[1],u=a[2];if(t&&o){o.colorSpace=v.KI_;for(var c=0,m=[o,l,u];c<m.length;c++){var p=m[c];p&&(p.wrapS=v.rpg,p.wrapT=v.rpg,p.needsUpdate=!0)}h({map:o,normalMap:l,roughnessMap:u})}})),function(){t=!1;for(var r=0,a=o;r<a.length;r++)a[r].dispose();h(null)}}h(null)}),[r,a,l]),m}(l.collar.material),y=(0,o.useRef)(null),g=(0,o.useRef)(null),x=(0,o.useRef)(null),b=(0,o.useRef)(-1),M=(0,o.useState)(null),A=(0,i.Z)(M,2),S=A[0],w=A[1],k=(0,o.useMemo)((function(){return l.nodeMatch.split(",").map((function(t){return t.trim()})).filter((function(t){return t.length>0}))}),[l.nodeMatch]);(0,o.useEffect)((function(){g.current=null,x.current=null,w(null)}),[k]);var C=l.collar,Z=l.authoredHole,T=l.enabled,O=T&&null!==m&&m.length>=3;(0,o.useEffect)((function(){if(T&&!q)return c.tb.getState().beginSceneLoad(c.Wz,{timeoutMs:25e3,onTimeout:function onTimeout(){return q=!0}}),function(){return c.tb.getState().endSceneLoad(c.Wz)}}),[T]),(0,o.useEffect)((function(){O&&!q&&c.tb.getState().beginSceneLoad(c.Wz,{timeoutMs:8e3,onTimeout:function onTimeout(){return q=!0}})}),[O]);var X=(0,o.useCallback)((function(){var t=sampleDeckSurface(r,k),a=t.reference,o=t.surface;g.current=a;var i=function deckSurfaceKey(t){return t?"".concat(t.meshName,"|").concat(t.topY.toFixed(4),"|").concat(t.attributeName,"|").concat(t.triangleCount):"none"}(o);if(x.current!==i&&(x.current=i,w(o),o)){(0,I._m)("deck: surface sampled");var l,u=DeckCutoutCollar_createForOfIteratorHelper(function describeDeckSurface(t,r){var a=[],o=t.extent;return o&&a.push("[DeckCutoutCollar] matched deck meshes span X [".concat(o.minX.toFixed(3),", ").concat(o.maxX.toFixed(3),"] Z [").concat(o.minZ.toFixed(3),", ").concat(o.maxZ.toFixed(3),"]")),a.push("[DeckCutoutCollar] UV source: ".concat(r?"own material (declared world-planar tiling)":null===t.uvFit?"no fit possible (per-vertex sampling)":t.uvFit.residualMetres<=z?"one fitted mapping, residual ".concat((1e3*t.uvFit.residualMetres).toFixed(2)," mm"):"per-vertex sampling — fit residual ".concat((1e3*t.uvFit.residualMetres).toFixed(1)," mm exceeds ").concat(5," mm, deck unwrap is not one plane"))),a}(o,null!==p));try{for(u.s();!(l=u.n()).done;){var c=l.value;V.debug(c)}}catch(t){u.e(t)}finally{u.f()}}}),[r,k,p]);(0,o.useEffect)((function(){T&&(b.current=1)}),[T,h,X]),(0,o.useEffect)((function(){O&&null===S&&V.debug("[DeckCutoutCollar] footprint active but NO floor mesh matches '".concat(l.nodeMatch,"'"))}),[O,S,l.nodeMatch]),(0,u.F)((function(){if(T){b.current>=0&&(0===b.current&&X(),b.current-=1);var t=g.current;t&&!t.parent&&X();var r=y.current;t&&r&&(r.matrix.copy(t.matrixWorld),r.matrixWorldNeedsUpdate=!0)}}));var E=(0,o.useMemo)((function(){if(!T||null===S||null===m||m.length<3)return null;var t=function buildCollarGeometry(t){var r=t.footprint,a=t.hole,o=t.collar,i=t.deck,l=t.ownMaterial,u=new v.bnF,c=a.centerX-a.halfExtentX-o.overlap,m=a.centerX+a.halfExtentX+o.overlap,h=a.centerZ-a.halfExtentZ-o.overlap,p=a.centerZ+a.halfExtentZ+o.overlap;u.moveTo(c,h),u.lineTo(m,h),u.lineTo(m,p),u.lineTo(c,p),u.closePath();for(var y=0,g=1/0,x=-1/0,b=1/0,M=-1/0,A=new v.y$t,S=0;S<r.length;S++){var w=Math.min(m-U,Math.max(c+U,r[S][0])),k=Math.min(p-U,Math.max(h+U,r[S][1]));w===r[S][0]&&k===r[S][1]||(y+=1),w<g&&(g=w),w>x&&(x=w),k<b&&(b=k),k>M&&(M=k),0===S?A.moveTo(w,k):A.lineTo(w,k)}A.closePath(),u.holes.push(A);var C=(x-g)*(M-b)/((m-c)*(p-h)),Z="[DeckCutoutCollar] ring built: hole X [".concat(c.toFixed(2),", ").concat(m.toFixed(2),"] Z [").concat(h.toFixed(2),", ").concat(p.toFixed(2),"] | opening X [").concat(g.toFixed(2),", ").concat(x.toFixed(2),"] Z [").concat(b.toFixed(2),", ").concat(M.toFixed(2),"] = ").concat((100*C).toFixed(0),"% of it | ").concat(y,"/").concat(r.length," outline pts clamped").concat(y>0?" — THE ARTICLE IS LARGER THAN ITS HOLE":""),T=o.skirtDepth>0?o.skirtDepth:Math.max(i.slabThickness,.01),O=new v.O7d(u,{depth:T,bevelEnabled:!1});if(O.rotateX(Math.PI/2),O.translate(0,i.topY-o.recess,0),l){for(var X=l.textureScale,E=l.rotationDeg,I=l.offsetX,D=l.offsetZ,L=X>0?X:1,_=E*Math.PI/180,j=Math.cos(_),N=Math.sin(_),P=O.getAttribute("position"),R=new Float32Array(2*P.count),Y=0;Y<P.count;Y++){var H=P.getX(Y)+I,W=P.getZ(Y)+D;R[2*Y]=(H*j-W*N)/L,R[2*Y+1]=(H*N+W*j)/L}O.setAttribute("uv",new v.TlE(R,2)),O.setAttribute("uv1",new v.TlE(R,2))}else if(i.triangles){for(var B=i.uvFit&&i.uvFit.residualMetres<=z?i.uvFit:null,V=O.getAttribute("position"),q=new Float32Array(2*V.count),G=0;G<V.count;G++){var $=V.getX(G),K=V.getZ(G);if(B)q[2*G]=B.ux*$+B.uz*K+B.u0,q[2*G+1]=B.vx*$+B.vz*K+B.v0;else{var J=sampleNearestTriangleUV(i.triangles,i.triangleCount,$,K,i.triangleIndex);J&&(q[2*G]=J[0],q[2*G+1]=J[1])}}O.setAttribute("uv",new v.TlE(q,2)),O.setAttribute("uv1",new v.TlE(q,2))}return{geometry:O,diagnostic:Z}}({footprint:m,hole:Z,collar:C,deck:S,ownMaterial:p?C.material:null});return V.debug(t.diagnostic),t.geometry}),[T,m,Z.centerX,Z.centerZ,Z.halfExtentX,Z.halfExtentZ,C,S,p]);(0,o.useEffect)((function(){E&&!q&&(q=!0,(0,I._m)("deck: first collar geometry"),c.tb.getState().endSceneLoad(c.Wz))}),[E]),(0,o.useEffect)((function(){return function(){return null==E?void 0:E.dispose()}}),[E]);var D=null!==(t=null==S?void 0:S.material)&&void 0!==t?t:null;return(0,o.useEffect)((function(){return function(){return null==D?void 0:D.dispose()}}),[D]),E?p?(0,B.jsx)("mesh",{ref:y,geometry:E,matrixAutoUpdate:!1,receiveShadow:!0,castShadow:!0,children:(0,B.jsx)("meshStandardMaterial",{map:p.map,normalMap:p.normalMap,roughnessMap:p.roughnessMap,color:C.color,roughness:C.roughness,metalness:0})}):D?(0,B.jsx)("mesh",{ref:y,geometry:E,material:D,matrixAutoUpdate:!1,receiveShadow:!0,castShadow:!0}):(0,B.jsx)("mesh",{ref:y,geometry:E,matrixAutoUpdate:!1,receiveShadow:!0,castShadow:!0,children:(0,B.jsx)("meshStandardMaterial",{color:C.color,roughness:C.roughness,metalness:0})}):null}function DeckCutoutSubsystem(){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(DeckCutoutArticleSync,{}),(0,B.jsx)(DeckCutoutCollar,{})]})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! filename:964 */
|