@3driseai/3drise-viewer 0.1.41 → 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.
Files changed (414) hide show
  1. package/dist/animationsV2/ClipsRuntime.d.ts +16 -1
  2. package/dist/animationsV2/ClipsRuntime.d.ts.map +1 -1
  3. package/dist/animationsV2/ClipsRuntime.js +144 -25
  4. package/dist/animationsV2/appliers.d.ts +9 -0
  5. package/dist/animationsV2/appliers.d.ts.map +1 -1
  6. package/dist/animationsV2/appliers.js +62 -2
  7. package/dist/animationsV2/clipUtils.d.ts +30 -0
  8. package/dist/animationsV2/clipUtils.d.ts.map +1 -1
  9. package/dist/animationsV2/clipUtils.js +163 -17
  10. package/dist/animationsV2/elementSettings.d.ts +5 -0
  11. package/dist/animationsV2/elementSettings.d.ts.map +1 -1
  12. package/dist/animationsV2/elementSettings.js +6 -3
  13. package/dist/animationsV2/sequenceUtils.js +4 -4
  14. package/dist/animationsV2/types.d.ts +23 -0
  15. package/dist/animationsV2/types.d.ts.map +1 -1
  16. package/dist/api/sceneHandle.js +2 -2
  17. package/dist/components/CreatedObject.d.ts +3 -0
  18. package/dist/components/CreatedObject.d.ts.map +1 -1
  19. package/dist/components/CreatedObject.js +6 -2
  20. package/dist/components/CustomPrimitive.d.ts.map +1 -1
  21. package/dist/components/CustomPrimitive.js +1 -10
  22. package/dist/components/EnvironmentManager.d.ts.map +1 -1
  23. package/dist/components/EnvironmentManager.js +11 -5
  24. package/dist/components/GeometryShape.d.ts +5 -2
  25. package/dist/components/GeometryShape.d.ts.map +1 -1
  26. package/dist/components/GeometryShape.js +71 -10
  27. package/dist/components/LandObject.d.ts.map +1 -1
  28. package/dist/components/LandObject.js +1 -1
  29. package/dist/components/LayoutInstances.d.ts +2 -1
  30. package/dist/components/LayoutInstances.d.ts.map +1 -1
  31. package/dist/components/LayoutInstances.js +39 -6
  32. package/dist/components/LightObject.d.ts.map +1 -1
  33. package/dist/components/LightObject.js +3 -0
  34. package/dist/components/ObjectNode.d.ts.map +1 -1
  35. package/dist/components/ObjectNode.js +62 -13
  36. package/dist/components/OceanBuilder.d.ts +2 -0
  37. package/dist/components/OceanBuilder.d.ts.map +1 -1
  38. package/dist/components/OceanBuilder.js +2 -1
  39. package/dist/components/RenderEffects.d.ts +8 -0
  40. package/dist/components/RenderEffects.d.ts.map +1 -0
  41. package/dist/components/RenderEffects.js +120 -0
  42. package/dist/components/SceneBuilder.d.ts.map +1 -1
  43. package/dist/components/SceneBuilder.js +18 -9
  44. package/dist/components/SportsObject.d.ts +9 -0
  45. package/dist/components/SportsObject.d.ts.map +1 -0
  46. package/dist/components/SportsObject.js +20 -0
  47. package/dist/components/UrbanObject.d.ts +9 -0
  48. package/dist/components/UrbanObject.d.ts.map +1 -0
  49. package/dist/components/UrbanObject.js +28 -0
  50. package/dist/components/VegetationObject.d.ts +9 -0
  51. package/dist/components/VegetationObject.d.ts.map +1 -0
  52. package/dist/components/VegetationObject.js +26 -0
  53. package/dist/components/WaterObject.d.ts +15 -0
  54. package/dist/components/WaterObject.d.ts.map +1 -0
  55. package/dist/components/WaterObject.js +29 -0
  56. package/dist/components/index.d.ts +7 -2
  57. package/dist/components/index.d.ts.map +1 -1
  58. package/dist/components/index.js +6 -1
  59. package/dist/components/land/LandPatch.d.ts +3 -1
  60. package/dist/components/land/LandPatch.d.ts.map +1 -1
  61. package/dist/components/land/LandPatch.js +80 -7
  62. package/dist/components/layout/InstancedLayout.d.ts +19 -0
  63. package/dist/components/layout/InstancedLayout.d.ts.map +1 -0
  64. package/dist/components/layout/InstancedLayout.js +154 -0
  65. package/dist/components/layout/LayoutGrounds.d.ts +19 -0
  66. package/dist/components/layout/LayoutGrounds.d.ts.map +1 -0
  67. package/dist/components/layout/LayoutGrounds.js +104 -0
  68. package/dist/components/layout/LinkProxies.d.ts +5 -0
  69. package/dist/components/layout/LinkProxies.d.ts.map +1 -0
  70. package/dist/components/layout/LinkProxies.js +51 -0
  71. package/dist/components/layout/LinkedSource.d.ts +14 -0
  72. package/dist/components/layout/LinkedSource.d.ts.map +1 -0
  73. package/dist/components/layout/LinkedSource.js +129 -0
  74. package/dist/components/projector/Projector.d.ts +14 -0
  75. package/dist/components/projector/Projector.d.ts.map +1 -0
  76. package/dist/components/projector/Projector.js +44 -0
  77. package/dist/components/projector/index.d.ts +4 -0
  78. package/dist/components/projector/index.d.ts.map +1 -0
  79. package/dist/components/projector/index.js +2 -0
  80. package/dist/components/projector/projectorCore.d.ts +19 -0
  81. package/dist/components/projector/projectorCore.d.ts.map +1 -0
  82. package/dist/components/projector/projectorCore.js +545 -0
  83. package/dist/components/sports/SportsBall.d.ts +9 -0
  84. package/dist/components/sports/SportsBall.d.ts.map +1 -0
  85. package/dist/components/sports/SportsBall.js +23 -0
  86. package/dist/components/sports/SportsCourt.d.ts +9 -0
  87. package/dist/components/sports/SportsCourt.d.ts.map +1 -0
  88. package/dist/components/sports/SportsCourt.js +23 -0
  89. package/dist/components/sports/SportsEquipment.d.ts +9 -0
  90. package/dist/components/sports/SportsEquipment.d.ts.map +1 -0
  91. package/dist/components/sports/SportsEquipment.js +23 -0
  92. package/dist/components/sports/SportsGoal.d.ts +9 -0
  93. package/dist/components/sports/SportsGoal.d.ts.map +1 -0
  94. package/dist/components/sports/SportsGoal.js +23 -0
  95. package/dist/components/sports/core/ball.d.ts +166 -0
  96. package/dist/components/sports/core/ball.d.ts.map +1 -0
  97. package/dist/components/sports/core/ball.js +402 -0
  98. package/dist/components/sports/core/court.d.ts +442 -0
  99. package/dist/components/sports/core/court.d.ts.map +1 -0
  100. package/dist/components/sports/core/court.js +658 -0
  101. package/dist/components/sports/core/equipment.d.ts +103 -0
  102. package/dist/components/sports/core/equipment.d.ts.map +1 -0
  103. package/dist/components/sports/core/equipment.js +403 -0
  104. package/dist/components/sports/core/goal.d.ts +98 -0
  105. package/dist/components/sports/core/goal.d.ts.map +1 -0
  106. package/dist/components/sports/core/goal.js +44 -0
  107. package/dist/components/sports/index.d.ts +11 -0
  108. package/dist/components/sports/index.d.ts.map +1 -0
  109. package/dist/components/sports/index.js +8 -0
  110. package/dist/components/sports/sportsCore.d.ts +195 -0
  111. package/dist/components/sports/sportsCore.d.ts.map +1 -0
  112. package/dist/components/sports/sportsCore.js +758 -0
  113. package/dist/components/sports/useSportsInstance.d.ts +35 -0
  114. package/dist/components/sports/useSportsInstance.d.ts.map +1 -0
  115. package/dist/components/sports/useSportsInstance.js +47 -0
  116. package/dist/components/terrain/TerrainSurface.d.ts.map +1 -1
  117. package/dist/components/terrain/TerrainSurface.js +14 -0
  118. package/dist/components/urban/UrbanBlock.d.ts +9 -0
  119. package/dist/components/urban/UrbanBlock.d.ts.map +1 -0
  120. package/dist/components/urban/UrbanBlock.js +23 -0
  121. package/dist/components/urban/UrbanBuilding.d.ts +9 -0
  122. package/dist/components/urban/UrbanBuilding.d.ts.map +1 -0
  123. package/dist/components/urban/UrbanBuilding.js +23 -0
  124. package/dist/components/urban/UrbanJunction.d.ts +9 -0
  125. package/dist/components/urban/UrbanJunction.d.ts.map +1 -0
  126. package/dist/components/urban/UrbanJunction.js +23 -0
  127. package/dist/components/urban/UrbanPark.d.ts +9 -0
  128. package/dist/components/urban/UrbanPark.d.ts.map +1 -0
  129. package/dist/components/urban/UrbanPark.js +23 -0
  130. package/dist/components/urban/UrbanParkingLot.d.ts +9 -0
  131. package/dist/components/urban/UrbanParkingLot.d.ts.map +1 -0
  132. package/dist/components/urban/UrbanParkingLot.js +23 -0
  133. package/dist/components/urban/UrbanPlaza.d.ts +9 -0
  134. package/dist/components/urban/UrbanPlaza.d.ts.map +1 -0
  135. package/dist/components/urban/UrbanPlaza.js +23 -0
  136. package/dist/components/urban/UrbanRoad.d.ts +9 -0
  137. package/dist/components/urban/UrbanRoad.d.ts.map +1 -0
  138. package/dist/components/urban/UrbanRoad.js +23 -0
  139. package/dist/components/urban/UrbanSignage.d.ts +9 -0
  140. package/dist/components/urban/UrbanSignage.d.ts.map +1 -0
  141. package/dist/components/urban/UrbanSignage.js +23 -0
  142. package/dist/components/urban/UrbanSkyline.d.ts +9 -0
  143. package/dist/components/urban/UrbanSkyline.d.ts.map +1 -0
  144. package/dist/components/urban/UrbanSkyline.js +23 -0
  145. package/dist/components/urban/UrbanStreetFurniture.d.ts +9 -0
  146. package/dist/components/urban/UrbanStreetFurniture.d.ts.map +1 -0
  147. package/dist/components/urban/UrbanStreetFurniture.js +23 -0
  148. package/dist/components/urban/UrbanStreetGrid.d.ts +9 -0
  149. package/dist/components/urban/UrbanStreetGrid.d.ts.map +1 -0
  150. package/dist/components/urban/UrbanStreetGrid.js +34 -0
  151. package/dist/components/urban/UrbanTraffic.d.ts +9 -0
  152. package/dist/components/urban/UrbanTraffic.d.ts.map +1 -0
  153. package/dist/components/urban/UrbanTraffic.js +23 -0
  154. package/dist/components/urban/core/block.d.ts +119 -0
  155. package/dist/components/urban/core/block.d.ts.map +1 -0
  156. package/dist/components/urban/core/block.js +266 -0
  157. package/dist/components/urban/core/building.d.ts +128 -0
  158. package/dist/components/urban/core/building.d.ts.map +1 -0
  159. package/dist/components/urban/core/building.js +741 -0
  160. package/dist/components/urban/core/junction.d.ts +152 -0
  161. package/dist/components/urban/core/junction.d.ts.map +1 -0
  162. package/dist/components/urban/core/junction.js +617 -0
  163. package/dist/components/urban/core/park.d.ts +67 -0
  164. package/dist/components/urban/core/park.d.ts.map +1 -0
  165. package/dist/components/urban/core/park.js +176 -0
  166. package/dist/components/urban/core/parkingLot.d.ts +82 -0
  167. package/dist/components/urban/core/parkingLot.d.ts.map +1 -0
  168. package/dist/components/urban/core/parkingLot.js +284 -0
  169. package/dist/components/urban/core/plaza.d.ts +24 -0
  170. package/dist/components/urban/core/plaza.d.ts.map +1 -0
  171. package/dist/components/urban/core/plaza.js +243 -0
  172. package/dist/components/urban/core/road.d.ts +113 -0
  173. package/dist/components/urban/core/road.d.ts.map +1 -0
  174. package/dist/components/urban/core/road.js +347 -0
  175. package/dist/components/urban/core/signage.d.ts +83 -0
  176. package/dist/components/urban/core/signage.d.ts.map +1 -0
  177. package/dist/components/urban/core/signage.js +209 -0
  178. package/dist/components/urban/core/skyline.d.ts +100 -0
  179. package/dist/components/urban/core/skyline.d.ts.map +1 -0
  180. package/dist/components/urban/core/skyline.js +89 -0
  181. package/dist/components/urban/core/streetFurniture.d.ts +75 -0
  182. package/dist/components/urban/core/streetFurniture.d.ts.map +1 -0
  183. package/dist/components/urban/core/streetFurniture.js +193 -0
  184. package/dist/components/urban/core/streetGrid.d.ts +134 -0
  185. package/dist/components/urban/core/streetGrid.d.ts.map +1 -0
  186. package/dist/components/urban/core/streetGrid.js +422 -0
  187. package/dist/components/urban/core/traffic.d.ts +125 -0
  188. package/dist/components/urban/core/traffic.d.ts.map +1 -0
  189. package/dist/components/urban/core/traffic.js +305 -0
  190. package/dist/components/urban/index.d.ts +29 -0
  191. package/dist/components/urban/index.d.ts.map +1 -0
  192. package/dist/components/urban/index.js +16 -0
  193. package/dist/components/urban/textureSetResolver.d.ts +8 -0
  194. package/dist/components/urban/textureSetResolver.d.ts.map +1 -0
  195. package/dist/components/urban/textureSetResolver.js +16 -0
  196. package/dist/components/urban/urbanCore.d.ts +262 -0
  197. package/dist/components/urban/urbanCore.d.ts.map +1 -0
  198. package/dist/components/urban/urbanCore.js +928 -0
  199. package/dist/components/urban/useUrbanInstance.d.ts +53 -0
  200. package/dist/components/urban/useUrbanInstance.d.ts.map +1 -0
  201. package/dist/components/urban/useUrbanInstance.js +100 -0
  202. package/dist/components/vegetation/VegetationBush.d.ts +9 -0
  203. package/dist/components/vegetation/VegetationBush.d.ts.map +1 -0
  204. package/dist/components/vegetation/VegetationBush.js +23 -0
  205. package/dist/components/vegetation/VegetationCrops.d.ts +9 -0
  206. package/dist/components/vegetation/VegetationCrops.d.ts.map +1 -0
  207. package/dist/components/vegetation/VegetationCrops.js +23 -0
  208. package/dist/components/vegetation/VegetationFlowers.d.ts +9 -0
  209. package/dist/components/vegetation/VegetationFlowers.d.ts.map +1 -0
  210. package/dist/components/vegetation/VegetationFlowers.js +23 -0
  211. package/dist/components/vegetation/VegetationForest.d.ts +9 -0
  212. package/dist/components/vegetation/VegetationForest.d.ts.map +1 -0
  213. package/dist/components/vegetation/VegetationForest.js +23 -0
  214. package/dist/components/vegetation/VegetationFruit.d.ts +9 -0
  215. package/dist/components/vegetation/VegetationFruit.d.ts.map +1 -0
  216. package/dist/components/vegetation/VegetationFruit.js +23 -0
  217. package/dist/components/vegetation/VegetationGrass.d.ts +9 -0
  218. package/dist/components/vegetation/VegetationGrass.d.ts.map +1 -0
  219. package/dist/components/vegetation/VegetationGrass.js +23 -0
  220. package/dist/components/vegetation/VegetationHedge.d.ts +9 -0
  221. package/dist/components/vegetation/VegetationHedge.d.ts.map +1 -0
  222. package/dist/components/vegetation/VegetationHedge.js +23 -0
  223. package/dist/components/vegetation/VegetationIvy.d.ts +9 -0
  224. package/dist/components/vegetation/VegetationIvy.d.ts.map +1 -0
  225. package/dist/components/vegetation/VegetationIvy.js +23 -0
  226. package/dist/components/vegetation/VegetationTree.d.ts +9 -0
  227. package/dist/components/vegetation/VegetationTree.d.ts.map +1 -0
  228. package/dist/components/vegetation/VegetationTree.js +23 -0
  229. package/dist/components/vegetation/VegetationVegetable.d.ts +9 -0
  230. package/dist/components/vegetation/VegetationVegetable.d.ts.map +1 -0
  231. package/dist/components/vegetation/VegetationVegetable.js +23 -0
  232. package/dist/components/vegetation/core/bush.d.ts +1256 -0
  233. package/dist/components/vegetation/core/bush.d.ts.map +1 -0
  234. package/dist/components/vegetation/core/bush.js +376 -0
  235. package/dist/components/vegetation/core/crops.d.ts +1033 -0
  236. package/dist/components/vegetation/core/crops.d.ts.map +1 -0
  237. package/dist/components/vegetation/core/crops.js +378 -0
  238. package/dist/components/vegetation/core/flowers.d.ts +648 -0
  239. package/dist/components/vegetation/core/flowers.d.ts.map +1 -0
  240. package/dist/components/vegetation/core/flowers.js +225 -0
  241. package/dist/components/vegetation/core/forest.d.ts +138 -0
  242. package/dist/components/vegetation/core/forest.d.ts.map +1 -0
  243. package/dist/components/vegetation/core/forest.js +310 -0
  244. package/dist/components/vegetation/core/fruit.d.ts +99 -0
  245. package/dist/components/vegetation/core/fruit.d.ts.map +1 -0
  246. package/dist/components/vegetation/core/fruit.js +77 -0
  247. package/dist/components/vegetation/core/grass.d.ts +103 -0
  248. package/dist/components/vegetation/core/grass.d.ts.map +1 -0
  249. package/dist/components/vegetation/core/grass.js +102 -0
  250. package/dist/components/vegetation/core/hedge.d.ts +193 -0
  251. package/dist/components/vegetation/core/hedge.d.ts.map +1 -0
  252. package/dist/components/vegetation/core/hedge.js +243 -0
  253. package/dist/components/vegetation/core/ivy.d.ts +213 -0
  254. package/dist/components/vegetation/core/ivy.d.ts.map +1 -0
  255. package/dist/components/vegetation/core/ivy.js +173 -0
  256. package/dist/components/vegetation/core/tree.d.ts +1117 -0
  257. package/dist/components/vegetation/core/tree.d.ts.map +1 -0
  258. package/dist/components/vegetation/core/tree.js +408 -0
  259. package/dist/components/vegetation/core/vegetable.d.ts +99 -0
  260. package/dist/components/vegetation/core/vegetable.d.ts.map +1 -0
  261. package/dist/components/vegetation/core/vegetable.js +76 -0
  262. package/dist/components/vegetation/index.d.ts +23 -0
  263. package/dist/components/vegetation/index.d.ts.map +1 -0
  264. package/dist/components/vegetation/index.js +14 -0
  265. package/dist/components/vegetation/produceCore.d.ts +929 -0
  266. package/dist/components/vegetation/produceCore.d.ts.map +1 -0
  267. package/dist/components/vegetation/produceCore.js +723 -0
  268. package/dist/components/vegetation/useVegetationInstance.d.ts +39 -0
  269. package/dist/components/vegetation/useVegetationInstance.d.ts.map +1 -0
  270. package/dist/components/vegetation/useVegetationInstance.js +45 -0
  271. package/dist/components/vegetation/vegetationCore.d.ts +412 -0
  272. package/dist/components/vegetation/vegetationCore.d.ts.map +1 -0
  273. package/dist/components/vegetation/vegetationCore.js +1728 -0
  274. package/dist/components/volumetricClouds/VolumetricCloudsPass.d.ts +5 -0
  275. package/dist/components/volumetricClouds/VolumetricCloudsPass.d.ts.map +1 -1
  276. package/dist/components/volumetricClouds/VolumetricCloudsPass.js +39 -13
  277. package/dist/components/water/OceanSurface.d.ts.map +1 -1
  278. package/dist/components/water/OceanSurface.js +3 -2
  279. package/dist/components/water/WaterBody.d.ts.map +1 -1
  280. package/dist/components/water/WaterBody.js +31 -10
  281. package/dist/components/water/WaterFountain.d.ts +9 -0
  282. package/dist/components/water/WaterFountain.d.ts.map +1 -0
  283. package/dist/components/water/WaterFountain.js +24 -0
  284. package/dist/components/water/WaterStream.d.ts +9 -0
  285. package/dist/components/water/WaterStream.d.ts.map +1 -0
  286. package/dist/components/water/WaterStream.js +24 -0
  287. package/dist/components/water/WaterWaterfall.d.ts +9 -0
  288. package/dist/components/water/WaterWaterfall.d.ts.map +1 -0
  289. package/dist/components/water/WaterWaterfall.js +24 -0
  290. package/dist/components/water/core/fountain.d.ts +70 -0
  291. package/dist/components/water/core/fountain.d.ts.map +1 -0
  292. package/dist/components/water/core/fountain.js +619 -0
  293. package/dist/components/water/core/stream.d.ts +72 -0
  294. package/dist/components/water/core/stream.d.ts.map +1 -0
  295. package/dist/components/water/core/stream.js +167 -0
  296. package/dist/components/water/core/waterfall.d.ts +78 -0
  297. package/dist/components/water/core/waterfall.d.ts.map +1 -0
  298. package/dist/components/water/core/waterfall.js +325 -0
  299. package/dist/components/water/index.d.ts +8 -0
  300. package/dist/components/water/index.d.ts.map +1 -1
  301. package/dist/components/water/index.js +7 -0
  302. package/dist/components/water/types.d.ts +3 -0
  303. package/dist/components/water/types.d.ts.map +1 -1
  304. package/dist/components/water/useWaterInstance.d.ts +43 -0
  305. package/dist/components/water/useWaterInstance.d.ts.map +1 -0
  306. package/dist/components/water/useWaterInstance.js +89 -0
  307. package/dist/components/water/waterCore.d.ts +179 -0
  308. package/dist/components/water/waterCore.d.ts.map +1 -0
  309. package/dist/components/water/waterCore.js +516 -0
  310. package/dist/constants.d.ts.map +1 -1
  311. package/dist/constants.js +9 -1
  312. package/dist/hooks/index.d.ts +7 -2
  313. package/dist/hooks/index.d.ts.map +1 -1
  314. package/dist/hooks/index.js +5 -2
  315. package/dist/hooks/useActionPatch.d.ts +23 -0
  316. package/dist/hooks/useActionPatch.d.ts.map +1 -0
  317. package/dist/hooks/useActionPatch.js +38 -0
  318. package/dist/hooks/useCloudSun.d.ts.map +1 -1
  319. package/dist/hooks/useCloudSun.js +3 -2
  320. package/dist/hooks/useCommittedInstance.d.ts +6 -0
  321. package/dist/hooks/useCommittedInstance.d.ts.map +1 -0
  322. package/dist/hooks/useCommittedInstance.js +42 -0
  323. package/dist/hooks/useConfigLive.d.ts +1 -1
  324. package/dist/hooks/useConfigLive.d.ts.map +1 -1
  325. package/dist/hooks/useContinuousEffects.d.ts.map +1 -1
  326. package/dist/hooks/useContinuousEffects.js +36 -20
  327. package/dist/hooks/useGridLayout.d.ts +7 -0
  328. package/dist/hooks/useGridLayout.d.ts.map +1 -0
  329. package/dist/hooks/useGridLayout.js +10 -0
  330. package/dist/hooks/useInteractionEffects.d.ts.map +1 -1
  331. package/dist/hooks/useInteractionEffects.js +48 -9
  332. package/dist/hooks/useLightLive.d.ts.map +1 -1
  333. package/dist/hooks/useLightLive.js +2 -0
  334. package/dist/hooks/useLinkStatus.d.ts +7 -0
  335. package/dist/hooks/useLinkStatus.d.ts.map +1 -0
  336. package/dist/hooks/useLinkStatus.js +20 -0
  337. package/dist/hooks/useMaterialApplication.d.ts +6 -1
  338. package/dist/hooks/useMaterialApplication.d.ts.map +1 -1
  339. package/dist/hooks/useMaterialApplication.js +7 -2
  340. package/dist/hooks/useOceanMaterial.d.ts +11 -1
  341. package/dist/hooks/useOceanMaterial.d.ts.map +1 -1
  342. package/dist/hooks/useOceanMaterial.js +185 -27
  343. package/dist/hooks/usePathAnimation.d.ts +8 -0
  344. package/dist/hooks/usePathAnimation.d.ts.map +1 -1
  345. package/dist/hooks/usePathAnimation.js +140 -59
  346. package/dist/hooks/useResolvedLayout.d.ts +10 -0
  347. package/dist/hooks/useResolvedLayout.d.ts.map +1 -0
  348. package/dist/hooks/useResolvedLayout.js +17 -0
  349. package/dist/hooks/useTimeLighting.d.ts +36 -0
  350. package/dist/hooks/useTimeLighting.d.ts.map +1 -0
  351. package/dist/hooks/useTimeLighting.js +67 -0
  352. package/dist/index.d.ts +4 -0
  353. package/dist/index.d.ts.map +1 -1
  354. package/dist/index.js +4 -0
  355. package/dist/operations/catalogue/shaderLayers.d.ts.map +1 -1
  356. package/dist/operations/catalogue/shaderLayers.js +26 -3
  357. package/dist/render/renderLive.d.ts +11 -0
  358. package/dist/render/renderLive.d.ts.map +1 -0
  359. package/dist/render/renderLive.js +57 -0
  360. package/dist/shaders/glsl/oceanCore.glsl.d.ts +2 -2
  361. package/dist/shaders/glsl/oceanCore.glsl.d.ts.map +1 -1
  362. package/dist/shaders/glsl/oceanCore.glsl.js +35 -5
  363. package/dist/shaders/ocean/OceanSurfaceMaterial.d.ts +12 -0
  364. package/dist/shaders/ocean/OceanSurfaceMaterial.d.ts.map +1 -1
  365. package/dist/shaders/ocean/OceanSurfaceMaterial.js +55 -7
  366. package/dist/shaders/terrain/TerrainMaterial.d.ts.map +1 -1
  367. package/dist/shaders/terrain/TerrainMaterial.js +28 -0
  368. package/dist/triggers/kinds/change.js +1 -1
  369. package/dist/ui/UiLayers.d.ts +17 -1
  370. package/dist/ui/UiLayers.d.ts.map +1 -1
  371. package/dist/ui/UiLayers.js +76 -3
  372. package/dist/ui/index.d.ts +2 -2
  373. package/dist/ui/index.d.ts.map +1 -1
  374. package/dist/ui/index.js +1 -1
  375. package/dist/utils/composerHostedPass.d.ts +74 -0
  376. package/dist/utils/composerHostedPass.d.ts.map +1 -0
  377. package/dist/utils/composerHostedPass.js +63 -0
  378. package/dist/utils/geometryScript.d.ts +17 -0
  379. package/dist/utils/geometryScript.d.ts.map +1 -0
  380. package/dist/utils/geometryScript.js +92 -0
  381. package/dist/utils/geometryScript.worker.d.ts +2 -0
  382. package/dist/utils/geometryScript.worker.d.ts.map +1 -0
  383. package/dist/utils/geometryScript.worker.js +42 -0
  384. package/dist/utils/groundRegistry.d.ts +11 -0
  385. package/dist/utils/groundRegistry.d.ts.map +1 -0
  386. package/dist/utils/groundRegistry.js +39 -0
  387. package/dist/utils/instancingSupport.d.ts +9 -0
  388. package/dist/utils/instancingSupport.d.ts.map +1 -0
  389. package/dist/utils/instancingSupport.js +13 -0
  390. package/dist/utils/landPatch.d.ts +26 -5
  391. package/dist/utils/landPatch.d.ts.map +1 -1
  392. package/dist/utils/landPatch.js +124 -9
  393. package/dist/utils/layoutPlacement.d.ts +30 -0
  394. package/dist/utils/layoutPlacement.d.ts.map +1 -0
  395. package/dist/utils/layoutPlacement.js +113 -0
  396. package/dist/utils/linkRegistry.d.ts +15 -0
  397. package/dist/utils/linkRegistry.d.ts.map +1 -0
  398. package/dist/utils/linkRegistry.js +11 -0
  399. package/dist/utils/shapes.d.ts +28 -2
  400. package/dist/utils/shapes.d.ts.map +1 -1
  401. package/dist/utils/shapes.js +32 -3
  402. package/dist/utils/sharedParts.d.ts +61 -0
  403. package/dist/utils/sharedParts.d.ts.map +1 -0
  404. package/dist/utils/sharedParts.js +268 -0
  405. package/dist/utils/svgAsset.d.ts +6 -0
  406. package/dist/utils/svgAsset.d.ts.map +1 -0
  407. package/dist/utils/svgAsset.js +46 -0
  408. package/dist/utils/waterLight.d.ts +29 -0
  409. package/dist/utils/waterLight.d.ts.map +1 -0
  410. package/dist/utils/waterLight.js +67 -0
  411. package/dist/utils/waterReflection.d.ts +185 -0
  412. package/dist/utils/waterReflection.d.ts.map +1 -0
  413. package/dist/utils/waterReflection.js +616 -0
  414. 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;AAKvE,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;;;;;;;;;;;;;;;;;;;;GAoBG;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,CAqW7D,CAAC;AAEF,eAAe,oBAAoB,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
