@3driseai/3drise-viewer 0.1.41 → 0.1.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (414) hide show
  1. package/dist/animationsV2/ClipsRuntime.d.ts +16 -1
  2. package/dist/animationsV2/ClipsRuntime.d.ts.map +1 -1
  3. package/dist/animationsV2/ClipsRuntime.js +144 -25
  4. package/dist/animationsV2/appliers.d.ts +9 -0
  5. package/dist/animationsV2/appliers.d.ts.map +1 -1
  6. package/dist/animationsV2/appliers.js +62 -2
  7. package/dist/animationsV2/clipUtils.d.ts +30 -0
  8. package/dist/animationsV2/clipUtils.d.ts.map +1 -1
  9. package/dist/animationsV2/clipUtils.js +163 -17
  10. package/dist/animationsV2/elementSettings.d.ts +5 -0
  11. package/dist/animationsV2/elementSettings.d.ts.map +1 -1
  12. package/dist/animationsV2/elementSettings.js +6 -3
  13. package/dist/animationsV2/sequenceUtils.js +4 -4
  14. package/dist/animationsV2/types.d.ts +23 -0
  15. package/dist/animationsV2/types.d.ts.map +1 -1
  16. package/dist/api/sceneHandle.js +2 -2
  17. package/dist/components/CreatedObject.d.ts +3 -0
  18. package/dist/components/CreatedObject.d.ts.map +1 -1
  19. package/dist/components/CreatedObject.js +6 -2
  20. package/dist/components/CustomPrimitive.d.ts.map +1 -1
  21. package/dist/components/CustomPrimitive.js +1 -10
  22. package/dist/components/EnvironmentManager.d.ts.map +1 -1
  23. package/dist/components/EnvironmentManager.js +11 -5
  24. package/dist/components/GeometryShape.d.ts +5 -2
  25. package/dist/components/GeometryShape.d.ts.map +1 -1
  26. package/dist/components/GeometryShape.js +71 -10
  27. package/dist/components/LandObject.d.ts.map +1 -1
  28. package/dist/components/LandObject.js +1 -1
  29. package/dist/components/LayoutInstances.d.ts +2 -1
  30. package/dist/components/LayoutInstances.d.ts.map +1 -1
  31. package/dist/components/LayoutInstances.js +39 -6
  32. package/dist/components/LightObject.d.ts.map +1 -1
  33. package/dist/components/LightObject.js +3 -0
  34. package/dist/components/ObjectNode.d.ts.map +1 -1
  35. package/dist/components/ObjectNode.js +62 -13
  36. package/dist/components/OceanBuilder.d.ts +2 -0
  37. package/dist/components/OceanBuilder.d.ts.map +1 -1
  38. package/dist/components/OceanBuilder.js +2 -1
  39. package/dist/components/RenderEffects.d.ts +8 -0
  40. package/dist/components/RenderEffects.d.ts.map +1 -0
  41. package/dist/components/RenderEffects.js +120 -0
  42. package/dist/components/SceneBuilder.d.ts.map +1 -1
  43. package/dist/components/SceneBuilder.js +18 -9
  44. package/dist/components/SportsObject.d.ts +9 -0
  45. package/dist/components/SportsObject.d.ts.map +1 -0
  46. package/dist/components/SportsObject.js +20 -0
  47. package/dist/components/UrbanObject.d.ts +9 -0
  48. package/dist/components/UrbanObject.d.ts.map +1 -0
  49. package/dist/components/UrbanObject.js +28 -0
  50. package/dist/components/VegetationObject.d.ts +9 -0
  51. package/dist/components/VegetationObject.d.ts.map +1 -0
  52. package/dist/components/VegetationObject.js +26 -0
  53. package/dist/components/WaterObject.d.ts +15 -0
  54. package/dist/components/WaterObject.d.ts.map +1 -0
  55. package/dist/components/WaterObject.js +29 -0
  56. package/dist/components/index.d.ts +7 -2
  57. package/dist/components/index.d.ts.map +1 -1
  58. package/dist/components/index.js +6 -1
  59. package/dist/components/land/LandPatch.d.ts +3 -1
  60. package/dist/components/land/LandPatch.d.ts.map +1 -1
  61. package/dist/components/land/LandPatch.js +80 -7
  62. package/dist/components/layout/InstancedLayout.d.ts +19 -0
  63. package/dist/components/layout/InstancedLayout.d.ts.map +1 -0
  64. package/dist/components/layout/InstancedLayout.js +154 -0
  65. package/dist/components/layout/LayoutGrounds.d.ts +19 -0
  66. package/dist/components/layout/LayoutGrounds.d.ts.map +1 -0
  67. package/dist/components/layout/LayoutGrounds.js +104 -0
  68. package/dist/components/layout/LinkProxies.d.ts +5 -0
  69. package/dist/components/layout/LinkProxies.d.ts.map +1 -0
  70. package/dist/components/layout/LinkProxies.js +51 -0
  71. package/dist/components/layout/LinkedSource.d.ts +14 -0
  72. package/dist/components/layout/LinkedSource.d.ts.map +1 -0
  73. package/dist/components/layout/LinkedSource.js +129 -0
  74. package/dist/components/projector/Projector.d.ts +14 -0
  75. package/dist/components/projector/Projector.d.ts.map +1 -0
  76. package/dist/components/projector/Projector.js +44 -0
  77. package/dist/components/projector/index.d.ts +4 -0
  78. package/dist/components/projector/index.d.ts.map +1 -0
  79. package/dist/components/projector/index.js +2 -0
  80. package/dist/components/projector/projectorCore.d.ts +19 -0
  81. package/dist/components/projector/projectorCore.d.ts.map +1 -0
  82. package/dist/components/projector/projectorCore.js +545 -0
  83. package/dist/components/sports/SportsBall.d.ts +9 -0
  84. package/dist/components/sports/SportsBall.d.ts.map +1 -0
  85. package/dist/components/sports/SportsBall.js +23 -0
  86. package/dist/components/sports/SportsCourt.d.ts +9 -0
  87. package/dist/components/sports/SportsCourt.d.ts.map +1 -0
  88. package/dist/components/sports/SportsCourt.js +23 -0
  89. package/dist/components/sports/SportsEquipment.d.ts +9 -0
  90. package/dist/components/sports/SportsEquipment.d.ts.map +1 -0
  91. package/dist/components/sports/SportsEquipment.js +23 -0
  92. package/dist/components/sports/SportsGoal.d.ts +9 -0
  93. package/dist/components/sports/SportsGoal.d.ts.map +1 -0
  94. package/dist/components/sports/SportsGoal.js +23 -0
  95. package/dist/components/sports/core/ball.d.ts +166 -0
  96. package/dist/components/sports/core/ball.d.ts.map +1 -0
  97. package/dist/components/sports/core/ball.js +402 -0
  98. package/dist/components/sports/core/court.d.ts +442 -0
  99. package/dist/components/sports/core/court.d.ts.map +1 -0
  100. package/dist/components/sports/core/court.js +658 -0
  101. package/dist/components/sports/core/equipment.d.ts +103 -0
  102. package/dist/components/sports/core/equipment.d.ts.map +1 -0
  103. package/dist/components/sports/core/equipment.js +403 -0
  104. package/dist/components/sports/core/goal.d.ts +98 -0
  105. package/dist/components/sports/core/goal.d.ts.map +1 -0
  106. package/dist/components/sports/core/goal.js +44 -0
  107. package/dist/components/sports/index.d.ts +11 -0
  108. package/dist/components/sports/index.d.ts.map +1 -0
  109. package/dist/components/sports/index.js +8 -0
  110. package/dist/components/sports/sportsCore.d.ts +195 -0
  111. package/dist/components/sports/sportsCore.d.ts.map +1 -0
  112. package/dist/components/sports/sportsCore.js +758 -0
  113. package/dist/components/sports/useSportsInstance.d.ts +35 -0
  114. package/dist/components/sports/useSportsInstance.d.ts.map +1 -0
  115. package/dist/components/sports/useSportsInstance.js +47 -0
  116. package/dist/components/terrain/TerrainSurface.d.ts.map +1 -1
  117. package/dist/components/terrain/TerrainSurface.js +14 -0
  118. package/dist/components/urban/UrbanBlock.d.ts +9 -0
  119. package/dist/components/urban/UrbanBlock.d.ts.map +1 -0
  120. package/dist/components/urban/UrbanBlock.js +23 -0
  121. package/dist/components/urban/UrbanBuilding.d.ts +9 -0
  122. package/dist/components/urban/UrbanBuilding.d.ts.map +1 -0
  123. package/dist/components/urban/UrbanBuilding.js +23 -0
  124. package/dist/components/urban/UrbanJunction.d.ts +9 -0
  125. package/dist/components/urban/UrbanJunction.d.ts.map +1 -0
  126. package/dist/components/urban/UrbanJunction.js +23 -0
  127. package/dist/components/urban/UrbanPark.d.ts +9 -0
  128. package/dist/components/urban/UrbanPark.d.ts.map +1 -0
  129. package/dist/components/urban/UrbanPark.js +23 -0
  130. package/dist/components/urban/UrbanParkingLot.d.ts +9 -0
  131. package/dist/components/urban/UrbanParkingLot.d.ts.map +1 -0
  132. package/dist/components/urban/UrbanParkingLot.js +23 -0
  133. package/dist/components/urban/UrbanPlaza.d.ts +9 -0
  134. package/dist/components/urban/UrbanPlaza.d.ts.map +1 -0
  135. package/dist/components/urban/UrbanPlaza.js +23 -0
  136. package/dist/components/urban/UrbanRoad.d.ts +9 -0
  137. package/dist/components/urban/UrbanRoad.d.ts.map +1 -0
  138. package/dist/components/urban/UrbanRoad.js +23 -0
  139. package/dist/components/urban/UrbanSignage.d.ts +9 -0
  140. package/dist/components/urban/UrbanSignage.d.ts.map +1 -0
  141. package/dist/components/urban/UrbanSignage.js +23 -0
  142. package/dist/components/urban/UrbanSkyline.d.ts +9 -0
  143. package/dist/components/urban/UrbanSkyline.d.ts.map +1 -0
  144. package/dist/components/urban/UrbanSkyline.js +23 -0
  145. package/dist/components/urban/UrbanStreetFurniture.d.ts +9 -0
  146. package/dist/components/urban/UrbanStreetFurniture.d.ts.map +1 -0
  147. package/dist/components/urban/UrbanStreetFurniture.js +23 -0
  148. package/dist/components/urban/UrbanStreetGrid.d.ts +9 -0
  149. package/dist/components/urban/UrbanStreetGrid.d.ts.map +1 -0
  150. package/dist/components/urban/UrbanStreetGrid.js +34 -0
  151. package/dist/components/urban/UrbanTraffic.d.ts +9 -0
  152. package/dist/components/urban/UrbanTraffic.d.ts.map +1 -0
  153. package/dist/components/urban/UrbanTraffic.js +23 -0
  154. package/dist/components/urban/core/block.d.ts +119 -0
  155. package/dist/components/urban/core/block.d.ts.map +1 -0
  156. package/dist/components/urban/core/block.js +266 -0
  157. package/dist/components/urban/core/building.d.ts +128 -0
  158. package/dist/components/urban/core/building.d.ts.map +1 -0
  159. package/dist/components/urban/core/building.js +741 -0
  160. package/dist/components/urban/core/junction.d.ts +152 -0
  161. package/dist/components/urban/core/junction.d.ts.map +1 -0
  162. package/dist/components/urban/core/junction.js +617 -0
  163. package/dist/components/urban/core/park.d.ts +67 -0
  164. package/dist/components/urban/core/park.d.ts.map +1 -0
  165. package/dist/components/urban/core/park.js +176 -0
  166. package/dist/components/urban/core/parkingLot.d.ts +82 -0
  167. package/dist/components/urban/core/parkingLot.d.ts.map +1 -0
  168. package/dist/components/urban/core/parkingLot.js +284 -0
  169. package/dist/components/urban/core/plaza.d.ts +24 -0
  170. package/dist/components/urban/core/plaza.d.ts.map +1 -0
  171. package/dist/components/urban/core/plaza.js +243 -0
  172. package/dist/components/urban/core/road.d.ts +113 -0
  173. package/dist/components/urban/core/road.d.ts.map +1 -0
  174. package/dist/components/urban/core/road.js +347 -0
  175. package/dist/components/urban/core/signage.d.ts +83 -0
  176. package/dist/components/urban/core/signage.d.ts.map +1 -0
  177. package/dist/components/urban/core/signage.js +209 -0
  178. package/dist/components/urban/core/skyline.d.ts +100 -0
  179. package/dist/components/urban/core/skyline.d.ts.map +1 -0
  180. package/dist/components/urban/core/skyline.js +89 -0
  181. package/dist/components/urban/core/streetFurniture.d.ts +75 -0
  182. package/dist/components/urban/core/streetFurniture.d.ts.map +1 -0
  183. package/dist/components/urban/core/streetFurniture.js +193 -0
  184. package/dist/components/urban/core/streetGrid.d.ts +134 -0
  185. package/dist/components/urban/core/streetGrid.d.ts.map +1 -0
  186. package/dist/components/urban/core/streetGrid.js +422 -0
  187. package/dist/components/urban/core/traffic.d.ts +125 -0
  188. package/dist/components/urban/core/traffic.d.ts.map +1 -0
  189. package/dist/components/urban/core/traffic.js +305 -0
  190. package/dist/components/urban/index.d.ts +29 -0
  191. package/dist/components/urban/index.d.ts.map +1 -0
  192. package/dist/components/urban/index.js +16 -0
  193. package/dist/components/urban/textureSetResolver.d.ts +8 -0
  194. package/dist/components/urban/textureSetResolver.d.ts.map +1 -0
  195. package/dist/components/urban/textureSetResolver.js +16 -0
  196. package/dist/components/urban/urbanCore.d.ts +262 -0
  197. package/dist/components/urban/urbanCore.d.ts.map +1 -0
  198. package/dist/components/urban/urbanCore.js +928 -0
  199. package/dist/components/urban/useUrbanInstance.d.ts +53 -0
  200. package/dist/components/urban/useUrbanInstance.d.ts.map +1 -0
  201. package/dist/components/urban/useUrbanInstance.js +100 -0
  202. package/dist/components/vegetation/VegetationBush.d.ts +9 -0
  203. package/dist/components/vegetation/VegetationBush.d.ts.map +1 -0
  204. package/dist/components/vegetation/VegetationBush.js +23 -0
  205. package/dist/components/vegetation/VegetationCrops.d.ts +9 -0
  206. package/dist/components/vegetation/VegetationCrops.d.ts.map +1 -0
  207. package/dist/components/vegetation/VegetationCrops.js +23 -0
  208. package/dist/components/vegetation/VegetationFlowers.d.ts +9 -0
  209. package/dist/components/vegetation/VegetationFlowers.d.ts.map +1 -0
  210. package/dist/components/vegetation/VegetationFlowers.js +23 -0
  211. package/dist/components/vegetation/VegetationForest.d.ts +9 -0
  212. package/dist/components/vegetation/VegetationForest.d.ts.map +1 -0
  213. package/dist/components/vegetation/VegetationForest.js +23 -0
  214. package/dist/components/vegetation/VegetationFruit.d.ts +9 -0
  215. package/dist/components/vegetation/VegetationFruit.d.ts.map +1 -0
  216. package/dist/components/vegetation/VegetationFruit.js +23 -0
  217. package/dist/components/vegetation/VegetationGrass.d.ts +9 -0
  218. package/dist/components/vegetation/VegetationGrass.d.ts.map +1 -0
  219. package/dist/components/vegetation/VegetationGrass.js +23 -0
  220. package/dist/components/vegetation/VegetationHedge.d.ts +9 -0
  221. package/dist/components/vegetation/VegetationHedge.d.ts.map +1 -0
  222. package/dist/components/vegetation/VegetationHedge.js +23 -0
  223. package/dist/components/vegetation/VegetationIvy.d.ts +9 -0
  224. package/dist/components/vegetation/VegetationIvy.d.ts.map +1 -0
  225. package/dist/components/vegetation/VegetationIvy.js +23 -0
  226. package/dist/components/vegetation/VegetationTree.d.ts +9 -0
  227. package/dist/components/vegetation/VegetationTree.d.ts.map +1 -0
  228. package/dist/components/vegetation/VegetationTree.js +23 -0
  229. package/dist/components/vegetation/VegetationVegetable.d.ts +9 -0
  230. package/dist/components/vegetation/VegetationVegetable.d.ts.map +1 -0
  231. package/dist/components/vegetation/VegetationVegetable.js +23 -0
  232. package/dist/components/vegetation/core/bush.d.ts +1256 -0
  233. package/dist/components/vegetation/core/bush.d.ts.map +1 -0
  234. package/dist/components/vegetation/core/bush.js +376 -0
  235. package/dist/components/vegetation/core/crops.d.ts +1033 -0
  236. package/dist/components/vegetation/core/crops.d.ts.map +1 -0
  237. package/dist/components/vegetation/core/crops.js +378 -0
  238. package/dist/components/vegetation/core/flowers.d.ts +648 -0
  239. package/dist/components/vegetation/core/flowers.d.ts.map +1 -0
  240. package/dist/components/vegetation/core/flowers.js +225 -0
  241. package/dist/components/vegetation/core/forest.d.ts +138 -0
  242. package/dist/components/vegetation/core/forest.d.ts.map +1 -0
  243. package/dist/components/vegetation/core/forest.js +310 -0
  244. package/dist/components/vegetation/core/fruit.d.ts +99 -0
  245. package/dist/components/vegetation/core/fruit.d.ts.map +1 -0
  246. package/dist/components/vegetation/core/fruit.js +77 -0
  247. package/dist/components/vegetation/core/grass.d.ts +103 -0
  248. package/dist/components/vegetation/core/grass.d.ts.map +1 -0
  249. package/dist/components/vegetation/core/grass.js +102 -0
  250. package/dist/components/vegetation/core/hedge.d.ts +193 -0
  251. package/dist/components/vegetation/core/hedge.d.ts.map +1 -0
  252. package/dist/components/vegetation/core/hedge.js +243 -0
  253. package/dist/components/vegetation/core/ivy.d.ts +213 -0
  254. package/dist/components/vegetation/core/ivy.d.ts.map +1 -0
  255. package/dist/components/vegetation/core/ivy.js +173 -0
  256. package/dist/components/vegetation/core/tree.d.ts +1117 -0
  257. package/dist/components/vegetation/core/tree.d.ts.map +1 -0
  258. package/dist/components/vegetation/core/tree.js +408 -0
  259. package/dist/components/vegetation/core/vegetable.d.ts +99 -0
  260. package/dist/components/vegetation/core/vegetable.d.ts.map +1 -0
  261. package/dist/components/vegetation/core/vegetable.js +76 -0
  262. package/dist/components/vegetation/index.d.ts +23 -0
  263. package/dist/components/vegetation/index.d.ts.map +1 -0
  264. package/dist/components/vegetation/index.js +14 -0
  265. package/dist/components/vegetation/produceCore.d.ts +929 -0
  266. package/dist/components/vegetation/produceCore.d.ts.map +1 -0
  267. package/dist/components/vegetation/produceCore.js +723 -0
  268. package/dist/components/vegetation/useVegetationInstance.d.ts +39 -0
  269. package/dist/components/vegetation/useVegetationInstance.d.ts.map +1 -0
  270. package/dist/components/vegetation/useVegetationInstance.js +45 -0
  271. package/dist/components/vegetation/vegetationCore.d.ts +412 -0
  272. package/dist/components/vegetation/vegetationCore.d.ts.map +1 -0
  273. package/dist/components/vegetation/vegetationCore.js +1728 -0
  274. package/dist/components/volumetricClouds/VolumetricCloudsPass.d.ts +5 -0
  275. package/dist/components/volumetricClouds/VolumetricCloudsPass.d.ts.map +1 -1
  276. package/dist/components/volumetricClouds/VolumetricCloudsPass.js +39 -13
  277. package/dist/components/water/OceanSurface.d.ts.map +1 -1
  278. package/dist/components/water/OceanSurface.js +3 -2
  279. package/dist/components/water/WaterBody.d.ts.map +1 -1
  280. package/dist/components/water/WaterBody.js +31 -10
  281. package/dist/components/water/WaterFountain.d.ts +9 -0
  282. package/dist/components/water/WaterFountain.d.ts.map +1 -0
  283. package/dist/components/water/WaterFountain.js +24 -0
  284. package/dist/components/water/WaterStream.d.ts +9 -0
  285. package/dist/components/water/WaterStream.d.ts.map +1 -0
  286. package/dist/components/water/WaterStream.js +24 -0
  287. package/dist/components/water/WaterWaterfall.d.ts +9 -0
  288. package/dist/components/water/WaterWaterfall.d.ts.map +1 -0
  289. package/dist/components/water/WaterWaterfall.js +24 -0
  290. package/dist/components/water/core/fountain.d.ts +70 -0
  291. package/dist/components/water/core/fountain.d.ts.map +1 -0
  292. package/dist/components/water/core/fountain.js +619 -0
  293. package/dist/components/water/core/stream.d.ts +72 -0
  294. package/dist/components/water/core/stream.d.ts.map +1 -0
  295. package/dist/components/water/core/stream.js +167 -0
  296. package/dist/components/water/core/waterfall.d.ts +78 -0
  297. package/dist/components/water/core/waterfall.d.ts.map +1 -0
  298. package/dist/components/water/core/waterfall.js +325 -0
  299. package/dist/components/water/index.d.ts +8 -0
  300. package/dist/components/water/index.d.ts.map +1 -1
  301. package/dist/components/water/index.js +7 -0
  302. package/dist/components/water/types.d.ts +3 -0
  303. package/dist/components/water/types.d.ts.map +1 -1
  304. package/dist/components/water/useWaterInstance.d.ts +43 -0
  305. package/dist/components/water/useWaterInstance.d.ts.map +1 -0
  306. package/dist/components/water/useWaterInstance.js +89 -0
  307. package/dist/components/water/waterCore.d.ts +179 -0
  308. package/dist/components/water/waterCore.d.ts.map +1 -0
  309. package/dist/components/water/waterCore.js +516 -0
  310. package/dist/constants.d.ts.map +1 -1
  311. package/dist/constants.js +9 -1
  312. package/dist/hooks/index.d.ts +7 -2
  313. package/dist/hooks/index.d.ts.map +1 -1
  314. package/dist/hooks/index.js +5 -2
  315. package/dist/hooks/useActionPatch.d.ts +23 -0
  316. package/dist/hooks/useActionPatch.d.ts.map +1 -0
  317. package/dist/hooks/useActionPatch.js +38 -0
  318. package/dist/hooks/useCloudSun.d.ts.map +1 -1
  319. package/dist/hooks/useCloudSun.js +3 -2
  320. package/dist/hooks/useCommittedInstance.d.ts +6 -0
  321. package/dist/hooks/useCommittedInstance.d.ts.map +1 -0
  322. package/dist/hooks/useCommittedInstance.js +42 -0
  323. package/dist/hooks/useConfigLive.d.ts +1 -1
  324. package/dist/hooks/useConfigLive.d.ts.map +1 -1
  325. package/dist/hooks/useContinuousEffects.d.ts.map +1 -1
  326. package/dist/hooks/useContinuousEffects.js +36 -20
  327. package/dist/hooks/useGridLayout.d.ts +7 -0
  328. package/dist/hooks/useGridLayout.d.ts.map +1 -0
  329. package/dist/hooks/useGridLayout.js +10 -0
  330. package/dist/hooks/useInteractionEffects.d.ts.map +1 -1
  331. package/dist/hooks/useInteractionEffects.js +48 -9
  332. package/dist/hooks/useLightLive.d.ts.map +1 -1
  333. package/dist/hooks/useLightLive.js +2 -0
  334. package/dist/hooks/useLinkStatus.d.ts +7 -0
  335. package/dist/hooks/useLinkStatus.d.ts.map +1 -0
  336. package/dist/hooks/useLinkStatus.js +20 -0
  337. package/dist/hooks/useMaterialApplication.d.ts +6 -1
  338. package/dist/hooks/useMaterialApplication.d.ts.map +1 -1
  339. package/dist/hooks/useMaterialApplication.js +7 -2
  340. package/dist/hooks/useOceanMaterial.d.ts +11 -1
  341. package/dist/hooks/useOceanMaterial.d.ts.map +1 -1
  342. package/dist/hooks/useOceanMaterial.js +185 -27
  343. package/dist/hooks/usePathAnimation.d.ts +8 -0
  344. package/dist/hooks/usePathAnimation.d.ts.map +1 -1
  345. package/dist/hooks/usePathAnimation.js +140 -59
  346. package/dist/hooks/useResolvedLayout.d.ts +10 -0
  347. package/dist/hooks/useResolvedLayout.d.ts.map +1 -0
  348. package/dist/hooks/useResolvedLayout.js +17 -0
  349. package/dist/hooks/useTimeLighting.d.ts +36 -0
  350. package/dist/hooks/useTimeLighting.d.ts.map +1 -0
  351. package/dist/hooks/useTimeLighting.js +67 -0
  352. package/dist/index.d.ts +4 -0
  353. package/dist/index.d.ts.map +1 -1
  354. package/dist/index.js +4 -0
  355. package/dist/operations/catalogue/shaderLayers.d.ts.map +1 -1
  356. package/dist/operations/catalogue/shaderLayers.js +26 -3
  357. package/dist/render/renderLive.d.ts +11 -0
  358. package/dist/render/renderLive.d.ts.map +1 -0
  359. package/dist/render/renderLive.js +57 -0
  360. package/dist/shaders/glsl/oceanCore.glsl.d.ts +2 -2
  361. package/dist/shaders/glsl/oceanCore.glsl.d.ts.map +1 -1
  362. package/dist/shaders/glsl/oceanCore.glsl.js +35 -5
  363. package/dist/shaders/ocean/OceanSurfaceMaterial.d.ts +12 -0
  364. package/dist/shaders/ocean/OceanSurfaceMaterial.d.ts.map +1 -1
  365. package/dist/shaders/ocean/OceanSurfaceMaterial.js +55 -7
  366. package/dist/shaders/terrain/TerrainMaterial.d.ts.map +1 -1
  367. package/dist/shaders/terrain/TerrainMaterial.js +28 -0
  368. package/dist/triggers/kinds/change.js +1 -1
  369. package/dist/ui/UiLayers.d.ts +17 -1
  370. package/dist/ui/UiLayers.d.ts.map +1 -1
  371. package/dist/ui/UiLayers.js +76 -3
  372. package/dist/ui/index.d.ts +2 -2
  373. package/dist/ui/index.d.ts.map +1 -1
  374. package/dist/ui/index.js +1 -1
  375. package/dist/utils/composerHostedPass.d.ts +74 -0
  376. package/dist/utils/composerHostedPass.d.ts.map +1 -0
  377. package/dist/utils/composerHostedPass.js +63 -0
  378. package/dist/utils/geometryScript.d.ts +17 -0
  379. package/dist/utils/geometryScript.d.ts.map +1 -0
  380. package/dist/utils/geometryScript.js +92 -0
  381. package/dist/utils/geometryScript.worker.d.ts +2 -0
  382. package/dist/utils/geometryScript.worker.d.ts.map +1 -0
  383. package/dist/utils/geometryScript.worker.js +42 -0
  384. package/dist/utils/groundRegistry.d.ts +11 -0
  385. package/dist/utils/groundRegistry.d.ts.map +1 -0
  386. package/dist/utils/groundRegistry.js +39 -0
  387. package/dist/utils/instancingSupport.d.ts +9 -0
  388. package/dist/utils/instancingSupport.d.ts.map +1 -0
  389. package/dist/utils/instancingSupport.js +13 -0
  390. package/dist/utils/landPatch.d.ts +26 -5
  391. package/dist/utils/landPatch.d.ts.map +1 -1
  392. package/dist/utils/landPatch.js +124 -9
  393. package/dist/utils/layoutPlacement.d.ts +30 -0
  394. package/dist/utils/layoutPlacement.d.ts.map +1 -0
  395. package/dist/utils/layoutPlacement.js +113 -0
  396. package/dist/utils/linkRegistry.d.ts +15 -0
  397. package/dist/utils/linkRegistry.d.ts.map +1 -0
  398. package/dist/utils/linkRegistry.js +11 -0
  399. package/dist/utils/shapes.d.ts +28 -2
  400. package/dist/utils/shapes.d.ts.map +1 -1
  401. package/dist/utils/shapes.js +32 -3
  402. package/dist/utils/sharedParts.d.ts +61 -0
  403. package/dist/utils/sharedParts.d.ts.map +1 -0
  404. package/dist/utils/sharedParts.js +268 -0
  405. package/dist/utils/svgAsset.d.ts +6 -0
  406. package/dist/utils/svgAsset.d.ts.map +1 -0
  407. package/dist/utils/svgAsset.js +46 -0
  408. package/dist/utils/waterLight.d.ts +29 -0
  409. package/dist/utils/waterLight.d.ts.map +1 -0
  410. package/dist/utils/waterLight.js +67 -0
  411. package/dist/utils/waterReflection.d.ts +185 -0
  412. package/dist/utils/waterReflection.d.ts.map +1 -0
  413. package/dist/utils/waterReflection.js +616 -0
  414. package/package.json +4 -3
