@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
|
@@ -21,6 +21,11 @@ import type { ObjectAnimations, MouseMoveInteractions } from '@3driseai/3drise-c
|
|
|
21
21
|
* history, so a still view converges to the same image within four frames. The cost
|
|
22
22
|
* is a little temporal lag and this component owning the loop.
|
|
23
23
|
*
|
|
24
|
+
* With post-processing on, the composer hosts steps 2-5 instead (see
|
|
25
|
+
* composerHostedPass): its RenderPass has drawn the scene, so step 1 is skipped,
|
|
26
|
+
* and step 5 writes the composer's next buffer untonemapped — the chain's own
|
|
27
|
+
* ToneMapping runs last. Drawing the scene here as well doubled the frame.
|
|
28
|
+
*
|
|
24
29
|
* If it unmounts, R3F resumes its own auto-render and the scene draws normally
|
|
25
30
|
* without clouds — so hiding it is safe.
|
|
26
31
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VolumetricCloudsPass.d.ts","sourceRoot":"","sources":["../../../src/components/volumetricClouds/VolumetricCloudsPass.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"VolumetricCloudsPass.d.ts","sourceRoot":"","sources":["../../../src/components/volumetricClouds/VolumetricCloudsPass.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAMvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAQvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEpH,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAErF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,MAAM,WAAW,yBAA0B,SAAQ,gBAAgB;IAC/D,6EAA6E;IAC7E,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAC9B,MAAM,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAClC,OAAO,EAAE,mBAAmB,CAAC;IAC7B;oDACgD;IAChD,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,qFAAqF;IACrF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wEAAwE;IACxE,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,6DAA6D;IAC7D,SAAS,CAAC,EAAE,qBAAqB,CAAC;CACrC;AA8BD,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CA4X7D,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -3,6 +3,7 @@ import * as THREE from 'three';
|
|
|
3
3
|
import { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
4
4
|
import { useFrame, useThree } from '@react-three/fiber';
|
|
5
5
|
import { useFrameRenderer } from '../../hooks/useFrameRenderer.js';
|
|
6
|
+
import { createHostedPass, publishHostedPass } from '../../utils/composerHostedPass.js';
|
|
6
7
|
import { useThunder } from '../../hooks/useThunder.js';
|
|
7
8
|
import { useObjectReady } from '../../hooks/useObjectReady.js';
|
|
8
9
|
import { CLOUD_LIVE_KEY } from '../../hooks/useCloudLive.js';
|
|
@@ -180,7 +181,7 @@ const VolumetricCloudsPass = ({ id = '3drise-clouds', deck, cirrus, quality, thu
|
|
|
180
181
|
// held in a ref rather than a useCallback because it closes over a dozen pieces of
|
|
181
182
|
// per-frame state, and a dependency array over all of them would be re-created
|
|
182
183
|
// every render anyway — which would re-register the frame renderer every render.
|
|
183
|
-
const drawFrame = (camera, pointer, delta) => {
|
|
184
|
+
const drawFrame = (camera, pointer, delta, host) => {
|
|
184
185
|
if (!noise)
|
|
185
186
|
return;
|
|
186
187
|
frame.current += 1;
|
|
@@ -210,15 +211,26 @@ const VolumetricCloudsPass = ({ id = '3drise-clouds', deck, cirrus, quality, thu
|
|
|
210
211
|
}
|
|
211
212
|
}
|
|
212
213
|
// ---- 1. scene ----
|
|
213
|
-
const sceneRT = (frame.current & 1) ? targets.sceneA : targets.sceneB;
|
|
214
214
|
const prevTarget = gl.getRenderTarget();
|
|
215
215
|
const prevAutoClear = gl.autoClear;
|
|
216
216
|
gl.autoClear = true;
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
217
|
+
let sceneTex;
|
|
218
|
+
let depthTex;
|
|
219
|
+
if (host) {
|
|
220
|
+
// Hosted: the composer's RenderPass already drew the scene, depth included.
|
|
221
|
+
sceneTex = host.scene;
|
|
222
|
+
depthTex = host.depth;
|
|
223
|
+
}
|
|
224
|
+
else {
|
|
225
|
+
const sceneRT = (frame.current & 1) ? targets.sceneA : targets.sceneB;
|
|
226
|
+
gl.setRenderTarget(sceneRT);
|
|
227
|
+
// No sky pass. SkyController / Skybox already drew the background into this
|
|
228
|
+
// target; the clouds only borrow the atmosphere function for ambient and
|
|
229
|
+
// aerial perspective, so a second sky would just fight the first.
|
|
230
|
+
gl.render(scene, camera);
|
|
231
|
+
sceneTex = sceneRT.texture;
|
|
232
|
+
depthTex = sceneRT.depthTexture;
|
|
233
|
+
}
|
|
222
234
|
// Which pixel of every 2x2 block the deck traces this frame. A diagonal-first
|
|
223
235
|
// order, so two consecutive frames never trace neighbours on the same row.
|
|
224
236
|
const [ox, oy] = INTERLEAVE[frame.current & 3];
|
|
@@ -231,8 +243,8 @@ const VolumetricCloudsPass = ({ id = '3drise-clouds', deck, cirrus, quality, thu
|
|
|
231
243
|
m.uniforms.u_time.value = time.current;
|
|
232
244
|
if (m.uniforms.u_frame)
|
|
233
245
|
m.uniforms.u_frame.value = frame.current;
|
|
234
|
-
m.uniforms.u_depth.value =
|
|
235
|
-
m.uniforms.u_hasDepth.value = 1;
|
|
246
|
+
m.uniforms.u_depth.value = depthTex ?? empty;
|
|
247
|
+
m.uniforms.u_hasDepth.value = depthTex ? 1 : 0;
|
|
236
248
|
m.uniforms.u_screenSpace.value = 1;
|
|
237
249
|
};
|
|
238
250
|
// ---- 2 & 3. deck march, then temporal resolve ----
|
|
@@ -322,16 +334,19 @@ const VolumetricCloudsPass = ({ id = '3drise-clouds', deck, cirrus, quality, thu
|
|
|
322
334
|
}
|
|
323
335
|
// ---- 5. composite ----
|
|
324
336
|
const c = passes.compositeMat.uniforms;
|
|
325
|
-
c.u_scene.value =
|
|
337
|
+
c.u_scene.value = sceneTex;
|
|
326
338
|
c.u_clouds.value = deckTex;
|
|
327
339
|
c.u_cirrus.value = cirrusTex;
|
|
328
|
-
c.u_depth.value =
|
|
340
|
+
c.u_depth.value = depthTex ?? empty;
|
|
329
341
|
c.u_lowTexel.value.set(1 / lowW, 1 / lowH);
|
|
330
342
|
c.u_exposure.value = quality.exposure;
|
|
331
|
-
|
|
343
|
+
// Hosted mid-chain, the output stays linear HDR: the chain's ToneMapping is the
|
|
344
|
+
// one tonemap. Only as the canvas writer does this pass tonemap itself.
|
|
345
|
+
c.u_tonemap.value = (quality.tonemap && (!host || host.toScreen)) ? 1 : 0;
|
|
332
346
|
c.u_hasCirrus.value = cirrusOn ? 1 : 0;
|
|
333
|
-
gl.setRenderTarget(prevTarget);
|
|
347
|
+
gl.setRenderTarget(host ? host.output : prevTarget);
|
|
334
348
|
gl.render(passes.compositeScene, orthoCam);
|
|
349
|
+
gl.setRenderTarget(prevTarget);
|
|
335
350
|
gl.autoClear = prevAutoClear;
|
|
336
351
|
prevViewProj.current.multiplyMatrices(camera.projectionMatrix, camera.matrixWorldInverse);
|
|
337
352
|
prevCamPos.current.copy(camera.position);
|
|
@@ -342,8 +357,19 @@ const VolumetricCloudsPass = ({ id = '3drise-clouds', deck, cirrus, quality, thu
|
|
|
342
357
|
const drawRef = useRef(drawFrame);
|
|
343
358
|
drawRef.current = drawFrame;
|
|
344
359
|
const pointerRef = useRef(new THREE.Vector2());
|
|
360
|
+
const stateCamera = useThree((s) => s.camera);
|
|
361
|
+
const cameraRef = useRef(stateCamera);
|
|
362
|
+
cameraRef.current = stateCamera;
|
|
363
|
+
// Offered to the post-processing composer. While one hosts it, the composer drives
|
|
364
|
+
// the frame and calls this from inside its chain; the loop below stands down.
|
|
365
|
+
const hostedPass = useMemo(() => createHostedPass('VolumetricClouds', (input, deltaTime) => {
|
|
366
|
+
drawRef.current(cameraRef.current, pointerRef.current, deltaTime, input);
|
|
367
|
+
}), []);
|
|
368
|
+
useEffect(() => publishHostedPass(gl, hostedPass), [gl, hostedPass]);
|
|
345
369
|
useFrame((state, delta) => {
|
|
346
370
|
pointerRef.current.copy(state.pointer);
|
|
371
|
+
if (hostedPass.hosted)
|
|
372
|
+
return;
|
|
347
373
|
drawRef.current(state.camera, state.pointer, delta);
|
|
348
374
|
}, 1);
|
|
349
375
|
// This pass composites to the canvas itself, so gl.render(scene, camera) is not a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OceanSurface.d.ts","sourceRoot":"","sources":["../../../src/components/water/OceanSurface.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAItC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"OceanSurface.d.ts","sourceRoot":"","sources":["../../../src/components/water/OceanSurface.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAItC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAiE3C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -29,8 +29,9 @@ import { useOceanMaterial } from '../../hooks/useOceanMaterial.js';
|
|
|
29
29
|
const OceanSurface = ({ id = '3drise-water', config, quality, skySettings, timeSettings, sunIntensity = 1, animations, mouseMove, terrain, onObjectReady, onObjectDispose, }) => {
|
|
30
30
|
const clipmap = useClipmap(quality.levels, quality.segments, quality.cellSize);
|
|
31
31
|
const meshRefs = useRef([]);
|
|
32
|
-
const { material, rootRef } = useOceanMaterial({
|
|
32
|
+
const { material, rootRef, onBeforeRender } = useOceanMaterial({
|
|
33
33
|
id,
|
|
34
|
+
world: true,
|
|
34
35
|
config,
|
|
35
36
|
quality,
|
|
36
37
|
skySettings,
|
|
@@ -61,6 +62,6 @@ const OceanSurface = ({ id = '3drise-water', config, quality, skySettings, timeS
|
|
|
61
62
|
// Displacement happens in the vertex shader, so the
|
|
62
63
|
// object-space bounds describe a flat plane. Culling against
|
|
63
64
|
// them hides the water the moment the camera tilts up.
|
|
64
|
-
frustumCulled: false }, ring.level))) }));
|
|
65
|
+
frustumCulled: false, onBeforeRender: onBeforeRender }, ring.level))) }));
|
|
65
66
|
};
|
|
66
67
|
export default OceanSurface;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WaterBody.d.ts","sourceRoot":"","sources":["../../../src/components/water/WaterBody.tsx"],"names":[],"mappings":"AACA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAGlD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"WaterBody.d.ts","sourceRoot":"","sources":["../../../src/components/water/WaterBody.tsx"],"names":[],"mappings":"AACA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAGlD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAwGxC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -29,22 +29,40 @@ import { useOceanMaterial } from '../../hooks/useOceanMaterial.js';
|
|
|
29
29
|
* The rim taper (`edgeFade`) is in the vertex shader — without it the boundary
|
|
30
30
|
* is a sawn-off cliff of water.
|
|
31
31
|
*/
|
|
32
|
-
const WaterBody = ({ id = '3drise-water-body', config, quality, skySettings, timeSettings, sunIntensity = 1, animations, mouseMove, meshSettings, onObjectReady, onObjectDispose, }) => {
|
|
32
|
+
const WaterBody = ({ id = '3drise-water-body', config, quality, skySettings, timeSettings, sunIntensity = 1, animations, mouseMove, meshSettings, transformOwned = false, onObjectReady, onObjectDispose, }) => {
|
|
33
33
|
const [width, depth] = config.size;
|
|
34
|
+
// The body is sized by its transform: `size` is the grid's base extent and the
|
|
35
|
+
// transform's scale multiplies it (a catalogue pool is a 1 x 1 grid scaled to
|
|
36
|
+
// metres). The shader evaluates the waves in world metres either way.
|
|
37
|
+
const sx = Math.abs(meshSettings?.scale?.[0] ?? 1);
|
|
38
|
+
const sz = Math.abs(meshSettings?.scale?.[2] ?? 1);
|
|
39
|
+
const worldExtent = Math.max(width * sx, depth * sz, 0.01);
|
|
34
40
|
// A body cannot carry a wave longer than it is: fetch is capped at its own
|
|
35
41
|
// extent, which is physically what fetch MEANS — the open water upwind.
|
|
36
42
|
const bounded = useMemo(() => ({
|
|
37
43
|
...config,
|
|
38
|
-
fetch: Math.min(config.fetch,
|
|
39
|
-
}), [config,
|
|
44
|
+
fetch: Math.min(config.fetch, worldExtent / 1000),
|
|
45
|
+
}), [config, worldExtent]);
|
|
46
|
+
// Cells square in METRES: `segments` runs along the body's longer side and the
|
|
47
|
+
// shorter side gets proportionally fewer. An N x N grid on a long canal makes
|
|
48
|
+
// cells several times longer than wide, and those sliver triangles shade in
|
|
49
|
+
// streaks along their diagonals — lines running down the water as soon as the
|
|
50
|
+
// waves are aligned (a current, a narrow spread). Rebuilt when the transform's
|
|
51
|
+
// scale changes the proportions, which is a commit, not a frame.
|
|
52
|
+
const segments = Math.max(4, Math.min(Math.round(config.segments), 1024));
|
|
53
|
+
const spanX = Math.max(width * sx, 1e-3), spanZ = Math.max(depth * sz, 1e-3);
|
|
54
|
+
const longest = Math.max(spanX, spanZ);
|
|
55
|
+
const segX = Math.max(4, Math.round(segments * spanX / longest));
|
|
56
|
+
const segZ = Math.max(4, Math.round(segments * spanZ / longest));
|
|
40
57
|
const geometry = useMemo(() => {
|
|
41
|
-
const
|
|
42
|
-
const geo = new THREE.PlaneGeometry(Math.max(width, 0.01), Math.max(depth, 0.01), segments, segments);
|
|
58
|
+
const geo = new THREE.PlaneGeometry(Math.max(width, 0.01), Math.max(depth, 0.01), segX, segZ);
|
|
43
59
|
// PlaneGeometry is built in XY; the water field is XZ, and rotating the
|
|
44
60
|
// mesh instead would rotate the transform the user edits.
|
|
45
61
|
geo.rotateX(-Math.PI / 2);
|
|
46
62
|
const count = geo.attributes.position.count;
|
|
47
|
-
|
|
63
|
+
// Local units, measured along the longer side (the cells are square in
|
|
64
|
+
// metres); the material multiplies by the transform's largest scale.
|
|
65
|
+
const cell = (Math.max(width * sx, depth * sz) / segments) / Math.max(sx, sz, 1e-6);
|
|
48
66
|
// The material reads all three on both hosts. A body has no coarser ring
|
|
49
67
|
// to morph toward, so the morph attributes are zero and `cellLod` is just
|
|
50
68
|
// the cell — which is still what the per-wave LOD fade needs, so a pool
|
|
@@ -60,9 +78,9 @@ const WaterBody = ({ id = '3drise-water-body', config, quality, skySettings, tim
|
|
|
60
78
|
if (geo.boundingSphere)
|
|
61
79
|
geo.boundingSphere.radius *= 1.2;
|
|
62
80
|
return geo;
|
|
63
|
-
}, [width, depth,
|
|
81
|
+
}, [width, depth, segments, segX, segZ, sx, sz]);
|
|
64
82
|
useEffect(() => () => { geometry.dispose(); }, [geometry]);
|
|
65
|
-
const { material, rootRef } = useOceanMaterial({
|
|
83
|
+
const { material, rootRef, onBeforeRender, onAfterRender } = useOceanMaterial({
|
|
66
84
|
id,
|
|
67
85
|
config: bounded,
|
|
68
86
|
quality,
|
|
@@ -72,7 +90,10 @@ const WaterBody = ({ id = '3drise-water-body', config, quality, skySettings, tim
|
|
|
72
90
|
animations,
|
|
73
91
|
mouseMove,
|
|
74
92
|
});
|
|
75
|
-
useObjectReady(rootRef, { id, type: '
|
|
76
|
-
|
|
93
|
+
useObjectReady(rootRef, { id, type: 'water', config, quality }, onObjectReady, onObjectDispose);
|
|
94
|
+
// As a scene object (ObjectNode) the CreatedObject wrapper already applies
|
|
95
|
+
// meshSettings; applying it here too would place the pool twice as far out.
|
|
96
|
+
const own = !transformOwned && meshSettings ? meshSettings : undefined;
|
|
97
|
+
return (_jsx("group", { ref: rootRef, position: own?.position ?? [0, 0, 0], rotation: own?.rotation ?? [0, 0, 0], scale: own?.scale ?? [1, 1, 1], visible: own ? own.visible !== false : true, children: _jsx("mesh", { geometry: geometry, material: material, receiveShadow: quality.receiveShadows, onBeforeRender: onBeforeRender, onAfterRender: onAfterRender }) }));
|
|
77
98
|
};
|
|
78
99
|
export default WaterBody;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FountainWaterConfig } from '@3driseai/3drise-core';
|
|
3
|
+
import type { WaterVariantProps } from './useWaterInstance';
|
|
4
|
+
export interface WaterFountainProps extends WaterVariantProps {
|
|
5
|
+
config: FountainWaterConfig;
|
|
6
|
+
}
|
|
7
|
+
declare const WaterFountain: React.FC<WaterFountainProps>;
|
|
8
|
+
export default WaterFountain;
|
|
9
|
+
//# sourceMappingURL=WaterFountain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WaterFountain.d.ts","sourceRoot":"","sources":["../../../src/components/water/WaterFountain.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAK,EAAa,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAoBvE,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IACzD,MAAM,EAAE,mBAAmB,CAAC;CAC/B;AAED,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAO/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DEFAULT_WATER_OBJECTS, WATER_OBJECTS_ANIMATABLE } from '@3driseai/3drise-core';
|
|
3
|
+
import { useWaterInstance } from './useWaterInstance.js';
|
|
4
|
+
import { createUniforms, applyConfig, build, STRUCTURAL } from './core/fountain.js';
|
|
5
|
+
// =============================================================================
|
|
6
|
+
// WaterFountain — Fountain (type 'water', config.type 'fountain')
|
|
7
|
+
// =============================================================================
|
|
8
|
+
// Fountain water of six kinds — ballistic jets (single, ring, crown, fan), laminar glass arcs, dancing jets, a geyser column, a laminar bell and tiered bowl curtains — splashing with crowns, foam and rings into a water body, lit by the scene sun and sky. Use for plazas, hotel courtyards, gardens and parks.
|
|
9
|
+
// The construction lives in core/fountain.ts (emitted from the lab); this component wires it into
|
|
10
|
+
// the config pattern through useWaterInstance (scene sun and sky, live drag, keyframes, pointer).
|
|
11
|
+
const CORE = {
|
|
12
|
+
DEFAULTS: DEFAULT_WATER_OBJECTS.fountain,
|
|
13
|
+
STRUCTURAL,
|
|
14
|
+
/** Knobs a keyframe or pointer binding may drive per frame — exactly what the push applies. */
|
|
15
|
+
ANIMATABLE: new Set(WATER_OBJECTS_ANIMATABLE.fountain.map((p) => p.value)),
|
|
16
|
+
createUniforms,
|
|
17
|
+
applyConfig,
|
|
18
|
+
build,
|
|
19
|
+
};
|
|
20
|
+
const WaterFountain = (props) => {
|
|
21
|
+
const { rootRef, instance } = useWaterInstance(CORE, props);
|
|
22
|
+
return (_jsx("group", { ref: rootRef, children: _jsx("primitive", { object: instance.object }) }));
|
|
23
|
+
};
|
|
24
|
+
export default WaterFountain;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { StreamWaterConfig } from '@3driseai/3drise-core';
|
|
3
|
+
import type { WaterVariantProps } from './useWaterInstance';
|
|
4
|
+
export interface WaterStreamProps extends WaterVariantProps {
|
|
5
|
+
config: StreamWaterConfig;
|
|
6
|
+
}
|
|
7
|
+
declare const WaterStream: React.FC<WaterStreamProps>;
|
|
8
|
+
export default WaterStream;
|
|
9
|
+
//# sourceMappingURL=WaterStream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WaterStream.d.ts","sourceRoot":"","sources":["../../../src/components/water/WaterStream.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,OAAO,KAAK,EAAa,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAoBvE,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACvD,MAAM,EAAE,iBAAiB,CAAC;CAC7B;AAED,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAO3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DEFAULT_WATER_OBJECTS, WATER_OBJECTS_ANIMATABLE } from '@3driseai/3drise-core';
|
|
3
|
+
import { useWaterInstance } from './useWaterInstance.js';
|
|
4
|
+
import { createUniforms, applyConfig, build, STRUCTURAL } from './core/stream.js';
|
|
5
|
+
// =============================================================================
|
|
6
|
+
// WaterStream — Stream (type 'water', config.type 'stream')
|
|
7
|
+
// =============================================================================
|
|
8
|
+
// Flowing water along a path of points, drawn over the user's own bed or terrain: clear at the edges and deep mid-stream, ripples advected with a channel velocity profile, foam on the banks, the outer side of bends and around rocks, lit by the scene sun and sky. Use for parks, gardens, landscapes and village scenes.
|
|
9
|
+
// The construction lives in core/stream.ts (emitted from the lab); this component wires it into
|
|
10
|
+
// the config pattern through useWaterInstance (scene sun and sky, live drag, keyframes, pointer).
|
|
11
|
+
const CORE = {
|
|
12
|
+
DEFAULTS: DEFAULT_WATER_OBJECTS.stream,
|
|
13
|
+
STRUCTURAL,
|
|
14
|
+
/** Knobs a keyframe or pointer binding may drive per frame — exactly what the push applies. */
|
|
15
|
+
ANIMATABLE: new Set(WATER_OBJECTS_ANIMATABLE.stream.map((p) => p.value)),
|
|
16
|
+
createUniforms,
|
|
17
|
+
applyConfig,
|
|
18
|
+
build,
|
|
19
|
+
};
|
|
20
|
+
const WaterStream = (props) => {
|
|
21
|
+
const { rootRef, instance } = useWaterInstance(CORE, props);
|
|
22
|
+
return (_jsx("group", { ref: rootRef, children: _jsx("primitive", { object: instance.object }) }));
|
|
23
|
+
};
|
|
24
|
+
export default WaterStream;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WaterfallWaterConfig } from '@3driseai/3drise-core';
|
|
3
|
+
import type { WaterVariantProps } from './useWaterInstance';
|
|
4
|
+
export interface WaterWaterfallProps extends WaterVariantProps {
|
|
5
|
+
config: WaterfallWaterConfig;
|
|
6
|
+
}
|
|
7
|
+
declare const WaterWaterfall: React.FC<WaterWaterfallProps>;
|
|
8
|
+
export default WaterWaterfall;
|
|
9
|
+
//# sourceMappingURL=WaterWaterfall.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WaterWaterfall.d.ts","sourceRoot":"","sources":["../../../src/components/water/WaterWaterfall.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,KAAK,EAAa,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAoBvE,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAC1D,MAAM,EAAE,oBAAoB,CAAC;CAChC;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAOjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DEFAULT_WATER_OBJECTS, WATER_OBJECTS_ANIMATABLE } from '@3driseai/3drise-core';
|
|
3
|
+
import { useWaterInstance } from './useWaterInstance.js';
|
|
4
|
+
import { createUniforms, applyConfig, build, STRUCTURAL } from './core/waterfall.js';
|
|
5
|
+
// =============================================================================
|
|
6
|
+
// WaterWaterfall — Waterfall (type 'water', config.type 'waterfall')
|
|
7
|
+
// =============================================================================
|
|
8
|
+
// An aerated sheet of water falling from a lip into a plunge pool: ropes and surges that stretch as the water accelerates, glassy at the lip and white with foam at the foot, a boiling pool streaking foam outward, mist rising from the base and spray off the edges, lit by the scene sun and sky. Use for cliffs, gardens, hotel atriums and fantasy scenes.
|
|
9
|
+
// The construction lives in core/waterfall.ts (emitted from the lab); this component wires it into
|
|
10
|
+
// the config pattern through useWaterInstance (scene sun and sky, live drag, keyframes, pointer).
|
|
11
|
+
const CORE = {
|
|
12
|
+
DEFAULTS: DEFAULT_WATER_OBJECTS.waterfall,
|
|
13
|
+
STRUCTURAL,
|
|
14
|
+
/** Knobs a keyframe or pointer binding may drive per frame — exactly what the push applies. */
|
|
15
|
+
ANIMATABLE: new Set(WATER_OBJECTS_ANIMATABLE.waterfall.map((p) => p.value)),
|
|
16
|
+
createUniforms,
|
|
17
|
+
applyConfig,
|
|
18
|
+
build,
|
|
19
|
+
};
|
|
20
|
+
const WaterWaterfall = (props) => {
|
|
21
|
+
const { rootRef, instance } = useWaterInstance(CORE, props);
|
|
22
|
+
return (_jsx("group", { ref: rootRef, children: _jsx("primitive", { object: instance.object }) }));
|
|
23
|
+
};
|
|
24
|
+
export default WaterWaterfall;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
export declare const STRUCTURAL: string[];
|
|
3
|
+
export declare function createUniforms(): {
|
|
4
|
+
uJets: {
|
|
5
|
+
value: THREE.Vector4[];
|
|
6
|
+
};
|
|
7
|
+
uJetAux: {
|
|
8
|
+
value: THREE.Vector4[];
|
|
9
|
+
};
|
|
10
|
+
uJetCount: {
|
|
11
|
+
value: number;
|
|
12
|
+
};
|
|
13
|
+
uThickness: {
|
|
14
|
+
value: number;
|
|
15
|
+
};
|
|
16
|
+
uBreakup: {
|
|
17
|
+
value: number;
|
|
18
|
+
};
|
|
19
|
+
uSplash: {
|
|
20
|
+
value: number;
|
|
21
|
+
};
|
|
22
|
+
uSpin: {
|
|
23
|
+
value: number;
|
|
24
|
+
};
|
|
25
|
+
uFroth: {
|
|
26
|
+
value: number;
|
|
27
|
+
};
|
|
28
|
+
uWaterColor: {
|
|
29
|
+
value: THREE.Color;
|
|
30
|
+
};
|
|
31
|
+
uFoamColor: {
|
|
32
|
+
value: THREE.Color;
|
|
33
|
+
};
|
|
34
|
+
uCamPos: {
|
|
35
|
+
value: THREE.Vector3;
|
|
36
|
+
};
|
|
37
|
+
uSunDir: {
|
|
38
|
+
value: THREE.Vector3;
|
|
39
|
+
};
|
|
40
|
+
uSunColor: {
|
|
41
|
+
value: THREE.Color;
|
|
42
|
+
};
|
|
43
|
+
uSkyAmbient: {
|
|
44
|
+
value: THREE.Color;
|
|
45
|
+
};
|
|
46
|
+
uGroundAmbient: {
|
|
47
|
+
value: THREE.Color;
|
|
48
|
+
};
|
|
49
|
+
uSkyTop: {
|
|
50
|
+
value: THREE.Color;
|
|
51
|
+
};
|
|
52
|
+
uSkyHorizon: {
|
|
53
|
+
value: THREE.Color;
|
|
54
|
+
};
|
|
55
|
+
uNight: {
|
|
56
|
+
value: number;
|
|
57
|
+
};
|
|
58
|
+
uTime: {
|
|
59
|
+
value: number;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
export declare function layoutJets(u: any, c: any, now?: number): void;
|
|
63
|
+
export declare function applyConfig(u: any, c: any): void;
|
|
64
|
+
export declare function build(u: any, cfg: any): {
|
|
65
|
+
object: THREE.Group<THREE.Object3DEventMap>;
|
|
66
|
+
apply(patch: any): void;
|
|
67
|
+
update(dt: any, camera: any): void;
|
|
68
|
+
dispose(): void;
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=fountain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fountain.d.ts","sourceRoot":"","sources":["../../../../src/components/water/core/fountain.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,eAAO,MAAM,UAAU,UAAmI,CAAC;AAK3J,wBAAgB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU7B;AAcD,wBAAgB,UAAU,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA,EAAE,GAAG,SAAI,QA0BvC;AACD,wBAAgB,WAAW,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA,QAa/B;AA+TD,wBAAgB,KAAK,CAAC,CAAC,KAAA,EAAE,GAAG,KAAA;;;;;EA+F3B"}
|