@rr0/ufoathome 0.163.2 → 0.165.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.
- package/dist-embed-interview/InterviewMessages_es-ypa0EDh9.js +1 -0
- package/dist-embed-interview/InterviewMessages_fr-OCQdwn9j.js +1 -0
- package/dist-embed-interview/InterviewMessages_it-awuOqf5v.js +1 -0
- package/dist-embed-interview/rr0-interview.mjs +2 -2
- package/dist-embed-scene/{AdsbLolArchiveProvider-CO4IRthj.js → AdsbLolArchiveProvider-Cea0LAnZ.js} +1 -1
- package/dist-embed-scene/BeamEditor-DcUBLvPh.js +30 -0
- package/dist-embed-scene/BeamEditorMessages_en-DDvPWAdd.js +1 -0
- package/dist-embed-scene/BeamEditorMessages_es-BhCkhUkN.js +1 -0
- package/dist-embed-scene/BeamEditorMessages_fr-CtX6uP-x.js +1 -0
- package/dist-embed-scene/BeamEditorMessages_it-DVweRQFi.js +1 -0
- package/dist-embed-scene/BeamSystem-B80EaJKx.js +1 -0
- package/dist-embed-scene/{ContrailSystem-GO0Hkyj3.js → ContrailSystem-CcDlnjiD.js} +1 -1
- package/dist-embed-scene/GLTFLoader-YecOnQON.js +1 -0
- package/dist-embed-scene/{HeadlightSystem-DNMtQJ-Z.js → HeadlightSystem-B0Ubhwxs.js} +1 -1
- package/dist-embed-scene/LanternEditor-DQ9Y_eBl.js +9 -0
- package/{dist-embed-sighting-editor/LanternEditorMessages_en-3XzIx2c4.js → dist-embed-scene/LanternEditorMessages_en-DaT3UNfD.js} +1 -1
- package/{dist-embed-sighting-editor/LanternEditorMessages_es-BwzbSSd3.js → dist-embed-scene/LanternEditorMessages_es-TDV5lKeJ.js} +1 -1
- package/{dist-embed-sighting-editor/LanternEditorMessages_fr-Cf444dJM.js → dist-embed-scene/LanternEditorMessages_fr-9mByTFMG.js} +1 -1
- package/{dist-embed-sighting-editor/LanternEditorMessages_it-Bhk0A4Ug.js → dist-embed-scene/LanternEditorMessages_it-MRkJnDQp.js} +1 -1
- package/dist-embed-scene/LaserBeam-DXzWB-xk.js +1 -0
- package/dist-embed-scene/LaunchEditor-Csb2Pfq3.js +22 -0
- package/dist-embed-scene/LaunchEditorMessages_en-BnzNAYW9.js +1 -0
- package/dist-embed-scene/LaunchEditorMessages_es-BE0dEl7I.js +1 -0
- package/dist-embed-scene/LaunchEditorMessages_fr-Ds_VOB8c.js +1 -0
- package/dist-embed-scene/LaunchEditorMessages_it-DPQaR8HY.js +1 -0
- package/dist-embed-scene/LaunchPlume-DwOSrKP_.js +1 -0
- package/dist-embed-scene/LaunchSimulation-ClGdZJHr.js +1 -0
- package/dist-embed-scene/ModuleSession-DAQNvnRi.js +3 -0
- package/dist-embed-scene/ModuleThree-Cozd8KlK.js +1 -0
- package/dist-embed-scene/ParameterForm-D0GvLmqx.js +85 -0
- package/dist-embed-scene/{RailwaySystem-1yA_UYdB.js → RailwaySystem-DZQr_rS_.js} +1 -1
- package/dist-embed-scene/ReentryEditor-AsKtWLMw.js +27 -0
- package/dist-embed-scene/ReentryEditorMessages_en-O-YSmHxv.js +1 -0
- package/dist-embed-scene/ReentryEditorMessages_es-CvO9Jwz5.js +1 -0
- package/dist-embed-scene/ReentryEditorMessages_fr-xuC-qZ6M.js +1 -0
- package/dist-embed-scene/ReentryEditorMessages_it-B7vyCX9o.js +1 -0
- package/dist-embed-scene/ReentrySimulation-rnJU2x1Y.js +1 -0
- package/dist-embed-scene/ReferenceSystem-BgT1nVgA.js +1 -0
- package/dist-embed-scene/SceneNames_es-DL0IWHOw.js +1 -0
- package/dist-embed-scene/SceneNames_fr-B2NX5JJO.js +1 -0
- package/dist-embed-scene/SceneNames_it-wq6fqU10.js +1 -0
- package/dist-embed-scene/TimelineTracks-Bv2FX3_W.js +35 -0
- package/dist-embed-scene/{TraceSystem-B9WBM9ut.js → TraceSystem-D7pxye9d.js} +1 -1
- package/dist-embed-scene/UfoMessages_es-BxNc9t8X.js +1 -0
- package/dist-embed-scene/UfoMessages_fr-DnD6eSjQ.js +1 -0
- package/dist-embed-scene/UfoMessages_it-BubvnWTa.js +1 -0
- package/dist-embed-scene/WaterSystem-DI_NBDfH.js +1 -0
- package/dist-embed-scene/rr0-scene.mjs +348 -348
- package/dist-embed-scene/{sightingSchema-CnDwuCov.js → sightingSchema-CKUYrwgu.js} +1 -1
- package/dist-embed-scene/trafficRuntime-C3sA3Jg_.js +2 -0
- package/dist-embed-sighting/{AdsbLolArchiveProvider-CX1R8zJF.js → AdsbLolArchiveProvider-BGg8e-TS.js} +1 -1
- package/dist-embed-sighting/{BallesterGuaspAssessor-CCjRjJck.js → BallesterGuaspAssessor-DHpHbF6s.js} +1 -1
- package/dist-embed-sighting/BeamEditor-KLBjeTRU.js +30 -0
- package/dist-embed-sighting/BeamEditorMessages_en-DDvPWAdd.js +1 -0
- package/dist-embed-sighting/BeamEditorMessages_es-BhCkhUkN.js +1 -0
- package/dist-embed-sighting/BeamEditorMessages_fr-CtX6uP-x.js +1 -0
- package/dist-embed-sighting/BeamEditorMessages_it-DVweRQFi.js +1 -0
- package/dist-embed-sighting/BeamSystem-C6YXI9Da.js +1 -0
- package/dist-embed-sighting/ContrailSystem-BUKo3qVd.js +1 -0
- package/dist-embed-sighting/GLTFLoader-BYMKgQLE.js +1 -0
- package/dist-embed-sighting/HeadlightSystem-CXPE3feA.js +34 -0
- package/dist-embed-sighting/{HynekAssessor-B8Iw0Cbz.js → HynekAssessor-Cc8hHe3R.js} +1 -1
- package/dist-embed-sighting/LanternEditor-J_d2le0V.js +9 -0
- package/dist-embed-sighting/LanternEditorMessages_en-DaT3UNfD.js +1 -0
- package/dist-embed-sighting/LanternEditorMessages_es-TDV5lKeJ.js +1 -0
- package/dist-embed-sighting/LanternEditorMessages_fr-9mByTFMG.js +1 -0
- package/dist-embed-sighting/LanternEditorMessages_it-MRkJnDQp.js +1 -0
- package/dist-embed-sighting/LaserBeam-CovzRtac.js +1 -0
- package/dist-embed-sighting/LaunchEditor-DuVZmb3n.js +22 -0
- package/dist-embed-sighting/LaunchEditorMessages_en-BnzNAYW9.js +1 -0
- package/dist-embed-sighting/LaunchEditorMessages_es-BE0dEl7I.js +1 -0
- package/dist-embed-sighting/LaunchEditorMessages_fr-Ds_VOB8c.js +1 -0
- package/dist-embed-sighting/LaunchEditorMessages_it-DPQaR8HY.js +1 -0
- package/dist-embed-sighting/LaunchPlume-DONCQxUE.js +1 -0
- package/dist-embed-sighting/LaunchSimulation-C0cSHpLE.js +1 -0
- package/dist-embed-sighting/ModuleSession-CRVX-5Br.js +3 -0
- package/dist-embed-sighting/ModuleThree-YgLqKZM9.js +1 -0
- package/dist-embed-sighting/NearestApproach-BOWntoKZ.js +1 -0
- package/dist-embed-sighting/ParameterForm-BMfViRUv.js +85 -0
- package/dist-embed-sighting/{PoherAssessor-CwQN9pB1.js → PoherAssessor-CM7oCyEk.js} +1 -1
- package/dist-embed-sighting/{RailwaySystem-9blFcIdg.js → RailwaySystem-D8yJRUc8.js} +1 -1
- package/dist-embed-sighting/ReentryEditor-DCDavAGw.js +27 -0
- package/dist-embed-sighting/ReentryEditorMessages_en-O-YSmHxv.js +1 -0
- package/dist-embed-sighting/ReentryEditorMessages_es-CvO9Jwz5.js +1 -0
- package/dist-embed-sighting/ReentryEditorMessages_fr-xuC-qZ6M.js +1 -0
- package/dist-embed-sighting/ReentryEditorMessages_it-B7vyCX9o.js +1 -0
- package/dist-embed-sighting/ReentrySimulation-BzMMTqck.js +1 -0
- package/dist-embed-sighting/{ReferenceSystem-DFM_jZ-Q.js → ReferenceSystem-Dt28-Egu.js} +1 -1
- package/dist-embed-sighting/{RoadMarkings-DKxgMzE-.js → RoadMarkings-BC76NPX4.js} +1 -1
- package/dist-embed-sighting/SceneNames_es-Cu0CS6c0.js +1 -0
- package/dist-embed-sighting/SceneNames_fr-BAQt0-Zp.js +1 -0
- package/dist-embed-sighting/SceneNames_it-CeXG9jCC.js +1 -0
- package/dist-embed-sighting/SightingMessages_es-t6G0aKl4.js +1 -0
- package/dist-embed-sighting/SightingMessages_fr-D6DpE28c.js +1 -0
- package/dist-embed-sighting/SightingMessages_it-Dtm-W4pl.js +1 -0
- package/dist-embed-sighting/TimelineTracks-C7uTt9N5.js +35 -0
- package/dist-embed-sighting/{TraceSystem-CLYZFxAf.js → TraceSystem-Cd2FqhcV.js} +2 -2
- package/dist-embed-sighting/UfoMessages_es-BxNc9t8X.js +1 -0
- package/dist-embed-sighting/UfoMessages_fr-DnD6eSjQ.js +1 -0
- package/dist-embed-sighting/UfoMessages_it-BubvnWTa.js +1 -0
- package/dist-embed-sighting/{WaterSystem-BulddAwi.js → WaterSystem-S81tdPno.js} +1 -1
- package/dist-embed-sighting/rr0-sighting.mjs +365 -365
- package/dist-embed-sighting/{sightingSchema-CnDwuCov.js → sightingSchema-CKUYrwgu.js} +1 -1
- package/dist-embed-sighting/trafficRuntime-DL5Zul8z.js +2 -0
- package/dist-embed-sighting-editor/AdsbLolArchiveProvider-k2xqWyaR.js +1 -0
- package/dist-embed-sighting-editor/{BallesterGuaspAssessor-gX_y6kL8.js → BallesterGuaspAssessor-CRfTg7iA.js} +1 -1
- package/dist-embed-sighting-editor/BeamEditor-DTkjy61A.js +30 -0
- package/dist-embed-sighting-editor/BeamEditorMessages_en-DDvPWAdd.js +1 -0
- package/dist-embed-sighting-editor/BeamEditorMessages_es-BhCkhUkN.js +1 -0
- package/dist-embed-sighting-editor/BeamEditorMessages_fr-CtX6uP-x.js +1 -0
- package/dist-embed-sighting-editor/BeamEditorMessages_it-DVweRQFi.js +1 -0
- package/dist-embed-sighting-editor/BeamSystem-BQbLn-3t.js +1 -0
- package/dist-embed-sighting-editor/BodyEditor-D5PfqEg2.js +28 -0
- package/dist-embed-sighting-editor/BodyEditorMessages_en-zfy3BJb5.js +1 -0
- package/dist-embed-sighting-editor/BodyEditorMessages_es-w95anMnI.js +1 -0
- package/dist-embed-sighting-editor/BodyEditorMessages_fr-ixsDgTbt.js +1 -0
- package/dist-embed-sighting-editor/BodyEditorMessages_it-B3oQzqHE.js +1 -0
- package/dist-embed-sighting-editor/{CaseEditorMessages_es-DUelIN8x.js → CaseEditorMessages_es-D9fqVpx3.js} +1 -1
- package/dist-embed-sighting-editor/{CaseEditorMessages_fr-BppxXK1E.js → CaseEditorMessages_fr-DA4NmMM1.js} +1 -1
- package/dist-embed-sighting-editor/{CaseEditorMessages_it-BIYStAk9.js → CaseEditorMessages_it-BoJUJ83I.js} +1 -1
- package/dist-embed-sighting-editor/{ContrailSystem-BXARgrR4.js → ContrailSystem-BQXLg_WA.js} +1 -1
- package/dist-embed-sighting-editor/{CoverageAssessor-mvpHgNx3.js → CoverageAssessor-D3HBwZuC.js} +1 -1
- package/dist-embed-sighting-editor/{GLTFLoader-BVRuOnnK.js → GLTFLoader-CQeR3NC8.js} +1 -1
- package/dist-embed-sighting-editor/{HeadlightSystem-9ywZKJNB.js → HeadlightSystem-Cy4jSEsq.js} +1 -1
- package/dist-embed-sighting-editor/{HynekAssessor-B9lO770Q.js → HynekAssessor-Covu9I3x.js} +1 -1
- package/dist-embed-sighting-editor/{InterviewEditorElement-Cpu0vwrk.js → InterviewEditorElement-IBABfqta.js} +7 -6
- package/dist-embed-sighting-editor/InterviewMessages_en-BNau2xU8.js +1 -0
- package/dist-embed-sighting-editor/InterviewMessages_es-ypa0EDh9.js +1 -0
- package/dist-embed-sighting-editor/InterviewMessages_fr-OCQdwn9j.js +1 -0
- package/dist-embed-sighting-editor/InterviewMessages_it-awuOqf5v.js +1 -0
- package/dist-embed-sighting-editor/LanternEditor-BoxxG443.js +9 -0
- package/dist-embed-sighting-editor/LanternEditorMessages_en-DaT3UNfD.js +1 -0
- package/dist-embed-sighting-editor/LanternEditorMessages_es-TDV5lKeJ.js +1 -0
- package/dist-embed-sighting-editor/LanternEditorMessages_fr-9mByTFMG.js +1 -0
- package/dist-embed-sighting-editor/LanternEditorMessages_it-MRkJnDQp.js +1 -0
- package/dist-embed-sighting-editor/LaserBeam-j5Z4tIOw.js +1 -0
- package/dist-embed-sighting-editor/LaunchEditor-rJud4C3y.js +22 -0
- package/dist-embed-sighting-editor/LaunchEditorMessages_en-BnzNAYW9.js +1 -0
- package/dist-embed-sighting-editor/LaunchEditorMessages_es-BE0dEl7I.js +1 -0
- package/dist-embed-sighting-editor/LaunchEditorMessages_fr-Ds_VOB8c.js +1 -0
- package/dist-embed-sighting-editor/LaunchEditorMessages_it-DPQaR8HY.js +1 -0
- package/dist-embed-sighting-editor/LaunchPlume-Dm1YdsZp.js +1 -0
- package/dist-embed-sighting-editor/LaunchSimulation-4f9-9d7Z.js +1 -0
- package/dist-embed-sighting-editor/{ModelSource-D0ZuOymh.js → ModelSource-CYfSBTeB.js} +1 -1
- package/dist-embed-sighting-editor/{ModelThumbnails-BA3zFrn5.js → ModelThumbnails-DYWQQdaZ.js} +1 -1
- package/dist-embed-sighting-editor/{ModelViewer-BDorZEms.js → ModelViewer-BjIOswb8.js} +1 -1
- package/dist-embed-sighting-editor/ModuleSession-D3GrBJ3j.js +3 -0
- package/dist-embed-sighting-editor/ModuleThree-CkOgRXM2.js +1 -0
- package/dist-embed-sighting-editor/ModulesPanelElement-Uz0lPYwu.js +13 -0
- package/dist-embed-sighting-editor/ModulesPanelMessages_en-D97Nh2yy.js +1 -0
- package/dist-embed-sighting-editor/ModulesPanelMessages_es-CE9Ajw2-.js +1 -0
- package/dist-embed-sighting-editor/ModulesPanelMessages_fr-BWsj-7_t.js +1 -0
- package/dist-embed-sighting-editor/ModulesPanelMessages_it-CtKrboEg.js +1 -0
- package/dist-embed-sighting-editor/{NearestApproach-DCFh8vV6.js → NearestApproach-DCUW8bB4.js} +1 -1
- package/dist-embed-sighting-editor/{PictureRegistration-cp0utyhJ.js → PictureRegistration-ZyvGfReK.js} +1 -1
- package/dist-embed-sighting-editor/{PoherAssessor-CzLQhAxP.js → PoherAssessor-BoGGdasd.js} +1 -1
- package/dist-embed-sighting-editor/{RailwaySystem-BfDjza60.js → RailwaySystem-C8Dby19B.js} +1 -1
- package/dist-embed-sighting-editor/ReentryEditor-8sfHq7hY.js +27 -0
- package/dist-embed-sighting-editor/ReentryEditorMessages_en-O-YSmHxv.js +1 -0
- package/dist-embed-sighting-editor/ReentryEditorMessages_es-CvO9Jwz5.js +1 -0
- package/dist-embed-sighting-editor/ReentryEditorMessages_fr-xuC-qZ6M.js +1 -0
- package/dist-embed-sighting-editor/ReentryEditorMessages_it-B7vyCX9o.js +1 -0
- package/dist-embed-sighting-editor/ReentrySimulation-KMMVK82G.js +1 -0
- package/dist-embed-sighting-editor/{ReferenceSystem-DHPnvAXN.js → ReferenceSystem-PYF540r7.js} +1 -1
- package/dist-embed-sighting-editor/{RoadMarkings-HF9xJtTp.js → RoadMarkings-VqRLMg59.js} +1 -1
- package/dist-embed-sighting-editor/SceneNames_es-CLvEspFd.js +1 -0
- package/dist-embed-sighting-editor/SceneNames_fr-oYQgZ-TZ.js +1 -0
- package/dist-embed-sighting-editor/SceneNames_it-CDTw3VAX.js +1 -0
- package/dist-embed-sighting-editor/SightingEditorMessages_es-CQU200Hj.js +12 -0
- package/dist-embed-sighting-editor/SightingEditorMessages_fr-Bd4Ht-jW.js +12 -0
- package/dist-embed-sighting-editor/SightingEditorMessages_it-CSnPiCy2.js +12 -0
- package/dist-embed-sighting-editor/{SightingFileEditor-BekK-f3R.js → SightingFileEditor-DB3jyBzw.js} +1 -1
- package/dist-embed-sighting-editor/SkyEventEditorStyle-CvY_AhbI.js +1 -0
- package/dist-embed-sighting-editor/{TraceSystem-C1HaC0DX.js → TraceSystem-BX0FwUB1.js} +2 -2
- package/dist-embed-sighting-editor/UfoMessages_es-BxNc9t8X.js +1 -0
- package/dist-embed-sighting-editor/UfoMessages_fr-DnD6eSjQ.js +1 -0
- package/dist-embed-sighting-editor/UfoMessages_it-BubvnWTa.js +1 -0
- package/dist-embed-sighting-editor/{WaterSystem-BDkfNF8C.js → WaterSystem-uWnkivpP.js} +1 -1
- package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +509 -506
- package/dist-embed-sighting-editor/{sightingSchema-CnDwuCov.js → sightingSchema-CKUYrwgu.js} +1 -1
- package/dist-embed-sighting-editor/surroundingsSources-DXpzMDPy.js +1 -0
- package/dist-embed-sighting-editor/trafficRuntime-BeMCM4Ap.js +2 -0
- package/package.json +3 -2
- package/dist-embed-interview/InterviewMessages_es-B0Ut-uel.js +0 -1
- package/dist-embed-interview/InterviewMessages_fr-mhX8Zuyu.js +0 -1
- package/dist-embed-interview/InterviewMessages_it-DaxIoAIG.js +0 -1
- package/dist-embed-scene/BeamSystem-Dp1WU1Zx.js +0 -1
- package/dist-embed-scene/GLTFLoader-wJ0bjCoG.js +0 -1
- package/dist-embed-scene/ReferenceSystem-DOCydyPG.js +0 -1
- package/dist-embed-scene/SceneNames_es-DU-mbey8.js +0 -1
- package/dist-embed-scene/SceneNames_fr-D5foX9zZ.js +0 -1
- package/dist-embed-scene/SceneNames_it-CsSU00Qr.js +0 -1
- package/dist-embed-scene/UfoMessages_es-BRCWkzr3.js +0 -1
- package/dist-embed-scene/UfoMessages_fr-Cs2GCHEt.js +0 -1
- package/dist-embed-scene/UfoMessages_it-B2hvjhgb.js +0 -1
- package/dist-embed-scene/WaterSystem-yC8sKIc5.js +0 -1
- package/dist-embed-scene/trafficRuntime-BPEJW9KZ.js +0 -2
- package/dist-embed-sighting/BeamSystem-B0H346X_.js +0 -1
- package/dist-embed-sighting/ContrailSystem-BeK11Jxe.js +0 -1
- package/dist-embed-sighting/GLTFLoader-B_T3zy3i.js +0 -1
- package/dist-embed-sighting/HeadlightSystem-DjtbpwEp.js +0 -34
- package/dist-embed-sighting/NearestApproach-B5s-b6tU.js +0 -1
- package/dist-embed-sighting/SceneNames_es-yKx3UAlW.js +0 -1
- package/dist-embed-sighting/SceneNames_fr-CRYRL6bz.js +0 -1
- package/dist-embed-sighting/SceneNames_it-YZZnoK8j.js +0 -1
- package/dist-embed-sighting/SightingMessages_es-Dsr6169b.js +0 -1
- package/dist-embed-sighting/SightingMessages_fr-DQNbBD0c.js +0 -1
- package/dist-embed-sighting/SightingMessages_it-WE-_Cuu4.js +0 -1
- package/dist-embed-sighting/UfoMessages_es-BRCWkzr3.js +0 -1
- package/dist-embed-sighting/UfoMessages_fr-Cs2GCHEt.js +0 -1
- package/dist-embed-sighting/UfoMessages_it-B2hvjhgb.js +0 -1
- package/dist-embed-sighting/trafficRuntime-CfPqH9j0.js +0 -2
- package/dist-embed-sighting-editor/AdsbLolArchiveProvider-DS9ev-HU.js +0 -1
- package/dist-embed-sighting-editor/BeamEditor-BzrEOJOy.js +0 -13
- package/dist-embed-sighting-editor/BeamEditorMessages_en-DBs2OUXJ.js +0 -1
- package/dist-embed-sighting-editor/BeamEditorMessages_es-DB8K5GtE.js +0 -1
- package/dist-embed-sighting-editor/BeamEditorMessages_fr-D1j_IF07.js +0 -1
- package/dist-embed-sighting-editor/BeamEditorMessages_it-BT3ezMwC.js +0 -1
- package/dist-embed-sighting-editor/BeamSystem-BBonCZQ1.js +0 -1
- package/dist-embed-sighting-editor/BodyEditor-D5VXWcru.js +0 -27
- package/dist-embed-sighting-editor/BodyEditorMessages_en-DmM8Dasm.js +0 -1
- package/dist-embed-sighting-editor/BodyEditorMessages_es-BiV1oFuY.js +0 -1
- package/dist-embed-sighting-editor/BodyEditorMessages_fr-D03RAZjQ.js +0 -1
- package/dist-embed-sighting-editor/BodyEditorMessages_it-34r0JMIX.js +0 -1
- package/dist-embed-sighting-editor/InterviewMessages_en-CC5D0e6J.js +0 -1
- package/dist-embed-sighting-editor/InterviewMessages_es-B0Ut-uel.js +0 -1
- package/dist-embed-sighting-editor/InterviewMessages_fr-mhX8Zuyu.js +0 -1
- package/dist-embed-sighting-editor/InterviewMessages_it-DaxIoAIG.js +0 -1
- package/dist-embed-sighting-editor/LanternEditor-C60IT7Cv.js +0 -9
- package/dist-embed-sighting-editor/LaserBeam-DZ6ILkZ8.js +0 -1
- package/dist-embed-sighting-editor/LaunchEditor-DcYWYLQN.js +0 -18
- package/dist-embed-sighting-editor/LaunchEditorMessages_en-DH8gI1vo.js +0 -1
- package/dist-embed-sighting-editor/LaunchEditorMessages_es-WCfaY4uY.js +0 -1
- package/dist-embed-sighting-editor/LaunchEditorMessages_fr-CWCGUG_A.js +0 -1
- package/dist-embed-sighting-editor/LaunchEditorMessages_it-DxSSiAd7.js +0 -1
- package/dist-embed-sighting-editor/SceneNames_es-CtE-QSrH.js +0 -1
- package/dist-embed-sighting-editor/SceneNames_fr-hz4p4u7a.js +0 -1
- package/dist-embed-sighting-editor/SceneNames_it-CRn1NGKM.js +0 -1
- package/dist-embed-sighting-editor/SightingEditorMessages_es-DGdkm-Yt.js +0 -12
- package/dist-embed-sighting-editor/SightingEditorMessages_fr-thlWKHJq.js +0 -12
- package/dist-embed-sighting-editor/SightingEditorMessages_it-dkt2lxRe.js +0 -12
- package/dist-embed-sighting-editor/UfoMessages_es-BRCWkzr3.js +0 -1
- package/dist-embed-sighting-editor/UfoMessages_fr-Cs2GCHEt.js +0 -1
- package/dist-embed-sighting-editor/UfoMessages_it-B2hvjhgb.js +0 -1
- package/dist-embed-sighting-editor/surroundingsSources-Bq5A0HA5.js +0 -1
- package/dist-embed-sighting-editor/trafficRuntime-DVOOnJGD.js +0 -2
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{S as y}from"./SkyEventEditorStyle-CvY_AhbI.js";import{L as v}from"./LaunchPlume-Dm1YdsZp.js";import{ai as f,aA as w,D as g,b as p,z as j,C as T,G as b,at as k,U as E}from"./rr0-sighting-editor.mjs";import{launchEditorMessages_en as x}from"./LaunchEditorMessages_en-BnzNAYW9.js";class n{static plumeValue(e){return t=>v.plumeOf(t)[e]}static plume(e,t){return{type:"number",key:`plume.${e}`,effective:n.plumeValue(e),...t}}static burn(e,t){return{type:"number",key:e,min:-3600,max:36e3,step:.1,unit:"s",scale:.001,label:t.label,hint:t.hint,group:{en:"Engine",fr:"Moteur",es:"Motor",it:"Motore"},effective:i=>t.ends(i.track??[])?.t}}static placeAt(e,t){if(e.length===0)return{t,lat:0,lng:0,altitudeKm:0};if(e.length===1)return{t,lat:e[0].lat,lng:e[0].lng,altitudeKm:e[0].altitudeKm};let i=0;for(;i<e.length-2&&e[i+1].t<t;)i++;const a=e[i],s=e[i+1],l=s.t===a.t?0:(t-a.t)/(s.t-a.t),d=(u,r)=>u+(r-u)*l;return{t,lat:d(a.lat,s.lat),lng:d(a.lng,s.lng),altitudeKm:Math.max(0,d(a.altitudeKm,s.altitudeKm))}}static instantsOf(e){return[...e.track.map(t=>t.t),...[e.burnFromT,e.burnUntilT].filter(t=>t!==void 0),...(e.jets??[]).flatMap(t=>[t.fromT,t.untilT])]}static SET={kind:"launch",title:{en:"Launch",fr:"Lancement",es:"Lanzamiento",it:"Lancio"},parameters:[{type:"said",key:"title",label:{en:"Name",fr:"Nom",es:"Nombre",it:"Nome"},group:{en:"Vehicle",fr:"Lanceur",es:"Lanzador",it:"Lanciatore"}},{type:"text",key:"vehicle.mission",label:{en:"Mission",fr:"Mission",es:"Misión",it:"Missione"},placeholder:"Starlink Group 10-49",group:{en:"Vehicle",fr:"Lanceur",es:"Lanzador",it:"Lanciatore"}},{type:"number",key:"vehicle.engine.thrustKN",min:1,max:1e5,step:1,unit:"kN",label:{en:"Thrust (vacuum)",fr:"Poussée (dans le vide)",es:"Empuje (en el vacío)",it:"Spinta (nel vuoto)"},hint:{en:"Merlin Vacuum 934, RL10 110, a solid booster several thousand. With the specific impulse, it sets how much exhaust leaves each second.",fr:"Merlin Vacuum 934, RL10 110, un booster à poudre plusieurs milliers. Avec l'impulsion spécifique, elle fixe le débit d'échappement.",es:"Merlin Vacuum 934, RL10 110, un propulsor sólido varios miles. Con el impulso específico, fija el caudal de escape.",it:"Merlin Vacuum 934, RL10 110, un booster solido diverse migliaia. Con l'impulso specifico, fissa la portata dello scarico."},group:{en:"Engine",fr:"Moteur",es:"Motor",it:"Motore"}},{type:"number",key:"vehicle.engine.specificImpulseS",min:100,max:500,step:1,unit:"s",label:{en:"Specific impulse (vacuum)",fr:"Impulsion spécifique (dans le vide)",es:"Impulso específico (en el vacío)",it:"Impulso specifico (nel vuoto)"},hint:{en:"Times 9.81 m/s² it is the exhaust velocity, which sets how fast the exhaust spreads round the stage: 348 s is 3.4 km/s.",fr:"Multipliée par 9,81 m/s², c'est la vitesse d'éjection, qui fixe la vitesse à laquelle l'échappement s'étale autour de l'étage : 348 s font 3,4 km/s.",es:"Multiplicado por 9,81 m/s² es la velocidad de escape, que fija la rapidez con que el escape se extiende alrededor de la etapa: 348 s son 3,4 km/s.",it:"Moltiplicato per 9,81 m/s² è la velocità di scarico, che fissa quanto in fretta lo scarico si allarga attorno allo stadio: 348 s sono 3,4 km/s."},group:{en:"Engine",fr:"Moteur",es:"Motor",it:"Motore"}},{type:"choice",key:"vehicle.engine.propellant",label:{en:"Propellant",fr:"Ergols",es:"Propelentes",it:"Propellenti"},hint:{en:"What the exhaust is made of decides how much of it turns into particles that scatter light.",fr:"Ce dont l'échappement est fait décide quelle part devient des particules qui diffusent la lumière.",es:"De qué está hecho el escape decide qué parte se vuelve partículas que difunden la luz.",it:"Di cosa è fatto lo scarico decide quanta parte diventa particelle che diffondono la luce."},choices:[{value:"rp1-lox",label:{en:"Kerosene and oxygen",fr:"Kérosène et oxygène",es:"Queroseno y oxígeno",it:"Cherosene e ossigeno"}},{value:"methane-lox",label:{en:"Methane and oxygen",fr:"Méthane et oxygène",es:"Metano y oxígeno",it:"Metano e ossigeno"}},{value:"hydrogen-lox",label:{en:"Hydrogen and oxygen",fr:"Hydrogène et oxygène",es:"Hidrógeno y oxígeno",it:"Idrogeno e ossigeno"}},{value:"hypergolic",label:{en:"Hypergolic",fr:"Hypergolique",es:"Hipergólico",it:"Ipergolico"}},{value:"solid",label:{en:"Solid",fr:"Poudre",es:"Sólido",it:"Solido"}}],group:{en:"Engine",fr:"Moteur",es:"Motor",it:"Motore"}},n.burn("burnFromT",{label:{en:"Engine start",fr:"Allumage du moteur",es:"Encendido del motor",it:"Accensione del motore"},hint:{en:"When the engine started, in seconds of the recording; it may be before it. Empty: the first point of the path.",fr:"Quand le moteur s'est allumé, en secondes de l'enregistrement ; avant lui si besoin. Vide : le premier point du chemin.",es:"Cuándo se encendió el motor, en segundos de la grabación; puede ser antes. Vacío: el primer punto de la trayectoria.",it:"Quando si è acceso il motore, in secondi della registrazione; può essere prima. Vuoto: il primo punto del percorso."},ends:e=>e[0]}),n.burn("burnUntilT",{label:{en:"Engine cut-off",fr:"Extinction du moteur",es:"Apagado del motor",it:"Spegnimento del motore"},hint:{en:"When the engine stopped, in seconds of the recording. Empty: the last point of the path. Nothing is let go after it.",fr:"Quand le moteur s'est éteint, en secondes de l'enregistrement. Vide : le dernier point du chemin. Rien n'est lâché après.",es:"Cuándo se apagó el motor, en segundos de la grabación. Vacío: el último punto de la trayectoria. Nada se suelta después.",it:"Quando si è spento il motore, in secondi della registrazione. Vuoto: l'ultimo punto del percorso. Dopo non si rilascia nulla."},ends:e=>e[e.length-1]}),n.plume("exhaustKgPerS",{min:.1,max:1e5,step:.1,unit:"kg/s",label:{en:"Exhaust flow",fr:"Débit d'échappement",es:"Caudal de escape",it:"Portata di scarico"},hint:{en:"How much exhaust leaves the engine each second: how bright the plume is. Thrust over exhaust velocity when the engine is stated.",fr:"La masse d'échappement qui sort du moteur chaque seconde : la luminosité du panache. La poussée sur la vitesse d'éjection quand le moteur est donné.",es:"La masa de escape que sale del motor cada segundo: el brillo de la estela. El empuje sobre la velocidad de escape cuando se da el motor.",it:"La massa di scarico che esce dal motore ogni secondo: la luminosità della scia. La spinta sulla velocità di scarico quando il motore è dato."},group:{en:"Plume",fr:"Panache",es:"Estela",it:"Scia"}}),n.plume("condensedShare",{min:0,max:1,step:.01,label:{en:"Share that scatters",fr:"Part qui diffuse",es:"Parte que difunde",it:"Parte che diffonde"},hint:{en:"The share of the exhaust that ends up as particles that scatter the Sun's light. Nobody has measured it for a launch: the one number to fit against a photograph.",fr:"La part de l'échappement qui devient des particules diffusant la lumière du Soleil. Personne ne l'a mesurée pour un lancement : le seul nombre à caler sur une photographie.",es:"La parte del escape que acaba como partículas que difunden la luz del Sol. Nadie la ha medido para un lanzamiento: el único número que ajustar con una fotografía.",it:"La parte dello scarico che diventa particelle che diffondono la luce del Sole. Nessuno l'ha misurata per un lancio: l'unico numero da tarare su una fotografia."},group:{en:"Plume",fr:"Panache",es:"Estela",it:"Scia"}}),n.plume("particleRadiusUm",{min:.05,max:5,step:.05,unit:"µm",label:{en:"Particle radius",fr:"Rayon des particules",es:"Radio de las partículas",it:"Raggio delle particelle"},group:{en:"Plume",fr:"Panache",es:"Estela",it:"Scia"}}),n.plume("lifetimeS",{min:10,max:3600,step:10,unit:"s",label:{en:"Trail lifetime",fr:"Durée de la traînée",es:"Duración de la estela",it:"Durata della scia"},hint:{en:"How long the narrow trail lasts before the particles have gone.",fr:"Combien de temps la traînée étroite dure avant que les particules aient disparu.",es:"Cuánto dura la estela estrecha antes de que las partículas hayan desaparecido.",it:"Quanto dura la scia stretta prima che le particelle siano sparite."},group:{en:"Plume",fr:"Panache",es:"Estela",it:"Scia"}}),n.plume("expansionKmPerS",{min:0,max:5,step:.01,unit:"km/s",label:{en:"Trail spreading",fr:"Étalement de la traînée",es:"Expansión de la estela",it:"Espansione della scia"},group:{en:"Plume",fr:"Panache",es:"Estela",it:"Scia"}}),n.plume("initialRadiusKm",{min:0,max:50,step:.1,unit:"km",label:{en:"Radius at release",fr:"Rayon au lâcher",es:"Radio al soltar",it:"Raggio al rilascio"},group:{en:"Plume",fr:"Panache",es:"Estela",it:"Scia"}}),n.plume("collarShare",{min:0,max:1,step:.01,label:{en:"Share in the collar",fr:"Part dans la collerette",es:"Parte en el collar",it:"Parte nel collare"},hint:{en:"The collar is the exhaust just let go, which spreads fast into a wide short-lived shell round the stage; the rest stays behind as the narrow trail.",fr:"La collerette est l'échappement qui vient d'être lâché, qui s'étale vite en une coque large et brève autour de l'étage ; le reste demeure derrière en traînée étroite.",es:"El collar es el escape recién soltado, que se extiende rápido en una envoltura ancha y breve alrededor de la etapa; el resto queda detrás como estela estrecha.",it:"Il collare è lo scarico appena rilasciato, che si allarga in fretta in un guscio largo e breve attorno allo stadio; il resto resta dietro come scia stretta."},group:{en:"Collar",fr:"Collerette",es:"Collar",it:"Collare"}}),n.plume("collarExpansionKmPerS",{min:0,max:10,step:.05,unit:"km/s",label:{en:"Collar spreading",fr:"Étalement de la collerette",es:"Expansión del collar",it:"Espansione del collare"},hint:{en:"How fast the collar widens: three quarters of the exhaust velocity when the engine is stated.",fr:"La vitesse à laquelle la collerette s'élargit : les trois quarts de la vitesse d'éjection quand le moteur est donné.",es:"La rapidez con que el collar se ensancha: tres cuartos de la velocidad de escape cuando se da el motor.",it:"Quanto in fretta il collare si allarga: tre quarti della velocità di scarico quando il motore è dato."},group:{en:"Collar",fr:"Collerette",es:"Collar",it:"Collare"}}),n.plume("collarLifetimeS",{min:1,max:300,step:1,unit:"s",label:{en:"Collar lifetime",fr:"Durée de la collerette",es:"Duración del collar",it:"Durata del collare"},group:{en:"Collar",fr:"Collerette",es:"Collar",it:"Collare"}})]};static PLACE={kind:"launch-place",title:{en:"Place of the path",fr:"Point du chemin",es:"Punto de la trayectoria",it:"Punto del percorso"},parameters:[{type:"number",key:"t",min:-3600,max:36e3,step:.1,unit:"s",scale:.001,required:!0,label:{en:"Time",fr:"Instant",es:"Instante",it:"Istante"},hint:{en:"Seconds of the recording; negative before it began: a stage seen minutes after its launch was already high when the recording started.",fr:"Secondes de l'enregistrement ; négatives avant son début : un étage vu des minutes après son lancement était déjà haut quand l'enregistrement a commencé.",es:"Segundos de la grabación; negativos antes de que empezara: una etapa vista minutos después de su lanzamiento ya estaba alta cuando empezó la grabación.",it:"Secondi della registrazione; negativi prima del suo inizio: uno stadio visto minuti dopo il lancio era già alto quando la registrazione è iniziata."}},{type:"position",key:"lat",secondKey:"lng",saidKey:"saidPosition",native:"geo",step:1,label:{en:"Position",fr:"Position",es:"Posición",it:"Posizione"}},{type:"number",key:"altitudeKm",min:0,max:2e3,step:.1,unit:"km",required:!0,label:{en:"Altitude",fr:"Altitude",es:"Altitud",it:"Altitudine"}}]};static jetContext(e,t){return{launch:e,index:t}}static jetValue(e){return(t,i)=>{const{launch:a,index:s}=i??{};return a?e(v.releaseOf(a,t,s)):void 0}}static JET_GROUP={en:"Jet",fr:"Jet",es:"Chorro",it:"Getto"};static JET={kind:"launch-jet",title:{en:"Jet",fr:"Jet",es:"Chorro",it:"Getto"},parameters:[{type:"choice",key:"kind",required:!0,label:{en:"What",fr:"Quoi",es:"Qué",it:"Cosa"},choices:[{value:"burn",label:{en:"Engine burn",fr:"Allumage du moteur",es:"Encendido del motor",it:"Accensione del motore"}},{value:"vent",label:{en:"Propellant vented",fr:"Ergols vidangés",es:"Propelentes purgados",it:"Propellenti scaricati"}}],group:n.JET_GROUP},{type:"number",key:"fromT",min:-36e3,max:36e3,step:.1,unit:"s",scale:.001,required:!0,label:{en:"From",fr:"Début",es:"Desde",it:"Da"},hint:{en:"Seconds of the recording; negative before it began.",fr:"Secondes de l'enregistrement ; négatives avant son début.",es:"Segundos de la grabación; negativos antes de que empezara.",it:"Secondi della registrazione; negativi prima del suo inizio."},group:n.JET_GROUP},{type:"number",key:"untilT",min:-36e3,max:36e3,step:.1,unit:"s",scale:.001,required:!0,label:{en:"Until",fr:"Fin",es:"Hasta",it:"Fino a"},group:n.JET_GROUP},{type:"number",key:"angleDeg",min:0,max:180,step:1,unit:"°",effective:()=>0,label:{en:"Direction from aft",fr:"Direction depuis l'arrière",es:"Dirección desde atrás",it:"Direzione da dietro"},hint:{en:"0 straight back along the stage's motion (an engine pushing it on), 90 sideways, 180 straight ahead (an engine braking it).",fr:"0 droit vers l'arrière du mouvement de l'étage (un moteur qui le pousse), 90 sur le côté, 180 droit devant (un moteur qui le freine).",es:"0 hacia atrás del movimiento de la etapa (un motor que la empuja), 90 de lado, 180 hacia delante (un motor que la frena).",it:"0 dritto all'indietro rispetto al moto dello stadio (un motore che lo spinge), 90 di lato, 180 dritto in avanti (un motore che lo frena)."},group:n.JET_GROUP},{type:"number",key:"azimuthDeg",min:-360,max:360,step:1,unit:"°",effective:()=>0,label:{en:"Side",fr:"Côté",es:"Lado",it:"Lato"},hint:{en:"Round the line of motion, which side it leaves on at the start: 0 away from the Earth, 90 to the right of the motion.",fr:"Autour de la ligne du mouvement, le côté par lequel il part au début : 0 à l'opposé de la Terre, 90 à droite du mouvement.",es:"Alrededor de la línea del movimiento, el lado por el que sale al principio: 0 opuesto a la Tierra, 90 a la derecha del movimiento.",it:"Attorno alla linea del moto, il lato da cui esce all'inizio: 0 opposto alla Terra, 90 a destra del moto."},group:n.JET_GROUP},{type:"number",key:"spinPeriodS",min:-3600,max:3600,step:.1,unit:"s",label:{en:"Spin period",fr:"Période de rotation",es:"Período de giro",it:"Periodo di rotazione"},hint:{en:"How long the stage takes to turn once round its line of motion; the jet turns with it and vented propellant draws a spiral. Negative turns the other way. Empty: it does not turn.",fr:"Le temps que met l'étage à faire un tour autour de sa ligne de mouvement ; le jet tourne avec lui et les ergols vidangés dessinent une spirale. Négative : dans l'autre sens. Vide : il ne tourne pas.",es:"Lo que tarda la etapa en dar una vuelta alrededor de su línea de movimiento; el chorro gira con ella y los propelentes purgados dibujan una espiral. Negativo: en el otro sentido. Vacío: no gira.",it:"Il tempo che lo stadio impiega a fare un giro attorno alla sua linea di moto; il getto gira con lui e i propellenti scaricati disegnano una spirale. Negativo: nell'altro verso. Vuoto: non gira."},group:n.JET_GROUP},{type:"number",key:"speedKmPerS",min:0,max:10,step:.01,unit:"km/s",effective:n.jetValue(e=>e.speedKmPerS),label:{en:"Speed",fr:"Vitesse",es:"Velocidad",it:"Velocità"},hint:{en:"How fast it leaves the stage. A burn: the engine's exhaust velocity.",fr:"La vitesse à laquelle il quitte l'étage. Un allumage : la vitesse d'éjection du moteur.",es:"La velocidad con que sale de la etapa. Un encendido: la velocidad de escape del motor.",it:"La velocità con cui lascia lo stadio. Un'accensione: la velocità di scarico del motore."},group:n.JET_GROUP},{type:"number",key:"massKgPerS",min:0,max:1e5,step:.1,unit:"kg/s",effective:n.jetValue(e=>e.massKgPerS),label:{en:"Flow",fr:"Débit",es:"Caudal",it:"Portata"},group:n.JET_GROUP},{type:"number",key:"condensedShare",min:0,max:1,step:.01,effective:n.jetValue(e=>e.condensedShare),label:{en:"Share that scatters",fr:"Part qui diffuse",es:"Parte que difunde",it:"Parte che diffonde"},group:n.JET_GROUP},{type:"number",key:"particleRadiusUm",min:.05,max:5,step:.05,unit:"µm",effective:n.jetValue(e=>e.particleRadiusUm),label:{en:"Particle radius",fr:"Rayon des particules",es:"Radio de las partículas",it:"Raggio delle particelle"},group:n.JET_GROUP},{type:"number",key:"expansionKmPerS",min:0,max:5,step:.01,unit:"km/s",effective:n.jetValue(e=>e.populations[0].expansionKmPerS),label:{en:"Spreading",fr:"Étalement",es:"Expansión",it:"Espansione"},hint:{en:"How fast each puff of it widens: a narrow jet keeps the arms of a spiral apart.",fr:"La vitesse à laquelle chaque bouffée s'élargit : un jet étroit garde les bras d'une spirale séparés.",es:"La rapidez con que se ensancha cada bocanada: un chorro estrecho mantiene separados los brazos de una espiral.",it:"Quanto in fretta si allarga ogni sbuffo: un getto stretto tiene separati i bracci di una spirale."},group:n.JET_GROUP},{type:"number",key:"initialRadiusKm",min:0,max:50,step:.1,unit:"km",effective:n.jetValue(e=>e.initialRadiusKm),label:{en:"Radius at release",fr:"Rayon au lâcher",es:"Radio al soltar",it:"Raggio al rilascio"},group:n.JET_GROUP},{type:"number",key:"lifetimeS",min:1,max:7200,step:1,unit:"s",effective:n.jetValue(e=>e.populations[0].lifetimeS),label:{en:"Lifetime",fr:"Durée",es:"Duración",it:"Durata"},group:n.JET_GROUP}]};static publish(){f.publish(n.SET)}}class c{constructor(e,t,i){this.container=e,this.host=t,y.attach(e,"launch-editor-part",c.STYLE),this.language=i,f.of("launch")||n.publish(),this.render(),this.setLanguage(i)}messages=x;languageToken=0;currentId;form;list;timeline;row="path";placeForm;placeIndex=0;jetForm;jetIndex=0;language;shown=[];static STYLE='.launch-editor-part { flex-basis: 100%; min-width: 0; } .launch-editor-part #launch-timeline { flex-basis: 100%; min-width: 0; padding: 4px 0; } .launch-editor-part .launch-path > .icon-btn { align-self: flex-end; } .launch-editor-part #launch-list, .launch-editor-part #launch-places { flex-basis: 100%; min-width: 0; } .launch-editor-part .launch-editor, .launch-editor-part .launch-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; } .launch-editor-part .launch-fields { flex-basis: 100%; min-width: 0; } .launch-editor-part [hidden] { display: none !important; } .launch-editor-part select { min-width: 0; width: 100%; } .launch-editor-part .launch-intro { flex-basis: 100%; margin: 0; } .launch-editor-part .launch-track { flex-basis: 100%; margin: 0; } .launch-editor-part .launch-parameters { flex-basis: 100%; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; } .launch-editor-part .parameter-group { flex: 1 1 14em; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; align-content: flex-start; } .launch-editor-part input, .launch-editor-part select { max-width: 100%; box-sizing: border-box; } .launch-editor-part input[type="text"] { width: 12em; } .launch-editor-part #launch-title { width: 18em; } .launch-editor-part label { min-width: 0; max-width: 100%; } .launch-editor-part input.parameter-derived::placeholder { opacity: .65; } .launch-editor-part .launch-path { flex: 1 1 100%; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; }';async setLanguage(e){const t=++this.languageToken;this.language=e;const i=E.includes(e)?e:"en",a=i==="en"?x:await w(i);t===this.languageToken&&(this.messages=a,this.render(),this.sync())}sync(){const e=this.launches;this.shown=[...e],e.some(a=>a.id===this.currentId)||(this.currentId=e[0]?.id),this.list?.setItems(e.map(a=>({id:a.id,label:this.labelOf(a)})),this.currentId),this.syncAddState();const t=this.current;if(this.element("launch-fields").hidden=t===void 0,!t)return;this.syncPlace(!0),this.syncJet(!0);const i=f.of("launch");this.form??=new g(this.element("launch-parameters"),this.language,"",{said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()}),this.form.show(i,t,()=>this.written())}refresh(){this.syncAddState();const e=this.launches;if(e.length===this.shown.length&&e.every((t,i)=>t===this.shown[i])){this.syncTimeline();return}this.sync()}setTime(e){this.timeline?.setTime(e)}syncAddState(){const e=this.startOfNew()!==void 0;this.list?.setAddState(e,e?void 0:this.messages.addLaunchNowhere)}get current(){return this.launches.find(e=>e.id===this.currentId)}show(e){this.currentId=e,this.row="path",this.placeIndex=0,this.jetIndex=0,this.sync()}render(){const e=this.messages;this.form=void 0,this.container.innerHTML=`<div class="launch-editor">
|
|
2
|
+
<p class="launch-intro">${e.intro}</p>
|
|
3
|
+
<div id="launch-list"></div>
|
|
4
|
+
<div id="launch-fields" class="launch-fields">
|
|
5
|
+
<div id="launch-parameters" class="launch-parameters"></div>
|
|
6
|
+
<div id="launch-timeline" class="launch-timeline"></div>
|
|
7
|
+
<button id="launch-jet-add-burn" type="button" title="${e.addJet}">${p.PLUS} ${e.jetBurn}</button>
|
|
8
|
+
<button id="launch-jet-add-vent" type="button" title="${e.addJet}">${p.PLUS} ${e.jetVent}</button>
|
|
9
|
+
<p class="launch-intro">${e.timelineNote}</p>
|
|
10
|
+
<fieldset id="launch-path" class="launch-path">
|
|
11
|
+
<legend>${e.path}</legend>
|
|
12
|
+
<div id="launch-place-parameters" class="launch-parameters"></div>
|
|
13
|
+
<button id="launch-place-delete" class="icon-btn" type="button" title="${e.deletePlace}" aria-label="${e.deletePlace}">${p.TRASH}</button>
|
|
14
|
+
</fieldset>
|
|
15
|
+
<fieldset id="launch-jets" class="launch-path">
|
|
16
|
+
<legend id="launch-jet-legend">${e.jet}</legend>
|
|
17
|
+
<div id="launch-jet-parameters" class="launch-parameters"></div>
|
|
18
|
+
<button id="launch-jet-delete" class="icon-btn" type="button" title="${e.deleteJet}" aria-label="${e.deleteJet}">${p.TRASH}</button>
|
|
19
|
+
</fieldset>
|
|
20
|
+
<p class="launch-intro">${e.derivedNote}</p>
|
|
21
|
+
</div>
|
|
22
|
+
</div>`;const t=this.element("launch-list");this.list=new j({header:t,body:this.element("launch-fields"),ids:{list:"launch-select",remove:"launch-delete",add:"launch-add",kinds:"launch-add-kind",kind:i=>`launch-add-${i}`},onSelect:i=>this.show(i),onAdd:i=>this.addLaunch(i??c.VEHICLES[0].id),onRemove:()=>this.deleteCurrent()}),this.list.setLabels({list:e.launch,remove:e.deleteLaunch,add:e.addLaunch,empty:e.none}),this.list.setKinds(c.VEHICLES.map(i=>({value:i.id,label:i.vehicle.name??i.id}))),this.timeline=new T(this.element("launch-timeline"),i=>this.host.seekTo(i),{addKeyframeHere:e.addHere,keyframeHere:e.here,zoomHint:e.zoomHint}),this.element("launch-jet-add-burn").addEventListener("click",()=>this.addJet("burn",this.host.currentTime())),this.element("launch-jet-add-vent").addEventListener("click",()=>this.addJet("vent",this.host.currentTime())),this.element("launch-place-delete").addEventListener("click",()=>this.removePlace()),this.element("launch-jet-delete").addEventListener("click",()=>this.removeJet()),this.placeForm=void 0,this.jetForm=void 0}written(){this.host.changed();const e=this.current;e&&(this.list?.rename(e.id,this.labelOf(e)),this.syncTimeline())}static PATH_COLOR="#e08a1e";static JET_COLOR="#4f8fd6";jetLabel(e,t){return`${e.kind==="vent"?this.messages.jetVent:this.messages.jetBurn} ${t+1}`}syncTimeline(){const e=this.current;if(!this.timeline||!e)return;const i={id:"path",label:this.messages.path,color:c.PATH_COLOR,times:e.track.map(r=>r.t),active:this.row==="path",selectedTime:this.row==="path"?e.track[this.placeIndex]?.t:void 0,open:()=>this.selectPlace(this.placeIndex),pressed:(r,o)=>{const h=o===void 0?-1:(this.current?.track??[]).findIndex(m=>m.t===o);this.selectPlace(h>=0?h:this.placeIndex)},move:(r,o)=>this.movePlace(r,o),add:()=>this.addPlaceAt(this.host.currentTime())},a=(e.jets??[]).map((r,o)=>({id:`jet-${o}`,label:this.jetLabel(r,o),color:c.JET_COLOR,times:[r.fromT,r.untilT],spans:[{t:r.fromT,until:r.untilT,label:""}],active:this.row==="jet"&&o===this.jetIndex,open:()=>this.selectJet(o),pressed:()=>this.selectJet(o),move:(h,m)=>this.moveJetEnd(o,h,m),add:()=>this.addJet(r.kind??"burn",this.host.currentTime())})),s=n.instantsOf(e),l=Math.min(...s),d=Math.max(...s),u=Math.max(500,(d-l)/10);this.timeline.show([i,...a],this.host.duration(),this.host.currentTime(),{from:l-u,to:d+u})}syncDetail(){const t=this.current?.jets?.[this.jetIndex];this.row==="jet"&&!t&&(this.row="path"),this.element("launch-path").hidden=this.row!=="path",this.element("launch-jets").hidden=this.row!=="jet",this.element("launch-jet-legend").textContent=t?this.jetLabel(t,this.jetIndex):this.messages.jet}static MIN_PLACES=2;syncPlace(e=!1){const t=this.current?.track??[];this.placeIndex=Math.max(0,Math.min(this.placeIndex,t.length-1)),this.element("launch-place-delete").disabled=t.length<=c.MIN_PLACES,this.placeForm?this.placeForm.sync(e):(this.placeForm=new g(this.element("launch-place-parameters"),this.language,"launchPlace."),this.placeForm.show(n.PLACE,new b(()=>this.current?.track[this.placeIndex],i=>this.editPlace(this.placeIndex,i),void 0,this.host.positionPlace?.()),()=>{})),this.syncDetail(),this.syncTimeline()}selectPlace(e){this.row="path",this.placeIndex=e,this.syncPlace(!0)}editPlace(e,t){const i=this.current;if(!i)return;const a={...i.track[e]};t(a),i.track=i.track.map((s,l)=>l===e?a:s).sort((s,l)=>s.t-l.t),this.placeIndex=i.track.indexOf(a),this.syncPlace(),this.written()}movePlace(e,t){const i=this.current?.track.findIndex(a=>a.t===e)??-1;i<0||(this.editPlace(i,a=>{a.t=t}),this.syncPlace(!0))}addPlaceAt(e){const t=this.current;if(!t)return;const i=t.track.findIndex(a=>Math.abs(a.t-e)<1);if(i<0){const a=n.placeAt(t.track,Math.round(e));t.track=[...t.track,a].sort((s,l)=>s.t-l.t),this.host.changed(),this.selectPlace(t.track.indexOf(a));return}this.selectPlace(i)}removePlace(){const e=this.current;!e||e.track.length<=c.MIN_PLACES||(e.track=e.track.filter((t,i)=>i!==this.placeIndex),this.syncPlace(!0),this.host.changed())}syncJet(e=!1){const t=this.current?.jets??[];this.jetIndex=Math.max(0,Math.min(this.jetIndex,t.length-1)),this.jetForm?this.jetForm.sync(e):(this.jetForm=new g(this.element("launch-jet-parameters"),this.language,"launchJet."),this.jetForm.show(n.JET,new b(()=>this.current?.jets?.[this.jetIndex],i=>this.editJet(this.jetIndex,i),()=>this.current?n.jetContext(this.current,this.jetIndex):void 0),()=>{})),this.syncDetail(),this.syncTimeline()}selectJet(e){this.row="jet",this.jetIndex=e,this.syncJet(!0)}editJet(e,t){const i=this.current;if(!i?.jets)return;const a={...i.jets[e]};t(a),i.jets=i.jets.map((s,l)=>l===e?a:s),this.written()}moveJetEnd(e,t,i){const a=this.current?.jets?.[e];a&&(this.editJet(e,s=>{const l=t===a.fromT?[i,a.untilT]:[a.fromT,i];s.fromT=Math.min(l[0],l[1]),s.untilT=Math.max(l[0],l[1])}),this.selectJet(e))}addJet(e,t){const i=this.current;if(!i)return;const a=i.track,s=Math.round(t),l=e==="vent"?{kind:e,fromT:s,untilT:s+3e4,angleDeg:90}:{kind:e,fromT:s,untilT:s+3e4};!i.jets?.length&&i.burnFromT===void 0&&i.burnUntilT===void 0&&(i.burnFromT=a[0].t,i.burnUntilT=a[a.length-1].t),i.jets=[...i.jets??[],l],this.form?.sync(!0),this.host.changed(),this.selectJet(i.jets.length-1)}removeJet(){const e=this.current;if(!e?.jets?.length)return;const t=e.jets.filter((i,a)=>a!==this.jetIndex);t.length?e.jets=t:delete e.jets,this.host.changed(),t.length?this.selectJet(Math.min(this.jetIndex,t.length-1)):this.selectPlace(this.placeIndex)}startOfNew(){const e=this.host.sighting(),t=e.event?.place?.[0];if(t?.lat===void 0||t.lng===void 0)return;const i=(e.observerTrack?.getInterpolatedPoseAt(0)?.headingDeg??0)*Math.PI/180,a=s=>({lat:t.lat+s*Math.cos(i)/111.32,lng:t.lng+s*Math.sin(i)/(111.32*Math.max(.05,Math.cos(t.lat*Math.PI/180)))});return[{t:0,...a(300),altitudeKm:80},{t:6e4,...a(450),altitudeKm:160}]}static VEHICLES=[{id:"falcon-9",vehicle:{name:"Falcon 9"}}];addLaunch(e){const t=this.startOfNew();if(!t)return;const i=c.VEHICLES.find(d=>d.id===e)??c.VEHICLES[0];let a=this.launches.length+1;for(;this.launches.some(d=>d.id===`launch-${a}`);)a++;const s={id:`launch-${a}`,vehicle:{...i.vehicle},track:t},l=this.host.sighting();l.skyEvents={...l.skyEvents,launches:[...this.launches,s]},this.currentId=s.id,this.row="path",this.placeIndex=0,this.host.changed(),this.sync()}deleteCurrent(){const e=this.current;if(!e)return;this.currentId=void 0;const t=this.host.sighting();t.skyEvents=k.written({...t.skyEvents,launches:this.launches.filter(i=>i!==e)}),this.host.changed(),this.sync()}labelOf(e){const t=this.host.said().read(e.title)??e.vehicle?.mission??e.vehicle?.name;return t?`${t} (${e.id})`:e.id}get launches(){return this.host.sighting().skyEvents?.launches??[]}element(e){return this.container.querySelector(`#${e}`)}}export{c as LaunchEditor};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={intro:"A rocket launch while the recording runs, a fact of the sky: its exhaust shows lit by a Sun the ground no longer sees. Its path, its engine and how its exhaust spreads are set below.",none:"No launch in this recording",launch:"Launch",deleteLaunch:"Delete launch",addLaunch:"Add a launch",path:"Path",deletePlace:"Remove this place",jet:"Jet",addJet:"Add a jet",deleteJet:"Remove this jet",jetBurn:"Engine burn",jetVent:"Propellant vented",addLaunchNowhere:"Give the recording a place first: a launch is put in front of the witness",derivedNote:"An empty field shows, greyed, the value used: the default, or what the engine implies. Clear a field to go back to it.",timelineNote:`On the timeline, a row pressed is the one shown below: the path, or a jet. A diamond pressed takes the scene to its instant; drag it to move it in time. The "+" of a row adds at the playhead. The hatched parts are before the recording's start or after its end.`,addHere:"Add here, at the playhead",here:"Already at the playhead: press it to edit it",zoomHint:"Pinch, or Ctrl + wheel, to zoom; Shift + wheel to scroll"};export{e as launchEditorMessages_en};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={intro:"Un lanzamiento de cohete durante la grabación, un hecho del cielo: su escape se ve iluminado por un Sol que el suelo ya no ve. Su trayectoria, su motor y la expansión del escape se ajustan abajo.",none:"Ningún lanzamiento en esta grabación",launch:"Lanzamiento",deleteLaunch:"Eliminar el lanzamiento",addLaunch:"Añadir un lanzamiento",path:"Trayectoria",deletePlace:"Quitar este punto",jet:"Chorro",addJet:"Añadir un chorro",deleteJet:"Quitar este chorro",jetBurn:"Encendido del motor",jetVent:"Propelentes purgados",addLaunchNowhere:"Dé primero un lugar a la grabación: un lanzamiento se pone delante del testigo",derivedNote:"Un campo vacío muestra, en gris, el valor usado: el predeterminado, o lo que implica el motor. Vacíe un campo para volver a él.",timelineNote:"En la línea de tiempo, una fila pulsada es la que se detalla debajo: la trayectoria, o un chorro. Un rombo pulsado lleva la escena a su instante; arrástrelo para moverlo en el tiempo. El «+» de una fila añade en el cabezal. Las partes rayadas están antes del inicio de la grabación o después de su final.",addHere:"Añadir aquí, en el cabezal",here:"Ya en el cabezal: púlselo para editarlo",zoomHint:"Pellizque, o Ctrl + rueda, para ampliar; Mayús + rueda para desplazar"};export{e as launchEditorMessages_es};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={intro:"Un lancement de fusée pendant l'enregistrement, un fait du ciel : son échappement se voit éclairé par un Soleil que le sol ne voit plus. Son chemin, son moteur et l'étalement de l'échappement se règlent ci-dessous.",none:"Aucun lancement dans cet enregistrement",launch:"Lancement",deleteLaunch:"Supprimer le lancement",addLaunch:"Ajouter un lancement",path:"Chemin",deletePlace:"Retirer ce point",jet:"Jet",addJet:"Ajouter un jet",deleteJet:"Retirer ce jet",jetBurn:"Allumage du moteur",jetVent:"Ergols vidangés",addLaunchNowhere:"Donnez d'abord un lieu à l'enregistrement : un lancement est placé devant le témoin",derivedNote:"Un champ vide montre, en grisé, la valeur utilisée : le défaut, ou ce que le moteur implique. Videz un champ pour y revenir.",timelineNote:"Sur la frise, une ligne pressée est celle détaillée dessous : le chemin, ou un jet. Un losange pressé amène la scène à son instant ; faites-le glisser pour le déplacer dans le temps. Le « + » d'une ligne ajoute à la tête de lecture. Les parties hachurées sont avant le début de l'enregistrement ou après sa fin.",addHere:"Ajouter ici, à la tête de lecture",here:"Déjà à la tête de lecture : pressez-le pour le modifier",zoomHint:"Pincez, ou Ctrl + molette, pour zoomer ; Maj + molette pour défiler"};export{e as launchEditorMessages_fr};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={intro:"Un lancio di razzo durante la registrazione, un fatto del cielo: il suo scarico si vede illuminato da un Sole che il suolo non vede più. Il suo percorso, il motore e l'espansione dello scarico si regolano qui sotto.",none:"Nessun lancio in questa registrazione",launch:"Lancio",deleteLaunch:"Elimina il lancio",addLaunch:"Aggiungi un lancio",path:"Percorso",deletePlace:"Rimuovi questo punto",jet:"Getto",addJet:"Aggiungere un getto",deleteJet:"Togliere questo getto",jetBurn:"Accensione del motore",jetVent:"Propellenti scaricati",addLaunchNowhere:"Dia prima un luogo alla registrazione: un lancio è posto davanti al testimone",derivedNote:"Un campo vuoto mostra, in grigio, il valore usato: il predefinito, o ciò che implica il motore. Svuota un campo per tornarci.",timelineNote:"Sulla linea del tempo, una riga premuta è quella dettagliata sotto: il percorso, o un getto. Un rombo premuto porta la scena al suo istante; trascinatelo per spostarlo nel tempo. Il «+» di una riga aggiunge alla testina. Le parti tratteggiate sono prima dell'inizio della registrazione o dopo la sua fine.",addHere:"Aggiungere qui, alla testina",here:"Già alla testina: premetelo per modificarlo",zoomHint:"Pizzicate, o Ctrl + rotella, per ingrandire; Maiusc + rotella per scorrere"};export{e as launchEditorMessages_it};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aw as F,ax as v,ay as b,az as Y,Z as H}from"./rr0-sighting-editor.mjs";class K{static MU=398600.4418;static OMEGA=72921159e-12;static EARTH_RADIUS_KM=6371;static STEP_S=1;static DENSITY=[[0,1.225],[20,.0889],[40,.004],[60,31e-5],[80,185e-7],[100,56e-8],[120,222e-10],[150,208e-11],[200,254e-12],[250,607e-13],[300,192e-13],[400,28e-13],[500,522e-15],[600,114e-15],[700,307e-16],[800,114e-16],[900,576e-17],[1e3,356e-17]];static FREE_PATH_TIMES_DENSITY=68e-9;static ICE_DENSITY=917;static airDensity(s){const t=K.DENSITY;if(s<=t[0][0])return t[0][1];let e=0;for(;e<t.length-2&&t[e+1][0]<s;)e++;const[a,i]=t[e],[o,n]=t[e+1];return i*Math.exp(Math.log(n/i)*(s-a)/(o-a))}static dragPerKm(s,t,e,a=.5){const i=K.airDensity(s),o=K.FREE_PATH_TIMES_DENSITY/i/1e3,n=Math.exp(-o/t),p=i*1e9*Math.PI*t*t/Math.max(e,1e-9),d=3*i/(4*a*1e-6*K.ICE_DENSITY)*1e3;return n*p+(1-n)*d}static step(s,t,e,a,i){const[o,n,p,d,R,h]=s,m=Math.hypot(o,n,p),T=K.OMEGA,M=-398600.4418/(m*m*m),y=M*o+2*T*R+T*T*o,U=M*n-2*T*d+T*T*n,I=M*p,E=Math.hypot(d,R,h),c=1/(1+K.dragPerKm(m-K.EARTH_RADIUS_KM,e,a,i)*E*t);s[3]=(d+y*t)*c,s[4]=(R+U*t)*c,s[5]=(h+I*t)*c,s[0]=o+s[3]*t,s[1]=n+s[4]*t,s[2]=p+s[5]*t;const f=Math.hypot(s[0],s[1],s[2]);if(f<K.EARTH_RADIUS_KM){const A=K.EARTH_RADIUS_KM/f;s[0]*=A,s[1]*=A,s[2]*=A,s[3]=s[4]=s[5]=0}}}class _{constructor(s,t,e,a,i=.5){this.massKg=e,this.radiusAt=a,this.particleRadiusUm=i,this.state=Float64Array.of(...s,...t),this.positions=new Float64Array(192),this.positions.set(s,0)}positions;steps=0;state;at(s){const t=K.STEP_S,e=Math.max(0,s/t),a=Math.ceil(e);for(;this.steps<a;){if(K.step(this.state,t,this.radiusAt(this.steps*t),this.massKg,this.particleRadiusUm),this.steps++,3*(this.steps+1)>this.positions.length){const p=new Float64Array(this.positions.length*2);p.set(this.positions),this.positions=p}this.positions.set(this.state.subarray(0,3),3*this.steps)}const i=Math.floor(e),o=e-i,n=this.positions;return o===0||i>=this.steps?[n[3*i],n[3*i+1],n[3*i+2]]:[0,1,2].map(p=>n[3*i+p]+(n[3*i+3+p]-n[3*i+p])*o)}}class r{static EARTH_RADIUS_KM=6371;static SHADOW_RADIUS_KM=r.EARTH_RADIUS_KM+15;static PENUMBRA_KM=10;static SUN_ILLUMINANCE_LUX=127e3;static RAYLEIGH_PER_M=[58e-7,135e-7,331e-7];static SCALE_HEIGHT_M=8e3;static OZONE_GRAZING_DEPTH=[2.4,1.8,.24];static ANISOTROPY=.7;static ALBEDO=.99;static WAVELENGTHS_UM=[.61,.55,.465];static ICE_INDEX=1.31;static DEFAULTS={exhaustKgPerS:273,condensedShare:.065,particleRadiusUm:.5,expansionKmPerS:.15,initialRadiusKm:.5,lifetimeS:420,collarShare:.85,collarExpansionKmPerS:2.5,collarLifetimeS:20};static PROPELLANTS={"rp1-lox":{condensedShare:.065,particleRadiusUm:.5},"methane-lox":{condensedShare:.09,particleRadiusUm:.5},"hydrogen-lox":{condensedShare:.13,particleRadiusUm:.5},hypergolic:{condensedShare:.079,particleRadiusUm:.4},solid:{condensedShare:.27,particleRadiusUm:.8}};static G0=9.80665;static COLLAR_SPREAD_OF_EXHAUST_VELOCITY=.735;static plumeOf(s){const t={},e=s.vehicle?.engine;if(e){const a=e.specificImpulseS===void 0?void 0:e.specificImpulseS*r.G0;e.thrustKN!==void 0&&a&&(t.exhaustKgPerS=e.thrustKN*1e3/a),a&&(t.collarExpansionKmPerS=a/1e3*r.COLLAR_SPREAD_OF_EXHAUST_VELOCITY),e.propellant&&Object.assign(t,r.PROPELLANTS[e.propellant])}return{...r.DEFAULTS,...t,...s.plume}}static PUFF_EVERY_S=.5;static SIGMA_OF_RADIUS=.5;static MAX_PUFFS=320;static DEG=Math.PI/180;static EARTH_ROTATION=72921159e-12;static VENT_DEFAULTS={speedKmPerS:.7,massKgPerS:20,condensedShare:.5,particleRadiusUm:.5,expansionKmPerS:.1,initialRadiusKm:.2,lifetimeS:600};static paths=new WeakMap;static exhaustVelocityKmPerS(s){return(s.vehicle?.engine?.specificImpulseS??348)*r.G0/1e3}static releasesOf(s){const t=[],e=s.jets??[];if(e.length===0||s.burnFromT!==void 0||s.burnUntilT!==void 0){const a=s.track[0]?.t??0,i=s.track[s.track.length-1]?.t??0;t.push(r.engineRelease(s,"burn",{fromT:s.burnFromT??a,untilT:s.burnUntilT??i}))}return e.forEach((a,i)=>t.push(r.releaseOf(s,a,i))),t}static releaseOf(s,t,e){const a=`jet:${t.id??e}`;if((t.kind??"burn")==="burn")return r.engineRelease(s,a,t);const i=r.VENT_DEFAULTS;return{key:a,fromT:t.fromT,untilT:t.untilT,angleDeg:t.angleDeg??0,azimuthDeg:t.azimuthDeg??0,spinPeriodS:t.spinPeriodS,speedKmPerS:t.speedKmPerS??i.speedKmPerS,massKgPerS:t.massKgPerS??i.massKgPerS,condensedShare:t.condensedShare??i.condensedShare,particleRadiusUm:t.particleRadiusUm??i.particleRadiusUm,initialRadiusKm:t.initialRadiusKm??i.initialRadiusKm,populations:[{share:1,expansionKmPerS:t.expansionKmPerS??i.expansionKmPerS,lifetimeS:t.lifetimeS??i.lifetimeS}]}}static engineRelease(s,t,e){const a=r.plumeOf(s);return{key:t,fromT:e.fromT,untilT:e.untilT,angleDeg:e.angleDeg??0,azimuthDeg:e.azimuthDeg??0,spinPeriodS:e.spinPeriodS,speedKmPerS:e.speedKmPerS??r.exhaustVelocityKmPerS(s),massKgPerS:e.massKgPerS??a.exhaustKgPerS,condensedShare:e.condensedShare??a.condensedShare,particleRadiusUm:e.particleRadiusUm??a.particleRadiusUm,initialRadiusKm:e.initialRadiusKm??a.initialRadiusKm,populations:[{share:1-a.collarShare,expansionKmPerS:e.expansionKmPerS??a.expansionKmPerS,lifetimeS:e.lifetimeS??a.lifetimeS},{share:a.collarShare,expansionKmPerS:a.collarExpansionKmPerS,lifetimeS:a.collarLifetimeS}]}}static extinctionEfficiency(s,t){const e=2*Math.PI*s/t,a=r.ICE_INDEX**2,i=8/3*e**4*((a-1)/(a+2))**2,o=2*e*(r.ICE_INDEX-1),n=o<.001?o*o/2:2-4/o*Math.sin(o)+4/(o*o)*(1-Math.cos(o));return Math.min(i,n)}static scatteringColour(s){const t=r.extinctionEfficiency(s,r.WAVELENGTHS_UM[1]);return r.WAVELENGTHS_UM.map(e=>r.extinctionEfficiency(s,e)/t)}static sunDirectionAt(s){const t=new F(0,0,-6378137),e=v(b.Sun,s,t,!0,!0),a=(e.ra-Y(s))*15*r.DEG,i=e.dec*r.DEG;return[Math.cos(i)*Math.cos(a),Math.cos(i)*Math.sin(a),Math.sin(i)]}static puffsAt(s,t){const e=[];for(const a of s){let i=r.paths.get(a);i||r.paths.set(a,i=new Map);for(const o of r.releasesOf(a)){const n=Math.min(o.untilT,t);if(n<=o.fromT)continue;const p=Math.max(r.PUFF_EVERY_S*1e3,(o.untilT-o.fromT)/r.MAX_PUFFS),d=[];for(let M=o.fromT;M<n;M+=p)d.push(M);d.push(n);const R=o.massKgPerS*(p/1e3),m=3*r.extinctionEfficiency(o.particleRadiusUm,r.WAVELENGTHS_UM[1])/(4*917*o.particleRadiusUm*1e-6),T=r.scatteringColour(o.particleRadiusUm);o.populations.forEach((M,y)=>{if(M.share<=0)return;const U=E=>o.initialRadiusKm+M.expansionKmPerS*E,I=[];for(const E of d){const D=(t-E)/1e3;if(D>M.lifetimeS)continue;const c=E!==n||n===o.untilT,f=`${o.key}|${y}|${E}`;let A=c?i.get(f):void 0;if(!A){if(A=r.launchPuff(a,o,E,R*M.share,U),!A)continue;c&&i.set(f,A)}I.push({ageS:D,position:A.at(D)})}for(let E=I.length-1;E>=0;E--){const{ageS:D,position:c}=I[E],f=I[E-1]??I[E+1],A=f?Math.hypot(c[0]-f.position[0],c[1]-f.position[1],c[2]-f.position[2]):0,l=U(D)+A/2,O=r.SIGMA_OF_RADIUS*l*1e3,N=R*o.condensedShare*M.share*m/(2*Math.PI*O*O),x=Math.max(0,1-(D/M.lifetimeS)**2);N*x<=0||e.push({launchId:a.id,release:o.key,at:r.geoPoint(c),radiusKm:l,opticalDepth:N*x,colour:T,ageS:D})}})}}return e}static viewsAt(s,t,e,a){const i=[];for(const o of r.puffsAt(s,t)){const n=H.seenFrom(e,o.at);if(n.altitudeDeg<0)continue;const p=r.sunlightAt(o.at,a);if(p.lit<=0)continue;const d=r.scatteringPhase(e,o.at,a),R=r.SUN_ILLUMINANCE_LUX*r.ALBEDO*d*o.opticalDepth*p.lit;R<=0||i.push({launchId:o.launchId,release:o.release,heightKm:o.at.heightM/1e3,centre:n,radiusDeg:Math.atan2(o.radiusKm,n.distanceKm)/r.DEG,luminanceCdM2:R,sunTransmittance:p.transmittance,colour:o.colour,lit:p.lit,ageS:o.ageS})}return i}static launchPuff(s,t,e,a,i){const o={id:s.id,track:s.track,fragments:[]},n=H.leadAt(o,e);if(!n)return;const p=s.track[0].t,d=s.track[s.track.length-1].t,R=Math.max(p,e-500),h=Math.min(d,e+500),m=r.earthCentred(n),T=r.earthCentred(H.leadAt(o,R)),M=r.earthCentred(H.leadAt(o,h)),y=Math.max(.001,(h-R)/1e3),U=[0,1,2].map(S=>(M[S]-T[S])/y),I=r.EARTH_ROTATION,E=[U[0]-I*m[1],U[1]+I*m[0],U[2]],D=S=>{const w=Math.hypot(S[0],S[1],S[2])||1;return S.map(k=>k/w)},c=D(E),f=D(m),A=f[0]*c[0]+f[1]*c[1]+f[2]*c[2];let l=[f[0]-A*c[0],f[1]-A*c[1],f[2]-A*c[2]];Math.hypot(l[0],l[1],l[2])<1e-6&&(l=[-c[2]*c[0],-c[2]*c[1],1-c[2]*c[2]]),l=D(l);const O=[c[1]*l[2]-c[2]*l[1],c[2]*l[0]-c[0]*l[2],c[0]*l[1]-c[1]*l[0]],N=t.spinPeriodS?360*((e-t.fromT)/1e3)/t.spinPeriodS:0,x=(t.azimuthDeg+N)*r.DEG,G=t.angleDeg*r.DEG,C=[0,1,2].map(S=>-c[S]*Math.cos(G)+Math.sin(G)*(Math.cos(x)*l[S]+Math.sin(x)*O[S])),P=[0,1,2].map(S=>U[S]+t.speedKmPerS*C[S]);return new _(m,P,a,i,t.particleRadiusUm)}static geoPoint(s){const t=Math.hypot(s[0],s[1],s[2]);return{lat:Math.asin(s[2]/t)/r.DEG,lng:Math.atan2(s[1],s[0])/r.DEG,heightM:(t-K.EARTH_RADIUS_KM)*1e3}}static sunlightAt(s,t){const e=r.earthCentred(s),a=e[0]*t[0]+e[1]*t[1]+e[2]*t[2];if(a>=0)return{lit:1,transmittance:[1,1,1]};const i=Math.hypot(e[0]-a*t[0],e[1]-a*t[1],e[2]-a*t[2]),o=r.PENUMBRA_KM,n=Math.min(1,Math.max(0,(i-(r.SHADOW_RADIUS_KM-o/2))/o));if(n<=0)return{lit:0,transmittance:[0,0,0]};const p=Math.max(0,(i-r.EARTH_RADIUS_KM)*1e3),d=Math.exp(-p/r.SCALE_HEIGHT_M),R=Math.sqrt(2*Math.PI*r.EARTH_RADIUS_KM*1e3*r.SCALE_HEIGHT_M),h=Math.exp(-(((p/1e3-25)/15)**2)),m=[0,1,2].map(T=>Math.exp(-r.RAYLEIGH_PER_M[T]*d*R-r.OZONE_GRAZING_DEPTH[T]*h));return{lit:n,transmittance:m}}static scatteringPhase(s,t,e){const a=r.earthCentred(s),i=r.earthCentred(t),o=[a[0]-i[0],a[1]-i[1],a[2]-i[2]],n=Math.hypot(o[0],o[1],o[2])||1,p=-(o[0]*e[0]+o[1]*e[1]+o[2]*e[2])/n,d=r.ANISOTROPY;return(1-d*d)/(4*Math.PI*(1+d*d-2*d*p)**1.5)}static earthCentred(s){const t=s.lat*r.DEG,e=s.lng*r.DEG,a=r.EARTH_RADIUS_KM+s.heightM/1e3;return[a*Math.cos(t)*Math.cos(e),a*Math.cos(t)*Math.sin(e),a*Math.sin(t)]}}export{r as L};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{L as M}from"./LaunchPlume-Dm1YdsZp.js";import{a5 as T,al as z,am as f,a8 as C,au as w,av as A}from"./rr0-sighting-editor.mjs";class n{static RADIUS=840;static MAX_PUFFS=1e3;static RINGS=[0,.25,.5,.75,1,1.25];static COLUMN=n.RINGS.map(t=>{const i=o=>Math.exp(-((o/M.SIGMA_OF_RADIUS)**2)/2),s=i(n.RINGS[n.RINGS.length-1]);return Math.max(0,(i(t)-s)/(1-s))});static SECTORS=12;static VERTICES_PER_PUFF=n.SECTORS*(3+6*(n.RINGS.length-2));static BRIGHTEST_RELATIVE=6e4;object=new T;mesh;positions=new Float32Array(n.MAX_PUFFS*n.VERTICES_PER_PUFF*3);colors=new Float32Array(n.MAX_PUFFS*n.VERTICES_PER_PUFF*3);shown=0;drawn=[];static VISIBLE_CONTRAST=.1;constructor(){this.object.name="plumes";const t=new z;t.setAttribute("position",new f(this.positions,3)),t.setAttribute("color",new f(this.colors,3)),t.setDrawRange(0,0),this.mesh=new C(t,w.material()),this.mesh.frustumCulled=!1,w.track(this.mesh),this.object.add(this.mesh)}get count(){return this.shown}set(t,i,s,o){let a=0,c=0;this.drawn=[];for(const p of t){if(c>=n.MAX_PUFFS)break;const d=o(p.centre);if(d<=0)continue;const h=s(p.centre),r=[0,1,2].map(g=>Math.min(n.BRIGHTEST_RELATIVE,p.luminanceCdM2*(p.colour?.[g]??1)*i*p.sunTransmittance[g]*h[g]*d));Math.max(...r)<=0||(a=this.pushPuff(a,p,r),this.drawn.push({view:p,direction:this.normalise(A(p.centre.altitudeDeg,p.centre.azimuthDeg,1)),radiusRad:p.radiusDeg*Math.PI/180,luminance:.2126*r[0]+.7152*r[1]+.0722*r[2]}),c++)}this.shown=c;const u=this.mesh.geometry;u.setDrawRange(0,a),u.getAttribute("position").needsUpdate=!0,u.getAttribute("color").needsUpdate=!0}pushPuff(t,i,s){const o=A(i.centre.altitudeDeg,i.centre.azimuthDeg,n.RADIUS),a=this.normalise(o),c=this.normalise(this.cross({x:0,y:1,z:0},a)),u=this.cross(a,c),p=n.RADIUS*Math.tan(i.radiusDeg*Math.PI/180),d=(r,g)=>{const e=g/n.SECTORS*2*Math.PI,I=n.RINGS[r]*p,R=Math.cos(e)*I,l=Math.sin(e)*I;return{x:o.x+c.x*R+u.x*l,y:o.y+c.y*R+u.y*l,z:o.z+c.z*R+u.z*l}},h=r=>n.COLUMN[r];for(let r=0;r<n.SECTORS;r++){const g=(r+1)%n.SECTORS;t=this.push(t,o,s,h(0)),t=this.push(t,d(1,r),s,h(1)),t=this.push(t,d(1,g),s,h(1));for(let e=1;e<n.RINGS.length-1;e++){const I=d(e,r),R=d(e,g),l=d(e+1,r),E=d(e+1,g);t=this.push(t,I,s,h(e)),t=this.push(t,R,s,h(e)),t=this.push(t,l,s,h(e+1)),t=this.push(t,R,s,h(e)),t=this.push(t,E,s,h(e+1)),t=this.push(t,l,s,h(e+1))}}return t}pickAt(t,i,s=0){const o=this.normalise(t);let a=0,c;for(const u of this.drawn){const p=Math.max(-1,Math.min(1,o.x*u.direction.x+o.y*u.direction.y+o.z*u.direction.z)),d=Math.max(0,Math.acos(p)-i)/Math.max(u.radiusRad,1e-9),h=u.luminance*n.profile(d);h<=0||(a+=h,(!c||h>c.light)&&(c={view:u.view,light:h}))}return c&&a>=n.VISIBLE_CONTRAST*s?c.view:void 0}static profile(t){const i=n.RINGS;if(t>=i[i.length-1])return 0;let s=0;for(;t>i[s+1];)s++;const o=(t-i[s])/(i[s+1]-i[s]);return n.COLUMN[s]+(n.COLUMN[s+1]-n.COLUMN[s])*o}push(t,i,s,o){const a=t*3;return this.positions[a]=i.x,this.positions[a+1]=i.y,this.positions[a+2]=i.z,this.colors[a]=s[0]*o,this.colors[a+1]=s[1]*o,this.colors[a+2]=s[2]*o,t+1}cross(t,i){return this.normalise({x:t.y*i.z-t.z*i.y,y:t.z*i.x-t.x*i.z,z:t.x*i.y-t.y*i.x})}normalise(t){const i=Math.hypot(t.x,t.y,t.z)||1;return{x:t.x/i,y:t.y/i,z:t.z/i}}dispose(){this.mesh.geometry.dispose(),this.mesh.material.dispose(),this.object.removeFromParent()}}class N{inSky=!0;plumes=new n;get object(){return this.plumes.object}get drawnCount(){return this.plumes.count}update(t,i,s){const o=t.length===0||!s.date?[]:M.viewsAt(t,i,s.observer,M.sunDirectionAt(s.date));o.length===0&&this.plumes.count===0||this.plumes.set(o,s.relativeScale,a=>s.transmittanceFromSpace(a),a=>s.cloudTransmission(a))}pick(t,i,s){const o=this.plumes.pickAt(i,s.toleranceRad,s.skyLightTowards(i));return o&&{id:o.launchId,detail:o}}dispose(){this.plumes.dispose()}}export{N as LaunchSimulation};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a5 as d,a6 as p,a7 as l,a8 as f,a9 as m,aa as u,ab as w,ac as g,ad as y,ae as M,af as S,ag as b,V as v}from"./rr0-sighting-editor.mjs";class h{static key(e){return"url"in e?`url:${e.url}|${e.headingOffsetDeg??0}`:"shape"in e?`shape:${e.shape}`:`decor:${e.decorKind}`}static async build(e){const a=new d;if("url"in e){const s=await p(e.url);s.rotation.y=-(e.headingOffsetDeg??0)*Math.PI/180,a.add(s)}else"shape"in e?a.add(h.shapeOf(e.shape)):a.add(l.build({id:"preview",kind:e.decorKind,eastM:0,northM:0},!1));return a}static shapeOf(e){if(e==="figure")return l.build({id:"preview",kind:"entity",eastM:0,northM:0},!1);const a=new f(m.unitGeometry(e),new u({color:13158608,roughness:.5,metalness:0}));return e==="ellipsoid"&&a.scale.set(1,.55,1),a}static dispose(e){e.traverse(a=>{const s=a;if(s.isMesh){s.geometry?.dispose();for(const t of[s.material].flat())t.dispose()}})}static stage(e,a){const s=new w().setFromObject(e);if(s.isEmpty())return;const t=s.getBoundingSphere(new g),r=new d;e.position.sub(t.center),r.add(e);const n=new y;n.add(r),n.add(new M(16777215,6715272,1.6));const o=new S(16777215,2.5);o.position.set(1,2,1.5),n.add(o);const i=new b(30,a,t.radius*.05,t.radius*20),c=t.radius/Math.sin(i.fov*Math.PI/360)*1.05;return i.position.copy(new v(.55,.3,-.78).normalize().multiplyScalar(c)),i.lookAt(0,0,0),{scene:n,camera:i,pivot:r}}}export{h as M};
|
package/dist-embed-sighting-editor/{ModelThumbnails-BA3zFrn5.js → ModelThumbnails-DYWQQdaZ.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a4 as c}from"./rr0-sighting-editor.mjs";import{M as i}from"./ModelSource-CYfSBTeB.js";class l{static SIZE_PX={width:192,height:144};static cache=new Map;static queue=Promise.resolve();static pending=0;static renderer;static of(r){const t=i.key(r);let e=this.cache.get(t);return e||(this.pending++,e=this.queue.then(()=>this.draw(r)).catch(()=>{}).finally(()=>{--this.pending===0&&this.release()}),this.queue=e,this.cache.set(t,e)),e}static async draw(r){const t=await i.build(r);try{const{width:e,height:n}=this.SIZE_PX,a=i.stage(t,e/n);if(!a)return;const s=this.renderer??=new c({antialias:!0,alpha:!0,preserveDrawingBuffer:!0});return s.setSize(e,n,!1),s.setClearColor(0,0),s.render(a.scene,a.camera),s.domElement.toDataURL("image/png")}finally{i.dispose(t)}}static release(){this.renderer?.dispose(),this.renderer?.forceContextLoss(),this.renderer=void 0}}export{l as ModelThumbnails};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a4 as h}from"./rr0-sighting-editor.mjs";import{M as c}from"./ModelSource-CYfSBTeB.js";class a{constructor(t,e){this.container=t,this.source=e,this.canvas=document.createElement("canvas"),this.canvas.className="model-live",this.canvas.style.cssText="position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:grab;display:none",this.canvas.addEventListener("pointerdown",s=>this.press(s)),this.canvas.addEventListener("pointermove",s=>this.move(s)),this.canvas.addEventListener("pointerup",()=>this.release()),this.canvas.addEventListener("pointercancel",()=>this.release())}static renderer;static SPIN_RAD_PER_S=.7;static DRAG_RAD_PER_PX=.012;static CLICK_TOLERANCE_PX=4;static current;object;stage;frame=0;stopped=!1;last=0;dragging;draggedPastClick=!1;canvas;static show(t,e){a.current?.stop();const s=new a(t,e);return a.current=s,s.start(),s}static end(){a.current?.stop(),a.current=void 0,a.renderer?.dispose(),a.renderer?.forceContextLoss(),a.renderer=void 0}consumeDrag(){const t=this.draggedPastClick;return this.draggedPastClick=!1,t}get active(){return!this.stopped}stop(){this.stopped=!0,cancelAnimationFrame(this.frame),this.canvas.remove(),this.object&&c.dispose(this.object),this.object=void 0,a.current===this&&(a.current=void 0)}async start(){try{const t=await c.build(this.source);if(this.stopped){c.dispose(t);return}this.object=t;const{width:e,height:s}=this.container.getBoundingClientRect(),i=e>0&&s>0?e/s:4/3;if(this.stage=c.stage(t,i),!this.stage)return;(a.renderer??=new h({antialias:!0,alpha:!0})).setClearColor(0,0),this.container.append(this.canvas),this.canvas.style.display="block",this.last=performance.now(),this.tick()}catch{}}tick=()=>{if(this.stopped||!this.stage)return;const t=performance.now(),e=Math.min(.1,(t-this.last)/1e3);this.last=t,this.dragging||(this.stage.pivot.rotation.y+=a.SPIN_RAD_PER_S*e);const s=a.renderer,{width:i,height:n}=this.canvas.getBoundingClientRect(),r=Math.min(2,window.devicePixelRatio||1);(this.canvas.width!==Math.round(i*r)||this.canvas.height!==Math.round(n*r))&&(s.setPixelRatio(r),s.setSize(i,n,!1),this.canvas.width=Math.round(i*r),this.canvas.height=Math.round(n*r),this.stage.camera.aspect=i/Math.max(1,n),this.stage.camera.updateProjectionMatrix()),s.render(this.stage.scene,this.stage.camera);const o=this.canvas.getContext("2d");o?.clearRect(0,0,this.canvas.width,this.canvas.height),o?.drawImage(s.domElement,0,0,this.canvas.width,this.canvas.height),this.frame=requestAnimationFrame(this.tick)};press(t){this.dragging={x:t.clientX,y:t.clientY,moved:!1},this.canvas.setPointerCapture(t.pointerId),this.canvas.style.cursor="grabbing"}move(t){const e=this.dragging;if(!e||!this.stage)return;const s=t.clientX-e.x,i=t.clientY-e.y;!e.moved&&Math.hypot(s,i)<a.CLICK_TOLERANCE_PX||(e.moved=!0,this.draggedPastClick=!0,this.stage.pivot.rotation.y+=s*a.DRAG_RAD_PER_PX,this.stage.pivot.rotation.x=Math.max(-1.4,Math.min(1.4,this.stage.pivot.rotation.x-i*a.DRAG_RAD_PER_PX)),e.x=t.clientX,e.y=t.clientY)}release(){this.dragging=void 0,this.canvas.style.cursor="grab"}}export{a as ModelViewer};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ModuleThree-CkOgRXM2.js","./rr0-sighting-editor.mjs"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{q as g,t as w,_ as b,n as p}from"./rr0-sighting-editor.mjs";class n{static STORAGE_KEY="ufoathome.modules";static FORMAT=1;static empty(){return{format:1,modules:[]}}static read(t=n.storage()){try{const e=t?.getItem(n.STORAGE_KEY);return e?n.parse(e):n.empty()}catch{return n.empty()}}static write(t,e=n.storage()){try{return e?(t.modules.length===0?e.removeItem(n.STORAGE_KEY):e.setItem(n.STORAGE_KEY,n.text(t)),!0):!1}catch{return!1}}static parse(t){const e=JSON.parse(t);if(e===null||typeof e!="object"||!Array.isArray(e.modules))throw new Error("not a UFO@home module list");if(typeof e.format=="number"&&e.format>n.FORMAT)throw new Error(`format ${e.format} is newer than ${n.FORMAT}`);const r=new Set,s=[];for(const i of e.modules)typeof i?.url!="string"||r.has(i.url)||(r.add(i.url),s.push({url:i.url,enabled:i.enabled!==!1}));return{format:1,modules:s}}static text(t){return JSON.stringify({format:n.FORMAT,modules:t.modules},null,2)+`
|
|
3
|
+
`}static storage(){try{return typeof localStorage>"u"?void 0:localStorage}catch{return}}}class E{constructor(t,e){this.attribution=t,this.models=e}async entries(t){return t?this.models.filter(e=>[e.kind].flat().includes(t)):[...this.models]}async entry(t){return this.models.find(e=>e.id===t)}}class f{attribution;fetchImpl;tileUrlTemplate;constructor(t){this.attribution=t.attribution,this.tileUrlTemplate=t.tileUrlTemplate,this.fetchImpl=t.fetchImpl??fetch.bind(globalThis)}getImageryTexture(t,e){return g(t,e,r=>f.tileUrl(this.tileUrlTemplate,r),this.fetchImpl)}static tileUrl(t,e){return t.replaceAll("{z}",String(e.z)).replaceAll("{x}",String(e.x)).replaceAll("{y}",String(e.y))}}class v extends Error{constructor(t,e){super(`${t}: ${e}`),this.url=t,this.reason=e,this.name="ModuleManifestError"}}class d{static FORMAT=1;static check(t,e){const r=o=>{throw new v(e,o)};(t===null||typeof t!="object"||Array.isArray(t))&&r("not a JSON object");const s=t;typeof s.format!="number"&&r('no "format"'),s.format>d.FORMAT&&r(`format ${s.format} is newer than ${d.FORMAT}, which this version reads`),(typeof s.id!="string"||!/^[a-z0-9][a-z0-9._-]*$/.test(s.id))&&r(`"id" must be lowercase letters, digits, '.', '_' or '-'`),(typeof s.name!="string"||s.name.trim()==="")&&r('no "name"'),s.script!==void 0&&typeof s.script!="string"&&r('"script" must be an address');const i=s.contributes??{};for(const o of["imagery","elevation"]){const c=i[o];c!==void 0&&(Array.isArray(c)||r(`"contributes.${o}" must be a list`),c.forEach((l,h)=>{for(const m of["id","name","credit","creditUrl","tiles"])(typeof l?.[m]!="string"||l[m]==="")&&r(`"contributes.${o}[${h}].${m}" is missing`);["{z}","{x}","{y}"].every(m=>l.tiles.includes(m))||r(`"contributes.${o}[${h}].tiles" must hold {z}, {x} and {y}`)}))}const a=i.models;return a!==void 0&&(Array.isArray(a)||r('"contributes.models" must be a list'),a.forEach((o,c)=>{for(const l of["id","name","file"])(typeof o?.[l]!="string"||o[l]==="")&&r(`"contributes.models[${c}].${l}" is missing`);o.kind===void 0&&r(`"contributes.models[${c}].kind" is missing`),(!o.credit||typeof o.credit!="object")&&r(`"contributes.models[${c}].credit" is missing: a model is shown with its author and licence`)})),s}static contributions(t,e){const r=t.contributes??{},s={};if(r.imagery?.length&&(s.imagery=r.imagery.map(i=>({id:i.id,name:i.name,credit:i.credit,creditUrl:i.creditUrl,create:a=>new f({tileUrlTemplate:d.absoluteTemplate(i.tiles,e),attribution:i.credit,fetchImpl:a})}))),r.elevation?.length&&(s.elevation=r.elevation.map(i=>({id:i.id,name:i.name,credit:i.credit,creditUrl:i.creditUrl,create:a=>new w({tileUrlTemplate:d.absoluteTemplate(i.tiles,e),fetchImpl:a})}))),r.models?.length){const i=r.models.map(({file:o,...c})=>({...c,url:new URL(o,e).href})),a=t.credit??t.name;s.decorModels=[{id:`${t.id}-models`,name:t.name,credit:a,creditUrl:t.creditUrl??e,create:()=>new E(a,i)}]}return s}static module(t,e,r={}){const s=d.contributions(t,e);for(const[i,a]of Object.entries(r))Array.isArray(a)&&(s[i]=[...s[i]??[],...a]);return{id:t.id,name:t.name,credit:t.credit,creditUrl:t.creditUrl,url:e,contributes:s}}static absoluteTemplate(t,e){const r=t.replaceAll("{z}","__Z__").replaceAll("{x}","__X__").replaceAll("{y}","__Y__");return new URL(r,e).href.replaceAll("__Z__","{z}").replaceAll("__X__","{x}").replaceAll("__Y__","{y}")}}class T{fetchImpl;importImpl;constructor(t={}){this.fetchImpl=t.fetchImpl??fetch.bind(globalThis),this.importImpl=t.importImpl??(e=>import(e))}async load(t,e){const r=await this.fetchImpl(t);if(!r.ok)throw new Error(`${t}: HTTP ${r.status}`);const s=d.check(await r.json(),t),i=s.script!==void 0;let a={};if(i&&e.runScript){const o=new URL(s.script,t).href,c=await this.importImpl(o);if(typeof c.default!="function")throw new Error(`${o}: its default export is not a function`);const{MODULE_THREE:l}=await b(async()=>{const{MODULE_THREE:h}=await import("./ModuleThree-CkOgRXM2.js");return{MODULE_THREE:h}},__vite__mapDeps([0,1]),import.meta.url);a=await c.default({manifestUrl:t,three:l})??{}}return{url:t,manifest:s,module:d.module(s,t,a),hasScript:i,scriptRun:i&&e.runScript}}}class y{constructor(t=new T,e){this.loader=t,this.storage=e}static shared=new y;changes=new EventTarget;states=new Map;config=n.empty();started;list(){const t=[...this.states.values()];return[...t.filter(e=>e.addedByPerson),...t.filter(e=>!e.addedByPerson)]}state(t){return this.states.get(t)}start(){return this.started??=this.applyConfig(n.read(this.storage)),this.started}async add(t){await this.start();const e=new URL(t,typeof location>"u"?void 0:location.href).href;return this.config.modules.some(r=>r.url===e)||(this.config={...this.config,modules:[...this.config.modules,{url:e,enabled:!0}]},this.save()),this.reload(e)}async remove(t){this.config={...this.config,modules:this.config.modules.filter(e=>e.url!==t)},this.save(),await this.reload(t)}async setEnabled(t,e){this.config={...this.config,modules:this.config.modules.map(r=>r.url===t?{...r,enabled:e}:r)},this.save(),await this.reload(t)}exportText(){return n.text(this.config)}async importText(t){const e=n.parse(t);await this.start();const r=this.config.modules.map(s=>s.url);this.config=e,this.save(),await Promise.all([...new Set([...r,...e.modules.map(s=>s.url)])].map(s=>this.reload(s)))}async require(t,e){t?.length&&(await this.start(),await Promise.all(t.map(async r=>{let s;try{s=new URL(r,e??(typeof location>"u"?void 0:location.href)).href}catch{return}const i=this.states.get(s);if(i&&i.status!=="off")return i.status==="loading"?this.pending.get(s):void 0;this.named.add(s),await this.reload(s)})))}named=new Set;pending=new Map;async applyConfig(t){this.config=t,await Promise.all(t.modules.map(e=>this.reload(e.url)))}reload(t){const e=this.reloadNow(t);return this.pending.set(t,e),e}async reloadNow(t){const e=this.config.modules.find(a=>a.url===t),r=this.states.get(t);r?.loaded&&p.uninstall(r.loaded.module.id);const s=e!==void 0,i=e?.enabled??!0;if(!s&&!this.named.has(t))return this.states.delete(t),this.announce(),{url:t,addedByPerson:s,enabled:i,status:"off"};if(s&&!i&&!this.named.has(t))return this.set({url:t,addedByPerson:s,enabled:i,status:"off"});this.set({url:t,addedByPerson:s,enabled:i,status:"loading"});try{const a=await this.loader.load(t,{runScript:s&&i});return p.install(a.module),this.set({url:t,addedByPerson:s,enabled:i,status:"installed",loaded:a})}catch(a){return this.set({url:t,addedByPerson:s,enabled:i,status:"failed",error:a instanceof Error?a.message:String(a)})}}set(t){return this.states.set(t.url,t),this.announce(),t}save(){n.write(this.config,this.storage)}announce(){this.changes.dispatchEvent(new Event("change"))}}export{y as ModuleSession};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{V as a,aS as e,bX as s,b7 as t,b9 as r,bg as i,a_ as o,Q as b,b6 as n,aC as l,bp as u,bh as m,u as d,bY as M,aa as S,an as B,a8 as c,w as f,bH as p,bE as y,bI as G,a5 as h,bV as E,aU as g,v as x,ao as C,bZ as L,b_ as D,b$ as P,aE as T,b8 as V,al as v,am as A,c0 as _,bf as F,ap as H}from"./rr0-sighting-editor.mjs";const Q={AdditiveBlending:H,BackSide:F,BoxGeometry:_,BufferAttribute:A,BufferGeometry:v,CanvasTexture:V,Color:T,ConeGeometry:P,CylinderGeometry:D,DataTexture:L,DoubleSide:C,Euler:x,Float32BufferAttribute:g,FrontSide:E,Group:h,Line:G,LineBasicMaterial:y,LineSegments:p,Matrix4:f,Mesh:c,MeshBasicMaterial:B,MeshStandardMaterial:S,NormalBlending:M,Object3D:d,PlaneGeometry:m,PointLight:u,Points:l,PointsMaterial:n,Quaternion:b,ShaderMaterial:o,SphereGeometry:i,Sprite:r,SpriteMaterial:t,TorusGeometry:s,Vector2:e,Vector3:a};export{Q as MODULE_THREE};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{ModuleSession as y}from"./ModuleSession-D3GrBJ3j.js";import{U as k,o as C,p as L,M as r}from"./rr0-sighting-editor.mjs";import{modulesPanelMessages_en as N}from"./ModulesPanelMessages_en-D97Nh2yy.js";const w="rr0-modules-panel",M=`
|
|
2
|
+
rr0-modules-panel { display: block; }
|
|
3
|
+
rr0-modules-panel .mp-add { display: flex; gap: .4em; align-items: center; margin: .4em 0; }
|
|
4
|
+
rr0-modules-panel .mp-add input { flex: 1 1 16em; min-width: 0; }
|
|
5
|
+
rr0-modules-panel .mp-list { list-style: none; margin: .5em 0; padding: 0; }
|
|
6
|
+
rr0-modules-panel .mp-module { padding: .4em 0; border-top: 1px solid color-mix(in srgb, CanvasText 15%, transparent); }
|
|
7
|
+
rr0-modules-panel .mp-head { display: flex; gap: .6em; align-items: center; flex-wrap: wrap; }
|
|
8
|
+
rr0-modules-panel .mp-name { font-weight: 600; }
|
|
9
|
+
rr0-modules-panel .mp-url { overflow-wrap: anywhere; }
|
|
10
|
+
rr0-modules-panel .mp-head .mp-remove { margin-left: auto; }
|
|
11
|
+
rr0-modules-panel .mp-module p { margin: .2em 0; }
|
|
12
|
+
rr0-modules-panel .mp-files { display: flex; gap: .6em; flex-wrap: wrap; align-items: center; margin-top: .6em; }
|
|
13
|
+
`;class B extends HTMLElement{session=y.shared;messages=N;named=[];recordingBase;note;languageToken=0;draft="";onChange=()=>this.render();set moduleSession(e){this.session.changes.removeEventListener("change",this.onChange),this.session=e,this.isConnected&&this.session.changes.addEventListener("change",this.onChange),this.render()}get recordingModules(){return[...this.named]}set recordingModules(e){this.named=[...e??[]],this.render()}set base(e){this.recordingBase=e,this.render()}async setLanguage(e){const t=++this.languageToken,n=k.includes(e)?e:"en",i=n==="en"?N:await C(n);t===this.languageToken&&(this.messages=i,this.render())}connectedCallback(){this.session.changes.addEventListener("change",this.onChange),this.session.start(),this.render()}disconnectedCallback(){this.session.changes.removeEventListener("change",this.onChange)}absolute(e){try{return new URL(e,this.recordingBase??location.href).href}catch{return}}isNamed(e){return this.named.some(t=>this.absolute(t)===e)}setNamed(e,t){t!==this.isNamed(e)&&(this.named=t?[...this.named,L.of(e,this.recordingBase)]:this.named.filter(n=>this.absolute(n)!==e),t&&this.session.require([e]),this.dispatchEvent(new Event("recordingmoduleschange",{bubbles:!0})),this.render())}render(){if(!this.isConnected)return;const e=this.messages,t=this.ownerDocument,n=t.createElement("style");n.textContent=M;const i=t.createElement("p");i.className=r.INFO,i.textContent=e.intro;const d=t.createElement("form");d.className="mp-add";const a=t.createElement("input");a.type="url",a.id="module-url",a.required=!0,a.placeholder=e.urlPlaceholder,a.value=this.draft,a.addEventListener("input",()=>{this.draft=a.value}),a.setAttribute("aria-label",e.urlPlaceholder);const E=t.createElement("button");E.type="submit",E.textContent=e.add,d.append(a,E),d.addEventListener("submit",o=>{o.preventDefault();const x=a.value.trim();x&&(this.draft="",this.session.add(x))});const l=t.createElement("p");l.className=r.WARNING,l.textContent=e.codeWarning;const f=this.session.list(),u=new Set(f.map(o=>o.url)),b=this.named.map(o=>this.absolute(o)).filter(o=>o!==void 0&&!u.has(o)),m=t.createElement("ul");m.className="mp-list",m.append(...f.map(o=>this.item(o)),...b.map(o=>this.item({url:o,addedByPerson:!1,enabled:!0,status:"loading"})));const g=t.createElement("p");g.className=r.INFO,g.textContent=e.none,g.hidden=m.childElementCount>0;const p=t.createElement("div");p.className="mp-files";const h=t.createElement("button");h.type="button",h.id="modules-export",h.textContent=e.exportConfig,h.disabled=!f.some(o=>o.addedByPerson),h.addEventListener("click",()=>this.download());const s=t.createElement("input");s.type="file",s.id="modules-import",s.accept="application/json,.json",s.hidden=!0;const c=t.createElement("button");c.type="button",c.textContent=e.importConfig,c.addEventListener("click",()=>s.click()),s.addEventListener("change",()=>{const o=s.files?.[0];o&&this.importFile(o),s.value=""}),p.append(h,c,s);const v=t.createElement("p");v.id="modules-note",v.setAttribute("role","status"),r.show(v,this.note?.text,this.note?.kind),this.replaceChildren(n,i,d,l,m,g,p,v)}item(e){const t=this.messages,n=this.ownerDocument,i=n.createElement("li");i.className="mp-module",i.dataset.url=e.url;const d=n.createElement("div");if(d.className="mp-head",e.addedByPerson){const s=n.createElement("label"),c=n.createElement("input");c.type="checkbox",c.className="mp-enabled",c.checked=e.enabled,c.addEventListener("change",()=>void this.session.setEnabled(e.url,c.checked)),s.append(c,n.createTextNode(` ${t.enabled}`)),d.append(s)}const a=n.createElement("span");a.className="mp-name",a.textContent=e.loaded?.module.name??e.url,d.append(a);const E=e.loaded?.module.credit;if(E){const s=n.createElement(e.loaded?.module.creditUrl?"a":"span");s.className=r.INFO,s.textContent=E,s instanceof HTMLAnchorElement&&(s.href=e.loaded.module.creditUrl,s.target="_blank",s.rel="noopener noreferrer"),d.append(s)}const l=n.createElement("button");l.type="button",l.className="mp-remove",e.addedByPerson?(l.textContent=t.remove,l.addEventListener("click",()=>void this.session.remove(e.url))):(l.textContent=t.addToMine,l.addEventListener("click",()=>void this.session.add(e.url))),d.append(l);const f=n.createElement("p");f.className=`${r.INFO} mp-url`,f.textContent=e.url;const u=n.createElement("p");u.className="mp-status";const b=e.loaded;e.status==="loading"?r.show(u,t.loading):e.status==="failed"?r.show(u,t.failed.replace("{error}",e.error??""),"error"):e.status==="off"?r.show(u,t.off):r.show(u,this.brings(e));const m=n.createElement("p");m.className="mp-code",b?.scriptRun?r.show(m,t.runsCode,"warning"):b?.hasScript?r.show(m,t.codeNotRun,"info"):m.hidden=!0;const g=n.createElement("label");g.title=t.namedByRecordingHint;const p=n.createElement("input");p.type="checkbox",p.className="mp-named",p.checked=this.isNamed(e.url),p.addEventListener("change",()=>this.setNamed(e.url,p.checked)),g.append(p,n.createTextNode(` ${t.namedByRecording}`));const h=n.createElement("p");return h.append(g),i.append(d,f,u,m,h),i}brings(e){const t=Object.entries(e.loaded?.module.contributes??{}).filter(([,n])=>Array.isArray(n)&&n.length>0).map(([n,i])=>`${this.messages.points[n]??n} (${i.length})`);return t.length>0?this.messages.brings.replace("{points}",t.join(", ")):this.messages.bringsNothing}download(){const e=new Blob([this.session.exportText()],{type:"application/json"}),t=URL.createObjectURL(e),n=this.ownerDocument.createElement("a");n.href=t,n.download="ufoathome-modules.json",n.click(),URL.revokeObjectURL(t)}async importFile(e){try{await this.session.importText(await e.text());const t=this.session.list().filter(n=>n.addedByPerson).length;this.note={text:this.messages.imported.replace("{count}",String(t)),kind:"info"}}catch(t){this.note={text:this.messages.importFailed.replace("{error}",t instanceof Error?t.message:String(t)),kind:"error"}}this.render()}}function A(){customElements.get(w)||customElements.define(w,B)}export{w as MODULES_PANEL_ELEMENT_NAME,B as ModulesPanelElement,A as register};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={intro:"A module adds sources (imagery, relief, weather…) and 3D models that others published. The modules you add are kept in this browser; save them to a file to take them elsewhere.",codeWarning:"A module that contains code runs with everything this page can do: only add those whose author you know.",urlPlaceholder:"https://…/ufoathome-module.json",add:"Add",none:"No module.",remove:"Remove",enabled:"On",namedByRecording:"Named by this recording",namedByRecordingHint:"Whoever opens the recording loads this module, so that the models it takes from it are drawn. Its code, if it has any, only runs for those who added it themselves.",addToMine:"Add to my modules",loading:"Loading…",failed:"Could not be loaded: {error}",off:"Off",brings:"Brings: {points}",bringsNothing:"Brings nothing.",runsCode:"Runs code.",codeNotRun:"Its code was not run: add it to your modules to run it.",exportConfig:"Save my modules",importConfig:"Load modules",imported:"{count} module(s) loaded from the file.",importFailed:"This file is not a list of modules: {error}",points:{weather:"weather",place:"places",timeZone:"time zones",narrative:"drafting",assessment:"assessments",lightPollution:"light pollution",aircraft:"air traffic",upperAir:"air aloft",elevation:"relief",imagery:"imagery",surroundings:"surroundings",perception:"perception",interpretations:"interpretations",skyEvents:"sky events",decorModels:"3D models"}};export{e as modulesPanelMessages_en};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={intro:"Un módulo añade fuentes (imágenes, relieve, meteorología…) y modelos 3D publicados por otros. Los módulos que añade se guardan en este navegador; guárdelos en un archivo para usarlos en otro lugar.",codeWarning:"Un módulo que contiene código se ejecuta con todos los derechos de esta página: añada solo aquellos cuyo autor conozca.",urlPlaceholder:"https://…/ufoathome-module.json",add:"Añadir",none:"Ningún módulo.",remove:"Quitar",enabled:"Activo",namedByRecording:"Citado por esta grabación",namedByRecordingHint:"Quien abre la grabación carga este módulo, para que se dibujen los modelos que toma de él. Su código, si lo tiene, solo se ejecuta para quien lo añadió.",addToMine:"Añadir a mis módulos",loading:"Cargando…",failed:"No se pudo cargar: {error}",off:"Inactivo",brings:"Aporta: {points}",bringsNothing:"No aporta nada.",runsCode:"Ejecuta código.",codeNotRun:"Su código no se ejecutó: añádalo a sus módulos para ejecutarlo.",exportConfig:"Guardar mis módulos",importConfig:"Cargar módulos",imported:"{count} módulo(s) leído(s) del archivo.",importFailed:"Este archivo no es una lista de módulos: {error}",points:{weather:"meteorología",place:"lugares",timeZone:"husos horarios",narrative:"redacción",assessment:"evaluaciones",lightPollution:"contaminación lumínica",aircraft:"tráfico aéreo",upperAir:"aire en altura",elevation:"relieve",imagery:"imágenes",surroundings:"entorno",perception:"percepción",interpretations:"interpretaciones",skyEvents:"eventos del cielo",decorModels:"modelos 3D"}};export{e as modulesPanelMessages_es};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={intro:"Un module ajoute des sources (imagerie, relief, météo…) et des modèles 3D publiés par d'autres. Les modules que vous ajoutez sont gardés dans ce navigateur ; enregistrez-les dans un fichier pour les retrouver ailleurs.",codeWarning:"Un module qui contient du code s'exécute avec tous les droits de cette page : n'ajoutez que ceux dont vous connaissez l'auteur.",urlPlaceholder:"https://…/ufoathome-module.json",add:"Ajouter",none:"Aucun module.",remove:"Retirer",enabled:"Actif",namedByRecording:"Nommé par cet enregistrement",namedByRecordingHint:"Qui ouvre l'enregistrement charge ce module, pour que les modèles qu'il y prend soient dessinés. Son code, s'il en a, ne s'exécute que pour qui l'a ajouté lui-même.",addToMine:"Ajouter à mes modules",loading:"Chargement…",failed:"Chargement impossible : {error}",off:"Inactif",brings:"Apporte : {points}",bringsNothing:"N'apporte rien.",runsCode:"Exécute du code.",codeNotRun:"Son code n'a pas été exécuté : ajoutez-le à vos modules pour l'exécuter.",exportConfig:"Enregistrer mes modules",importConfig:"Charger des modules",imported:"{count} module(s) lu(s) dans le fichier.",importFailed:"Ce fichier n'est pas une liste de modules : {error}",points:{weather:"météo",place:"lieux",timeZone:"fuseaux horaires",narrative:"rédaction",assessment:"évaluations",lightPollution:"pollution lumineuse",aircraft:"trafic aérien",upperAir:"air en altitude",elevation:"relief",imagery:"imagerie",surroundings:"environs",perception:"perception",interpretations:"interprétations",skyEvents:"événements du ciel",decorModels:"modèles 3D"}};export{e as modulesPanelMessages_fr};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const i={intro:"Un modulo aggiunge fonti (immagini, rilievo, meteo…) e modelli 3D pubblicati da altri. I moduli che aggiungi sono conservati in questo browser; salvali in un file per ritrovarli altrove.",codeWarning:"Un modulo che contiene codice viene eseguito con tutti i diritti di questa pagina: aggiungi solo quelli di cui conosci l'autore.",urlPlaceholder:"https://…/ufoathome-module.json",add:"Aggiungi",none:"Nessun modulo.",remove:"Rimuovi",enabled:"Attivo",namedByRecording:"Citato da questa registrazione",namedByRecordingHint:"Chi apre la registrazione carica questo modulo, perché i modelli che ne prende siano disegnati. Il suo codice, se ne ha, viene eseguito solo per chi lo ha aggiunto.",addToMine:"Aggiungi ai miei moduli",loading:"Caricamento…",failed:"Impossibile caricarlo: {error}",off:"Inattivo",brings:"Porta: {points}",bringsNothing:"Non porta nulla.",runsCode:"Esegue codice.",codeNotRun:"Il suo codice non è stato eseguito: aggiungilo ai tuoi moduli per eseguirlo.",exportConfig:"Salva i miei moduli",importConfig:"Carica moduli",imported:"{count} modulo/i letto/i dal file.",importFailed:"Questo file non è un elenco di moduli: {error}",points:{weather:"meteo",place:"luoghi",timeZone:"fusi orari",narrative:"redazione",assessment:"valutazioni",lightPollution:"inquinamento luminoso",aircraft:"traffico aereo",upperAir:"aria in quota",elevation:"rilievo",imagery:"immagini",surroundings:"dintorni",perception:"percezione",interpretations:"interpretazioni",skyEvents:"eventi del cielo",decorModels:"modelli 3D"}};export{i as modulesPanelMessages_it};
|
package/dist-embed-sighting-editor/{NearestApproach-DCFh8vV6.js → NearestApproach-DCUW8bB4.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{aM as y,aN as h}from"./rr0-sighting-editor.mjs";class c{static FLAT={heightAt:()=>0};static of(e){const s=e.timeline.sourceIds.map(n=>y.of(e,n)?.nearestM).filter(n=>n!==void 0);return s.length>0?{m:Math.min(...s),basis:"derived",paths:["timeline","observerTrack"]}:c.interpreted(e)}static interpreted(e){const s=(e.interpretation?.bodies??[]).map((t,i)=>({body:t,index:i})).filter(({body:t})=>Array.isArray(t.track)),n=s.filter(({body:t})=>(t.explains?.length??0)>0),u=n.length>0?n:s,d=c.FLAT,l=t=>h.eyeOf(e,t,d);let o;const p=[];for(const{body:t,index:i}of u){const M=new h(t,d,l);for(const{t:f}of t.track){const a=M.at(f),r=l(f);if(!a||!r)continue;const m=Math.hypot(a.eastM-r.eastM,a.northM-r.northM,a.upM-r.upM);(o===void 0||m<o)&&(o=m)}p.push(`interpretation.bodies.${i}`)}return o===void 0?void 0:{m:o,basis:"assumed",paths:p}}}export{c as N};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{V as z,
|
|
1
|
+
import{V as z,u as A,v as O,Q as m,w as F,x as w}from"./rr0-sighting-editor.mjs";const p=Math.PI/180,y=180/Math.PI;class P{static localDirection(t,e,i,o=new z){const n=Math.tan(e/2*p);return o.set((t.u*2-1)*n*i,(1-t.v*2)*n,-1).normalize()}static picturePoint(t,e,i){if(t.z>=0)return;const o=Math.tan(e/2*p),n=t.x/-t.z/(o*i),s=t.y/-t.z/o;return{u:(n+1)/2,v:(1-s)/2}}static worldDirection(t,e=new z){const i=t.azimuthDeg*p,o=t.altitudeDeg*p;return e.set(Math.sin(i)*Math.cos(o),Math.sin(o),-Math.cos(i)*Math.cos(o))}static aimOf(t){const e=Math.hypot(t.x,t.z);return{azimuthDeg:(Math.atan2(t.x,-t.z)*y+360)%360,altitudeDeg:Math.atan2(t.y,e)*y}}static rotationOf(t){const e=new A;return e.rotation.set(t.pitchDeg*p,-t.headingDeg*p,-(t.rollDeg??0)*p,"YXZ"),e.quaternion.clone()}static anglesOf(t){const e=new O().setFromQuaternion(t,"YXZ"),i=(-e.y*y%360+360)%360,o=-e.z*y;return{headingDeg:i,pitchDeg:e.x*y,rollDeg:Math.abs(o)<1e-9?0:o}}static worldDirectionOf(t,e,i,o=new z){return this.localDirection(t,e.fovDeg,i,o).applyQuaternion(this.rotationOf(e))}static picturePointOf(t,e,i){const o=t.clone().applyQuaternion(this.rotationOf(e).invert()),n=this.picturePoint(o,e.fovDeg,i);if(!(!n||n.u<0||n.u>1||n.v<0||n.v>1))return n}static solve(t,e,i,o=t.length>=3){if(t.length<2)return;if(!o)return this.solveAtField(t,e,i);let n=1,s=179;const u=(Math.sqrt(5)-1)/2;let f=s-u*(s-n),c=n+u*(s-n),r=this.solveAtField(t,e,f),a=this.solveAtField(t,e,c);for(let l=0;l<60&&s-n>1e-4;l++){if(!r||!a)return;r.residualDeg<a.residualDeg?(s=c,c=f,a=r,f=s-u*(s-n),r=this.solveAtField(t,e,f)):(n=f,f=c,r=a,c=n+u*(s-n),a=this.solveAtField(t,e,c))}return r&&a?r.residualDeg<a.residualDeg?r:a:r??a}static solveAtField(t,e,i){const o=t.map(c=>this.localDirection(c.picture,i,e)),n=t.map(c=>this.worldDirection(c.scene)),s=this.triad(o,n);if(!s)return;const u=this.refine(s,o,n);return{registration:{...this.anglesOf(u),fovDeg:i},residualDeg:this.residualDeg(u,o,n)}}static triad(t,e){let i=0,o=1,n=-1;for(let r=0;r<t.length;r++)for(let a=r+1;a<t.length;a++){const g=t[r].clone().cross(t[a]).lengthSq();g>n&&(n=g,i=r,o=a)}if(n<1e-12)return;const s=(r,a)=>{const g=r.clone().normalize(),l=r.clone().cross(a).normalize(),h=l.clone().cross(g);return new w().set(g.x,h.x,l.x,g.y,h.y,l.y,g.z,h.z,l.z)},u=s(t[i],t[o]),c=s(e[i],e[o]).multiply(u.transpose());return new m().setFromRotationMatrix(new F().setFromMatrix3(c))}static refine(t,e,i){const o=t.clone(),n=new z;for(let s=0;s<20;s++){const u=new w().set(0,0,0,0,0,0,0,0,0),f=u.elements,c=new z;for(let l=0;l<e.length;l++){n.copy(e[l]).applyQuaternion(o);const h=n,d=[[0,h.z,-h.y],[-h.z,0,h.x],[h.y,-h.x,0]],M=[i[l].x-h.x,i[l].y-h.y,i[l].z-h.z];for(let D=0;D<3;D++){for(let v=0;v<3;v++)for(let x=0;x<3;x++)f[v*3+D]+=d[x][D]*d[x][v];c.setComponent(D,c.getComponent(D)+d[0][D]*M[0]+d[1][D]*M[1]+d[2][D]*M[2])}}for(let l=0;l<3;l++)f[l*3+l]+=1e-9;const r=c.applyMatrix3(u.invert()),a=r.length();if(a<1e-12)break;const g=new m().setFromAxisAngle(r.normalize(),a);if(o.premultiply(g).normalize(),a<1e-10)break}return o}static residualDeg(t,e,i){let o=0;const n=new z;for(let s=0;s<e.length;s++){n.copy(e[s]).applyQuaternion(t);const u=n.angleTo(i[s])*y;o+=u*u}return Math.sqrt(o/e.length)}}export{P as PictureRegistration};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{aP as u}from"./rr0-sighting-editor.mjs";class o{about="shape";static STEP_DEG=2;static TURN_DEG=60;static ERRATIC_TURNS=3;static OSCILLATIONS=["vibrate","spiral","roll"];async assess(n){const t=this.trajectory(n),s=this.vanish(n),e=this.oscillation(n),a=this.landing(n),c=this.judged(n,"traces"),r=this.occupants(n),h=a.shown&&r.shown?5:a.shown&&c.shown?4:a.shown||t.value==="erratic"||s.shown||e.shown?3:t.value==="abnormal"?2:t.value==="straight"?1:0,i=[{id:"poher-trajectory",basis:t.basis,paths:t.paths,value:o.TRAJECTORIES.indexOf(t.value)},this.criterion("poher-vanish",s),this.criterion("poher-oscillation",e),{...this.criterion("poher-landing",a),unsupported:a.basis===void 0},this.criterion("poher-traces",c),this.criterion("poher-occupants",r)];return{verdict:String(h),criteria:i}}static TRAJECTORIES=["unknown","still","straight","abnormal","erratic"];criterion(n,t){return{id:n,value:t.shown?1:0,basis:t.basis,paths:t.basis===void 0?[]:t.paths}}trajectory(n){let t="unknown";for(const s of n.timeline.sourceIds){const e=this.seen(n,s).filter(i=>i.aim!==void 0).map(i=>i.aim);if(e.length<2)continue;const a=[o.unit(e[0])];for(const i of e.slice(1)){const l=o.unit(i);o.angleDeg(a[a.length-1],l)>=o.STEP_DEG&&a.push(l)}const c=a.length-1;let r=0;for(let i=1;i<a.length-1;i++){const l=o.cross(a[i-1],a[i]),d=o.cross(a[i],a[i+1]);o.angleDeg(l,d)>=o.TURN_DEG&&r++}const h=c===0?"still":r>=o.ERRATIC_TURNS?"erratic":r>0?"abnormal":"straight";o.TRAJECTORIES.indexOf(h)>o.TRAJECTORIES.indexOf(t)&&(t=h)}return t==="unknown"?{value:t,paths:[]}:{value:t,basis:"derived",paths:["timeline"]}}vanish(n){const t=(n.events??[]).findIndex(s=>s.eventType==="vanish"&&u.isPhenomenon(n,s));return t>=0?{shown:!0,basis:"stated",paths:[`events.${t}`]}:{shown:!1,paths:[]}}oscillation(n){const t=new Set((n.interpretation?.bodies??[]).map(e=>e.id)),s=(n.events??[]).findIndex(e=>o.OSCILLATIONS.includes(e.eventType)&&(u.isPhenomenon(n,e)||t.has(e.who?.split("/")[0]??"")));return s>=0?{shown:!0,basis:"stated",paths:[`events.${s}`]}:{shown:!1,paths:[]}}landing(n){const t=e=>!e.onGround&&((e.altitudeAboveGroundM??0)>0||(e.altitudeM??0)>0),s=(n.interpretation?.bodies??[]).findIndex(e=>Array.isArray(e.track)&&e.track.some(a=>a.onGround)&&e.track.some(t));return s>=0?{shown:!0,basis:"assumed",paths:[`interpretation.bodies.${s}`]}:{shown:!1,paths:[]}}occupants(n){const t=n.decor.findIndex(s=>s.kind==="entity");return t>=0?{shown:!0,basis:"stated",paths:[`decor.${t}`]}:this.judged(n,"beings")}judged(n,t){const s=n.account?.strangeness?.[t];return s===void 0?{shown:!1,paths:[]}:{shown:s,basis:"stated",paths:[`account.strangeness.${t}`]}}instants(n,t){return n.timeline.allKeyframes.map(s=>({t:s.t,shape:s.shapes.find(e=>e.sourceId===t)?.shape})).filter(({shape:s})=>s!==void 0).map(({t:s,shape:e})=>({t:s,aim:e.aim,visible:e.transparency<1})).sort((s,e)=>s.t-e.t)}seen(n,t){return this.instants(n,t).filter(s=>s.visible)}static unit(n){const[t,s]=[n.azimuthDeg*Math.PI/180,n.altitudeDeg*Math.PI/180];return[Math.cos(s)*Math.sin(t),Math.cos(s)*Math.cos(t),Math.sin(s)]}static cross(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}static angleDeg(n,t){const s=Math.hypot(...n)*Math.hypot(...t);if(s===0)return 0;const e=(n[0]*t[0]+n[1]*t[1]+n[2]*t[2])/s;return Math.acos(Math.max(-1,Math.min(1,e)))*180/Math.PI}}export{o as PoherAssessor};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a7 as F,ac as P,ar as H,as as K,av as w,ax as N,aa as U,ay as k}from"./rr0-sighting-editor.mjs";class b{static HOLLOW_M=1;static COVERED_M=3;static WINDOW_M=30;static SAMPLE_M=4;static MAX_GRADE={rail:.025,highSpeed:.035,subway:.04,light_rail:.06,tram:.08,funicular:1/0};static heights(t,s,e){const n=t.map(a=>a.level===0),o=t.map((a,i)=>n[i]?b.targets(a,s,e):[]),c=t.map((a,i)=>n[i]?b.samples(a,o[i]):[]),r=new Map;t.forEach((a,i)=>{if(n[i])for(const h of b.ends(a)){const u=b.key(h),p=r.get(u);p?p.push(i):r.set(u,[i])}});const M=a=>{const i=r.get(b.key(a));if(i)return b.median(i.flatMap(h=>c[h]),a)};return t.map((a,i)=>{if(n[i]){const h=[...new Set([i,...b.ends(a).flatMap(d=>r.get(b.key(d))??[])])].flatMap(d=>c[d]),u=a.centre.map((d,O)=>b.median(h,d)??o[i][O]),[p,A]=b.ends(a);return u[0]=M(p)??u[0],u[u.length-1]=M(A)??u[u.length-1],b.graded(u,a.along,a.highSpeed?b.MAX_GRADE.highSpeed:b.MAX_GRADE[a.kind])}return b.carried(a,s,e,M)})}static targets(t,s,e){return t.centre.map(n=>{const o=s(n.x,n.z);if(e===void 0||n.altitudeM===void 0)return o;const c=n.altitudeM+e;return c-o>b.HOLLOW_M||o-c>b.COVERED_M?c:o})}static samples(t,s){const e=[];let n=0;return t.centre.forEach((o,c)=>{t.along[c]+1e-6<n&&c<t.centre.length-1||(e.push({x:o.x,z:o.z,y:s[c]}),n=t.along[c]+b.SAMPLE_M)}),e}static median(t,s){const e=[];for(const o of t)Math.hypot(o.x-s.x,o.z-s.z)<=b.WINDOW_M&&e.push(o.y);if(e.length===0)return;e.sort((o,c)=>o-c);const n=e.length>>1;return e.length%2===1?e[n]:(e[n-1]+e[n])/2}static graded(t,s,e){if(!Number.isFinite(e)||t.length<3)return t;const n=[...t],o=n.length-1,c=s[o];if(Math.abs(n[o]-n[0])>e*c)return s.map(r=>n[0]+(n[o]-n[0])*r/c);for(let r=1;r<o;r++){const M=e*(s[r]-s[r-1]);n[r]=Math.min(n[r-1]+M,Math.max(n[r-1]-M,n[r]))}for(let r=o-1;r>0;r--){const M=e*(s[r+1]-s[r]);n[r]=Math.min(n[r+1]+M,Math.max(n[r+1]-M,n[r]))}return n}static carried(t,s,e,n){const[o,c]=b.ends(t),r=t.along[t.along.length-1],M=n(o),a=n(c);if(e!==void 0&&t.centre.every(u=>u.altitudeM!==void 0)){const u=t.centre.map(d=>d.altitudeM+e),p=M!==void 0?M-u[0]:0,A=a!==void 0?a-u[u.length-1]:0;return u.map((d,O)=>d+p+(A-p)*t.along[O]/r)}const i=M??s(o.x,o.z),h=a??s(c.x,c.z);return t.along.map(u=>i+(h-i)*u/r)}static ends(t){return[t.centre[0],t.centre[t.centre.length-1]]}static key(t){return`${Math.round(t.x*2)},${Math.round(t.z*2)}`}}class B{positions=[];indices=[];along=[];get vertexCount(){return this.positions.length/3}strip(t,s,e){const n=this.vertexCount;for(let o=0;o<t.length;o++)this.positions.push(t[o].x,t[o].y,t[o].z,s[o].x,s[o].y,s[o].z),e&&this.along.push(e[o],e[o]);for(let o=0;o<t.length-1;o++){const c=n+o*2;this.indices.push(c,c+2,c+1,c+1,c+2,c+3)}}beam(t,s,e,n=!0){const o=s.x-t.x,c=s.y-t.y,r=s.z-t.z,M=Math.hypot(o,c,r);if(M<1e-6)return;const a={x:o/M,y:c/M,z:r/M},i=Math.abs(a.y)>.9?{x:1,y:0,z:0}:{x:0,y:1,z:0},h=a.y*i.z-a.z*i.y,u=a.z*i.x-a.x*i.z,p=a.x*i.y-a.y*i.x,A=Math.hypot(h,u,p),d={x:h/A*e/2,y:u/A*e/2,z:p/A*e/2},O={x:a.y*d.z-a.z*d.y,y:a.z*d.x-a.x*d.z,z:a.x*d.y-a.y*d.x},g=(f,x,E)=>({x:f.x+d.x*x+O.x*E,y:f.y+d.y*x+O.y*E,z:f.z+d.z*x+O.z*E}),_=[[1,1],[-1,1],[-1,-1],[1,-1]];for(let f=0;f<4;f++){const[x,E]=_[f],[z,v]=_[(f+1)%4];this.quad(g(t,x,E),g(t,z,v),g(s,z,v),g(s,x,E))}n&&(this.quad(...[..._].reverse().map(([f,x])=>g(t,f,x))),this.quad(..._.map(([f,x])=>g(s,f,x))))}quad(t,s,e,n){const o=this.vertexCount;this.positions.push(t.x,t.y,t.z,s.x,s.y,s.z,e.x,e.y,e.z,n.x,n.y,n.z),this.indices.push(o,o+1,o+2,o,o+2,o+3)}}class l{static STEP_M=6;static BALLAST_HEIGHT_M=.5;static BALLAST_SLOPE=1.5;static BALLAST_SHOULDER_M=.45;static DECK_DEPTH_M=.8;static BANK_SLOPE=1.5;static SLEEPER_LENGTH_M=2.4;static SLEEPER_WIDTH_M=.29;static SLEEPER_SPACING_M=.6;static RAIL_HEAD_M=.072;static RAIL_HEIGHT_M=.18;static TRAM_RAIL_HEIGHT_M=.03;static LIFT_M=.06;static CATENARY={rail:{contactM:5.5,systemM:1.4,spanM:54,staggerM:.2},highSpeed:{contactM:5.08,systemM:1.4,spanM:63,staggerM:.2},service:{contactM:5.5,systemM:1.2,spanM:45,staggerM:.2},tram:{contactM:6,systemM:0,spanM:30,staggerM:.2}};static MESSENGER_SAG_M=.55;static MAST_SIDE_M=.26;static MAST_OFFSET_M=3.1;static MAST_ABOVE_M=.6;static CONTACT_DIAMETER_M=.012;static MESSENGER_DIAMETER_M=.011;static ARM_SIDE_M=.06;static TRACK_SPACING_M={rail:3.7,highSpeed:4.5,tram:3.1,subway:3.4,light_rail:3.4,funicular:3.2};static BALLAST_ALBEDO=[.17,.16,.15];static BANK_ALBEDO=[.085,.09,.05];static DECK_ALBEDO=[.26,.255,.24];static CONCRETE_ALBEDO=[.36,.35,.33];static WOOD_ALBEDO=[.07,.055,.045];static RUST_ALBEDO=[.085,.068,.058];static STEEL_ALBEDO=[.3,.31,.32];static COPPER_ALBEDO=[.09,.085,.07];static LINE_REACH_M=20;group=new F;stepM=l.STEP_M;drawn=0;laid=[];ballastMaterial=l.pebbled(l.lambert(l.BALLAST_ALBEDO,!0));earthMaterial=l.lambert(l.BANK_ALBEDO,!0);deckMaterial=l.lambert(l.DECK_ALBEDO,!1);concreteSleepers=l.sleeperMaterial(l.CONCRETE_ALBEDO);woodSleepers=l.sleeperMaterial(l.WOOD_ALBEDO);rustMaterial=l.lambert(l.RUST_ALBEDO,!0);headMaterial=new P({color:new H(.62,.62,.62),metalness:1,roughness:.28,polygonOffset:!0,polygonOffsetFactor:-2,polygonOffsetUnits:-2});steelMaterial=l.lambert(l.STEEL_ALBEDO,!1);wireMaterial=l.lambert(l.COPPER_ALBEDO,!1);constructor(){this.group.name="railways"}get count(){return this.drawn}setGroundSpacing(t){this.stepM=Number.isFinite(t)&&t>0?Math.min(l.STEP_M,Math.max(1.5,t/2)):l.STEP_M}set(t,s,e,n,o=1/0){this.clear();const r=t.map(p=>({line:p,path:p.points.map(A=>({...K(A.lat,A.lng,s,e),altitudeM:A.altitudeM}))})).filter(({line:p,path:A})=>p.level>=0&&l.within(A,o)),M=l.altitudeOffset(r,n),a=r.flatMap(({line:p,path:A})=>{const d=this.layoutOf(p,A);return d?[{line:p,layout:d}]:[]}),i=b.heights(a.map(({layout:p})=>p),n,M),h={ballast:new B,earth:new B,deck:new B,concrete:new B,wood:new B,rust:new B,head:new B,steel:new B,wire:new B};a.forEach(({line:p,layout:A},d)=>{this.lay(p,{...A,y:i[d]},n,h),this.laid.push({line:p,centre:A.centre}),this.drawn++});const u=[[h.ballast,this.ballastMaterial,"ballast",!1],[h.earth,this.earthMaterial,"embankments",!1],[h.deck,this.deckMaterial,"decks",!0],[h.concrete,this.concreteSleepers,"sleepers",!1],[h.wood,this.woodSleepers,"sleepers wood",!1],[h.rust,this.rustMaterial,"rails",!1],[h.head,this.headMaterial,"rail heads",!1],[h.steel,this.steelMaterial,"catenary masts",!0],[h.wire,this.wireMaterial,"catenary wires",!1]];for(const[p,A,d,O]of u){const g=l.meshOf(p,A);g&&(g.name=`railways ${d}`,g.castShadow=O,g.receiveShadow=!0,this.group.add(g))}}clear(){for(const t of[...this.group.children])this.group.remove(t),t.geometry?.dispose();this.drawn=0,this.laid=[]}lineAt(t,s){let e;for(const{line:n,centre:o}of this.laid)for(let c=0;c<o.length-1;c++){const r=o[c],M=o[c+1],a=M.x-r.x,i=M.z-r.z,h=a*a+i*i,u=h===0?0:Math.max(0,Math.min(1,((t-r.x)*a+(s-r.z)*i)/h)),p=Math.hypot(t-(r.x+a*u),s-(r.z+i*u));p<=l.LINE_REACH_M&&(!e||p<e.distance)&&(e={line:n,distance:p})}return e?.line}mayMeet(t,s,e,n){const o=Math.hypot(s.x,s.z);if(o<1e-6)return this.lineAt(t.x,t.z)!==void 0;const c=s.x/o,r=s.z/o,M=l.LINE_REACH_M;for(const{centre:a}of this.laid)for(let i=0;i<a.length-1;i++){const h=a[i],u=a[i+1];for(const p of[0,.5,1]){const A=h.x+(u.x-h.x)*p,d=h.z+(u.z-h.z)*p,O=(A-t.x)*c+(d-t.z)*r;if(O<0)continue;const g=Math.abs((A-t.x)*r-(d-t.z)*c),_=Math.hypot(u.x-h.x,u.z-h.z)/2;if(g>M+_)continue;if(t.y+s.y*(O/o)<=e(A,d)+n)return!0}}return!1}contactHeightM(t){if(!(t.electrification!=="overhead"||t.kind==="subway"||t.kind==="funicular"))return l.catenaryOf(t).contactM}static catenaryOf(t){return t.kind==="tram"?l.CATENARY.tram:t.highSpeed?l.CATENARY.highSpeed:t.service?l.CATENARY.service:l.CATENARY.rail}dispose(){this.clear();for(const t of[this.ballastMaterial,this.earthMaterial,this.deckMaterial,this.concreteSleepers,this.woodSleepers,this.rustMaterial,this.headMaterial,this.steelMaterial,this.wireMaterial])t.dispose()}static within(t,s){if(!Number.isFinite(s))return!0;const e=s*1.1+100;return t.some((n,o)=>Math.hypot(n.x,n.z)<=e||o>0&&Math.hypot((n.x+t[o-1].x)/2,(n.z+t[o-1].z)/2)<=e)}static altitudeOffset(t,s){const e=[];for(const{line:n,path:o}of t)if(n.level===0)for(const c of o)c.altitudeM!==void 0&&e.push(s(c.x,c.z)-c.altitudeM);if(!(e.length<5))return e.sort((n,o)=>n-o),e[Math.floor(e.length/2)]}layoutOf(t,s){const e=[];for(let c=0;c<s.length-1;c++){const r=s[c],M=s[c+1],a=Math.max(1,Math.ceil(Math.hypot(M.x-r.x,M.z-r.z)/this.stepM));for(let i=0;i<a;i++){const h=i/a,u=r.altitudeM!==void 0&&M.altitudeM!==void 0?r.altitudeM+(M.altitudeM-r.altitudeM)*h:void 0;e.push({x:r.x+(M.x-r.x)*h,z:r.z+(M.z-r.z)*h,altitudeM:u})}}if(e.push(s[s.length-1]),e.length<2)return;const n=[0];for(let c=1;c<e.length;c++)n.push(n[c-1]+Math.hypot(e[c].x-e[c-1].x,e[c].z-e[c-1].z));if(n[n.length-1]<.5)return;const o=e.map((c,r)=>{const M=e[Math.max(0,r-1)],a=e[Math.min(e.length-1,r+1)],i=a.x-M.x,h=a.z-M.z,u=Math.hypot(i,h);return u<1e-6?{x:1,z:0}:{x:i/u,z:h/u}});return{kind:t.kind,...t.highSpeed?{highSpeed:!0}:{},level:t.level,centre:e,along:n,dir:o}}lay(t,s,e,n){const o=t.highSpeed?l.TRACK_SPACING_M.highSpeed:l.TRACK_SPACING_M[t.kind],c=Math.min(8,Math.max(1,t.tracks)),r=Array.from({length:c},(g,_)=>(_-(c-1)/2)*o),M=t.kind==="tram",a=M?0:l.BALLAST_HEIGHT_M,i=l.LIFT_M,h=(g,_,f)=>({x:s.centre[g].x-s.dir[g].z*_,y:s.y[g]+f,z:s.centre[g].z+s.dir[g].x*_}),u=s.centre.map((g,_)=>_);if(!M){const g=l.SLEEPER_LENGTH_M/2+l.BALLAST_SHOULDER_M+(r[r.length-1]??0),_=u.map(x=>h(x,g,a+i)),f=u.map(x=>h(x,-g,a+i));if(n.ballast.strip(_,f),t.level===0){const x=g+a*l.BALLAST_SLOPE;for(const E of[1,-1]){const z=[],v=[];let m=!1;for(const L of u){const C=h(L,E*x,i),S=e(C.x,C.z)+i,T=C.y-S;T<0&&(C.y=Math.min(S,s.y[L]+a-.05+i)),z.push(C);const I=h(L,E*(x+Math.max(0,T)*l.BANK_SLOPE),i);I.y=Math.min(e(I.x,I.z)+i,C.y),C.y-I.y>.02&&(m=!0),v.push(I)}const D=E>0?_:f;E>0?n.ballast.strip(z,D):n.ballast.strip(D,z),m&&(E>0?n.earth.strip(v,z):n.earth.strip(z,v))}}else{const x=-l.DECK_DEPTH_M,E=g+.15,z=u.map(L=>h(L,E,a+i+.1)),v=u.map(L=>h(L,-E,a+i+.1)),m=u.map(L=>h(L,E,x)),D=u.map(L=>h(L,-E,x));n.deck.strip(m,z),n.deck.strip(v,D),n.deck.strip(D,m),n.deck.strip(z,u.map(L=>h(L,g,a+i+.1))),n.deck.strip(u.map(L=>h(L,-g,a+i+.1)),v)}}const p=t.service?n.wood:n.concrete,A=t.gaugeMm/2e3+l.RAIL_HEAD_M/2,d=M?l.TRAM_RAIL_HEIGHT_M:l.RAIL_HEIGHT_M,O=a+i;for(const g of r){if(!M){const _=l.SLEEPER_LENGTH_M/2;p.strip(u.map(f=>h(f,g+_,O+.004)),u.map(f=>h(f,g-_,O+.004)),s.along)}for(const _ of[1,-1]){const f=g+_*A,x=l.RAIL_HEAD_M/2,E=u.map(v=>h(v,f+x,O+d)),z=u.map(v=>h(v,f-x,O+d));n.head.strip(E,z),n.rust.strip(u.map(v=>h(v,f+x,O)),E),n.rust.strip(z,u.map(v=>h(v,f-x,O)))}}t.electrification==="overhead"&&t.kind!=="subway"&&t.kind!=="funicular"&&this.catenary(t,s,r,O+d,h,e,n)}catenary(t,s,e,n,o,c,r){const M=l.catenaryOf(t),a=s.along[s.along.length-1],i=Math.max(1,Math.round(a/M.spanM)),h=a/i,u=Array.from({length:i},(E,z)=>(z+.5)*h),p=n+M.contactM,A=p+M.systemM,d=(M.systemM>0?A:p)+l.MAST_ABOVE_M,O=e[e.length-1],g=e.length>2,_=e.length===1?[1]:[1,-1],f=(E,z,v)=>{let m=0,D=s.along.length-2;for(;m<D;){const T=m+D+1>>1;s.along[T]<=E?m=T:D=T-1}const L=Math.min(1,Math.max(0,(E-s.along[m])/Math.max(1e-6,s.along[m+1]-s.along[m]))),C=o(m,z,v),S=o(m+1,z,v);return{x:C.x+(S.x-C.x)*L,y:C.y+(S.y-C.y)*L,z:C.z+(S.z-C.z)*L}};for(const E of u){const z=f(E,0,p);if(!(t.level===0&&c(z.x,z.z)>z.y)){for(const v of _){const m=v*(O+l.MAST_OFFSET_M),D=f(E,m,0);t.level===0&&(D.y=Math.min(D.y,c(D.x,D.z)));const L=f(E,m,d);if(r.steel.beam(D,L,l.MAST_SIDE_M),g)continue;const S=(_.length===1?e[0]:v*O)-v*.6,T=M.systemM>0?A:p+.3;r.steel.beam(f(E,m,T),f(E,S,T),l.ARM_SIDE_M),r.steel.beam(f(E,m,p-.4),f(E,S,T),l.ARM_SIDE_M)}if(g){const v=O+l.MAST_OFFSET_M;r.steel.beam(f(E,v,d-.2),f(E,-v,d-.2),l.MAST_SIDE_M*.8)}}}const x=[0,...u,a];for(const[E,z]of e.entries()){const v=m=>m===0||m===x.length-1?0:((m+E)%2===0?1:-1)*M.staggerM;for(let m=0;m<x.length-1;m++){const D=x[m],L=x[m+1];if(L-D<.1||(r.wire.beam(f(D,z+v(m),p),f(L,z+v(m+1),p),l.CONTACT_DIAMETER_M,!1),M.systemM<=0))continue;const C=4,S=T=>{const I=m===0?.5+T/2:m===x.length-2?T/2:T;return A-l.MESSENGER_SAG_M*4*I*(1-I)};for(let T=0;T<C;T++){const I=T/C,G=(T+1)/C;r.wire.beam(f(D+(L-D)*I,z,S(I)),f(D+(L-D)*G,z,S(G)),l.MESSENGER_DIAMETER_M,!1)}}}}static meshOf(t,s){if(t.indices.length===0)return;const e=new w;return e.setAttribute("position",new N(new Float32Array(t.positions),3)),t.along.length>0&&e.setAttribute("aAlong",new N(new Float32Array(t.along),1)),e.setIndex(new N(new Uint32Array(t.indices),1)),e.computeVertexNormals(),new U(e,s)}static lambert(t,s){return new k({color:new H(...t),...s?{polygonOffset:!0,polygonOffsetFactor:-2,polygonOffsetUnits:-2}:{}})}static pebbled(t){return t.onBeforeCompile=s=>{s.vertexShader=s.vertexShader.replace("#include <common>",`#include <common>
|
|
1
|
+
import{a5 as F,aa as P,aE as H,aR as K,al as w,am as N,a8 as U,aV as k}from"./rr0-sighting-editor.mjs";class b{static HOLLOW_M=1;static COVERED_M=3;static WINDOW_M=30;static SAMPLE_M=4;static MAX_GRADE={rail:.025,highSpeed:.035,subway:.04,light_rail:.06,tram:.08,funicular:1/0};static heights(t,s,e){const n=t.map(a=>a.level===0),o=t.map((a,i)=>n[i]?b.targets(a,s,e):[]),c=t.map((a,i)=>n[i]?b.samples(a,o[i]):[]),r=new Map;t.forEach((a,i)=>{if(n[i])for(const h of b.ends(a)){const u=b.key(h),p=r.get(u);p?p.push(i):r.set(u,[i])}});const M=a=>{const i=r.get(b.key(a));if(i)return b.median(i.flatMap(h=>c[h]),a)};return t.map((a,i)=>{if(n[i]){const h=[...new Set([i,...b.ends(a).flatMap(d=>r.get(b.key(d))??[])])].flatMap(d=>c[d]),u=a.centre.map((d,O)=>b.median(h,d)??o[i][O]),[p,A]=b.ends(a);return u[0]=M(p)??u[0],u[u.length-1]=M(A)??u[u.length-1],b.graded(u,a.along,a.highSpeed?b.MAX_GRADE.highSpeed:b.MAX_GRADE[a.kind])}return b.carried(a,s,e,M)})}static targets(t,s,e){return t.centre.map(n=>{const o=s(n.x,n.z);if(e===void 0||n.altitudeM===void 0)return o;const c=n.altitudeM+e;return c-o>b.HOLLOW_M||o-c>b.COVERED_M?c:o})}static samples(t,s){const e=[];let n=0;return t.centre.forEach((o,c)=>{t.along[c]+1e-6<n&&c<t.centre.length-1||(e.push({x:o.x,z:o.z,y:s[c]}),n=t.along[c]+b.SAMPLE_M)}),e}static median(t,s){const e=[];for(const o of t)Math.hypot(o.x-s.x,o.z-s.z)<=b.WINDOW_M&&e.push(o.y);if(e.length===0)return;e.sort((o,c)=>o-c);const n=e.length>>1;return e.length%2===1?e[n]:(e[n-1]+e[n])/2}static graded(t,s,e){if(!Number.isFinite(e)||t.length<3)return t;const n=[...t],o=n.length-1,c=s[o];if(Math.abs(n[o]-n[0])>e*c)return s.map(r=>n[0]+(n[o]-n[0])*r/c);for(let r=1;r<o;r++){const M=e*(s[r]-s[r-1]);n[r]=Math.min(n[r-1]+M,Math.max(n[r-1]-M,n[r]))}for(let r=o-1;r>0;r--){const M=e*(s[r+1]-s[r]);n[r]=Math.min(n[r+1]+M,Math.max(n[r+1]-M,n[r]))}return n}static carried(t,s,e,n){const[o,c]=b.ends(t),r=t.along[t.along.length-1],M=n(o),a=n(c);if(e!==void 0&&t.centre.every(u=>u.altitudeM!==void 0)){const u=t.centre.map(d=>d.altitudeM+e),p=M!==void 0?M-u[0]:0,A=a!==void 0?a-u[u.length-1]:0;return u.map((d,O)=>d+p+(A-p)*t.along[O]/r)}const i=M??s(o.x,o.z),h=a??s(c.x,c.z);return t.along.map(u=>i+(h-i)*u/r)}static ends(t){return[t.centre[0],t.centre[t.centre.length-1]]}static key(t){return`${Math.round(t.x*2)},${Math.round(t.z*2)}`}}class B{positions=[];indices=[];along=[];get vertexCount(){return this.positions.length/3}strip(t,s,e){const n=this.vertexCount;for(let o=0;o<t.length;o++)this.positions.push(t[o].x,t[o].y,t[o].z,s[o].x,s[o].y,s[o].z),e&&this.along.push(e[o],e[o]);for(let o=0;o<t.length-1;o++){const c=n+o*2;this.indices.push(c,c+2,c+1,c+1,c+2,c+3)}}beam(t,s,e,n=!0){const o=s.x-t.x,c=s.y-t.y,r=s.z-t.z,M=Math.hypot(o,c,r);if(M<1e-6)return;const a={x:o/M,y:c/M,z:r/M},i=Math.abs(a.y)>.9?{x:1,y:0,z:0}:{x:0,y:1,z:0},h=a.y*i.z-a.z*i.y,u=a.z*i.x-a.x*i.z,p=a.x*i.y-a.y*i.x,A=Math.hypot(h,u,p),d={x:h/A*e/2,y:u/A*e/2,z:p/A*e/2},O={x:a.y*d.z-a.z*d.y,y:a.z*d.x-a.x*d.z,z:a.x*d.y-a.y*d.x},g=(f,x,E)=>({x:f.x+d.x*x+O.x*E,y:f.y+d.y*x+O.y*E,z:f.z+d.z*x+O.z*E}),_=[[1,1],[-1,1],[-1,-1],[1,-1]];for(let f=0;f<4;f++){const[x,E]=_[f],[z,v]=_[(f+1)%4];this.quad(g(t,x,E),g(t,z,v),g(s,z,v),g(s,x,E))}n&&(this.quad(...[..._].reverse().map(([f,x])=>g(t,f,x))),this.quad(..._.map(([f,x])=>g(s,f,x))))}quad(t,s,e,n){const o=this.vertexCount;this.positions.push(t.x,t.y,t.z,s.x,s.y,s.z,e.x,e.y,e.z,n.x,n.y,n.z),this.indices.push(o,o+1,o+2,o,o+2,o+3)}}class l{static STEP_M=6;static BALLAST_HEIGHT_M=.5;static BALLAST_SLOPE=1.5;static BALLAST_SHOULDER_M=.45;static DECK_DEPTH_M=.8;static BANK_SLOPE=1.5;static SLEEPER_LENGTH_M=2.4;static SLEEPER_WIDTH_M=.29;static SLEEPER_SPACING_M=.6;static RAIL_HEAD_M=.072;static RAIL_HEIGHT_M=.18;static TRAM_RAIL_HEIGHT_M=.03;static LIFT_M=.06;static CATENARY={rail:{contactM:5.5,systemM:1.4,spanM:54,staggerM:.2},highSpeed:{contactM:5.08,systemM:1.4,spanM:63,staggerM:.2},service:{contactM:5.5,systemM:1.2,spanM:45,staggerM:.2},tram:{contactM:6,systemM:0,spanM:30,staggerM:.2}};static MESSENGER_SAG_M=.55;static MAST_SIDE_M=.26;static MAST_OFFSET_M=3.1;static MAST_ABOVE_M=.6;static CONTACT_DIAMETER_M=.012;static MESSENGER_DIAMETER_M=.011;static ARM_SIDE_M=.06;static TRACK_SPACING_M={rail:3.7,highSpeed:4.5,tram:3.1,subway:3.4,light_rail:3.4,funicular:3.2};static BALLAST_ALBEDO=[.17,.16,.15];static BANK_ALBEDO=[.085,.09,.05];static DECK_ALBEDO=[.26,.255,.24];static CONCRETE_ALBEDO=[.36,.35,.33];static WOOD_ALBEDO=[.07,.055,.045];static RUST_ALBEDO=[.085,.068,.058];static STEEL_ALBEDO=[.3,.31,.32];static COPPER_ALBEDO=[.09,.085,.07];static LINE_REACH_M=20;group=new F;stepM=l.STEP_M;drawn=0;laid=[];ballastMaterial=l.pebbled(l.lambert(l.BALLAST_ALBEDO,!0));earthMaterial=l.lambert(l.BANK_ALBEDO,!0);deckMaterial=l.lambert(l.DECK_ALBEDO,!1);concreteSleepers=l.sleeperMaterial(l.CONCRETE_ALBEDO);woodSleepers=l.sleeperMaterial(l.WOOD_ALBEDO);rustMaterial=l.lambert(l.RUST_ALBEDO,!0);headMaterial=new P({color:new H(.62,.62,.62),metalness:1,roughness:.28,polygonOffset:!0,polygonOffsetFactor:-2,polygonOffsetUnits:-2});steelMaterial=l.lambert(l.STEEL_ALBEDO,!1);wireMaterial=l.lambert(l.COPPER_ALBEDO,!1);constructor(){this.group.name="railways"}get count(){return this.drawn}setGroundSpacing(t){this.stepM=Number.isFinite(t)&&t>0?Math.min(l.STEP_M,Math.max(1.5,t/2)):l.STEP_M}set(t,s,e,n,o=1/0){this.clear();const r=t.map(p=>({line:p,path:p.points.map(A=>({...K(A.lat,A.lng,s,e),altitudeM:A.altitudeM}))})).filter(({line:p,path:A})=>p.level>=0&&l.within(A,o)),M=l.altitudeOffset(r,n),a=r.flatMap(({line:p,path:A})=>{const d=this.layoutOf(p,A);return d?[{line:p,layout:d}]:[]}),i=b.heights(a.map(({layout:p})=>p),n,M),h={ballast:new B,earth:new B,deck:new B,concrete:new B,wood:new B,rust:new B,head:new B,steel:new B,wire:new B};a.forEach(({line:p,layout:A},d)=>{this.lay(p,{...A,y:i[d]},n,h),this.laid.push({line:p,centre:A.centre}),this.drawn++});const u=[[h.ballast,this.ballastMaterial,"ballast",!1],[h.earth,this.earthMaterial,"embankments",!1],[h.deck,this.deckMaterial,"decks",!0],[h.concrete,this.concreteSleepers,"sleepers",!1],[h.wood,this.woodSleepers,"sleepers wood",!1],[h.rust,this.rustMaterial,"rails",!1],[h.head,this.headMaterial,"rail heads",!1],[h.steel,this.steelMaterial,"catenary masts",!0],[h.wire,this.wireMaterial,"catenary wires",!1]];for(const[p,A,d,O]of u){const g=l.meshOf(p,A);g&&(g.name=`railways ${d}`,g.castShadow=O,g.receiveShadow=!0,this.group.add(g))}}clear(){for(const t of[...this.group.children])this.group.remove(t),t.geometry?.dispose();this.drawn=0,this.laid=[]}lineAt(t,s){let e;for(const{line:n,centre:o}of this.laid)for(let c=0;c<o.length-1;c++){const r=o[c],M=o[c+1],a=M.x-r.x,i=M.z-r.z,h=a*a+i*i,u=h===0?0:Math.max(0,Math.min(1,((t-r.x)*a+(s-r.z)*i)/h)),p=Math.hypot(t-(r.x+a*u),s-(r.z+i*u));p<=l.LINE_REACH_M&&(!e||p<e.distance)&&(e={line:n,distance:p})}return e?.line}mayMeet(t,s,e,n){const o=Math.hypot(s.x,s.z);if(o<1e-6)return this.lineAt(t.x,t.z)!==void 0;const c=s.x/o,r=s.z/o,M=l.LINE_REACH_M;for(const{centre:a}of this.laid)for(let i=0;i<a.length-1;i++){const h=a[i],u=a[i+1];for(const p of[0,.5,1]){const A=h.x+(u.x-h.x)*p,d=h.z+(u.z-h.z)*p,O=(A-t.x)*c+(d-t.z)*r;if(O<0)continue;const g=Math.abs((A-t.x)*r-(d-t.z)*c),_=Math.hypot(u.x-h.x,u.z-h.z)/2;if(g>M+_)continue;if(t.y+s.y*(O/o)<=e(A,d)+n)return!0}}return!1}contactHeightM(t){if(!(t.electrification!=="overhead"||t.kind==="subway"||t.kind==="funicular"))return l.catenaryOf(t).contactM}static catenaryOf(t){return t.kind==="tram"?l.CATENARY.tram:t.highSpeed?l.CATENARY.highSpeed:t.service?l.CATENARY.service:l.CATENARY.rail}dispose(){this.clear();for(const t of[this.ballastMaterial,this.earthMaterial,this.deckMaterial,this.concreteSleepers,this.woodSleepers,this.rustMaterial,this.headMaterial,this.steelMaterial,this.wireMaterial])t.dispose()}static within(t,s){if(!Number.isFinite(s))return!0;const e=s*1.1+100;return t.some((n,o)=>Math.hypot(n.x,n.z)<=e||o>0&&Math.hypot((n.x+t[o-1].x)/2,(n.z+t[o-1].z)/2)<=e)}static altitudeOffset(t,s){const e=[];for(const{line:n,path:o}of t)if(n.level===0)for(const c of o)c.altitudeM!==void 0&&e.push(s(c.x,c.z)-c.altitudeM);if(!(e.length<5))return e.sort((n,o)=>n-o),e[Math.floor(e.length/2)]}layoutOf(t,s){const e=[];for(let c=0;c<s.length-1;c++){const r=s[c],M=s[c+1],a=Math.max(1,Math.ceil(Math.hypot(M.x-r.x,M.z-r.z)/this.stepM));for(let i=0;i<a;i++){const h=i/a,u=r.altitudeM!==void 0&&M.altitudeM!==void 0?r.altitudeM+(M.altitudeM-r.altitudeM)*h:void 0;e.push({x:r.x+(M.x-r.x)*h,z:r.z+(M.z-r.z)*h,altitudeM:u})}}if(e.push(s[s.length-1]),e.length<2)return;const n=[0];for(let c=1;c<e.length;c++)n.push(n[c-1]+Math.hypot(e[c].x-e[c-1].x,e[c].z-e[c-1].z));if(n[n.length-1]<.5)return;const o=e.map((c,r)=>{const M=e[Math.max(0,r-1)],a=e[Math.min(e.length-1,r+1)],i=a.x-M.x,h=a.z-M.z,u=Math.hypot(i,h);return u<1e-6?{x:1,z:0}:{x:i/u,z:h/u}});return{kind:t.kind,...t.highSpeed?{highSpeed:!0}:{},level:t.level,centre:e,along:n,dir:o}}lay(t,s,e,n){const o=t.highSpeed?l.TRACK_SPACING_M.highSpeed:l.TRACK_SPACING_M[t.kind],c=Math.min(8,Math.max(1,t.tracks)),r=Array.from({length:c},(g,_)=>(_-(c-1)/2)*o),M=t.kind==="tram",a=M?0:l.BALLAST_HEIGHT_M,i=l.LIFT_M,h=(g,_,f)=>({x:s.centre[g].x-s.dir[g].z*_,y:s.y[g]+f,z:s.centre[g].z+s.dir[g].x*_}),u=s.centre.map((g,_)=>_);if(!M){const g=l.SLEEPER_LENGTH_M/2+l.BALLAST_SHOULDER_M+(r[r.length-1]??0),_=u.map(x=>h(x,g,a+i)),f=u.map(x=>h(x,-g,a+i));if(n.ballast.strip(_,f),t.level===0){const x=g+a*l.BALLAST_SLOPE;for(const E of[1,-1]){const z=[],v=[];let m=!1;for(const L of u){const C=h(L,E*x,i),S=e(C.x,C.z)+i,T=C.y-S;T<0&&(C.y=Math.min(S,s.y[L]+a-.05+i)),z.push(C);const I=h(L,E*(x+Math.max(0,T)*l.BANK_SLOPE),i);I.y=Math.min(e(I.x,I.z)+i,C.y),C.y-I.y>.02&&(m=!0),v.push(I)}const D=E>0?_:f;E>0?n.ballast.strip(z,D):n.ballast.strip(D,z),m&&(E>0?n.earth.strip(v,z):n.earth.strip(z,v))}}else{const x=-l.DECK_DEPTH_M,E=g+.15,z=u.map(L=>h(L,E,a+i+.1)),v=u.map(L=>h(L,-E,a+i+.1)),m=u.map(L=>h(L,E,x)),D=u.map(L=>h(L,-E,x));n.deck.strip(m,z),n.deck.strip(v,D),n.deck.strip(D,m),n.deck.strip(z,u.map(L=>h(L,g,a+i+.1))),n.deck.strip(u.map(L=>h(L,-g,a+i+.1)),v)}}const p=t.service?n.wood:n.concrete,A=t.gaugeMm/2e3+l.RAIL_HEAD_M/2,d=M?l.TRAM_RAIL_HEIGHT_M:l.RAIL_HEIGHT_M,O=a+i;for(const g of r){if(!M){const _=l.SLEEPER_LENGTH_M/2;p.strip(u.map(f=>h(f,g+_,O+.004)),u.map(f=>h(f,g-_,O+.004)),s.along)}for(const _ of[1,-1]){const f=g+_*A,x=l.RAIL_HEAD_M/2,E=u.map(v=>h(v,f+x,O+d)),z=u.map(v=>h(v,f-x,O+d));n.head.strip(E,z),n.rust.strip(u.map(v=>h(v,f+x,O)),E),n.rust.strip(z,u.map(v=>h(v,f-x,O)))}}t.electrification==="overhead"&&t.kind!=="subway"&&t.kind!=="funicular"&&this.catenary(t,s,r,O+d,h,e,n)}catenary(t,s,e,n,o,c,r){const M=l.catenaryOf(t),a=s.along[s.along.length-1],i=Math.max(1,Math.round(a/M.spanM)),h=a/i,u=Array.from({length:i},(E,z)=>(z+.5)*h),p=n+M.contactM,A=p+M.systemM,d=(M.systemM>0?A:p)+l.MAST_ABOVE_M,O=e[e.length-1],g=e.length>2,_=e.length===1?[1]:[1,-1],f=(E,z,v)=>{let m=0,D=s.along.length-2;for(;m<D;){const T=m+D+1>>1;s.along[T]<=E?m=T:D=T-1}const L=Math.min(1,Math.max(0,(E-s.along[m])/Math.max(1e-6,s.along[m+1]-s.along[m]))),C=o(m,z,v),S=o(m+1,z,v);return{x:C.x+(S.x-C.x)*L,y:C.y+(S.y-C.y)*L,z:C.z+(S.z-C.z)*L}};for(const E of u){const z=f(E,0,p);if(!(t.level===0&&c(z.x,z.z)>z.y)){for(const v of _){const m=v*(O+l.MAST_OFFSET_M),D=f(E,m,0);t.level===0&&(D.y=Math.min(D.y,c(D.x,D.z)));const L=f(E,m,d);if(r.steel.beam(D,L,l.MAST_SIDE_M),g)continue;const S=(_.length===1?e[0]:v*O)-v*.6,T=M.systemM>0?A:p+.3;r.steel.beam(f(E,m,T),f(E,S,T),l.ARM_SIDE_M),r.steel.beam(f(E,m,p-.4),f(E,S,T),l.ARM_SIDE_M)}if(g){const v=O+l.MAST_OFFSET_M;r.steel.beam(f(E,v,d-.2),f(E,-v,d-.2),l.MAST_SIDE_M*.8)}}}const x=[0,...u,a];for(const[E,z]of e.entries()){const v=m=>m===0||m===x.length-1?0:((m+E)%2===0?1:-1)*M.staggerM;for(let m=0;m<x.length-1;m++){const D=x[m],L=x[m+1];if(L-D<.1||(r.wire.beam(f(D,z+v(m),p),f(L,z+v(m+1),p),l.CONTACT_DIAMETER_M,!1),M.systemM<=0))continue;const C=4,S=T=>{const I=m===0?.5+T/2:m===x.length-2?T/2:T;return A-l.MESSENGER_SAG_M*4*I*(1-I)};for(let T=0;T<C;T++){const I=T/C,G=(T+1)/C;r.wire.beam(f(D+(L-D)*I,z,S(I)),f(D+(L-D)*G,z,S(G)),l.MESSENGER_DIAMETER_M,!1)}}}}static meshOf(t,s){if(t.indices.length===0)return;const e=new w;return e.setAttribute("position",new N(new Float32Array(t.positions),3)),t.along.length>0&&e.setAttribute("aAlong",new N(new Float32Array(t.along),1)),e.setIndex(new N(new Uint32Array(t.indices),1)),e.computeVertexNormals(),new U(e,s)}static lambert(t,s){return new k({color:new H(...t),...s?{polygonOffset:!0,polygonOffsetFactor:-2,polygonOffsetUnits:-2}:{}})}static pebbled(t){return t.onBeforeCompile=s=>{s.vertexShader=s.vertexShader.replace("#include <common>",`#include <common>
|
|
2
2
|
varying vec3 vBallast;`).replace("#include <begin_vertex>",`#include <begin_vertex>
|
|
3
3
|
vBallast = position;`),s.fragmentShader=s.fragmentShader.replace("#include <common>",`#include <common>
|
|
4
4
|
varying vec3 vBallast;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import{S as C}from"./SkyEventEditorStyle-CvY_AhbI.js";import{Z as f,aI as P,D as v,G as y,b,z as S,C as T,at as F,U as M}from"./rr0-sighting-editor.mjs";import{reentryEditorMessages_en as I}from"./ReentryEditorMessages_en-O-YSmHxv.js";class a{static NAME={en:"Name",fr:"Nom",es:"Nombre",it:"Nome"};static OBJECT={en:"Object",fr:"Objet",es:"Objeto",it:"Oggetto"};static LIGHT={en:"Light",fr:"Lumière",es:"Luz",it:"Luce"};static WHEN={en:"When",fr:"Quand",es:"Cuándo",it:"Quando"};static placeAt(e,t){const i=f.leadAt(e,t);if(i)return{t,lat:i.lat,lng:i.lng,altitudeKm:i.heightM/1e3};const r=e.track,[n,s]=t<(r[0]?.t??0)?[r[0],r[1]]:[r[r.length-2],r[r.length-1]];if(!n||!s||s.t===n.t){const o=n??s??{lat:0,lng:0,altitudeKm:80};return{t,lat:o.lat,lng:o.lng,altitudeKm:o.altitudeKm}}const l=(t-n.t)/(s.t-n.t);return{t,lat:n.lat+(s.lat-n.lat)*l,lng:n.lng+(s.lng-n.lng)*l,altitudeKm:Math.max(0,n.altitudeKm+(s.altitudeKm-n.altitudeKm)*l)}}static curvePointAt(e,t){return{t,absoluteMagnitude:Math.round(f.absoluteMagnitudeAt(e,t)*10)/10}}static instantsOf(e){return[...e.track.map(t=>t.t),...e.fragments.flatMap(t=>[...t.fromT===void 0?[]:[t.fromT],...t.untilT===void 0?[]:[t.untilT],...(t.lightCurve??[]).map(i=>i.t)])]}static instant(e,t,i,r={}){return{type:"number",key:e,min:-3600,max:36e3,step:.1,unit:"s",scale:.001,label:t,hint:i,...r}}static SET={kind:"reentry",title:{en:"Fireball or re-entry",fr:"Bolide ou rentrée",es:"Bólido o reentrada",it:"Bolide o rientro"},parameters:[{type:"said",key:"title",label:a.NAME},{type:"text",key:"object.name",group:a.OBJECT,label:{en:"Catalogue name",fr:"Nom au catalogue",es:"Nombre en el catálogo",it:"Nome a catalogo"},hint:{en:'For a re-entry, the piece as the satellite catalogue names it: "SL-12 R/B". Empty for a meteor.',fr:"Pour une rentrée, la pièce comme le catalogue des satellites la nomme : « SL-12 R/B ». Vide pour un météore.",es:"Para una reentrada, la pieza como la nombra el catálogo de satélites: «SL-12 R/B». Vacío para un meteoro.",it:"Per un rientro, il pezzo come lo chiama il catalogo dei satelliti: «SL-12 R/B». Vuoto per una meteora."}},{type:"text",key:"object.cosparId",group:a.OBJECT,label:{en:"COSPAR id",fr:"Identifiant COSPAR",es:"Identificador COSPAR",it:"Identificativo COSPAR"},placeholder:{en:"1968-013C",fr:"1968-013C",es:"1968-013C",it:"1968-013C"}},{type:"number",key:"object.norad",min:1,max:999999,step:1,group:a.OBJECT,label:{en:"NORAD number",fr:"Numéro NORAD",es:"Número NORAD",it:"Numero NORAD"}}]};static PLACE={kind:"reentry-place",title:{en:"Point of the path",fr:"Point du trajet",es:"Punto del trayecto",it:"Punto del percorso"},parameters:[a.instant("t",{en:"Time",fr:"Instant",es:"Instante",it:"Istante"},{en:"Seconds of the recording; negative before it began.",fr:"Secondes de l'enregistrement ; négatives avant son début.",es:"Segundos de la grabación; negativos antes de su inicio.",it:"Secondi della registrazione; negativi prima del suo inizio."},{required:!0}),{type:"position",key:"lat",secondKey:"lng",saidKey:"saidPosition",native:"geo",step:1,rangeM:2e6,label:{en:"Position",fr:"Position",es:"Posición",it:"Posizione"}},{type:"number",key:"altitudeKm",min:0,max:300,step:.1,unit:"km",required:!0,label:{en:"Altitude",fr:"Altitude",es:"Altitud",it:"Altitudine"},hint:{en:"Above the ellipsoid. A meteor begins to glow between 120 and 80 km; a satellite breaks up near 80.",fr:"Au-dessus de l'ellipsoïde. Un météore s'allume entre 120 et 80 km ; un satellite se brise vers 80.",es:"Sobre el elipsoide. Un meteoro se enciende entre 120 y 80 km; un satélite se rompe hacia los 80.",it:"Sopra l'ellissoide. Una meteora si accende tra 120 e 80 km; un satellite si spezza verso gli 80."}}]};static trackEnd(e,t){const i=e?.track;if(i?.length)return t==="first"?i[0].t:i[i.length-1].t}static FRAGMENT={kind:"reentry-fragment",title:{en:"Piece",fr:"Pièce",es:"Pieza",it:"Pezzo"},parameters:[{type:"text",key:"id",label:{en:"Id",fr:"Identifiant",es:"Identificador",it:"Identificativo"},validate:(e,t,i)=>!i?.fragments.some(r=>r!==t&&r.id===e)},{type:"number",key:"absoluteMagnitude",min:-40,max:10,step:.1,required:!0,group:a.LIGHT,label:{en:"Absolute magnitude",fr:"Magnitude absolue",es:"Magnitud absoluta",it:"Magnitudine assoluta"},hint:{en:"Its brightness seen from 100 km, as fireball reports give it: −4 or brighter is a fireball, −17 a superbolide. Its light curve, when it has one, stands instead.",fr:"Son éclat vu à 100 km, comme le donnent les rapports de bolides : −4 ou plus brillant est un bolide, −17 un superbolide. Sa courbe de lumière, quand il en a une, vaut à la place.",es:"Su brillo visto a 100 km, como lo dan los informes de bólidos: −4 o más brillante es un bólido, −17 un superbólido. Su curva de luz, cuando la tiene, vale en su lugar.",it:"La sua luminosità vista da 100 km, come la danno i rapporti sui bolidi: −4 o più brillante è un bolide, −17 un superbolide. La sua curva di luce, quando ce l'ha, vale al suo posto."}},{type:"colour",key:"color",group:a.LIGHT,fallback:f.DEFAULT_COLOR,label:{en:"Colour",fr:"Couleur",es:"Color",it:"Colore"}},{type:"number",key:"trainS",min:0,max:600,step:.1,unit:"s",group:a.LIGHT,effective:()=>f.DEFAULT_TRAIN_S,label:{en:"Train",fr:"Traînée",es:"Estela",it:"Scia"},hint:{en:"How long a stretch of its own past path still glows behind it, seconds.",fr:"Combien de secondes de son propre trajet brillent encore derrière lui.",es:"Cuántos segundos de su propio trayecto siguen brillando detrás de él.",it:"Quanti secondi del suo stesso percorso brillano ancora dietro di lui."}},{type:"number",key:"lagS",min:0,max:600,step:.1,unit:"s",group:a.WHEN,effective:()=>0,label:{en:"Behind the lead",fr:"Retard sur la tête",es:"Retraso sobre la cabeza",it:"Ritardo sulla testa"},hint:{en:"Seconds behind the leading point along the same path: 0 is the leading piece itself.",fr:"Secondes de retard sur le point de tête, sur le même trajet : 0 est la pièce de tête elle-même.",es:"Segundos de retraso sobre el punto de cabeza, en el mismo trayecto: 0 es la propia pieza de cabeza.",it:"Secondi di ritardo sul punto di testa, sullo stesso percorso: 0 è il pezzo di testa stesso."}},a.instant("fromT",{en:"Seen from",fr:"Vu à partir de",es:"Visto desde",it:"Visto da"},{en:"When it breaks off or begins to glow; empty, the start of the path.",fr:"Quand il se détache ou s'allume ; vide, le début du trajet.",es:"Cuando se desprende o se enciende; vacío, el inicio del trayecto.",it:"Quando si stacca o si accende; vuoto, l'inizio del percorso."},{group:a.WHEN,effective:(e,t)=>a.trackEnd(t,"first")}),a.instant("untilT",{en:"Out at",fr:"Éteint à",es:"Apagado a",it:"Spento a"},{en:"When it has burned up or slowed below glowing; empty, the end of the path.",fr:"Quand il s'est consumé ou a trop ralenti pour briller ; vide, la fin du trajet.",es:"Cuando se ha consumido o ha frenado demasiado para brillar; vacío, el final del trayecto.",it:"Quando si è consumato o ha rallentato troppo per brillare; vuoto, la fine del percorso."},{group:a.WHEN,effective:(e,t)=>a.trackEnd(t,"last")})]};static CURVE_POINT={kind:"reentry-curve-point",title:{en:"Point of the light curve",fr:"Point de la courbe de lumière",es:"Punto de la curva de luz",it:"Punto della curva di luce"},parameters:[a.instant("t",{en:"Time",fr:"Instant",es:"Instante",it:"Istante"},{en:"Seconds of the recording.",fr:"Secondes de l'enregistrement.",es:"Segundos de la grabación.",it:"Secondi della registrazione."},{required:!0}),{type:"number",key:"absoluteMagnitude",min:-40,max:10,step:.1,required:!0,label:{en:"Absolute magnitude",fr:"Magnitude absolue",es:"Magnitud absoluta",it:"Magnitudine assoluta"}}]}}class h{constructor(e,t,i){this.container=e,this.host=t,C.attach(e,"reentry-editor-part",h.STYLE),this.language=i,this.render(),this.setLanguage(i)}messages=I;languageToken=0;currentId;form;list;timeline;placeForm;placeIndex=0;row="path";fragmentForm;fragmentIndex=0;curveForm;curveIndex=0;language;shown=[];static STYLE='.reentry-editor-part { flex-basis: 100%; min-width: 0; } .reentry-editor-part #reentry-timeline { flex-basis: 100%; min-width: 0; padding: 4px 0; } .reentry-editor-part #reentry-path > .icon-btn, .reentry-editor-part #reentry-curve > .icon-btn { align-self: flex-end; } .reentry-editor-part #reentry-list, .reentry-editor-part #reentry-places, .reentry-editor-part #reentry-fragment-list, .reentry-editor-part #reentry-curve-list { flex-basis: 100%; min-width: 0; } .reentry-editor-part .launch-editor, .reentry-editor-part .launch-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; } .reentry-editor-part .launch-fields { flex-basis: 100%; min-width: 0; } .reentry-editor-part [hidden] { display: none !important; } .reentry-editor-part select { min-width: 0; width: 100%; } .reentry-editor-part .launch-intro { flex-basis: 100%; margin: 0; } .reentry-editor-part .launch-track { flex-basis: 100%; margin: 0; } .reentry-editor-part .launch-parameters { flex-basis: 100%; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; } .reentry-editor-part .parameter-group { flex: 1 1 14em; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; align-content: flex-start; } .reentry-editor-part input, .reentry-editor-part select { max-width: 100%; box-sizing: border-box; } .reentry-editor-part input[type="text"] { width: 12em; } .reentry-editor-part input[data-key="title"] { width: 18em; } .reentry-editor-part label { min-width: 0; max-width: 100%; } .reentry-editor-part input.parameter-derived::placeholder { opacity: .65; } .reentry-editor-part .launch-path { flex: 1 1 100%; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; }';async setLanguage(e){const t=++this.languageToken;this.language=e;const i=M.includes(e)?e:"en",r=i==="en"?I:await P(i);t===this.languageToken&&(this.messages=r,this.render(),this.sync())}sync(){const e=this.reentries;this.shown=[...e],e.some(i=>i.id===this.currentId)||(this.currentId=e[0]?.id),this.list?.setItems(e.map(i=>({id:i.id,label:this.labelOf(i)})),this.currentId),this.syncAddState();const t=this.current;this.element("reentry-fields").hidden=t===void 0,t&&(this.syncPlace(!0),this.syncFragments(t,!0),this.form??=new v(this.element("reentry-parameters"),this.language,"reentry.",{said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()}),this.form.show(a.SET,new y(()=>this.current,i=>this.editReentry(r=>{r.object&&(r.object={...r.object}),i(r),r.object&&Object.values(r.object).every(n=>n===void 0||n==="")&&delete r.object})),()=>this.written()))}refresh(){this.syncAddState();const e=this.reentries;if(e.length===this.shown.length&&e.every((t,i)=>t.id===this.shown[i].id)){this.syncTimeline();return}this.sync()}setTime(e){this.timeline?.setTime(e)}syncAddState(){const e=this.origin()!==void 0;this.list?.setAddState(e,e?void 0:this.messages.addNowhere)}get current(){return this.reentries.find(e=>e.id===this.currentId)}show(e){this.currentId=e,this.row="path",this.placeIndex=0,this.fragmentIndex=0,this.curveIndex=0,this.sync()}render(){const e=this.messages;this.form=void 0,this.container.innerHTML=`<div class="launch-editor">
|
|
2
|
+
<p class="launch-intro">${e.intro}</p>
|
|
3
|
+
<div id="reentry-list"></div>
|
|
4
|
+
<div id="reentry-fields" class="launch-fields">
|
|
5
|
+
<div id="reentry-parameters" class="launch-parameters"></div>
|
|
6
|
+
<div id="reentry-timeline"></div>
|
|
7
|
+
<button id="reentry-fragment-add" type="button" title="${e.addFragment}">${b.PLUS} ${e.fragment}</button>
|
|
8
|
+
<p class="launch-intro">${e.timelineNote}</p>
|
|
9
|
+
<fieldset id="reentry-path" class="launch-path">
|
|
10
|
+
<legend>${e.path}</legend>
|
|
11
|
+
<div id="reentry-place-parameters" class="launch-parameters"></div>
|
|
12
|
+
<button id="reentry-place-delete" class="icon-btn" type="button" title="${e.deletePlace}" aria-label="${e.deletePlace}">${b.TRASH}</button>
|
|
13
|
+
</fieldset>
|
|
14
|
+
<fieldset id="reentry-fragments" class="launch-path">
|
|
15
|
+
<legend id="reentry-fragment-legend">${e.fragment}</legend>
|
|
16
|
+
<div id="reentry-fragment-parameters" class="launch-parameters"></div>
|
|
17
|
+
<button id="reentry-fragment-delete" class="icon-btn" type="button" title="${e.deleteFragment}" aria-label="${e.deleteFragment}">${b.TRASH}</button>
|
|
18
|
+
<fieldset id="reentry-curve" class="launch-path">
|
|
19
|
+
<legend>${e.curve}</legend>
|
|
20
|
+
<p id="reentry-curve-empty" class="launch-intro">${e.noCurve}</p>
|
|
21
|
+
<div id="reentry-curve-parameters" class="launch-parameters"></div>
|
|
22
|
+
<button id="reentry-curve-delete" class="icon-btn" type="button" title="${e.deleteCurvePoint}" aria-label="${e.deleteCurvePoint}">${b.TRASH}</button>
|
|
23
|
+
</fieldset>
|
|
24
|
+
</fieldset>
|
|
25
|
+
<p class="launch-intro">${e.derivedNote}</p>
|
|
26
|
+
</div>
|
|
27
|
+
</div>`,this.list=new S({header:this.element("reentry-list"),body:this.element("reentry-fields"),ids:{list:"reentry-select",remove:"reentry-delete",add:"reentry-add",kinds:"reentry-add-kind",kind:t=>`reentry-add-${t}`},onSelect:t=>this.show(t),onAdd:t=>this.addReentry(t==="reentry"?"reentry":"fireball"),onRemove:()=>this.deleteCurrent()}),this.list.setLabels({list:e.reentry,remove:e.deleteReentry,add:e.addReentry,empty:e.none}),this.list.setKinds([{value:"fireball",label:e.kindFireball},{value:"reentry",label:e.kindReentry}]),this.timeline=new T(this.element("reentry-timeline"),t=>this.host.seekTo(t),{addKeyframeHere:e.addPointHere,keyframeHere:e.pointHere,zoomHint:e.zoomHint}),this.element("reentry-place-delete").addEventListener("click",()=>this.removePlace()),this.element("reentry-curve-delete").addEventListener("click",()=>this.removeCurvePoint()),this.placeForm=void 0,this.element("reentry-fragment-add").addEventListener("click",()=>this.addFragment()),this.element("reentry-fragment-delete").addEventListener("click",()=>this.removeFragment()),this.fragmentForm=void 0,this.curveForm=void 0}written(){const e=this.current;e&&this.list?.rename(e.id,this.labelOf(e))}syncTimeline(){const e=this.current;if(!this.timeline||!e)return;const t=this.messages,i=e.track[0]?.t??0,r=e.track[e.track.length-1]?.t??0,n={id:"path",label:t.path,color:h.PATH_COLOR,times:e.track.map(c=>c.t),active:this.row==="path",selectedTime:this.row==="path"?e.track[this.placeIndex]?.t:void 0,open:()=>this.selectPlace(this.placeIndex),pressed:(c,d)=>{const m=d===void 0?-1:(this.current?.track??[]).findIndex(u=>u.t===d);this.selectPlace(m>=0?m:this.placeIndex)},move:(c,d)=>this.movePlace(c,d),add:()=>this.addPlaceAt(this.host.currentTime())},s=e.fragments.map((c,d)=>{const m=c.lightCurve??[];return{id:`fragment-${d}`,label:this.fragmentLabel(c,d),color:h.PIECE_COLOR,times:m.map(u=>u.t),spans:[{t:c.fromT??i,until:c.untilT??r,label:""}],active:this.row==="fragment"&&d===this.fragmentIndex,selectedTime:this.row==="fragment"&&d===this.fragmentIndex?m[this.curveIndex]?.t:void 0,open:()=>this.selectFragment(d),pressed:(u,p)=>{const k=p===void 0?-1:(this.current?.fragments[d]?.lightCurve??[]).findIndex(w=>w.t===p);this.selectFragment(d,k>=0?k:void 0)},move:(u,p)=>this.moveCurvePoint(d,u,p),add:()=>this.addCurvePointAt(d,this.host.currentTime())}}),l=a.instantsOf(e),o=Math.min(...l),g=Math.max(...l),x=Math.max(500,(g-o)/10);this.timeline.show([n,...s],this.host.duration(),this.host.currentTime(),{from:o-x,to:g+x})}static PATH_COLOR="#e08a1e";static PIECE_COLOR="#c0581b";static MIN_PLACES=2;syncPlace(e=!1){const t=this.current?.track??[];this.placeIndex=Math.max(0,Math.min(this.placeIndex,t.length-1)),this.element("reentry-place-delete").disabled=t.length<=h.MIN_PLACES,this.placeForm?this.placeForm.sync(e):(this.placeForm=new v(this.element("reentry-place-parameters"),this.language,"reentryPlace."),this.placeForm.show(a.PLACE,new y(()=>this.current?.track[this.placeIndex],i=>this.editPlace(this.placeIndex,i),void 0,this.host.positionPlace?.()),()=>{})),this.syncTimeline()}selectPlace(e){this.row="path",this.placeIndex=e,this.syncDetail(),this.syncPlace(!0)}syncDetail(){this.element("reentry-path").hidden=this.row!=="path",this.element("reentry-fragments").hidden=this.row!=="fragment";const e=this.currentFragment;this.element("reentry-fragment-legend").textContent=e?`${this.messages.fragment} ${this.fragmentLabel(e,this.fragmentIndex)}`:this.messages.fragment}editPlace(e,t){let i;this.editReentry(r=>{i={...r.track[e]},t(i),r.track=r.track.map((n,s)=>s===e?i:n).sort((n,s)=>n.t-s.t)}),i&&(this.placeIndex=this.current?.track.indexOf(i)??0),this.syncPlace()}movePlace(e,t){const i=this.current?.track.findIndex(r=>r.t===e)??-1;i<0||(this.editPlace(i,r=>{r.t=t}),this.syncPlace(!0))}addPlaceAt(e){const t=this.current;if(!t)return;const i=t.track.findIndex(n=>Math.abs(n.t-e)<1);if(i>=0){this.selectPlace(i);return}const r=a.placeAt(t,e);this.editReentry(n=>{n.track=[...n.track,r].sort((s,l)=>s.t-l.t)}),this.selectPlace(this.current?.track.indexOf(r)??0)}removePlace(){if((this.current?.track.length??0)<=h.MIN_PLACES)return;const e=this.placeIndex;this.editReentry(t=>{t.track=t.track.filter((i,r)=>r!==e)}),this.syncPlace(!0)}static MIN_FRAGMENTS=1;fragmentLabel(e,t){return e.id??String(t+1)}syncFragments(e,t=!1){const i=e.fragments;this.fragmentIndex=Math.max(0,Math.min(this.fragmentIndex,i.length-1)),this.element("reentry-fragment-delete").disabled=i.length<=h.MIN_FRAGMENTS,this.syncDetail(),this.fragmentForm?this.fragmentForm.sync(t):(this.fragmentForm=new v(this.element("reentry-fragment-parameters"),this.language,"reentryFragment."),this.fragmentForm.show(a.FRAGMENT,new y(()=>this.currentFragment,r=>this.editFragment(n=>r(n)),()=>this.current),()=>{})),this.syncCurve(t)}selectFragment(e,t){const i=e!==this.fragmentIndex;this.row="fragment",this.fragmentIndex=e,t!==void 0?this.curveIndex=t:i&&(this.curveIndex=0),this.current&&this.syncFragments(this.current,!0)}get currentFragment(){return this.current?.fragments[this.fragmentIndex]}editFragment(e,t=this.fragmentIndex){this.editReentry(i=>{const r={...i.fragments[t]};r.lightCurve&&(r.lightCurve=[...r.lightCurve]),e(r),i.fragments=i.fragments.map((n,s)=>s===t?r:n)}),this.syncDetail(),this.syncTimeline()}addFragment(){const e=this.current;if(!e)return;const t=e.fragments[e.fragments.length-1];let i=e.fragments.length+1;for(;e.fragments.some(n=>n.id===`piece-${i}`);)i++;const r={id:`piece-${i}`,lagS:(t?.lagS??0)+1,absoluteMagnitude:(t?.absoluteMagnitude??-4)+1};this.editReentry(n=>{n.fragments=[...n.fragments,r]}),this.selectFragment((this.current?.fragments.length??1)-1)}removeFragment(){if((this.current?.fragments.length??0)<=h.MIN_FRAGMENTS)return;const e=this.fragmentIndex;this.editReentry(t=>{t.fragments=t.fragments.filter((i,r)=>r!==e)}),this.curveIndex=0,this.selectFragment(Math.min(e,(this.current?.fragments.length??1)-1))}syncCurve(e=!1){const t=this.currentFragment?.lightCurve??[];this.curveIndex=Math.max(0,Math.min(this.curveIndex,t.length-1)),this.element("reentry-curve-empty").hidden=t.length>0,this.element("reentry-curve-parameters").hidden=t.length===0,this.element("reentry-curve-delete").hidden=t.length===0,this.curveForm?this.curveForm.sync(e):(this.curveForm=new v(this.element("reentry-curve-parameters"),this.language,"reentryCurve."),this.curveForm.show(a.CURVE_POINT,new y(()=>this.currentFragment?.lightCurve?.[this.curveIndex],i=>this.editCurvePoint(this.fragmentIndex,this.curveIndex,i)),()=>{})),this.syncTimeline()}editCurvePoint(e,t,i){let r;this.editFragment(n=>{const s=n.lightCurve??[];r={...s[t]},i(r),n.lightCurve=s.map((l,o)=>o===t?r:l).sort((l,o)=>l.t-o.t)},e),r&&(this.curveIndex=this.current?.fragments[e]?.lightCurve?.indexOf(r)??0),this.syncCurve()}moveCurvePoint(e,t,i){const r=this.current?.fragments[e]?.lightCurve?.findIndex(n=>n.t===t)??-1;r<0||(this.fragmentIndex=e,this.editCurvePoint(e,r,n=>{n.t=i}),this.syncFragments(this.current,!0))}addCurvePointAt(e,t){const i=this.current?.fragments[e];if(!i)return;const r=(i.lightCurve??[]).findIndex(s=>Math.abs(s.t-t)<1);if(r>=0){this.selectFragment(e,r);return}const n=a.curvePointAt(i,t);this.editFragment(s=>{s.lightCurve=[...s.lightCurve??[],n].sort((l,o)=>l.t-o.t)},e),this.selectFragment(e,this.current?.fragments[e]?.lightCurve?.indexOf(n)??0)}removeCurvePoint(){if(!this.currentFragment?.lightCurve?.length)return;const e=this.curveIndex;this.editFragment(t=>{const i=(t.lightCurve??[]).filter((r,n)=>n!==e);i.length?t.lightCurve=i:delete t.lightCurve}),this.syncCurve(!0)}editReentry(e){const t=this.current;if(!t)return;const i={...t,track:[...t.track],fragments:[...t.fragments]};e(i),this.writeReentries(this.reentries.map(r=>r===t?i:r)),this.host.changed()}origin(){const e=this.host.sighting(),t=e.event?.place?.[0];if(!(t?.lat===void 0||t.lng===void 0))return{lat:t.lat,lng:t.lng,headingRad:(e.observerTrack?.getInterpolatedPoseAt(0)?.headingDeg??0)*Math.PI/180}}newOf(e){const t=this.origin();if(!t)return;const i=Math.round(this.host.currentTime()),r=Math.max(.05,Math.cos(t.lat*Math.PI/180)),n=(s,l)=>{const o=s*Math.cos(t.headingRad)-l*Math.sin(t.headingRad),g=s*Math.sin(t.headingRad)+l*Math.cos(t.headingRad);return{lat:t.lat+o/111.32,lng:t.lng+g/(111.32*r)}};return e==="fireball"?{track:[{t:i,...n(150,-45),altitudeKm:100},{t:i+3e3,...n(150,45),altitudeKm:60}],fragments:[{id:"main",absoluteMagnitude:-6}]}:{track:[{t:i,...n(300,-225),altitudeKm:82},{t:i+6e4,...n(300,225),altitudeKm:72}],fragments:[{id:"main",absoluteMagnitude:-4},{id:"piece-2",lagS:1.5,absoluteMagnitude:-2.5},{id:"piece-3",lagS:3,absoluteMagnitude:-1.5}]}}addReentry(e){const t=this.newOf(e);if(!t)return;let i=this.reentries.length+1;for(;this.reentries.some(n=>n.id===`${e}-${i}`);)i++;const r={id:`${e}-${i}`,...t};this.writeReentries([...this.reentries,r]),this.host.changed(),this.show(r.id)}deleteCurrent(){const e=this.current;e&&(this.currentId=void 0,this.writeReentries(this.reentries.filter(t=>t!==e)),this.host.changed(),this.sync())}writeReentries(e){const t=this.host.sighting();t.skyEvents=F.written({...t.skyEvents,reentries:e})}labelOf(e){const t=this.host.said().read(e.title)||e.object?.name;return t?`${t} (${e.id})`:e.id}get reentries(){return this.host.sighting().skyEvents?.reentries??[]}element(e){return this.container.querySelector(`#${e}`)}}export{h as ReentryEditor};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={intro:"A fireball or a re-entry seen while the recording runs: a meteor, a satellite or a rocket stage burning up. A fact of the sky, not a reading of the account. It is placed where it really was, latitude, longitude and height, and seen through the Earth's shape; its light lights the scene from there.",none:"No fireball or re-entry in this recording",reentry:"Fireball or re-entry",deleteReentry:"Delete it",addReentry:"Add a fireball or a re-entry",kindFireball:"Fireball (meteor)",kindReentry:"Re-entry (satellite, stage)",path:"Path",deletePlace:"Remove this point",fragments:"Pieces",fragment:"Piece",addFragment:"Add a piece behind the last",deleteFragment:"Remove this piece",curve:"Light curve",deleteCurvePoint:"Remove this point",noCurve:'No light curve: its absolute magnitude stands throughout. The "+" of its row on the timeline adds a point at the playhead.',addNowhere:"Give the recording a place first: a fireball is put in front of the witness",derivedNote:"An empty field shows, greyed, the value in use. Empty a field to go back to it. The smaller pieces each one sheds are set in the file.",timelineNote:`On the timeline, a diamond pressed is the point shown below, and the scene goes to its instant; drag it to move it in time. The "+" of a row puts a point at the playhead. The hatched parts are before the recording's start or after its end.`,addPointHere:"Add a point here, at the playhead",pointHere:"A point is at the playhead: press it to edit it",zoomHint:"Pinch, or Ctrl + wheel, to zoom; Shift + wheel to scroll"};export{e as reentryEditorMessages_en};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={intro:"Un bólido o una reentrada visto durante la grabación: un meteoro, un satélite o una etapa de cohete que se consume. Un hecho del cielo, no una lectura del relato. Se coloca donde estaba realmente, latitud, longitud y altura, y se ve a través de la forma de la Tierra; su luz ilumina la escena desde allí.",none:"Ningún bólido ni reentrada en esta grabación",reentry:"Bólido o reentrada",deleteReentry:"Eliminarlo",addReentry:"Añadir un bólido o una reentrada",kindFireball:"Bólido (meteoro)",kindReentry:"Reentrada (satélite, etapa)",path:"Trayecto",deletePlace:"Quitar este punto",fragments:"Piezas",fragment:"Pieza",addFragment:"Añadir una pieza detrás de la última",deleteFragment:"Quitar esta pieza",curve:"Curva de luz",deleteCurvePoint:"Quitar este punto",noCurve:"Sin curva de luz: su magnitud absoluta vale todo el tiempo. El «+» de su fila en la línea de tiempo añade un punto en el cabezal.",addNowhere:"Dé primero un lugar a la grabación: un bólido se coloca delante del testigo",derivedNote:"Un campo vacío muestra, en gris, el valor usado. Vacíe un campo para volver a él. Los fragmentos más pequeños que suelta cada pieza se ajustan en el archivo.",timelineNote:"En la línea de tiempo, un rombo pulsado es el punto mostrado debajo, y la escena va a su instante; arrástrelo para moverlo en el tiempo. El «+» de una fila pone un punto en el cabezal. Las partes rayadas están antes del inicio de la grabación o después de su final.",addPointHere:"Añadir un punto aquí, en el cabezal",pointHere:"Hay un punto en el cabezal: púlselo para editarlo",zoomHint:"Pellizque, o Ctrl + rueda, para ampliar; Mayús + rueda para desplazar"};export{e as reentryEditorMessages_es};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={intro:"Un bolide ou une rentrée vu pendant l'enregistrement : un météore, un satellite ou un étage de fusée qui se consume. Un fait du ciel, pas une lecture du compte rendu. Il est placé là où il était vraiment, latitude, longitude et altitude, et vu à travers la forme de la Terre ; sa lumière éclaire la scène depuis là.",none:"Aucun bolide ni rentrée dans cet enregistrement",reentry:"Bolide ou rentrée",deleteReentry:"Le supprimer",addReentry:"Ajouter un bolide ou une rentrée",kindFireball:"Bolide (météore)",kindReentry:"Rentrée (satellite, étage)",path:"Trajet",deletePlace:"Retirer ce point",fragments:"Pièces",fragment:"Pièce",addFragment:"Ajouter une pièce derrière la dernière",deleteFragment:"Retirer cette pièce",curve:"Courbe de lumière",deleteCurvePoint:"Retirer ce point",noCurve:"Pas de courbe de lumière : sa magnitude absolue vaut tout du long. Le « + » de sa ligne sur la frise ajoute un point à la tête de lecture.",addNowhere:"Donnez d'abord un lieu à l'enregistrement : un bolide est placé devant le témoin",derivedNote:"Un champ vide montre, en grisé, la valeur utilisée. Videz un champ pour y revenir. Les débris plus petits que perd chaque pièce se règlent dans le fichier.",timelineNote:"Sur la frise, un losange pressé est le point affiché dessous, et la scène va à son instant ; faites-le glisser pour le déplacer dans le temps. Le « + » d'une ligne pose un point à la tête de lecture. Les parties hachurées sont avant le début de l'enregistrement ou après sa fin.",addPointHere:"Ajouter un point ici, à la tête de lecture",pointHere:"Un point est à la tête de lecture : pressez-le pour le modifier",zoomHint:"Pincez, ou Ctrl + molette, pour zoomer ; Maj + molette pour défiler"};export{e as reentryEditorMessages_fr};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={intro:"Un bolide o un rientro visto durante la registrazione: una meteora, un satellite o uno stadio di razzo che si consuma. Un fatto del cielo, non una lettura del resoconto. È posto dove era davvero, latitudine, longitudine e quota, e visto attraverso la forma della Terra; la sua luce illumina la scena da lì.",none:"Nessun bolide né rientro in questa registrazione",reentry:"Bolide o rientro",deleteReentry:"Eliminarlo",addReentry:"Aggiungere un bolide o un rientro",kindFireball:"Bolide (meteora)",kindReentry:"Rientro (satellite, stadio)",path:"Percorso",deletePlace:"Togliere questo punto",fragments:"Pezzi",fragment:"Pezzo",addFragment:"Aggiungere un pezzo dietro l'ultimo",deleteFragment:"Togliere questo pezzo",curve:"Curva di luce",deleteCurvePoint:"Togliere questo punto",noCurve:"Nessuna curva di luce: la sua magnitudine assoluta vale per tutto il tempo. Il «+» della sua riga sulla linea del tempo aggiunge un punto alla testina.",addNowhere:"Date prima un luogo alla registrazione: un bolide è posto davanti al testimone",derivedNote:"Un campo vuoto mostra, in grigio, il valore usato. Svuotate un campo per tornarci. I frammenti più piccoli che perde ogni pezzo si regolano nel file.",timelineNote:"Sulla linea del tempo, un rombo premuto è il punto mostrato sotto, e la scena va al suo istante; trascinatelo per spostarlo nel tempo. Il «+» di una riga mette un punto alla testina. Le parti tratteggiate sono prima dell'inizio della registrazione o dopo la sua fine.",addPointHere:"Aggiungere un punto qui, alla testina",pointHere:"C'è un punto alla testina: premetelo per modificarlo",zoomHint:"Pizzicate, o Ctrl + rotella, per ingrandire; Maiusc + rotella per scorrere"};export{e as reentryEditorMessages_it};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a5 as G,aB as S,aC as F,al as M,aD as f,am as w,a8 as _,au as R,av as I,V as H,aE as N,aF as y,aG as C,aH as B,Z as L}from"./rr0-sighting-editor.mjs";class h{static RADIUS=840;static MAX_SEGMENTS=1024;static VERTICES_PER_SEGMENT=12;static MIN_HALF_WIDTH_DEG=.1;static BRIGHT_HALF_WIDTH_DEG=.22;static TRAIN_SHARE=.9;static TRAIN_FALLOFF=1.2;object=new G;tiers;trains;positions;colors;shown=0;drawn=[];constructor(){this.object.name="reentries",this.tiers=S.map(i=>{const o=new F(new M,f.material(i.size,!1));return f.track(o),o.frustumCulled=!1,this.object.add(o),o});const s=h.MAX_SEGMENTS*h.VERTICES_PER_SEGMENT;this.positions=new Float32Array(s*3),this.colors=new Float32Array(s*3);const t=new M;t.setAttribute("position",new w(this.positions,3)),t.setAttribute("color",new w(this.colors,3)),t.setDrawRange(0,0),this.trains=new _(t,R.material()),this.trains.frustumCulled=!1,R.track(this.trains),this.object.add(this.trains)}nearest(s,t){let i,o=t;for(const e of this.drawn){const n=e.direction.dot(s);(n>o||i&&n===o&&e.magnitude<i.magnitude)&&(o=n,i=e)}return i}static directionOf(s){const{x:t,y:i,z:o}=I(s.altitudeDeg,s.azimuthDeg,1);return new H(t,i,o)}get count(){return this.shown}set(s,t,i,o){const e=this.tiers.map(()=>[]);let n=0,E=0;const r=new N;this.drawn=[];for(const a of s){const u=i(a.head);if(u<=0)continue;const c=a.magnitude-2.5*Math.log10(u);if(c>t)continue;E++,this.drawn.push({direction:h.directionOf(a.head),view:a,magnitude:c}),r.set(a.color);const d=y(c,t)*a.fade,{x:m,y:A,z:p}=I(a.head.altitudeDeg,a.head.azimuthDeg,h.RADIUS),[l,T,z]=o(a.head,c),D=a.fade,b=Math.max(r.r,r.g,r.b)||1;e[C(d)].push({x:m,y:A,z:p,r:l*r.r*D/b,g:T*r.g*D/b,b:z*r.b*D/b}),n=this.pushTrain(n,a.train,d,r)}this.shown=E,this.tiers.forEach((a,u)=>{const c=e[u],d=new Float32Array(c.length*3),m=new Float32Array(c.length*3);c.forEach((p,l)=>{d.set([p.x,p.y,p.z],l*3),m.set([p.r,p.g,p.b],l*3)}),a.geometry.dispose();const A=new M;A.setAttribute("position",new w(d,3)),A.setAttribute("color",new w(m,3)),a.geometry=A});const g=this.trains.geometry;g.setDrawRange(0,n),g.getAttribute("position").needsUpdate=!0,g.getAttribute("color").needsUpdate=!0}pushTrain(s,t,i,o){const e=t.length-1;for(let n=0;n<e;n++){if(s+h.VERTICES_PER_SEGMENT>h.MAX_SEGMENTS*h.VERTICES_PER_SEGMENT)return s;const E=1-n/e,r=1-(n+1)/e,g=I(t[n].altitudeDeg,t[n].azimuthDeg,h.RADIUS),a=I(t[n+1].altitudeDeg,t[n+1].azimuthDeg,h.RADIUS),u=d=>h.RADIUS*((h.MIN_HALF_WIDTH_DEG+h.BRIGHT_HALF_WIDTH_DEG*i*d)*Math.PI/180),c=d=>h.TRAIN_SHARE*i*d**h.TRAIN_FALLOFF;s=this.pushRibbon(s,g,a,u(E),u(r),c(E),c(r),o)}return s}pushRibbon(s,t,i,o,e,n,E,r){const g={x:i.x-t.x,y:i.y-t.y,z:i.z-t.z};if(Math.hypot(g.x,g.y,g.z)<1e-9)return s;const a=this.normalise(this.cross(this.normalise(t),this.normalise(g)));for(const[u,c]of[[-1,0],[0,1]]){const d=this.across(t,a,o,u),m=this.across(i,a,e,u),A=this.across(t,a,o,c),p=this.across(i,a,e,c),l=(T,z)=>T===0?z:0;s=this.push(s,d,l(u,n),r),s=this.push(s,m,l(u,E),r),s=this.push(s,A,l(c,n),r),s=this.push(s,m,l(u,E),r),s=this.push(s,p,l(c,E),r),s=this.push(s,A,l(c,n),r)}return s}across(s,t,i,o){return{x:s.x+t.x*i*o,y:s.y+t.y*i*o,z:s.z+t.z*i*o}}push(s,t,i,o){const e=s*3;this.positions[e]=t.x,this.positions[e+1]=t.y,this.positions[e+2]=t.z;const n=B.relativeOfResponse(Math.max(0,Math.min(1,i)));return this.colors[e]=n*o.r,this.colors[e+1]=n*o.g,this.colors[e+2]=n*o.b,s+1}cross(s,t){return{x:s.y*t.z-s.z*t.y,y:s.z*t.x-s.x*t.z,z:s.x*t.y-s.y*t.x}}normalise(s){const t=Math.hypot(s.x,s.y,s.z)||1;return{x:s.x/t,y:s.y/t,z:s.z/t}}dispose(){for(const s of this.tiers)s.geometry.dispose(),s.material.dispose();this.trains.geometry.dispose(),this.trains.material.dispose(),this.object.removeFromParent()}}class k{inSky=!0;hiddenFromEye=!0;pieces=new h;get object(){return this.pieces.object}get drawnCount(){return this.pieces.count}update(s,t,i){const o=s.length===0?[]:L.viewsAt(s,t,i.observer);o.length===0&&this.pieces.count===0||(this.pieces.set(o,i.magnitudeLimit,e=>i.cloudTransmission(e),(e,n)=>i.arrivingIlluminance(e,n,1)),i.lightFrom(o.map(e=>({position:e.head,magnitude:e.magnitude}))),i.glareFrom(o.map(e=>({key:`${e.reentryId}:${e.fragmentId}`,position:e.head,magnitude:e.magnitude,fade:e.fade}))))}pick(s,t,i){const o=this.pieces.nearest(t,i.nearestCos);return o&&{id:o.view.reentryId,detail:o}}dispose(){this.pieces.dispose()}}export{k as ReentrySimulation};
|
package/dist-embed-sighting-editor/{ReferenceSystem-DHPnvAXN.js → ReferenceSystem-PYF540r7.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{aR as m,bc as f,bd as w,be as c,a8 as M,an as v,bf as O,bg as b,bh as y,u as D}from"./rr0-sighting-editor.mjs";import{P as p,a as E}from"./PictureFetch-X3UpM6JV.js";const g=3,l=800,d=Math.PI/180;class n{constructor(t,s,a=n.fetchImage){this.scene=t,this.onImageLoaded=s,this.loadImage=a}meshes=new Map;signatures=new Map;images=new Map;loading=new Map;failed=new Map;references=[];views=new Map;shown=!0;observerAt;static PRESENT_WITHIN_M=2;static GONE_BEYOND_M=20;static presenceAt(t,s){if(!t.from||!s)return 1;const a=m(s.lat,s.lng,t.from.lat,t.from.lng),e=(Math.hypot(a.x,a.z)-n.PRESENT_WITHIN_M)/(n.GONE_BEYOND_M-n.PRESENT_WITHIN_M),o=Math.min(Math.max(e,0),1);return 1-o*o*(3-2*o)}set(t,s=this.views,a){this.references=t,this.observerAt=a,this.views=s;const i=new Set(t.map(e=>e.id));for(const[e,o]of this.meshes)i.has(e)||(this.dispose(o),this.meshes.delete(e),this.signatures.delete(e));for(const[e,o]of this.images){const h=t.find(u=>u.id===e);if(h&&h.src===o.texture.userData.src)continue;o.texture.dispose(),this.images.delete(e);const r=this.meshes.get(e);r&&(this.dispose(r),this.meshes.delete(e),this.signatures.delete(e))}for(const e of t){const o=this.images.get(e.id);if(!o){this.load(e);continue}this.build(e,o)}}setShown(t){this.shown=t;for(const s of this.meshes.values())s.visible=t&&this.opacityOf(s.userData.id)>0}setView(t,s){this.views.set(t,s);const a=this.meshes.get(t);a&&this.applyOpacity(a,t)}layer=g;get any(){for(const t of this.meshes.values())if(t.visible)return!0;return!1}place(t){for(const s of this.meshes.values())s.visible&&(s.position.copy(t.position),s.updateMatrixWorld())}get furthestM(){return this.meshes.size>0?l:0}directionOfPixel(t,s,a,i){const e=this.images.get(t.id),o=e?e.width/e.height:1,h=Math.tan(t.registration.fovDeg/2*d),r=h*o;return i.set((s*2-1)*r,(1-a*2)*h,-1).normalize(),i.applyQuaternion(n.orientation(t))}aspectOf(t){const s=this.images.get(t);return s?s.width/s.height:void 0}failureOf(t){return this.failed.get(t)}load(t){const s=t.src;if(this.loading.has(t.id)||this.failed.has(s))return;const a=this.loadImage(s).then(i=>{this.loading.delete(t.id);const e=this.references.find(o=>o.id===t.id);if(!e||e.src!==s){i.texture.dispose();return}i.texture.userData.src=s,this.images.set(t.id,i),this.build(e,i),this.onImageLoaded()},i=>{this.loading.delete(t.id),this.failed.set(s,p.failureOf(i)),this.onImageLoaded()});this.loading.set(t.id,a)}static async fetchImage(t){const s=await p.blob(t),a=await createImageBitmap(s,{imageOrientation:"flipY"}).catch(()=>{throw new E(t,{kind:"notPicture"})}),i=new f(a);return i.flipY=!1,i.colorSpace=w,i.minFilter=c,i.magFilter=c,i.generateMipmaps=!1,i.needsUpdate=!0,{texture:i,width:a.width,height:a.height}}build(t,s){const a=n.signatureOf(t,s);let i=this.meshes.get(t.id);if(i&&this.signatures.get(t.id)===a){this.applyOpacity(i,t.id);return}i&&(this.dispose(i),this.meshes.delete(t.id)),i=new M(n.geometryOf(t,s),new v({map:s.texture,transparent:!0,depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1})),t.kind==="panorama"&&(i.material.side=O),i.frustumCulled=!1,i.layers.set(g),i.userData.id=t.id,i.quaternion.copy(n.orientation(t)),this.scene.add(i),this.meshes.set(t.id,i),this.signatures.set(t.id,a),this.applyOpacity(i,t.id)}static geometryOf(t,s){if(t.kind==="panorama"){const o=new b(l,64,32,Math.PI/2,Math.PI*2),h=o.attributes.uv;for(let r=0;r<h.count;r++)h.setX(r,1-h.getX(r));return h.needsUpdate=!0,o}const a=2*l*Math.tan(t.registration.fovDeg/2*d),i=a*(s.width/Math.max(s.height,1)),e=new y(i,a);return e.translate(0,0,-l),e}static orientation(t){const{headingDeg:s,pitchDeg:a,rollDeg:i}=t.registration,e=new D;return e.rotation.set(a*d,-s*d,-(i??0)*d,"YXZ"),e.quaternion}opacityOf(t){const s=this.references.find(e=>e.id===t),a=this.views.get(t),i=s?n.presenceAt(s,this.observerAt):1;return(a?.opacity??s?.opacity??0)*i}applyOpacity(t,s){const a=this.opacityOf(s);t.material.opacity=a,t.visible=this.shown&&a>0}static signatureOf(t,s){const{headingDeg:a,pitchDeg:i,rollDeg:e,fovDeg:o}=t.registration;return[t.kind,t.src,s.width,s.height,a,i,e??0,o].join("|")}dispose(t){this.scene.remove(t),t.geometry.dispose(),t.material.dispose()}disposeAll(){for(const t of this.meshes.values())this.dispose(t);this.meshes.clear(),this.signatures.clear();for(const t of this.images.values())t.texture.dispose();this.images.clear()}}export{g as REFERENCE_LAYER,n as ReferenceSystem};
|