@rr0/ufoathome 0.189.1 → 0.191.0

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 (212) hide show
  1. package/dist-embed-scene/{AdsbLolArchiveProvider-DdUpO-EA.js → AdsbLolArchiveProvider-BtF4baVw.js} +1 -1
  2. package/dist-embed-scene/{BeamEditor-Cu6NLBA7.js → BeamEditor-Dj1Wt50v.js} +1 -1
  3. package/dist-embed-scene/BeamSystem-CaNus1WN.js +1 -0
  4. package/dist-embed-scene/{BirdEditor-BxlHc4L5.js → BirdEditor-CKpe681e.js} +1 -1
  5. package/dist-embed-scene/{BirdFlock-DGC3adr7.js → BirdFlock-B2SbkMme.js} +1 -1
  6. package/dist-embed-scene/ContrailSystem-ChG1viIv.js +1 -0
  7. package/dist-embed-scene/{ControlPasses-BZIhjZfW.js → ControlPasses-Cls4RMwd.js} +1 -1
  8. package/dist-embed-scene/DroneEditor-BDDLiZPp.js +16 -0
  9. package/dist-embed-scene/DroneEditorMessages_en-BViHK30c.js +1 -0
  10. package/dist-embed-scene/DroneEditorMessages_es-D6bhIOAa.js +1 -0
  11. package/dist-embed-scene/DroneEditorMessages_fr-CvV0RyOT.js +1 -0
  12. package/dist-embed-scene/DroneEditorMessages_it-CYi-jmVN.js +1 -0
  13. package/dist-embed-scene/DroneFlight-BTFHGVWd.js +1 -0
  14. package/dist-embed-scene/DroneKindMessages_en-CLygXcsv.js +1 -0
  15. package/dist-embed-scene/DroneKindMessages_es-B9XFRYnQ.js +1 -0
  16. package/dist-embed-scene/DroneKindMessages_fr-CAX15_pk.js +1 -0
  17. package/dist-embed-scene/DroneKindMessages_it-CSGsCaJQ.js +1 -0
  18. package/dist-embed-scene/DroneParameterTexts_en-sL1dR2RG.js +1 -0
  19. package/dist-embed-scene/DroneParameterTexts_es-Bg8_8XVE.js +1 -0
  20. package/dist-embed-scene/DroneParameterTexts_fr-B8Ym7Yz6.js +1 -0
  21. package/dist-embed-scene/DroneParameterTexts_it-DfvWjvoc.js +1 -0
  22. package/dist-embed-scene/{Flightradar24Provider-DnJbUJ3f.js → Flightradar24Provider-BBj_wixV.js} +1 -1
  23. package/dist-embed-scene/GLTFLoader-CKDxld-A.js +1 -0
  24. package/dist-embed-scene/{GenerativeKitMessages-7-3kT9Ef.js → GenerativeKitMessages-BhHcmiXg.js} +1 -1
  25. package/dist-embed-scene/{HeadlightSystem-DOQSyusn.js → HeadlightSystem-Di3CUtA1.js} +1 -1
  26. package/dist-embed-scene/{LanternEditor-CpNWWMyY.js → LanternEditor-iByq1q3j.js} +1 -1
  27. package/dist-embed-scene/{LaserBeam-BS0xtrAx.js → LaserBeam-BQWS_xWa.js} +1 -1
  28. package/dist-embed-scene/{LaunchEditor-fuFCnkV4.js → LaunchEditor-CjpESdIe.js} +1 -1
  29. package/dist-embed-scene/{LaunchPlume-GdjoMQQa.js → LaunchPlume-DVsshxQE.js} +1 -1
  30. package/dist-embed-scene/{LaunchSimulation-C_x89oL_.js → LaunchSimulation-BU7X_C8t.js} +1 -1
  31. package/dist-embed-scene/{ModuleSession-Dd9RVc7I.js → ModuleSession-Hj3QwLuw.js} +3 -3
  32. package/dist-embed-scene/ModuleThree-D1uz5JiH.js +1 -0
  33. package/dist-embed-scene/{ParameterForm-DP2rnIe1.js → ParameterForm-BHRESNZ4.js} +11 -11
  34. package/dist-embed-scene/{RailwaySystem-8h9OGJkr.js → RailwaySystem-DBYCLMyL.js} +1 -1
  35. package/dist-embed-scene/{ReentryEditor-DGLg57vB.js → ReentryEditor-DpNPIxOG.js} +1 -1
  36. package/dist-embed-scene/{ReentrySimulation-DCNhQGDE.js → ReentrySimulation-m-TICP2i.js} +1 -1
  37. package/dist-embed-scene/ReferenceSystem-B6FHr1Pb.js +1 -0
  38. package/dist-embed-scene/{RoadMarkings-DAs6evab.js → RoadMarkings-DzCQFpjf.js} +1 -1
  39. package/dist-embed-scene/{SceneNames_en-BLm2h3zy.js → SceneNames_en-Dn90NisJ.js} +1 -1
  40. package/dist-embed-scene/{SceneNames_es-DrJ24RvP.js → SceneNames_es-DH6GZWja.js} +1 -1
  41. package/dist-embed-scene/{SceneNames_fr-CddH0oWD.js → SceneNames_fr-rltu5c_j.js} +1 -1
  42. package/dist-embed-scene/{SceneNames_it-DL3AbXlk.js → SceneNames_it-DsNshdIp.js} +1 -1
  43. package/dist-embed-scene/{SkyLantern-dInLqzN4.js → SkyLantern-BKxwl7Po.js} +1 -1
  44. package/dist-embed-scene/{TimelineTracks-B73gWzRB.js → TimelineTracks-Cjt0OHJS.js} +1 -1
  45. package/dist-embed-scene/{TraceSystem-vEBDgerB.js → TraceSystem-CwBlzmXK.js} +2 -2
  46. package/dist-embed-scene/{UfoMessages_en-BzK4iS9N.js → UfoMessages_en-A8Ku1B0Y.js} +1 -1
  47. package/dist-embed-scene/{WaterSystem-QZGlpcQ7.js → WaterSystem-BOnTlD7m.js} +2 -2
  48. package/dist-embed-scene/rr0-scene.mjs +331 -331
  49. package/dist-embed-scene/sightingSchema-CgwoRMl-.js +1 -0
  50. package/dist-embed-scene/trafficRuntime-DRDMbo2X.js +2 -0
  51. package/dist-embed-sighting/{AdsbLolArchiveProvider-BYOz5Wdl.js → AdsbLolArchiveProvider-BfWrS1jn.js} +1 -1
  52. package/dist-embed-sighting/{BallesterGuaspAssessor-CLQvJKlm.js → BallesterGuaspAssessor-BPaiHWd9.js} +1 -1
  53. package/dist-embed-sighting/{BeamEditor-B1s17C_I.js → BeamEditor--mMu1zwv.js} +2 -2
  54. package/dist-embed-sighting/BeamSystem-Cqe7QaN4.js +1 -0
  55. package/dist-embed-sighting/{BirdEditor-B__-UnpK.js → BirdEditor-DZ1Ybqeu.js} +1 -1
  56. package/dist-embed-sighting/{BirdFlock-BbObIeXW.js → BirdFlock-BZScQXfR.js} +1 -1
  57. package/dist-embed-sighting/{CaseReportExport-GwM0Pm21.js → CaseReportExport-DlX7cYJN.js} +3 -3
  58. package/dist-embed-sighting/ContrailSystem-Di5w5IVi.js +1 -0
  59. package/dist-embed-sighting/{ControlPasses-B78JMfGN.js → ControlPasses-Dr6eP2Mq.js} +1 -1
  60. package/dist-embed-sighting/{CoverageAssessor-BSoRnjHD.js → CoverageAssessor-Cu9wP4ZB.js} +1 -1
  61. package/dist-embed-sighting/DroneEditor-Bo19kUte.js +16 -0
  62. package/dist-embed-sighting/DroneEditorMessages_en-BViHK30c.js +1 -0
  63. package/dist-embed-sighting/DroneEditorMessages_es-D6bhIOAa.js +1 -0
  64. package/dist-embed-sighting/DroneEditorMessages_fr-CvV0RyOT.js +1 -0
  65. package/dist-embed-sighting/DroneEditorMessages_it-CYi-jmVN.js +1 -0
  66. package/dist-embed-sighting/DroneFlight-WxqILFs6.js +1 -0
  67. package/dist-embed-sighting/DroneKindMessages_en-CLygXcsv.js +1 -0
  68. package/dist-embed-sighting/DroneKindMessages_es-B9XFRYnQ.js +1 -0
  69. package/dist-embed-sighting/DroneKindMessages_fr-CAX15_pk.js +1 -0
  70. package/dist-embed-sighting/DroneKindMessages_it-CSGsCaJQ.js +1 -0
  71. package/dist-embed-sighting/DroneParameterTexts_en-sL1dR2RG.js +1 -0
  72. package/dist-embed-sighting/DroneParameterTexts_es-Bg8_8XVE.js +1 -0
  73. package/dist-embed-sighting/DroneParameterTexts_fr-B8Ym7Yz6.js +1 -0
  74. package/dist-embed-sighting/DroneParameterTexts_it-DfvWjvoc.js +1 -0
  75. package/dist-embed-sighting/{Flightradar24Provider-RjrQ963H.js → Flightradar24Provider-DJmvd2AL.js} +1 -1
  76. package/dist-embed-sighting/GLTFLoader-FWVFviG5.js +1 -0
  77. package/dist-embed-sighting/GenerativeKitMessages-NbyGMKAR.js +1 -0
  78. package/dist-embed-sighting/HeadlightSystem-Ce7sHylX.js +34 -0
  79. package/dist-embed-sighting/{HynekAssessor-CJ9APziM.js → HynekAssessor-DWDZGeLY.js} +1 -1
  80. package/dist-embed-sighting/{LanternEditor-C6tHr2lo.js → LanternEditor-Do0kggi8.js} +1 -1
  81. package/dist-embed-sighting/{LaserBeam-R7ItI6m-.js → LaserBeam-CMO6tMze.js} +1 -1
  82. package/dist-embed-sighting/{LaunchEditor-CbQXmqaL.js → LaunchEditor-CZri7DN4.js} +1 -1
  83. package/dist-embed-sighting/{LaunchPlume-uRfBKA0Y.js → LaunchPlume-DxDfUSlS.js} +1 -1
  84. package/dist-embed-sighting/LaunchSimulation-CTxbrEJw.js +1 -0
  85. package/dist-embed-sighting/{ModuleSession-YoBCzrOV.js → ModuleSession-BCtFMDJY.js} +3 -3
  86. package/dist-embed-sighting/ModuleThree-DPVHqcup.js +1 -0
  87. package/dist-embed-sighting/{NearestApproach-iBLl7o1g.js → NearestApproach-CONyx4c5.js} +1 -1
  88. package/dist-embed-sighting/{ParameterForm-CkZQ1FlH.js → ParameterForm-B8nX9qW-.js} +2 -2
  89. package/dist-embed-sighting/{PoherAssessor-DDRUgnRW.js → PoherAssessor-DI86qOCu.js} +1 -1
  90. package/dist-embed-sighting/RailwaySystem-DcJr9BY_.js +41 -0
  91. package/dist-embed-sighting/ReadingSensitivityMessages_en-ChQHFyxb.js +1 -0
  92. package/dist-embed-sighting/ReadingSensitivityMessages_es-BbFqHsvR.js +1 -0
  93. package/dist-embed-sighting/ReadingSensitivityMessages_fr-Dl4a8udu.js +1 -0
  94. package/dist-embed-sighting/ReadingSensitivityMessages_it-CwiJfUo_.js +1 -0
  95. package/dist-embed-sighting/{ReentryEditor-BzOyu6AB.js → ReentryEditor-BbhQfIPi.js} +1 -1
  96. package/dist-embed-sighting/ReentrySimulation-BHbW9YNO.js +1 -0
  97. package/dist-embed-sighting/ReferenceSystem-DCSdp9Bq.js +1 -0
  98. package/dist-embed-sighting/{RoadMarkings-CNLt-BEg.js → RoadMarkings-DvWjbrSf.js} +1 -1
  99. package/dist-embed-sighting/{SceneNames_en-Dz2a5iRk.js → SceneNames_en-BlRTU7Hq.js} +1 -1
  100. package/dist-embed-sighting/{SceneNames_es-CKgCl71G.js → SceneNames_es-DMNd9trd.js} +1 -1
  101. package/dist-embed-sighting/{SceneNames_fr-BjpaWmul.js → SceneNames_fr-DlMcv9D0.js} +1 -1
  102. package/dist-embed-sighting/{SceneNames_it-TidFZnkk.js → SceneNames_it-DqlWMlOE.js} +1 -1
  103. package/dist-embed-sighting/{SkyLantern-BdVGIBoq.js → SkyLantern-COmog7pF.js} +1 -1
  104. package/dist-embed-sighting/{TimelineTracks-CvGxdpGb.js → TimelineTracks-CYIJdyPF.js} +1 -1
  105. package/dist-embed-sighting/{TraceSystem-ZNrHrAPL.js → TraceSystem-1K0WblAK.js} +2 -2
  106. package/dist-embed-sighting/{UfoMessages_en-cLvtpfIC.js → UfoMessages_en-CwRXodRE.js} +1 -1
  107. package/dist-embed-sighting/WaterSystem-1VlNXZnO.js +19 -0
  108. package/dist-embed-sighting/rr0-sighting.mjs +382 -380
  109. package/dist-embed-sighting/sightingSchema-CgwoRMl-.js +1 -0
  110. package/dist-embed-sighting/trafficRuntime-CuYrKvX9.js +2 -0
  111. package/dist-embed-sighting-editor/{AdsbLolArchiveProvider-DEqEth50.js → AdsbLolArchiveProvider-BrZzIuec.js} +1 -1
  112. package/dist-embed-sighting-editor/{BallesterGuaspAssessor-CeyXntPc.js → BallesterGuaspAssessor-CXvIvYxV.js} +1 -1
  113. package/dist-embed-sighting-editor/{BeamEditor-DQcdww5w.js → BeamEditor-5-OlhNfL.js} +1 -1
  114. package/dist-embed-sighting-editor/{BeamSystem-d2pPAwht.js → BeamSystem-BGdR-Xez.js} +1 -1
  115. package/dist-embed-sighting-editor/{BirdEditor-CsyXenUx.js → BirdEditor-ESUliJEN.js} +1 -1
  116. package/dist-embed-sighting-editor/{BirdFlock-CSw6ge15.js → BirdFlock-DtshFXGT.js} +1 -1
  117. package/dist-embed-sighting-editor/{CaseReportExport-DNBdWKUJ.js → CaseReportExport-C84tqwtO.js} +1 -1
  118. package/dist-embed-sighting-editor/{ContrailSystem-B4tXvQXF.js → ContrailSystem-BTVyJpmn.js} +1 -1
  119. package/dist-embed-sighting-editor/{ControlPasses-C2E5CKcL.js → ControlPasses-DiQAXMzD.js} +1 -1
  120. package/dist-embed-sighting-editor/{CoverageAssessor-DvVcSmz6.js → CoverageAssessor-CJQzNdyr.js} +1 -1
  121. package/dist-embed-sighting-editor/{DecorParameterTexts_en-C5dEeI_C.js → DecorParameterTexts_en-idbdHsFG.js} +1 -1
  122. package/dist-embed-sighting-editor/{DecorParameterTexts_es-BysMOaxT.js → DecorParameterTexts_es-CIkkLQc2.js} +1 -1
  123. package/dist-embed-sighting-editor/{DecorParameterTexts_fr-CThgxosI.js → DecorParameterTexts_fr-D9GeuW_Y.js} +1 -1
  124. package/dist-embed-sighting-editor/{DecorParameterTexts_it-D0ZsTK16.js → DecorParameterTexts_it-v7TBrnsr.js} +1 -1
  125. package/dist-embed-sighting-editor/DroneEditor-DDaJO8FS.js +16 -0
  126. package/dist-embed-sighting-editor/DroneEditorMessages_en-BViHK30c.js +1 -0
  127. package/dist-embed-sighting-editor/DroneEditorMessages_es-D6bhIOAa.js +1 -0
  128. package/dist-embed-sighting-editor/DroneEditorMessages_fr-CvV0RyOT.js +1 -0
  129. package/dist-embed-sighting-editor/DroneEditorMessages_it-CYi-jmVN.js +1 -0
  130. package/dist-embed-sighting-editor/DroneFlight-tXCk1Tg1.js +1 -0
  131. package/dist-embed-sighting-editor/DroneKindMessages_en-CLygXcsv.js +1 -0
  132. package/dist-embed-sighting-editor/DroneKindMessages_es-B9XFRYnQ.js +1 -0
  133. package/dist-embed-sighting-editor/DroneKindMessages_fr-CAX15_pk.js +1 -0
  134. package/dist-embed-sighting-editor/DroneKindMessages_it-CSGsCaJQ.js +1 -0
  135. package/dist-embed-sighting-editor/DroneParameterTexts_en-sL1dR2RG.js +1 -0
  136. package/dist-embed-sighting-editor/DroneParameterTexts_es-Bg8_8XVE.js +1 -0
  137. package/dist-embed-sighting-editor/DroneParameterTexts_fr-B8Ym7Yz6.js +1 -0
  138. package/dist-embed-sighting-editor/DroneParameterTexts_it-DfvWjvoc.js +1 -0
  139. package/dist-embed-sighting-editor/{Flightradar24Provider-D3bM2ckV.js → Flightradar24Provider-DUVcPAF2.js} +1 -1
  140. package/dist-embed-sighting-editor/{GLTFLoader-fTZft-Zt.js → GLTFLoader-DdijxzcI.js} +1 -1
  141. package/dist-embed-sighting-editor/{HeadlightSystem-uWB_oNGK.js → HeadlightSystem-DRq40K7R.js} +1 -1
  142. package/dist-embed-sighting-editor/{HynekAssessor-D-u8nJfp.js → HynekAssessor-PxE7JR1h.js} +1 -1
  143. package/dist-embed-sighting-editor/{InterviewEditorElement-MBuptUl8.js → InterviewEditorElement-D-UDHU0L.js} +2 -2
  144. package/dist-embed-sighting-editor/{LanternEditor-DIew0BrY.js → LanternEditor-DDcI5Kv1.js} +2 -2
  145. package/dist-embed-sighting-editor/{LaserBeam-DOGz1dOz.js → LaserBeam-CadJcSMd.js} +1 -1
  146. package/dist-embed-sighting-editor/{LaunchEditor-0BCDGChg.js → LaunchEditor-Pkk0K648.js} +1 -1
  147. package/dist-embed-sighting-editor/{LaunchPlume-DdX9-Rlw.js → LaunchPlume-C7My5ccR.js} +1 -1
  148. package/dist-embed-sighting-editor/{LaunchSimulation-BkdI45NE.js → LaunchSimulation-45Z9GUBF.js} +1 -1
  149. package/dist-embed-sighting-editor/{ModelSource-BQm0eN7H.js → ModelSource-CzGHu4XS.js} +1 -1
  150. package/dist-embed-sighting-editor/{ModelThumbnails-Bwh2px6A.js → ModelThumbnails-CNO_j-KM.js} +1 -1
  151. package/dist-embed-sighting-editor/{ModelViewer-Dl5ichWV.js → ModelViewer-yfIxofpG.js} +1 -1
  152. package/dist-embed-sighting-editor/{ModuleConformance-_3-3Kbbt.js → ModuleConformance-C9DED8Lk.js} +2 -2
  153. package/dist-embed-sighting-editor/{ModuleSession-mVLpd6IE.js → ModuleSession-Cxe0BJue.js} +2 -2
  154. package/dist-embed-sighting-editor/ModuleThree-DSghL4fp.js +1 -0
  155. package/dist-embed-sighting-editor/{ModulesPanelElement-DZ7dkdsm.js → ModulesPanelElement-DgbOYqaS.js} +3 -3
  156. package/dist-embed-sighting-editor/{NearestApproach-BDjtUet2.js → NearestApproach-EbQIYGTt.js} +1 -1
  157. package/dist-embed-sighting-editor/{PoherAssessor-DrseSHg-.js → PoherAssessor-BisQ5ybV.js} +1 -1
  158. package/dist-embed-sighting-editor/{RailwaySystem-De5BYxNx.js → RailwaySystem-CIAIBvLT.js} +1 -1
  159. package/dist-embed-sighting-editor/ReadingSensitivityMessages_en-ChQHFyxb.js +1 -0
  160. package/dist-embed-sighting-editor/ReadingSensitivityMessages_es-BbFqHsvR.js +1 -0
  161. package/dist-embed-sighting-editor/ReadingSensitivityMessages_fr-Dl4a8udu.js +1 -0
  162. package/dist-embed-sighting-editor/ReadingSensitivityMessages_it-CwiJfUo_.js +1 -0
  163. package/dist-embed-sighting-editor/{ReentryEditor-DWqXWztK.js → ReentryEditor-NE8z5aZT.js} +1 -1
  164. package/dist-embed-sighting-editor/{ReentrySimulation-DpIG9b07.js → ReentrySimulation-Crd-CW_o.js} +1 -1
  165. package/dist-embed-sighting-editor/{ReferenceSystem-BoCM4vB1.js → ReferenceSystem-DUIJceGg.js} +1 -1
  166. package/dist-embed-sighting-editor/SightingEditorMessages_en-DSPvgYFi.js +12 -0
  167. package/dist-embed-sighting-editor/SightingEditorMessages_es-Bl3DipHr.js +12 -0
  168. package/dist-embed-sighting-editor/SightingEditorMessages_fr-BTmWQX0n.js +12 -0
  169. package/dist-embed-sighting-editor/SightingEditorMessages_it-lzbDsHjx.js +12 -0
  170. package/dist-embed-sighting-editor/{SightingFileEditor-Dtz8Azd2.js → SightingFileEditor-0VZmtiOX.js} +1 -1
  171. package/dist-embed-sighting-editor/{SkyLantern-CaRiiIZX.js → SkyLantern-De_MXfQz.js} +1 -1
  172. package/dist-embed-sighting-editor/{TraceSystem-DdEd9Z5I.js → TraceSystem-Ba5H90GB.js} +2 -2
  173. package/dist-embed-sighting-editor/{WaterSystem-DntD2XIE.js → WaterSystem-Dpdw46hF.js} +2 -2
  174. package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +433 -422
  175. package/dist-embed-sighting-editor/sightingSchema-CgwoRMl-.js +1 -0
  176. package/dist-embed-sighting-editor/trafficRuntime-Cqj3IpvH.js +2 -0
  177. package/package.json +2 -1
  178. package/dist-embed-scene/BeamSystem-Ab_wCPf_.js +0 -1
  179. package/dist-embed-scene/ContrailSystem-BYqjhyyF.js +0 -1
  180. package/dist-embed-scene/GLTFLoader-BmUyASZK.js +0 -1
  181. package/dist-embed-scene/ModuleThree-q18pyqmA.js +0 -1
  182. package/dist-embed-scene/ReferenceSystem-BTDpVH4u.js +0 -1
  183. package/dist-embed-scene/sightingSchema-DjI7FV42.js +0 -1
  184. package/dist-embed-scene/trafficRuntime-CJIPy2oO.js +0 -2
  185. package/dist-embed-sighting/BeamSystem-DTraCa17.js +0 -1
  186. package/dist-embed-sighting/ContrailSystem-C1pCwq7H.js +0 -1
  187. package/dist-embed-sighting/GLTFLoader-61IhKnLS.js +0 -1
  188. package/dist-embed-sighting/GenerativeKitMessages-CRj85mnY.js +0 -1
  189. package/dist-embed-sighting/HeadlightSystem-LMaOhpkj.js +0 -34
  190. package/dist-embed-sighting/LaunchSimulation-DgsYJUKz.js +0 -1
  191. package/dist-embed-sighting/ModuleThree-BHRi7HrA.js +0 -1
  192. package/dist-embed-sighting/RailwaySystem-m2A18WjN.js +0 -41
  193. package/dist-embed-sighting/ReadingSensitivityMessages_en-CF6XauSj.js +0 -1
  194. package/dist-embed-sighting/ReadingSensitivityMessages_es-Ca-13TTT.js +0 -1
  195. package/dist-embed-sighting/ReadingSensitivityMessages_fr-Djdd6Hdq.js +0 -1
  196. package/dist-embed-sighting/ReadingSensitivityMessages_it-CPUXxMqD.js +0 -1
  197. package/dist-embed-sighting/ReentrySimulation-BDnSb3zB.js +0 -1
  198. package/dist-embed-sighting/ReferenceSystem-C1iPC-1U.js +0 -1
  199. package/dist-embed-sighting/WaterSystem-BtEY0XLc.js +0 -19
  200. package/dist-embed-sighting/sightingSchema-DjI7FV42.js +0 -1
  201. package/dist-embed-sighting/trafficRuntime-CFgDqQz4.js +0 -2
  202. package/dist-embed-sighting-editor/ModuleThree-cXvmWIn4.js +0 -1
  203. package/dist-embed-sighting-editor/ReadingSensitivityMessages_en-CF6XauSj.js +0 -1
  204. package/dist-embed-sighting-editor/ReadingSensitivityMessages_es-Ca-13TTT.js +0 -1
  205. package/dist-embed-sighting-editor/ReadingSensitivityMessages_fr-Djdd6Hdq.js +0 -1
  206. package/dist-embed-sighting-editor/ReadingSensitivityMessages_it-CPUXxMqD.js +0 -1
  207. package/dist-embed-sighting-editor/SightingEditorMessages_en-BgJRl09G.js +0 -12
  208. package/dist-embed-sighting-editor/SightingEditorMessages_es-CK8yosal.js +0 -12
  209. package/dist-embed-sighting-editor/SightingEditorMessages_fr-CcBrcUd-.js +0 -12
  210. package/dist-embed-sighting-editor/SightingEditorMessages_it-Dvnh7lnI.js +0 -12
  211. package/dist-embed-sighting-editor/sightingSchema-DjI7FV42.js +0 -1
  212. package/dist-embed-sighting-editor/trafficRuntime-j8tnHTec.js +0 -2
