@3driseai/3drise-viewer 0.1.42 → 0.1.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +4 -3
@@ -0,0 +1,100 @@
1
+ import * as THREE from 'three';
2
+ import { applyConfig as applyBuilding } from './building';
3
+ export declare const LIGHTING: string[];
4
+ export declare const STRUCTURAL: string[];
5
+ /** The belt as an instance list. */
6
+ export declare function skylineInstances(c: any): any[];
7
+ export declare function createUniforms(): {
8
+ uSunDir: {
9
+ value: THREE.Vector3;
10
+ };
11
+ uSunColor: {
12
+ value: THREE.Color;
13
+ };
14
+ uSkyAmbient: {
15
+ value: THREE.Color;
16
+ };
17
+ uGroundAmbient: {
18
+ value: THREE.Color;
19
+ };
20
+ uNight: {
21
+ value: number;
22
+ };
23
+ } & {
24
+ uLamps: {
25
+ value: any[];
26
+ };
27
+ uLampColors: {
28
+ value: any[];
29
+ };
30
+ uLampAims: {
31
+ value: any[];
32
+ };
33
+ uLampCount: {
34
+ value: number;
35
+ };
36
+ uLampTop: {
37
+ value: number;
38
+ };
39
+ uLampField: {
40
+ value: any;
41
+ };
42
+ uLampFieldRect: {
43
+ value: THREE.Vector4;
44
+ };
45
+ uLampFieldOn: {
46
+ value: number;
47
+ };
48
+ } & {
49
+ uWallColor: {
50
+ value: THREE.Color;
51
+ };
52
+ uGlassColor: {
53
+ value: THREE.Color;
54
+ };
55
+ uGlassReflect: {
56
+ value: number;
57
+ };
58
+ uMullionColor: {
59
+ value: THREE.Color;
60
+ };
61
+ uRoofColor: {
62
+ value: THREE.Color;
63
+ };
64
+ uMullionWidth: {
65
+ value: number;
66
+ };
67
+ uLobby: {
68
+ value: number;
69
+ };
70
+ uLightColor: {
71
+ value: THREE.Color;
72
+ };
73
+ uCoolLightColor: {
74
+ value: THREE.Color;
75
+ };
76
+ uLightWarmth: {
77
+ value: number;
78
+ };
79
+ uWindowGlow: {
80
+ value: number;
81
+ };
82
+ uFlicker: {
83
+ value: number;
84
+ };
85
+ uTime: {
86
+ value: number;
87
+ };
88
+ };
89
+ export { applyBuilding as applyConfig };
90
+ export declare function build(u: any, c: any): {
91
+ object: THREE.Group<THREE.Object3DEventMap>;
92
+ materials: THREE.ShaderMaterial[];
93
+ uniformSets: any[];
94
+ apply(cfg: any): void;
95
+ rebuild(cfg: any): void;
96
+ bounds(): any;
97
+ update(dt: any): void;
98
+ dispose(): void;
99
+ };
100
+ //# sourceMappingURL=skyline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skyline.d.ts","sourceRoot":"","sources":["../../../../src/components/urban/core/skyline.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAA+H,WAAW,IAAI,aAAa,EAAoC,MAAM,YAAY,CAAC;AAEzN,eAAO,MAAM,QAAQ,UAA2B,CAAC;AAEjD,eAAO,MAAM,UAAU,UAA6M,CAAC;AAErO,oCAAoC;AACpC,wBAAgB,gBAAgB,CAAC,CAAC,KAAA,SAiCjC;AAED,wBAAgB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAiC;AAC/D,OAAO,EAAE,aAAa,IAAI,WAAW,EAAE,CAAC;AAExC,wBAAgB,KAAK,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA;;;;;;;;;EA4BzB"}
@@ -0,0 +1,89 @@
1
+ // Emitted from Claude outputs/urban-lab/skyline.mjs by emit_object.mjs — edit the lab module and re-emit.
2
+ // =============================================================================
3
+ // urban/skyline — a far belt of buildings around the scene, one draw call
4
+ // =============================================================================
5
+ // The cheapest way to put a hero in a city: `count` buildings on a ring (radius ± spread,
6
+ // over an arc) with jittered footprints, heights, facades and tints, all instances of the
7
+ // facade InstancedMesh (building.mjs: box volumes, the facade drawn per fragment with
8
+ // box-filtered anti-aliasing, so it still reads right when a building is a few pixels
9
+ // tall). No lobbies, no parapets, no plot — a silhouette layer, lit like the buildings
10
+ // (sun by day, a share of windows at night) and fogged by the scene. Heights follow a
11
+ // power law so most of the belt is mid-rise with a few towers.
12
+ import * as THREE from 'three';
13
+ import { mulberry32, loadTextureSet } from '../urbanCore.js';
14
+ import { FOOTPRINTS, FACADES, pickMix, addBuilding, buildInstancedBoxes, disposeInstanced, createUniforms as buildingUniforms, applyConfig as applyBuilding, createMaterial as facadeMaterial } from './building.js';
15
+ export const LIGHTING = ['auto', 'day', 'night'];
16
+ export const STRUCTURAL = ['mix', 'radius', 'spread', 'arcStart', 'arcSpan', 'count', 'heightMin', 'heightMax', 'width', 'depth', 'sizeJitter', 'facade', 'facadeMix', 'windowRatio', 'bayWidth', 'texture', 'windowLights', 'seed'];
17
+ /** The belt as an instance list. */
18
+ export function skylineInstances(c) {
19
+ const rng = mulberry32(c.seed * 4241 + 9);
20
+ const list = [];
21
+ const n = Math.max(1, Math.round(c.count));
22
+ const base = new THREE.Color(c.wallColor);
23
+ const hsl = { h: 0, s: 0, l: 0 };
24
+ base.getHSL(hsl);
25
+ const tmp = new THREE.Color();
26
+ const floorH = 3.4;
27
+ for (let i = 0; i < n; i++) {
28
+ const a = (c.arcStart + ((i + rng() * 0.8) / n) * c.arcSpan) * Math.PI / 180;
29
+ // Two rows: the inner half of the spread denser than the outer, so the belt has a front.
30
+ const r = c.radius + (rng() < 0.6 ? (rng() - 0.5) * c.spread * 0.5 : (rng() - 0.5) * c.spread);
31
+ const x = Math.cos(a) * r, z = Math.sin(a) * r;
32
+ const j = c.sizeJitter;
33
+ const w = c.width * (1 + (rng() - 0.5) * 2 * j * 0.6), d = c.depth * (1 + (rng() - 0.5) * 2 * j * 0.6);
34
+ const h = c.heightMin + (c.heightMax - c.heightMin) * Math.pow(rng(), 2.2);
35
+ const floors = Math.max(2, Math.round(h / floorH));
36
+ const mix = c.facadeMix;
37
+ // A city mix picks footprint, facade and roof; heights stay the belt's own (a skyline is a silhouette).
38
+ const pick = pickMix(rng, c.mix);
39
+ const footprint = pick ? pick.footprint : (rng() < mix * 0.35 ? FOOTPRINTS[Math.floor(rng() * FOOTPRINTS.length)] : 'box');
40
+ const facade = pick ? pick.facade : (rng() < mix * 0.8 ? FACADES[Math.floor(rng() * FACADES.length)] : c.facade);
41
+ const roof = pick ? pick.roof : 'flat';
42
+ const windowRatio = Math.min(0.95, Math.max(0.15, c.windowRatio + (rng() - 0.5) * 0.3 * mix));
43
+ const lights = Math.min(1, Math.max(0, c.windowLights + (rng() - 0.5) * 0.4 * mix));
44
+ tmp.setHSL((hsl.h + (rng() - 0.5) * 0.08 * mix + 1) % 1, Math.min(1, hsl.s * (1 + (rng() - 0.5) * 0.6 * mix)), Math.min(0.95, Math.max(0.08, hsl.l * (1 + (rng() - 0.5) * 0.7 * mix))));
45
+ const tint = [tmp.r / Math.max(base.r, 0.02), tmp.g / Math.max(base.g, 0.02), tmp.b / Math.max(base.b, 0.02)].map((v) => Math.min(2.2, Math.max(0.35, v)));
46
+ // Faces turned roughly toward the centre, with a little scatter.
47
+ const ry = -a + Math.PI / 2 + (rng() - 0.5) * 0.6;
48
+ const b = { footprint, width: w, depth: d, floors, floorHeight: floorH, lobby: false, roof, facade, windowRatio, bayWidth: c.bayWidth, windowLights: lights };
49
+ addBuilding(list, b, x, z, ry, tint, Math.floor(rng() * 1e6));
50
+ }
51
+ return list;
52
+ }
53
+ export function createUniforms() { return buildingUniforms(); }
54
+ export { applyBuilding as applyConfig };
55
+ export function build(u, c) {
56
+ const group = new THREE.Group();
57
+ const mat = facadeMaterial(u);
58
+ let mesh = null;
59
+ const state = { tex: null };
60
+ const rebuild = (cfg) => {
61
+ if (mesh) {
62
+ group.remove(mesh);
63
+ disposeInstanced(mesh);
64
+ mesh = null;
65
+ }
66
+ mesh = buildInstancedBoxes(skylineInstances(cfg), mat);
67
+ mesh.castShadow = false; // a horizon layer: shadows from it would never reach the hero
68
+ group.add(mesh);
69
+ };
70
+ const setTexture = (cfg) => {
71
+ const maps = cfg.texture && cfg.texture.maps;
72
+ state.tex = maps && maps.color ? loadTextureSet(maps) : null;
73
+ if (state.tex)
74
+ state.tex.ready.then(() => applyBuilding(u, cfg, state.tex));
75
+ applyBuilding(u, cfg, state.tex && state.tex.color ? state.tex : null);
76
+ };
77
+ rebuild(c);
78
+ setTexture(c);
79
+ return {
80
+ object: group,
81
+ materials: [mat],
82
+ uniformSets: [u],
83
+ apply(cfg) { applyBuilding(u, cfg, undefined); },
84
+ rebuild(cfg) { rebuild(cfg); setTexture(cfg); },
85
+ bounds() { return mesh ? mesh.userData.bounds.clone() : new THREE.Box3(); },
86
+ update(dt) { u.uTime.value += dt; },
87
+ dispose() { disposeInstanced(mesh); mat.dispose(); },
88
+ };
89
+ }
@@ -0,0 +1,75 @@
1
+ import * as THREE from 'three';
2
+ export declare const KINDS: string[];
3
+ export declare const LIGHTING: string[];
4
+ export declare const STRUCTURAL: string[];
5
+ export declare function buildKind(kind: any, size: any): THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>;
6
+ export declare function createUniforms(): {
7
+ uSunDir: {
8
+ value: THREE.Vector3;
9
+ };
10
+ uSunColor: {
11
+ value: THREE.Color;
12
+ };
13
+ uSkyAmbient: {
14
+ value: THREE.Color;
15
+ };
16
+ uGroundAmbient: {
17
+ value: THREE.Color;
18
+ };
19
+ uNight: {
20
+ value: number;
21
+ };
22
+ } & {
23
+ uLamps: {
24
+ value: any[];
25
+ };
26
+ uLampColors: {
27
+ value: any[];
28
+ };
29
+ uLampAims: {
30
+ value: any[];
31
+ };
32
+ uLampCount: {
33
+ value: number;
34
+ };
35
+ uLampTop: {
36
+ value: number;
37
+ };
38
+ uLampField: {
39
+ value: any;
40
+ };
41
+ uLampFieldRect: {
42
+ value: THREE.Vector4;
43
+ };
44
+ uLampFieldOn: {
45
+ value: number;
46
+ };
47
+ } & {
48
+ uPaint: {
49
+ value: THREE.Color;
50
+ };
51
+ uAccent: {
52
+ value: THREE.Color;
53
+ };
54
+ uLampColor: {
55
+ value: THREE.Color;
56
+ };
57
+ uLampGlow: {
58
+ value: number;
59
+ };
60
+ uRough: {
61
+ value: number;
62
+ };
63
+ };
64
+ export declare function applyConfig(u: any, c: any): void;
65
+ export declare function build(u: any, c: any): {
66
+ object: THREE.Group<THREE.Object3DEventMap>;
67
+ materials: THREE.ShaderMaterial[];
68
+ uniformSets: any[];
69
+ apply: (cfg: any) => void;
70
+ rebuild(cfg: any): void;
71
+ bounds(): THREE.Box3;
72
+ update(): void;
73
+ dispose(): void;
74
+ };
75
+ //# sourceMappingURL=streetFurniture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"streetFurniture.d.ts","sourceRoot":"","sources":["../../../../src/components/urban/core/streetFurniture.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,eAAO,MAAM,KAAK,UAA0C,CAAC;AAC7D,eAAO,MAAM,QAAQ,UAA2B,CAAC;AAEjD,eAAO,MAAM,UAAU,UAAgC,CAAC;AAMxD,wBAAgB,SAAS,CAAC,IAAI,KAAA,EAAE,IAAI,KAAA,oFA+CnC;AAGD,wBAAgB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAsC;AAEpE,wBAAgB,WAAW,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA,QAK/B;AAGD,wBAAgB,KAAK,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA;;;;;;;;;EA0DzB"}
@@ -0,0 +1,193 @@
1
+ // Emitted from Claude outputs/urban-lab/streetFurniture.mjs by emit_object.mjs — edit the lab module and re-emit.
2
+ // =============================================================================
3
+ // urban/streetFurniture — lamp, bench, bollard, bus shelter (one `kind` select)
4
+ // =============================================================================
5
+ // Construction. Every kind is a small generative assembly of primitives merged into one
6
+ // geometry and drawn with the shared fixture material (painted metal + an accent colour
7
+ // for wood / glass, sun-lit, with an emissive panel):
8
+ // lamp the shared lamp post (tapered pole, swept arm, flat head); the head's underside
9
+ // is the emissive panel and the lamp is registered in the lamp list so roads,
10
+ // sidewalks and facades around it light themselves. No THREE light — unless
11
+ // realLight is on (opt-in, meant for up to ~4 hero lamps in a scene).
12
+ // bench two cast frames, five seat slats and three back slats in the accent colour.
13
+ // bollard a tapered post with a domed cap and a bright reflector band.
14
+ // shelter four posts, a roof slab, a dark glass back and side, a bench, and a lit
15
+ // advertising panel on the side (emissive, registered as a weak lamp).
16
+ // Base at the origin; `size` scales the whole piece (1 = real-world dimensions).
17
+ import * as THREE from 'three';
18
+ import { buildLampGeometry, createFixtureUniforms, createFixtureMaterial, mergeGeometries, registerLamp, unregisterLamp, touchLamps, setLamps, placeLamps, } from '../urbanCore.js';
19
+ export const KINDS = ['lamp', 'bench', 'bollard', 'shelter'];
20
+ export const LIGHTING = ['auto', 'day', 'night'];
21
+ export const STRUCTURAL = ['kind', 'size', 'realLight'];
22
+ // ---------------------------------------------------------------------------- geometry per kind
23
+ const box = (w, h, d, x, y, z, accent = false, emissive = false) => { const g = new THREE.BoxGeometry(w, h, d); g.translate(x, y, z); g.userData.aAccent = accent ? 1 : 0; g.userData.aEmissive = emissive ? 1 : 0; return g; };
24
+ const cyl = (rt, rb, h, x, y, z, seg = 12, accent = false) => { const g = new THREE.CylinderGeometry(rt, rb, h, seg, 1); g.translate(x, y, z); g.userData.aAccent = accent ? 1 : 0; return g; };
25
+ export function buildKind(kind, size) {
26
+ const parts = [];
27
+ let head = null; // emissive source position (for the lamp list)
28
+ let lampStrength = 1; // share of lampIntensity this kind emits
29
+ if (kind === 'lamp') {
30
+ const g = buildLampGeometry({ height: 8, armReach: 1.8 });
31
+ head = g.userData.head.clone();
32
+ parts.push(g);
33
+ }
34
+ else if (kind === 'bench') {
35
+ // Cast frames at the ends, slats between them.
36
+ for (const sx of [-0.8, 0.8]) {
37
+ parts.push(box(0.08, 0.42, 0.5, sx, 0.21, 0.0));
38
+ parts.push(box(0.08, 0.45, 0.08, sx, 0.65, -0.24));
39
+ }
40
+ for (let i = 0; i < 5; i++)
41
+ parts.push(box(1.8, 0.04, 0.085, 0, 0.44, -0.22 + i * 0.11, true));
42
+ for (let i = 0; i < 3; i++)
43
+ parts.push(box(1.8, 0.085, 0.04, 0, 0.56 + i * 0.12, -0.28, true));
44
+ lampStrength = 0;
45
+ }
46
+ else if (kind === 'bollard') {
47
+ parts.push(cyl(0.11, 0.14, 0.95, 0, 0.475, 0, 14));
48
+ const cap = new THREE.SphereGeometry(0.115, 14, 8, 0, Math.PI * 2, 0, Math.PI / 2);
49
+ cap.translate(0, 0.95, 0);
50
+ parts.push(cap);
51
+ const band = new THREE.CylinderGeometry(0.115, 0.115, 0.06, 14, 1, true);
52
+ band.translate(0, 0.8, 0);
53
+ band.userData.aEmissive = 1;
54
+ parts.push(band);
55
+ lampStrength = 0.08;
56
+ head = new THREE.Vector3(0, 0.8, 0);
57
+ }
58
+ else {
59
+ // Shelter: 4 x 1.6 m footprint, 2.6 m high.
60
+ for (const [x, z] of [[-1.9, -0.7], [1.9, -0.7], [-1.9, 0.7], [1.9, 0.7]])
61
+ parts.push(cyl(0.05, 0.05, 2.5, x, 1.25, z, 10));
62
+ parts.push(box(4.2, 0.1, 1.8, 0, 2.55, 0)); // roof
63
+ const back = box(4.0, 2.3, 0.03, 0, 1.3, -0.75, true);
64
+ back.userData.glass = true;
65
+ parts.push(back); // back glass
66
+ const side = box(0.03, 2.3, 1.4, -1.95, 1.3, 0, true);
67
+ side.userData.glass = true;
68
+ parts.push(side); // left side glass
69
+ parts.push(box(1.0, 1.6, 0.08, 2.1, 1.45, 0.2, false, true)); // lit panel on the right side
70
+ parts.push(box(0.08, 2.3, 0.08, 2.1, 1.25, -0.3)); // its post
71
+ parts.push(box(2.6, 0.05, 0.4, -0.3, 0.46, -0.35, true)); // bench
72
+ for (const sx of [-1.4, 0.8])
73
+ parts.push(box(0.06, 0.44, 0.36, sx, 0.22, -0.35));
74
+ lampStrength = 0.35;
75
+ head = new THREE.Vector3(2.1, 1.45, 0.2);
76
+ }
77
+ const glassParts = parts.filter((g) => g.userData.glass);
78
+ const geo = mergeGeometries(parts.filter((g) => !g.userData.glass), [['aEmissive', 1], ['aAccent', 1]]);
79
+ const glass = glassParts.length ? mergeGeometries(glassParts, [['aEmissive', 1], ['aAccent', 1]]) : null;
80
+ if (size !== 1) {
81
+ for (const g of [geo, glass])
82
+ if (g) {
83
+ g.scale(size, size, size);
84
+ g.computeBoundingBox();
85
+ g.computeBoundingSphere();
86
+ }
87
+ if (head)
88
+ head.multiplyScalar(size);
89
+ }
90
+ geo.userData.head = head;
91
+ geo.userData.lampStrength = lampStrength;
92
+ geo.userData.glass = glass;
93
+ return geo;
94
+ }
95
+ // ---------------------------------------------------------------------------- material
96
+ export function createUniforms() { return createFixtureUniforms(); }
97
+ export function applyConfig(u, c) {
98
+ if (c.paint !== undefined)
99
+ u.uPaint.value.set(c.paint);
100
+ if (c.accentColor !== undefined)
101
+ u.uAccent.value.set(c.accentColor);
102
+ if (c.lampColor !== undefined)
103
+ u.uLampColor.value.set(c.lampColor);
104
+ if (c.lampIntensity !== undefined)
105
+ u.uLampGlow.value = c.lampIntensity / 2.6;
106
+ }
107
+ // ---------------------------------------------------------------------------- lab build
108
+ export function build(u, c) {
109
+ const group = new THREE.Group();
110
+ const mat = createFixtureMaterial(u);
111
+ const glassMat = createFixtureMaterial(u, true);
112
+ let mesh = null, glassMesh = null, lamp = null, light = null, headLocal = null;
113
+ const clear = () => {
114
+ if (mesh) {
115
+ group.remove(mesh);
116
+ mesh.geometry.dispose();
117
+ mesh = null;
118
+ }
119
+ if (glassMesh) {
120
+ group.remove(glassMesh);
121
+ glassMesh.geometry.dispose();
122
+ glassMesh = null;
123
+ }
124
+ if (lamp) {
125
+ unregisterLamp(lamp);
126
+ lamp = null;
127
+ }
128
+ if (light) {
129
+ group.remove(light);
130
+ light.dispose();
131
+ light = null;
132
+ }
133
+ };
134
+ const rebuild = (cfg) => {
135
+ clear();
136
+ const geo = buildKind(cfg.kind, cfg.size);
137
+ mesh = new THREE.Mesh(geo, mat);
138
+ group.add(mesh);
139
+ if (geo.userData.glass) {
140
+ glassMesh = new THREE.Mesh(geo.userData.glass, glassMat);
141
+ group.add(glassMesh);
142
+ }
143
+ headLocal = geo.userData.head;
144
+ if (headLocal && geo.userData.lampStrength > 0) {
145
+ lamp = registerLamp({ id: 'furniture', position: headLocal.clone(), color: new THREE.Color(cfg.lampColor), radius: cfg.lampRadius * (cfg.kind === 'lamp' ? 1 : 0.3), intensity: cfg.lampIntensity * geo.userData.lampStrength, on: true, strength: geo.userData.lampStrength });
146
+ if (cfg.realLight && cfg.kind === 'lamp') {
147
+ // The opt-in hero light: a point light at the head, no shadows.
148
+ light = new THREE.PointLight(new THREE.Color(cfg.lampColor), 0, cfg.lampRadius, 2);
149
+ light.position.copy(headLocal).add(new THREE.Vector3(0, -0.15, 0));
150
+ group.add(light);
151
+ }
152
+ }
153
+ };
154
+ const apply = (cfg) => {
155
+ applyConfig(u, cfg);
156
+ if (lamp) {
157
+ setLamps([lamp], cfg.lampColor, cfg.lampIntensity !== undefined ? cfg.lampIntensity * lamp.strength : undefined, cfg.lampRadius !== undefined ? cfg.lampRadius * (lamp.strength === 1 ? 1 : 0.3) : undefined); // bumps only on a real change
158
+ }
159
+ if (light) {
160
+ if (cfg.lampColor !== undefined)
161
+ light.color.set(cfg.lampColor);
162
+ if (cfg.lampRadius !== undefined)
163
+ light.distance = cfg.lampRadius;
164
+ }
165
+ };
166
+ rebuild(c);
167
+ apply(c);
168
+ const lastWorld = new THREE.Matrix4();
169
+ return {
170
+ object: group,
171
+ materials: [mat, glassMat],
172
+ uniformSets: [u],
173
+ apply,
174
+ rebuild(cfg) { rebuild(cfg); apply(cfg); },
175
+ bounds() { const b = new THREE.Box3(); if (mesh) {
176
+ if (!mesh.geometry.boundingBox)
177
+ mesh.geometry.computeBoundingBox();
178
+ b.copy(mesh.geometry.boundingBox);
179
+ } return b; },
180
+ update() {
181
+ group.updateMatrixWorld();
182
+ if (lamp && !lastWorld.equals(group.matrixWorld)) {
183
+ lastWorld.copy(group.matrixWorld);
184
+ placeLamps([lamp], [headLocal], group.matrixWorld); // position, reach and falloff follow the object's scale
185
+ touchLamps();
186
+ }
187
+ // The real light follows the night factor so it is off by day (same curve as the pools).
188
+ if (light)
189
+ light.intensity = u.uNight.value * (u.uLampGlow.value * 2.6) * 60;
190
+ },
191
+ dispose() { clear(); mat.dispose(); glassMat.dispose(); },
192
+ };
193
+ }
@@ -0,0 +1,134 @@
1
+ import * as THREE from 'three';
2
+ export declare const EDGES: string[];
3
+ export declare const LIGHTING: string[];
4
+ export declare const STRUCTURAL: string[];
5
+ /**
6
+ * The pieces of the grid from its layout (config.layout, the GridLayout that `layoutId` names —
7
+ * the component resolves it; none yet = nothing to build): { junctions: [{ x, z, shape, ry }],
8
+ * roads: [{ points, curve }], traffic: [{ points, curve }], grounds (core gridGroundPolygons), extent }. Where a street is comes from core's gridLayoutPlan
9
+ * (the same function the GridCreator editor draws with); this only decides how to build it:
10
+ * - a node where 3 or 4 streets meet is a junction (a T turns its missing arm away);
11
+ * - streets chain through nodes where 2 meet: straight on, or round a corner (a smooth turn
12
+ * of up to 60 m radius), and a road runs from junction arm end to junction arm end;
13
+ * - a street's bend bulges only between the arm ends, so the junction arms stay straight;
14
+ * - traffic runs straight through junctions and round corners (the outer loop is one stream).
15
+ * In 'open' mode a border node also has a stub arm pointing out of the grid — core's plan gives it (GridNode.stubs, in arms / degree).
16
+ */
17
+ export declare function gridPlan(c: any): {
18
+ junctions: any[];
19
+ roads: any[];
20
+ traffic: any[];
21
+ grounds: import("@3driseai/3drise-core").GridGroundShape[];
22
+ extent: {
23
+ w: number;
24
+ d: number;
25
+ };
26
+ layout: import("@3driseai/3drise-core").GridLayout;
27
+ };
28
+ /**
29
+ * A ground's plane from its outlines (core gridGroundPolygons): each outline triangulated seen
30
+ * from above with the holes inside it, at the outline's heights; aUV = metres (the paving material).
31
+ */
32
+ export declare function groundGeometry(shape: any): THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>;
33
+ export declare function createUniforms(): {
34
+ uSunDir: {
35
+ value: THREE.Vector3;
36
+ };
37
+ uSunColor: {
38
+ value: THREE.Color;
39
+ };
40
+ uSkyAmbient: {
41
+ value: THREE.Color;
42
+ };
43
+ uGroundAmbient: {
44
+ value: THREE.Color;
45
+ };
46
+ uNight: {
47
+ value: number;
48
+ };
49
+ } & {
50
+ uLamps: {
51
+ value: any[];
52
+ };
53
+ uLampColors: {
54
+ value: any[];
55
+ };
56
+ uLampAims: {
57
+ value: any[];
58
+ };
59
+ uLampCount: {
60
+ value: number;
61
+ };
62
+ uLampTop: {
63
+ value: number;
64
+ };
65
+ uLampField: {
66
+ value: any;
67
+ };
68
+ uLampFieldRect: {
69
+ value: THREE.Vector4;
70
+ };
71
+ uLampFieldOn: {
72
+ value: number;
73
+ };
74
+ } & {
75
+ uAsphaltColor: {
76
+ value: THREE.Color;
77
+ };
78
+ uMarkingColor: {
79
+ value: THREE.Color;
80
+ };
81
+ uWidth: {
82
+ value: number;
83
+ };
84
+ uLaneWidth: {
85
+ value: number;
86
+ };
87
+ uLanes: {
88
+ value: number;
89
+ };
90
+ uMarking: {
91
+ value: number;
92
+ };
93
+ uLaneLines: {
94
+ value: number;
95
+ };
96
+ uEdgeLines: {
97
+ value: number;
98
+ };
99
+ uCrosswalks: {
100
+ value: number;
101
+ };
102
+ uWear: {
103
+ value: number;
104
+ };
105
+ uLength: {
106
+ value: number;
107
+ };
108
+ uSeed: {
109
+ value: number;
110
+ };
111
+ };
112
+ export declare function applyConfig(u: any, c: any, tex?: any): void;
113
+ export declare function build(u: any, c: any): {
114
+ object: THREE.Group<THREE.Object3DEventMap>;
115
+ readonly materials: any[];
116
+ readonly uniformSets: any[];
117
+ /** One lamp target: the baked field over the whole grid (bounds in the grid's own space). */
118
+ lampTargets(): {
119
+ field: {
120
+ texture: THREE.DataTexture;
121
+ rect: THREE.Vector4;
122
+ acc: any;
123
+ w: number;
124
+ h: number;
125
+ };
126
+ bounds: any;
127
+ }[];
128
+ apply: (cfg: any) => void;
129
+ rebuild(cfg: any): void;
130
+ bounds(): THREE.Box3;
131
+ update(dt: any, camera: any, renderer?: any): void;
132
+ dispose(): void;
133
+ };
134
+ //# sourceMappingURL=streetGrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"streetGrid.d.ts","sourceRoot":"","sources":["../../../../src/components/urban/core/streetGrid.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,eAAO,MAAM,KAAK,UAAmB,CAAC;AACtC,eAAO,MAAM,QAAQ,UAA2B,CAAC;AAEjD,eAAO,MAAM,UAAU,UAA2O,CAAC;AA6BnQ;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CAAC,CAAC,KAAA;;;;;;;;;;EAgIzB;AAaD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,KAAA,oFAuBnC;AAyBD,wBAAgB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAoC;AAClE,wBAAgB,WAAW,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA,EAAE,GAAG,MAAY,QAA6D;AAG9G,wBAAgB,KAAK,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA;;;;IAmElB,6FAA6F;;;;;;;;;;;;;;;;EAepG"}