@@ -0,0 +1,262 @@
1
+ import * as THREE from 'three';
2
+ export declare const MAX_LAMPS = 48;
3
+ export declare function mulberry32(a: any): () => number;
4
+ export declare const clamp01: (x: any) => number;
5
+ export declare const lampRegistry: {
6
+ lamps: any[];
7
+ version: number;
8
+ };
9
+ export declare function registerLamp(lamp: any): any;
10
+ export declare function unregisterLamp(lamp: any): void;
11
+ export declare function touchLamps(): void;
12
+ export declare function setLamps(lamps: any, color?: any, intensity?: any, radius?: any): boolean;
13
+ /**
14
+ * Place lamps through an object's world matrix: each lamp at its local head (`locals[i]`), its reach
15
+ * and falloff scaled by the matrix's scale. Call when the matrix changed, then touchLamps().
16
+ */
17
+ export declare function placeLamps(lamps: any, locals: any, matrixWorld: any): void;
18
+ export declare function createLampUniforms(): {
19
+ uLamps: {
20
+ value: any[];
21
+ };
22
+ uLampColors: {
23
+ value: any[];
24
+ };
25
+ uLampAims: {
26
+ value: any[];
27
+ };
28
+ uLampCount: {
29
+ value: number;
30
+ };
31
+ uLampTop: {
32
+ value: number;
33
+ };
34
+ uLampField: {
35
+ value: any;
36
+ };
37
+ uLampFieldRect: {
38
+ value: THREE.Vector4;
39
+ };
40
+ uLampFieldOn: {
41
+ value: number;
42
+ };
43
+ };
44
+ /**
45
+ * Fill a surface's lamp uniforms with the registry lamps whose pool reaches `bounds`
46
+ * (a world Box3), nearest first when more than MAX_LAMPS qualify. Positions are WORLD
47
+ * space, like the shaders' vP (pass invWorld only for a shader that lights in local space).
48
+ */
49
+ export declare function gatherLamps(u: any, bounds: any, invWorld?: any): number;
50
+ export declare function createLampField(): {
51
+ texture: THREE.DataTexture;
52
+ rect: THREE.Vector4;
53
+ acc: any;
54
+ w: number;
55
+ h: number;
56
+ };
57
+ /** Point a material's lamp uniforms at a field (the uniforms take the field's texture and rect objects). */
58
+ export declare function attachLampField(u: any, field: any): void;
59
+ /** Bake every registry lamp whose pool reaches `bounds` (world Box3) into the field. Same falloff as lampLight, receiver facing up. */
60
+ export declare function bakeLampField(field: any, bounds: any): void;
61
+ export declare function createSunUniforms(): {
62
+ uSunDir: {
63
+ value: THREE.Vector3;
64
+ };
65
+ uSunColor: {
66
+ value: THREE.Color;
67
+ };
68
+ uSkyAmbient: {
69
+ value: THREE.Color;
70
+ };
71
+ uGroundAmbient: {
72
+ value: THREE.Color;
73
+ };
74
+ uNight: {
75
+ value: number;
76
+ };
77
+ };
78
+ /** Night factor from the sun: lights come on through civil dusk (sun 2 deg above to 6 deg below). */
79
+ export declare function nightFromSun(sunDirY: any): number;
80
+ /**
81
+ * sun = { direction, color, skyAmbient, groundAmbient } (the useCloudSun state) and the
82
+ * object's lighting mode: 'auto' follows the sun, 'day' / 'night' force it.
83
+ */
84
+ export declare function applySun(u: any, sun: any, lighting?: string): void;
85
+ export declare const GLSL_COMMON = "\nuniform vec3 uSunDir;\nuniform vec3 uSunColor;\nuniform vec3 uSkyAmbient;\nuniform vec3 uGroundAmbient;\nuniform float uNight;\nuniform vec4 uLamps[48];\nuniform vec4 uLampColors[48];\nuniform vec4 uLampAims[48];\nuniform int uLampCount;\nuniform float uLampTop;\nuniform sampler2D uLampField;\nuniform vec4 uLampFieldRect;\nuniform float uLampFieldOn;\n\nfloat hash11(float p) { p = fract(p * 0.1031); p *= p + 33.33; p *= p + p; return fract(p); }\nfloat hash21(vec2 p) { vec3 p3 = fract(vec3(p.xyx) * 0.1031); p3 += dot(p3, p3.yzx + 33.33); return fract((p3.x + p3.y) * p3.z); }\nfloat vnoise21(vec2 p) { vec2 i = floor(p), f = fract(p); f = f * f * (3.0 - 2.0 * f); return mix(mix(hash21(i), hash21(i + vec2(1.0, 0.0)), f.x), mix(hash21(i + vec2(0.0, 1.0)), hash21(i + vec2(1.0, 1.0)), f.x), f.y); }\nfloat hash31(vec3 p) { p = fract(p * 0.1031); p += dot(p, p.zyx + 31.32); return fract((p.x + p.y) * p.z); }\n\n// Irradiance from the gathered lamps. Each lamp is a downward-facing head: a smooth\n// window to its radius, inverse-square falloff softened near the head, a cosine cone so\n// it pools on the ground and only grazes walls, Lambert on the receiver. Scaled by the\n// night factor so pools fade in with dusk.\nvec3 lampLight(vec3 P, vec3 N) {\n vec3 acc = vec3(0.0);\n if (uNight < 0.002) return acc;\n // A baked lamp field (a street grid): the ground's light at this xz, decoded; walls take a share.\n if (uLampFieldOn > 0.5) {\n vec3 e = texture2D(uLampField, (P.xz - uLampFieldRect.xy) / uLampFieldRect.zw).rgb;\n return e * e * 4.0 * (0.3 + 0.7 * max(N.y, 0.0)) * uNight;\n }\n // Above the reach of every gathered lamp (most of a facade) the loop is skipped.\n if (P.y > uLampTop) return acc;\n for (int i = 0; i < 48; i++) {\n if (i >= uLampCount) break;\n vec4 L = uLamps[i];\n vec3 d = L.xyz - P;\n float r2 = dot(d, d);\n float r = sqrt(r2);\n vec3 l = d / max(r, 1e-3);\n float x = r / L.w;\n float win = clamp(1.0 - x * x * x * x, 0.0, 1.0);\n win *= win;\n float ndl = max(dot(N, l), 0.0);\n vec4 A = uLampAims[i];\n if (A.w > 0.0) {\n // a projector: an aimed beam (soft edge from the outer cone in), throw nearly flat over its\n // reach, so a few towers light a whole stadium evenly; walls facing it take light too\n float spot = smoothstep(A.w, mix(A.w, 1.0, 0.45), dot(-l, A.xyz));\n acc += uLampColors[i].rgb * (uLampColors[i].a * win * spot * (0.35 + 0.65 * ndl) * 4.0 / (1.0 + x * x * 3.0));\n continue;\n }\n float cone = smoothstep(0.1, 0.7, l.y);\n float ls = A.w < 0.0 ? -A.w : 1.0; // the lamp's object scale: falloff over its own metres\n // Intensity 1 puts ~0.75 irradiance on the ground under an 8 m head, a tenth of that\n // 14 m along the kerb: street-lamp contrast, not a wash.\n acc += uLampColors[i].rgb * (uLampColors[i].a * win * ndl * cone * 4.0 / (1.0 + r2 * 0.06 / (ls * ls)));\n }\n return acc * uNight;\n}\n\n// Sun + sky + ground + lamps on a rough dielectric. Radiance units: a 0.5 albedo at noon\n// lands near 0.9, so NoToneMapping keeps it under 1.\nvec3 shadeSurface(vec3 albedo, vec3 N, vec3 P, vec3 V, float rough, float ao) {\n float ndl = max(dot(N, uSunDir), 0.0);\n vec3 sky = uSkyAmbient * (0.55 + 0.45 * N.y);\n vec3 gnd = uGroundAmbient * (0.5 - 0.5 * N.y);\n vec3 col = albedo * (uSunColor * ndl + (sky + gnd) * ao);\n vec3 H = normalize(uSunDir + V);\n float spec = pow(max(dot(N, H), 0.0), mix(90.0, 6.0, rough)) * (1.0 - rough) * 0.35 * ndl;\n col += uSunColor * spec;\n col += albedo * lampLight(P, N);\n return col;\n}\n\n// Box-filtered coverage of the band [a, b] over this pixel's footprint on x: exact\n// anti-aliasing at the edge AND the right average when the band is thinner than a pixel\n// (a far facade blends to the mean of glass and spandrel instead of sparkling).\nfloat bandAA(float x, float a, float b) {\n float w = max(fwidth(x), 1e-5);\n float lo = max(a, x - 0.5 * w), hi = min(b, x + 0.5 * w);\n return clamp((hi - lo) / w, 0.0, 1.0);\n}\n";
86
+ export declare const GLSL_FOG_PARS = "#include <fog_pars_fragment>";
87
+ export declare const GLSL_FOG_VERT_PARS = "#include <fog_pars_vertex>";
88
+ /** Shared tail: output in the viewer's convention (NoToneMapping, sRGB out, scene fog). */
89
+ export declare const GLSL_OUT = "\n gl_FragColor = vec4(col, 1.0);\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n";
90
+ /**
91
+ * maps: { color?, normal?, roughness?, ao? } URLs (a library set's maps). Returns
92
+ * { color, normal, roughness, ao, mean: THREE.Color, ready: Promise }. Textures repeat;
93
+ * the colour map is sRGB. `mean` is the colour map's linear mean, filled when it loads.
94
+ */
95
+ export declare function loadTextureSet(maps: any): any;
96
+ export declare function createTextureUniforms(prefix: any): {};
97
+ /** Point a texture-uniform block at a loaded set (or clear it when `set` is null). */
98
+ export declare function applyTextureSet(u: any, prefix: any, set: any, tile?: number, normalStrength?: number): void;
99
+ /** GLSL for one texture block: sampleTex_<prefix>(uv, N, T, B) -> albedo multiplier, bumped normal, roughness. */
100
+ export declare function glslTextureBlock(prefix: any): string;
101
+ /** Sample the polyline: [{ p: Vector3, t: Vector3 (tangent), n: Vector3 (right), s }] */
102
+ /**
103
+ * Sample a polyline ([x, z] metres) into frames every ~1.5 m: [{ p, t (tangent), n (right), s }].
104
+ * `curve` 0 keeps the corners, 1 rounds the path (Catmull-Rom tension); `closed` loops it.
105
+ */
106
+ export declare function samplePath(points: any, curve?: number, closed?: boolean): any[];
107
+ /** A ribbon between offsets ta..tb (across) at heights ya..yb along the sampled path; uv = (s, t) or (s, y) for faces. */
108
+ export declare function ribbon(samples: any, ta: any, tb: any, ya: any, yb: any, vertical?: boolean, facing?: number): THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>;
109
+ /**
110
+ * Merge indexed or non-indexed geometries into one (position, normal + the named float/vec
111
+ * attributes, missing ones filled with `fill[name]` or 0). Disposes the inputs.
112
+ */
113
+ export declare function mergeGeometries(list: any, attrs?: any[], fill?: any): THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>;
114
+ /**
115
+ * Merge every mesh under `roots` into as few meshes as there are materials (instanced meshes of
116
+ * the same geometry into one InstancedMesh), added to `group` in its local space, lit by a baked
117
+ * lamp `field`. Used by objects built from other variants' cores (a street grid, a block's
118
+ * streets): ~200 pieces become ~10 draw calls. A merged mesh draws with the FIRST piece's
119
+ * material — the pieces' knob uniforms all receive the same config, so any one stands for all;
120
+ * a per-piece difference must be a vertex attribute (the junction's aTee / aRound), never a
121
+ * uniform. A material can keep itself apart with material.userData.mergeKey (a lawn island).
122
+ * The originals leave the scene graph; their cores still own and dispose them. Returns the
123
+ * merged meshes (dispose their geometry; the materials are the pieces').
124
+ */
125
+ export declare function mergeByMaterial(group: any, roots: any, field: any): any[];
126
+ /**
127
+ * A street lamp as one BufferGeometry: tapered pole, a curved arm, a flat head whose
128
+ * underside is the emissive panel. Attributes: position, normal, aEmissive (1 on the panel).
129
+ * Base at the origin, head at (armReach, height, 0) facing -y. Pure function of its params.
130
+ */
131
+ export declare function buildLampGeometry(p: any): THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>;
132
+ export declare function createPavingUniforms(): {
133
+ uSunDir: {
134
+ value: THREE.Vector3;
135
+ };
136
+ uSunColor: {
137
+ value: THREE.Color;
138
+ };
139
+ uSkyAmbient: {
140
+ value: THREE.Color;
141
+ };
142
+ uGroundAmbient: {
143
+ value: THREE.Color;
144
+ };
145
+ uNight: {
146
+ value: number;
147
+ };
148
+ } & {
149
+ uLamps: {
150
+ value: any[];
151
+ };
152
+ uLampColors: {
153
+ value: any[];
154
+ };
155
+ uLampAims: {
156
+ value: any[];
157
+ };
158
+ uLampCount: {
159
+ value: number;
160
+ };
161
+ uLampTop: {
162
+ value: number;
163
+ };
164
+ uLampField: {
165
+ value: any;
166
+ };
167
+ uLampFieldRect: {
168
+ value: THREE.Vector4;
169
+ };
170
+ uLampFieldOn: {
171
+ value: number;
172
+ };
173
+ } & {
174
+ uPavColor: {
175
+ value: THREE.Color;
176
+ };
177
+ uPavRoughness: {
178
+ value: number;
179
+ };
180
+ uGrassMix: {
181
+ value: number;
182
+ };
183
+ };
184
+ export declare const PAVING_VERT = "\nattribute vec2 aUV;\nvarying vec3 vN; varying vec3 vP; varying vec2 vUVm; varying vec3 vLocalN;\n#include <fog_pars_vertex>\nvoid main() {\n #ifdef USE_INSTANCING\n mat4 m = modelMatrix * instanceMatrix;\n #else\n mat4 m = modelMatrix;\n #endif\n vec4 wp = m * vec4(position, 1.0);\n vP = wp.xyz;\n vN = normalize(mat3(m) * normal);\n vLocalN = normal;\n vUVm = aUV;\n vec4 mvPosition = viewMatrix * wp;\n gl_Position = projectionMatrix * mvPosition;\n #include <fog_vertex>\n}";
185
+ export declare const PAVING_FRAG: string;
186
+ /**
187
+ * Depth options for the family's flat ground surfaces (asphalt, paving, plaza slabs). They sit
188
+ * centimetres above the scene's terrain or a ground plane; without an offset the depth buffer
189
+ * cannot tell them apart at distance and they flicker as the camera moves (z-fighting).
190
+ * A polygon offset pulls them toward the camera in depth only — nothing moves on screen.
191
+ */
192
+ export declare const SURFACE_DEPTH: {
193
+ polygonOffset: boolean;
194
+ polygonOffsetFactor: number;
195
+ polygonOffsetUnits: number;
196
+ };
197
+ export declare function createPavingMaterial(u: any): THREE.ShaderMaterial;
198
+ export declare function createFixtureUniforms(): {
199
+ uSunDir: {
200
+ value: THREE.Vector3;
201
+ };
202
+ uSunColor: {
203
+ value: THREE.Color;
204
+ };
205
+ uSkyAmbient: {
206
+ value: THREE.Color;
207
+ };
208
+ uGroundAmbient: {
209
+ value: THREE.Color;
210
+ };
211
+ uNight: {
212
+ value: number;
213
+ };
214
+ } & {
215
+ uLamps: {
216
+ value: any[];
217
+ };
218
+ uLampColors: {
219
+ value: any[];
220
+ };
221
+ uLampAims: {
222
+ value: any[];
223
+ };
224
+ uLampCount: {
225
+ value: number;
226
+ };
227
+ uLampTop: {
228
+ value: number;
229
+ };
230
+ uLampField: {
231
+ value: any;
232
+ };
233
+ uLampFieldRect: {
234
+ value: THREE.Vector4;
235
+ };
236
+ uLampFieldOn: {
237
+ value: number;
238
+ };
239
+ } & {
240
+ uPaint: {
241
+ value: THREE.Color;
242
+ };
243
+ uAccent: {
244
+ value: THREE.Color;
245
+ };
246
+ uLampColor: {
247
+ value: THREE.Color;
248
+ };
249
+ uLampGlow: {
250
+ value: number;
251
+ };
252
+ uRough: {
253
+ value: number;
254
+ };
255
+ };
256
+ export declare const FIXTURE_VERT = "\nattribute float aEmissive;\nattribute float aAccent;\nvarying vec3 vN; varying vec3 vP; varying float vE; varying float vA; varying vec3 vIC;\n#include <fog_pars_vertex>\nvoid main() {\n vec3 n = normal;\n #ifdef USE_INSTANCING\n mat4 m = modelMatrix * instanceMatrix;\n #else\n mat4 m = modelMatrix;\n #endif\n // Per-instance paint (InstancedMesh.instanceColor): cars in a parking lot, else white.\n vIC = vec3(1.0);\n #ifdef USE_INSTANCING_COLOR\n vIC = instanceColor;\n #endif\n vec4 wp = m * vec4(position, 1.0);\n vP = wp.xyz;\n vN = normalize(mat3(m) * n);\n vE = aEmissive;\n vA = aAccent;\n vec4 mvPosition = viewMatrix * wp;\n gl_Position = projectionMatrix * mvPosition;\n #include <fog_vertex>\n}";
257
+ export declare const FIXTURE_FRAG = "\nprecision highp float;\n\nuniform vec3 uSunDir;\nuniform vec3 uSunColor;\nuniform vec3 uSkyAmbient;\nuniform vec3 uGroundAmbient;\nuniform float uNight;\nuniform vec4 uLamps[48];\nuniform vec4 uLampColors[48];\nuniform vec4 uLampAims[48];\nuniform int uLampCount;\nuniform float uLampTop;\nuniform sampler2D uLampField;\nuniform vec4 uLampFieldRect;\nuniform float uLampFieldOn;\n\nfloat hash11(float p) { p = fract(p * 0.1031); p *= p + 33.33; p *= p + p; return fract(p); }\nfloat hash21(vec2 p) { vec3 p3 = fract(vec3(p.xyx) * 0.1031); p3 += dot(p3, p3.yzx + 33.33); return fract((p3.x + p3.y) * p3.z); }\nfloat vnoise21(vec2 p) { vec2 i = floor(p), f = fract(p); f = f * f * (3.0 - 2.0 * f); return mix(mix(hash21(i), hash21(i + vec2(1.0, 0.0)), f.x), mix(hash21(i + vec2(0.0, 1.0)), hash21(i + vec2(1.0, 1.0)), f.x), f.y); }\nfloat hash31(vec3 p) { p = fract(p * 0.1031); p += dot(p, p.zyx + 31.32); return fract((p.x + p.y) * p.z); }\n\n// Irradiance from the gathered lamps. Each lamp is a downward-facing head: a smooth\n// window to its radius, inverse-square falloff softened near the head, a cosine cone so\n// it pools on the ground and only grazes walls, Lambert on the receiver. Scaled by the\n// night factor so pools fade in with dusk.\nvec3 lampLight(vec3 P, vec3 N) {\n vec3 acc = vec3(0.0);\n if (uNight < 0.002) return acc;\n // A baked lamp field (a street grid): the ground's light at this xz, decoded; walls take a share.\n if (uLampFieldOn > 0.5) {\n vec3 e = texture2D(uLampField, (P.xz - uLampFieldRect.xy) / uLampFieldRect.zw).rgb;\n return e * e * 4.0 * (0.3 + 0.7 * max(N.y, 0.0)) * uNight;\n }\n // Above the reach of every gathered lamp (most of a facade) the loop is skipped.\n if (P.y > uLampTop) return acc;\n for (int i = 0; i < 48; i++) {\n if (i >= uLampCount) break;\n vec4 L = uLamps[i];\n vec3 d = L.xyz - P;\n float r2 = dot(d, d);\n float r = sqrt(r2);\n vec3 l = d / max(r, 1e-3);\n float x = r / L.w;\n float win = clamp(1.0 - x * x * x * x, 0.0, 1.0);\n win *= win;\n float ndl = max(dot(N, l), 0.0);\n vec4 A = uLampAims[i];\n if (A.w > 0.0) {\n // a projector: an aimed beam (soft edge from the outer cone in), throw nearly flat over its\n // reach, so a few towers light a whole stadium evenly; walls facing it take light too\n float spot = smoothstep(A.w, mix(A.w, 1.0, 0.45), dot(-l, A.xyz));\n acc += uLampColors[i].rgb * (uLampColors[i].a * win * spot * (0.35 + 0.65 * ndl) * 4.0 / (1.0 + x * x * 3.0));\n continue;\n }\n float cone = smoothstep(0.1, 0.7, l.y);\n float ls = A.w < 0.0 ? -A.w : 1.0; // the lamp's object scale: falloff over its own metres\n // Intensity 1 puts ~0.75 irradiance on the ground under an 8 m head, a tenth of that\n // 14 m along the kerb: street-lamp contrast, not a wash.\n acc += uLampColors[i].rgb * (uLampColors[i].a * win * ndl * cone * 4.0 / (1.0 + r2 * 0.06 / (ls * ls)));\n }\n return acc * uNight;\n}\n\n// Sun + sky + ground + lamps on a rough dielectric. Radiance units: a 0.5 albedo at noon\n// lands near 0.9, so NoToneMapping keeps it under 1.\nvec3 shadeSurface(vec3 albedo, vec3 N, vec3 P, vec3 V, float rough, float ao) {\n float ndl = max(dot(N, uSunDir), 0.0);\n vec3 sky = uSkyAmbient * (0.55 + 0.45 * N.y);\n vec3 gnd = uGroundAmbient * (0.5 - 0.5 * N.y);\n vec3 col = albedo * (uSunColor * ndl + (sky + gnd) * ao);\n vec3 H = normalize(uSunDir + V);\n float spec = pow(max(dot(N, H), 0.0), mix(90.0, 6.0, rough)) * (1.0 - rough) * 0.35 * ndl;\n col += uSunColor * spec;\n col += albedo * lampLight(P, N);\n return col;\n}\n\n// Box-filtered coverage of the band [a, b] over this pixel's footprint on x: exact\n// anti-aliasing at the edge AND the right average when the band is thinner than a pixel\n// (a far facade blends to the mean of glass and spandrel instead of sparkling).\nfloat bandAA(float x, float a, float b) {\n float w = max(fwidth(x), 1e-5);\n float lo = max(a, x - 0.5 * w), hi = min(b, x + 0.5 * w);\n return clamp((hi - lo) / w, 0.0, 1.0);\n}\n\nuniform vec3 uPaint; uniform vec3 uAccent; uniform vec3 uLampColor; uniform float uLampGlow; uniform float uRough;\nvarying vec3 vN; varying vec3 vP; varying float vE; varying float vA; varying vec3 vIC;\n#include <fog_pars_fragment>\nvoid main() {\n vec3 N = normalize(vN);\n vec3 V = normalize(cameraPosition - vP);\n vec3 base = mix(uPaint * vIC, uAccent, vA);\n vec3 col = shadeSurface(base, N, vP, V, mix(uRough, 0.8, vA), 1.0);\n // The panel: dim diffuser by day, a bright warm disc at night (over 1.0 on purpose, for bloom).\n vec3 panel = mix(uPaint * 1.6, uLampColor * (1.0 + 2.2 * uLampGlow), uNight);\n col = mix(col, panel, vE);\n float alpha = 1.0;\n #ifdef GLASS\n // Shelter glass: a faint tint plus a Fresnel sky reflection, mostly see-through.\n float fres = 0.04 + 0.96 * pow(1.0 - abs(dot(N, V)), 5.0);\n col = uAccent * 0.08 * (uSkyAmbient + uSunColor * 0.3) + (uSkyAmbient * 2.0 + uSunColor * 0.1) * fres * 0.8;\n alpha = 0.18 + 0.7 * fres;\n #endif\n gl_FragColor = vec4(col, alpha);\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n}";
258
+ export declare const CAR_PALETTE: string[];
259
+ /** A low-poly car as one geometry, facing +x, base at y = 0: body, cabin (accent = dark glass), four wheels (accent). */
260
+ export declare function buildCarGeometry(): THREE.BufferGeometry<THREE.NormalBufferAttributes, THREE.BufferGeometryEventMap>;
261
+ export declare function createFixtureMaterial(u: any, glass?: boolean): THREE.ShaderMaterial;
262
+ //# sourceMappingURL=urbanCore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"urbanCore.d.ts","sourceRoot":"","sources":["../../../src/components/urban/urbanCore.ts"],"names":[],"mappings":"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"}