@@ -1,4 +1,4 @@
1
- import{I as ee,F,s as G,t as M,u as te,v as j,w as J,V as E,x as ie,y as I,U as $,j as ne,z as O,m as se,i as B,E as oe,e as ae,J as re,G as le,C as ce,K as de,B as fe,N as ue,Q as pe,X as he,Y as me,Z as V,k as ge}from"./rr0-scene.mjs";const k=new j,P=new E;class Q extends ee{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";const e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],n=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],i=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(i),this.setAttribute("position",new F(e,3)),this.setAttribute("uv",new F(n,2))}applyMatrix4(e){const n=this.attributes.instanceStart,i=this.attributes.instanceEnd;return n!==void 0&&(n.applyMatrix4(e),i.applyMatrix4(e),n.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let n;e instanceof Float32Array?n=e:Array.isArray(e)&&(n=new Float32Array(e));const i=new G(n,6,1);return this.setAttribute("instanceStart",new M(i,3,0)),this.setAttribute("instanceEnd",new M(i,3,3)),this.instanceCount=this.attributes.instanceStart.count,this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let n;e instanceof Float32Array?n=e:Array.isArray(e)&&(n=new Float32Array(e));const i=new G(n,6,1);return this.setAttribute("instanceColorStart",new M(i,3,0)),this.setAttribute("instanceColorEnd",new M(i,3,3)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new te(e.geometry)),this}fromLineSegments(e){const n=e.geometry;return this.setPositions(n.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new j);const e=this.attributes.instanceStart,n=this.attributes.instanceEnd;e!==void 0&&n!==void 0&&(this.boundingBox.setFromBufferAttribute(e),k.setFromBufferAttribute(n),this.boundingBox.union(k))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new J),this.boundingBox===null&&this.computeBoundingBox();const e=this.attributes.instanceStart,n=this.attributes.instanceEnd;if(e!==void 0&&n!==void 0){const i=this.boundingSphere.center;this.boundingBox.getCenter(i);let t=0;for(let o=0,l=e.count;o<l;o++)P.fromBufferAttribute(e,o),t=Math.max(t,i.distanceToSquared(P)),P.fromBufferAttribute(n,o),t=Math.max(t,i.distanceToSquared(P));this.boundingSphere.radius=Math.sqrt(t),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}}O.line={worldUnits:{value:1},linewidth:{value:1},resolution:{value:new ne},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}};I.line={uniforms:$.merge([O.common,O.fog,O.line]),vertexShader:`
1
+ import{I as ee,F,v as G,w as M,x as te,y as j,z as $,V as E,E as ie,J as I,U as J,m as ne,K as O,o as se,k as B,N as oe,h as ae,Q as re,G as le,C as ce,X as de,B as fe,Y as ue,Z as pe,$ as he,a0 as me,a1 as V,n as ge}from"./rr0-scene.mjs";const k=new j,P=new E;class Q extends ee{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";const e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],n=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],i=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(i),this.setAttribute("position",new F(e,3)),this.setAttribute("uv",new F(n,2))}applyMatrix4(e){const n=this.attributes.instanceStart,i=this.attributes.instanceEnd;return n!==void 0&&(n.applyMatrix4(e),i.applyMatrix4(e),n.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let n;e instanceof Float32Array?n=e:Array.isArray(e)&&(n=new Float32Array(e));const i=new G(n,6,1);return this.setAttribute("instanceStart",new M(i,3,0)),this.setAttribute("instanceEnd",new M(i,3,3)),this.instanceCount=this.attributes.instanceStart.count,this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let n;e instanceof Float32Array?n=e:Array.isArray(e)&&(n=new Float32Array(e));const i=new G(n,6,1);return this.setAttribute("instanceColorStart",new M(i,3,0)),this.setAttribute("instanceColorEnd",new M(i,3,3)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new te(e.geometry)),this}fromLineSegments(e){const n=e.geometry;return this.setPositions(n.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new j);const e=this.attributes.instanceStart,n=this.attributes.instanceEnd;e!==void 0&&n!==void 0&&(this.boundingBox.setFromBufferAttribute(e),k.setFromBufferAttribute(n),this.boundingBox.union(k))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new $),this.boundingBox===null&&this.computeBoundingBox();const e=this.attributes.instanceStart,n=this.attributes.instanceEnd;if(e!==void 0&&n!==void 0){const i=this.boundingSphere.center;this.boundingBox.getCenter(i);let t=0;for(let o=0,l=e.count;o<l;o++)P.fromBufferAttribute(e,o),t=Math.max(t,i.distanceToSquared(P)),P.fromBufferAttribute(n,o),t=Math.max(t,i.distanceToSquared(P));this.boundingSphere.radius=Math.sqrt(t),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}}O.line={worldUnits:{value:1},linewidth:{value:1},resolution:{value:new ne},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}};I.line={uniforms:J.merge([O.common,O.fog,O.line]),vertexShader:`
2
2
  #include <common>
3
3
  #include <color_pars_vertex>
4
4
  #include <fog_pars_vertex>
@@ -390,4 +390,4 @@ import{I as ee,F,s as G,t as M,u as te,v as j,w as J,V as E,x as ie,y as I,U as
390
390
  #include <premultiplied_alpha_fragment>
391
391
 
392
392
  }
393
- `};class N extends ie{constructor(e){super({type:"LineMaterial",uniforms:$.clone(I.line.uniforms),vertexShader:I.line.vertexShader,fragmentShader:I.line.fragmentShader,clipping:!0}),this.isLineMaterial=!0,this.setValues(e)}get color(){return this.uniforms.diffuse.value}set color(e){this.uniforms.diffuse.value=e}get worldUnits(){return"WORLD_UNITS"in this.defines}set worldUnits(e){e===!0!==this.worldUnits&&(this.needsUpdate=!0),e===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}get linewidth(){return this.uniforms.linewidth.value}set linewidth(e){this.uniforms.linewidth&&(this.uniforms.linewidth.value=e)}get dashed(){return"USE_DASH"in this.defines}set dashed(e){e===!0!==this.dashed&&(this.needsUpdate=!0),e===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}get dashScale(){return this.uniforms.dashScale.value}set dashScale(e){this.uniforms.dashScale.value=e}get dashSize(){return this.uniforms.dashSize.value}set dashSize(e){this.uniforms.dashSize.value=e}get dashOffset(){return this.uniforms.dashOffset.value}set dashOffset(e){this.uniforms.dashOffset.value=e}get gapSize(){return this.uniforms.gapSize.value}set gapSize(e){this.uniforms.gapSize.value=e}get opacity(){return this.uniforms.opacity.value}set opacity(e){this.uniforms&&(this.uniforms.opacity.value=e)}get resolution(){return this.uniforms.resolution.value}set resolution(e){this.uniforms.resolution.value.copy(e)}get alphaToCoverage(){return"USE_ALPHA_TO_COVERAGE"in this.defines}set alphaToCoverage(e){this.defines&&(e===!0!==this.alphaToCoverage&&(this.needsUpdate=!0),e===!0?this.defines.USE_ALPHA_TO_COVERAGE="":delete this.defines.USE_ALPHA_TO_COVERAGE)}}const H=new B,X=new E,q=new E,f=new B,u=new B,x=new B,W=new E,R=new ae,p=new oe,K=new E,T=new j,C=new J,S=new B;let b,z;function Z(h,e,n){return S.set(0,0,-e,1).applyMatrix4(h.projectionMatrix),S.multiplyScalar(1/S.w),S.x=z/n.width,S.y=z/n.height,S.applyMatrix4(h.projectionMatrixInverse),S.multiplyScalar(1/S.w),Math.abs(Math.max(S.x,S.y))}function ve(h,e){const n=h.matrixWorld,i=h.geometry,t=i.attributes.instanceStart,o=i.attributes.instanceEnd,l=Math.min(i.instanceCount,t.count);for(let s=0,a=l;s<a;s++){p.start.fromBufferAttribute(t,s),p.end.fromBufferAttribute(o,s),p.applyMatrix4(n);const d=new E,m=new E;b.distanceSqToSegment(p.start,p.end,m,d),m.distanceTo(d)<z*.5&&e.push({point:m,pointOnLine:d,distance:b.origin.distanceTo(m),object:h,face:null,faceIndex:s,uv:null,uv1:null})}}function ye(h,e,n){const i=e.projectionMatrix,o=h.material.resolution,l=h.matrixWorld,s=h.geometry,a=s.attributes.instanceStart,d=s.attributes.instanceEnd,m=Math.min(s.instanceCount,a.count),c=-e.near;b.at(1,x),x.w=1,x.applyMatrix4(e.matrixWorldInverse),x.applyMatrix4(i),x.multiplyScalar(1/x.w),x.x*=o.x/2,x.y*=o.y/2,x.z=0,W.copy(x),R.multiplyMatrices(e.matrixWorldInverse,l);for(let g=0,r=m;g<r;g++){if(f.fromBufferAttribute(a,g),u.fromBufferAttribute(d,g),f.w=1,u.w=1,f.applyMatrix4(R),u.applyMatrix4(R),f.z>c&&u.z>c)continue;if(f.z>c){const _=f.z-u.z,w=(f.z-c)/_;f.lerp(u,w)}else if(u.z>c){const _=u.z-f.z,w=(u.z-c)/_;u.lerp(f,w)}f.applyMatrix4(i),u.applyMatrix4(i),f.multiplyScalar(1/f.w),u.multiplyScalar(1/u.w),f.x*=o.x/2,f.y*=o.y/2,u.x*=o.x/2,u.y*=o.y/2,p.start.copy(f),p.start.z=0,p.end.copy(u),p.end.z=0;const y=p.closestPointToPointParameter(W,!0);p.at(y,K);const U=re.lerp(f.z,u.z,y),L=U>=-1&&U<=1,D=W.distanceTo(K)<z*.5;if(L&&D){p.start.fromBufferAttribute(a,g),p.end.fromBufferAttribute(d,g),p.start.applyMatrix4(l),p.end.applyMatrix4(l);const _=new E,w=new E;b.distanceSqToSegment(p.start,p.end,w,_),n.push({point:w,pointOnLine:_,distance:b.origin.distanceTo(w),object:h,face:null,faceIndex:g,uv:null,uv1:null})}}}class we extends se{constructor(e=new Q,n=new N({color:Math.random()*16777215})){super(e,n),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){const e=this.geometry,n=e.attributes.instanceStart,i=e.attributes.instanceEnd,t=new Float32Array(2*n.count);for(let l=0,s=0,a=n.count;l<a;l++,s+=2)X.fromBufferAttribute(n,l),q.fromBufferAttribute(i,l),t[s]=s===0?0:t[s-1],t[s+1]=t[s]+X.distanceTo(q);const o=new G(t,2,1);return e.setAttribute("instanceDistanceStart",new M(o,1,0)),e.setAttribute("instanceDistanceEnd",new M(o,1,1)),this}raycast(e,n){const i=this.material.worldUnits,t=e.camera;if(t===null&&!i&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.'),i===!1&&(this.material.resolution.x===0||this.material.resolution.y===0))return;const o=e.params.Line2!==void 0&&e.params.Line2.threshold||0;b=e.ray;const l=this.matrixWorld,s=this.geometry,a=this.material;z=a.linewidth+o,s.boundingSphere===null&&s.computeBoundingSphere(),C.copy(s.boundingSphere).applyMatrix4(l);let d;if(i)d=z*.5;else{const c=Math.max(t.near,C.distanceToPoint(b.origin));d=Z(t,c,a.resolution)}if(C.radius+=d,b.intersectsSphere(C)===!1)return;s.boundingBox===null&&s.computeBoundingBox(),T.copy(s.boundingBox).applyMatrix4(l);let m;if(i)m=z*.5;else{const c=Math.max(t.near,T.distanceToPoint(b.origin));m=Z(t,c,a.resolution)}T.expandByScalar(m),b.intersectsBox(T)!==!1&&(i?ve(this,n):ye(this,t,n))}onBeforeRender(e){const n=this.material.uniforms;n&&n.resolution&&(e.getViewport(H),this.material.uniforms.resolution.value.set(H.z,H.w))}}class Y extends Q{constructor(){super(),this.isLineGeometry=!0,this.type="LineGeometry"}setPositions(e){const n=e.length-3,i=new Float32Array(2*n);for(let t=0;t<n;t+=3)i[2*t]=e[t],i[2*t+1]=e[t+1],i[2*t+2]=e[t+2],i[2*t+3]=e[t+3],i[2*t+4]=e[t+4],i[2*t+5]=e[t+5];return super.setPositions(i),this}setColors(e){const n=e.length-3,i=new Float32Array(2*n);for(let t=0;t<n;t+=3)i[2*t]=e[t],i[2*t+1]=e[t+1],i[2*t+2]=e[t+2],i[2*t+3]=e[t+3],i[2*t+4]=e[t+4],i[2*t+5]=e[t+5];return super.setColors(i),this}setFromPoints(e){const n=e.length-1,i=new Float32Array(6*n);for(let t=0;t<n;t++)i[6*t]=e[t].x,i[6*t+1]=e[t].y,i[6*t+2]=e[t].z||0,i[6*t+3]=e[t+1].x,i[6*t+4]=e[t+1].y,i[6*t+5]=e[t+1].z||0;return super.setPositions(i),this}fromLine(e){const n=e.geometry;return this.setPositions(n.attributes.position.array),this}}class xe extends we{constructor(e=new Y,n=new N({color:Math.random()*16777215})){super(e,n),this.isLine2=!0,this.type="Line2"}}class A{constructor(e){this.layer=e,this.group.name="traces"}static LINE_WIDTH_PX=2.5;static MARKER_SIZE_PX=9;static LABEL_HEIGHT_PX=15;static STEP_M=15;static LIFT_M=.3;group=new le;materials=[];pointsMaterials=[];labels=[];viewportHeightPx=720;fovDeg=60;set(e,n,i,t,o,l){this.empty();for(const s of e){const a=this.positions(s,i,t,o,l),d=new ce(s.color??de),m=n.get(s.id);if(m&&a.length>=3&&this.addLabel(m,this.labelAnchor(a,s.kind)),s.kind==="point"){const c=new fe;c.setAttribute("position",new F(a.slice(0,3),3));const g=new ue({color:d,size:A.MARKER_SIZE_PX,sizeAttenuation:!1,depthTest:!1,fog:!1});this.pointsMaterials.push(g);const r=new pe(c,g);r.name="trace point",r.frustumCulled=!1,r.layers.set(this.layer),this.group.add(r)}else if(a.length>=6){const c=new Y;c.setPositions(s.kind==="polygon"?[...a,a[0],a[1],a[2]]:a);const g=new N({color:d.getHex(),linewidth:A.LINE_WIDTH_PX,worldUnits:!1,transparent:!0,opacity:.92,depthTest:!1,fog:!1});this.materials.push(g);const r=new xe(c,g);r.name=`trace ${s.kind}`,r.frustumCulled=!1,r.layers.set(this.layer),this.group.add(r)}}}setView(e,n){for(const i of this.materials)i.resolution.copy(e);e.y===this.viewportHeightPx&&n===this.fovDeg||(this.viewportHeightPx=e.y,this.fovDeg=n,this.scaleLabels())}get any(){return this.group.children.length>0}dispose(){this.empty()}labelAnchor(e,n){let i=0;if(n==="line"){let t=-1;for(let o=0;o+2<e.length;o+=3){const l=Math.hypot(e[o],e[o+2]);l>t&&(t=l,i=o)}}return[e[i],e[i+1],e[i+2]]}addLabel(e,n){const i=document.createElement("canvas"),t=i.getContext("2d");if(!t)return;const o="bold 30px sans-serif";t.font=o;const l=10;i.width=Math.ceil(t.measureText(e).width)+l*2,i.height=44,t.font=o,t.fillStyle="rgba(0, 0, 0, 0.6)",t.beginPath(),t.roundRect(0,0,i.width,i.height,10),t.fill(),t.fillStyle="#ffffff",t.textBaseline="middle",t.fillText(e,l,i.height/2+2);const s=new he({map:new me(i),depthTest:!1,depthWrite:!1,fog:!1,sizeAttenuation:!1}),a=new V(s);a.name="trace name",a.center.set(0,0),a.position.set(n[0],n[1],n[2]),a.frustumCulled=!1,a.layers.set(this.layer),this.labels.push({sprite:a,aspect:i.width/i.height}),this.group.add(a),this.scaleLabels()}scaleLabels(){const e=A.LABEL_HEIGHT_PX/(this.viewportHeightPx/2)*Math.tan(this.fovDeg*Math.PI/360);for(const{sprite:n,aspect:i}of this.labels)n.scale.set(e*i,e,1)}empty(){for(const e of[...this.group.children])this.group.remove(e),e instanceof V?(e.material.map?.dispose(),e.material.dispose()):e.geometry.dispose();this.labels.length=0;for(const e of this.materials.splice(0))e.dispose();for(const e of this.pointsMaterials.splice(0))e.dispose()}positions(e,n,i,t,o){const l=e.altitude??"ground",s=e.points.map(r=>{const{x:v,z:y}=ge(r.lat,r.lng,n,i);return{x:v,z:y,altM:r.altM??0}}),a=l!=="absolute",d=[],m=(r,v,y)=>l==="absolute"?y-t:o(r,v)+(l==="relative"?y:0)+A.LIFT_M,c=e.kind==="polygon",g=c?s.length:s.length-1;for(let r=0;r<Math.max(g,1);r++){const v=s[r],y=s[(r+1)%s.length],U=a&&e.kind!=="point"?Math.max(1,Math.ceil(Math.hypot(y.x-v.x,y.z-v.z)/A.STEP_M)):1;for(let L=0;L<U;L++){const D=L/U,_=v.x+(y.x-v.x)*D,w=v.z+(y.z-v.z)*D;d.push(_,m(_,w,v.altM+(y.altM-v.altM)*D),w)}}if(!c&&e.kind!=="point"){const r=s[s.length-1];d.push(r.x,m(r.x,r.z,r.altM),r.z)}return d}}export{A as TraceSystem};
393
+ `};class N extends ie{constructor(e){super({type:"LineMaterial",uniforms:J.clone(I.line.uniforms),vertexShader:I.line.vertexShader,fragmentShader:I.line.fragmentShader,clipping:!0}),this.isLineMaterial=!0,this.setValues(e)}get color(){return this.uniforms.diffuse.value}set color(e){this.uniforms.diffuse.value=e}get worldUnits(){return"WORLD_UNITS"in this.defines}set worldUnits(e){e===!0!==this.worldUnits&&(this.needsUpdate=!0),e===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}get linewidth(){return this.uniforms.linewidth.value}set linewidth(e){this.uniforms.linewidth&&(this.uniforms.linewidth.value=e)}get dashed(){return"USE_DASH"in this.defines}set dashed(e){e===!0!==this.dashed&&(this.needsUpdate=!0),e===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}get dashScale(){return this.uniforms.dashScale.value}set dashScale(e){this.uniforms.dashScale.value=e}get dashSize(){return this.uniforms.dashSize.value}set dashSize(e){this.uniforms.dashSize.value=e}get dashOffset(){return this.uniforms.dashOffset.value}set dashOffset(e){this.uniforms.dashOffset.value=e}get gapSize(){return this.uniforms.gapSize.value}set gapSize(e){this.uniforms.gapSize.value=e}get opacity(){return this.uniforms.opacity.value}set opacity(e){this.uniforms&&(this.uniforms.opacity.value=e)}get resolution(){return this.uniforms.resolution.value}set resolution(e){this.uniforms.resolution.value.copy(e)}get alphaToCoverage(){return"USE_ALPHA_TO_COVERAGE"in this.defines}set alphaToCoverage(e){this.defines&&(e===!0!==this.alphaToCoverage&&(this.needsUpdate=!0),e===!0?this.defines.USE_ALPHA_TO_COVERAGE="":delete this.defines.USE_ALPHA_TO_COVERAGE)}}const H=new B,X=new E,q=new E,f=new B,u=new B,x=new B,W=new E,R=new ae,p=new oe,K=new E,T=new j,C=new $,S=new B;let b,z;function Z(h,e,n){return S.set(0,0,-e,1).applyMatrix4(h.projectionMatrix),S.multiplyScalar(1/S.w),S.x=z/n.width,S.y=z/n.height,S.applyMatrix4(h.projectionMatrixInverse),S.multiplyScalar(1/S.w),Math.abs(Math.max(S.x,S.y))}function ve(h,e){const n=h.matrixWorld,i=h.geometry,t=i.attributes.instanceStart,o=i.attributes.instanceEnd,l=Math.min(i.instanceCount,t.count);for(let s=0,a=l;s<a;s++){p.start.fromBufferAttribute(t,s),p.end.fromBufferAttribute(o,s),p.applyMatrix4(n);const d=new E,m=new E;b.distanceSqToSegment(p.start,p.end,m,d),m.distanceTo(d)<z*.5&&e.push({point:m,pointOnLine:d,distance:b.origin.distanceTo(m),object:h,face:null,faceIndex:s,uv:null,uv1:null})}}function ye(h,e,n){const i=e.projectionMatrix,o=h.material.resolution,l=h.matrixWorld,s=h.geometry,a=s.attributes.instanceStart,d=s.attributes.instanceEnd,m=Math.min(s.instanceCount,a.count),c=-e.near;b.at(1,x),x.w=1,x.applyMatrix4(e.matrixWorldInverse),x.applyMatrix4(i),x.multiplyScalar(1/x.w),x.x*=o.x/2,x.y*=o.y/2,x.z=0,W.copy(x),R.multiplyMatrices(e.matrixWorldInverse,l);for(let g=0,r=m;g<r;g++){if(f.fromBufferAttribute(a,g),u.fromBufferAttribute(d,g),f.w=1,u.w=1,f.applyMatrix4(R),u.applyMatrix4(R),f.z>c&&u.z>c)continue;if(f.z>c){const _=f.z-u.z,w=(f.z-c)/_;f.lerp(u,w)}else if(u.z>c){const _=u.z-f.z,w=(u.z-c)/_;u.lerp(f,w)}f.applyMatrix4(i),u.applyMatrix4(i),f.multiplyScalar(1/f.w),u.multiplyScalar(1/u.w),f.x*=o.x/2,f.y*=o.y/2,u.x*=o.x/2,u.y*=o.y/2,p.start.copy(f),p.start.z=0,p.end.copy(u),p.end.z=0;const y=p.closestPointToPointParameter(W,!0);p.at(y,K);const U=re.lerp(f.z,u.z,y),L=U>=-1&&U<=1,D=W.distanceTo(K)<z*.5;if(L&&D){p.start.fromBufferAttribute(a,g),p.end.fromBufferAttribute(d,g),p.start.applyMatrix4(l),p.end.applyMatrix4(l);const _=new E,w=new E;b.distanceSqToSegment(p.start,p.end,w,_),n.push({point:w,pointOnLine:_,distance:b.origin.distanceTo(w),object:h,face:null,faceIndex:g,uv:null,uv1:null})}}}class we extends se{constructor(e=new Q,n=new N({color:Math.random()*16777215})){super(e,n),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){const e=this.geometry,n=e.attributes.instanceStart,i=e.attributes.instanceEnd,t=new Float32Array(2*n.count);for(let l=0,s=0,a=n.count;l<a;l++,s+=2)X.fromBufferAttribute(n,l),q.fromBufferAttribute(i,l),t[s]=s===0?0:t[s-1],t[s+1]=t[s]+X.distanceTo(q);const o=new G(t,2,1);return e.setAttribute("instanceDistanceStart",new M(o,1,0)),e.setAttribute("instanceDistanceEnd",new M(o,1,1)),this}raycast(e,n){const i=this.material.worldUnits,t=e.camera;if(t===null&&!i&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.'),i===!1&&(this.material.resolution.x===0||this.material.resolution.y===0))return;const o=e.params.Line2!==void 0&&e.params.Line2.threshold||0;b=e.ray;const l=this.matrixWorld,s=this.geometry,a=this.material;z=a.linewidth+o,s.boundingSphere===null&&s.computeBoundingSphere(),C.copy(s.boundingSphere).applyMatrix4(l);let d;if(i)d=z*.5;else{const c=Math.max(t.near,C.distanceToPoint(b.origin));d=Z(t,c,a.resolution)}if(C.radius+=d,b.intersectsSphere(C)===!1)return;s.boundingBox===null&&s.computeBoundingBox(),T.copy(s.boundingBox).applyMatrix4(l);let m;if(i)m=z*.5;else{const c=Math.max(t.near,T.distanceToPoint(b.origin));m=Z(t,c,a.resolution)}T.expandByScalar(m),b.intersectsBox(T)!==!1&&(i?ve(this,n):ye(this,t,n))}onBeforeRender(e){const n=this.material.uniforms;n&&n.resolution&&(e.getViewport(H),this.material.uniforms.resolution.value.set(H.z,H.w))}}class Y extends Q{constructor(){super(),this.isLineGeometry=!0,this.type="LineGeometry"}setPositions(e){const n=e.length-3,i=new Float32Array(2*n);for(let t=0;t<n;t+=3)i[2*t]=e[t],i[2*t+1]=e[t+1],i[2*t+2]=e[t+2],i[2*t+3]=e[t+3],i[2*t+4]=e[t+4],i[2*t+5]=e[t+5];return super.setPositions(i),this}setColors(e){const n=e.length-3,i=new Float32Array(2*n);for(let t=0;t<n;t+=3)i[2*t]=e[t],i[2*t+1]=e[t+1],i[2*t+2]=e[t+2],i[2*t+3]=e[t+3],i[2*t+4]=e[t+4],i[2*t+5]=e[t+5];return super.setColors(i),this}setFromPoints(e){const n=e.length-1,i=new Float32Array(6*n);for(let t=0;t<n;t++)i[6*t]=e[t].x,i[6*t+1]=e[t].y,i[6*t+2]=e[t].z||0,i[6*t+3]=e[t+1].x,i[6*t+4]=e[t+1].y,i[6*t+5]=e[t+1].z||0;return super.setPositions(i),this}fromLine(e){const n=e.geometry;return this.setPositions(n.attributes.position.array),this}}class xe extends we{constructor(e=new Y,n=new N({color:Math.random()*16777215})){super(e,n),this.isLine2=!0,this.type="Line2"}}class A{constructor(e){this.layer=e,this.group.name="traces"}static LINE_WIDTH_PX=2.5;static MARKER_SIZE_PX=9;static LABEL_HEIGHT_PX=15;static STEP_M=15;static LIFT_M=.3;group=new le;materials=[];pointsMaterials=[];labels=[];viewportHeightPx=720;fovDeg=60;set(e,n,i,t,o,l){this.empty();for(const s of e){const a=this.positions(s,i,t,o,l),d=new ce(s.color??de),m=n.get(s.id);if(m&&a.length>=3&&this.addLabel(m,this.labelAnchor(a,s.kind)),s.kind==="point"){const c=new fe;c.setAttribute("position",new F(a.slice(0,3),3));const g=new ue({color:d,size:A.MARKER_SIZE_PX,sizeAttenuation:!1,depthTest:!1,fog:!1});this.pointsMaterials.push(g);const r=new pe(c,g);r.name="trace point",r.frustumCulled=!1,r.layers.set(this.layer),this.group.add(r)}else if(a.length>=6){const c=new Y;c.setPositions(s.kind==="polygon"?[...a,a[0],a[1],a[2]]:a);const g=new N({color:d.getHex(),linewidth:A.LINE_WIDTH_PX,worldUnits:!1,transparent:!0,opacity:.92,depthTest:!1,fog:!1});this.materials.push(g);const r=new xe(c,g);r.name=`trace ${s.kind}`,r.frustumCulled=!1,r.layers.set(this.layer),this.group.add(r)}}}setView(e,n){for(const i of this.materials)i.resolution.copy(e);e.y===this.viewportHeightPx&&n===this.fovDeg||(this.viewportHeightPx=e.y,this.fovDeg=n,this.scaleLabels())}get any(){return this.group.children.length>0}dispose(){this.empty()}labelAnchor(e,n){let i=0;if(n==="line"){let t=-1;for(let o=0;o+2<e.length;o+=3){const l=Math.hypot(e[o],e[o+2]);l>t&&(t=l,i=o)}}return[e[i],e[i+1],e[i+2]]}addLabel(e,n){const i=document.createElement("canvas"),t=i.getContext("2d");if(!t)return;const o="bold 30px sans-serif";t.font=o;const l=10;i.width=Math.ceil(t.measureText(e).width)+l*2,i.height=44,t.font=o,t.fillStyle="rgba(0, 0, 0, 0.6)",t.beginPath(),t.roundRect(0,0,i.width,i.height,10),t.fill(),t.fillStyle="#ffffff",t.textBaseline="middle",t.fillText(e,l,i.height/2+2);const s=new he({map:new me(i),depthTest:!1,depthWrite:!1,fog:!1,sizeAttenuation:!1}),a=new V(s);a.name="trace name",a.center.set(0,0),a.position.set(n[0],n[1],n[2]),a.frustumCulled=!1,a.layers.set(this.layer),this.labels.push({sprite:a,aspect:i.width/i.height}),this.group.add(a),this.scaleLabels()}scaleLabels(){const e=A.LABEL_HEIGHT_PX/(this.viewportHeightPx/2)*Math.tan(this.fovDeg*Math.PI/360);for(const{sprite:n,aspect:i}of this.labels)n.scale.set(e*i,e,1)}empty(){for(const e of[...this.group.children])this.group.remove(e),e instanceof V?(e.material.map?.dispose(),e.material.dispose()):e.geometry.dispose();this.labels.length=0;for(const e of this.materials.splice(0))e.dispose();for(const e of this.pointsMaterials.splice(0))e.dispose()}positions(e,n,i,t,o){const l=e.altitude??"ground",s=e.points.map(r=>{const{x:v,z:y}=ge(r.lat,r.lng,n,i);return{x:v,z:y,altM:r.altM??0}}),a=l!=="absolute",d=[],m=(r,v,y)=>l==="absolute"?y-t:o(r,v)+(l==="relative"?y:0)+A.LIFT_M,c=e.kind==="polygon",g=c?s.length:s.length-1;for(let r=0;r<Math.max(g,1);r++){const v=s[r],y=s[(r+1)%s.length],U=a&&e.kind!=="point"?Math.max(1,Math.ceil(Math.hypot(y.x-v.x,y.z-v.z)/A.STEP_M)):1;for(let L=0;L<U;L++){const D=L/U,_=v.x+(y.x-v.x)*D,w=v.z+(y.z-v.z)*D;d.push(_,m(_,w,v.altM+(y.altM-v.altM)*D),w)}}if(!c&&e.kind!=="point"){const r=s[s.length-1];d.push(r.x,m(r.x,r.z,r.altM),r.z)}return d}}export{A as TraceSystem};
@@ -1 +1 @@
1
- import{ah as e}from"./rr0-scene.mjs";const t={play:"Play",clickToPlay:"Click to play",pause:"Pause",noDuration:"No observation duration",currentPosition:"Current position",duration:"Duration",switchToElapsed:"click to show elapsed time",switchToClockTime:"click to show the time of day",fullscreen:"Fullscreen",exitFullscreen:"Exit fullscreen",recordVideo:"Record a video of the observation",recordingVideo:"Video being made: {percent} %. Click to stop it",videoFailed:"The video could not be made: {reason}",videoSize:"Size",videoSizeScreen:"As on screen ({size})",videoCaption:"Caption",videoTime:"Time",videoMap:"Map",videoStart:"Record",videoKit:"Generative AI kit",videoKitHint:"A zip to make a realistic video of this reconstruction with a video generator (Runway, Kling, Luma…): the film without captions, its depth, the phenomenon's mask, a prompt and instructions.",videoFrom:"Start",videoTo:"End",videoHere:"Here",videoHereHint:"Where the playback is",videoDescription:"Reconstruction made with UFO@home from the witness's account: a simulation, not a recording of the observation.",mute:"Mute",volume:"Volume",unmute:"Unmute",noSound:"No sound recorded",moments:"Moments",moreControls:"More controls",fewerControls:"Fewer controls",showObserverMap:"Show where the witness was",hideObserverMap:"Hide where the witness was",mapImageryUnavailable:"Aerial imagery unavailable",zoomMapIn:"Zoom in",zoomMapOut:"Zoom out",fitMap:"Back to the whole path",placeObserverHere:"Put the witness here",showReferences:"Show the pictures of the place",hideReferences:"Hide the pictures of the place",showTraces:"Show the investigator's lines",hideTraces:"Hide the investigator's lines",referenceOpacity:"Picture opacity",referencesMenu:"Pictures of the place",showMilestones:"Show the account's moments",hideMilestones:"Hide the account's moments",observerHere:"The witness, here",decorHere:"Scenery",recordingIssues:"{count} problem(s) in this recording: it may not play as its author meant",issueTemplates:e.EN};export{t as ufoMessages_en};
1
+ import{ak as e}from"./rr0-scene.mjs";const t={play:"Play",clickToPlay:"Click to play",pause:"Pause",noDuration:"No observation duration",currentPosition:"Current position",duration:"Duration",switchToElapsed:"click to show elapsed time",switchToClockTime:"click to show the time of day",fullscreen:"Fullscreen",exitFullscreen:"Exit fullscreen",recordVideo:"Record a video of the observation",recordingVideo:"Video being made: {percent} %. Click to stop it",videoFailed:"The video could not be made: {reason}",videoSize:"Size",videoSizeScreen:"As on screen ({size})",videoCaption:"Caption",videoTime:"Time",videoMap:"Map",videoStart:"Record",videoKit:"Generative AI kit",videoKitHint:"A zip to make a realistic video of this reconstruction with a video generator (Runway, Kling, Luma…): the film without captions, its depth, the phenomenon's mask, a prompt and instructions.",videoFrom:"Start",videoTo:"End",videoHere:"Here",videoHereHint:"Where the playback is",videoDescription:"Reconstruction made with UFO@home from the witness's account: a simulation, not a recording of the observation.",mute:"Mute",volume:"Volume",unmute:"Unmute",noSound:"No sound recorded",moments:"Moments",moreControls:"More controls",fewerControls:"Fewer controls",showObserverMap:"Show where the witness was",hideObserverMap:"Hide where the witness was",mapImageryUnavailable:"Aerial imagery unavailable",zoomMapIn:"Zoom in",zoomMapOut:"Zoom out",fitMap:"Back to the whole path",placeObserverHere:"Put the witness here",showReferences:"Show the pictures of the place",hideReferences:"Hide the pictures of the place",showTraces:"Show the investigator's lines",hideTraces:"Hide the investigator's lines",referenceOpacity:"Picture opacity",referencesMenu:"Pictures of the place",showMilestones:"Show the account's moments",hideMilestones:"Hide the account's moments",observerHere:"The witness, here",decorHere:"Scenery",recordingIssues:"{count} problem(s) in this recording: it may not play as its author meant",issueTemplates:e.EN};export{t as ufoMessages_en};
@@ -1,4 +1,4 @@
1
- import{G as b,d as F,C as E,e as L,g as D,V as M,h as I,i as C,j as R,k as N,m as U,S as T,W as B,n as O,H as P,B as V,F as A}from"./rr0-scene.mjs";class r{static LIFT_M=.05;static RENDER_ORDER=1.04;static LEVEL_QUANTILE=.2;static BODY_ALBEDO=[.035,.045,.04];static IOR=1.33;static ROUGHNESS=.08;static MAX_SAMPLES=48;static REFLECTION_SCALE=.5;group=new b;material=new F({color:new E(...r.BODY_ALBEDO),roughness:r.ROUGHNESS,metalness:0,ior:r.IOR,polygonOffset:!0,polygonOffsetFactor:-2,polygonOffsetUnits:-2});levels=new Map;reflectionTarget;reflectionUniforms={uWaterReflection:{value:null},uWaterReflectionMatrix:{value:new L},uWaterReflectionOn:{value:0}};mirrorCamera=new D;eye=new M;ahead=new M;up=new M;plane=new I;clip=new C;q=new C;size=new R;bias=new L().set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);constructor(){this.group.name="water",this.material.onBeforeCompile=t=>{Object.assign(t.uniforms,this.reflectionUniforms),t.vertexShader=t.vertexShader.replace("#include <common>",`#include <common>
1
+ import{G as b,g as F,C as E,h as L,i as D,V as M,j as I,k as C,m as R,n as N,o as U,p as T,W as B,q as O,H as P,B as V,F as A}from"./rr0-scene.mjs";class r{static LIFT_M=.05;static RENDER_ORDER=1.04;static LEVEL_QUANTILE=.2;static BODY_ALBEDO=[.035,.045,.04];static IOR=1.33;static ROUGHNESS=.08;static MAX_SAMPLES=48;static REFLECTION_SCALE=.5;group=new b;material=new F({color:new E(...r.BODY_ALBEDO),roughness:r.ROUGHNESS,metalness:0,ior:r.IOR,polygonOffset:!0,polygonOffsetFactor:-2,polygonOffsetUnits:-2});levels=new Map;reflectionTarget;reflectionUniforms={uWaterReflection:{value:null},uWaterReflectionMatrix:{value:new L},uWaterReflectionOn:{value:0}};mirrorCamera=new D;eye=new M;ahead=new M;up=new M;plane=new I;clip=new C;q=new C;size=new R;bias=new L().set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);constructor(){this.group.name="water",this.material.onBeforeCompile=t=>{Object.assign(t.uniforms,this.reflectionUniforms),t.vertexShader=t.vertexShader.replace("#include <common>",`#include <common>
2
2
  varying vec3 vWaterWorld;`).replace("#include <project_vertex>",`#include <project_vertex>
3
3
  vWaterWorld = (modelMatrix * vec4(transformed, 1.0)).xyz;`),t.fragmentShader=t.fragmentShader.replace("#include <common>",`#include <common>
4
4
  varying vec3 vWaterWorld;
@@ -16,4 +16,4 @@ vWaterWorld = (modelMatrix * vec4(transformed, 1.0)).xyz;`),t.fragmentShader=t.f
16
16
  outgoingLight = outgoingLight * (1.0 - mirrored.a * fresnel) + mirrored.rgb * fresnel;
17
17
  }
18
18
  }
19
- #include <opaque_fragment>`)}}set(t,o,e,f,i,a){this.clear();for(const l of t){const h=l.rings.map(n=>r.clip(n.map(u=>N(u.lat,u.lng,o,e)),i)),c=h[0];if(!c||c.length<3)continue;const d=h.slice(1).filter(n=>n.length>=3),p=r.level(c,d,f,a);if(p===void 0)continue;const s=r.geometry(c,d,p+r.LIFT_M);if(!s)continue;const g=new U(s,this.material);g.name=`water ${l.id}`,g.renderOrder=r.RENDER_ORDER,g.receiveShadow=!0,this.group.add(g),this.levels.set(g,{y:p+r.LIFT_M,areaM2:Math.abs(T.area(c.map(n=>new R(n.x,n.z))))})}}get count(){return this.group.children.length}clear(){for(const t of[...this.group.children])t.geometry.dispose(),this.group.remove(t);this.levels.clear()}dispose(){this.clear(),this.material.dispose(),this.reflectionTarget?.dispose()}reflectBodies(t,o,e,f,i,a){const l=this.reflectionUniforms;l.uWaterReflectionOn.value=0;let h;for(const[v,y]of this.levels)v.visible&&(!h||y.areaM2>h.areaM2)&&(h=y);if(!i||!h)return;this.group.updateWorldMatrix(!0,!1);const c=h.y+this.group.position.y;if(e.updateMatrixWorld(),this.eye.setFromMatrixPosition(e.matrixWorld),this.eye.y<=c)return;t.getDrawingBufferSize(this.size);const d=Math.max(16,Math.round(this.size.x*r.REFLECTION_SCALE)),p=Math.max(16,Math.round(this.size.y*r.REFLECTION_SCALE));(!this.reflectionTarget||this.reflectionTarget.width!==d||this.reflectionTarget.height!==p)&&(this.reflectionTarget?.dispose(),this.reflectionTarget=new B(d,p,{type:P,minFilter:O,magFilter:O}));const s=this.mirrorCamera,g=v=>v.setY(2*c-v.y);s.position.copy(g(this.eye.clone())),e.getWorldDirection(this.ahead);const n=g(this.eye.clone().add(this.ahead));this.up.set(0,1,0).applyQuaternion(e.quaternion),s.up.set(this.up.x,-this.up.y,this.up.z),s.lookAt(n),s.fov=a??e.fov,s.aspect=e.aspect,s.near=e.near,s.far=e.far,s.updateProjectionMatrix(),s.updateMatrixWorld(),this.clipAtLevel(s,c),l.uWaterReflectionMatrix.value.copy(this.bias).multiply(s.projectionMatrix).multiply(s.matrixWorldInverse),o.traverseVisible(v=>{v.isLight&&v.layers.enable(f)});const u=t.getRenderTarget(),m=t.autoClear,x=t.shadowMap.autoUpdate,w=o.background,z=t.getClearAlpha();t.getClearColor(r.clearColor),o.background=null,t.shadowMap.autoUpdate=!1,t.setRenderTarget(this.reflectionTarget),t.setClearColor(0,0),t.autoClear=!0,s.layers.set(f),t.render(o,s),t.setRenderTarget(u),t.setClearColor(r.clearColor,z),t.autoClear=m,t.shadowMap.autoUpdate=x,o.background=w,l.uWaterReflection.value=this.reflectionTarget.texture,l.uWaterReflectionOn.value=1}static clearColor=new E;clipAtLevel(t,o){this.plane.setFromNormalAndCoplanarPoint(new M(0,1,0),new M(0,o,0)).applyMatrix4(t.matrixWorldInverse),this.clip.set(this.plane.normal.x,this.plane.normal.y,this.plane.normal.z,this.plane.constant);const e=t.projectionMatrix.elements;this.q.set((Math.sign(this.clip.x)+e[8])/e[0],(Math.sign(this.clip.y)+e[9])/e[5],-1,(1+e[10])/e[14]),this.clip.multiplyScalar(2/this.clip.dot(this.q)),e[2]=this.clip.x,e[6]=this.clip.y,e[10]=this.clip.z+1,e[14]=this.clip.w}static level(t,o,e,f){const i=t.map(n=>n.x),a=t.map(n=>n.z),[l,h,c,d]=[Math.min(...i),Math.max(...i),Math.min(...a),Math.max(...a)],p=Math.max(f,(h-l)/r.MAX_SAMPLES,(d-c)/r.MAX_SAMPLES,.5),s=[];for(let n=c+p/2;n<d;n+=p)for(let u=l+p/2;u<h;u+=p){const m={x:u,z:n};if(!r.contains(t,m)||o.some(w=>r.contains(w,m)))continue;const x=e(u,n);Number.isFinite(x)&&s.push(x)}if(s.length===0)for(const n of t)s.push(e(n.x,n.z));const g=s.filter(Number.isFinite).sort((n,u)=>n-u);if(g.length!==0)return g[Math.floor((g.length-1)*r.LEVEL_QUANTILE)]}static clip(t,o){let e=t;const f=[{inside:i=>i.x>=-o,cross:(i,a)=>r.atX(i,a,-o)},{inside:i=>i.x<=o,cross:(i,a)=>r.atX(i,a,o)},{inside:i=>i.z>=-o,cross:(i,a)=>r.atZ(i,a,-o)},{inside:i=>i.z<=o,cross:(i,a)=>r.atZ(i,a,o)}];for(const i of f){const a=[];for(let l=0;l<e.length;l++){const h=e[l],c=e[(l+e.length-1)%e.length];i.inside(h)?(i.inside(c)||a.push(i.cross(c,h)),a.push(h)):i.inside(c)&&a.push(i.cross(c,h))}if(e=a,e.length===0)break}return e}static atX(t,o,e){return{x:e,z:t.z+(o.z-t.z)*(e-t.x)/(o.x-t.x)}}static atZ(t,o,e){return{x:t.x+(o.x-t.x)*(e-t.z)/(o.z-t.z),z:e}}static contains(t,o){let e=!1;for(let f=0,i=t.length-1;f<t.length;i=f++){const a=t[f],l=t[i];a.z>o.z!=l.z>o.z&&o.x<(l.x-a.x)*(o.z-a.z)/(l.z-a.z)+a.x&&(e=!e)}return e}static geometry(t,o,e){const f=s=>new R(s.x,s.z),i=t.map(f),a=o.map(s=>s.map(f)),l=T.triangulateShape(i,a);if(l.length===0)return;const h=[...i,...a.flat()],c=[];for(const[s,g,n]of l){const[u,m,x]=[h[s],h[g],h[n]],w=(m.y-u.y)*(x.x-u.x)-(m.x-u.x)*(x.y-u.y)>0;for(const z of w?[u,m,x]:[u,x,m])c.push(z.x,e,z.y)}const d=new V;d.setAttribute("position",new A(c,3));const p=new Float32Array(c.length);for(let s=1;s<p.length;s+=3)p[s]=1;return d.setAttribute("normal",new A(p,3)),d.computeBoundingSphere(),d}}export{r as WaterSystem};
19
+ #include <opaque_fragment>`)}}set(t,o,e,p,i,a){this.clear();for(const l of t){const h=l.rings.map(n=>r.clip(n.map(u=>N(u.lat,u.lng,o,e)),i)),c=h[0];if(!c||c.length<3)continue;const d=h.slice(1).filter(n=>n.length>=3),f=r.level(c,d,p,a);if(f===void 0)continue;const s=r.geometry(c,d,f+r.LIFT_M);if(!s)continue;const g=new U(s,this.material);g.name=`water ${l.id}`,g.renderOrder=r.RENDER_ORDER,g.receiveShadow=!0,this.group.add(g),this.levels.set(g,{y:f+r.LIFT_M,areaM2:Math.abs(T.area(c.map(n=>new R(n.x,n.z))))})}}get count(){return this.group.children.length}clear(){for(const t of[...this.group.children])t.geometry.dispose(),this.group.remove(t);this.levels.clear()}dispose(){this.clear(),this.material.dispose(),this.reflectionTarget?.dispose()}reflectBodies(t,o,e,p,i,a){const l=this.reflectionUniforms;l.uWaterReflectionOn.value=0;let h;for(const[v,y]of this.levels)v.visible&&(!h||y.areaM2>h.areaM2)&&(h=y);if(!i||!h)return;this.group.updateWorldMatrix(!0,!1);const c=h.y+this.group.position.y;if(e.updateMatrixWorld(),this.eye.setFromMatrixPosition(e.matrixWorld),this.eye.y<=c)return;t.getDrawingBufferSize(this.size);const d=Math.max(16,Math.round(this.size.x*r.REFLECTION_SCALE)),f=Math.max(16,Math.round(this.size.y*r.REFLECTION_SCALE));(!this.reflectionTarget||this.reflectionTarget.width!==d||this.reflectionTarget.height!==f)&&(this.reflectionTarget?.dispose(),this.reflectionTarget=new B(d,f,{type:P,minFilter:O,magFilter:O}));const s=this.mirrorCamera,g=v=>v.setY(2*c-v.y);s.position.copy(g(this.eye.clone())),e.getWorldDirection(this.ahead);const n=g(this.eye.clone().add(this.ahead));this.up.set(0,1,0).applyQuaternion(e.quaternion),s.up.set(this.up.x,-this.up.y,this.up.z),s.lookAt(n),s.fov=a??e.fov,s.aspect=e.aspect,s.near=e.near,s.far=e.far,s.updateProjectionMatrix(),s.updateMatrixWorld(),this.clipAtLevel(s,c),l.uWaterReflectionMatrix.value.copy(this.bias).multiply(s.projectionMatrix).multiply(s.matrixWorldInverse),o.traverseVisible(v=>{v.isLight&&v.layers.enable(p)});const u=t.getRenderTarget(),m=t.autoClear,x=t.shadowMap.autoUpdate,w=o.background,z=t.getClearAlpha();t.getClearColor(r.clearColor),o.background=null,t.shadowMap.autoUpdate=!1,t.setRenderTarget(this.reflectionTarget),t.setClearColor(0,0),t.autoClear=!0,s.layers.set(p),t.render(o,s),t.setRenderTarget(u),t.setClearColor(r.clearColor,z),t.autoClear=m,t.shadowMap.autoUpdate=x,o.background=w,l.uWaterReflection.value=this.reflectionTarget.texture,l.uWaterReflectionOn.value=1}static clearColor=new E;clipAtLevel(t,o){this.plane.setFromNormalAndCoplanarPoint(new M(0,1,0),new M(0,o,0)).applyMatrix4(t.matrixWorldInverse),this.clip.set(this.plane.normal.x,this.plane.normal.y,this.plane.normal.z,this.plane.constant);const e=t.projectionMatrix.elements;this.q.set((Math.sign(this.clip.x)+e[8])/e[0],(Math.sign(this.clip.y)+e[9])/e[5],-1,(1+e[10])/e[14]),this.clip.multiplyScalar(2/this.clip.dot(this.q)),e[2]=this.clip.x,e[6]=this.clip.y,e[10]=this.clip.z+1,e[14]=this.clip.w}static level(t,o,e,p){const i=t.map(n=>n.x),a=t.map(n=>n.z),[l,h,c,d]=[Math.min(...i),Math.max(...i),Math.min(...a),Math.max(...a)],f=Math.max(p,(h-l)/r.MAX_SAMPLES,(d-c)/r.MAX_SAMPLES,.5),s=[];for(let n=c+f/2;n<d;n+=f)for(let u=l+f/2;u<h;u+=f){const m={x:u,z:n};if(!r.contains(t,m)||o.some(w=>r.contains(w,m)))continue;const x=e(u,n);Number.isFinite(x)&&s.push(x)}if(s.length===0)for(const n of t)s.push(e(n.x,n.z));const g=s.filter(Number.isFinite).sort((n,u)=>n-u);if(g.length!==0)return g[Math.floor((g.length-1)*r.LEVEL_QUANTILE)]}static clip(t,o){let e=t;const p=[{inside:i=>i.x>=-o,cross:(i,a)=>r.atX(i,a,-o)},{inside:i=>i.x<=o,cross:(i,a)=>r.atX(i,a,o)},{inside:i=>i.z>=-o,cross:(i,a)=>r.atZ(i,a,-o)},{inside:i=>i.z<=o,cross:(i,a)=>r.atZ(i,a,o)}];for(const i of p){const a=[];for(let l=0;l<e.length;l++){const h=e[l],c=e[(l+e.length-1)%e.length];i.inside(h)?(i.inside(c)||a.push(i.cross(c,h)),a.push(h)):i.inside(c)&&a.push(i.cross(c,h))}if(e=a,e.length===0)break}return e}static atX(t,o,e){return{x:e,z:t.z+(o.z-t.z)*(e-t.x)/(o.x-t.x)}}static atZ(t,o,e){return{x:t.x+(o.x-t.x)*(e-t.z)/(o.z-t.z),z:e}}static contains(t,o){let e=!1;for(let p=0,i=t.length-1;p<t.length;i=p++){const a=t[p],l=t[i];a.z>o.z!=l.z>o.z&&o.x<(l.x-a.x)*(o.z-a.z)/(l.z-a.z)+a.x&&(e=!e)}return e}static geometry(t,o,e){const p=s=>new R(s.x,s.z),i=t.map(p),a=o.map(s=>s.map(p)),l=T.triangulateShape(i,a);if(l.length===0)return;const h=[...i,...a.flat()],c=[];for(const[s,g,n]of l){const[u,m,x]=[h[s],h[g],h[n]],w=(m.y-u.y)*(x.x-u.x)-(m.x-u.x)*(x.y-u.y)>0;for(const z of w?[u,m,x]:[u,x,m])c.push(z.x,e,z.y)}const d=new V;d.setAttribute("position",new A(c,3));const f=new Float32Array(c.length);for(let s=1;s<f.length;s+=3)f[s]=1;return d.setAttribute("normal",new A(f,3)),d.computeBoundingSphere(),d}}export{r as WaterSystem};