@3driseai/3drise-viewer 0.1.42 → 0.1.44

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 (408) 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/utils/composerHostedPass.d.ts +74 -0
  370. package/dist/utils/composerHostedPass.d.ts.map +1 -0
  371. package/dist/utils/composerHostedPass.js +63 -0
  372. package/dist/utils/geometryScript.d.ts +17 -0
  373. package/dist/utils/geometryScript.d.ts.map +1 -0
  374. package/dist/utils/geometryScript.js +92 -0
  375. package/dist/utils/geometryScript.worker.d.ts +2 -0
  376. package/dist/utils/geometryScript.worker.d.ts.map +1 -0
  377. package/dist/utils/geometryScript.worker.js +42 -0
  378. package/dist/utils/groundRegistry.d.ts +11 -0
  379. package/dist/utils/groundRegistry.d.ts.map +1 -0
  380. package/dist/utils/groundRegistry.js +39 -0
  381. package/dist/utils/instancingSupport.d.ts +9 -0
  382. package/dist/utils/instancingSupport.d.ts.map +1 -0
  383. package/dist/utils/instancingSupport.js +13 -0
  384. package/dist/utils/landPatch.d.ts +26 -5
  385. package/dist/utils/landPatch.d.ts.map +1 -1
  386. package/dist/utils/landPatch.js +124 -9
  387. package/dist/utils/layoutPlacement.d.ts +30 -0
  388. package/dist/utils/layoutPlacement.d.ts.map +1 -0
  389. package/dist/utils/layoutPlacement.js +113 -0
  390. package/dist/utils/linkRegistry.d.ts +15 -0
  391. package/dist/utils/linkRegistry.d.ts.map +1 -0
  392. package/dist/utils/linkRegistry.js +11 -0
  393. package/dist/utils/shapes.d.ts +28 -2
  394. package/dist/utils/shapes.d.ts.map +1 -1
  395. package/dist/utils/shapes.js +32 -3
  396. package/dist/utils/sharedParts.d.ts +61 -0
  397. package/dist/utils/sharedParts.d.ts.map +1 -0
  398. package/dist/utils/sharedParts.js +268 -0
  399. package/dist/utils/svgAsset.d.ts +6 -0
  400. package/dist/utils/svgAsset.d.ts.map +1 -0
  401. package/dist/utils/svgAsset.js +46 -0
  402. package/dist/utils/waterLight.d.ts +29 -0
  403. package/dist/utils/waterLight.d.ts.map +1 -0
  404. package/dist/utils/waterLight.js +67 -0
  405. package/dist/utils/waterReflection.d.ts +185 -0
  406. package/dist/utils/waterReflection.d.ts.map +1 -0
  407. package/dist/utils/waterReflection.js +616 -0
  408. package/package.json +6 -4
