@3driseai/3drise-viewer 0.1.42 → 0.1.43
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/dist/animationsV2/ClipsRuntime.d.ts +16 -1
- package/dist/animationsV2/ClipsRuntime.d.ts.map +1 -1
- package/dist/animationsV2/ClipsRuntime.js +144 -25
- package/dist/animationsV2/appliers.d.ts +9 -0
- package/dist/animationsV2/appliers.d.ts.map +1 -1
- package/dist/animationsV2/appliers.js +62 -2
- package/dist/animationsV2/clipUtils.d.ts +30 -0
- package/dist/animationsV2/clipUtils.d.ts.map +1 -1
- package/dist/animationsV2/clipUtils.js +163 -17
- package/dist/animationsV2/elementSettings.d.ts +5 -0
- package/dist/animationsV2/elementSettings.d.ts.map +1 -1
- package/dist/animationsV2/elementSettings.js +6 -3
- package/dist/animationsV2/sequenceUtils.js +4 -4
- package/dist/animationsV2/types.d.ts +23 -0
- package/dist/animationsV2/types.d.ts.map +1 -1
- package/dist/api/sceneHandle.js +2 -2
- package/dist/components/CreatedObject.d.ts +3 -0
- package/dist/components/CreatedObject.d.ts.map +1 -1
- package/dist/components/CreatedObject.js +6 -2
- package/dist/components/CustomPrimitive.d.ts.map +1 -1
- package/dist/components/CustomPrimitive.js +1 -10
- package/dist/components/EnvironmentManager.d.ts.map +1 -1
- package/dist/components/EnvironmentManager.js +11 -5
- package/dist/components/GeometryShape.d.ts +5 -2
- package/dist/components/GeometryShape.d.ts.map +1 -1
- package/dist/components/GeometryShape.js +71 -10
- package/dist/components/LandObject.d.ts.map +1 -1
- package/dist/components/LandObject.js +1 -1
- package/dist/components/LayoutInstances.d.ts +2 -1
- package/dist/components/LayoutInstances.d.ts.map +1 -1
- package/dist/components/LayoutInstances.js +39 -6
- package/dist/components/LightObject.d.ts.map +1 -1
- package/dist/components/LightObject.js +3 -0
- package/dist/components/ObjectNode.d.ts.map +1 -1
- package/dist/components/ObjectNode.js +62 -13
- package/dist/components/OceanBuilder.d.ts +2 -0
- package/dist/components/OceanBuilder.d.ts.map +1 -1
- package/dist/components/OceanBuilder.js +2 -1
- package/dist/components/RenderEffects.d.ts +8 -0
- package/dist/components/RenderEffects.d.ts.map +1 -0
- package/dist/components/RenderEffects.js +120 -0
- package/dist/components/SceneBuilder.d.ts.map +1 -1
- package/dist/components/SceneBuilder.js +18 -9
- package/dist/components/SportsObject.d.ts +9 -0
- package/dist/components/SportsObject.d.ts.map +1 -0
- package/dist/components/SportsObject.js +20 -0
- package/dist/components/UrbanObject.d.ts +9 -0
- package/dist/components/UrbanObject.d.ts.map +1 -0
- package/dist/components/UrbanObject.js +28 -0
- package/dist/components/VegetationObject.d.ts +9 -0
- package/dist/components/VegetationObject.d.ts.map +1 -0
- package/dist/components/VegetationObject.js +26 -0
- package/dist/components/WaterObject.d.ts +15 -0
- package/dist/components/WaterObject.d.ts.map +1 -0
- package/dist/components/WaterObject.js +29 -0
- package/dist/components/index.d.ts +7 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +6 -1
- package/dist/components/land/LandPatch.d.ts +3 -1
- package/dist/components/land/LandPatch.d.ts.map +1 -1
- package/dist/components/land/LandPatch.js +80 -7
- package/dist/components/layout/InstancedLayout.d.ts +19 -0
- package/dist/components/layout/InstancedLayout.d.ts.map +1 -0
- package/dist/components/layout/InstancedLayout.js +154 -0
- package/dist/components/layout/LayoutGrounds.d.ts +19 -0
- package/dist/components/layout/LayoutGrounds.d.ts.map +1 -0
- package/dist/components/layout/LayoutGrounds.js +104 -0
- package/dist/components/layout/LinkProxies.d.ts +5 -0
- package/dist/components/layout/LinkProxies.d.ts.map +1 -0
- package/dist/components/layout/LinkProxies.js +51 -0
- package/dist/components/layout/LinkedSource.d.ts +14 -0
- package/dist/components/layout/LinkedSource.d.ts.map +1 -0
- package/dist/components/layout/LinkedSource.js +129 -0
- package/dist/components/projector/Projector.d.ts +14 -0
- package/dist/components/projector/Projector.d.ts.map +1 -0
- package/dist/components/projector/Projector.js +44 -0
- package/dist/components/projector/index.d.ts +4 -0
- package/dist/components/projector/index.d.ts.map +1 -0
- package/dist/components/projector/index.js +2 -0
- package/dist/components/projector/projectorCore.d.ts +19 -0
- package/dist/components/projector/projectorCore.d.ts.map +1 -0
- package/dist/components/projector/projectorCore.js +545 -0
- package/dist/components/sports/SportsBall.d.ts +9 -0
- package/dist/components/sports/SportsBall.d.ts.map +1 -0
- package/dist/components/sports/SportsBall.js +23 -0
- package/dist/components/sports/SportsCourt.d.ts +9 -0
- package/dist/components/sports/SportsCourt.d.ts.map +1 -0
- package/dist/components/sports/SportsCourt.js +23 -0
- package/dist/components/sports/SportsEquipment.d.ts +9 -0
- package/dist/components/sports/SportsEquipment.d.ts.map +1 -0
- package/dist/components/sports/SportsEquipment.js +23 -0
- package/dist/components/sports/SportsGoal.d.ts +9 -0
- package/dist/components/sports/SportsGoal.d.ts.map +1 -0
- package/dist/components/sports/SportsGoal.js +23 -0
- package/dist/components/sports/core/ball.d.ts +166 -0
- package/dist/components/sports/core/ball.d.ts.map +1 -0
- package/dist/components/sports/core/ball.js +402 -0
- package/dist/components/sports/core/court.d.ts +442 -0
- package/dist/components/sports/core/court.d.ts.map +1 -0
- package/dist/components/sports/core/court.js +658 -0
- package/dist/components/sports/core/equipment.d.ts +103 -0
- package/dist/components/sports/core/equipment.d.ts.map +1 -0
- package/dist/components/sports/core/equipment.js +403 -0
- package/dist/components/sports/core/goal.d.ts +98 -0
- package/dist/components/sports/core/goal.d.ts.map +1 -0
- package/dist/components/sports/core/goal.js +44 -0
- package/dist/components/sports/index.d.ts +11 -0
- package/dist/components/sports/index.d.ts.map +1 -0
- package/dist/components/sports/index.js +8 -0
- package/dist/components/sports/sportsCore.d.ts +195 -0
- package/dist/components/sports/sportsCore.d.ts.map +1 -0
- package/dist/components/sports/sportsCore.js +758 -0
- package/dist/components/sports/useSportsInstance.d.ts +35 -0
- package/dist/components/sports/useSportsInstance.d.ts.map +1 -0
- package/dist/components/sports/useSportsInstance.js +47 -0
- package/dist/components/terrain/TerrainSurface.d.ts.map +1 -1
- package/dist/components/terrain/TerrainSurface.js +14 -0
- package/dist/components/urban/UrbanBlock.d.ts +9 -0
- package/dist/components/urban/UrbanBlock.d.ts.map +1 -0
- package/dist/components/urban/UrbanBlock.js +23 -0
- package/dist/components/urban/UrbanBuilding.d.ts +9 -0
- package/dist/components/urban/UrbanBuilding.d.ts.map +1 -0
- package/dist/components/urban/UrbanBuilding.js +23 -0
- package/dist/components/urban/UrbanJunction.d.ts +9 -0
- package/dist/components/urban/UrbanJunction.d.ts.map +1 -0
- package/dist/components/urban/UrbanJunction.js +23 -0
- package/dist/components/urban/UrbanPark.d.ts +9 -0
- package/dist/components/urban/UrbanPark.d.ts.map +1 -0
- package/dist/components/urban/UrbanPark.js +23 -0
- package/dist/components/urban/UrbanParkingLot.d.ts +9 -0
- package/dist/components/urban/UrbanParkingLot.d.ts.map +1 -0
- package/dist/components/urban/UrbanParkingLot.js +23 -0
- package/dist/components/urban/UrbanPlaza.d.ts +9 -0
- package/dist/components/urban/UrbanPlaza.d.ts.map +1 -0
- package/dist/components/urban/UrbanPlaza.js +23 -0
- package/dist/components/urban/UrbanRoad.d.ts +9 -0
- package/dist/components/urban/UrbanRoad.d.ts.map +1 -0
- package/dist/components/urban/UrbanRoad.js +23 -0
- package/dist/components/urban/UrbanSignage.d.ts +9 -0
- package/dist/components/urban/UrbanSignage.d.ts.map +1 -0
- package/dist/components/urban/UrbanSignage.js +23 -0
- package/dist/components/urban/UrbanSkyline.d.ts +9 -0
- package/dist/components/urban/UrbanSkyline.d.ts.map +1 -0
- package/dist/components/urban/UrbanSkyline.js +23 -0
- package/dist/components/urban/UrbanStreetFurniture.d.ts +9 -0
- package/dist/components/urban/UrbanStreetFurniture.d.ts.map +1 -0
- package/dist/components/urban/UrbanStreetFurniture.js +23 -0
- package/dist/components/urban/UrbanStreetGrid.d.ts +9 -0
- package/dist/components/urban/UrbanStreetGrid.d.ts.map +1 -0
- package/dist/components/urban/UrbanStreetGrid.js +34 -0
- package/dist/components/urban/UrbanTraffic.d.ts +9 -0
- package/dist/components/urban/UrbanTraffic.d.ts.map +1 -0
- package/dist/components/urban/UrbanTraffic.js +23 -0
- package/dist/components/urban/core/block.d.ts +119 -0
- package/dist/components/urban/core/block.d.ts.map +1 -0
- package/dist/components/urban/core/block.js +266 -0
- package/dist/components/urban/core/building.d.ts +128 -0
- package/dist/components/urban/core/building.d.ts.map +1 -0
- package/dist/components/urban/core/building.js +741 -0
- package/dist/components/urban/core/junction.d.ts +152 -0
- package/dist/components/urban/core/junction.d.ts.map +1 -0
- package/dist/components/urban/core/junction.js +617 -0
- package/dist/components/urban/core/park.d.ts +67 -0
- package/dist/components/urban/core/park.d.ts.map +1 -0
- package/dist/components/urban/core/park.js +176 -0
- package/dist/components/urban/core/parkingLot.d.ts +82 -0
- package/dist/components/urban/core/parkingLot.d.ts.map +1 -0
- package/dist/components/urban/core/parkingLot.js +284 -0
- package/dist/components/urban/core/plaza.d.ts +24 -0
- package/dist/components/urban/core/plaza.d.ts.map +1 -0
- package/dist/components/urban/core/plaza.js +243 -0
- package/dist/components/urban/core/road.d.ts +113 -0
- package/dist/components/urban/core/road.d.ts.map +1 -0
- package/dist/components/urban/core/road.js +347 -0
- package/dist/components/urban/core/signage.d.ts +83 -0
- package/dist/components/urban/core/signage.d.ts.map +1 -0
- package/dist/components/urban/core/signage.js +209 -0
- package/dist/components/urban/core/skyline.d.ts +100 -0
- package/dist/components/urban/core/skyline.d.ts.map +1 -0
- package/dist/components/urban/core/skyline.js +89 -0
- package/dist/components/urban/core/streetFurniture.d.ts +75 -0
- package/dist/components/urban/core/streetFurniture.d.ts.map +1 -0
- package/dist/components/urban/core/streetFurniture.js +193 -0
- package/dist/components/urban/core/streetGrid.d.ts +134 -0
- package/dist/components/urban/core/streetGrid.d.ts.map +1 -0
- package/dist/components/urban/core/streetGrid.js +422 -0
- package/dist/components/urban/core/traffic.d.ts +125 -0
- package/dist/components/urban/core/traffic.d.ts.map +1 -0
- package/dist/components/urban/core/traffic.js +305 -0
- package/dist/components/urban/index.d.ts +29 -0
- package/dist/components/urban/index.d.ts.map +1 -0
- package/dist/components/urban/index.js +16 -0
- package/dist/components/urban/textureSetResolver.d.ts +8 -0
- package/dist/components/urban/textureSetResolver.d.ts.map +1 -0
- package/dist/components/urban/textureSetResolver.js +16 -0
- package/dist/components/urban/urbanCore.d.ts +262 -0
- package/dist/components/urban/urbanCore.d.ts.map +1 -0
- package/dist/components/urban/urbanCore.js +928 -0
- package/dist/components/urban/useUrbanInstance.d.ts +53 -0
- package/dist/components/urban/useUrbanInstance.d.ts.map +1 -0
- package/dist/components/urban/useUrbanInstance.js +100 -0
- package/dist/components/vegetation/VegetationBush.d.ts +9 -0
- package/dist/components/vegetation/VegetationBush.d.ts.map +1 -0
- package/dist/components/vegetation/VegetationBush.js +23 -0
- package/dist/components/vegetation/VegetationCrops.d.ts +9 -0
- package/dist/components/vegetation/VegetationCrops.d.ts.map +1 -0
- package/dist/components/vegetation/VegetationCrops.js +23 -0
- package/dist/components/vegetation/VegetationFlowers.d.ts +9 -0
- package/dist/components/vegetation/VegetationFlowers.d.ts.map +1 -0
- package/dist/components/vegetation/VegetationFlowers.js +23 -0
- package/dist/components/vegetation/VegetationForest.d.ts +9 -0
- package/dist/components/vegetation/VegetationForest.d.ts.map +1 -0
- package/dist/components/vegetation/VegetationForest.js +23 -0
- package/dist/components/vegetation/VegetationFruit.d.ts +9 -0
- package/dist/components/vegetation/VegetationFruit.d.ts.map +1 -0
- package/dist/components/vegetation/VegetationFruit.js +23 -0
- package/dist/components/vegetation/VegetationGrass.d.ts +9 -0
- package/dist/components/vegetation/VegetationGrass.d.ts.map +1 -0
- package/dist/components/vegetation/VegetationGrass.js +23 -0
- package/dist/components/vegetation/VegetationHedge.d.ts +9 -0
- package/dist/components/vegetation/VegetationHedge.d.ts.map +1 -0
- package/dist/components/vegetation/VegetationHedge.js +23 -0
- package/dist/components/vegetation/VegetationIvy.d.ts +9 -0
- package/dist/components/vegetation/VegetationIvy.d.ts.map +1 -0
- package/dist/components/vegetation/VegetationIvy.js +23 -0
- package/dist/components/vegetation/VegetationTree.d.ts +9 -0
- package/dist/components/vegetation/VegetationTree.d.ts.map +1 -0
- package/dist/components/vegetation/VegetationTree.js +23 -0
- package/dist/components/vegetation/VegetationVegetable.d.ts +9 -0
- package/dist/components/vegetation/VegetationVegetable.d.ts.map +1 -0
- package/dist/components/vegetation/VegetationVegetable.js +23 -0
- package/dist/components/vegetation/core/bush.d.ts +1256 -0
- package/dist/components/vegetation/core/bush.d.ts.map +1 -0
- package/dist/components/vegetation/core/bush.js +376 -0
- package/dist/components/vegetation/core/crops.d.ts +1033 -0
- package/dist/components/vegetation/core/crops.d.ts.map +1 -0
- package/dist/components/vegetation/core/crops.js +378 -0
- package/dist/components/vegetation/core/flowers.d.ts +648 -0
- package/dist/components/vegetation/core/flowers.d.ts.map +1 -0
- package/dist/components/vegetation/core/flowers.js +225 -0
- package/dist/components/vegetation/core/forest.d.ts +138 -0
- package/dist/components/vegetation/core/forest.d.ts.map +1 -0
- package/dist/components/vegetation/core/forest.js +310 -0
- package/dist/components/vegetation/core/fruit.d.ts +99 -0
- package/dist/components/vegetation/core/fruit.d.ts.map +1 -0
- package/dist/components/vegetation/core/fruit.js +77 -0
- package/dist/components/vegetation/core/grass.d.ts +103 -0
- package/dist/components/vegetation/core/grass.d.ts.map +1 -0
- package/dist/components/vegetation/core/grass.js +102 -0
- package/dist/components/vegetation/core/hedge.d.ts +193 -0
- package/dist/components/vegetation/core/hedge.d.ts.map +1 -0
- package/dist/components/vegetation/core/hedge.js +243 -0
- package/dist/components/vegetation/core/ivy.d.ts +213 -0
- package/dist/components/vegetation/core/ivy.d.ts.map +1 -0
- package/dist/components/vegetation/core/ivy.js +173 -0
- package/dist/components/vegetation/core/tree.d.ts +1117 -0
- package/dist/components/vegetation/core/tree.d.ts.map +1 -0
- package/dist/components/vegetation/core/tree.js +408 -0
- package/dist/components/vegetation/core/vegetable.d.ts +99 -0
- package/dist/components/vegetation/core/vegetable.d.ts.map +1 -0
- package/dist/components/vegetation/core/vegetable.js +76 -0
- package/dist/components/vegetation/index.d.ts +23 -0
- package/dist/components/vegetation/index.d.ts.map +1 -0
- package/dist/components/vegetation/index.js +14 -0
- package/dist/components/vegetation/produceCore.d.ts +929 -0
- package/dist/components/vegetation/produceCore.d.ts.map +1 -0
- package/dist/components/vegetation/produceCore.js +723 -0
- package/dist/components/vegetation/useVegetationInstance.d.ts +39 -0
- package/dist/components/vegetation/useVegetationInstance.d.ts.map +1 -0
- package/dist/components/vegetation/useVegetationInstance.js +45 -0
- package/dist/components/vegetation/vegetationCore.d.ts +412 -0
- package/dist/components/vegetation/vegetationCore.d.ts.map +1 -0
- package/dist/components/vegetation/vegetationCore.js +1728 -0
- package/dist/components/volumetricClouds/VolumetricCloudsPass.d.ts +5 -0
- package/dist/components/volumetricClouds/VolumetricCloudsPass.d.ts.map +1 -1
- package/dist/components/volumetricClouds/VolumetricCloudsPass.js +39 -13
- package/dist/components/water/OceanSurface.d.ts.map +1 -1
- package/dist/components/water/OceanSurface.js +3 -2
- package/dist/components/water/WaterBody.d.ts.map +1 -1
- package/dist/components/water/WaterBody.js +31 -10
- package/dist/components/water/WaterFountain.d.ts +9 -0
- package/dist/components/water/WaterFountain.d.ts.map +1 -0
- package/dist/components/water/WaterFountain.js +24 -0
- package/dist/components/water/WaterStream.d.ts +9 -0
- package/dist/components/water/WaterStream.d.ts.map +1 -0
- package/dist/components/water/WaterStream.js +24 -0
- package/dist/components/water/WaterWaterfall.d.ts +9 -0
- package/dist/components/water/WaterWaterfall.d.ts.map +1 -0
- package/dist/components/water/WaterWaterfall.js +24 -0
- package/dist/components/water/core/fountain.d.ts +70 -0
- package/dist/components/water/core/fountain.d.ts.map +1 -0
- package/dist/components/water/core/fountain.js +619 -0
- package/dist/components/water/core/stream.d.ts +72 -0
- package/dist/components/water/core/stream.d.ts.map +1 -0
- package/dist/components/water/core/stream.js +167 -0
- package/dist/components/water/core/waterfall.d.ts +78 -0
- package/dist/components/water/core/waterfall.d.ts.map +1 -0
- package/dist/components/water/core/waterfall.js +325 -0
- package/dist/components/water/index.d.ts +8 -0
- package/dist/components/water/index.d.ts.map +1 -1
- package/dist/components/water/index.js +7 -0
- package/dist/components/water/types.d.ts +3 -0
- package/dist/components/water/types.d.ts.map +1 -1
- package/dist/components/water/useWaterInstance.d.ts +43 -0
- package/dist/components/water/useWaterInstance.d.ts.map +1 -0
- package/dist/components/water/useWaterInstance.js +89 -0
- package/dist/components/water/waterCore.d.ts +179 -0
- package/dist/components/water/waterCore.d.ts.map +1 -0
- package/dist/components/water/waterCore.js +516 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +9 -1
- package/dist/hooks/index.d.ts +7 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +5 -2
- package/dist/hooks/useActionPatch.d.ts +23 -0
- package/dist/hooks/useActionPatch.d.ts.map +1 -0
- package/dist/hooks/useActionPatch.js +38 -0
- package/dist/hooks/useCloudSun.d.ts.map +1 -1
- package/dist/hooks/useCloudSun.js +3 -2
- package/dist/hooks/useCommittedInstance.d.ts +6 -0
- package/dist/hooks/useCommittedInstance.d.ts.map +1 -0
- package/dist/hooks/useCommittedInstance.js +42 -0
- package/dist/hooks/useConfigLive.d.ts +1 -1
- package/dist/hooks/useConfigLive.d.ts.map +1 -1
- package/dist/hooks/useContinuousEffects.d.ts.map +1 -1
- package/dist/hooks/useContinuousEffects.js +36 -20
- package/dist/hooks/useGridLayout.d.ts +7 -0
- package/dist/hooks/useGridLayout.d.ts.map +1 -0
- package/dist/hooks/useGridLayout.js +10 -0
- package/dist/hooks/useInteractionEffects.d.ts.map +1 -1
- package/dist/hooks/useInteractionEffects.js +48 -9
- package/dist/hooks/useLightLive.d.ts.map +1 -1
- package/dist/hooks/useLightLive.js +2 -0
- package/dist/hooks/useLinkStatus.d.ts +7 -0
- package/dist/hooks/useLinkStatus.d.ts.map +1 -0
- package/dist/hooks/useLinkStatus.js +20 -0
- package/dist/hooks/useMaterialApplication.d.ts +6 -1
- package/dist/hooks/useMaterialApplication.d.ts.map +1 -1
- package/dist/hooks/useMaterialApplication.js +7 -2
- package/dist/hooks/useOceanMaterial.d.ts +11 -1
- package/dist/hooks/useOceanMaterial.d.ts.map +1 -1
- package/dist/hooks/useOceanMaterial.js +185 -27
- package/dist/hooks/usePathAnimation.d.ts +8 -0
- package/dist/hooks/usePathAnimation.d.ts.map +1 -1
- package/dist/hooks/usePathAnimation.js +140 -59
- package/dist/hooks/useResolvedLayout.d.ts +10 -0
- package/dist/hooks/useResolvedLayout.d.ts.map +1 -0
- package/dist/hooks/useResolvedLayout.js +17 -0
- package/dist/hooks/useTimeLighting.d.ts +36 -0
- package/dist/hooks/useTimeLighting.d.ts.map +1 -0
- package/dist/hooks/useTimeLighting.js +67 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/operations/catalogue/shaderLayers.d.ts.map +1 -1
- package/dist/operations/catalogue/shaderLayers.js +26 -3
- package/dist/render/renderLive.d.ts +11 -0
- package/dist/render/renderLive.d.ts.map +1 -0
- package/dist/render/renderLive.js +57 -0
- package/dist/shaders/glsl/oceanCore.glsl.d.ts +2 -2
- package/dist/shaders/glsl/oceanCore.glsl.d.ts.map +1 -1
- package/dist/shaders/glsl/oceanCore.glsl.js +35 -5
- package/dist/shaders/ocean/OceanSurfaceMaterial.d.ts +12 -0
- package/dist/shaders/ocean/OceanSurfaceMaterial.d.ts.map +1 -1
- package/dist/shaders/ocean/OceanSurfaceMaterial.js +55 -7
- package/dist/shaders/terrain/TerrainMaterial.d.ts.map +1 -1
- package/dist/shaders/terrain/TerrainMaterial.js +28 -0
- package/dist/triggers/kinds/change.js +1 -1
- package/dist/utils/composerHostedPass.d.ts +74 -0
- package/dist/utils/composerHostedPass.d.ts.map +1 -0
- package/dist/utils/composerHostedPass.js +63 -0
- package/dist/utils/geometryScript.d.ts +17 -0
- package/dist/utils/geometryScript.d.ts.map +1 -0
- package/dist/utils/geometryScript.js +92 -0
- package/dist/utils/geometryScript.worker.d.ts +2 -0
- package/dist/utils/geometryScript.worker.d.ts.map +1 -0
- package/dist/utils/geometryScript.worker.js +42 -0
- package/dist/utils/groundRegistry.d.ts +11 -0
- package/dist/utils/groundRegistry.d.ts.map +1 -0
- package/dist/utils/groundRegistry.js +39 -0
- package/dist/utils/instancingSupport.d.ts +9 -0
- package/dist/utils/instancingSupport.d.ts.map +1 -0
- package/dist/utils/instancingSupport.js +13 -0
- package/dist/utils/landPatch.d.ts +26 -5
- package/dist/utils/landPatch.d.ts.map +1 -1
- package/dist/utils/landPatch.js +124 -9
- package/dist/utils/layoutPlacement.d.ts +30 -0
- package/dist/utils/layoutPlacement.d.ts.map +1 -0
- package/dist/utils/layoutPlacement.js +113 -0
- package/dist/utils/linkRegistry.d.ts +15 -0
- package/dist/utils/linkRegistry.d.ts.map +1 -0
- package/dist/utils/linkRegistry.js +11 -0
- package/dist/utils/shapes.d.ts +28 -2
- package/dist/utils/shapes.d.ts.map +1 -1
- package/dist/utils/shapes.js +32 -3
- package/dist/utils/sharedParts.d.ts +61 -0
- package/dist/utils/sharedParts.d.ts.map +1 -0
- package/dist/utils/sharedParts.js +268 -0
- package/dist/utils/svgAsset.d.ts +6 -0
- package/dist/utils/svgAsset.d.ts.map +1 -0
- package/dist/utils/svgAsset.js +46 -0
- package/dist/utils/waterLight.d.ts +29 -0
- package/dist/utils/waterLight.d.ts.map +1 -0
- package/dist/utils/waterLight.js +67 -0
- package/dist/utils/waterReflection.d.ts +185 -0
- package/dist/utils/waterReflection.d.ts.map +1 -0
- package/dist/utils/waterReflection.js +616 -0
- package/package.json +4 -3
|
@@ -0,0 +1,516 @@
|
|
|
1
|
+
// Emitted from Claude outputs/water-lab/common.mjs by gen_family.mjs — edit the lab module and re-emit.
|
|
2
|
+
// water-lab common: the lab's sun model hooks, noise GLSL, the basin water surface
|
|
3
|
+
// (a small Gerstner body lit like the app's ocean: Fresnel sky, sun glitter, body
|
|
4
|
+
// colour) with two analytic disturbance channels every construction writes into —
|
|
5
|
+
// expanding RINGS (rain drops, fountain impacts) and CHURN zones (the foot of a
|
|
6
|
+
// waterfall, the mouth of a stream) — plus instanced quad helpers for spray/mist.
|
|
7
|
+
// Lab only: the app's basin is WaterBody / OceanSurfaceMaterial; what ships from
|
|
8
|
+
// here is each construction's own geometry + GLSL, which is byte-identical.
|
|
9
|
+
import * as THREE from 'three';
|
|
10
|
+
export const MAX_RINGS = 24;
|
|
11
|
+
export const MAX_CHURN = 24;
|
|
12
|
+
export function mulberry32(a) {
|
|
13
|
+
return function () {
|
|
14
|
+
a |= 0;
|
|
15
|
+
a = (a + 0x6D2B79F5) | 0;
|
|
16
|
+
let t = Math.imul(a ^ (a >>> 15), 1 | a);
|
|
17
|
+
t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;
|
|
18
|
+
return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export const clamp01 = (x) => Math.min(1, Math.max(0, x));
|
|
22
|
+
// ---------------------------------------------------------------------------- sun
|
|
23
|
+
export function createSunUniforms() {
|
|
24
|
+
return {
|
|
25
|
+
uSunDir: { value: new THREE.Vector3(0.3, 0.8, 0.5).normalize() },
|
|
26
|
+
uSunColor: { value: new THREE.Color(1, 0.95, 0.85) },
|
|
27
|
+
uSkyAmbient: { value: new THREE.Color(0.36, 0.44, 0.6) },
|
|
28
|
+
uGroundAmbient: { value: new THREE.Color(0.2, 0.2, 0.2) },
|
|
29
|
+
uSkyTop: { value: new THREE.Color(0.3, 0.5, 0.9) },
|
|
30
|
+
uSkyHorizon: { value: new THREE.Color(0.7, 0.8, 0.9) },
|
|
31
|
+
uNight: { value: 0 },
|
|
32
|
+
uTime: { value: 0 },
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export function applySun(u, sun) {
|
|
36
|
+
u.uSunDir.value.copy(sun.direction);
|
|
37
|
+
u.uSunColor.value.copy(sun.color);
|
|
38
|
+
u.uSkyAmbient.value.copy(sun.skyAmbient);
|
|
39
|
+
u.uGroundAmbient.value.copy(sun.groundAmbient);
|
|
40
|
+
u.uSkyTop.value.copy(sun.skyTop);
|
|
41
|
+
u.uSkyHorizon.value.copy(sun.skyHorizon);
|
|
42
|
+
u.uNight.value = sun.night;
|
|
43
|
+
}
|
|
44
|
+
// ---------------------------------------------------------------------------- GLSL
|
|
45
|
+
export const GLSL_COMMON = /* glsl */ `
|
|
46
|
+
uniform vec3 uSunDir;
|
|
47
|
+
uniform vec3 uSunColor;
|
|
48
|
+
uniform vec3 uSkyAmbient;
|
|
49
|
+
uniform vec3 uGroundAmbient;
|
|
50
|
+
uniform vec3 uSkyTop;
|
|
51
|
+
uniform vec3 uSkyHorizon;
|
|
52
|
+
uniform float uNight;
|
|
53
|
+
uniform float uTime;
|
|
54
|
+
|
|
55
|
+
float hash11(float p) { p = fract(p * 0.1031); p *= p + 33.33; p *= p + p; return fract(p); }
|
|
56
|
+
float hash21(vec2 p) { vec3 p3 = fract(vec3(p.xyx) * 0.1031); p3 += dot(p3, p3.yzx + 33.33); return fract((p3.x + p3.y) * p3.z); }
|
|
57
|
+
vec2 hash22(vec2 p) { vec3 p3 = fract(vec3(p.xyx) * vec3(0.1031, 0.1030, 0.0973)); p3 += dot(p3, p3.yzx + 33.33); return fract((p3.xx + p3.yz) * p3.zy); }
|
|
58
|
+
float vnoise21(vec2 p) { vec2 i = floor(p), f = fract(p); f = f * f * (3.0 - 2.0 * f); return mix(mix(hash21(i), hash21(i + vec2(1.0, 0.0)), f.x), mix(hash21(i + vec2(0.0, 1.0)), hash21(i + vec2(1.0, 1.0)), f.x), f.y); }
|
|
59
|
+
float fbm21(vec2 p) { float a = 0.5, s = 0.0; for (int i = 0; i < 4; i++) { s += a * vnoise21(p); p = p * 2.03 + 17.1; a *= 0.5; } return s; }
|
|
60
|
+
// Gradient-ish noise with derivative, for normals: central differences on vnoise are fine at this scale.
|
|
61
|
+
vec3 noised21(vec2 p, float e) { float c = vnoise21(p); return vec3(c, vnoise21(p + vec2(e, 0.0)) - c, vnoise21(p + vec2(0.0, e)) - c); }
|
|
62
|
+
float hash31(vec3 p) { p = fract(p * 0.1031); p += dot(p, p.zyx + 31.32); return fract((p.x + p.y) * p.z); }
|
|
63
|
+
float vnoise31(vec3 p) {
|
|
64
|
+
vec3 i = floor(p), f = fract(p); f = f * f * (3.0 - 2.0 * f);
|
|
65
|
+
float a = mix(mix(hash31(i), hash31(i + vec3(1,0,0)), f.x), mix(hash31(i + vec3(0,1,0)), hash31(i + vec3(1,1,0)), f.x), f.y);
|
|
66
|
+
float b = mix(mix(hash31(i + vec3(0,0,1)), hash31(i + vec3(1,0,1)), f.x), mix(hash31(i + vec3(0,1,1)), hash31(i + vec3(1,1,1)), f.x), f.y);
|
|
67
|
+
return mix(a, b, f.z);
|
|
68
|
+
}
|
|
69
|
+
float fbm31(vec3 p) { float a = 0.5, s = 0.0; for (int i = 0; i < 4; i++) { s += a * vnoise31(p); p = p * 2.07 + 11.3; a *= 0.5; } return s; }
|
|
70
|
+
/** Worley-ish cell distance in 2D (pebbles). Returns (F1, cell id hash). */
|
|
71
|
+
vec2 cells21(vec2 p) {
|
|
72
|
+
vec2 i = floor(p), f = fract(p); float d = 8.0; float id = 0.0;
|
|
73
|
+
for (int y = -1; y <= 1; y++) for (int x = -1; x <= 1; x++) {
|
|
74
|
+
vec2 g = vec2(float(x), float(y)); vec2 o = hash22(i + g); vec2 r = g + o - f; float dd = dot(r, r);
|
|
75
|
+
if (dd < d) { d = dd; id = hash21(i + g); }
|
|
76
|
+
}
|
|
77
|
+
return vec2(sqrt(d), id);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** The lab sky by direction: a gradient between the horizon and zenith colours set by the hour. */
|
|
81
|
+
vec3 skyColor(vec3 d) { float t = clamp(d.y, 0.0, 1.0); return mix(uSkyHorizon, uSkyTop, pow(t, 0.55)); }
|
|
82
|
+
|
|
83
|
+
float fresnelWater(vec3 N, vec3 V) { return 0.02 + 0.98 * pow(1.0 - clamp(dot(N, V), 0.0, 1.0), 5.0); }
|
|
84
|
+
|
|
85
|
+
/** GGX lobe for the sun glitter on a water normal. */
|
|
86
|
+
float ggx(vec3 N, vec3 L, vec3 V, float rough) {
|
|
87
|
+
vec3 H = normalize(L + V); float a = max(rough * rough, 2e-4); float ndh = max(dot(N, H), 0.0);
|
|
88
|
+
float d = ndh * ndh * (a * a - 1.0) + 1.0; return (a * a) / (3.14159 * d * d);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** Water shading shared by every surface in the lab: body colour under sky fill + sun,
|
|
92
|
+
* reflected sky through Fresnel, a glitter path. foam (0..1) switches to a rough white. */
|
|
93
|
+
vec3 shadeWater(vec3 P, vec3 N, vec3 camPos, vec3 body, vec3 foamColor, float foam, float rough, float specular) {
|
|
94
|
+
vec3 V = normalize(camPos - P);
|
|
95
|
+
vec3 L = normalize(uSunDir);
|
|
96
|
+
float NdotL = max(dot(N, L), 0.0);
|
|
97
|
+
vec3 sun = uSunColor;
|
|
98
|
+
vec3 R = reflect(-V, N); R.y = max(R.y, 0.02);
|
|
99
|
+
vec3 sky = skyColor(R);
|
|
100
|
+
float f = fresnelWater(N, V);
|
|
101
|
+
vec3 bodyLit = body * (uSkyAmbient * 0.5 + sun * (0.2 + 0.5 * NdotL));
|
|
102
|
+
vec3 col = mix(bodyLit, sky, f) + sun * ggx(N, L, V, rough) * specular * f;
|
|
103
|
+
vec3 foamLit = foamColor * (uSkyAmbient * 0.6 + sun * (0.3 + 0.7 * NdotL));
|
|
104
|
+
return mix(col, foamLit, clamp(foam, 0.0, 1.0));
|
|
105
|
+
}
|
|
106
|
+
`;
|
|
107
|
+
// ---------------------------------------------------------------------------- rings + churn (the disturbance channels)
|
|
108
|
+
export function createDisturbanceUniforms() {
|
|
109
|
+
return {
|
|
110
|
+
uRings: { value: Array.from({ length: MAX_RINGS }, () => new THREE.Vector4(0, 0, -1e3, 0)) }, // x, z, birth time, amplitude
|
|
111
|
+
uRingSize: { value: new THREE.Vector3(0.6, 1.6, 3.0) }, // speed (m/s), life (s), wavelength scale
|
|
112
|
+
uChurn: { value: Array.from({ length: MAX_CHURN }, () => new THREE.Vector4(0, 0, 0, 0)) }, // x, z, radius, strength
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
/** A small ring pool: spawn(x, z, amp) writes the oldest slot. */
|
|
116
|
+
export function ringSpawner(u) {
|
|
117
|
+
let i = 0;
|
|
118
|
+
return (x, z, amp, now) => { u.uRings.value[i].set(x, z, now, amp); i = (i + 1) % MAX_RINGS; };
|
|
119
|
+
}
|
|
120
|
+
export const GLSL_DISTURB = /* glsl */ `
|
|
121
|
+
uniform vec4 uRings[${MAX_RINGS}];
|
|
122
|
+
uniform vec3 uRingSize;
|
|
123
|
+
uniform vec4 uChurn[${MAX_CHURN}];
|
|
124
|
+
|
|
125
|
+
/** Height + gradient of every live ring at xz (world/local metres). Each ring is a
|
|
126
|
+
* damped wave packet expanding at uRingSize.x m/s, dying over uRingSize.y s. */
|
|
127
|
+
vec3 ringField(vec2 p) {
|
|
128
|
+
vec3 acc = vec3(0.0);
|
|
129
|
+
for (int i = 0; i < ${MAX_RINGS}; i++) {
|
|
130
|
+
vec4 r = uRings[i];
|
|
131
|
+
float age = uTime - r.z;
|
|
132
|
+
if (age < 0.0 || age > uRingSize.y) continue;
|
|
133
|
+
vec2 d = p - r.xy; float dist = length(d);
|
|
134
|
+
float front = age * uRingSize.x;
|
|
135
|
+
float x = (dist - front) * uRingSize.z; // phase across the packet
|
|
136
|
+
float env = exp(-x * x * 0.35) * (1.0 - age / uRingSize.y) * r.w / (1.0 + front * 1.5);
|
|
137
|
+
float h = env * sin(x * 2.2);
|
|
138
|
+
float dh = env * (2.2 * cos(x * 2.2) - 0.7 * x * sin(x * 2.2)) * uRingSize.z;
|
|
139
|
+
acc += vec3(h, dh * d / max(dist, 1e-3));
|
|
140
|
+
}
|
|
141
|
+
return acc;
|
|
142
|
+
}
|
|
143
|
+
/** Churn zones: boiling noise inside a radius — foam amount and a wobbling normal. */
|
|
144
|
+
vec2 churnField(vec2 p, float t) {
|
|
145
|
+
float foam = 0.0; float bump = 0.0;
|
|
146
|
+
for (int i = 0; i < ${MAX_CHURN}; i++) {
|
|
147
|
+
vec4 c = uChurn[i];
|
|
148
|
+
if (c.w <= 0.0) continue;
|
|
149
|
+
float d = length(p - c.xy) / max(c.z, 1e-3);
|
|
150
|
+
float w = (1.0 - smoothstep(0.55, 1.0, d)) * c.w;
|
|
151
|
+
if (w <= 0.0) continue;
|
|
152
|
+
float n = fbm21(p * 2.4 + vec2(t * 0.9, -t * 1.3)) * 0.6 + fbm21(p * 5.0 - vec2(t * 2.1, t * 1.7)) * 0.4;
|
|
153
|
+
foam += w * smoothstep(0.35, 0.75, n + 0.25 * (1.0 - d));
|
|
154
|
+
bump += w * n;
|
|
155
|
+
}
|
|
156
|
+
return vec2(foam, bump);
|
|
157
|
+
}
|
|
158
|
+
`;
|
|
159
|
+
// ---------------------------------------------------------------------------- the basin
|
|
160
|
+
export function createBasinUniforms() {
|
|
161
|
+
return {
|
|
162
|
+
...createSunUniforms(),
|
|
163
|
+
...createDisturbanceUniforms(),
|
|
164
|
+
uWaves: { value: Array.from({ length: 6 }, () => new THREE.Vector4(1, 0, 0, 1)) }, // dir.x, dir.z, amp, k
|
|
165
|
+
uWaveSpeed: { value: Array.from({ length: 6 }, () => 0) },
|
|
166
|
+
uDeepColor: { value: new THREE.Color('#1a7ea6') },
|
|
167
|
+
uShallowColor: { value: new THREE.Color('#4fd6c8') },
|
|
168
|
+
uFoamColor: { value: new THREE.Color('#eef6f8') },
|
|
169
|
+
uRough: { value: 0.03 },
|
|
170
|
+
uSpecular: { value: 1.2 },
|
|
171
|
+
uDetail: { value: 0.5 },
|
|
172
|
+
uDetailSize: { value: 0.4 },
|
|
173
|
+
uHalf: { value: new THREE.Vector2(5, 5) },
|
|
174
|
+
uEdgeFade: { value: 0.08 },
|
|
175
|
+
uRound: { value: 0 },
|
|
176
|
+
uFloor: { value: 0 }, // 1: a floor is visible through the water
|
|
177
|
+
uFloorDepth: { value: 0.6 }, // metres of water over it
|
|
178
|
+
uAbsorb: { value: new THREE.Vector3(0.9, 0.35, 0.25) }, // per-channel absorption (1/m): red dies first
|
|
179
|
+
uFloorA: { value: new THREE.Color('#b9b2a4') }, uFloorB: { value: new THREE.Color('#8f8779') },
|
|
180
|
+
uFloorTile: { value: 0.5 }, // tile size (m); 0 = pebbles
|
|
181
|
+
uCamPos: { value: new THREE.Vector3() },
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
/** Wind -> a small wave table (lab stand-in for the ocean's spectrum). */
|
|
185
|
+
export function applyBasinWind(u, windSpeed, bearingDeg, fetchM, spread = 40) {
|
|
186
|
+
const rng = mulberry32(7);
|
|
187
|
+
const U = Math.max(windSpeed, 0.05);
|
|
188
|
+
const peak = Math.min(Math.max(0.88 * U * U * Math.pow(Math.max(fetchM / 1000, 0.001) / (0.05 * U * U + 1), 0.4), 0.12), fetchM * 0.5);
|
|
189
|
+
const hs = 0.0246 * U * U * Math.pow(Math.max(fetchM / 1000, 0.001) / (0.05 * U * U + 1), 0.4);
|
|
190
|
+
const b = (bearingDeg * Math.PI) / 180, s = (spread * Math.PI) / 180;
|
|
191
|
+
for (let i = 0; i < 6; i++) {
|
|
192
|
+
const t = i / 5;
|
|
193
|
+
const wl = peak * Math.pow(0.08, t);
|
|
194
|
+
const k = (2 * Math.PI) / wl;
|
|
195
|
+
const amp = (hs / 4) * Math.pow(0.55, i) * 0.5;
|
|
196
|
+
const a = b + (rng() * 2 - 1) * s * (0.4 + 0.6 * t);
|
|
197
|
+
u.uWaves.value[i].set(Math.sin(a), Math.cos(a), amp, k);
|
|
198
|
+
u.uWaveSpeed.value[i] = Math.sqrt(9.81 * k);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
export const BASIN_VERT = /* glsl */ `
|
|
202
|
+
${GLSL_COMMON}
|
|
203
|
+
${GLSL_DISTURB}
|
|
204
|
+
uniform vec4 uWaves[6];
|
|
205
|
+
uniform float uWaveSpeed[6];
|
|
206
|
+
uniform vec2 uHalf;
|
|
207
|
+
uniform float uEdgeFade;
|
|
208
|
+
uniform float uRound;
|
|
209
|
+
varying vec3 vP;
|
|
210
|
+
varying vec3 vN;
|
|
211
|
+
varying vec2 vLocal;
|
|
212
|
+
varying float vFoam;
|
|
213
|
+
varying float vEdge;
|
|
214
|
+
void main() {
|
|
215
|
+
vec2 p = position.xz;
|
|
216
|
+
float ext = uRound > 0.5 ? length(p / uHalf) : max(abs(p.x) / uHalf.x, abs(p.y) / uHalf.y);
|
|
217
|
+
float edge = 1.0 - smoothstep(1.0 - uEdgeFade, 1.0, ext);
|
|
218
|
+
float h = 0.0; vec2 g = vec2(0.0);
|
|
219
|
+
for (int i = 0; i < 6; i++) {
|
|
220
|
+
vec4 w = uWaves[i];
|
|
221
|
+
float ph = dot(w.xy, p) * w.w - uWaveSpeed[i] * uTime;
|
|
222
|
+
h += w.z * sin(ph);
|
|
223
|
+
g += w.z * w.w * cos(ph) * w.xy;
|
|
224
|
+
}
|
|
225
|
+
vec3 rf = ringField(p);
|
|
226
|
+
vec2 ch = churnField(p, uTime);
|
|
227
|
+
h += rf.x + ch.y * 0.04;
|
|
228
|
+
g += rf.yz;
|
|
229
|
+
h *= edge; g *= edge;
|
|
230
|
+
vP = (modelMatrix * vec4(p.x, h, p.y, 1.0)).xyz;
|
|
231
|
+
vN = normalize(mat3(modelMatrix) * normalize(vec3(-g.x, 1.0, -g.y)));
|
|
232
|
+
vLocal = p; vFoam = ch.x; vEdge = edge;
|
|
233
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4(p.x, h, p.y, 1.0);
|
|
234
|
+
}
|
|
235
|
+
`;
|
|
236
|
+
export const BASIN_FRAG = /* glsl */ `
|
|
237
|
+
${GLSL_COMMON}
|
|
238
|
+
${GLSL_DISTURB}
|
|
239
|
+
uniform vec3 uDeepColor, uShallowColor, uFoamColor;
|
|
240
|
+
uniform float uRough, uSpecular, uDetail, uDetailSize;
|
|
241
|
+
uniform vec3 uCamPos;
|
|
242
|
+
uniform float uFloor, uFloorDepth, uFloorTile;
|
|
243
|
+
uniform vec3 uAbsorb, uFloorA, uFloorB;
|
|
244
|
+
/** The basin floor seen through the surface: refracted lookup, tiles or pebbles, caustic light,
|
|
245
|
+
* Beer-Lambert absorption over the depth so the floor is tinted by the water. */
|
|
246
|
+
vec3 floorThrough(vec2 p, vec3 N, vec3 V, vec3 fallback) {
|
|
247
|
+
// refraction: the view ray bends toward the normal; offset the floor lookup by the normal's tilt
|
|
248
|
+
vec2 off = -N.xz * uFloorDepth * 1.6 - V.xz / max(V.y, 0.2) * uFloorDepth * 0.35;
|
|
249
|
+
vec2 fp = p + off;
|
|
250
|
+
vec3 fc;
|
|
251
|
+
if (uFloorTile > 0.0) {
|
|
252
|
+
vec2 g = fract(fp / uFloorTile); vec2 id = floor(fp / uFloorTile);
|
|
253
|
+
float grout = smoothstep(0.0, 0.06, g.x) * smoothstep(1.0, 0.94, g.x) * smoothstep(0.0, 0.06, g.y) * smoothstep(1.0, 0.94, g.y);
|
|
254
|
+
fc = mix(uFloorA, uFloorB, hash21(id) * 0.6 + vnoise21(fp * 3.0) * 0.4) * (0.55 + 0.45 * grout);
|
|
255
|
+
} else {
|
|
256
|
+
vec2 cl = cells21(fp * 2.5);
|
|
257
|
+
fc = mix(uFloorA, uFloorB, cl.y) * (0.6 + 0.4 * smoothstep(0.45, 0.1, cl.x)) * (0.8 + 0.4 * vnoise21(fp * 9.0));
|
|
258
|
+
}
|
|
259
|
+
// caustics: bright web from the surface ripples
|
|
260
|
+
float ca = pow(vnoise21(fp * 4.0 + uTime * 0.6) * vnoise21(fp * 4.0 - uTime * 0.5 + 3.0), 1.5) * 2.5;
|
|
261
|
+
vec3 L = normalize(uSunDir);
|
|
262
|
+
fc *= uSkyAmbient * 0.6 + uSunColor * (0.35 + 0.5 * ca) * max(L.y, 0.0);
|
|
263
|
+
vec3 T = exp(-uAbsorb * uFloorDepth * 2.0);
|
|
264
|
+
return mix(fallback, fc * T + uDeepColor * (1.0 - T) * 0.6, uFloor);
|
|
265
|
+
}
|
|
266
|
+
varying vec3 vP; varying vec3 vN; varying vec2 vLocal; varying float vFoam; varying float vEdge;
|
|
267
|
+
void main() {
|
|
268
|
+
vec3 N = normalize(vN);
|
|
269
|
+
// sub-mesh ripple detail, advected by a slow drift
|
|
270
|
+
vec3 n1 = noised21(vLocal / uDetailSize + vec2(uTime * 0.35, uTime * 0.2), 0.05);
|
|
271
|
+
vec3 n2 = noised21(vLocal / (uDetailSize * 0.45) - vec2(uTime * 0.5, -uTime * 0.3), 0.05);
|
|
272
|
+
vec2 dn = (n1.yz + n2.yz * 0.5) * uDetail * 2.5;
|
|
273
|
+
N = normalize(N + vec3(-dn.x, 0.0, -dn.y) * vEdge);
|
|
274
|
+
// churn roughens the surface too
|
|
275
|
+
vec2 ch = churnField(vLocal, uTime);
|
|
276
|
+
float rough = uRough + ch.x * 0.3;
|
|
277
|
+
vec3 body = mix(uDeepColor, uShallowColor, 0.15);
|
|
278
|
+
vec3 V = normalize(uCamPos - vP);
|
|
279
|
+
body = floorThrough(vLocal, N, V, body);
|
|
280
|
+
vec3 col = shadeWater(vP, N, uCamPos, body, uFoamColor, ch.x, rough, uSpecular);
|
|
281
|
+
gl_FragColor = vec4(col, 1.0);
|
|
282
|
+
#include <colorspace_fragment>
|
|
283
|
+
}
|
|
284
|
+
`;
|
|
285
|
+
export function createBasinMaterial(u) {
|
|
286
|
+
return new THREE.ShaderMaterial({ uniforms: u, vertexShader: BASIN_VERT, fragmentShader: BASIN_FRAG, side: THREE.DoubleSide });
|
|
287
|
+
}
|
|
288
|
+
/** A basin mesh: w x d metres in XZ, segments per side. */
|
|
289
|
+
export function createBasin(u, w, d, segs = 96, round = false) {
|
|
290
|
+
const geo = round ? new THREE.CircleGeometry(w / 2, Math.max(48, segs)) : new THREE.PlaneGeometry(w, d, segs, Math.max(4, Math.round(segs * d / w)));
|
|
291
|
+
if (round) {
|
|
292
|
+
// a round basin still needs interior vertices for the rings: subdivide the fan into a disc grid
|
|
293
|
+
const g = new THREE.PlaneGeometry(w, w, segs, segs);
|
|
294
|
+
g.rotateX(-Math.PI / 2);
|
|
295
|
+
const pos = g.attributes.position;
|
|
296
|
+
const r = w / 2;
|
|
297
|
+
for (let i = 0; i < pos.count; i++) {
|
|
298
|
+
const x = pos.getX(i), z = pos.getZ(i);
|
|
299
|
+
const l = Math.hypot(x, z);
|
|
300
|
+
if (l > r) {
|
|
301
|
+
pos.setX(i, x / l * r);
|
|
302
|
+
pos.setZ(i, z / l * r);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
geo.dispose();
|
|
306
|
+
u.uRound.value = 1;
|
|
307
|
+
u.uHalf.value.set(r, r);
|
|
308
|
+
const mesh = new THREE.Mesh(g, createBasinMaterial(u));
|
|
309
|
+
mesh.frustumCulled = false;
|
|
310
|
+
return mesh;
|
|
311
|
+
}
|
|
312
|
+
geo.rotateX(-Math.PI / 2);
|
|
313
|
+
u.uRound.value = 0;
|
|
314
|
+
u.uHalf.value.set(w / 2, d / 2);
|
|
315
|
+
const mesh = new THREE.Mesh(geo, createBasinMaterial(u));
|
|
316
|
+
mesh.frustumCulled = false;
|
|
317
|
+
return mesh;
|
|
318
|
+
}
|
|
319
|
+
// ---------------------------------------------------------------------------- instanced quads (spray, mist, droplets)
|
|
320
|
+
/** N camera-facing quads with per-instance aSeed (4 floats). The vertex shader decides
|
|
321
|
+
* everything else from the seed and time, so there is no per-frame upload. */
|
|
322
|
+
export function instancedQuads(n, seedFn) {
|
|
323
|
+
const geo = new THREE.InstancedBufferGeometry();
|
|
324
|
+
const base = new THREE.PlaneGeometry(1, 1);
|
|
325
|
+
geo.index = base.index;
|
|
326
|
+
geo.attributes.position = base.attributes.position;
|
|
327
|
+
geo.attributes.uv = base.attributes.uv;
|
|
328
|
+
const seeds = new Float32Array(n * 4);
|
|
329
|
+
for (let i = 0; i < n; i++) {
|
|
330
|
+
const s = seedFn(i);
|
|
331
|
+
seeds[i * 4] = s[0];
|
|
332
|
+
seeds[i * 4 + 1] = s[1];
|
|
333
|
+
seeds[i * 4 + 2] = s[2];
|
|
334
|
+
seeds[i * 4 + 3] = s[3];
|
|
335
|
+
}
|
|
336
|
+
geo.setAttribute('aSeed', new THREE.InstancedBufferAttribute(seeds, 4));
|
|
337
|
+
geo.instanceCount = n;
|
|
338
|
+
geo.boundingSphere = new THREE.Sphere(new THREE.Vector3(), 1e5);
|
|
339
|
+
return geo;
|
|
340
|
+
}
|
|
341
|
+
/** Billboard helper for the vertex stage: world position of the quad centre + size (m) -> clip. */
|
|
342
|
+
export const GLSL_BILLBOARD = /* glsl */ `
|
|
343
|
+
vec4 billboard(vec3 worldCentre, vec2 corner, float size, float stretchY, vec3 stretchDir) {
|
|
344
|
+
vec4 mv = viewMatrix * vec4(worldCentre, 1.0);
|
|
345
|
+
vec3 dirV = normalize((viewMatrix * vec4(stretchDir, 0.0)).xyz);
|
|
346
|
+
vec3 up = stretchY > 0.0 ? dirV : vec3(0.0, 1.0, 0.0);
|
|
347
|
+
vec3 right = vec3(up.y, -up.x, 0.0);
|
|
348
|
+
if (length(right) < 1e-4) right = vec3(1.0, 0.0, 0.0);
|
|
349
|
+
right = normalize(right);
|
|
350
|
+
mv.xyz += right * corner.x * size + up * corner.y * size * (1.0 + stretchY);
|
|
351
|
+
return projectionMatrix * mv;
|
|
352
|
+
}
|
|
353
|
+
`;
|
|
354
|
+
// ---------------------------------------------------------------------------- paths (streams)
|
|
355
|
+
export function samplePath(points, curve = 0.5, closed = false, step = 1.0) {
|
|
356
|
+
const pts = points.map((p) => new THREE.Vector3(p[0], 0, p[1]));
|
|
357
|
+
const c = new THREE.CatmullRomCurve3(pts, closed, 'centripetal', curve);
|
|
358
|
+
const len = c.getLength();
|
|
359
|
+
const n = Math.max(2, Math.round(len / step));
|
|
360
|
+
const out = [];
|
|
361
|
+
for (let i = 0; i <= n; i++) {
|
|
362
|
+
const t = i / n;
|
|
363
|
+
const p = c.getPointAt(t), tan = c.getTangentAt(t);
|
|
364
|
+
out.push({ p, t: tan, u: t * len });
|
|
365
|
+
}
|
|
366
|
+
// curvature from tangent turn rate
|
|
367
|
+
for (let i = 0; i < out.length; i++) {
|
|
368
|
+
const a = out[Math.max(0, i - 1)].t, b = out[Math.min(out.length - 1, i + 1)].t;
|
|
369
|
+
out[i].curv = Math.atan2(a.x * b.z - a.z * b.x, a.dot(b)) / (2 * step);
|
|
370
|
+
}
|
|
371
|
+
return { samples: out, length: len };
|
|
372
|
+
}
|
|
373
|
+
// ---------------------------------------------------------------------------- rock (lab staging; the app has real textures)
|
|
374
|
+
// JS value noise for the CPU displacement (smooth normals come from computeVertexNormals)
|
|
375
|
+
function jhash(x, y, z) { let h = Math.sin(x * 127.1 + y * 311.7 + z * 74.7) * 43758.5453; return h - Math.floor(h); }
|
|
376
|
+
function jnoise(x, y, z) {
|
|
377
|
+
const ix = Math.floor(x), iy = Math.floor(y), iz = Math.floor(z);
|
|
378
|
+
let fx = x - ix, fy = y - iy, fz = z - iz;
|
|
379
|
+
fx = fx * fx * (3 - 2 * fx);
|
|
380
|
+
fy = fy * fy * (3 - 2 * fy);
|
|
381
|
+
fz = fz * fz * (3 - 2 * fz);
|
|
382
|
+
const l = (a, b, t) => a + (b - a) * t;
|
|
383
|
+
return l(l(l(jhash(ix, iy, iz), jhash(ix + 1, iy, iz), fx), l(jhash(ix, iy + 1, iz), jhash(ix + 1, iy + 1, iz), fx), fy), l(l(jhash(ix, iy, iz + 1), jhash(ix + 1, iy, iz + 1), fx), l(jhash(ix, iy + 1, iz + 1), jhash(ix + 1, iy + 1, iz + 1), fx), fy), fz);
|
|
384
|
+
}
|
|
385
|
+
export function jfbm(x, y, z, oct = 4) { let a = 0.5, s = 0, f = 1; for (let i = 0; i < oct; i++) {
|
|
386
|
+
s += a * jnoise(x * f + 11 * i, y * f + 7 * i, z * f + 3 * i);
|
|
387
|
+
f *= 2.07;
|
|
388
|
+
a *= 0.5;
|
|
389
|
+
} return s; }
|
|
390
|
+
/** Displace a geometry along its normals by fbm (in the geometry's own space) and recompute smooth normals. */
|
|
391
|
+
export function displaceRock(geo, amount, scale = 0.35, seed = 0) {
|
|
392
|
+
const pos = geo.attributes.position, nrm = geo.attributes.normal;
|
|
393
|
+
for (let i = 0; i < pos.count; i++) {
|
|
394
|
+
const x = pos.getX(i), y = pos.getY(i), z = pos.getZ(i);
|
|
395
|
+
const d = (jfbm(x * scale + seed, y * scale, z * scale) - 0.5) * 2.0 + (jfbm(x * scale * 4 + seed, y * scale * 4, z * scale * 4, 3) - 0.5) * 0.5;
|
|
396
|
+
pos.setXYZ(i, x + nrm.getX(i) * d * amount, y + nrm.getY(i) * d * amount, z + nrm.getZ(i) * d * amount);
|
|
397
|
+
}
|
|
398
|
+
pos.needsUpdate = true;
|
|
399
|
+
geo.computeVertexNormals();
|
|
400
|
+
return geo;
|
|
401
|
+
}
|
|
402
|
+
export const ROCK_VERT = /* glsl */ `
|
|
403
|
+
${GLSL_COMMON}
|
|
404
|
+
varying vec3 vP; varying vec3 vN;
|
|
405
|
+
void main() {
|
|
406
|
+
vP = (modelMatrix * vec4(position, 1.0)).xyz;
|
|
407
|
+
vN = normalize(mat3(modelMatrix) * normal);
|
|
408
|
+
gl_Position = projectionMatrix * viewMatrix * vec4(vP, 1.0);
|
|
409
|
+
}
|
|
410
|
+
`;
|
|
411
|
+
export const ROCK_FRAG = /* glsl */ `
|
|
412
|
+
${GLSL_COMMON}
|
|
413
|
+
uniform vec3 uRockA, uRockB, uMoss;
|
|
414
|
+
uniform float uWet; // 0..1 darkens + glosses the rock near water
|
|
415
|
+
uniform float uWetHeight; // world y under which the rock is wet
|
|
416
|
+
varying vec3 vP; varying vec3 vN;
|
|
417
|
+
void main() {
|
|
418
|
+
vec3 N = normalize(vN);
|
|
419
|
+
// triplanar-ish detail: strata + grain
|
|
420
|
+
float strata = smoothstep(0.3, 0.7, fbm31(vec3(vP.x * 0.5, vP.y * 2.5, vP.z * 0.5)));
|
|
421
|
+
float grain = fbm31(vP * 5.0);
|
|
422
|
+
float crack = 1.0 - smoothstep(0.0, 0.02, abs(fbm31(vP * 1.6) - 0.5));
|
|
423
|
+
// bump: a small tilt from fine noise derivatives
|
|
424
|
+
float e = 0.08;
|
|
425
|
+
float b0 = fbm31(vP * 7.0), bx = fbm31(vP * 7.0 + vec3(e, 0.0, 0.0)), by = fbm31(vP * 7.0 + vec3(0.0, e, 0.0)), bz = fbm31(vP * 7.0 + vec3(0.0, 0.0, e));
|
|
426
|
+
N = normalize(N - vec3(bx - b0, by - b0, bz - b0) * 1.6);
|
|
427
|
+
vec3 col = mix(uRockA, uRockB, strata * 0.55 + grain * 0.45) * (1.0 - 0.18 * crack);
|
|
428
|
+
float moss = smoothstep(0.2, 0.8, N.y) * smoothstep(0.45, 0.7, fbm31(vP * 1.3 + 5.0));
|
|
429
|
+
col = mix(col, uMoss, moss * 0.8);
|
|
430
|
+
float wet = uWet * smoothstep(uWetHeight + 1.5, uWetHeight - 0.5, vP.y);
|
|
431
|
+
col *= 1.0 - 0.45 * wet;
|
|
432
|
+
vec3 L = normalize(uSunDir);
|
|
433
|
+
float NdotL = max(dot(N, L), 0.0);
|
|
434
|
+
vec3 amb = mix(uGroundAmbient, uSkyAmbient, N.y * 0.5 + 0.5);
|
|
435
|
+
vec3 lit = col * (amb * 0.9 + uSunColor * NdotL * 0.9);
|
|
436
|
+
vec3 V = normalize(cameraPosition - vP);
|
|
437
|
+
lit += uSunColor * ggx(N, L, V, 0.35 - 0.2 * wet) * (0.02 + 0.3 * wet) * fresnelWater(N, V);
|
|
438
|
+
gl_FragColor = vec4(lit, 1.0);
|
|
439
|
+
#include <colorspace_fragment>
|
|
440
|
+
}
|
|
441
|
+
`;
|
|
442
|
+
export function createRockMaterial(sunU, options = undefined) {
|
|
443
|
+
const opts = options || {};
|
|
444
|
+
return new THREE.ShaderMaterial({
|
|
445
|
+
uniforms: { ...sunU, uRockA: { value: new THREE.Color(opts.a ?? '#5b5650') }, uRockB: { value: new THREE.Color(opts.b ?? '#8a8075') }, uMoss: { value: new THREE.Color(opts.moss ?? '#4f6a2e') }, uWet: { value: opts.wet ?? 1 }, uWetHeight: { value: opts.wetHeight ?? 0.5 } },
|
|
446
|
+
vertexShader: ROCK_VERT, fragmentShader: ROCK_FRAG,
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
// ---------------------------------------------------------------------------- mist volume: N view-aligned slices through 3D noise, back to front, one draw
|
|
450
|
+
/** box: { center: Vector3, size: Vector3 } in the object's local space. */
|
|
451
|
+
export const MIST_VERT = /* glsl */ `
|
|
452
|
+
${GLSL_COMMON}
|
|
453
|
+
attribute float aSlice; // 0 (far) .. 1 (near)
|
|
454
|
+
uniform vec3 uBoxCenter, uBoxSize;
|
|
455
|
+
uniform float uSlices;
|
|
456
|
+
varying vec3 vWorld; varying float vSlice;
|
|
457
|
+
void main() {
|
|
458
|
+
vSlice = aSlice;
|
|
459
|
+
vec3 c = (modelMatrix * vec4(uBoxCenter, 1.0)).xyz;
|
|
460
|
+
vec3 viewDir = normalize(cameraPosition - c);
|
|
461
|
+
float radius = length(uBoxSize) * 0.5;
|
|
462
|
+
vec3 centre = c - viewDir * radius * (1.0 - 2.0 * aSlice) * 0.95;
|
|
463
|
+
vec3 right = normalize(cross(vec3(0.0, 1.0, 0.0), viewDir));
|
|
464
|
+
vec3 up = cross(viewDir, right);
|
|
465
|
+
vec3 wp = centre + right * position.x * radius * 2.0 + up * position.y * radius * 2.0;
|
|
466
|
+
vWorld = wp;
|
|
467
|
+
gl_Position = projectionMatrix * viewMatrix * vec4(wp, 1.0);
|
|
468
|
+
}
|
|
469
|
+
`;
|
|
470
|
+
export const MIST_FRAG = /* glsl */ `
|
|
471
|
+
${GLSL_COMMON}
|
|
472
|
+
uniform vec3 uBoxCenter, uBoxSize;
|
|
473
|
+
uniform float uSlices, uDensity, uRise;
|
|
474
|
+
uniform vec3 uMistColor;
|
|
475
|
+
uniform mat4 uInvModel;
|
|
476
|
+
varying vec3 vWorld; varying float vSlice;
|
|
477
|
+
void main() {
|
|
478
|
+
vec3 lp = (uInvModel * vec4(vWorld, 1.0)).xyz - uBoxCenter;
|
|
479
|
+
vec3 q = lp / (uBoxSize * 0.5);
|
|
480
|
+
float r2 = dot(q, q);
|
|
481
|
+
if (r2 > 1.0) discard;
|
|
482
|
+
// density: dense at the foot, thinning upward and outward; drifting + rising noise
|
|
483
|
+
vec3 np = lp * 0.9 + vec3(uTime * 0.25, -uTime * uRise, uTime * 0.1);
|
|
484
|
+
float n = fbm31(np) * 0.7 + fbm31(np * 2.3 + 9.0) * 0.3;
|
|
485
|
+
float shape = (1.0 - r2) * (1.0 - smoothstep(-0.2, 1.0, q.y) * 0.85);
|
|
486
|
+
float d = max(n - 0.42, 0.0) * 2.2 * shape * uDensity;
|
|
487
|
+
float thickness = length(uBoxSize) / uSlices;
|
|
488
|
+
float a = 1.0 - exp(-d * thickness);
|
|
489
|
+
if (a < 0.003) discard;
|
|
490
|
+
// lit by the sky with a little forward-scattered sun
|
|
491
|
+
vec3 V = normalize(cameraPosition - vWorld);
|
|
492
|
+
float fwd = pow(max(dot(-V, normalize(uSunDir)), 0.0), 3.0);
|
|
493
|
+
vec3 lit = uMistColor * (uSkyAmbient * 0.75 + uSunColor * (0.18 + 0.35 * fwd));
|
|
494
|
+
gl_FragColor = vec4(lit * a, a);
|
|
495
|
+
#include <colorspace_fragment>
|
|
496
|
+
}
|
|
497
|
+
`;
|
|
498
|
+
export function createMistVolume(sunU, center, size, slices = 16, density = 1, color = '#e9eff3') {
|
|
499
|
+
const geo = new THREE.InstancedBufferGeometry();
|
|
500
|
+
const base = new THREE.PlaneGeometry(1, 1);
|
|
501
|
+
geo.index = base.index;
|
|
502
|
+
geo.attributes.position = base.attributes.position;
|
|
503
|
+
geo.attributes.uv = base.attributes.uv;
|
|
504
|
+
const s = new Float32Array(slices);
|
|
505
|
+
for (let i = 0; i < slices; i++)
|
|
506
|
+
s[i] = i / (slices - 1);
|
|
507
|
+
geo.setAttribute('aSlice', new THREE.InstancedBufferAttribute(s, 1));
|
|
508
|
+
geo.instanceCount = slices;
|
|
509
|
+
geo.boundingSphere = new THREE.Sphere(new THREE.Vector3(), 1e5);
|
|
510
|
+
const u = { ...sunU, uBoxCenter: { value: center.clone() }, uBoxSize: { value: size.clone() }, uSlices: { value: slices }, uDensity: { value: density }, uRise: { value: 0.35 }, uMistColor: { value: new THREE.Color(color) }, uInvModel: { value: new THREE.Matrix4() } };
|
|
511
|
+
const mat = new THREE.ShaderMaterial({ uniforms: u, vertexShader: MIST_VERT, fragmentShader: MIST_FRAG, transparent: true, depthWrite: false, blending: THREE.CustomBlending, blendSrc: THREE.OneFactor, blendDst: THREE.OneMinusSrcAlphaFactor });
|
|
512
|
+
const mesh = new THREE.Mesh(geo, mat);
|
|
513
|
+
mesh.frustumCulled = false;
|
|
514
|
+
mesh.onBeforeRender = () => { u.uInvModel.value.copy(mesh.matrixWorld).invert(); };
|
|
515
|
+
return { mesh, u };
|
|
516
|
+
}
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,gBAAgB,QAA4B,CAAC;AAE1D,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,gBAAgB,QAA4B,CAAC;AAE1D,eAAO,MAAM,qBAAqB,aA+BhC,CAAC"}
|
package/dist/constants.js
CHANGED
|
@@ -32,10 +32,18 @@ export const SELF_MANAGED_MATERIAL = new Set([
|
|
|
32
32
|
'text',
|
|
33
33
|
// Image variants (shards, …) draw the picture with their own shaders.
|
|
34
34
|
'image',
|
|
35
|
+
// Urban variants (building, block, road, streetFurniture) own their facade / asphalt / fixture shaders.
|
|
36
|
+
'urban',
|
|
37
|
+
// Vegetation variants (tree, bush, grass, …) own their bark / leaf / produce materials.
|
|
38
|
+
'vegetation',
|
|
39
|
+
// Sports variants (court, ball, …) own their surface / leather / net materials.
|
|
40
|
+
'sports',
|
|
41
|
+
// Water variants (waterfall, fountain, …) own their water shaders.
|
|
42
|
+
'water',
|
|
35
43
|
// The water surface owns its shader — one material for both hosts, built
|
|
36
44
|
// around the wave field. Left out of this set, useMaterialApplication
|
|
37
45
|
// overwrites it with whatever the registry has under materialType, which for
|
|
38
46
|
// a legacy ocean is the old flat-plane water material.
|
|
39
|
-
|
|
47
|
+
'water',
|
|
40
48
|
// 'moon'
|
|
41
49
|
]);
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -20,8 +20,14 @@ export { SKY_LIVE_KEY, useSkyLive } from './useSkyLive';
|
|
|
20
20
|
export { useOceanMaterial } from './useOceanMaterial';
|
|
21
21
|
export type { ConfigLiveHandle, ConfigLiveValue, ConfigLiveFamily } from './useConfigLive';
|
|
22
22
|
export { CONFIG_LIVE_KEY, findConfigHandles, useConfigLive, useConfigLiveHandle } from './useConfigLive';
|
|
23
|
+
export { useGridLayout } from './useGridLayout';
|
|
24
|
+
export { useResolvedLayout, useLayoutRefVersion } from './useResolvedLayout';
|
|
23
25
|
export type { ConfigDriverOptions } from './useConfigDriver';
|
|
24
26
|
export { useConfigDriver } from './useConfigDriver';
|
|
27
|
+
export type { Disposable } from './useCommittedInstance';
|
|
28
|
+
export { useCommittedInstance } from './useCommittedInstance';
|
|
29
|
+
export type { LampTarget, TimeLit, TimeLightingOptions } from './useTimeLighting';
|
|
30
|
+
export { useTimeLighting } from './useTimeLighting';
|
|
25
31
|
export type { UseOceanMaterialOptions, OceanMaterialHandle } from './useOceanMaterial';
|
|
26
32
|
export type { UseContinuousEffectsOptions, UseContinuousEffectsResult } from './useContinuousEffects';
|
|
27
33
|
export { useContinuousEffects } from './useContinuousEffects';
|
|
@@ -85,11 +91,10 @@ export { useSkySystem } from './useSkySystem';
|
|
|
85
91
|
export { useSkyUniforms } from './useSkyUniforms';
|
|
86
92
|
export { useTransformControls } from './useTransformControls';
|
|
87
93
|
export { useVolumePoints } from './useVolumePoints';
|
|
88
|
-
export { useWaterEnvironment } from './useWaterEnvironment';
|
|
89
|
-
export { useWaterReflections } from './useWaterReflections';
|
|
90
94
|
export type { LandscapeLiveHandle } from './useLandscapeLive';
|
|
91
95
|
export { LANDSCAPE_LIVE_KEY, useLandscapeLive } from './useLandscapeLive';
|
|
92
96
|
export { useLandscapeMaps } from './useLandscapeMaps';
|
|
93
97
|
export type { LandscapeMapsState } from './useLandscapeMaps';
|
|
94
98
|
export { useRuntimeSettings } from './useRuntimeSettings';
|
|
99
|
+
export { useActionPatch, useRuntimeTime, useRuntimeSunSystem } from './useActionPatch';
|
|
95
100
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAKA,YAAY,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,0BAA0B,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEhF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhE,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE7D,YAAY,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MA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EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/hooks/index.js
CHANGED
|
@@ -14,7 +14,11 @@ export { OCEAN_LIVE_KEY, useOceanLive } from './useOceanLive.js';
|
|
|
14
14
|
export { SKY_LIVE_KEY, useSkyLive } from './useSkyLive.js';
|
|
15
15
|
export { useOceanMaterial } from './useOceanMaterial.js';
|
|
16
16
|
export { CONFIG_LIVE_KEY, findConfigHandles, useConfigLive, useConfigLiveHandle } from './useConfigLive.js';
|
|
17
|
+
export { useGridLayout } from './useGridLayout.js';
|
|
18
|
+
export { useResolvedLayout, useLayoutRefVersion } from './useResolvedLayout.js';
|
|
17
19
|
export { useConfigDriver } from './useConfigDriver.js';
|
|
20
|
+
export { useCommittedInstance } from './useCommittedInstance.js';
|
|
21
|
+
export { useTimeLighting } from './useTimeLighting.js';
|
|
18
22
|
export { useContinuousEffects } from './useContinuousEffects.js';
|
|
19
23
|
export { useCubeCamera } from './useCubeCamera.js';
|
|
20
24
|
export { useEnvironmentProbe } from './useEnvironmentProbe.js';
|
|
@@ -61,8 +65,7 @@ export { useSkySystem } from './useSkySystem.js';
|
|
|
61
65
|
export { useSkyUniforms } from './useSkyUniforms.js';
|
|
62
66
|
export { useTransformControls } from './useTransformControls.js';
|
|
63
67
|
export { useVolumePoints } from './useVolumePoints.js';
|
|
64
|
-
export { useWaterEnvironment } from './useWaterEnvironment.js';
|
|
65
|
-
export { useWaterReflections } from './useWaterReflections.js';
|
|
66
68
|
export { LANDSCAPE_LIVE_KEY, useLandscapeLive } from './useLandscapeLive.js';
|
|
67
69
|
export { useLandscapeMaps } from './useLandscapeMaps.js';
|
|
68
70
|
export { useRuntimeSettings } from './useRuntimeSettings.js';
|
|
71
|
+
export { useActionPatch, useRuntimeTime, useRuntimeSunSystem } from './useActionPatch.js';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type TimeSettings } from '@3driseai/3drise-core';
|
|
2
|
+
/**
|
|
3
|
+
* The applied action patch for one action address, or undefined.
|
|
4
|
+
*
|
|
5
|
+
* For the keyed views ('render', 'time'): their patch is not laid over one
|
|
6
|
+
* settings object but split across several (post-processing, sky.sunSystem, the
|
|
7
|
+
* HDR block, time settings), so each renderer reads the patch and lays its own
|
|
8
|
+
* part over its own settings (patchPostProcessing, patchHdr, patchSunShadows,
|
|
9
|
+
* patchTimeSettings, patchSunMultipliers). Subscribes to that one address only.
|
|
10
|
+
* For everything else use useRuntimeSettings.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useActionPatch<T = Record<string, unknown>>(state: 'render' | 'time'): T | undefined;
|
|
13
|
+
export default useActionPatch;
|
|
14
|
+
/** Time settings with an applied 'time' action laid over them (`t` itself when none). */
|
|
15
|
+
export declare function useRuntimeTime<T extends Partial<TimeSettings>>(t: T): T;
|
|
16
|
+
/**
|
|
17
|
+
* sky settings whose sunSystem carries the applied 'render' (shadows) and 'time'
|
|
18
|
+
* (sun / moon multipliers) actions. Same object when neither touches it.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useRuntimeSunSystem<T extends {
|
|
21
|
+
sunSystem?: any;
|
|
22
|
+
} | null | undefined>(sky: T): T;
|
|
23
|
+
//# sourceMappingURL=useActionPatch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useActionPatch.d.ts","sourceRoot":"","sources":["../../src/hooks/useActionPatch.ts"],"names":[],"mappings":"AACA,OAAO,EAA2G,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAInK;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,QAAQ,GAAG,MAAM,GAAG,CAAC,GAAG,SAAS,CAInG;AAED,eAAe,cAAc,CAAC;AAE9B,yFAAyF;AACzF,wBAAgB,cAAc,CAAC,CAAC,SAAS,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAGvE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS;IAAE,SAAS,CAAC,EAAE,GAAG,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAQ/F"}
|