- gl.setRenderTarget(sceneRT);
218
- // No sky pass. SkyController / Skybox already drew the background into this
219
- // target; the clouds only borrow the atmosphere function for ambient and
220
- // aerial perspective, so a second sky would just fight the first.
221
- gl.render(scene, camera);
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 = sceneRT.depthTexture;
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 = sceneRT.texture;
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 = sceneRT.depthTexture;
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
- c.u_tonemap.value = quality.tonemap ? 1 : 0;
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,CA+D3C,CAAC;AAEF,eAAe,YAAY,CAAC"}
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,CA0ExC,CAAC;AAEF,eAAe,SAAS,CAAC"}
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, Math.max(width, depth) / 1000),
39
- }), [config, width, depth]);
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 segments = Math.max(4, Math.min(Math.round(config.segments), 1024));
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
- const cell = Math.max(width, depth) / segments;
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, config.segments]);
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: 'ocean', config, quality }, onObjectReady, onObjectDispose);
76
- return (_jsx("group", { ref: rootRef, position: meshSettings?.position ?? [0, config.seaLevel, 0], rotation: meshSettings?.rotation ?? [0, 0, 0], scale: meshSettings?.scale ?? [1, 1, 1], visible: meshSettings ? meshSettings.visible !== false : true, children: _jsx("mesh", { geometry: geometry, material: material, receiveShadow: quality.receiveShadows }) }));
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"}