@@ -0,0 +1,35 @@
1
+ import { type RefObject } from 'react';
2
+ import * as THREE from 'three';
3
+ import type { AnimationOptions, MouseMoveDomain } from '@3driseai/3drise-core';
4
+ import { type TimeLit } from '../../hooks/useTimeLighting';
5
+ import type { ObjectReadyProps } from '../../types/objectReady';
6
+ export interface SportsInstance extends TimeLit {
7
+ object: THREE.Object3D;
8
+ materials: THREE.Material[];
9
+ apply(cfg: Record<string, unknown>): void;
10
+ update(dt: number): void;
11
+ dispose(): void;
12
+ }
13
+ export interface SportsVariantProps extends ObjectReadyProps {
14
+ config: {
15
+ type: string;
16
+ };
17
+ /** Scene object id: the live-edit handle is found by it. */
18
+ id?: string;
19
+ /** Keyframes on the config knobs (animations.sports.animations). */
20
+ keyframes?: AnimationOptions[];
21
+ /** Pointer bindings on the config knobs (mouseMove.sports). */
22
+ mouseMove?: MouseMoveDomain;
23
+ }
24
+ export interface SportsCore {
25
+ DEFAULTS: Record<string, unknown>;
26
+ STRUCTURAL: readonly string[];
27
+ ANIMATABLE: ReadonlySet<string>;
28
+ createUniforms(): Record<string, any>;
29
+ build(u: Record<string, any>, cfg: Record<string, unknown>): SportsInstance;
30
+ }
31
+ export declare function useSportsInstance(core: SportsCore, props: SportsVariantProps): {
32
+ rootRef: RefObject<THREE.Group | null>;
33
+ instance: SportsInstance;
34
+ };
35
+ //# sourceMappingURL=useSportsInstance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSportsInstance.d.ts","sourceRoot":"","sources":["../../../src/components/sports/useSportsInstance.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAiD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACtF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAK/E,OAAO,EAAmB,KAAK,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,MAAM,WAAW,cAAe,SAAQ,OAAO;IAC3C,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC;IACvB,SAAS,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC5B,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC1C,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,IAAI,IAAI,CAAC;CACnB;AAED,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IACxD,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACzB,4DAA4D;IAC5D,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,oEAAoE;IACpE,SAAS,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC/B,+DAA+D;IAC/D,SAAS,CAAC,EAAE,eAAe,CAAC;CAC/B;AAED,MAAM,WAAW,UAAU;IACvB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAChC,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACtC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,cAAc,CAAC;CAC/E;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,kBAAkB,GAAG;IAAE,OAAO,EAAE,SAAS,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;IAAC,QAAQ,EAAE,cAAc,CAAA;CAAE,CAuBnJ"}
@@ -0,0 +1,47 @@
1
+ // =============================================================================
2
+ // useSportsInstance — the React side every sports component shares
3
+ // =============================================================================
4
+ //
5
+ // A variant's core (sports/core/<key>.ts, emitted from the lab module) is plain three.js:
6
+ // createUniforms(), build(u, cfg) -> { object, materials, apply, update, dispose, and for the
7
+ // time-lit variants uniformSets + bounds }. This hook wires it into the config pattern and the
8
+ // app's shared services, the same ones the urban family uses:
9
+ //
10
+ // - base config over the type's defaults (withConfigDefaults);
11
+ // - built once; a change of a STRUCTURAL knob builds a new instance (the uniforms outlive
12
+ // it); every other committed change and every per-frame override goes through
13
+ // instance.apply (the one door: live drag, keyframes, pointer bindings, timeline clips —
14
+ // useConfigDriver);
15
+ // - the time of day (useTimeLighting — the app's one pattern for TimeControls-lit objects,
16
+ // shared with urban roads and buildings): the scene sun on the instance's uniform sets with
17
+ // the object's `lighting` override (auto | day | night), and the lamp list — a court's
18
+ // surface gathers the lamps that reach it (its own floodlights, its neighbours', street
19
+ // lamps) whenever the list changes or the court moves;
20
+ // - readiness (useObjectReady) and StrictMode-safe disposal (useCommittedInstance: a dev
21
+ // double mount must not unregister the floodlights of the court on screen).
22
+ //
23
+ import { useCallback, useLayoutEffect, useMemo, useRef } from 'react';
24
+ import { withConfigDefaults } from '../../utils/configAnimations.js';
25
+ import { useObjectReady } from '../../hooks/useObjectReady.js';
26
+ import { useConfigDriver } from '../../hooks/useConfigDriver.js';
27
+ import { useCommittedInstance } from '../../hooks/useCommittedInstance.js';
28
+ import { useTimeLighting } from '../../hooks/useTimeLighting.js';
29
+ export function useSportsInstance(core, props) {
30
+ const { config, id, keyframes, mouseMove, onObjectReady, onObjectDispose } = props;
31
+ const rootRef = useRef(null);
32
+ useObjectReady(rootRef, config, onObjectReady, onObjectDispose);
33
+ const cfg = useMemo(() => withConfigDefaults(core.DEFAULTS, config), [config]); // eslint-disable-line react-hooks/exhaustive-deps
34
+ // uniforms outlive rebuilds
35
+ const uniforms = useMemo(() => core.createUniforms(), []); // eslint-disable-line react-hooks/exhaustive-deps
36
+ const structuralKey = JSON.stringify(core.STRUCTURAL.map((k) => cfg[k]));
37
+ const instance = useCommittedInstance(() => core.build(uniforms, cfg), [uniforms, structuralKey]);
38
+ const push = useCallback((merged) => { instance.apply(merged); }, [instance]);
39
+ useConfigDriver({ rootRef, id, family: 'sports', base: cfg, structural: core.STRUCTURAL, allowed: core.ANIMATABLE, keyframes, mouseMove, push });
40
+ // The time of day (TimeControls) and the lamp list: the shared pattern, as urban.
41
+ const { relight } = useTimeLighting({
42
+ rootRef, instance, lighting: cfg.lighting || 'auto',
43
+ update: (dt) => instance.update(dt),
44
+ });
45
+ useLayoutEffect(() => { instance.apply(cfg); relight(); }, [instance, cfg, relight]);
46
+ return { rootRef, instance };
47
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"TerrainSurface.d.ts","sourceRoot":"","sources":["../../../src/components/terrain/TerrainSurface.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAkB1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAkBjD;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA6I/C,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"TerrainSurface.d.ts","sourceRoot":"","sources":["../../../src/components/terrain/TerrainSurface.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAkB1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAoBjD;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA0J/C,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -13,6 +13,8 @@ import { getAnimatableProperties } from '@3driseai/3drise-core';
13
13
  import { applyConfigKeyframeAnimations, applyConfigMouseMove, } from '../../utils/configAnimations.js';
14
14
  import { TERRAIN_DRAW_ORDER, ringDrawOrder } from '../../utils/environmentDrawOrder.js';
15
15
  import { isMobileDevice } from '../../utils/deviceTier.js';
16
+ import { registerGround, bumpGround, heightSignature } from '../../utils/groundRegistry.js';
17
+ import { terrainHeightAt } from '../../utils/terrainHeight.js';
16
18
  /**
17
19
  * Phone / tablet tier, applied at render time only — the saved scene keeps its
18
20
  * numbers, so the same project is full quality on a desktop. Measured on the
@@ -92,6 +94,13 @@ const TerrainSurface = ({ id = '3drise-terrain', config, quality, skySettings, t
92
94
  return () => { delete root.userData[TERRAIN_LIVE_KEY]; };
93
95
  }, [id, liveHandle]);
94
96
  useObjectReady(rootRef, { id, type: 'terrain', config, quality }, onObjectReady, onObjectDispose);
97
+ // The ground for layouts with onGround (groundRegistry): the config this frame draws,
98
+ // so a keyframed or dragged shape knob moves the copies with it.
99
+ const groundCfg = useRef(null);
100
+ useEffect(() => registerGround(id, (x, z) => {
101
+ const g = groundCfg.current;
102
+ return g ? terrainHeightAt(g.cfg, x, z, g.cell) : null;
103
+ }), [id]);
95
104
  useFrame((state) => {
96
105
  const camera = state.camera;
97
106
  updateSun();
@@ -112,6 +121,11 @@ const TerrainSurface = ({ id = '3drise-terrain', config, quality, skySettings, t
112
121
  cfg.textureDistance = Math.min(cfg.textureDistance ?? 4000, MOBILE.maxTextureDistance);
113
122
  }
114
123
  const qual = { ...quality, ...liveQuality.current };
124
+ const sig = heightSignature(cfg, String(qual.cellSize));
125
+ if (groundCfg.current?.sig !== sig) {
126
+ groundCfg.current = { cfg, cell: qual.cellSize ?? 2, sig };
127
+ bumpGround();
128
+ }
115
129
  applyTerrainUniforms(material, cfg, qual);
116
130
  applyTerrainTextures(material, cfg, textures);
117
131
  // ONE origin for the whole pyramid, snapped to twice the finest cell.
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { BlockUrbanConfig } from '@3driseai/3drise-core';
3
+ import type { UrbanVariantProps } from './useUrbanInstance';
4
+ export interface UrbanBlockProps extends UrbanVariantProps {
5
+ config: BlockUrbanConfig;
6
+ }
7
+ declare const UrbanBlock: React.FC<UrbanBlockProps>;
8
+ export default UrbanBlock;
9
+ //# sourceMappingURL=UrbanBlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UrbanBlock.d.ts","sourceRoot":"","sources":["../../../src/components/urban/UrbanBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,KAAK,EAAa,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAmBvE,MAAM,WAAW,eAAgB,SAAQ,iBAAiB;IACtD,MAAM,EAAE,gBAAgB,CAAC;CAC5B;AAED,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAOzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { DEFAULT_URBAN_OBJECTS, URBAN_OBJECTS_ANIMATABLE } from '@3driseai/3drise-core';
3
+ import { useUrbanInstance } from './useUrbanInstance.js';
4
+ import { createUniforms, build, STRUCTURAL } from './core/block.js';
5
+ // =============================================================================
6
+ // UrbanBlock — City Block (type 'urban', config.type 'block')
7
+ // =============================================================================
8
+ // A grid of parametric buildings on a paved or lawn plot, with its own small lit streets through the middle (a cross or one way), drawn from a city mix (downtown, residential, old town, industrial, suburb) or the block's own knobs with jittered footprints, heights, facades and tints, as one instanced mesh with emissive windows at night. Use for filling a city around a hero model in a few clicks.
9
+ // The construction lives in core/block.ts (emitted from the lab); this component wires it
10
+ // into the config pattern, the scene sun and the lamp list through useUrbanInstance.
11
+ const CORE = {
12
+ DEFAULTS: DEFAULT_URBAN_OBJECTS.block,
13
+ STRUCTURAL,
14
+ /** Knobs a keyframe or pointer binding may drive per frame — exactly what the push applies. */
15
+ ANIMATABLE: new Set(URBAN_OBJECTS_ANIMATABLE.block.map((p) => p.value)),
16
+ createUniforms,
17
+ build,
18
+ };
19
+ const UrbanBlock = (props) => {
20
+ const { rootRef, instance } = useUrbanInstance(CORE, props);
21
+ return (_jsx("group", { ref: rootRef, children: _jsx("primitive", { object: instance.object }) }));
22
+ };
23
+ export default UrbanBlock;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { BuildingUrbanConfig } from '@3driseai/3drise-core';
3
+ import type { UrbanVariantProps } from './useUrbanInstance';
4
+ export interface UrbanBuildingProps extends UrbanVariantProps {
5
+ config: BuildingUrbanConfig;
6
+ }
7
+ declare const UrbanBuilding: React.FC<UrbanBuildingProps>;
8
+ export default UrbanBuilding;
9
+ //# sourceMappingURL=UrbanBuilding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UrbanBuilding.d.ts","sourceRoot":"","sources":["../../../src/components/urban/UrbanBuilding.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;AAmBvE,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,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { DEFAULT_URBAN_OBJECTS, URBAN_OBJECTS_ANIMATABLE } from '@3driseai/3drise-core';
3
+ import { useUrbanInstance } from './useUrbanInstance.js';
4
+ import { createUniforms, build, STRUCTURAL } from './core/building.js';
5
+ // =============================================================================
6
+ // UrbanBuilding — Building (type 'urban', config.type 'building')
7
+ // =============================================================================
8
+ // A parametric building: nine footprints (box, L, U, courtyard, stepped, slab, podium tower, twin towers, cylinder), eight shader facades (curtain wall, punched, ribbon, brick, balconies, concrete panel, glass fins, industrial) and nine roofs (flat to pitched, hip, mansard, helipad, crown, green), with emissive rooms at night. Use for city context around a hero model.
9
+ // The construction lives in core/building.ts (emitted from the lab); this component wires it
10
+ // into the config pattern, the scene sun and the lamp list through useUrbanInstance.
11
+ const CORE = {
12
+ DEFAULTS: DEFAULT_URBAN_OBJECTS.building,
13
+ STRUCTURAL,
14
+ /** Knobs a keyframe or pointer binding may drive per frame — exactly what the push applies. */
15
+ ANIMATABLE: new Set(URBAN_OBJECTS_ANIMATABLE.building.map((p) => p.value)),
16
+ createUniforms,
17
+ build,
18
+ };
19
+ const UrbanBuilding = (props) => {
20
+ const { rootRef, instance } = useUrbanInstance(CORE, props);
21
+ return (_jsx("group", { ref: rootRef, children: _jsx("primitive", { object: instance.object }) }));
22
+ };
23
+ export default UrbanBuilding;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { JunctionUrbanConfig } from '@3driseai/3drise-core';
3
+ import type { UrbanVariantProps } from './useUrbanInstance';
4
+ export interface UrbanJunctionProps extends UrbanVariantProps {
5
+ config: JunctionUrbanConfig;
6
+ }
7
+ declare const UrbanJunction: React.FC<UrbanJunctionProps>;
8
+ export default UrbanJunction;
9
+ //# sourceMappingURL=UrbanJunction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UrbanJunction.d.ts","sourceRoot":"","sources":["../../../src/components/urban/UrbanJunction.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;AAmBvE,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,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { DEFAULT_URBAN_OBJECTS, URBAN_OBJECTS_ANIMATABLE } from '@3driseai/3drise-core';
3
+ import { useUrbanInstance } from './useUrbanInstance.js';
4
+ import { createUniforms, build, STRUCTURAL } from './core/junction.js';
5
+ // =============================================================================
6
+ // UrbanJunction — Junction (type 'urban', config.type 'junction')
7
+ // =============================================================================
8
+ // A road intersection, cross, T or roundabout, with rounded kerb corners, lane markings, stop lines and zebra crossings on each arm, cycling traffic signals and a street lamp on each corner that lights the crossing at night; roads of the same width end at its arms. Use for where the streets of a city block meet.
9
+ // The construction lives in core/junction.ts (emitted from the lab); this component wires it
10
+ // into the config pattern, the scene sun and the lamp list through useUrbanInstance.
11
+ const CORE = {
12
+ DEFAULTS: DEFAULT_URBAN_OBJECTS.junction,
13
+ STRUCTURAL,
14
+ /** Knobs a keyframe or pointer binding may drive per frame — exactly what the push applies. */
15
+ ANIMATABLE: new Set(URBAN_OBJECTS_ANIMATABLE.junction.map((p) => p.value)),
16
+ createUniforms,
17
+ build,
18
+ };
19
+ const UrbanJunction = (props) => {
20
+ const { rootRef, instance } = useUrbanInstance(CORE, props);
21
+ return (_jsx("group", { ref: rootRef, children: _jsx("primitive", { object: instance.object }) }));
22
+ };
23
+ export default UrbanJunction;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { ParkUrbanConfig } from '@3driseai/3drise-core';
3
+ import type { UrbanVariantProps } from './useUrbanInstance';
4
+ export interface UrbanParkProps extends UrbanVariantProps {
5
+ config: ParkUrbanConfig;
6
+ }
7
+ declare const UrbanPark: React.FC<UrbanParkProps>;
8
+ export default UrbanPark;
9
+ //# sourceMappingURL=UrbanPark.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UrbanPark.d.ts","sourceRoot":"","sources":["../../../src/components/urban/UrbanPark.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAAa,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAmBvE,MAAM,WAAW,cAAe,SAAQ,iBAAiB;IACrD,MAAM,EAAE,eAAe,CAAC;CAC3B;AAED,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAOvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { DEFAULT_URBAN_OBJECTS, URBAN_OBJECTS_ANIMATABLE } from '@3driseai/3drise-core';
3
+ import { useUrbanInstance } from './useUrbanInstance.js';
4
+ import { createUniforms, build, STRUCTURAL } from './core/park.js';
5
+ // =============================================================================
6
+ // UrbanPark — Park (type 'urban', config.type 'park')
7
+ // =============================================================================
8
+ // A lawn inside a polygon with a looping paved path, an optional cross path, a kerb and short park lamps that light it at night; add trees and benches with the vegetation and street furniture objects. Use for the green between city blocks or a square in front of a hero building.
9
+ // The construction lives in core/park.ts (emitted from the lab); this component wires it
10
+ // into the config pattern, the scene sun and the lamp list through useUrbanInstance.
11
+ const CORE = {
12
+ DEFAULTS: DEFAULT_URBAN_OBJECTS.park,
13
+ STRUCTURAL,
14
+ /** Knobs a keyframe or pointer binding may drive per frame — exactly what the push applies. */
15
+ ANIMATABLE: new Set(URBAN_OBJECTS_ANIMATABLE.park.map((p) => p.value)),
16
+ createUniforms,
17
+ build,
18
+ };
19
+ const UrbanPark = (props) => {
20
+ const { rootRef, instance } = useUrbanInstance(CORE, props);
21
+ return (_jsx("group", { ref: rootRef, children: _jsx("primitive", { object: instance.object }) }));
22
+ };
23
+ export default UrbanPark;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { ParkingLotUrbanConfig } from '@3driseai/3drise-core';
3
+ import type { UrbanVariantProps } from './useUrbanInstance';
4
+ export interface UrbanParkingLotProps extends UrbanVariantProps {
5
+ config: ParkingLotUrbanConfig;
6
+ }
7
+ declare const UrbanParkingLot: React.FC<UrbanParkingLotProps>;
8
+ export default UrbanParkingLot;
9
+ //# sourceMappingURL=UrbanParkingLot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UrbanParkingLot.d.ts","sourceRoot":"","sources":["../../../src/components/urban/UrbanParkingLot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE,OAAO,KAAK,EAAa,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAmBvE,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC3D,MAAM,EAAE,qBAAqB,CAAC;CACjC;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAOnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { DEFAULT_URBAN_OBJECTS, URBAN_OBJECTS_ANIMATABLE } from '@3driseai/3drise-core';
3
+ import { useUrbanInstance } from './useUrbanInstance.js';
4
+ import { createUniforms, build, STRUCTURAL } from './core/parkingLot.js';
5
+ // =============================================================================
6
+ // UrbanParkingLot — Parking Lot (type 'urban', config.type 'parkingLot')
7
+ // =============================================================================
8
+ // A surface car park: marked bays around aisles on asphalt from the texture library, a kerb, tall lamps that light it at night and a crowd of low-poly parked cars at a set occupancy, all instanced. Use for the ground around offices, malls and stations in a city scene.
9
+ // The construction lives in core/parkingLot.ts (emitted from the lab); this component wires it
10
+ // into the config pattern, the scene sun and the lamp list through useUrbanInstance.
11
+ const CORE = {
12
+ DEFAULTS: DEFAULT_URBAN_OBJECTS.parkingLot,
13
+ STRUCTURAL,
14
+ /** Knobs a keyframe or pointer binding may drive per frame — exactly what the push applies. */
15
+ ANIMATABLE: new Set(URBAN_OBJECTS_ANIMATABLE.parkingLot.map((p) => p.value)),
16
+ createUniforms,
17
+ build,
18
+ };
19
+ const UrbanParkingLot = (props) => {
20
+ const { rootRef, instance } = useUrbanInstance(CORE, props);
21
+ return (_jsx("group", { ref: rootRef, children: _jsx("primitive", { object: instance.object }) }));
22
+ };
23
+ export default UrbanParkingLot;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { PlazaUrbanConfig } from '@3driseai/3drise-core';
3
+ import type { UrbanVariantProps } from './useUrbanInstance';
4
+ export interface UrbanPlazaProps extends UrbanVariantProps {
5
+ config: PlazaUrbanConfig;
6
+ }
7
+ declare const UrbanPlaza: React.FC<UrbanPlazaProps>;
8
+ export default UrbanPlaza;
9
+ //# sourceMappingURL=UrbanPlaza.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UrbanPlaza.d.ts","sourceRoot":"","sources":["../../../src/components/urban/UrbanPlaza.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,KAAK,EAAa,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAmBvE,MAAM,WAAW,eAAgB,SAAQ,iBAAiB;IACtD,MAAM,EAAE,gBAAgB,CAAC;CAC5B;AAED,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAOzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { DEFAULT_URBAN_OBJECTS, URBAN_OBJECTS_ANIMATABLE } from '@3driseai/3drise-core';
3
+ import { useUrbanInstance } from './useUrbanInstance.js';
4
+ import { createUniforms, build, STRUCTURAL } from './core/plaza.js';
5
+ // =============================================================================
6
+ // UrbanPlaza — Plaza (type 'urban', config.type 'plaza')
7
+ // =============================================================================
8
+ // A paved area inside a polygon: a library paving set with a second set laid in a grid, stripe, ring or checker pattern in metres, a kerb around the edge, lit by the street lamps at night. Use for a hero building's forecourt, a square or a courtyard.
9
+ // The construction lives in core/plaza.ts (emitted from the lab); this component wires it
10
+ // into the config pattern, the scene sun and the lamp list through useUrbanInstance.
11
+ const CORE = {
12
+ DEFAULTS: DEFAULT_URBAN_OBJECTS.plaza,
13
+ STRUCTURAL,
14
+ /** Knobs a keyframe or pointer binding may drive per frame — exactly what the push applies. */
15
+ ANIMATABLE: new Set(URBAN_OBJECTS_ANIMATABLE.plaza.map((p) => p.value)),
16
+ createUniforms,
17
+ build,
18
+ };
19
+ const UrbanPlaza = (props) => {
20
+ const { rootRef, instance } = useUrbanInstance(CORE, props);
21
+ return (_jsx("group", { ref: rootRef, children: _jsx("primitive", { object: instance.object }) }));
22
+ };
23
+ export default UrbanPlaza;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { RoadUrbanConfig } from '@3driseai/3drise-core';
3
+ import type { UrbanVariantProps } from './useUrbanInstance';
4
+ export interface UrbanRoadProps extends UrbanVariantProps {
5
+ config: RoadUrbanConfig;
6
+ }
7
+ declare const UrbanRoad: React.FC<UrbanRoadProps>;
8
+ export default UrbanRoad;
9
+ //# sourceMappingURL=UrbanRoad.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UrbanRoad.d.ts","sourceRoot":"","sources":["../../../src/components/urban/UrbanRoad.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAAa,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAmBvE,MAAM,WAAW,cAAe,SAAQ,iBAAiB;IACrD,MAAM,EAAE,eAAe,CAAC;CAC3B;AAED,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAOvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { DEFAULT_URBAN_OBJECTS, URBAN_OBJECTS_ANIMATABLE } from '@3driseai/3drise-core';
3
+ import { useUrbanInstance } from './useUrbanInstance.js';
4
+ import { createUniforms, build, STRUCTURAL } from './core/road.js';
5
+ // =============================================================================
6
+ // UrbanRoad — Road (type 'urban', config.type 'road')
7
+ // =============================================================================
8
+ // A street along a polyline: lanes with dashed or solid markings, zebra crossings, kerbed sidewalks and street lamps at a spacing, all from the texture library; lamps light the asphalt at night. Use for the streets of a city block.
9
+ // The construction lives in core/road.ts (emitted from the lab); this component wires it
10
+ // into the config pattern, the scene sun and the lamp list through useUrbanInstance.
11
+ const CORE = {
12
+ DEFAULTS: DEFAULT_URBAN_OBJECTS.road,
13
+ STRUCTURAL,
14
+ /** Knobs a keyframe or pointer binding may drive per frame — exactly what the push applies. */
15
+ ANIMATABLE: new Set(URBAN_OBJECTS_ANIMATABLE.road.map((p) => p.value)),
16
+ createUniforms,
17
+ build,
18
+ };
19
+ const UrbanRoad = (props) => {
20
+ const { rootRef, instance } = useUrbanInstance(CORE, props);
21
+ return (_jsx("group", { ref: rootRef, children: _jsx("primitive", { object: instance.object }) }));
22
+ };
23
+ export default UrbanRoad;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { SignageUrbanConfig } from '@3driseai/3drise-core';
3
+ import type { UrbanVariantProps } from './useUrbanInstance';
4
+ export interface UrbanSignageProps extends UrbanVariantProps {
5
+ config: SignageUrbanConfig;
6
+ }
7
+ declare const UrbanSignage: React.FC<UrbanSignageProps>;
8
+ export default UrbanSignage;
9
+ //# sourceMappingURL=UrbanSignage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UrbanSignage.d.ts","sourceRoot":"","sources":["../../../src/components/urban/UrbanSignage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,KAAK,EAAa,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAmBvE,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IACxD,MAAM,EAAE,kBAAkB,CAAC;CAC9B;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAO7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { DEFAULT_URBAN_OBJECTS, URBAN_OBJECTS_ANIMATABLE } from '@3driseai/3drise-core';
3
+ import { useUrbanInstance } from './useUrbanInstance.js';
4
+ import { createUniforms, build, STRUCTURAL } from './core/signage.js';
5
+ // =============================================================================
6
+ // UrbanSignage — Signage (type 'urban', config.type 'signage')
7
+ // =============================================================================
8
+ // A billboard on posts, a street totem or a rooftop sign carrying a picture of your choice, lit as a print by day and backlit at night, spilling a little light on the ground. Use for branding a development, a sales office or a shop in a city scene.
9
+ // The construction lives in core/signage.ts (emitted from the lab); this component wires it
10
+ // into the config pattern, the scene sun and the lamp list through useUrbanInstance.
11
+ const CORE = {
12
+ DEFAULTS: DEFAULT_URBAN_OBJECTS.signage,
13
+ STRUCTURAL,
14
+ /** Knobs a keyframe or pointer binding may drive per frame — exactly what the push applies. */
15
+ ANIMATABLE: new Set(URBAN_OBJECTS_ANIMATABLE.signage.map((p) => p.value)),
16
+ createUniforms,
17
+ build,
18
+ };
19
+ const UrbanSignage = (props) => {
20
+ const { rootRef, instance } = useUrbanInstance(CORE, props);
21
+ return (_jsx("group", { ref: rootRef, children: _jsx("primitive", { object: instance.object }) }));
22
+ };
23
+ export default UrbanSignage;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { SkylineUrbanConfig } from '@3driseai/3drise-core';
3
+ import type { UrbanVariantProps } from './useUrbanInstance';
4
+ export interface UrbanSkylineProps extends UrbanVariantProps {
5
+ config: SkylineUrbanConfig;
6
+ }
7
+ declare const UrbanSkyline: React.FC<UrbanSkylineProps>;
8
+ export default UrbanSkyline;
9
+ //# sourceMappingURL=UrbanSkyline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UrbanSkyline.d.ts","sourceRoot":"","sources":["../../../src/components/urban/UrbanSkyline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,KAAK,EAAa,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAmBvE,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IACxD,MAAM,EAAE,kBAAkB,CAAC;CAC9B;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAO7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { DEFAULT_URBAN_OBJECTS, URBAN_OBJECTS_ANIMATABLE } from '@3driseai/3drise-core';
3
+ import { useUrbanInstance } from './useUrbanInstance.js';
4
+ import { createUniforms, build, STRUCTURAL } from './core/skyline.js';
5
+ // =============================================================================
6
+ // UrbanSkyline — Skyline (type 'urban', config.type 'skyline')
7
+ // =============================================================================
8
+ // A far belt of hundreds of parametric buildings on a ring around the scene, varied in footprint, height, facade and tint, drawn as one instanced mesh with lit windows at night. Use for the city horizon behind a hero building or block.
9
+ // The construction lives in core/skyline.ts (emitted from the lab); this component wires it
10
+ // into the config pattern, the scene sun and the lamp list through useUrbanInstance.
11
+ const CORE = {
12
+ DEFAULTS: DEFAULT_URBAN_OBJECTS.skyline,
13
+ STRUCTURAL,
14
+ /** Knobs a keyframe or pointer binding may drive per frame — exactly what the push applies. */
15
+ ANIMATABLE: new Set(URBAN_OBJECTS_ANIMATABLE.skyline.map((p) => p.value)),
16
+ createUniforms,
17
+ build,
18
+ };
19
+ const UrbanSkyline = (props) => {
20
+ const { rootRef, instance } = useUrbanInstance(CORE, props);
21
+ return (_jsx("group", { ref: rootRef, children: _jsx("primitive", { object: instance.object }) }));
22
+ };
23
+ export default UrbanSkyline;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { StreetFurnitureUrbanConfig } from '@3driseai/3drise-core';
3
+ import type { UrbanVariantProps } from './useUrbanInstance';
4
+ export interface UrbanStreetFurnitureProps extends UrbanVariantProps {
5
+ config: StreetFurnitureUrbanConfig;
6
+ }
7
+ declare const UrbanStreetFurniture: React.FC<UrbanStreetFurnitureProps>;
8
+ export default UrbanStreetFurniture;
9
+ //# sourceMappingURL=UrbanStreetFurniture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UrbanStreetFurniture.d.ts","sourceRoot":"","sources":["../../../src/components/urban/UrbanStreetFurniture.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAExE,OAAO,KAAK,EAAa,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAmBvE,MAAM,WAAW,yBAA0B,SAAQ,iBAAiB;IAChE,MAAM,EAAE,0BAA0B,CAAC;CACtC;AAED,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAO7D,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { DEFAULT_URBAN_OBJECTS, URBAN_OBJECTS_ANIMATABLE } from '@3driseai/3drise-core';
3
+ import { useUrbanInstance } from './useUrbanInstance.js';
4
+ import { createUniforms, build, STRUCTURAL } from './core/streetFurniture.js';
5
+ // =============================================================================
6
+ // UrbanStreetFurniture — Street Furniture (type 'urban', config.type 'streetFurniture')
7
+ // =============================================================================
8
+ // One piece of street furniture by kind: a street lamp with an emissive head that lights nearby roads and facades at night, a slatted bench, a bollard or a bus shelter with a lit panel. Use for the pavements and plazas of a city scene.
9
+ // The construction lives in core/streetFurniture.ts (emitted from the lab); this component wires it
10
+ // into the config pattern, the scene sun and the lamp list through useUrbanInstance.
11
+ const CORE = {
12
+ DEFAULTS: DEFAULT_URBAN_OBJECTS.streetFurniture,
13
+ STRUCTURAL,
14
+ /** Knobs a keyframe or pointer binding may drive per frame — exactly what the push applies. */
15
+ ANIMATABLE: new Set(URBAN_OBJECTS_ANIMATABLE.streetFurniture.map((p) => p.value)),
16
+ createUniforms,
17
+ build,
18
+ };
19
+ const UrbanStreetFurniture = (props) => {
20
+ const { rootRef, instance } = useUrbanInstance(CORE, props);
21
+ return (_jsx("group", { ref: rootRef, children: _jsx("primitive", { object: instance.object }) }));
22
+ };
23
+ export default UrbanStreetFurniture;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { StreetGridUrbanConfig } from '@3driseai/3drise-core';
3
+ import type { UrbanVariantProps } from './useUrbanInstance';
4
+ export interface UrbanStreetGridProps extends UrbanVariantProps {
5
+ config: StreetGridUrbanConfig;
6
+ }
7
+ declare const UrbanStreetGrid: React.FC<UrbanStreetGridProps>;
8
+ export default UrbanStreetGrid;
9
+ //# sourceMappingURL=UrbanStreetGrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UrbanStreetGrid.d.ts","sourceRoot":"","sources":["../../../src/components/urban/UrbanStreetGrid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE,OAAO,KAAK,EAAa,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAuBvE,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC3D,MAAM,EAAE,qBAAqB,CAAC;CACjC;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAanD,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useMemo } from 'react';
3
+ import { DEFAULT_URBAN_OBJECTS, URBAN_OBJECTS_ANIMATABLE } from '@3driseai/3drise-core';
4
+ import { useUrbanInstance } from './useUrbanInstance.js';
5
+ import { createUniforms, build, STRUCTURAL } from './core/streetGrid.js';
6
+ import { useGridLayout } from '../../hooks/useGridLayout.js';
7
+ // =============================================================================
8
+ // UrbanStreetGrid — Street Grid (type 'urban', config.type 'streetGrid')
9
+ // =============================================================================
10
+ // A whole street grid as one object, drawn from the grid its `layoutId` names (a built-in grid,
11
+ // 'preset:<id>', or a saved grid — a `layout` asset): junctions, roads between them ending at the
12
+ // junction arms, tees and rounded corners on the edge (or open stubs), signals, lamps and traffic on
13
+ // every street, and a ground under the grid's grounds (a texture each, or a lawn).
14
+ // The construction lives in core/streetGrid.ts (emitted from the lab); this component resolves the
15
+ // grid and wires the rest into the config pattern, the scene sun and the lamp list (useUrbanInstance).
16
+ const CORE = {
17
+ DEFAULTS: DEFAULT_URBAN_OBJECTS.streetGrid,
18
+ STRUCTURAL,
19
+ /** Knobs a keyframe or pointer binding may drive per frame — exactly what the push applies. */
20
+ ANIMATABLE: new Set(URBAN_OBJECTS_ANIMATABLE.streetGrid.map((p) => p.value)),
21
+ createUniforms,
22
+ build,
23
+ };
24
+ const UrbanStreetGrid = (props) => {
25
+ const ref = props.config.layoutId ?? DEFAULT_URBAN_OBJECTS.streetGrid.layoutId;
26
+ // The grid it names: a preset at once; a saved grid once the project has registered it (load
27
+ // order is not guaranteed — until then nothing is built), and its new version after an edit.
28
+ const layout = useGridLayout(ref);
29
+ // handed to the core as `layout` (a structural key: a new grid rebuilds, the same one doesn't)
30
+ const config = useMemo(() => ({ ...props.config, layout }), [props.config, layout]);
31
+ const { rootRef, instance } = useUrbanInstance(CORE, { ...props, config });
32
+ return (_jsx("group", { ref: rootRef, children: _jsx("primitive", { object: instance.object }) }));
33
+ };
34
+ export default UrbanStreetGrid;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { TrafficUrbanConfig } from '@3driseai/3drise-core';
3
+ import type { UrbanVariantProps } from './useUrbanInstance';
4
+ export interface UrbanTrafficProps extends UrbanVariantProps {
5
+ config: TrafficUrbanConfig;
6
+ }
7
+ declare const UrbanTraffic: React.FC<UrbanTrafficProps>;
8
+ export default UrbanTraffic;
9
+ //# sourceMappingURL=UrbanTraffic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UrbanTraffic.d.ts","sourceRoot":"","sources":["../../../src/components/urban/UrbanTraffic.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,KAAK,EAAa,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAmBvE,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IACxD,MAAM,EAAE,kBAAkB,CAAC;CAC9B;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAO7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { DEFAULT_URBAN_OBJECTS, URBAN_OBJECTS_ANIMATABLE } from '@3driseai/3drise-core';
3
+ import { useUrbanInstance } from './useUrbanInstance.js';
4
+ import { createUniforms, build, STRUCTURAL } from './core/traffic.js';
5
+ // =============================================================================
6
+ // UrbanTraffic — Traffic (type 'urban', config.type 'traffic')
7
+ // =============================================================================
8
+ // Streams of head and tail lights moving along a road path at night, lanes running both ways, as instanced glowing sprites with no car geometry. Use for living streets in night shots of a city scene.
9
+ // The construction lives in core/traffic.ts (emitted from the lab); this component wires it
10
+ // into the config pattern, the scene sun and the lamp list through useUrbanInstance.
11
+ const CORE = {
12
+ DEFAULTS: DEFAULT_URBAN_OBJECTS.traffic,
13
+ STRUCTURAL,
14
+ /** Knobs a keyframe or pointer binding may drive per frame — exactly what the push applies. */
15
+ ANIMATABLE: new Set(URBAN_OBJECTS_ANIMATABLE.traffic.map((p) => p.value)),
16
+ createUniforms,
17
+ build,
18
+ };
19
+ const UrbanTraffic = (props) => {
20
+ const { rootRef, instance } = useUrbanInstance(CORE, props);
21
+ return (_jsx("group", { ref: rootRef, children: _jsx("primitive", { object: instance.object }) }));
22
+ };
23
+ export default UrbanTraffic;