@rr0/ufoathome 0.165.0 → 0.167.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_en-BNau2xU8.js +1 -0
- package/dist-embed-interview/rr0-interview.mjs +6 -6
- package/dist-embed-scene/{AdsbLolArchiveProvider-Cea0LAnZ.js → AdsbLolArchiveProvider-C5EeYhpl.js} +1 -1
- package/dist-embed-scene/BeamEditor-ClooLylg.js +30 -0
- package/dist-embed-scene/BeamKindMessages_en-5RezNkyz.js +1 -0
- package/dist-embed-scene/BeamKindMessages_es-B5vSWVjK.js +1 -0
- package/dist-embed-scene/BeamKindMessages_fr--28-36OI.js +1 -0
- package/dist-embed-scene/BeamKindMessages_it-X53Fuf2U.js +1 -0
- package/dist-embed-scene/BeamParameterTexts_en-DZB75ouZ.js +1 -0
- package/dist-embed-scene/BeamParameterTexts_es-AeZmsufG.js +1 -0
- package/dist-embed-scene/BeamParameterTexts_fr-BHG3fW40.js +1 -0
- package/dist-embed-scene/BeamParameterTexts_it-CPwmQX-g.js +1 -0
- package/dist-embed-scene/{BeamSystem-B80EaJKx.js → BeamSystem-PF6irYQf.js} +1 -1
- package/dist-embed-scene/FlareKindMessages_en-BroHgiwr.js +1 -0
- package/dist-embed-scene/FlareKindMessages_es-SraQyQ3Y.js +1 -0
- package/dist-embed-scene/FlareKindMessages_fr-Dy5SlSna.js +1 -0
- package/dist-embed-scene/FlareKindMessages_it-CF39wmrC.js +1 -0
- package/dist-embed-scene/{GLTFLoader-YecOnQON.js → GLTFLoader-DB2upivM.js} +1 -1
- package/dist-embed-scene/LanternEditor-DWhJGaQW.js +9 -0
- package/dist-embed-scene/LanternKindMessages_en-fUfoRYC0.js +1 -0
- package/dist-embed-scene/LanternKindMessages_es-Chyc607D.js +1 -0
- package/dist-embed-scene/LanternKindMessages_fr-CDem7PTY.js +1 -0
- package/dist-embed-scene/LanternKindMessages_it-yOojym1u.js +1 -0
- package/dist-embed-scene/LanternParameterTexts_en-CcnGd8UH.js +1 -0
- package/dist-embed-scene/LanternParameterTexts_es-CUTgNutZ.js +1 -0
- package/dist-embed-scene/LanternParameterTexts_fr-P2JwYOUy.js +1 -0
- package/dist-embed-scene/LanternParameterTexts_it-CzNnIUrX.js +1 -0
- package/dist-embed-scene/{LaserBeam-DXzWB-xk.js → LaserBeam-DXZysEYv.js} +1 -1
- package/dist-embed-scene/LaunchEditor-DQ-F25le.js +22 -0
- package/dist-embed-scene/LaunchKindMessages_en-Batvnyw3.js +1 -0
- package/dist-embed-scene/LaunchKindMessages_es-KYyQ9gbu.js +1 -0
- package/dist-embed-scene/LaunchKindMessages_fr-CoojboIk.js +1 -0
- package/dist-embed-scene/LaunchKindMessages_it-9HA3cjgP.js +1 -0
- package/dist-embed-scene/LaunchParameterTexts_en-DvrCwbDM.js +1 -0
- package/dist-embed-scene/LaunchParameterTexts_es--RUAegVp.js +1 -0
- package/dist-embed-scene/LaunchParameterTexts_fr-Bh_1zVzy.js +1 -0
- package/dist-embed-scene/LaunchParameterTexts_it-CWDx9nJy.js +1 -0
- package/dist-embed-scene/{LaunchPlume-DwOSrKP_.js → LaunchPlume-lH1zITP-.js} +1 -1
- package/dist-embed-scene/{LaunchSimulation-ClGdZJHr.js → LaunchSimulation-BrDxk8DW.js} +1 -1
- package/dist-embed-scene/{ModuleSession-DAQNvnRi.js → ModuleSession-fhQ2P9LG.js} +2 -2
- package/dist-embed-scene/ModuleThree-Du7Omkv6.js +1 -0
- package/dist-embed-scene/{ParameterForm-D0GvLmqx.js → ParameterForm-BNfKnqZ4.js} +14 -14
- package/dist-embed-scene/PerceptionMessages_en-B2O6DR64.js +1 -0
- package/dist-embed-scene/PerceptionMessages_es-BmkP6OqD.js +1 -0
- package/dist-embed-scene/PerceptionMessages_fr-B59TnGBC.js +1 -0
- package/dist-embed-scene/PerceptionMessages_it-DPlxRmxu.js +1 -0
- package/dist-embed-scene/ReentryEditor-IDlX4mtf.js +27 -0
- package/dist-embed-scene/ReentryKindMessages_en-Cbgk3paQ.js +1 -0
- package/dist-embed-scene/ReentryKindMessages_es-DwgJQanC.js +1 -0
- package/dist-embed-scene/ReentryKindMessages_fr-D9r9x2bK.js +1 -0
- package/dist-embed-scene/ReentryKindMessages_it-DQ-J5YpD.js +1 -0
- package/dist-embed-scene/ReentryParameterTexts_en-BH1tGP5C.js +1 -0
- package/dist-embed-scene/ReentryParameterTexts_es-BDMJ4K1g.js +1 -0
- package/dist-embed-scene/ReentryParameterTexts_fr-C8ROK57p.js +1 -0
- package/dist-embed-scene/ReentryParameterTexts_it-CwC8vNTI.js +1 -0
- package/dist-embed-scene/{ReentrySimulation-rnJU2x1Y.js → ReentrySimulation-BHQBGIr_.js} +1 -1
- package/dist-embed-scene/SceneNames_en-MuZS0swp.js +1 -0
- package/dist-embed-scene/SceneNames_es-DuwAjd1R.js +1 -0
- package/dist-embed-scene/SceneNames_fr-ChDjaMY9.js +1 -0
- package/dist-embed-scene/SceneNames_it-CWzCQiEh.js +1 -0
- package/{dist-embed-sighting/TimelineTracks-C7uTt9N5.js → dist-embed-scene/TimelineTracks-C02lbugN.js} +1 -1
- package/dist-embed-scene/UfoMessages_en-BbYI-msn.js +1 -0
- package/dist-embed-scene/UfoMessages_es-DreLXcIR.js +1 -0
- package/dist-embed-scene/UfoMessages_fr-D9BCRY2m.js +1 -0
- package/dist-embed-scene/UfoMessages_it-C8r0jnJP.js +1 -0
- package/dist-embed-scene/rr0-scene.mjs +310 -310
- package/dist-embed-scene/{trafficRuntime-C3sA3Jg_.js → trafficRuntime-CdAJY70O.js} +2 -2
- package/dist-embed-sighting/{AdsbLolArchiveProvider-BGg8e-TS.js → AdsbLolArchiveProvider-Dfc5WtsT.js} +1 -1
- package/dist-embed-sighting/{BallesterGuaspAssessor-DHpHbF6s.js → BallesterGuaspAssessor-VMcyGlQb.js} +1 -1
- package/dist-embed-sighting/BeamEditor-Dvqs7sme.js +30 -0
- package/dist-embed-sighting/BeamKindMessages_en-5RezNkyz.js +1 -0
- package/dist-embed-sighting/BeamKindMessages_es-B5vSWVjK.js +1 -0
- package/dist-embed-sighting/BeamKindMessages_fr--28-36OI.js +1 -0
- package/dist-embed-sighting/BeamKindMessages_it-X53Fuf2U.js +1 -0
- package/dist-embed-sighting/BeamParameterTexts_en-DZB75ouZ.js +1 -0
- package/dist-embed-sighting/BeamParameterTexts_es-AeZmsufG.js +1 -0
- package/dist-embed-sighting/BeamParameterTexts_fr-BHG3fW40.js +1 -0
- package/dist-embed-sighting/BeamParameterTexts_it-CPwmQX-g.js +1 -0
- package/dist-embed-sighting/BeamSystem-BSO1d2Na.js +1 -0
- package/dist-embed-sighting/ContrailSystem-Bgre4cLs.js +1 -0
- package/dist-embed-sighting/FlareKindMessages_en-BroHgiwr.js +1 -0
- package/dist-embed-sighting/FlareKindMessages_es-SraQyQ3Y.js +1 -0
- package/dist-embed-sighting/FlareKindMessages_fr-Dy5SlSna.js +1 -0
- package/dist-embed-sighting/FlareKindMessages_it-CF39wmrC.js +1 -0
- package/dist-embed-sighting/GLTFLoader-BkhEomyw.js +1 -0
- package/dist-embed-sighting/{HeadlightSystem-CXPE3feA.js → HeadlightSystem-CmppP6Mm.js} +1 -1
- package/dist-embed-sighting/HynekAssessor-tNpli5GC.js +1 -0
- package/dist-embed-sighting/LanternEditor-DRmWNbXO.js +9 -0
- package/dist-embed-sighting/LanternKindMessages_en-fUfoRYC0.js +1 -0
- package/dist-embed-sighting/LanternKindMessages_es-Chyc607D.js +1 -0
- package/dist-embed-sighting/LanternKindMessages_fr-CDem7PTY.js +1 -0
- package/dist-embed-sighting/LanternKindMessages_it-yOojym1u.js +1 -0
- package/dist-embed-sighting/LanternParameterTexts_en-CcnGd8UH.js +1 -0
- package/dist-embed-sighting/LanternParameterTexts_es-CUTgNutZ.js +1 -0
- package/dist-embed-sighting/LanternParameterTexts_fr-P2JwYOUy.js +1 -0
- package/dist-embed-sighting/LanternParameterTexts_it-CzNnIUrX.js +1 -0
- package/dist-embed-sighting/{LaserBeam-CovzRtac.js → LaserBeam-CT0D5uXQ.js} +1 -1
- package/dist-embed-sighting/LaunchEditor-BWm07eFT.js +22 -0
- package/dist-embed-sighting/LaunchKindMessages_en-Batvnyw3.js +1 -0
- package/dist-embed-sighting/LaunchKindMessages_es-KYyQ9gbu.js +1 -0
- package/dist-embed-sighting/LaunchKindMessages_fr-CoojboIk.js +1 -0
- package/dist-embed-sighting/LaunchKindMessages_it-9HA3cjgP.js +1 -0
- package/dist-embed-sighting/LaunchParameterTexts_en-DvrCwbDM.js +1 -0
- package/dist-embed-sighting/LaunchParameterTexts_es--RUAegVp.js +1 -0
- package/dist-embed-sighting/LaunchParameterTexts_fr-Bh_1zVzy.js +1 -0
- package/dist-embed-sighting/LaunchParameterTexts_it-CWDx9nJy.js +1 -0
- package/dist-embed-sighting/{LaunchSimulation-C0cSHpLE.js → LaunchSimulation-otlua1RW.js} +1 -1
- package/dist-embed-sighting/{ModuleSession-CRVX-5Br.js → ModuleSession-BfP999ya.js} +2 -2
- package/dist-embed-sighting/ModuleThree-ColxHy_y.js +1 -0
- package/dist-embed-sighting/{NearestApproach-BOWntoKZ.js → NearestApproach-hO2JFAfU.js} +1 -1
- package/dist-embed-sighting/{ParameterForm-BMfViRUv.js → ParameterForm-DxN0Nf1y.js} +1 -1
- package/dist-embed-sighting/PerceptionMessages_en-B2O6DR64.js +1 -0
- package/dist-embed-sighting/PerceptionMessages_es-BmkP6OqD.js +1 -0
- package/dist-embed-sighting/PerceptionMessages_fr-B59TnGBC.js +1 -0
- package/dist-embed-sighting/PerceptionMessages_it-DPlxRmxu.js +1 -0
- package/dist-embed-sighting/{PoherAssessor-CM7oCyEk.js → PoherAssessor-CxcKyCRu.js} +1 -1
- package/dist-embed-sighting/{RailwaySystem-D8yJRUc8.js → RailwaySystem-C920HhY6.js} +1 -1
- package/dist-embed-sighting/ReentryEditor-DXrar7b7.js +27 -0
- package/dist-embed-sighting/ReentryKindMessages_en-Cbgk3paQ.js +1 -0
- package/dist-embed-sighting/ReentryKindMessages_es-DwgJQanC.js +1 -0
- package/dist-embed-sighting/ReentryKindMessages_fr-D9r9x2bK.js +1 -0
- package/dist-embed-sighting/ReentryKindMessages_it-DQ-J5YpD.js +1 -0
- package/dist-embed-sighting/ReentryParameterTexts_en-BH1tGP5C.js +1 -0
- package/dist-embed-sighting/ReentryParameterTexts_es-BDMJ4K1g.js +1 -0
- package/dist-embed-sighting/ReentryParameterTexts_fr-C8ROK57p.js +1 -0
- package/dist-embed-sighting/ReentryParameterTexts_it-CwC8vNTI.js +1 -0
- package/dist-embed-sighting/ReentrySimulation-BtiVr8cY.js +1 -0
- package/dist-embed-sighting/ReferenceSystem-90M3kYiP.js +1 -0
- package/dist-embed-sighting/{RoadMarkings-BC76NPX4.js → RoadMarkings-DDNrriGo.js} +1 -1
- package/dist-embed-sighting/SceneNames_en-CryY5Edh.js +1 -0
- package/dist-embed-sighting/SceneNames_es-StyJlKmE.js +1 -0
- package/dist-embed-sighting/SceneNames_fr-B3c9bWLO.js +1 -0
- package/dist-embed-sighting/SceneNames_it--6HUBaRO.js +1 -0
- package/dist-embed-sighting/ShareMessages_en-DE1WoeWH.js +1 -0
- package/dist-embed-sighting/SightingMessages_en-C6mh8cZI.js +1 -0
- package/{dist-embed-scene/TimelineTracks-Bv2FX3_W.js → dist-embed-sighting/TimelineTracks-B1dXX0uV.js} +1 -1
- package/dist-embed-sighting/{TraceSystem-Cd2FqhcV.js → TraceSystem-BrpqiAAJ.js} +2 -2
- package/dist-embed-sighting/UfoMessages_en-Bau9u8Mz.js +1 -0
- package/dist-embed-sighting/UfoMessages_es-DreLXcIR.js +1 -0
- package/dist-embed-sighting/UfoMessages_fr-D9BCRY2m.js +1 -0
- package/dist-embed-sighting/UfoMessages_it-C8r0jnJP.js +1 -0
- package/dist-embed-sighting/{WaterSystem-S81tdPno.js → WaterSystem-D3andNtL.js} +1 -1
- package/dist-embed-sighting/rr0-sighting.mjs +358 -358
- package/dist-embed-sighting/{trafficRuntime-DL5Zul8z.js → trafficRuntime-dT3zw02J.js} +2 -2
- package/dist-embed-sighting-editor/AdsbLolArchiveProvider-DS9ev-HU.js +1 -0
- package/dist-embed-sighting-editor/{BallesterGuaspAssessor-CRfTg7iA.js → BallesterGuaspAssessor-Db5otqP1.js} +1 -1
- package/dist-embed-sighting-editor/BeamEditor-DsOf0VRe.js +30 -0
- package/dist-embed-sighting-editor/BeamKindMessages_en-5RezNkyz.js +1 -0
- package/dist-embed-sighting-editor/BeamKindMessages_es-B5vSWVjK.js +1 -0
- package/dist-embed-sighting-editor/BeamKindMessages_fr--28-36OI.js +1 -0
- package/dist-embed-sighting-editor/BeamKindMessages_it-X53Fuf2U.js +1 -0
- package/dist-embed-sighting-editor/BeamParameterTexts_en-DZB75ouZ.js +1 -0
- package/dist-embed-sighting-editor/BeamParameterTexts_es-AeZmsufG.js +1 -0
- package/dist-embed-sighting-editor/BeamParameterTexts_fr-BHG3fW40.js +1 -0
- package/dist-embed-sighting-editor/BeamParameterTexts_it-CPwmQX-g.js +1 -0
- package/dist-embed-sighting-editor/{BeamSystem-BQbLn-3t.js → BeamSystem-D5tLjXtH.js} +1 -1
- package/dist-embed-sighting-editor/BodyEditor-CamqX5Xg.js +28 -0
- package/dist-embed-sighting-editor/BodyParameterTexts_en-CKiFdpaz.js +1 -0
- package/dist-embed-sighting-editor/BodyParameterTexts_es-DT9XO1Hc.js +1 -0
- package/dist-embed-sighting-editor/BodyParameterTexts_fr-B5jLsE0g.js +1 -0
- package/dist-embed-sighting-editor/BodyParameterTexts_it-iyJGx4Ta.js +1 -0
- package/dist-embed-sighting-editor/CaseEditorMessages_en-BONSJaQA.js +1 -0
- package/dist-embed-sighting-editor/ClaudeNarrativeTexts_en-CBLJZ7b6.js +1 -0
- package/dist-embed-sighting-editor/CloudEditorMessages_en-SmcRKW1O.js +1 -0
- package/dist-embed-sighting-editor/CloudParameterTexts_en-NIa0gfgA.js +1 -0
- package/dist-embed-sighting-editor/CloudParameterTexts_es-DXu4T30p.js +1 -0
- package/dist-embed-sighting-editor/CloudParameterTexts_fr-Bv-jc2dq.js +1 -0
- package/dist-embed-sighting-editor/CloudParameterTexts_it-C3RrkRwI.js +1 -0
- package/dist-embed-sighting-editor/{ContrailSystem-BQXLg_WA.js → ContrailSystem-rUmDVijn.js} +1 -1
- package/dist-embed-sighting-editor/{CoverageAssessor-D3HBwZuC.js → CoverageAssessor-cODG-YV9.js} +1 -1
- package/dist-embed-sighting-editor/DecorParameterTexts_en-C5dEeI_C.js +1 -0
- package/dist-embed-sighting-editor/DecorParameterTexts_es-BysMOaxT.js +1 -0
- package/dist-embed-sighting-editor/DecorParameterTexts_fr-CThgxosI.js +1 -0
- package/dist-embed-sighting-editor/DecorParameterTexts_it-D0ZsTK16.js +1 -0
- package/dist-embed-sighting-editor/FlareKindMessages_en-BroHgiwr.js +1 -0
- package/dist-embed-sighting-editor/FlareKindMessages_es-SraQyQ3Y.js +1 -0
- package/dist-embed-sighting-editor/FlareKindMessages_fr-Dy5SlSna.js +1 -0
- package/dist-embed-sighting-editor/FlareKindMessages_it-CF39wmrC.js +1 -0
- package/dist-embed-sighting-editor/{GLTFLoader-CQeR3NC8.js → GLTFLoader-5AJGh-k1.js} +1 -1
- package/dist-embed-sighting-editor/{HeadlightSystem-Cy4jSEsq.js → HeadlightSystem-neTrWCCo.js} +1 -1
- package/dist-embed-sighting-editor/{HynekAssessor-Covu9I3x.js → HynekAssessor-DRD9zLEH.js} +1 -1
- package/dist-embed-sighting-editor/{InterviewEditorElement-IBABfqta.js → InterviewEditorElement-Cs8mzPb7.js} +27 -27
- package/dist-embed-sighting-editor/LanternEditor-CnxhMWVp.js +9 -0
- package/dist-embed-sighting-editor/LanternKindMessages_en-fUfoRYC0.js +1 -0
- package/dist-embed-sighting-editor/LanternKindMessages_es-Chyc607D.js +1 -0
- package/dist-embed-sighting-editor/LanternKindMessages_fr-CDem7PTY.js +1 -0
- package/dist-embed-sighting-editor/LanternKindMessages_it-yOojym1u.js +1 -0
- package/dist-embed-sighting-editor/LanternParameterTexts_en-CcnGd8UH.js +1 -0
- package/dist-embed-sighting-editor/LanternParameterTexts_es-CUTgNutZ.js +1 -0
- package/dist-embed-sighting-editor/LanternParameterTexts_fr-P2JwYOUy.js +1 -0
- package/dist-embed-sighting-editor/LanternParameterTexts_it-CzNnIUrX.js +1 -0
- package/dist-embed-sighting-editor/LaserBeam-Be555mrH.js +1 -0
- package/dist-embed-sighting-editor/LaunchEditor-7uWzz1to.js +22 -0
- package/dist-embed-sighting-editor/LaunchKindMessages_en-Batvnyw3.js +1 -0
- package/dist-embed-sighting-editor/LaunchKindMessages_es-KYyQ9gbu.js +1 -0
- package/dist-embed-sighting-editor/LaunchKindMessages_fr-CoojboIk.js +1 -0
- package/dist-embed-sighting-editor/LaunchKindMessages_it-9HA3cjgP.js +1 -0
- package/dist-embed-sighting-editor/LaunchParameterTexts_en-DvrCwbDM.js +1 -0
- package/dist-embed-sighting-editor/LaunchParameterTexts_es--RUAegVp.js +1 -0
- package/dist-embed-sighting-editor/LaunchParameterTexts_fr-Bh_1zVzy.js +1 -0
- package/dist-embed-sighting-editor/LaunchParameterTexts_it-CWDx9nJy.js +1 -0
- package/dist-embed-sighting-editor/LaunchPlume-Bc8eFHmR.js +1 -0
- package/dist-embed-sighting-editor/{LaunchSimulation-4f9-9d7Z.js → LaunchSimulation-3YNBjyS2.js} +1 -1
- package/dist-embed-sighting-editor/{ModelSource-CYfSBTeB.js → ModelSource-D0ZuOymh.js} +1 -1
- package/dist-embed-sighting-editor/{ModelThumbnails-DYWQQdaZ.js → ModelThumbnails-BA3zFrn5.js} +1 -1
- package/dist-embed-sighting-editor/{ModelViewer-BjIOswb8.js → ModelViewer-BDorZEms.js} +1 -1
- package/dist-embed-sighting-editor/ModuleConformance-DqZDQ_RP.js +2 -0
- package/dist-embed-sighting-editor/{ModuleSession-D3GrBJ3j.js → ModuleSession-CBJWLo9w.js} +2 -2
- package/dist-embed-sighting-editor/ModuleThree-Brz-0Orl.js +1 -0
- package/dist-embed-sighting-editor/ModulesPanelElement-BrOayCKN.js +15 -0
- package/dist-embed-sighting-editor/ModulesPanelMessages_en-t8LOPRx0.js +1 -0
- package/dist-embed-sighting-editor/ModulesPanelMessages_es-DQFuXaUa.js +1 -0
- package/dist-embed-sighting-editor/ModulesPanelMessages_fr-DZMwqDs0.js +1 -0
- package/dist-embed-sighting-editor/ModulesPanelMessages_it-DfX1ObVK.js +1 -0
- package/dist-embed-sighting-editor/{NearestApproach-DCUW8bB4.js → NearestApproach-BfoIDPh8.js} +1 -1
- package/dist-embed-sighting-editor/PerceptionMessages_en-B2O6DR64.js +1 -0
- package/dist-embed-sighting-editor/PerceptionMessages_es-BmkP6OqD.js +1 -0
- package/dist-embed-sighting-editor/PerceptionMessages_fr-B59TnGBC.js +1 -0
- package/dist-embed-sighting-editor/PerceptionMessages_it-DPlxRmxu.js +1 -0
- package/dist-embed-sighting-editor/{PoherAssessor-BoGGdasd.js → PoherAssessor-Cy0fVE2j.js} +1 -1
- package/dist-embed-sighting-editor/{RailwaySystem-C8Dby19B.js → RailwaySystem-J2yWIAbD.js} +1 -1
- package/dist-embed-sighting-editor/ReentryEditor-BA4Jirp1.js +27 -0
- package/dist-embed-sighting-editor/ReentryKindMessages_en-Cbgk3paQ.js +1 -0
- package/dist-embed-sighting-editor/ReentryKindMessages_es-DwgJQanC.js +1 -0
- package/dist-embed-sighting-editor/ReentryKindMessages_fr-D9r9x2bK.js +1 -0
- package/dist-embed-sighting-editor/ReentryKindMessages_it-DQ-J5YpD.js +1 -0
- package/dist-embed-sighting-editor/ReentryParameterTexts_en-BH1tGP5C.js +1 -0
- package/dist-embed-sighting-editor/ReentryParameterTexts_es-BDMJ4K1g.js +1 -0
- package/dist-embed-sighting-editor/ReentryParameterTexts_fr-C8ROK57p.js +1 -0
- package/dist-embed-sighting-editor/ReentryParameterTexts_it-CwC8vNTI.js +1 -0
- package/dist-embed-sighting-editor/ReentrySimulation-GEWa9zRD.js +1 -0
- package/dist-embed-sighting-editor/{ReferenceSystem-PYF540r7.js → ReferenceSystem-DvWi5osh.js} +1 -1
- package/dist-embed-sighting-editor/{RoadMarkings-VqRLMg59.js → RoadMarkings-Ci3fp-tS.js} +1 -1
- package/dist-embed-sighting-editor/SceneNames_en-oNPwLOsb.js +1 -0
- package/dist-embed-sighting-editor/SceneNames_es-Z_lHKIao.js +1 -0
- package/dist-embed-sighting-editor/SceneNames_fr-CTfqBDCK.js +1 -0
- package/dist-embed-sighting-editor/SceneNames_it-Bjfu1PyS.js +1 -0
- package/dist-embed-sighting-editor/ShareMessages_en-DE1WoeWH.js +1 -0
- package/dist-embed-sighting-editor/SightingEditorMessages_en-CAWfFtUQ.js +12 -0
- package/dist-embed-sighting-editor/{SightingEditorMessages_es-CQU200Hj.js → SightingEditorMessages_es-Botf2OEe.js} +1 -1
- package/dist-embed-sighting-editor/{SightingEditorMessages_fr-Bd4Ht-jW.js → SightingEditorMessages_fr-D5f-KX1w.js} +1 -1
- package/dist-embed-sighting-editor/{SightingEditorMessages_it-CSnPiCy2.js → SightingEditorMessages_it-DBMXvC62.js} +1 -1
- package/dist-embed-sighting-editor/{TraceSystem-BX0FwUB1.js → TraceSystem-DO70_HjB.js} +2 -2
- package/dist-embed-sighting-editor/UfoMessages_en-DVlS5Elx.js +1 -0
- package/dist-embed-sighting-editor/UfoMessages_es-DreLXcIR.js +1 -0
- package/dist-embed-sighting-editor/UfoMessages_fr-D9BCRY2m.js +1 -0
- package/dist-embed-sighting-editor/UfoMessages_it-C8r0jnJP.js +1 -0
- package/dist-embed-sighting-editor/{WaterSystem-uWnkivpP.js → WaterSystem-Cx8Lct9F.js} +1 -1
- package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +664 -673
- package/dist-embed-sighting-editor/trafficRuntime-PSRYgFJb.js +2 -0
- package/package.json +2 -1
- package/dist-embed-scene/BeamEditor-DcUBLvPh.js +0 -30
- package/dist-embed-scene/LanternEditor-DQ9Y_eBl.js +0 -9
- package/dist-embed-scene/LaunchEditor-Csb2Pfq3.js +0 -22
- package/dist-embed-scene/ModuleThree-Cozd8KlK.js +0 -1
- package/dist-embed-scene/ReentryEditor-AsKtWLMw.js +0 -27
- package/dist-embed-scene/SceneNames_es-DL0IWHOw.js +0 -1
- package/dist-embed-scene/SceneNames_fr-B2NX5JJO.js +0 -1
- package/dist-embed-scene/SceneNames_it-wq6fqU10.js +0 -1
- package/dist-embed-scene/UfoMessages_es-BxNc9t8X.js +0 -1
- package/dist-embed-scene/UfoMessages_fr-DnD6eSjQ.js +0 -1
- package/dist-embed-scene/UfoMessages_it-BubvnWTa.js +0 -1
- package/dist-embed-sighting/BeamEditor-KLBjeTRU.js +0 -30
- package/dist-embed-sighting/BeamSystem-C6YXI9Da.js +0 -1
- package/dist-embed-sighting/ContrailSystem-BUKo3qVd.js +0 -1
- package/dist-embed-sighting/GLTFLoader-BYMKgQLE.js +0 -1
- package/dist-embed-sighting/HynekAssessor-Cc8hHe3R.js +0 -1
- package/dist-embed-sighting/LanternEditor-J_d2le0V.js +0 -9
- package/dist-embed-sighting/LaunchEditor-DuVZmb3n.js +0 -22
- package/dist-embed-sighting/ModuleThree-YgLqKZM9.js +0 -1
- package/dist-embed-sighting/ReentryEditor-DCDavAGw.js +0 -27
- package/dist-embed-sighting/ReentrySimulation-BzMMTqck.js +0 -1
- package/dist-embed-sighting/ReferenceSystem-Dt28-Egu.js +0 -1
- package/dist-embed-sighting/SceneNames_es-Cu0CS6c0.js +0 -1
- package/dist-embed-sighting/SceneNames_fr-BAQt0-Zp.js +0 -1
- package/dist-embed-sighting/SceneNames_it-CeXG9jCC.js +0 -1
- package/dist-embed-sighting/UfoMessages_es-BxNc9t8X.js +0 -1
- package/dist-embed-sighting/UfoMessages_fr-DnD6eSjQ.js +0 -1
- package/dist-embed-sighting/UfoMessages_it-BubvnWTa.js +0 -1
- package/dist-embed-sighting-editor/AdsbLolArchiveProvider-k2xqWyaR.js +0 -1
- package/dist-embed-sighting-editor/BeamEditor-DTkjy61A.js +0 -30
- package/dist-embed-sighting-editor/BodyEditor-D5PfqEg2.js +0 -28
- package/dist-embed-sighting-editor/LanternEditor-BoxxG443.js +0 -9
- package/dist-embed-sighting-editor/LaserBeam-j5Z4tIOw.js +0 -1
- package/dist-embed-sighting-editor/LaunchEditor-rJud4C3y.js +0 -22
- package/dist-embed-sighting-editor/LaunchPlume-Dm1YdsZp.js +0 -1
- package/dist-embed-sighting-editor/ModuleThree-CkOgRXM2.js +0 -1
- package/dist-embed-sighting-editor/ModulesPanelElement-Uz0lPYwu.js +0 -13
- package/dist-embed-sighting-editor/ModulesPanelMessages_en-D97Nh2yy.js +0 -1
- package/dist-embed-sighting-editor/ModulesPanelMessages_es-CE9Ajw2-.js +0 -1
- package/dist-embed-sighting-editor/ModulesPanelMessages_fr-BWsj-7_t.js +0 -1
- package/dist-embed-sighting-editor/ModulesPanelMessages_it-CtKrboEg.js +0 -1
- package/dist-embed-sighting-editor/ReentryEditor-8sfHq7hY.js +0 -27
- package/dist-embed-sighting-editor/ReentrySimulation-KMMVK82G.js +0 -1
- package/dist-embed-sighting-editor/SceneNames_es-CLvEspFd.js +0 -1
- package/dist-embed-sighting-editor/SceneNames_fr-oYQgZ-TZ.js +0 -1
- package/dist-embed-sighting-editor/SceneNames_it-CDTw3VAX.js +0 -1
- package/dist-embed-sighting-editor/UfoMessages_es-BxNc9t8X.js +0 -1
- package/dist-embed-sighting-editor/UfoMessages_fr-DnD6eSjQ.js +0 -1
- package/dist-embed-sighting-editor/UfoMessages_it-BubvnWTa.js +0 -1
- package/dist-embed-sighting-editor/trafficRuntime-BeMCM4Ap.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={light:"Luz",beam:"Haz",when:"Cuándo",name:"Nombre",divergence:"Divergencia",howFastItWidensFullAngle:"Lo rápido que se ensancha, ángulo total: 0,1 mrad es un metro de ancho a 10 km.",widthAtTheEmitter:"Anchura en el emisor",unevenHaze:"Bruma irregular",howUnevenlyTheHazeItCrosses:"Lo desigual que es la bruma que cruza: visto de lado, el haz es más brillante donde cruza una bolsa más densa, y las bolsas derivan con el viento. 0 es una bruma uniforme; el valor por defecto se juzga en fotografías, no se mide.",itsColour532ForTheGreen:"Su color: 532 para el verde de un láser doblado en frecuencia, 520 para un diodo verde, 638 para uno rojo, 450 para uno azul.",theOpticalPowerItCarriesIts:"La potencia óptica que lleva, su media para un láser pulsado, cuyos pulsos ningún ojo distingue. Lo que se ve de él es lo que el aire difunde.",wavelength:"Longitud de onda",power:"Potencia",time:"Instante",secondsOfTheRecording:"Segundos de la grabación.",onFrom:"Encendido a",secondsOfTheRecordingEmptyFrom:"Segundos de la grabación; vacío, desde su inicio.",offAt:"Apagado a",secondsOfTheRecordingEmptyUntil:"Segundos de la grabación; vacío, hasta su final.",pathAtAnInstant:"Trayecto en un instante",pointOfThePath:"Punto del trayecto",position:"Posición",altitude:"Altitud",aboveTheSeaNotTheGround:"Sobre el mar, no sobre el suelo: un emisor en una ventana a doce metros de altura, sobre un suelo a 160 m, está a 172 m."};export{e as beamParameterTexts_es};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={light:"Lumière",beam:"Faisceau",when:"Quand",name:"Nom",divergence:"Divergence",howFastItWidensFullAngle:"À quelle vitesse il s'élargit, angle total : 0,1 mrad fait un mètre de large à 10 km.",widthAtTheEmitter:"Largeur à l'émetteur",unevenHaze:"Brume irrégulière",howUnevenlyTheHazeItCrosses:"À quel point la brume qu'il traverse est inégale : vu de côté, le faisceau est plus brillant là où il traverse une poche plus dense, les poches dérivant avec le vent. 0 est une brume égale ; la valeur par défaut est jugée sur des photographies, pas mesurée.",itsColour532ForTheGreen:"Sa couleur : 532 pour le vert d'un laser doublé en fréquence, 520 pour une diode verte, 638 pour une rouge, 450 pour une bleue.",theOpticalPowerItCarriesIts:"La puissance optique qu'il porte, sa moyenne pour un laser pulsé, dont aucun œil ne distingue les impulsions. Ce qui s'en voit est ce que l'air en diffuse.",wavelength:"Longueur d'onde",power:"Puissance",time:"Instant",secondsOfTheRecording:"Secondes de l'enregistrement.",onFrom:"Allumé à",secondsOfTheRecordingEmptyFrom:"Secondes de l'enregistrement ; vide, dès son début.",offAt:"Éteint à",secondsOfTheRecordingEmptyUntil:"Secondes de l'enregistrement ; vide, jusqu'à sa fin.",pathAtAnInstant:"Trajet à un instant",pointOfThePath:"Point du trajet",position:"Position",altitude:"Altitude",aboveTheSeaNotTheGround:"Au-dessus de la mer, pas du sol : un émetteur à une fenêtre à douze mètres de haut, sur un sol à 160 m, est à 172 m."};export{e as beamParameterTexts_fr};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={light:"Luce",beam:"Fascio",when:"Quando",name:"Nome",divergence:"Divergenza",howFastItWidensFullAngle:"Quanto in fretta si allarga, angolo totale: 0,1 mrad è un metro di larghezza a 10 km.",widthAtTheEmitter:"Larghezza all'emettitore",unevenHaze:"Foschia irregolare",howUnevenlyTheHazeItCrosses:"Quanto è irregolare la foschia che attraversa: visto di lato, il fascio è più brillante dove attraversa una sacca più densa, e le sacche derivano col vento. 0 è una foschia uniforme; il valore predefinito è giudicato su fotografie, non misurato.",itsColour532ForTheGreen:"Il suo colore: 532 per il verde di un laser a frequenza raddoppiata, 520 per un diodo verde, 638 per uno rosso, 450 per uno blu.",theOpticalPowerItCarriesIts:"La potenza ottica che porta, la sua media per un laser pulsato, i cui impulsi nessun occhio distingue. Ciò che se ne vede è ciò che l'aria diffonde.",wavelength:"Lunghezza d'onda",power:"Potenza",time:"Istante",secondsOfTheRecording:"Secondi della registrazione.",onFrom:"Acceso a",secondsOfTheRecordingEmptyFrom:"Secondi della registrazione; vuoto, dal suo inizio.",offAt:"Spento a",secondsOfTheRecordingEmptyUntil:"Secondi della registrazione; vuoto, fino alla sua fine.",pathAtAnInstant:"Percorso a un istante",pointOfThePath:"Punto del percorso",position:"Posizione",altitude:"Altitudine",aboveTheSeaNotTheGround:"Sul mare, non sul suolo: un emettitore a una finestra a dodici metri d'altezza, su un suolo a 160 m, è a 172 m."};export{e as beamParameterTexts_it};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{G as W,B as X,h as N,d as m,H as v,J as k,O as D}from"./rr0-scene.mjs";import{L as S}from"./LaserBeam-
|
|
1
|
+
import{G as W,B as X,h as N,d as m,H as v,J as k,O as D}from"./rr0-scene.mjs";import{L as S}from"./LaserBeam-DXZysEYv.js";class x{static MAX_SEGMENTS=12e3;static MIN_PIXELS=2;static VERTICES_PER_SEGMENT=24;static HALO_RAD=.002;static HALO_SHARE=.15;static BRIGHTEST_RELATIVE=6e4;group=new W;mesh;positions=new Float32Array(x.MAX_SEGMENTS*x.VERTICES_PER_SEGMENT*3);colors=new Float32Array(x.MAX_SEGMENTS*x.VERTICES_PER_SEGMENT*3);segments=0;drawn=[];cut;constructor(){const s=new X;s.setAttribute("position",new N(this.positions,3)),s.setAttribute("color",new N(this.colors,3)),s.setDrawRange(0,0),this.mesh=new m(s,new v({vertexColors:!0,transparent:!0,blending:D,depthWrite:!1,fog:!1,side:k})),this.mesh.frustumCulled=!1,this.mesh.renderOrder=8,this.mesh.name="beams",this.group.name="beams",this.group.add(this.mesh)}get segmentCount(){return this.segments}get object(){return this.group}get drawnCount(){return this.segments}pick(s,t,e){return this.pickAt(s,t,e.toleranceRad)}update(s,t,e){const l=this.viewsOf(s,t,e);let r=0;this.segments=0,this.drawn=[];for(const h of l){const c=S.colourOf(h.wavelengthNm),i=this.place(h,t,e);this.drawn.push({id:h.id,points:i});for(let y=0;y+1<i.length&&!(this.segments>=x.MAX_SEGMENTS);y++){const E=this.pushSegment(r,i[y],i[y+1],h.wavelengthNm,c,e);E>r&&this.segments++,r=E}}const o=this.mesh.geometry;o.setDrawRange(0,r);for(const h of["position","color"]){const c=o.getAttribute(h);c.clearUpdateRanges(),r>0&&c.addUpdateRange(0,r*3),c.needsUpdate=!0}}viewsOf(s,t,e){const{lat:l,lng:r}=e.reference;(!this.cut||this.cut.lat!==l||this.cut.lng!==r||this.cut.air!==e.air)&&(this.cut={lat:l,lng:r,air:e.air,views:new Map});const o=this.cut.views,h=new Set(s);return S.onAt(s,t).map(c=>{if(!h.has(c))return S.viewOf(c,e.reference,e.air);let i=o.get(c);return i||o.set(c,i=S.viewOf(c,e.reference,e.air)),i})}place(s,t,e){const l=[],r=e.wind??{eastMS:0,northMS:0};for(const o of s.samples){const h=e.origin.x+o.eastM*e.eastScale,c=e.origin.z-o.northM,i=o.upM-e.siteElevationM;if(l.length>0&&i<e.groundYAt(h,c))break;const y=r.eastMS*o.dirEast+r.northMS*o.dirNorth,E=r.eastMS*o.dirNorth-r.northMS*o.dirEast,g=S.patchAt(o.fromSourceM,t,{windAlongMS:y,windAcrossMS:E,patchiness:s.patchiness});l.push({x:h,y:i,z:c,altitudeM:o.altitudeM,widthM:o.widthM,powerW:o.powerW,haze:g})}return l}static SMOOTH_RATIO=1.08;static MAX_HALVINGS=6;pushSegment(s,t,e,l,r,o,h=0){const c={x:e.x-t.x,y:e.y-t.y,z:e.z-t.z},i=Math.hypot(c.x,c.y,c.z);if(i<1e-6)return s;const y={x:c.x/i,y:c.y/i,z:c.z/i};if(Math.hypot((t.x+e.x)/2-o.eye.x,(t.y+e.y)/2-o.eye.y,(t.z+e.z)/2-o.eye.z)<.001)return s;const E=n=>{const u={x:o.eye.x-n.x,y:o.eye.y-n.y,z:o.eye.z-n.z},z=Math.hypot(u.x,u.y,u.z)||.001,d=(y.x*u.x+y.y*u.y+y.z*u.z)/z,a=Math.sqrt(Math.max(0,1-d*d)),w=S.coefficientsAt(o.air,l,n.altitudeM),p=S.phasedScattering({...w,aerosolPerM:w.aerosolPerM*n.haze},d);return{sinTurn:a,scattered:p,through:o.transmittanceTo(n.x,n.y,n.z)}},g=n=>x.MIN_PIXELS*o.pixelRad*Math.hypot(n.x-o.eye.x,n.y-o.eye.y,n.z-o.eye.z),H=n=>Math.hypot(n.x-o.eye.x,n.y-o.eye.y,n.z-o.eye.z),R=n=>Math.max(n.widthM,x.HALO_RAD*H(n)),f=n=>{const u=R(n)/g(n),z=Math.min(1,Math.max(0,u-1));return x.HALO_SHARE*z*z*(3-2*z)},O=new Map([t,e].map(n=>[n,E(n)])),M=(n,u,z)=>{const d=Math.max(u,g(n)),{sinTurn:a,scattered:w,through:p}=O.get(n),I=2*z*S.luminanceCdM2(n.powerW,l,w,d,a),L=r.map((C,V)=>Math.min(x.BRIGHTEST_RELATIVE,I*o.relativeScale*C*p[V])),_={x:o.eye.x-n.x,y:o.eye.y-n.y,z:o.eye.z-n.z},P=this.normalise(this.cross(y,_));return{point:n,half:d/2,level:L,across:P}},A=[[M(t,t.widthM,1-f(t)),M(e,e.widthM,1-f(e))],[M(t,R(t),f(t)),M(e,R(e),f(e))]],[G,T]=A[0].map(n=>Math.max(...n.level));if(h<x.MAX_HALVINGS&&Math.max(G,T)>x.SMOOTH_RATIO*Math.max(Math.min(G,T),1e-12)){const n={x:(t.x+e.x)/2,y:(t.y+e.y)/2,z:(t.z+e.z)/2,altitudeM:(t.altitudeM+e.altitudeM)/2,widthM:(t.widthM+e.widthM)/2,powerW:Math.sqrt(t.powerW*e.powerW),haze:(t.haze+e.haze)/2};return this.pushSegment(this.pushSegment(s,t,n,l,r,o,h+1),n,e,l,r,o,h+1)}if((s+x.VERTICES_PER_SEGMENT)*3>this.positions.length)return s;for(const n of A){if(n.every(a=>Math.max(...a.level)<=0))continue;const u=(a,w)=>{const p=s*3;this.positions[p]=a.point.x+a.across.x*a.half*w,this.positions[p+1]=a.point.y+a.across.y*a.half*w,this.positions[p+2]=a.point.z+a.across.z*a.half*w;const I=w===0?1:0;this.colors[p]=a.level[0]*I,this.colors[p+1]=a.level[1]*I,this.colors[p+2]=a.level[2]*I,s++},[z,d]=n;for(const a of[-1,1])u(z,a),u(z,0),u(d,a),u(z,0),u(d,0),u(d,a)}return s}pickAt(s,t,e){let l;for(const r of this.drawn)for(let o=0;o+1<r.points.length;o++){const h=r.points[o],c=r.points[o+1],i={x:c.x-h.x,y:c.y-h.y,z:c.z-h.z},y={x:h.x-s.x,y:h.y-s.y,z:h.z-s.z},E=i.x*i.x+i.y*i.y+i.z*i.z,g=i.x*t.x+i.y*t.y+i.z*t.z,H=i.x*y.x+i.y*y.y+i.z*y.z,R=t.x*y.x+t.y*y.y+t.z*y.z,f=E-g*g,O=f>1e-9?Math.min(1,Math.max(0,(g*R-H)/f)):0,M={x:h.x+i.x*O,y:h.y+i.y*O,z:h.z+i.z*O},A=(M.x-s.x)*t.x+(M.y-s.y)*t.y+(M.z-s.z)*t.z;if(A<=0)continue;const G=Math.hypot(M.x-s.x-t.x*A,M.y-s.y-t.y*A,M.z-s.z-t.z*A),T=Math.atan2(G,A);T<=e&&(!l||T<l.angle)&&(l={id:r.id,distanceM:Math.hypot(M.x-s.x,M.y-s.y,M.z-s.z),angle:T})}return l&&{id:l.id,distanceM:l.distanceM}}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(){this.mesh.geometry.dispose(),this.mesh.material.dispose(),this.group.removeFromParent()}}export{x as BeamSystem};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={title:"Decoy flares"};export{e as flareKindMessages_en};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={title:"Bengalas señuelo"};export{e as flareKindMessages_es};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={title:"Leurres pyrotechniques"};export{e as flareKindMessages_fr};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={title:"Bengala esca"};export{e as flareKindMessages_it};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a6 as Le,a7 as Q,a8 as he,a9 as Me,aa as v,ab as de,c as w,V as pe,C as F,ac as N,X as U,K as Se,ad as ye,ae as we,v as K,af as Ne,o as C,ag as me,ah as be,a1 as ge,ai as Ie,aj as Oe,h as V,ak as Ce,al as Te,am as Fe,an as Pe,ao as He,Y as J,ap as Re,aq as Z,ar as ke,as as De,P as Ge,at as X,au as ve,e as Ee,J as Ue,H as G,av as Ke,B as Be,aw as je,d as Ve,ax as Xe,ay as ze,az as qe,x as We,G as z,aA as Ye,w as Qe,aB as Je,aC as Ze,aD as $e,aE as en,aF as nn,aG as tn,aH as xe,k as sn,Q as ne,aI as te,aJ as se,aK as ie,aL as re,aM as rn,aN as on,m as an,n as cn}from"./rr0-scene.mjs";function oe(f,n){if(n===Le)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),f;if(n===Q||n===he){let e=f.getIndex();if(e===null){const r=[],a=f.getAttribute("position");if(a!==void 0){for(let o=0;o<a.count;o++)r.push(o);f.setIndex(r),e=f.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),f}const s=e.count-2,t=[];if(n===Q)for(let r=1;r<=s;r++)t.push(e.getX(0)),t.push(e.getX(r)),t.push(e.getX(r+1));else for(let r=0;r<s;r++)r%2===0?(t.push(e.getX(r)),t.push(e.getX(r+1)),t.push(e.getX(r+2))):(t.push(e.getX(r+2)),t.push(e.getX(r+1)),t.push(e.getX(r)));t.length/3!==s&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const i=f.clone();return i.setIndex(t),i.clearGroups(),i}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",n),f}class jn extends Me{constructor(n){super(n),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(e){return new dn(e)}),this.register(function(e){return new pn(e)}),this.register(function(e){return new Ln(e)}),this.register(function(e){return new Mn(e)}),this.register(function(e){return new Sn(e)}),this.register(function(e){return new gn(e)}),this.register(function(e){return new Tn(e)}),this.register(function(e){return new Rn(e)}),this.register(function(e){return new En(e)}),this.register(function(e){return new hn(e)}),this.register(function(e){return new xn(e)}),this.register(function(e){return new mn(e)}),this.register(function(e){return new _n(e)}),this.register(function(e){return new An(e)}),this.register(function(e){return new ln(e)}),this.register(function(e){return new ae(e,g.EXT_MESHOPT_COMPRESSION)}),this.register(function(e){return new ae(e,g.KHR_MESHOPT_COMPRESSION)}),this.register(function(e){return new yn(e)})}load(n,e,s,t){const i=this;let r;if(this.resourcePath!=="")r=this.resourcePath;else if(this.path!==""){const c=v.extractUrlBase(n);r=v.resolveURL(c,this.path)}else r=v.extractUrlBase(n);this.manager.itemStart(n);const a=function(c){t?t(c):console.error(c),i.manager.itemError(n),i.manager.itemEnd(n)},o=new de(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(n,function(c){try{i.parse(c,r,function(u){e(u),i.manager.itemEnd(n)},a)}catch(u){a(u)}},s,a)}setDRACOLoader(n){return this.dracoLoader=n,this}setKTX2Loader(n){return this.ktx2Loader=n,this}setMeshoptDecoder(n){return this.meshoptDecoder=n,this}register(n){return this.pluginCallbacks.indexOf(n)===-1&&this.pluginCallbacks.push(n),this}unregister(n){return this.pluginCallbacks.indexOf(n)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(n),1),this}parse(n,e,s,t){let i;const r={},a={},o=new TextDecoder;if(typeof n=="string")i=JSON.parse(n);else if(n instanceof ArrayBuffer)if(o.decode(new Uint8Array(n,0,4))===Ae){try{r[g.KHR_BINARY_GLTF]=new wn(n)}catch(l){t&&t(l);return}i=JSON.parse(r[g.KHR_BINARY_GLTF].content)}else i=JSON.parse(o.decode(n));else i=n;if(i.asset===void 0||i.asset.version[0]<2){t&&t(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const c=new Un(i,{path:e||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let u=0;u<this.pluginCallbacks.length;u++){const l=this.pluginCallbacks[u](c);l.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[l.name]=l,r[l.name]=!0}if(i.extensionsUsed)for(let u=0;u<i.extensionsUsed.length;++u){const l=i.extensionsUsed[u],h=i.extensionsRequired||[];switch(l){case g.KHR_MATERIALS_UNLIT:r[l]=new fn;break;case g.KHR_DRACO_MESH_COMPRESSION:r[l]=new Nn(i,this.dracoLoader);break;case g.KHR_TEXTURE_TRANSFORM:r[l]=new bn;break;case g.KHR_MESH_QUANTIZATION:r[l]=new In;break;default:h.indexOf(l)>=0&&a[l]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+l+'".')}}c.setExtensions(r),c.setPlugins(a),c.parse(s,t)}parseAsync(n,e){const s=this;return new Promise(function(t,i){s.parse(n,e,t,i)})}}function un(){let f={};return{get:function(n){return f[n]},add:function(n,e){f[n]=e},remove:function(n){delete f[n]},removeAll:function(){f={}}}}function _(f,n,e){const s=f.json.materials[n];return s.extensions&&s.extensions[e]?s.extensions[e]:null}const g={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",KHR_MESHOPT_COMPRESSION:"KHR_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class ln{constructor(n){this.parser=n,this.name=g.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const n=this.parser,e=this.parser.json.nodes||[];for(let s=0,t=e.length;s<t;s++){const i=e[s];i.extensions&&i.extensions[this.name]&&i.extensions[this.name].light!==void 0&&n._addNodeRef(this.cache,i.extensions[this.name].light)}}_loadLight(n){const e=this.parser,s="light:"+n;let t=e.cache.get(s);if(t)return t;const i=e.json,o=((i.extensions&&i.extensions[this.name]||{}).lights||[])[n];let c;const u=new F(16777215);o.color!==void 0&&u.setRGB(o.color[0],o.color[1],o.color[2],N);const l=o.range!==void 0?o.range:0;switch(o.type){case"directional":c=new we(u),c.target.position.set(0,0,-1),c.add(c.target);break;case"point":c=new ye(u),c.distance=l;break;case"spot":c=new Se(u),c.distance=l,o.spot=o.spot||{},o.spot.innerConeAngle=o.spot.innerConeAngle!==void 0?o.spot.innerConeAngle:0,o.spot.outerConeAngle=o.spot.outerConeAngle!==void 0?o.spot.outerConeAngle:Math.PI/4,c.angle=o.spot.outerConeAngle,c.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,c.target.position.set(0,0,-1),c.add(c.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+o.type)}return c.position.set(0,0,0),y(c,o),o.intensity!==void 0&&(c.intensity=o.intensity),c.name=e.createUniqueName(o.name||"light_"+n),t=Promise.resolve(c),e.cache.add(s,t),t}getDependency(n,e){if(n==="light")return this._loadLight(e)}createNodeAttachment(n){const e=this,s=this.parser,i=s.json.nodes[n],a=(i.extensions&&i.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(o){return s._getNodeRef(e.cache,a,o)})}}class fn{constructor(){this.name=g.KHR_MATERIALS_UNLIT}getMaterialType(){return G}extendParams(n,e,s){const t=[];n.color=new F(1,1,1),n.opacity=1;const i=e.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){const r=i.baseColorFactor;n.color.setRGB(r[0],r[1],r[2],N),n.opacity=r[3]}i.baseColorTexture!==void 0&&t.push(s.assignTexture(n,"map",i.baseColorTexture,U))}return Promise.all(t)}}class hn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);return s===null||s.emissiveStrength!==void 0&&(e.emissiveIntensity=s.emissiveStrength),Promise.resolve()}}class dn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_CLEARCOAT}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];if(s.clearcoatFactor!==void 0&&(e.clearcoat=s.clearcoatFactor),s.clearcoatTexture!==void 0&&t.push(this.parser.assignTexture(e,"clearcoatMap",s.clearcoatTexture)),s.clearcoatRoughnessFactor!==void 0&&(e.clearcoatRoughness=s.clearcoatRoughnessFactor),s.clearcoatRoughnessTexture!==void 0&&t.push(this.parser.assignTexture(e,"clearcoatRoughnessMap",s.clearcoatRoughnessTexture)),s.clearcoatNormalTexture!==void 0&&(t.push(this.parser.assignTexture(e,"clearcoatNormalMap",s.clearcoatNormalTexture)),s.clearcoatNormalTexture.scale!==void 0)){const i=s.clearcoatNormalTexture.scale;e.clearcoatNormalScale=new pe(i,i)}return Promise.all(t)}}class pn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_DISPERSION}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);return s===null||(e.dispersion=s.dispersion!==void 0?s.dispersion:0),Promise.resolve()}}class mn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_IRIDESCENCE}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return s.iridescenceFactor!==void 0&&(e.iridescence=s.iridescenceFactor),s.iridescenceTexture!==void 0&&t.push(this.parser.assignTexture(e,"iridescenceMap",s.iridescenceTexture)),s.iridescenceIor!==void 0&&(e.iridescenceIOR=s.iridescenceIor),e.iridescenceThicknessRange===void 0&&(e.iridescenceThicknessRange=[100,400]),s.iridescenceThicknessMinimum!==void 0&&(e.iridescenceThicknessRange[0]=s.iridescenceThicknessMinimum),s.iridescenceThicknessMaximum!==void 0&&(e.iridescenceThicknessRange[1]=s.iridescenceThicknessMaximum),s.iridescenceThicknessTexture!==void 0&&t.push(this.parser.assignTexture(e,"iridescenceThicknessMap",s.iridescenceThicknessTexture)),Promise.all(t)}}class gn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_SHEEN}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];if(e.sheenColor=new F(0,0,0),e.sheenRoughness=0,e.sheen=1,s.sheenColorFactor!==void 0){const i=s.sheenColorFactor;e.sheenColor.setRGB(i[0],i[1],i[2],N)}return s.sheenRoughnessFactor!==void 0&&(e.sheenRoughness=s.sheenRoughnessFactor),s.sheenColorTexture!==void 0&&t.push(this.parser.assignTexture(e,"sheenColorMap",s.sheenColorTexture,U)),s.sheenRoughnessTexture!==void 0&&t.push(this.parser.assignTexture(e,"sheenRoughnessMap",s.sheenRoughnessTexture)),Promise.all(t)}}class Tn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_TRANSMISSION}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return s.transmissionFactor!==void 0&&(e.transmission=s.transmissionFactor),s.transmissionTexture!==void 0&&t.push(this.parser.assignTexture(e,"transmissionMap",s.transmissionTexture)),Promise.all(t)}}class Rn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_VOLUME}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];e.thickness=s.thicknessFactor!==void 0?s.thicknessFactor:0,s.thicknessTexture!==void 0&&t.push(this.parser.assignTexture(e,"thicknessMap",s.thicknessTexture)),e.attenuationDistance=s.attenuationDistance||1/0;const i=s.attenuationColor||[1,1,1];return e.attenuationColor=new F().setRGB(i[0],i[1],i[2],N),Promise.all(t)}}class En{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_IOR}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);return s===null||(e.ior=s.ior!==void 0?s.ior:1.5,e.ior===0&&(e.ior=1e3)),Promise.resolve()}}class xn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_SPECULAR}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];e.specularIntensity=s.specularFactor!==void 0?s.specularFactor:1,s.specularTexture!==void 0&&t.push(this.parser.assignTexture(e,"specularIntensityMap",s.specularTexture));const i=s.specularColorFactor||[1,1,1];return e.specularColor=new F().setRGB(i[0],i[1],i[2],N),s.specularColorTexture!==void 0&&t.push(this.parser.assignTexture(e,"specularColorMap",s.specularColorTexture,U)),Promise.all(t)}}class An{constructor(n){this.parser=n,this.name=g.EXT_MATERIALS_BUMP}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return e.bumpScale=s.bumpFactor!==void 0?s.bumpFactor:1,s.bumpTexture!==void 0&&t.push(this.parser.assignTexture(e,"bumpMap",s.bumpTexture)),Promise.all(t)}}class _n{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_ANISOTROPY}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return s.anisotropyStrength!==void 0&&(e.anisotropy=s.anisotropyStrength),s.anisotropyRotation!==void 0&&(e.anisotropyRotation=s.anisotropyRotation),s.anisotropyTexture!==void 0&&t.push(this.parser.assignTexture(e,"anisotropyMap",s.anisotropyTexture)),Promise.all(t)}}class Ln{constructor(n){this.parser=n,this.name=g.KHR_TEXTURE_BASISU}loadTexture(n){const e=this.parser,s=e.json,t=s.textures[n];if(!t.extensions||!t.extensions[this.name])return null;const i=t.extensions[this.name],r=e.options.ktx2Loader;if(!r){if(s.extensionsRequired&&s.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return e.loadTextureImage(n,i.source,r)}}class Mn{constructor(n){this.parser=n,this.name=g.EXT_TEXTURE_WEBP}loadTexture(n){const e=this.name,s=this.parser,t=s.json,i=t.textures[n];if(!i.extensions||!i.extensions[e])return null;const r=i.extensions[e],a=t.images[r.source];let o=s.textureLoader;if(a.uri){const c=s.options.manager.getHandler(a.uri);c!==null&&(o=c)}return s.loadTextureImage(n,r.source,o)}}class Sn{constructor(n){this.parser=n,this.name=g.EXT_TEXTURE_AVIF}loadTexture(n){const e=this.name,s=this.parser,t=s.json,i=t.textures[n];if(!i.extensions||!i.extensions[e])return null;const r=i.extensions[e],a=t.images[r.source];let o=s.textureLoader;if(a.uri){const c=s.options.manager.getHandler(a.uri);c!==null&&(o=c)}return s.loadTextureImage(n,r.source,o)}}class ae{constructor(n,e){this.name=e,this.parser=n}loadBufferView(n){const e=this.parser.json,s=e.bufferViews[n];if(s.extensions&&s.extensions[this.name]){const t=s.extensions[this.name],i=this.parser.getDependency("buffer",t.buffer),r=this.parser.options.meshoptDecoder;if(!r||!r.supported){if(e.extensionsRequired&&e.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return i.then(function(a){const o=t.byteOffset||0,c=t.byteLength||0,u=t.count,l=t.byteStride,h=new Uint8Array(a,o,c);return r.decodeGltfBufferAsync?r.decodeGltfBufferAsync(u,l,h,t.mode,t.filter).then(function(d){return d.buffer}):r.ready.then(function(){const d=new ArrayBuffer(u*l);return r.decodeGltfBuffer(new Uint8Array(d),u,l,h,t.mode,t.filter),d})})}else return null}}class yn{constructor(n){this.name=g.EXT_MESH_GPU_INSTANCING,this.parser=n}createNodeMesh(n){const e=this.parser.json,s=e.nodes[n];if(!s.extensions||!s.extensions[this.name]||s.mesh===void 0)return null;const t=e.meshes[s.mesh];for(const c of t.primitives)if(c.mode!==M.TRIANGLES&&c.mode!==M.TRIANGLE_STRIP&&c.mode!==M.TRIANGLE_FAN&&c.mode!==void 0)return null;const r=s.extensions[this.name].attributes,a=[],o={};for(const c in r)a.push(this.parser.getDependency("accessor",r[c]).then(u=>(o[c]=u,o[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(n)),Promise.all(a).then(c=>{const u=c.pop(),l=u.isGroup?u.children:[u],h=c[0].count,d=[];for(const p of l){const R=new K,m=new C,T=new me,A=new C(1,1,1),x=new Ne(p.geometry,p.material,h);for(let E=0;E<h;E++)o.TRANSLATION&&m.fromBufferAttribute(o.TRANSLATION,E),o.ROTATION&&T.fromBufferAttribute(o.ROTATION,E),o.SCALE&&A.fromBufferAttribute(o.SCALE,E),x.setMatrixAt(E,R.compose(m,T,A));for(const E in o)if(E==="_COLOR_0"){const L=o[E];x.instanceColor=new be(L.array,L.itemSize,L.normalized)}else E!=="TRANSLATION"&&E!=="ROTATION"&&E!=="SCALE"&&p.geometry.setAttribute(E,o[E]);ge.prototype.copy.call(x,p),this.parser.assignFinalMaterial(x),d.push(x)}return u.isGroup?(u.clear(),u.add(...d),u):d[0]}))}}const Ae="glTF",D=12,ce={JSON:1313821514,BIN:5130562};class wn{constructor(n){this.name=g.KHR_BINARY_GLTF,this.content=null,this.body=null;const e=new DataView(n,0,D),s=new TextDecoder;if(this.header={magic:s.decode(new Uint8Array(n.slice(0,4))),version:e.getUint32(4,!0),length:e.getUint32(8,!0)},this.header.magic!==Ae)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const t=this.header.length-D,i=new DataView(n,D);let r=0;for(;r<t;){const a=i.getUint32(r,!0);r+=4;const o=i.getUint32(r,!0);if(r+=4,o===ce.JSON){const c=new Uint8Array(n,D+r,a);this.content=s.decode(c)}else if(o===ce.BIN){const c=D+r;this.body=n.slice(c,c+a)}r+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class Nn{constructor(n,e){if(!e)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=g.KHR_DRACO_MESH_COMPRESSION,this.json=n,this.dracoLoader=e,this.dracoLoader.preload()}decodePrimitive(n,e){const s=this.json,t=this.dracoLoader,i=n.extensions[this.name].bufferView,r=n.extensions[this.name].attributes,a={},o={},c={};for(const u in r){const l=$[u]||u.toLowerCase();a[l]=r[u]}for(const u in n.attributes){const l=$[u]||u.toLowerCase();if(r[u]!==void 0){const h=s.accessors[n.attributes[u]],d=H[h.componentType];c[l]=d.name,o[l]=h.normalized===!0}}return e.getDependency("bufferView",i).then(function(u){return new Promise(function(l,h){t.decodeDracoFile(u,function(d){for(const p in d.attributes){const R=d.attributes[p],m=o[p];m!==void 0&&(R.normalized=m)}l(d)},a,c,N,h)})})}}class bn{constructor(){this.name=g.KHR_TEXTURE_TRANSFORM}extendTexture(n,e){return(e.texCoord===void 0||e.texCoord===n.channel)&&e.offset===void 0&&e.rotation===void 0&&e.scale===void 0||(n=n.clone(),e.texCoord!==void 0&&(n.channel=e.texCoord),e.offset!==void 0&&n.offset.fromArray(e.offset),e.rotation!==void 0&&(n.rotation=e.rotation),e.scale!==void 0&&n.repeat.fromArray(e.scale),n.needsUpdate=!0),n}}class In{constructor(){this.name=g.KHR_MESH_QUANTIZATION}}class _e extends on{constructor(n,e,s,t){super(n,e,s,t)}copySampleValue_(n){const e=this.resultBuffer,s=this.sampleValues,t=this.valueSize,i=n*t*3+t;for(let r=0;r!==t;r++)e[r]=s[i+r];return e}interpolate_(n,e,s,t){const i=this.resultBuffer,r=this.sampleValues,a=this.valueSize,o=a*2,c=a*3,u=t-e,l=(s-e)/u,h=l*l,d=h*l,p=n*c,R=p-c,m=-2*d+3*h,T=d-h,A=1-m,x=T-h+l;for(let E=0;E!==a;E++){const L=r[R+E+a],b=r[R+E+o]*u,S=r[p+E+a],k=r[p+E]*u;i[E]=A*L+x*b+m*S+T*k}return i}}const On=new me;class Cn extends _e{interpolate_(n,e,s,t){const i=super.interpolate_(n,e,s,t);return On.fromArray(i).normalize().toArray(i),i}}const M={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},H={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},ue={9728:Re,9729:J,9984:He,9985:Pe,9986:Fe,9987:Te},le={33071:De,33648:ke,10497:Z},q={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},$={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},I={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Fn={CUBICSPLINE:void 0,LINEAR:xe,STEP:tn},W={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function Pn(f){return f.DefaultMaterial===void 0&&(f.DefaultMaterial=new Ee({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:rn})),f.DefaultMaterial}function O(f,n,e){for(const s in e.extensions)f[s]===void 0&&(n.userData.gltfExtensions=n.userData.gltfExtensions||{},n.userData.gltfExtensions[s]=e.extensions[s])}function y(f,n){n.extras!==void 0&&(typeof n.extras=="object"?Object.assign(f.userData,n.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+n.extras))}function Hn(f,n,e){let s=!1,t=!1,i=!1;for(let c=0,u=n.length;c<u;c++){const l=n[c];if(l.POSITION!==void 0&&(s=!0),l.NORMAL!==void 0&&(t=!0),l.COLOR_0!==void 0&&(i=!0),s&&t&&i)break}if(!s&&!t&&!i)return Promise.resolve(f);const r=[],a=[],o=[];for(let c=0,u=n.length;c<u;c++){const l=n[c];if(s){const h=l.POSITION!==void 0?e.getDependency("accessor",l.POSITION):f.attributes.position;r.push(h)}if(t){const h=l.NORMAL!==void 0?e.getDependency("accessor",l.NORMAL):f.attributes.normal;a.push(h)}if(i){const h=l.COLOR_0!==void 0?e.getDependency("accessor",l.COLOR_0):f.attributes.color;o.push(h)}}return Promise.all([Promise.all(r),Promise.all(a),Promise.all(o)]).then(function(c){const u=c[0],l=c[1],h=c[2];return s&&(f.morphAttributes.position=u),t&&(f.morphAttributes.normal=l),i&&(f.morphAttributes.color=h),f.morphTargetsRelative=!0,f})}function kn(f,n){if(f.updateMorphTargets(),n.weights!==void 0)for(let e=0,s=n.weights.length;e<s;e++)f.morphTargetInfluences[e]=n.weights[e];if(n.extras&&Array.isArray(n.extras.targetNames)){const e=n.extras.targetNames;if(f.morphTargetInfluences.length===e.length){f.morphTargetDictionary={};for(let s=0,t=e.length;s<t;s++)f.morphTargetDictionary[e[s]]=s}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Dn(f){let n;const e=f.extensions&&f.extensions[g.KHR_DRACO_MESH_COMPRESSION];if(e?n="draco:"+e.bufferView+":"+e.indices+":"+Y(e.attributes):n=f.indices+":"+Y(f.attributes)+":"+f.mode,f.targets!==void 0)for(let s=0,t=f.targets.length;s<t;s++)n+=":"+Y(f.targets[s]);return n}function Y(f){let n="";const e=Object.keys(f).sort();for(let s=0,t=e.length;s<t;s++)n+=e[s]+":"+f[e[s]]+";";return n}function ee(f){switch(f){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function Gn(f){return f.search(/\.jpe?g($|\?)/i)>0||f.search(/^data\:image\/jpeg/)===0?"image/jpeg":f.search(/\.webp($|\?)/i)>0||f.search(/^data\:image\/webp/)===0?"image/webp":f.search(/\.ktx2($|\?)/i)>0||f.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const vn=new K;class Un{constructor(n={},e={}){this.json=n,this.extensions={},this.plugins={},this.options=e,this.cache=new un,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let s=!1,t=-1,i=!1,r=-1;if(typeof navigator<"u"&&typeof navigator.userAgent<"u"){const a=navigator.userAgent;s=/^((?!chrome|android).)*safari/i.test(a)===!0;const o=a.match(/Version\/(\d+)/);t=s&&o?parseInt(o[1],10):-1,i=a.indexOf("Firefox")>-1,r=i?a.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||s&&t<17||i&&r<98?this.textureLoader=new Ie(this.options.manager):this.textureLoader=new Oe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new de(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(n){this.extensions=n}setPlugins(n){this.plugins=n}parse(n,e){const s=this,t=this.json,i=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(r){return r._markDefs&&r._markDefs()}),Promise.all(this._invokeAll(function(r){return r.beforeRoot&&r.beforeRoot()})).then(function(){return Promise.all([s.getDependencies("scene"),s.getDependencies("animation"),s.getDependencies("camera")])}).then(function(r){const a={scene:r[0][t.scene||0],scenes:r[0],animations:r[1],cameras:r[2],asset:t.asset,parser:s,userData:{}};return O(i,a,t),y(a,t),Promise.all(s._invokeAll(function(o){return o.afterRoot&&o.afterRoot(a)})).then(function(){for(const o of a.scenes)o.updateMatrixWorld();n(a)})}).catch(e)}_markDefs(){const n=this.json.nodes||[],e=this.json.skins||[],s=this.json.meshes||[];for(let t=0,i=e.length;t<i;t++){const r=e[t].joints;for(let a=0,o=r.length;a<o;a++)n[r[a]].isBone=!0}for(let t=0,i=n.length;t<i;t++){const r=n[t];r.mesh!==void 0&&(this._addNodeRef(this.meshCache,r.mesh),r.skin!==void 0&&(s[r.mesh].isSkinnedMesh=!0)),r.camera!==void 0&&this._addNodeRef(this.cameraCache,r.camera)}}_addNodeRef(n,e){e!==void 0&&(n.refs[e]===void 0&&(n.refs[e]=n.uses[e]=0),n.refs[e]++)}_getNodeRef(n,e,s){if(n.refs[e]<=1)return s;const t=s.clone(),i=(r,a)=>{const o=this.associations.get(r);o!=null&&this.associations.set(a,o);for(const[c,u]of r.children.entries())i(u,a.children[c])};return i(s,t),t.name+="_instance_"+n.uses[e]++,t}_invokeOne(n){const e=Object.values(this.plugins);e.push(this);for(let s=0;s<e.length;s++){const t=n(e[s]);if(t)return t}return null}_invokeAll(n){const e=Object.values(this.plugins);e.unshift(this);const s=[];for(let t=0;t<e.length;t++){const i=n(e[t]);i&&s.push(i)}return s}getDependency(n,e){const s=n+":"+e;let t=this.cache.get(s);if(!t){switch(n){case"scene":t=this.loadScene(e);break;case"node":t=this._invokeOne(function(i){return i.loadNode&&i.loadNode(e)});break;case"mesh":t=this._invokeOne(function(i){return i.loadMesh&&i.loadMesh(e)});break;case"accessor":t=this.loadAccessor(e);break;case"bufferView":t=this._invokeOne(function(i){return i.loadBufferView&&i.loadBufferView(e)});break;case"buffer":t=this.loadBuffer(e);break;case"material":t=this._invokeOne(function(i){return i.loadMaterial&&i.loadMaterial(e)});break;case"texture":t=this._invokeOne(function(i){return i.loadTexture&&i.loadTexture(e)});break;case"skin":t=this.loadSkin(e);break;case"animation":t=this._invokeOne(function(i){return i.loadAnimation&&i.loadAnimation(e)});break;case"camera":t=this.loadCamera(e);break;default:if(t=this._invokeOne(function(i){return i!=this&&i.getDependency&&i.getDependency(n,e)}),!t)throw new Error("Unknown type: "+n);break}this.cache.add(s,t)}return t}getDependencies(n){let e=this.cache.get(n);if(!e){const s=this,t=this.json[n+(n==="mesh"?"es":"s")]||[];e=Promise.all(t.map(function(i,r){return s.getDependency(n,r)})),this.cache.add(n,e)}return e}loadBuffer(n){const e=this.json.buffers[n],s=this.fileLoader;if(e.type&&e.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+e.type+" buffer type is not supported.");if(e.uri===void 0&&n===0)return Promise.resolve(this.extensions[g.KHR_BINARY_GLTF].body);const t=this.options;return new Promise(function(i,r){s.load(v.resolveURL(e.uri,t.path),i,void 0,function(){r(new Error('THREE.GLTFLoader: Failed to load buffer "'+e.uri+'".'))})})}loadBufferView(n){const e=this.json.bufferViews[n];return this.getDependency("buffer",e.buffer).then(function(s){const t=e.byteLength||0,i=e.byteOffset||0;return s.slice(i,i+t)})}loadAccessor(n){const e=this,s=this.json,t=this.json.accessors[n];if(t.bufferView===void 0&&t.sparse===void 0){const r=q[t.type],a=H[t.componentType],o=t.normalized===!0,c=new a(t.count*r);return Promise.resolve(new V(c,r,o))}const i=[];return t.bufferView!==void 0?i.push(this.getDependency("bufferView",t.bufferView)):i.push(null),t.sparse!==void 0&&(i.push(this.getDependency("bufferView",t.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",t.sparse.values.bufferView))),Promise.all(i).then(function(r){const a=r[0],o=q[t.type],c=H[t.componentType],u=c.BYTES_PER_ELEMENT,l=u*o,h=t.byteOffset||0,d=t.bufferView!==void 0?s.bufferViews[t.bufferView].byteStride:void 0,p=t.normalized===!0;let R,m;if(d&&d!==l){const T=Math.floor(h/d),A="InterleavedBuffer:"+t.bufferView+":"+t.componentType+":"+T+":"+t.count;let x=e.cache.get(A);x||(R=new c(a,T*d,t.count*d/u),x=new Ce(R,d/u),e.cache.add(A,x)),m=new sn(x,o,h%d/u,p)}else a===null?R=new c(t.count*o):R=new c(a,h,t.count*o),m=new V(R,o,p);if(t.sparse!==void 0){const T=q.SCALAR,A=H[t.sparse.indices.componentType],x=t.sparse.indices.byteOffset||0,E=t.sparse.values.byteOffset||0,L=new A(r[1],x,t.sparse.count*T),b=new c(r[2],E,t.sparse.count*o);a!==null&&(m=new V(m.array.slice(),m.itemSize,m.normalized)),m.normalized=!1;for(let S=0,k=L.length;S<k;S++){const P=L[S];if(m.setX(P,b[S*o]),o>=2&&m.setY(P,b[S*o+1]),o>=3&&m.setZ(P,b[S*o+2]),o>=4&&m.setW(P,b[S*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}m.normalized=p}return m})}loadTexture(n){const e=this.json,s=this.options,i=e.textures[n].source,r=e.images[i];let a=this.textureLoader;if(r.uri){const o=s.manager.getHandler(r.uri);o!==null&&(a=o)}return this.loadTextureImage(n,i,a)}loadTextureImage(n,e,s){const t=this,i=this.json,r=i.textures[n],a=i.images[e],o=(a.uri||a.bufferView)+":"+r.sampler;if(this.textureCache[o])return this.textureCache[o];const c=this.loadImageSource(e,s).then(function(u){u.flipY=!1,u.name=r.name||a.name||"",u.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(u.name=a.uri);const h=(i.samplers||{})[r.sampler]||{};return u.magFilter=ue[h.magFilter]||J,u.minFilter=ue[h.minFilter]||Te,u.wrapS=le[h.wrapS]||Z,u.wrapT=le[h.wrapT]||Z,u.generateMipmaps=!u.isCompressedTexture&&u.minFilter!==Re&&u.minFilter!==J,t.associations.set(u,{textures:n}),u}).catch(function(){return null});return this.textureCache[o]=c,c}loadImageSource(n,e){const s=this,t=this.json,i=this.options;if(this.sourceCache[n]!==void 0)return this.sourceCache[n].then(l=>l.clone());const r=t.images[n],a=self.URL||self.webkitURL;let o=r.uri||"",c=!1;if(r.bufferView!==void 0)o=s.getDependency("bufferView",r.bufferView).then(function(l){c=!0;const h=new Blob([l],{type:r.mimeType});return o=a.createObjectURL(h),o});else if(r.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+n+" is missing URI and bufferView");const u=Promise.resolve(o).then(function(l){return new Promise(function(h,d){let p=h;e.isImageBitmapLoader===!0&&(p=function(R){const m=new ne(R);m.needsUpdate=!0,h(m)}),e.load(v.resolveURL(l,i.path),p,void 0,d)})}).then(function(l){return c===!0&&a.revokeObjectURL(o),y(l,r),l.userData.mimeType=r.mimeType||Gn(r.uri),l}).catch(function(l){throw console.error("THREE.GLTFLoader: Couldn't load texture",o),l});return this.sourceCache[n]=u,u}assignTexture(n,e,s,t){const i=this;return this.getDependency("texture",s.index).then(function(r){if(!r)return null;if(s.texCoord!==void 0&&s.texCoord>0&&(r=r.clone(),r.channel=s.texCoord),i.extensions[g.KHR_TEXTURE_TRANSFORM]){const a=s.extensions!==void 0?s.extensions[g.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const o=i.associations.get(r);r=i.extensions[g.KHR_TEXTURE_TRANSFORM].extendTexture(r,a),i.associations.set(r,o)}}return t!==void 0&&(r.colorSpace=t),n[e]=r,r})}assignFinalMaterial(n){const e=n.geometry;let s=n.material;const t=e.attributes.tangent===void 0,i=e.attributes.color!==void 0,r=e.attributes.normal===void 0;if(n.isPoints){const a="PointsMaterial:"+s.uuid;let o=this.cache.get(a);o||(o=new Ge,X.prototype.copy.call(o,s),o.color.copy(s.color),o.map=s.map,o.sizeAttenuation=!1,this.cache.add(a,o)),s=o}else if(n.isLine){const a="LineBasicMaterial:"+s.uuid;let o=this.cache.get(a);o||(o=new ve,X.prototype.copy.call(o,s),o.color.copy(s.color),o.map=s.map,this.cache.add(a,o)),s=o}if(t||i||r){let a="ClonedMaterial:"+s.uuid+":";t&&(a+="derivative-tangents:"),i&&(a+="vertex-colors:"),r&&(a+="flat-shading:");let o=this.cache.get(a);o||(o=s.clone(),i&&(o.vertexColors=!0),r&&(o.flatShading=!0),t&&(o.normalScale&&(o.normalScale.y*=-1),o.clearcoatNormalScale&&(o.clearcoatNormalScale.y*=-1)),this.cache.add(a,o),this.associations.set(o,this.associations.get(s))),s=o}n.material=s}getMaterialType(){return Ee}loadMaterial(n){const e=this,s=this.json,t=this.extensions,i=s.materials[n];let r;const a={},o=i.extensions||{},c=[];if(o[g.KHR_MATERIALS_UNLIT]){const l=t[g.KHR_MATERIALS_UNLIT];r=l.getMaterialType(),c.push(l.extendParams(a,i,e))}else{const l=i.pbrMetallicRoughness||{};if(a.color=new F(1,1,1),a.opacity=1,Array.isArray(l.baseColorFactor)){const h=l.baseColorFactor;a.color.setRGB(h[0],h[1],h[2],N),a.opacity=h[3]}l.baseColorTexture!==void 0&&c.push(e.assignTexture(a,"map",l.baseColorTexture,U)),a.metalness=l.metallicFactor!==void 0?l.metallicFactor:1,a.roughness=l.roughnessFactor!==void 0?l.roughnessFactor:1,l.metallicRoughnessTexture!==void 0&&(c.push(e.assignTexture(a,"metalnessMap",l.metallicRoughnessTexture)),c.push(e.assignTexture(a,"roughnessMap",l.metallicRoughnessTexture))),r=this._invokeOne(function(h){return h.getMaterialType&&h.getMaterialType(n)}),c.push(Promise.all(this._invokeAll(function(h){return h.extendMaterialParams&&h.extendMaterialParams(n,a)})))}i.doubleSided===!0&&(a.side=Ue);const u=i.alphaMode||W.OPAQUE;if(u===W.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,u===W.MASK&&(a.alphaTest=i.alphaCutoff!==void 0?i.alphaCutoff:.5)),i.normalTexture!==void 0&&r!==G&&(c.push(e.assignTexture(a,"normalMap",i.normalTexture)),a.normalScale=new pe(1,1),i.normalTexture.scale!==void 0)){const l=i.normalTexture.scale;a.normalScale.set(l,l)}if(i.occlusionTexture!==void 0&&r!==G&&(c.push(e.assignTexture(a,"aoMap",i.occlusionTexture)),i.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=i.occlusionTexture.strength)),i.emissiveFactor!==void 0&&r!==G){const l=i.emissiveFactor;a.emissive=new F().setRGB(l[0],l[1],l[2],N)}return i.emissiveTexture!==void 0&&r!==G&&c.push(e.assignTexture(a,"emissiveMap",i.emissiveTexture,U)),Promise.all(c).then(function(){const l=new r(a);return i.name&&(l.name=i.name),y(l,i),e.associations.set(l,{materials:n}),i.extensions&&O(t,l,i),l})}createUniqueName(n){const e=Ke.sanitizeNodeName(n||"");return e in this.nodeNamesUsed?e+"_"+ ++this.nodeNamesUsed[e]:(this.nodeNamesUsed[e]=0,e)}loadGeometries(n){const e=this,s=this.extensions,t=this.primitiveCache;function i(a){return s[g.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(o){return fe(o,a,e)})}const r=[];for(let a=0,o=n.length;a<o;a++){const c=n[a],u=Dn(c),l=t[u];if(l)r.push(l.promise);else{let h;c.extensions&&c.extensions[g.KHR_DRACO_MESH_COMPRESSION]?h=i(c):h=fe(new Be,c,e),t[u]={primitive:c,promise:h},r.push(h)}}return Promise.all(r)}loadMesh(n){const e=this,s=this.json,t=this.extensions,i=s.meshes[n],r=i.primitives,a=[];for(let o=0,c=r.length;o<c;o++){const u=r[o].material===void 0?Pn(this.cache):this.getDependency("material",r[o].material);a.push(u)}return a.push(e.loadGeometries(r)),Promise.all(a).then(function(o){const c=o.slice(0,o.length-1),u=o[o.length-1],l=[];for(let d=0,p=u.length;d<p;d++){const R=u[d],m=r[d];let T;const A=c[d];if(m.mode===M.TRIANGLES||m.mode===M.TRIANGLE_STRIP||m.mode===M.TRIANGLE_FAN||m.mode===void 0)T=i.isSkinnedMesh===!0?new je(R,A):new Ve(R,A),T.isSkinnedMesh===!0&&T.normalizeSkinWeights(),m.mode===M.TRIANGLE_STRIP?T.geometry=oe(T.geometry,he):m.mode===M.TRIANGLE_FAN&&(T.geometry=oe(T.geometry,Q));else if(m.mode===M.LINES)T=new Xe(R,A);else if(m.mode===M.LINE_STRIP)T=new ze(R,A);else if(m.mode===M.LINE_LOOP)T=new qe(R,A);else if(m.mode===M.POINTS)T=new We(R,A);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+m.mode);Object.keys(T.geometry.morphAttributes).length>0&&kn(T,i),T.name=e.createUniqueName(i.name||"mesh_"+n),y(T,i),m.extensions&&O(t,T,m),e.assignFinalMaterial(T),l.push(T)}for(let d=0,p=l.length;d<p;d++)e.associations.set(l[d],{meshes:n,primitives:d});if(l.length===1)return i.extensions&&O(t,l[0],i),l[0];const h=new z;i.extensions&&O(t,h,i),e.associations.set(h,{meshes:n});for(let d=0,p=l.length;d<p;d++)h.add(l[d]);return h})}loadCamera(n){let e;const s=this.json.cameras[n],t=s[s.type];if(!t){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return s.type==="perspective"?e=new Ye(Qe.radToDeg(t.yfov),t.aspectRatio||1,t.znear||1,t.zfar||2e6):s.type==="orthographic"&&(e=new Je(-t.xmag,t.xmag,t.ymag,-t.ymag,t.znear,t.zfar)),s.name&&(e.name=this.createUniqueName(s.name)),y(e,s),Promise.resolve(e)}loadSkin(n){const e=this.json.skins[n],s=[];for(let t=0,i=e.joints.length;t<i;t++)s.push(this._loadNodeShallow(e.joints[t]));return e.inverseBindMatrices!==void 0?s.push(this.getDependency("accessor",e.inverseBindMatrices)):s.push(null),Promise.all(s).then(function(t){const i=t.pop(),r=t,a=[],o=[];for(let c=0,u=r.length;c<u;c++){const l=r[c];if(l){a.push(l);const h=new K;i!==null&&h.fromArray(i.array,c*16),o.push(h)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',e.joints[c])}return new Ze(a,o)})}loadAnimation(n){const e=this.json,s=this,t=e.animations[n],i=t.name?t.name:"animation_"+n,r=[],a=[],o=[],c=[],u=[];for(let l=0,h=t.channels.length;l<h;l++){const d=t.channels[l],p=t.samplers[d.sampler],R=d.target,m=R.node,T=t.parameters!==void 0?t.parameters[p.input]:p.input,A=t.parameters!==void 0?t.parameters[p.output]:p.output;R.node!==void 0&&(r.push(this.getDependency("node",m)),a.push(this.getDependency("accessor",T)),o.push(this.getDependency("accessor",A)),c.push(p),u.push(R))}return Promise.all([Promise.all(r),Promise.all(a),Promise.all(o),Promise.all(c),Promise.all(u)]).then(function(l){const h=l[0],d=l[1],p=l[2],R=l[3],m=l[4],T=[];for(let x=0,E=h.length;x<E;x++){const L=h[x],b=d[x],S=p[x],k=R[x],P=m[x];if(L===void 0)continue;L.updateMatrix&&L.updateMatrix();const B=s._createAnimationTracks(L,b,S,k,P);if(B)for(let j=0;j<B.length;j++)T.push(B[j])}const A=new $e(i,void 0,T);return y(A,t),A})}createNodeMesh(n){const e=this.json,s=this,t=e.nodes[n];return t.mesh===void 0?null:s.getDependency("mesh",t.mesh).then(function(i){const r=s._getNodeRef(s.meshCache,t.mesh,i);return t.weights!==void 0&&r.traverse(function(a){if(a.isMesh)for(let o=0,c=t.weights.length;o<c;o++)a.morphTargetInfluences[o]=t.weights[o]}),r})}loadNode(n){const e=this.json,s=this,t=e.nodes[n],i=s._loadNodeShallow(n),r=[],a=t.children||[];for(let c=0,u=a.length;c<u;c++)r.push(s.getDependency("node",a[c]));const o=t.skin===void 0?Promise.resolve(null):s.getDependency("skin",t.skin);return Promise.all([i,Promise.all(r),o]).then(function(c){const u=c[0],l=c[1],h=c[2];h!==null&&u.traverse(function(d){d.isSkinnedMesh&&d.bind(h,vn)});for(let d=0,p=l.length;d<p;d++)u.add(l[d]);if(u.userData.pivot!==void 0&&l.length>0){const d=u.userData.pivot,p=l[0];u.pivot=new C().fromArray(d),u.position.x-=d[0],u.position.y-=d[1],u.position.z-=d[2],p.position.set(0,0,0),delete u.userData.pivot}return u})}_loadNodeShallow(n){const e=this.json,s=this.extensions,t=this;if(this.nodeCache[n]!==void 0)return this.nodeCache[n];const i=e.nodes[n],r=i.name?t.createUniqueName(i.name):"",a=[],o=t._invokeOne(function(c){return c.createNodeMesh&&c.createNodeMesh(n)});return o&&a.push(o),i.camera!==void 0&&a.push(t.getDependency("camera",i.camera).then(function(c){return t._getNodeRef(t.cameraCache,i.camera,c)})),t._invokeAll(function(c){return c.createNodeAttachment&&c.createNodeAttachment(n)}).forEach(function(c){a.push(c)}),this.nodeCache[n]=Promise.all(a).then(function(c){let u;if(i.isBone===!0?u=new en:c.length>1?u=new z:c.length===1?u=c[0]:u=new ge,u!==c[0])for(let l=0,h=c.length;l<h;l++)u.add(c[l]);if(i.name&&(u.userData.name=i.name,u.name=r),y(u,i),i.extensions&&O(s,u,i),i.matrix!==void 0){const l=new K;l.fromArray(i.matrix),u.applyMatrix4(l)}else i.translation!==void 0&&u.position.fromArray(i.translation),i.rotation!==void 0&&u.quaternion.fromArray(i.rotation),i.scale!==void 0&&u.scale.fromArray(i.scale);if(!t.associations.has(u))t.associations.set(u,{});else if(i.mesh!==void 0&&t.meshCache.refs[i.mesh]>1){const l=t.associations.get(u);t.associations.set(u,{...l})}return t.associations.get(u).nodes=n,u}),this.nodeCache[n]}loadScene(n){const e=this.extensions,s=this.json.scenes[n],t=this,i=new z;s.name&&(i.name=t.createUniqueName(s.name)),y(i,s),s.extensions&&O(e,i,s);const r=s.nodes||[],a=[];for(let o=0,c=r.length;o<c;o++)a.push(t.getDependency("node",r[o]));return Promise.all(a).then(function(o){for(let u=0,l=o.length;u<l;u++){const h=o[u];h.parent!==null?i.add(nn(h)):i.add(h)}const c=u=>{const l=new Map;for(const[h,d]of t.associations)(h instanceof X||h instanceof ne)&&l.set(h,d);return u.traverse(h=>{const d=t.associations.get(h);d!=null&&l.set(h,d)}),l};return t.associations=c(i),i})}_createAnimationTracks(n,e,s,t,i){const r=[],a=n.name?n.name:n.uuid,o=[];function c(d){d.morphTargetInfluences&&o.push(d.name?d.name:d.uuid)}I[i.path]===I.weights?(c(n),n.isGroup&&n.children.forEach(c)):o.push(a);let u;switch(I[i.path]){case I.weights:u=se;break;case I.rotation:u=ie;break;case I.translation:case I.scale:u=te;break;default:switch(s.itemSize){case 1:u=se;break;case 2:case 3:default:u=te;break}break}const l=t.interpolation!==void 0?Fn[t.interpolation]:xe,h=this._getArrayFromAccessor(s);for(let d=0,p=o.length;d<p;d++){const R=new u(o[d]+"."+I[i.path],e.array,h,l);t.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(R),r.push(R)}return r}_getArrayFromAccessor(n){let e=n.array;if(n.normalized){const s=ee(e.constructor),t=new Float32Array(e.length);for(let i=0,r=e.length;i<r;i++)t[i]=e[i]*s;e=t}return e}_createCubicSplineTrackInterpolant(n){n.createInterpolant=function(s){const t=this instanceof ie?Cn:_e;return new t(this.times,this.values,this.getValueSize()/3,s)},n.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function Kn(f,n,e){const s=n.attributes,t=new an;if(s.POSITION!==void 0){const a=e.json.accessors[s.POSITION],o=a.min,c=a.max;if(o!==void 0&&c!==void 0){if(t.set(new C(o[0],o[1],o[2]),new C(c[0],c[1],c[2])),a.normalized){const u=ee(H[a.componentType]);t.min.multiplyScalar(u),t.max.multiplyScalar(u)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const i=n.targets;if(i!==void 0){const a=new C,o=new C;for(let c=0,u=i.length;c<u;c++){const l=i[c];if(l.POSITION!==void 0){const h=e.json.accessors[l.POSITION],d=h.min,p=h.max;if(d!==void 0&&p!==void 0){if(o.setX(Math.max(Math.abs(d[0]),Math.abs(p[0]))),o.setY(Math.max(Math.abs(d[1]),Math.abs(p[1]))),o.setZ(Math.max(Math.abs(d[2]),Math.abs(p[2]))),h.normalized){const R=ee(H[h.componentType]);o.multiplyScalar(R)}a.max(o)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}t.expandByVector(a)}f.boundingBox=t;const r=new cn;t.getCenter(r.center),r.radius=t.min.distanceTo(t.max)/2,f.boundingSphere=r}function fe(f,n,e){const s=n.attributes,t=[];function i(r,a){return e.getDependency("accessor",r).then(function(o){f.setAttribute(a,o)})}for(const r in s){const a=$[r]||r.toLowerCase();a in f.attributes||t.push(i(s[r],a))}if(n.indices!==void 0&&!f.index){const r=e.getDependency("accessor",n.indices).then(function(a){f.setIndex(a)});t.push(r)}return re.workingColorSpace!==N&&"COLOR_0"in s&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${re.workingColorSpace}" not supported.`),y(f,n),Kn(f,n,e),Promise.all(t).then(function(){return n.targets!==void 0?Hn(f,n.targets,e):f})}export{jn as GLTFLoader};
|
|
1
|
+
import{a7 as Le,a8 as Q,a9 as he,aa as Me,ab as v,ac as de,c as w,V as pe,C as F,ad as N,X as U,K as Se,ae as ye,af as we,v as K,ag as Ne,o as C,ah as me,ai as be,a1 as ge,aj as Ie,ak as Oe,h as V,al as Ce,am as Te,an as Fe,ao as Pe,ap as He,Y as J,aq as Re,ar as Z,as as ke,at as De,P as Ge,au as X,av as ve,e as Ee,J as Ue,H as G,aw as Ke,B as Be,ax as je,d as Ve,ay as Xe,az as ze,aA as qe,x as We,G as z,aB as Ye,w as Qe,aC as Je,aD as Ze,aE as $e,aF as en,aG as nn,aH as tn,aI as xe,k as sn,Q as ne,aJ as te,aK as se,aL as ie,aM as re,aN as rn,aO as on,m as an,n as cn}from"./rr0-scene.mjs";function oe(f,n){if(n===Le)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),f;if(n===Q||n===he){let e=f.getIndex();if(e===null){const r=[],a=f.getAttribute("position");if(a!==void 0){for(let o=0;o<a.count;o++)r.push(o);f.setIndex(r),e=f.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),f}const s=e.count-2,t=[];if(n===Q)for(let r=1;r<=s;r++)t.push(e.getX(0)),t.push(e.getX(r)),t.push(e.getX(r+1));else for(let r=0;r<s;r++)r%2===0?(t.push(e.getX(r)),t.push(e.getX(r+1)),t.push(e.getX(r+2))):(t.push(e.getX(r+2)),t.push(e.getX(r+1)),t.push(e.getX(r)));t.length/3!==s&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const i=f.clone();return i.setIndex(t),i.clearGroups(),i}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",n),f}class jn extends Me{constructor(n){super(n),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(e){return new dn(e)}),this.register(function(e){return new pn(e)}),this.register(function(e){return new Ln(e)}),this.register(function(e){return new Mn(e)}),this.register(function(e){return new Sn(e)}),this.register(function(e){return new gn(e)}),this.register(function(e){return new Tn(e)}),this.register(function(e){return new Rn(e)}),this.register(function(e){return new En(e)}),this.register(function(e){return new hn(e)}),this.register(function(e){return new xn(e)}),this.register(function(e){return new mn(e)}),this.register(function(e){return new _n(e)}),this.register(function(e){return new An(e)}),this.register(function(e){return new ln(e)}),this.register(function(e){return new ae(e,g.EXT_MESHOPT_COMPRESSION)}),this.register(function(e){return new ae(e,g.KHR_MESHOPT_COMPRESSION)}),this.register(function(e){return new yn(e)})}load(n,e,s,t){const i=this;let r;if(this.resourcePath!=="")r=this.resourcePath;else if(this.path!==""){const c=v.extractUrlBase(n);r=v.resolveURL(c,this.path)}else r=v.extractUrlBase(n);this.manager.itemStart(n);const a=function(c){t?t(c):console.error(c),i.manager.itemError(n),i.manager.itemEnd(n)},o=new de(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(n,function(c){try{i.parse(c,r,function(u){e(u),i.manager.itemEnd(n)},a)}catch(u){a(u)}},s,a)}setDRACOLoader(n){return this.dracoLoader=n,this}setKTX2Loader(n){return this.ktx2Loader=n,this}setMeshoptDecoder(n){return this.meshoptDecoder=n,this}register(n){return this.pluginCallbacks.indexOf(n)===-1&&this.pluginCallbacks.push(n),this}unregister(n){return this.pluginCallbacks.indexOf(n)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(n),1),this}parse(n,e,s,t){let i;const r={},a={},o=new TextDecoder;if(typeof n=="string")i=JSON.parse(n);else if(n instanceof ArrayBuffer)if(o.decode(new Uint8Array(n,0,4))===Ae){try{r[g.KHR_BINARY_GLTF]=new wn(n)}catch(l){t&&t(l);return}i=JSON.parse(r[g.KHR_BINARY_GLTF].content)}else i=JSON.parse(o.decode(n));else i=n;if(i.asset===void 0||i.asset.version[0]<2){t&&t(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const c=new Un(i,{path:e||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let u=0;u<this.pluginCallbacks.length;u++){const l=this.pluginCallbacks[u](c);l.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[l.name]=l,r[l.name]=!0}if(i.extensionsUsed)for(let u=0;u<i.extensionsUsed.length;++u){const l=i.extensionsUsed[u],h=i.extensionsRequired||[];switch(l){case g.KHR_MATERIALS_UNLIT:r[l]=new fn;break;case g.KHR_DRACO_MESH_COMPRESSION:r[l]=new Nn(i,this.dracoLoader);break;case g.KHR_TEXTURE_TRANSFORM:r[l]=new bn;break;case g.KHR_MESH_QUANTIZATION:r[l]=new In;break;default:h.indexOf(l)>=0&&a[l]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+l+'".')}}c.setExtensions(r),c.setPlugins(a),c.parse(s,t)}parseAsync(n,e){const s=this;return new Promise(function(t,i){s.parse(n,e,t,i)})}}function un(){let f={};return{get:function(n){return f[n]},add:function(n,e){f[n]=e},remove:function(n){delete f[n]},removeAll:function(){f={}}}}function _(f,n,e){const s=f.json.materials[n];return s.extensions&&s.extensions[e]?s.extensions[e]:null}const g={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",KHR_MESHOPT_COMPRESSION:"KHR_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class ln{constructor(n){this.parser=n,this.name=g.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const n=this.parser,e=this.parser.json.nodes||[];for(let s=0,t=e.length;s<t;s++){const i=e[s];i.extensions&&i.extensions[this.name]&&i.extensions[this.name].light!==void 0&&n._addNodeRef(this.cache,i.extensions[this.name].light)}}_loadLight(n){const e=this.parser,s="light:"+n;let t=e.cache.get(s);if(t)return t;const i=e.json,o=((i.extensions&&i.extensions[this.name]||{}).lights||[])[n];let c;const u=new F(16777215);o.color!==void 0&&u.setRGB(o.color[0],o.color[1],o.color[2],N);const l=o.range!==void 0?o.range:0;switch(o.type){case"directional":c=new we(u),c.target.position.set(0,0,-1),c.add(c.target);break;case"point":c=new ye(u),c.distance=l;break;case"spot":c=new Se(u),c.distance=l,o.spot=o.spot||{},o.spot.innerConeAngle=o.spot.innerConeAngle!==void 0?o.spot.innerConeAngle:0,o.spot.outerConeAngle=o.spot.outerConeAngle!==void 0?o.spot.outerConeAngle:Math.PI/4,c.angle=o.spot.outerConeAngle,c.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,c.target.position.set(0,0,-1),c.add(c.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+o.type)}return c.position.set(0,0,0),y(c,o),o.intensity!==void 0&&(c.intensity=o.intensity),c.name=e.createUniqueName(o.name||"light_"+n),t=Promise.resolve(c),e.cache.add(s,t),t}getDependency(n,e){if(n==="light")return this._loadLight(e)}createNodeAttachment(n){const e=this,s=this.parser,i=s.json.nodes[n],a=(i.extensions&&i.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(o){return s._getNodeRef(e.cache,a,o)})}}class fn{constructor(){this.name=g.KHR_MATERIALS_UNLIT}getMaterialType(){return G}extendParams(n,e,s){const t=[];n.color=new F(1,1,1),n.opacity=1;const i=e.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){const r=i.baseColorFactor;n.color.setRGB(r[0],r[1],r[2],N),n.opacity=r[3]}i.baseColorTexture!==void 0&&t.push(s.assignTexture(n,"map",i.baseColorTexture,U))}return Promise.all(t)}}class hn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);return s===null||s.emissiveStrength!==void 0&&(e.emissiveIntensity=s.emissiveStrength),Promise.resolve()}}class dn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_CLEARCOAT}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];if(s.clearcoatFactor!==void 0&&(e.clearcoat=s.clearcoatFactor),s.clearcoatTexture!==void 0&&t.push(this.parser.assignTexture(e,"clearcoatMap",s.clearcoatTexture)),s.clearcoatRoughnessFactor!==void 0&&(e.clearcoatRoughness=s.clearcoatRoughnessFactor),s.clearcoatRoughnessTexture!==void 0&&t.push(this.parser.assignTexture(e,"clearcoatRoughnessMap",s.clearcoatRoughnessTexture)),s.clearcoatNormalTexture!==void 0&&(t.push(this.parser.assignTexture(e,"clearcoatNormalMap",s.clearcoatNormalTexture)),s.clearcoatNormalTexture.scale!==void 0)){const i=s.clearcoatNormalTexture.scale;e.clearcoatNormalScale=new pe(i,i)}return Promise.all(t)}}class pn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_DISPERSION}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);return s===null||(e.dispersion=s.dispersion!==void 0?s.dispersion:0),Promise.resolve()}}class mn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_IRIDESCENCE}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return s.iridescenceFactor!==void 0&&(e.iridescence=s.iridescenceFactor),s.iridescenceTexture!==void 0&&t.push(this.parser.assignTexture(e,"iridescenceMap",s.iridescenceTexture)),s.iridescenceIor!==void 0&&(e.iridescenceIOR=s.iridescenceIor),e.iridescenceThicknessRange===void 0&&(e.iridescenceThicknessRange=[100,400]),s.iridescenceThicknessMinimum!==void 0&&(e.iridescenceThicknessRange[0]=s.iridescenceThicknessMinimum),s.iridescenceThicknessMaximum!==void 0&&(e.iridescenceThicknessRange[1]=s.iridescenceThicknessMaximum),s.iridescenceThicknessTexture!==void 0&&t.push(this.parser.assignTexture(e,"iridescenceThicknessMap",s.iridescenceThicknessTexture)),Promise.all(t)}}class gn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_SHEEN}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];if(e.sheenColor=new F(0,0,0),e.sheenRoughness=0,e.sheen=1,s.sheenColorFactor!==void 0){const i=s.sheenColorFactor;e.sheenColor.setRGB(i[0],i[1],i[2],N)}return s.sheenRoughnessFactor!==void 0&&(e.sheenRoughness=s.sheenRoughnessFactor),s.sheenColorTexture!==void 0&&t.push(this.parser.assignTexture(e,"sheenColorMap",s.sheenColorTexture,U)),s.sheenRoughnessTexture!==void 0&&t.push(this.parser.assignTexture(e,"sheenRoughnessMap",s.sheenRoughnessTexture)),Promise.all(t)}}class Tn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_TRANSMISSION}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return s.transmissionFactor!==void 0&&(e.transmission=s.transmissionFactor),s.transmissionTexture!==void 0&&t.push(this.parser.assignTexture(e,"transmissionMap",s.transmissionTexture)),Promise.all(t)}}class Rn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_VOLUME}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];e.thickness=s.thicknessFactor!==void 0?s.thicknessFactor:0,s.thicknessTexture!==void 0&&t.push(this.parser.assignTexture(e,"thicknessMap",s.thicknessTexture)),e.attenuationDistance=s.attenuationDistance||1/0;const i=s.attenuationColor||[1,1,1];return e.attenuationColor=new F().setRGB(i[0],i[1],i[2],N),Promise.all(t)}}class En{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_IOR}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);return s===null||(e.ior=s.ior!==void 0?s.ior:1.5,e.ior===0&&(e.ior=1e3)),Promise.resolve()}}class xn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_SPECULAR}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];e.specularIntensity=s.specularFactor!==void 0?s.specularFactor:1,s.specularTexture!==void 0&&t.push(this.parser.assignTexture(e,"specularIntensityMap",s.specularTexture));const i=s.specularColorFactor||[1,1,1];return e.specularColor=new F().setRGB(i[0],i[1],i[2],N),s.specularColorTexture!==void 0&&t.push(this.parser.assignTexture(e,"specularColorMap",s.specularColorTexture,U)),Promise.all(t)}}class An{constructor(n){this.parser=n,this.name=g.EXT_MATERIALS_BUMP}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return e.bumpScale=s.bumpFactor!==void 0?s.bumpFactor:1,s.bumpTexture!==void 0&&t.push(this.parser.assignTexture(e,"bumpMap",s.bumpTexture)),Promise.all(t)}}class _n{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_ANISOTROPY}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return s.anisotropyStrength!==void 0&&(e.anisotropy=s.anisotropyStrength),s.anisotropyRotation!==void 0&&(e.anisotropyRotation=s.anisotropyRotation),s.anisotropyTexture!==void 0&&t.push(this.parser.assignTexture(e,"anisotropyMap",s.anisotropyTexture)),Promise.all(t)}}class Ln{constructor(n){this.parser=n,this.name=g.KHR_TEXTURE_BASISU}loadTexture(n){const e=this.parser,s=e.json,t=s.textures[n];if(!t.extensions||!t.extensions[this.name])return null;const i=t.extensions[this.name],r=e.options.ktx2Loader;if(!r){if(s.extensionsRequired&&s.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return e.loadTextureImage(n,i.source,r)}}class Mn{constructor(n){this.parser=n,this.name=g.EXT_TEXTURE_WEBP}loadTexture(n){const e=this.name,s=this.parser,t=s.json,i=t.textures[n];if(!i.extensions||!i.extensions[e])return null;const r=i.extensions[e],a=t.images[r.source];let o=s.textureLoader;if(a.uri){const c=s.options.manager.getHandler(a.uri);c!==null&&(o=c)}return s.loadTextureImage(n,r.source,o)}}class Sn{constructor(n){this.parser=n,this.name=g.EXT_TEXTURE_AVIF}loadTexture(n){const e=this.name,s=this.parser,t=s.json,i=t.textures[n];if(!i.extensions||!i.extensions[e])return null;const r=i.extensions[e],a=t.images[r.source];let o=s.textureLoader;if(a.uri){const c=s.options.manager.getHandler(a.uri);c!==null&&(o=c)}return s.loadTextureImage(n,r.source,o)}}class ae{constructor(n,e){this.name=e,this.parser=n}loadBufferView(n){const e=this.parser.json,s=e.bufferViews[n];if(s.extensions&&s.extensions[this.name]){const t=s.extensions[this.name],i=this.parser.getDependency("buffer",t.buffer),r=this.parser.options.meshoptDecoder;if(!r||!r.supported){if(e.extensionsRequired&&e.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return i.then(function(a){const o=t.byteOffset||0,c=t.byteLength||0,u=t.count,l=t.byteStride,h=new Uint8Array(a,o,c);return r.decodeGltfBufferAsync?r.decodeGltfBufferAsync(u,l,h,t.mode,t.filter).then(function(d){return d.buffer}):r.ready.then(function(){const d=new ArrayBuffer(u*l);return r.decodeGltfBuffer(new Uint8Array(d),u,l,h,t.mode,t.filter),d})})}else return null}}class yn{constructor(n){this.name=g.EXT_MESH_GPU_INSTANCING,this.parser=n}createNodeMesh(n){const e=this.parser.json,s=e.nodes[n];if(!s.extensions||!s.extensions[this.name]||s.mesh===void 0)return null;const t=e.meshes[s.mesh];for(const c of t.primitives)if(c.mode!==M.TRIANGLES&&c.mode!==M.TRIANGLE_STRIP&&c.mode!==M.TRIANGLE_FAN&&c.mode!==void 0)return null;const r=s.extensions[this.name].attributes,a=[],o={};for(const c in r)a.push(this.parser.getDependency("accessor",r[c]).then(u=>(o[c]=u,o[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(n)),Promise.all(a).then(c=>{const u=c.pop(),l=u.isGroup?u.children:[u],h=c[0].count,d=[];for(const p of l){const R=new K,m=new C,T=new me,A=new C(1,1,1),x=new Ne(p.geometry,p.material,h);for(let E=0;E<h;E++)o.TRANSLATION&&m.fromBufferAttribute(o.TRANSLATION,E),o.ROTATION&&T.fromBufferAttribute(o.ROTATION,E),o.SCALE&&A.fromBufferAttribute(o.SCALE,E),x.setMatrixAt(E,R.compose(m,T,A));for(const E in o)if(E==="_COLOR_0"){const L=o[E];x.instanceColor=new be(L.array,L.itemSize,L.normalized)}else E!=="TRANSLATION"&&E!=="ROTATION"&&E!=="SCALE"&&p.geometry.setAttribute(E,o[E]);ge.prototype.copy.call(x,p),this.parser.assignFinalMaterial(x),d.push(x)}return u.isGroup?(u.clear(),u.add(...d),u):d[0]}))}}const Ae="glTF",D=12,ce={JSON:1313821514,BIN:5130562};class wn{constructor(n){this.name=g.KHR_BINARY_GLTF,this.content=null,this.body=null;const e=new DataView(n,0,D),s=new TextDecoder;if(this.header={magic:s.decode(new Uint8Array(n.slice(0,4))),version:e.getUint32(4,!0),length:e.getUint32(8,!0)},this.header.magic!==Ae)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const t=this.header.length-D,i=new DataView(n,D);let r=0;for(;r<t;){const a=i.getUint32(r,!0);r+=4;const o=i.getUint32(r,!0);if(r+=4,o===ce.JSON){const c=new Uint8Array(n,D+r,a);this.content=s.decode(c)}else if(o===ce.BIN){const c=D+r;this.body=n.slice(c,c+a)}r+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class Nn{constructor(n,e){if(!e)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=g.KHR_DRACO_MESH_COMPRESSION,this.json=n,this.dracoLoader=e,this.dracoLoader.preload()}decodePrimitive(n,e){const s=this.json,t=this.dracoLoader,i=n.extensions[this.name].bufferView,r=n.extensions[this.name].attributes,a={},o={},c={};for(const u in r){const l=$[u]||u.toLowerCase();a[l]=r[u]}for(const u in n.attributes){const l=$[u]||u.toLowerCase();if(r[u]!==void 0){const h=s.accessors[n.attributes[u]],d=H[h.componentType];c[l]=d.name,o[l]=h.normalized===!0}}return e.getDependency("bufferView",i).then(function(u){return new Promise(function(l,h){t.decodeDracoFile(u,function(d){for(const p in d.attributes){const R=d.attributes[p],m=o[p];m!==void 0&&(R.normalized=m)}l(d)},a,c,N,h)})})}}class bn{constructor(){this.name=g.KHR_TEXTURE_TRANSFORM}extendTexture(n,e){return(e.texCoord===void 0||e.texCoord===n.channel)&&e.offset===void 0&&e.rotation===void 0&&e.scale===void 0||(n=n.clone(),e.texCoord!==void 0&&(n.channel=e.texCoord),e.offset!==void 0&&n.offset.fromArray(e.offset),e.rotation!==void 0&&(n.rotation=e.rotation),e.scale!==void 0&&n.repeat.fromArray(e.scale),n.needsUpdate=!0),n}}class In{constructor(){this.name=g.KHR_MESH_QUANTIZATION}}class _e extends on{constructor(n,e,s,t){super(n,e,s,t)}copySampleValue_(n){const e=this.resultBuffer,s=this.sampleValues,t=this.valueSize,i=n*t*3+t;for(let r=0;r!==t;r++)e[r]=s[i+r];return e}interpolate_(n,e,s,t){const i=this.resultBuffer,r=this.sampleValues,a=this.valueSize,o=a*2,c=a*3,u=t-e,l=(s-e)/u,h=l*l,d=h*l,p=n*c,R=p-c,m=-2*d+3*h,T=d-h,A=1-m,x=T-h+l;for(let E=0;E!==a;E++){const L=r[R+E+a],b=r[R+E+o]*u,S=r[p+E+a],k=r[p+E]*u;i[E]=A*L+x*b+m*S+T*k}return i}}const On=new me;class Cn extends _e{interpolate_(n,e,s,t){const i=super.interpolate_(n,e,s,t);return On.fromArray(i).normalize().toArray(i),i}}const M={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},H={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},ue={9728:Re,9729:J,9984:He,9985:Pe,9986:Fe,9987:Te},le={33071:De,33648:ke,10497:Z},q={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},$={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},I={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Fn={CUBICSPLINE:void 0,LINEAR:xe,STEP:tn},W={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function Pn(f){return f.DefaultMaterial===void 0&&(f.DefaultMaterial=new Ee({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:rn})),f.DefaultMaterial}function O(f,n,e){for(const s in e.extensions)f[s]===void 0&&(n.userData.gltfExtensions=n.userData.gltfExtensions||{},n.userData.gltfExtensions[s]=e.extensions[s])}function y(f,n){n.extras!==void 0&&(typeof n.extras=="object"?Object.assign(f.userData,n.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+n.extras))}function Hn(f,n,e){let s=!1,t=!1,i=!1;for(let c=0,u=n.length;c<u;c++){const l=n[c];if(l.POSITION!==void 0&&(s=!0),l.NORMAL!==void 0&&(t=!0),l.COLOR_0!==void 0&&(i=!0),s&&t&&i)break}if(!s&&!t&&!i)return Promise.resolve(f);const r=[],a=[],o=[];for(let c=0,u=n.length;c<u;c++){const l=n[c];if(s){const h=l.POSITION!==void 0?e.getDependency("accessor",l.POSITION):f.attributes.position;r.push(h)}if(t){const h=l.NORMAL!==void 0?e.getDependency("accessor",l.NORMAL):f.attributes.normal;a.push(h)}if(i){const h=l.COLOR_0!==void 0?e.getDependency("accessor",l.COLOR_0):f.attributes.color;o.push(h)}}return Promise.all([Promise.all(r),Promise.all(a),Promise.all(o)]).then(function(c){const u=c[0],l=c[1],h=c[2];return s&&(f.morphAttributes.position=u),t&&(f.morphAttributes.normal=l),i&&(f.morphAttributes.color=h),f.morphTargetsRelative=!0,f})}function kn(f,n){if(f.updateMorphTargets(),n.weights!==void 0)for(let e=0,s=n.weights.length;e<s;e++)f.morphTargetInfluences[e]=n.weights[e];if(n.extras&&Array.isArray(n.extras.targetNames)){const e=n.extras.targetNames;if(f.morphTargetInfluences.length===e.length){f.morphTargetDictionary={};for(let s=0,t=e.length;s<t;s++)f.morphTargetDictionary[e[s]]=s}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Dn(f){let n;const e=f.extensions&&f.extensions[g.KHR_DRACO_MESH_COMPRESSION];if(e?n="draco:"+e.bufferView+":"+e.indices+":"+Y(e.attributes):n=f.indices+":"+Y(f.attributes)+":"+f.mode,f.targets!==void 0)for(let s=0,t=f.targets.length;s<t;s++)n+=":"+Y(f.targets[s]);return n}function Y(f){let n="";const e=Object.keys(f).sort();for(let s=0,t=e.length;s<t;s++)n+=e[s]+":"+f[e[s]]+";";return n}function ee(f){switch(f){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function Gn(f){return f.search(/\.jpe?g($|\?)/i)>0||f.search(/^data\:image\/jpeg/)===0?"image/jpeg":f.search(/\.webp($|\?)/i)>0||f.search(/^data\:image\/webp/)===0?"image/webp":f.search(/\.ktx2($|\?)/i)>0||f.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const vn=new K;class Un{constructor(n={},e={}){this.json=n,this.extensions={},this.plugins={},this.options=e,this.cache=new un,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let s=!1,t=-1,i=!1,r=-1;if(typeof navigator<"u"&&typeof navigator.userAgent<"u"){const a=navigator.userAgent;s=/^((?!chrome|android).)*safari/i.test(a)===!0;const o=a.match(/Version\/(\d+)/);t=s&&o?parseInt(o[1],10):-1,i=a.indexOf("Firefox")>-1,r=i?a.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||s&&t<17||i&&r<98?this.textureLoader=new Ie(this.options.manager):this.textureLoader=new Oe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new de(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(n){this.extensions=n}setPlugins(n){this.plugins=n}parse(n,e){const s=this,t=this.json,i=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(r){return r._markDefs&&r._markDefs()}),Promise.all(this._invokeAll(function(r){return r.beforeRoot&&r.beforeRoot()})).then(function(){return Promise.all([s.getDependencies("scene"),s.getDependencies("animation"),s.getDependencies("camera")])}).then(function(r){const a={scene:r[0][t.scene||0],scenes:r[0],animations:r[1],cameras:r[2],asset:t.asset,parser:s,userData:{}};return O(i,a,t),y(a,t),Promise.all(s._invokeAll(function(o){return o.afterRoot&&o.afterRoot(a)})).then(function(){for(const o of a.scenes)o.updateMatrixWorld();n(a)})}).catch(e)}_markDefs(){const n=this.json.nodes||[],e=this.json.skins||[],s=this.json.meshes||[];for(let t=0,i=e.length;t<i;t++){const r=e[t].joints;for(let a=0,o=r.length;a<o;a++)n[r[a]].isBone=!0}for(let t=0,i=n.length;t<i;t++){const r=n[t];r.mesh!==void 0&&(this._addNodeRef(this.meshCache,r.mesh),r.skin!==void 0&&(s[r.mesh].isSkinnedMesh=!0)),r.camera!==void 0&&this._addNodeRef(this.cameraCache,r.camera)}}_addNodeRef(n,e){e!==void 0&&(n.refs[e]===void 0&&(n.refs[e]=n.uses[e]=0),n.refs[e]++)}_getNodeRef(n,e,s){if(n.refs[e]<=1)return s;const t=s.clone(),i=(r,a)=>{const o=this.associations.get(r);o!=null&&this.associations.set(a,o);for(const[c,u]of r.children.entries())i(u,a.children[c])};return i(s,t),t.name+="_instance_"+n.uses[e]++,t}_invokeOne(n){const e=Object.values(this.plugins);e.push(this);for(let s=0;s<e.length;s++){const t=n(e[s]);if(t)return t}return null}_invokeAll(n){const e=Object.values(this.plugins);e.unshift(this);const s=[];for(let t=0;t<e.length;t++){const i=n(e[t]);i&&s.push(i)}return s}getDependency(n,e){const s=n+":"+e;let t=this.cache.get(s);if(!t){switch(n){case"scene":t=this.loadScene(e);break;case"node":t=this._invokeOne(function(i){return i.loadNode&&i.loadNode(e)});break;case"mesh":t=this._invokeOne(function(i){return i.loadMesh&&i.loadMesh(e)});break;case"accessor":t=this.loadAccessor(e);break;case"bufferView":t=this._invokeOne(function(i){return i.loadBufferView&&i.loadBufferView(e)});break;case"buffer":t=this.loadBuffer(e);break;case"material":t=this._invokeOne(function(i){return i.loadMaterial&&i.loadMaterial(e)});break;case"texture":t=this._invokeOne(function(i){return i.loadTexture&&i.loadTexture(e)});break;case"skin":t=this.loadSkin(e);break;case"animation":t=this._invokeOne(function(i){return i.loadAnimation&&i.loadAnimation(e)});break;case"camera":t=this.loadCamera(e);break;default:if(t=this._invokeOne(function(i){return i!=this&&i.getDependency&&i.getDependency(n,e)}),!t)throw new Error("Unknown type: "+n);break}this.cache.add(s,t)}return t}getDependencies(n){let e=this.cache.get(n);if(!e){const s=this,t=this.json[n+(n==="mesh"?"es":"s")]||[];e=Promise.all(t.map(function(i,r){return s.getDependency(n,r)})),this.cache.add(n,e)}return e}loadBuffer(n){const e=this.json.buffers[n],s=this.fileLoader;if(e.type&&e.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+e.type+" buffer type is not supported.");if(e.uri===void 0&&n===0)return Promise.resolve(this.extensions[g.KHR_BINARY_GLTF].body);const t=this.options;return new Promise(function(i,r){s.load(v.resolveURL(e.uri,t.path),i,void 0,function(){r(new Error('THREE.GLTFLoader: Failed to load buffer "'+e.uri+'".'))})})}loadBufferView(n){const e=this.json.bufferViews[n];return this.getDependency("buffer",e.buffer).then(function(s){const t=e.byteLength||0,i=e.byteOffset||0;return s.slice(i,i+t)})}loadAccessor(n){const e=this,s=this.json,t=this.json.accessors[n];if(t.bufferView===void 0&&t.sparse===void 0){const r=q[t.type],a=H[t.componentType],o=t.normalized===!0,c=new a(t.count*r);return Promise.resolve(new V(c,r,o))}const i=[];return t.bufferView!==void 0?i.push(this.getDependency("bufferView",t.bufferView)):i.push(null),t.sparse!==void 0&&(i.push(this.getDependency("bufferView",t.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",t.sparse.values.bufferView))),Promise.all(i).then(function(r){const a=r[0],o=q[t.type],c=H[t.componentType],u=c.BYTES_PER_ELEMENT,l=u*o,h=t.byteOffset||0,d=t.bufferView!==void 0?s.bufferViews[t.bufferView].byteStride:void 0,p=t.normalized===!0;let R,m;if(d&&d!==l){const T=Math.floor(h/d),A="InterleavedBuffer:"+t.bufferView+":"+t.componentType+":"+T+":"+t.count;let x=e.cache.get(A);x||(R=new c(a,T*d,t.count*d/u),x=new Ce(R,d/u),e.cache.add(A,x)),m=new sn(x,o,h%d/u,p)}else a===null?R=new c(t.count*o):R=new c(a,h,t.count*o),m=new V(R,o,p);if(t.sparse!==void 0){const T=q.SCALAR,A=H[t.sparse.indices.componentType],x=t.sparse.indices.byteOffset||0,E=t.sparse.values.byteOffset||0,L=new A(r[1],x,t.sparse.count*T),b=new c(r[2],E,t.sparse.count*o);a!==null&&(m=new V(m.array.slice(),m.itemSize,m.normalized)),m.normalized=!1;for(let S=0,k=L.length;S<k;S++){const P=L[S];if(m.setX(P,b[S*o]),o>=2&&m.setY(P,b[S*o+1]),o>=3&&m.setZ(P,b[S*o+2]),o>=4&&m.setW(P,b[S*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}m.normalized=p}return m})}loadTexture(n){const e=this.json,s=this.options,i=e.textures[n].source,r=e.images[i];let a=this.textureLoader;if(r.uri){const o=s.manager.getHandler(r.uri);o!==null&&(a=o)}return this.loadTextureImage(n,i,a)}loadTextureImage(n,e,s){const t=this,i=this.json,r=i.textures[n],a=i.images[e],o=(a.uri||a.bufferView)+":"+r.sampler;if(this.textureCache[o])return this.textureCache[o];const c=this.loadImageSource(e,s).then(function(u){u.flipY=!1,u.name=r.name||a.name||"",u.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(u.name=a.uri);const h=(i.samplers||{})[r.sampler]||{};return u.magFilter=ue[h.magFilter]||J,u.minFilter=ue[h.minFilter]||Te,u.wrapS=le[h.wrapS]||Z,u.wrapT=le[h.wrapT]||Z,u.generateMipmaps=!u.isCompressedTexture&&u.minFilter!==Re&&u.minFilter!==J,t.associations.set(u,{textures:n}),u}).catch(function(){return null});return this.textureCache[o]=c,c}loadImageSource(n,e){const s=this,t=this.json,i=this.options;if(this.sourceCache[n]!==void 0)return this.sourceCache[n].then(l=>l.clone());const r=t.images[n],a=self.URL||self.webkitURL;let o=r.uri||"",c=!1;if(r.bufferView!==void 0)o=s.getDependency("bufferView",r.bufferView).then(function(l){c=!0;const h=new Blob([l],{type:r.mimeType});return o=a.createObjectURL(h),o});else if(r.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+n+" is missing URI and bufferView");const u=Promise.resolve(o).then(function(l){return new Promise(function(h,d){let p=h;e.isImageBitmapLoader===!0&&(p=function(R){const m=new ne(R);m.needsUpdate=!0,h(m)}),e.load(v.resolveURL(l,i.path),p,void 0,d)})}).then(function(l){return c===!0&&a.revokeObjectURL(o),y(l,r),l.userData.mimeType=r.mimeType||Gn(r.uri),l}).catch(function(l){throw console.error("THREE.GLTFLoader: Couldn't load texture",o),l});return this.sourceCache[n]=u,u}assignTexture(n,e,s,t){const i=this;return this.getDependency("texture",s.index).then(function(r){if(!r)return null;if(s.texCoord!==void 0&&s.texCoord>0&&(r=r.clone(),r.channel=s.texCoord),i.extensions[g.KHR_TEXTURE_TRANSFORM]){const a=s.extensions!==void 0?s.extensions[g.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const o=i.associations.get(r);r=i.extensions[g.KHR_TEXTURE_TRANSFORM].extendTexture(r,a),i.associations.set(r,o)}}return t!==void 0&&(r.colorSpace=t),n[e]=r,r})}assignFinalMaterial(n){const e=n.geometry;let s=n.material;const t=e.attributes.tangent===void 0,i=e.attributes.color!==void 0,r=e.attributes.normal===void 0;if(n.isPoints){const a="PointsMaterial:"+s.uuid;let o=this.cache.get(a);o||(o=new Ge,X.prototype.copy.call(o,s),o.color.copy(s.color),o.map=s.map,o.sizeAttenuation=!1,this.cache.add(a,o)),s=o}else if(n.isLine){const a="LineBasicMaterial:"+s.uuid;let o=this.cache.get(a);o||(o=new ve,X.prototype.copy.call(o,s),o.color.copy(s.color),o.map=s.map,this.cache.add(a,o)),s=o}if(t||i||r){let a="ClonedMaterial:"+s.uuid+":";t&&(a+="derivative-tangents:"),i&&(a+="vertex-colors:"),r&&(a+="flat-shading:");let o=this.cache.get(a);o||(o=s.clone(),i&&(o.vertexColors=!0),r&&(o.flatShading=!0),t&&(o.normalScale&&(o.normalScale.y*=-1),o.clearcoatNormalScale&&(o.clearcoatNormalScale.y*=-1)),this.cache.add(a,o),this.associations.set(o,this.associations.get(s))),s=o}n.material=s}getMaterialType(){return Ee}loadMaterial(n){const e=this,s=this.json,t=this.extensions,i=s.materials[n];let r;const a={},o=i.extensions||{},c=[];if(o[g.KHR_MATERIALS_UNLIT]){const l=t[g.KHR_MATERIALS_UNLIT];r=l.getMaterialType(),c.push(l.extendParams(a,i,e))}else{const l=i.pbrMetallicRoughness||{};if(a.color=new F(1,1,1),a.opacity=1,Array.isArray(l.baseColorFactor)){const h=l.baseColorFactor;a.color.setRGB(h[0],h[1],h[2],N),a.opacity=h[3]}l.baseColorTexture!==void 0&&c.push(e.assignTexture(a,"map",l.baseColorTexture,U)),a.metalness=l.metallicFactor!==void 0?l.metallicFactor:1,a.roughness=l.roughnessFactor!==void 0?l.roughnessFactor:1,l.metallicRoughnessTexture!==void 0&&(c.push(e.assignTexture(a,"metalnessMap",l.metallicRoughnessTexture)),c.push(e.assignTexture(a,"roughnessMap",l.metallicRoughnessTexture))),r=this._invokeOne(function(h){return h.getMaterialType&&h.getMaterialType(n)}),c.push(Promise.all(this._invokeAll(function(h){return h.extendMaterialParams&&h.extendMaterialParams(n,a)})))}i.doubleSided===!0&&(a.side=Ue);const u=i.alphaMode||W.OPAQUE;if(u===W.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,u===W.MASK&&(a.alphaTest=i.alphaCutoff!==void 0?i.alphaCutoff:.5)),i.normalTexture!==void 0&&r!==G&&(c.push(e.assignTexture(a,"normalMap",i.normalTexture)),a.normalScale=new pe(1,1),i.normalTexture.scale!==void 0)){const l=i.normalTexture.scale;a.normalScale.set(l,l)}if(i.occlusionTexture!==void 0&&r!==G&&(c.push(e.assignTexture(a,"aoMap",i.occlusionTexture)),i.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=i.occlusionTexture.strength)),i.emissiveFactor!==void 0&&r!==G){const l=i.emissiveFactor;a.emissive=new F().setRGB(l[0],l[1],l[2],N)}return i.emissiveTexture!==void 0&&r!==G&&c.push(e.assignTexture(a,"emissiveMap",i.emissiveTexture,U)),Promise.all(c).then(function(){const l=new r(a);return i.name&&(l.name=i.name),y(l,i),e.associations.set(l,{materials:n}),i.extensions&&O(t,l,i),l})}createUniqueName(n){const e=Ke.sanitizeNodeName(n||"");return e in this.nodeNamesUsed?e+"_"+ ++this.nodeNamesUsed[e]:(this.nodeNamesUsed[e]=0,e)}loadGeometries(n){const e=this,s=this.extensions,t=this.primitiveCache;function i(a){return s[g.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(o){return fe(o,a,e)})}const r=[];for(let a=0,o=n.length;a<o;a++){const c=n[a],u=Dn(c),l=t[u];if(l)r.push(l.promise);else{let h;c.extensions&&c.extensions[g.KHR_DRACO_MESH_COMPRESSION]?h=i(c):h=fe(new Be,c,e),t[u]={primitive:c,promise:h},r.push(h)}}return Promise.all(r)}loadMesh(n){const e=this,s=this.json,t=this.extensions,i=s.meshes[n],r=i.primitives,a=[];for(let o=0,c=r.length;o<c;o++){const u=r[o].material===void 0?Pn(this.cache):this.getDependency("material",r[o].material);a.push(u)}return a.push(e.loadGeometries(r)),Promise.all(a).then(function(o){const c=o.slice(0,o.length-1),u=o[o.length-1],l=[];for(let d=0,p=u.length;d<p;d++){const R=u[d],m=r[d];let T;const A=c[d];if(m.mode===M.TRIANGLES||m.mode===M.TRIANGLE_STRIP||m.mode===M.TRIANGLE_FAN||m.mode===void 0)T=i.isSkinnedMesh===!0?new je(R,A):new Ve(R,A),T.isSkinnedMesh===!0&&T.normalizeSkinWeights(),m.mode===M.TRIANGLE_STRIP?T.geometry=oe(T.geometry,he):m.mode===M.TRIANGLE_FAN&&(T.geometry=oe(T.geometry,Q));else if(m.mode===M.LINES)T=new Xe(R,A);else if(m.mode===M.LINE_STRIP)T=new ze(R,A);else if(m.mode===M.LINE_LOOP)T=new qe(R,A);else if(m.mode===M.POINTS)T=new We(R,A);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+m.mode);Object.keys(T.geometry.morphAttributes).length>0&&kn(T,i),T.name=e.createUniqueName(i.name||"mesh_"+n),y(T,i),m.extensions&&O(t,T,m),e.assignFinalMaterial(T),l.push(T)}for(let d=0,p=l.length;d<p;d++)e.associations.set(l[d],{meshes:n,primitives:d});if(l.length===1)return i.extensions&&O(t,l[0],i),l[0];const h=new z;i.extensions&&O(t,h,i),e.associations.set(h,{meshes:n});for(let d=0,p=l.length;d<p;d++)h.add(l[d]);return h})}loadCamera(n){let e;const s=this.json.cameras[n],t=s[s.type];if(!t){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return s.type==="perspective"?e=new Ye(Qe.radToDeg(t.yfov),t.aspectRatio||1,t.znear||1,t.zfar||2e6):s.type==="orthographic"&&(e=new Je(-t.xmag,t.xmag,t.ymag,-t.ymag,t.znear,t.zfar)),s.name&&(e.name=this.createUniqueName(s.name)),y(e,s),Promise.resolve(e)}loadSkin(n){const e=this.json.skins[n],s=[];for(let t=0,i=e.joints.length;t<i;t++)s.push(this._loadNodeShallow(e.joints[t]));return e.inverseBindMatrices!==void 0?s.push(this.getDependency("accessor",e.inverseBindMatrices)):s.push(null),Promise.all(s).then(function(t){const i=t.pop(),r=t,a=[],o=[];for(let c=0,u=r.length;c<u;c++){const l=r[c];if(l){a.push(l);const h=new K;i!==null&&h.fromArray(i.array,c*16),o.push(h)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',e.joints[c])}return new Ze(a,o)})}loadAnimation(n){const e=this.json,s=this,t=e.animations[n],i=t.name?t.name:"animation_"+n,r=[],a=[],o=[],c=[],u=[];for(let l=0,h=t.channels.length;l<h;l++){const d=t.channels[l],p=t.samplers[d.sampler],R=d.target,m=R.node,T=t.parameters!==void 0?t.parameters[p.input]:p.input,A=t.parameters!==void 0?t.parameters[p.output]:p.output;R.node!==void 0&&(r.push(this.getDependency("node",m)),a.push(this.getDependency("accessor",T)),o.push(this.getDependency("accessor",A)),c.push(p),u.push(R))}return Promise.all([Promise.all(r),Promise.all(a),Promise.all(o),Promise.all(c),Promise.all(u)]).then(function(l){const h=l[0],d=l[1],p=l[2],R=l[3],m=l[4],T=[];for(let x=0,E=h.length;x<E;x++){const L=h[x],b=d[x],S=p[x],k=R[x],P=m[x];if(L===void 0)continue;L.updateMatrix&&L.updateMatrix();const B=s._createAnimationTracks(L,b,S,k,P);if(B)for(let j=0;j<B.length;j++)T.push(B[j])}const A=new $e(i,void 0,T);return y(A,t),A})}createNodeMesh(n){const e=this.json,s=this,t=e.nodes[n];return t.mesh===void 0?null:s.getDependency("mesh",t.mesh).then(function(i){const r=s._getNodeRef(s.meshCache,t.mesh,i);return t.weights!==void 0&&r.traverse(function(a){if(a.isMesh)for(let o=0,c=t.weights.length;o<c;o++)a.morphTargetInfluences[o]=t.weights[o]}),r})}loadNode(n){const e=this.json,s=this,t=e.nodes[n],i=s._loadNodeShallow(n),r=[],a=t.children||[];for(let c=0,u=a.length;c<u;c++)r.push(s.getDependency("node",a[c]));const o=t.skin===void 0?Promise.resolve(null):s.getDependency("skin",t.skin);return Promise.all([i,Promise.all(r),o]).then(function(c){const u=c[0],l=c[1],h=c[2];h!==null&&u.traverse(function(d){d.isSkinnedMesh&&d.bind(h,vn)});for(let d=0,p=l.length;d<p;d++)u.add(l[d]);if(u.userData.pivot!==void 0&&l.length>0){const d=u.userData.pivot,p=l[0];u.pivot=new C().fromArray(d),u.position.x-=d[0],u.position.y-=d[1],u.position.z-=d[2],p.position.set(0,0,0),delete u.userData.pivot}return u})}_loadNodeShallow(n){const e=this.json,s=this.extensions,t=this;if(this.nodeCache[n]!==void 0)return this.nodeCache[n];const i=e.nodes[n],r=i.name?t.createUniqueName(i.name):"",a=[],o=t._invokeOne(function(c){return c.createNodeMesh&&c.createNodeMesh(n)});return o&&a.push(o),i.camera!==void 0&&a.push(t.getDependency("camera",i.camera).then(function(c){return t._getNodeRef(t.cameraCache,i.camera,c)})),t._invokeAll(function(c){return c.createNodeAttachment&&c.createNodeAttachment(n)}).forEach(function(c){a.push(c)}),this.nodeCache[n]=Promise.all(a).then(function(c){let u;if(i.isBone===!0?u=new en:c.length>1?u=new z:c.length===1?u=c[0]:u=new ge,u!==c[0])for(let l=0,h=c.length;l<h;l++)u.add(c[l]);if(i.name&&(u.userData.name=i.name,u.name=r),y(u,i),i.extensions&&O(s,u,i),i.matrix!==void 0){const l=new K;l.fromArray(i.matrix),u.applyMatrix4(l)}else i.translation!==void 0&&u.position.fromArray(i.translation),i.rotation!==void 0&&u.quaternion.fromArray(i.rotation),i.scale!==void 0&&u.scale.fromArray(i.scale);if(!t.associations.has(u))t.associations.set(u,{});else if(i.mesh!==void 0&&t.meshCache.refs[i.mesh]>1){const l=t.associations.get(u);t.associations.set(u,{...l})}return t.associations.get(u).nodes=n,u}),this.nodeCache[n]}loadScene(n){const e=this.extensions,s=this.json.scenes[n],t=this,i=new z;s.name&&(i.name=t.createUniqueName(s.name)),y(i,s),s.extensions&&O(e,i,s);const r=s.nodes||[],a=[];for(let o=0,c=r.length;o<c;o++)a.push(t.getDependency("node",r[o]));return Promise.all(a).then(function(o){for(let u=0,l=o.length;u<l;u++){const h=o[u];h.parent!==null?i.add(nn(h)):i.add(h)}const c=u=>{const l=new Map;for(const[h,d]of t.associations)(h instanceof X||h instanceof ne)&&l.set(h,d);return u.traverse(h=>{const d=t.associations.get(h);d!=null&&l.set(h,d)}),l};return t.associations=c(i),i})}_createAnimationTracks(n,e,s,t,i){const r=[],a=n.name?n.name:n.uuid,o=[];function c(d){d.morphTargetInfluences&&o.push(d.name?d.name:d.uuid)}I[i.path]===I.weights?(c(n),n.isGroup&&n.children.forEach(c)):o.push(a);let u;switch(I[i.path]){case I.weights:u=se;break;case I.rotation:u=ie;break;case I.translation:case I.scale:u=te;break;default:switch(s.itemSize){case 1:u=se;break;case 2:case 3:default:u=te;break}break}const l=t.interpolation!==void 0?Fn[t.interpolation]:xe,h=this._getArrayFromAccessor(s);for(let d=0,p=o.length;d<p;d++){const R=new u(o[d]+"."+I[i.path],e.array,h,l);t.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(R),r.push(R)}return r}_getArrayFromAccessor(n){let e=n.array;if(n.normalized){const s=ee(e.constructor),t=new Float32Array(e.length);for(let i=0,r=e.length;i<r;i++)t[i]=e[i]*s;e=t}return e}_createCubicSplineTrackInterpolant(n){n.createInterpolant=function(s){const t=this instanceof ie?Cn:_e;return new t(this.times,this.values,this.getValueSize()/3,s)},n.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function Kn(f,n,e){const s=n.attributes,t=new an;if(s.POSITION!==void 0){const a=e.json.accessors[s.POSITION],o=a.min,c=a.max;if(o!==void 0&&c!==void 0){if(t.set(new C(o[0],o[1],o[2]),new C(c[0],c[1],c[2])),a.normalized){const u=ee(H[a.componentType]);t.min.multiplyScalar(u),t.max.multiplyScalar(u)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const i=n.targets;if(i!==void 0){const a=new C,o=new C;for(let c=0,u=i.length;c<u;c++){const l=i[c];if(l.POSITION!==void 0){const h=e.json.accessors[l.POSITION],d=h.min,p=h.max;if(d!==void 0&&p!==void 0){if(o.setX(Math.max(Math.abs(d[0]),Math.abs(p[0]))),o.setY(Math.max(Math.abs(d[1]),Math.abs(p[1]))),o.setZ(Math.max(Math.abs(d[2]),Math.abs(p[2]))),h.normalized){const R=ee(H[h.componentType]);o.multiplyScalar(R)}a.max(o)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}t.expandByVector(a)}f.boundingBox=t;const r=new cn;t.getCenter(r.center),r.radius=t.min.distanceTo(t.max)/2,f.boundingSphere=r}function fe(f,n,e){const s=n.attributes,t=[];function i(r,a){return e.getDependency("accessor",r).then(function(o){f.setAttribute(a,o)})}for(const r in s){const a=$[r]||r.toLowerCase();a in f.attributes||t.push(i(s[r],a))}if(n.indices!==void 0&&!f.index){const r=e.getDependency("accessor",n.indices).then(function(a){f.setIndex(a)});t.push(r)}return re.workingColorSpace!==N&&"COLOR_0"in s&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${re.workingColorSpace}" not supported.`),y(f,n),Kn(f,n,e),Promise.all(t).then(function(){return n.targets!==void 0?Hn(f,n.targets,e):f})}export{jn as GLTFLoader};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{aP as d,_ as l,b2 as o,b3 as m,b4 as g,b5 as f}from"./rr0-scene.mjs";import{P as u,S as b,a as y,c as T,b as A,E}from"./ParameterForm-BNfKnqZ4.js";const w=d.catalog({en:()=>l(()=>import("./LanternParameterTexts_en-CcnGd8UH.js"),[],import.meta.url).then(a=>a.lanternParameterTexts_en),fr:()=>l(()=>import("./LanternParameterTexts_fr-P2JwYOUy.js"),[],import.meta.url).then(a=>a.lanternParameterTexts_fr),es:()=>l(()=>import("./LanternParameterTexts_es-CUTgNutZ.js"),[],import.meta.url).then(a=>a.lanternParameterTexts_es),it:()=>l(()=>import("./LanternParameterTexts_it-CzNnIUrX.js"),[],import.meta.url).then(a=>a.lanternParameterTexts_it)});class i{static RELEASE="letGo";static LANTERNS="lanterns";static AIR="air";static LANTERN="eachLantern";static instant(e,t,n){return{type:"number",key:e,min:-36e3,max:36e3,step:1,unit:"s",scale:.001,required:!0,label:t,hint:n,group:i.LANTERNS}}static wind(e,t,n,s){return[{type:"number",key:`${e}.towardDeg`,min:0,max:360,step:1,unit:"°",group:i.AIR,hint:s,label:t},{type:"number",key:`${e}.speedMS`,min:0,max:60,step:.1,unit:"m/s",group:i.AIR,label:n}]}static SET={kind:"lantern",title:"skyLanterns",parameters:[{type:"said",key:"title",label:"name",group:i.RELEASE},{type:"position",key:"site.eastM",secondKey:"site.northM",saidKey:"site.saidPosition",native:"local",step:1,rangeM:1e5,group:i.RELEASE,label:"whereTheyAreLetGo",hint:"whereTheyAreLetGoFrom"},{type:"number",key:"site.altitudeM",min:-1e3,max:5e3,step:.1,unit:"m",group:i.RELEASE,effective:()=>0,label:"heightAboveThePlaceSGround",hint:"aGardenOnAHillAbove"},{type:"number",key:"site.originElevationM",min:-500,max:6e3,step:1,unit:"m",group:i.RELEASE,effective:()=>0,label:"thePlaceSGroundAboveThe",hint:"whatSetsHowThinTheAir"},{type:"number",key:"group.count",min:1,max:200,step:1,required:!0,group:i.LANTERNS,label:"howMany"},i.instant("group.fromT","firstLetGoAt","secondsOfTheRecordingBeforeIts"),i.instant("group.untilT","lastLetGoAt","secondsOfTheRecordingTheOthers"),{type:"number",key:"group.radiusM",min:0,max:5e3,step:1,unit:"m",group:i.LANTERNS,effective:()=>20,label:"letGoWithin",hint:"aCrowdLetsThemGoA"},{type:"number",key:"group.burnS.min",min:10,max:3600,step:1,unit:"s",group:i.LANTERNS,effective:()=>480,label:"burnsAtLeast",hint:"howLongEachBurnsFromWhen"},{type:"number",key:"group.burnS.max",min:10,max:3600,step:1,unit:"s",group:i.LANTERNS,effective:()=>900,label:"burnsAtMost"},{type:"number",key:"group.insideExcessK.min",min:10,max:400,step:1,unit:"K",group:i.LANTERNS,effective:()=>125,label:"hotterThanTheAirAtLeast",hint:"howMuchHotterThanTheAir"},{type:"number",key:"group.insideExcessK.max",min:10,max:400,step:1,unit:"K",group:i.LANTERNS,effective:()=>175,label:"hotterThanTheAirAtMost"},{type:"number",key:"group.burnedS",min:0,max:3600,step:1,unit:"s",group:i.LANTERNS,effective:()=>0,label:"alreadyBurntWhenLetGo",hint:"forLanternsTheAccountOnlyHas"},{type:"number",key:"group.seed",min:0,max:4294967295,step:1,group:i.LANTERNS,effective:()=>1,label:"draw",hint:"whatTheDrawsStartFromAnother"},{type:"set",key:"group.explains",group:i.LANTERNS,label:"standForTheShapes",options:(e,t)=>{const n=t?.shapes??[],s=(e.group?.explains??[]).filter(r=>!n.some(h=>h.value===r));return[...n,...s.map(r=>({value:r,label:r}))]},empty:"noShape"},...i.wind("wind","windAtTheGroundTowards","windAtTheGroundSpeed","whereItBlowsTowardsWhichIs"),...i.wind("windAloft","windAloftTowards","windAloftSpeed","theWindHigherUpBlendedWith"),{type:"number",key:"windAloft.atM",min:10,max:1e4,step:10,unit:"m",group:i.AIR,label:"windAloftAt",hint:"metresAboveWhereTheyAreLet"},{type:"number",key:"airTemperatureC",min:-60,max:50,step:.5,unit:"°C",group:i.AIR,effective:()=>10,label:"airTemperature",hint:"atTheGroundFallingBy6"},{type:"number",key:"turbulence.horizontalMS",min:0,max:10,step:.1,unit:"m/s",group:i.AIR,effective:()=>o.TURBULENCE.horizontalMS,label:"gustsAcross",hint:"howFarTheAirSSpeed"},{type:"number",key:"turbulence.verticalMS",min:0,max:10,step:.1,unit:"m/s",group:i.AIR,effective:()=>o.TURBULENCE.verticalMS,label:"gustsUpAndDown"},{type:"number",key:"turbulence.timescaleS",min:1,max:600,step:1,unit:"s",group:i.AIR,effective:()=>o.TURBULENCE.timescaleS,label:"aGustLasts"},{type:"number",key:"lantern.luminousIntensityCd",min:.1,max:1e3,step:.1,unit:"cd",group:i.LANTERN,effective:()=>o.COMMON.luminousIntensityCd,label:"light",hint:"itsFlameSLightThroughThe"},{type:"choice",key:"lantern.shape",group:i.LANTERN,effective:()=>o.COMMON.shape,label:"shape",choices:[{value:"classic",label:"roundAtTheMouthSquareAt"},{value:"balloon",label:"balloonLobedTop"}]},{type:"colour",key:"lantern.paperColor",group:i.LANTERN,fallback:o.COMMON.paperColor,label:"paperColour",hint:"whatItLooksLikeByDay"},{type:"colour",key:"lantern.color",group:i.LANTERN,fallback:o.COMMON.color,label:"flameLight",hint:"itsFlameSLightThroughWhite"},{type:"number",key:"lantern.envelopeVolumeM3",min:.01,max:10,step:.01,unit:"m³",group:i.LANTERN,effective:()=>o.COMMON.envelopeVolumeM3,label:"airItHolds"},{type:"number",key:"lantern.massKg",min:.005,max:5,step:.001,unit:"kg",group:i.LANTERN,effective:()=>o.COMMON.massKg,label:"weightWhenLetGo"}]};static publish(){u.publish(i.SET)}}const v=d.catalog({en:()=>l(()=>import("./LanternEditorMessages_en-DaT3UNfD.js"),[],import.meta.url).then(a=>a.lanternEditorMessages_en),fr:()=>l(()=>import("./LanternEditorMessages_fr-9mByTFMG.js"),[],import.meta.url).then(a=>a.lanternEditorMessages_fr),es:()=>l(()=>import("./LanternEditorMessages_es-TDV5lKeJ.js"),[],import.meta.url).then(a=>a.lanternEditorMessages_es),it:()=>l(()=>import("./LanternEditorMessages_it-MRkJnDQp.js"),[],import.meta.url).then(a=>a.lanternEditorMessages_it)});class p{constructor(e,t,n){this.container=e,this.host=t,b.attach(e,"lantern-editor-part",p.STYLE),this.language=n,u.of("lantern")||i.publish(),this.ready=this.setLanguage(n)}messages;ready;parameterTexts;languageToken=0;currentId;form;list;language;shown=[];static STYLE='.lantern-editor-part { flex-basis: 100%; min-width: 0; } .lantern-editor-part #lantern-list { flex-basis: 100%; min-width: 0; } .lantern-editor-part .launch-editor, .lantern-editor-part .launch-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; } .lantern-editor-part .launch-fields { flex-basis: 100%; min-width: 0; } .lantern-editor-part [hidden] { display: none !important; } .lantern-editor-part select { min-width: 0; width: 100%; } .lantern-editor-part .launch-intro { flex-basis: 100%; margin: 0; } .lantern-editor-part .launch-parameters { flex-basis: 100%; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; } .lantern-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; } .lantern-editor-part input, .lantern-editor-part select { max-width: 100%; box-sizing: border-box; } .lantern-editor-part input[type="text"] { width: 12em; } .lantern-editor-part label { min-width: 0; max-width: 100%; } .lantern-editor-part input.parameter-derived::placeholder { opacity: .65; }';async setLanguage(e){const t=++this.languageToken;this.language=e;const[n,s]=await Promise.all([v.load(e),w.load(e)]);t===this.languageToken&&(this.messages=n,this.parameterTexts=s,this.render(),this.sync())}sync(){if(!this.messages)return;const e=this.launches;this.shown=[...e],e.some(r=>r.id===this.currentId)||(this.currentId=e[0]?.id),this.list?.setItems(e.map(r=>({id:r.id,label:this.labelOf(r)})),this.currentId),this.syncAddState();const t=this.current;if(this.element("lantern-fields").hidden=t===void 0,!t)return;const n=t.releases?.length??0,s=this.element("lantern-releases");s.hidden=n===0,s.textContent=this.messages.releasesNote.replace("{n}",String(n)),this.form??=new y(this.element("lantern-parameters"),this.language,"lantern.",{said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()}),this.form.show(this.resolved(i.SET),new T(()=>this.current,r=>this.editLaunch(h=>r(h)),()=>({shapes:this.host.shapes().map(r=>({value:r.id,label:r.label}))}),this.host.positionPlace?.()),()=>this.written())}refresh(){if(!this.messages)return;this.syncAddState();const e=this.launches;e.length===this.shown.length&&e.every((t,n)=>t.id===this.shown[n].id)||this.sync()}syncAddState(){const e=this.siteOfNew()!==void 0;this.list?.setAddState(e,e?void 0:this.messages.addLaunchNowhere)}get current(){return this.launches.find(e=>e.id===this.currentId)}resolved(e){return A.resolve(e,this.parameterTexts)}render(){if(!this.messages)return;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="lantern-list"></div>
|
|
4
|
+
<div id="lantern-fields" class="launch-fields">
|
|
5
|
+
<div id="lantern-parameters" class="launch-parameters"></div>
|
|
6
|
+
<p id="lantern-releases" class="launch-intro" hidden></p>
|
|
7
|
+
<p class="launch-intro">${e.derivedNote}</p>
|
|
8
|
+
</div>
|
|
9
|
+
</div>`,this.list=new E({header:this.element("lantern-list"),body:this.element("lantern-fields"),ids:{list:"lantern-select",remove:"lantern-delete",add:"lantern-add"},onSelect:t=>{this.currentId=t,this.sync()},onAdd:()=>this.addLaunch(),onRemove:()=>this.deleteCurrent()}),this.list.setLabels({list:e.launch,remove:e.deleteLaunch,add:e.addLaunch,empty:e.none})}written(){const e=this.current;e&&this.list?.rename(e.id,this.labelOf(e))}editLaunch(e){const t=this.current;if(!t)return;const n=structuredClone(t);e(n),this.writeLaunches(this.launches.map(s=>s===t?n:s)),this.host.changed()}siteOfNew(){const e=this.host.sighting(),t=e.event?.place?.[0];if(t?.lat===void 0||t.lng===void 0)return;const n=e.observerTrack?.getInterpolatedPoseAt(0),s=(n?.headingDeg??0)*Math.PI/180,r=111320,h=n?.lng!==void 0?(n.lng-t.lng)*r*Math.cos(t.lat*Math.PI/180):0,c=n?.lat!==void 0?(n.lat-t.lat)*r:0;return{eastM:Math.round(h+1500*Math.sin(s)),northM:Math.round(c+1500*Math.cos(s))}}addLaunch(){const e=this.siteOfNew();if(!e)return;let t=this.launches.length+1;for(;this.launches.some(r=>r.id===`lanterns-${t}`);)t++;const n=m(this.host.sighting(),0),s={id:`lanterns-${t}`,site:e,group:{count:12,fromT:0,untilT:12e4,seed:t},wind:{towardDeg:Math.round((n.windDirectionDeg+180)%360),speedMS:Math.round(n.windSpeed*10)/10}};this.writeLaunches([...this.launches,s]),this.currentId=s.id,this.host.changed(),this.sync()}deleteCurrent(){const e=this.current;e&&(this.currentId=void 0,this.writeLaunches(this.launches.filter(t=>t!==e)),this.host.changed(),this.sync())}writeLaunches(e){const t=this.host.sighting(),n={...t.interpretation??{bodies:[]},lanterns:e.length>0?e:void 0};n.lanterns===void 0&&delete n.lanterns;const s=g.saysNothing(n,f.kinds());t.interpretation=s?void 0:n}labelOf(e){const t=this.host.said().read(e.title);return t?`${t} (${e.id})`:e.id}get launches(){return this.host.sighting().interpretation?.lanterns??[]}element(e){return this.container.querySelector(`#${e}`)}}export{p as LanternEditor};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={title:"Lanterns"};export{e as lanternKindMessages_en};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={title:"Farolillos"};export{e as lanternKindMessages_es};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={title:"Lanternes"};export{e as lanternKindMessages_fr};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={title:"Lanterne"};export{e as lanternKindMessages_it};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={letGo:"Let go",lanterns:"Lanterns",air:"Air",eachLantern:"Each lantern",skyLanterns:"Sky lanterns",name:"Name",whereTheyAreLetGo:"Where they are let go",whereTheyAreLetGoFrom:"Where they are let go: from the witness, from something else in the scene, or as a latitude and a longitude.",heightAboveThePlaceSGround:"Height above the place's ground",aGardenOnAHillAbove:"A garden on a hill above the place, a roof.",thePlaceSGroundAboveThe:"The place's ground above the sea",whatSetsHowThinTheAir:"What sets how thin the air they climb into is: a lantern climbs less high from a mountain town.",howMany:"How many",firstLetGoAt:"First let go at",secondsOfTheRecordingBeforeIts:"Seconds of the recording: before its start (negative) for lanterns already up when it begins.",lastLetGoAt:"Last let go at",secondsOfTheRecordingTheOthers:"Seconds of the recording; the others in between, about evenly.",letGoWithin:"Let go within",aCrowdLetsThemGoA:"A crowd lets them go a few metres apart.",burnsAtLeast:"Burns at least",howLongEachBurnsFromWhen:"How long each burns from when it is let go, drawn between the two: 8 to 15 minutes by the sellers. It vanishes when it goes out.",burnsAtMost:"Burns at most",hotterThanTheAirAtLeast:"Hotter than the air, at least",howMuchHotterThanTheAir:"How much hotter than the air its air is at full burn, drawn between the two: what sets how fast it climbs, and so how high it gets.",hotterThanTheAirAtMost:"Hotter than the air, at most",alreadyBurntWhenLetGo:"Already burnt when let go",forLanternsTheAccountOnlyHas:"For lanterns the account only has from where they were first seen, already up and partly burnt.",draw:"Draw",whatTheDrawsStartFromAnother:"What the draws start from: another number, other lanterns within the same bounds, the same each time for the same number.",standForTheShapes:"Stand for the shapes",noShape:"No shape",windAtTheGroundTowards:"Wind at the ground, towards",windAtTheGroundSpeed:"Wind at the ground, speed",whereItBlowsTowardsWhichIs:"Where it blows TOWARDS, which is where the lanterns go: the opposite of where a weather report says it comes from.",windAloftTowards:"Wind aloft, towards",windAloftSpeed:"Wind aloft, speed",theWindHigherUpBlendedWith:"The wind higher up, blended with the ground's in between: what makes lanterns let go at one spot part ways as they climb.",windAloftAt:"Wind aloft, at",metresAboveWhereTheyAreLet:"Metres above where they are let go.",airTemperature:"Air temperature",atTheGroundFallingBy6:"At the ground, falling by 6.5 °C a kilometre above: what their hot air is lighter than. A cold night lifts them higher.",gustsAcross:"Gusts, across",howFarTheAirSSpeed:"How far the air's speed strays from the wind's, each lantern meeting its own gusts: what stretches a group into a shifting string. 0 for a still air.",gustsUpAndDown:"Gusts, up and down",aGustLasts:"A gust lasts",light:"Light",itsFlameSLightThroughThe:"Its flame's light through the paper, at full burn.",shape:"Shape",roundAtTheMouthSquareAt:"Round at the mouth, square at the top",balloonLobedTop:"Balloon, lobed top",paperColour:"Paper colour",whatItLooksLikeByDay:"What it looks like by day; by night, what its flame's light comes through.",flameLight:"Flame light",itsFlameSLightThroughWhite:"Its flame's light through white paper.",airItHolds:"Air it holds",weightWhenLetGo:"Weight when let go"};export{e as lanternParameterTexts_en};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={letGo:"Suelta",lanterns:"Farolillos",air:"Aire",eachLantern:"Cada farolillo",skyLanterns:"Farolillos voladores",name:"Nombre",whereTheyAreLetGo:"Lugar de la suelta",whereTheyAreLetGoFrom:"Desde dónde se sueltan: respecto al testigo, a otra cosa de la escena, o en latitud y longitud.",heightAboveThePlaceSGround:"Altura sobre el suelo del lugar",aGardenOnAHillAbove:"Un jardín en una colina sobre el lugar, un tejado.",thePlaceSGroundAboveThe:"Suelo del lugar sobre el mar",whatSetsHowThinTheAir:"Lo que fija lo enrarecido del aire en que suben: un farolillo sube menos desde un pueblo de montaña.",howMany:"Cuántos",firstLetGoAt:"Primero soltado a",secondsOfTheRecordingBeforeIts:"Segundos de la grabación: antes de su inicio (negativo) para farolillos ya en el aire cuando empieza.",lastLetGoAt:"Último soltado a",secondsOfTheRecordingTheOthers:"Segundos de la grabación; los demás entre ambos, más o menos regularmente.",letGoWithin:"Soltados en un radio de",aCrowdLetsThemGoA:"Una multitud los suelta a pocos metros unos de otros.",burnsAtLeast:"Arde al menos",howLongEachBurnsFromWhen:"Cuánto arde cada uno desde que se suelta, sorteado entre ambos: de 8 a 15 minutos según los vendedores. Desaparece al apagarse.",burnsAtMost:"Arde como mucho",hotterThanTheAirAtLeast:"Más caliente que el aire, al menos",howMuchHotterThanTheAir:"Cuánto más caliente que el aire está su aire a pleno fuego, sorteado entre ambos: lo que fija lo rápido que sube, y por tanto hasta dónde.",hotterThanTheAirAtMost:"Más caliente que el aire, como mucho",alreadyBurntWhenLetGo:"Ya ardido al soltarlo",forLanternsTheAccountOnlyHas:"Para farolillos que el relato solo tiene desde donde se vieron por primera vez, ya en el aire y en parte consumidos.",draw:"Sorteo",whatTheDrawsStartFromAnother:"De qué parten los sorteos: otro número, otros farolillos dentro de los mismos límites, los mismos cada vez para el mismo número.",standForTheShapes:"Representan las formas",noShape:"Ninguna forma",windAtTheGroundTowards:"Viento en el suelo, hacia",windAtTheGroundSpeed:"Viento en el suelo, velocidad",whereItBlowsTowardsWhichIs:"Hacia DÓNDE sopla, que es adonde van los farolillos: lo contrario de donde un parte dice que viene.",windAloftTowards:"Viento en altura, hacia",windAloftSpeed:"Viento en altura, velocidad",theWindHigherUpBlendedWith:"El viento más arriba, mezclado con el del suelo en medio: lo que separa al subir farolillos soltados en el mismo sitio.",windAloftAt:"Viento en altura, a",metresAboveWhereTheyAreLet:"Metros sobre donde se sueltan.",airTemperature:"Temperatura del aire",atTheGroundFallingBy6:"En el suelo, bajando 6,5 °C por kilómetro: de lo que su aire caliente es más ligero. Una noche fría los sube más.",gustsAcross:"Ráfagas, en horizontal",howFarTheAirSSpeed:"Cuánto se aparta la velocidad del aire de la del viento, cada farolillo en sus propias ráfagas: lo que estira un grupo en una fila cambiante. 0 para un aire quieto.",gustsUpAndDown:"Ráfagas, arriba y abajo",aGustLasts:"Una ráfaga dura",light:"Luz",itsFlameSLightThroughThe:"La luz de su llama a través del papel, a pleno fuego.",shape:"Forma",roundAtTheMouthSquareAt:"Redonda en la base, cuadrada arriba",balloonLobedTop:"Globo, cima lobulada",paperColour:"Color del papel",whatItLooksLikeByDay:"Su aspecto de día; de noche, lo que atraviesa la luz de su llama.",flameLight:"Luz de la llama",itsFlameSLightThroughWhite:"La luz de su llama a través de un papel blanco.",airItHolds:"Aire que contiene",weightWhenLetGo:"Peso al soltarlo"};export{e as lanternParameterTexts_es};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={letGo:"Lâcher",lanterns:"Lanternes",air:"Air",eachLantern:"Chaque lanterne",skyLanterns:"Lanternes célestes",name:"Nom",whereTheyAreLetGo:"Lieu du lâcher",whereTheyAreLetGoFrom:"D'où elles sont lâchées : par rapport au témoin, à autre chose dans la scène, ou en latitude et longitude.",heightAboveThePlaceSGround:"Hauteur au-dessus du sol du lieu",aGardenOnAHillAbove:"Un jardin sur une colline au-dessus du lieu, un toit.",thePlaceSGroundAboveThe:"Sol du lieu au-dessus de la mer",whatSetsHowThinTheAir:"Ce qui règle la raréfaction de l'air où elles montent : une lanterne monte moins haut depuis une ville de montagne.",howMany:"Combien",firstLetGoAt:"Première lâchée à",secondsOfTheRecordingBeforeIts:"Secondes de l'enregistrement : avant son début (négatif) pour des lanternes déjà en l'air quand il commence.",lastLetGoAt:"Dernière lâchée à",secondsOfTheRecordingTheOthers:"Secondes de l'enregistrement ; les autres entre les deux, à peu près régulièrement.",letGoWithin:"Lâchées dans un rayon de",aCrowdLetsThemGoA:"Une foule les lâche à quelques mètres les unes des autres.",burnsAtLeast:"Brûle au moins",howLongEachBurnsFromWhen:"Combien de temps chacune brûle après son lâcher, tiré entre les deux : 8 à 15 minutes selon les vendeurs. Elle disparaît en s'éteignant.",burnsAtMost:"Brûle au plus",hotterThanTheAirAtLeast:"Plus chaude que l'air, au moins",howMuchHotterThanTheAir:"De combien son air est plus chaud que l'air autour à plein feu, tiré entre les deux : ce qui règle à quelle vitesse elle monte, et donc jusqu'où.",hotterThanTheAirAtMost:"Plus chaude que l'air, au plus",alreadyBurntWhenLetGo:"Déjà brûlé au lâcher",forLanternsTheAccountOnlyHas:"Pour des lanternes que le compte rendu n'a que depuis là où elles ont été vues la première fois, déjà en l'air et en partie consumées.",draw:"Tirage",whatTheDrawsStartFromAnother:"Ce dont partent les tirages : un autre nombre, d'autres lanternes dans les mêmes bornes, les mêmes à chaque fois pour le même nombre.",standForTheShapes:"Représentent les formes",noShape:"Aucune forme",windAtTheGroundTowards:"Vent au sol, vers",windAtTheGroundSpeed:"Vent au sol, vitesse",whereItBlowsTowardsWhichIs:"Là où il souffle, VERS où, qui est où vont les lanternes : l'inverse d'où un bulletin météo dit qu'il vient.",windAloftTowards:"Vent en altitude, vers",windAloftSpeed:"Vent en altitude, vitesse",theWindHigherUpBlendedWith:"Le vent plus haut, mêlé à celui du sol entre les deux : ce qui fait se séparer en montant des lanternes lâchées au même endroit.",windAloftAt:"Vent en altitude, à",metresAboveWhereTheyAreLet:"Mètres au-dessus d'où elles sont lâchées.",airTemperature:"Température de l'air",atTheGroundFallingBy6:"Au sol, baissant de 6,5 °C par kilomètre au-dessus : ce dont leur air chaud est plus léger. Une nuit froide les porte plus haut.",gustsAcross:"Rafales, à l'horizontale",howFarTheAirSSpeed:"De combien la vitesse de l'air s'écarte de celle du vent, chaque lanterne prise dans ses propres rafales : ce qui étire un groupe en une file mouvante. 0 pour un air immobile.",gustsUpAndDown:"Rafales, de haut en bas",aGustLasts:"Une rafale dure",light:"Lumière",itsFlameSLightThroughThe:"La lumière de sa flamme à travers le papier, à plein feu.",shape:"Forme",roundAtTheMouthSquareAt:"Ronde à la base, carrée au sommet",balloonLobedTop:"Montgolfière, sommet en lobes",paperColour:"Couleur du papier",whatItLooksLikeByDay:"Son aspect de jour ; de nuit, ce que traverse la lumière de sa flamme.",flameLight:"Lumière de la flamme",itsFlameSLightThroughWhite:"La lumière de sa flamme à travers un papier blanc.",airItHolds:"Air qu'elle contient",weightWhenLetGo:"Poids au lâcher"};export{e as lanternParameterTexts_fr};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a={letGo:"Lancio",lanterns:"Lanterne",air:"Aria",eachLantern:"Ogni lanterna",skyLanterns:"Lanterne volanti",name:"Nome",whereTheyAreLetGo:"Luogo del rilascio",whereTheyAreLetGoFrom:"Da dove vengono lasciate andare: rispetto al testimone, a qualcos'altro nella scena, o in latitudine e longitudine.",heightAboveThePlaceSGround:"Altezza sul suolo del luogo",aGardenOnAHillAbove:"Un giardino su una collina sopra il luogo, un tetto.",thePlaceSGroundAboveThe:"Suolo del luogo sul mare",whatSetsHowThinTheAir:"Ciò che fissa la rarefazione dell'aria in cui salgono: una lanterna sale meno in alto da un paese di montagna.",howMany:"Quante",firstLetGoAt:"Prima lasciata a",secondsOfTheRecordingBeforeIts:"Secondi della registrazione: prima del suo inizio (negativo) per lanterne già in aria quando inizia.",lastLetGoAt:"Ultima lasciata a",secondsOfTheRecordingTheOthers:"Secondi della registrazione; le altre in mezzo, più o meno regolarmente.",letGoWithin:"Lasciate entro",aCrowdLetsThemGoA:"Una folla le lascia andare a pochi metri l'una dall'altra.",burnsAtLeast:"Brucia almeno",howLongEachBurnsFromWhen:"Quanto brucia ciascuna da quando è lasciata andare, estratto tra i due: da 8 a 15 minuti secondo i venditori. Scompare spegnendosi.",burnsAtMost:"Brucia al massimo",hotterThanTheAirAtLeast:"Più calda dell'aria, almeno",howMuchHotterThanTheAir:"Di quanto la sua aria è più calda dell'aria intorno a piena fiamma, estratto tra i due: ciò che fissa quanto in fretta sale, e quindi fin dove.",hotterThanTheAirAtMost:"Più calda dell'aria, al massimo",alreadyBurntWhenLetGo:"Già bruciato al lancio",forLanternsTheAccountOnlyHas:"Per lanterne che il resoconto ha solo da dove sono state viste la prima volta, già in aria e in parte consumate.",draw:"Estrazione",whatTheDrawsStartFromAnother:"Da cosa partono le estrazioni: un altro numero, altre lanterne negli stessi limiti, le stesse ogni volta per lo stesso numero.",standForTheShapes:"Rappresentano le forme",noShape:"Nessuna forma",windAtTheGroundTowards:"Vento al suolo, verso",windAtTheGroundSpeed:"Vento al suolo, velocità",whereItBlowsTowardsWhichIs:"VERSO dove soffia, che è dove vanno le lanterne: l'opposto di da dove un bollettino dice che viene.",windAloftTowards:"Vento in quota, verso",windAloftSpeed:"Vento in quota, velocità",theWindHigherUpBlendedWith:"Il vento più in alto, mescolato a quello al suolo nel mezzo: ciò che separa salendo lanterne lasciate andare nello stesso punto.",windAloftAt:"Vento in quota, a",metresAboveWhereTheyAreLet:"Metri sopra dove vengono lasciate andare.",airTemperature:"Temperatura dell'aria",atTheGroundFallingBy6:"Al suolo, calando di 6,5 °C per chilometro: ciò di cui la loro aria calda è più leggera. Una notte fredda le porta più in alto.",gustsAcross:"Raffiche, in orizzontale",howFarTheAirSSpeed:"Di quanto la velocità dell'aria si scosta da quella del vento, ogni lanterna nelle proprie raffiche: ciò che allunga un gruppo in una fila mutevole. 0 per un'aria ferma.",gustsUpAndDown:"Raffiche, in su e in giù",aGustLasts:"Una raffica dura",light:"Luce",itsFlameSLightThroughThe:"La luce della sua fiamma attraverso la carta, a piena fiamma.",shape:"Forma",roundAtTheMouthSquareAt:"Rotonda alla base, quadrata in cima",balloonLobedTop:"Mongolfiera, cima a lobi",paperColour:"Colore della carta",whatItLooksLikeByDay:"Il suo aspetto di giorno; di notte, ciò che attraversa la luce della sua fiamma.",flameLight:"Luce della fiamma",itsFlameSLightThroughWhite:"La luce della sua fiamma attraverso una carta bianca.",airItHolds:"Aria che contiene",weightWhenLetGo:"Peso al lancio"};export{a as lanternParameterTexts_it};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{R as
|
|
1
|
+
import{R as O,aR as D,aS as y}from"./rr0-scene.mjs";class l{static DEFAULT_DIVERGENCE_MRAD=.1;static DEFAULT_APERTURE_M=.01;static AEROSOL_SINGLE_SCATTERING_ALBEDO=.9;static AEROSOL_ASYMMETRY=.7;static DEFAULT_PATCHINESS=.35;static PATCH_M=120;static STEP_M=25;static MAX_SAMPLES=2e3;static viewsAt(n,o,t,s){return l.onAt(n,o).map(c=>l.viewOf(c,t,s))}static viewOf(n,o,t){return{id:n.id,wavelengthNm:n.wavelengthNm,patchiness:n.patchiness??l.DEFAULT_PATCHINESS,samples:l.samplesOf(n,o,t)}}static onAt(n,o){return n.filter(t=>(t.fromT===void 0||o>=t.fromT)&&(t.untilT===void 0||o<=t.untilT)).map(t=>l.stateAt(t,o)).filter(t=>t.path.length>=2)}static stateAt(n,o){if(!n.light?.length&&!n.moves?.length)return n;const t={...n};if(n.light?.length){const s=l.joined(n.light.filter(e=>e.wavelengthNm!==void 0),o,e=>e.wavelengthNm),c=l.joined(n.light.filter(e=>e.powerW!==void 0),o,e=>e.powerW);s!==void 0&&(t.wavelengthNm=s),c!==void 0&&(t.powerW=c)}return n.moves?.length&&(t.path=l.pathAt(n.moves,o)),t}static joined(n,o,t){if(n.length===0)return;const s=[...n].sort((a,i)=>a.t-i.t);if(o<=s[0].t)return t(s[0]);const c=s[s.length-1];if(o>=c.t)return t(c);const e=s.findIndex(a=>a.t>o),r=s[e-1],h=s[e],M=(o-r.t)/(h.t-r.t);return t(r)+(t(h)-t(r))*M}static pathAt(n,o){const t=[...n].sort((a,i)=>a.t-i.t);if(o<=t[0].t)return t[0].path;const s=t[t.length-1];if(o>=s.t)return s.path;const c=t.findIndex(a=>a.t>o),e=t[c-1],r=t[c];if(e.path.length!==r.path.length)return e.path;const h=(o-e.t)/(r.t-e.t),M=(a,i)=>a+(i-a)*h;return e.path.map((a,i)=>({lat:M(a.lat,r.path[i].lat),lng:M(a.lng,r.path[i].lng),altitudeM:M(a.altitudeM,r.path[i].altitudeM)}))}static patchAt(n,o,t){if(t.patchiness<=0)return 1;const s=o/1e3,c=(r,h)=>{const M=(n-t.windAlongMS*s)/r,a=(Math.abs(t.windAcrossMS)+.3)*s/r+h;return l.valueNoise(M,a)},e=(2*c(l.PATCH_M,0)+c(l.PATCH_M/3,17.3))/3;return 1+t.patchiness*(2*e-1)}static valueNoise(n,o){const t=Math.floor(n),s=Math.floor(o),c=n-t,e=o-s,r=i=>i*i*(3-2*i),h=(i,g)=>{const v=Math.sin(i*127.1+g*311.7)*43758.5453;return v-Math.floor(v)},M=h(t,s)+(h(t+1,s)-h(t,s))*r(c),a=h(t,s+1)+(h(t+1,s+1)-h(t,s+1))*r(c);return M+(a-M)*r(e)}static samplesOf(n,o,t){const s=O.ecef({lat:o.lat,lng:o.lng,heightM:0}),c=o.lat*Math.PI/180,e=o.lng*Math.PI/180,r=u=>{const p=u[0]-s[0],A=u[1]-s[1],f=u[2]-s[2];return[-Math.sin(e)*p+Math.cos(e)*A,-Math.sin(c)*Math.cos(e)*p-Math.sin(c)*Math.sin(e)*A+Math.cos(c)*f,Math.cos(c)*Math.cos(e)*p+Math.cos(c)*Math.sin(e)*A+Math.sin(c)*f]},h=(n.divergenceMrad??l.DEFAULT_DIVERGENCE_MRAD)/1e3,M=n.apertureM??l.DEFAULT_APERTURE_M,a=[];let i=0,g=n.powerW,v=0;for(let u=0;u+1<n.path.length;u++){const p=n.path[u],A=n.path[u+1],f=O.ecef({lat:p.lat,lng:p.lng,heightM:p.altitudeM}),w=O.ecef({lat:A.lat,lng:A.lng,heightM:A.altitudeM}),d=Math.hypot(w[0]-f[0],w[1]-f[1],w[2]-f[2]),[C,S]=(()=>{const[E,R]=r(f),[N,T]=r(w);return[(N-E)/(d||1),(T-R)/(d||1)]})(),I=Math.max(1,Math.min(l.MAX_SAMPLES,Math.ceil(d/l.STEP_M)));for(let E=u===0?0:1;E<=I;E++){const R=E/I,N=[0,1,2].map(P=>f[P]+(w[P]-f[P])*R),T=R*d,x=p.altitudeM+(A.altitudeM-p.altitudeM)*R+l.bulgeM(T,d);if(E>0){const P=a[a.length-1],W=T+i-P.fromSourceM,H=l.extinctionAt(t,n.wavelengthNm,(P.altitudeM+x)/2);v+=H*W,g=n.powerW*Math.exp(-v)}const[U,F,G]=r(N);a.push({eastM:U,northM:F,upM:G,altitudeM:x,fromSourceM:i+T,dirEast:C,dirNorth:S,widthM:M+h*(i+T),powerW:g})}i+=d}return a}static bulgeM(n,o){return n*(o-n)/(2*6371e3)}static extinctionAt(n,o,t){const{rayleighPerM:s,aerosolPerM:c}=l.coefficientsAt(n,o,t);return s+c}static coefficientsAt(n,o,t){const s=D.rayleighAt(o)*D.rayleighDensity(t),c=n.aerosol[1]*(o/550)**-1.3*D.aerosolDensity(t);return{rayleighPerM:s,aerosolPerM:c}}static phasedScattering(n,o){const t=3/(16*Math.PI)*(1+o*o),s=l.AEROSOL_ASYMMETRY,c=(1-s*s)/(4*Math.PI*(1+s*s-2*s*o)**1.5);return n.rayleighPerM*t+n.aerosolPerM*l.AEROSOL_SINGLE_SCATTERING_ALBEDO*c}static efficacy(n){return 683*Math.max(0,y.colourMatching(n)[1])}static colourOf(n){const[o,t,s]=y.colourMatching(n);if(t<=0)return[0,0,0];const c=y.linearSrgbOf([o/t,1,s/t]).map(r=>Math.max(0,r)),e=.2126*c[0]+.7152*c[1]+.0722*c[2];return c.map(r=>r/e)}static luminanceCdM2(n,o,t,s,c){return l.efficacy(o)*n*t/(s*Math.max(c,.001))}}export{l as L};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{aP as y,_ as d,aQ as E}from"./rr0-scene.mjs";import{P as b,S as w,a as x,b as j,I as g,E as k,c as v}from"./ParameterForm-BNfKnqZ4.js";import{L as T}from"./LaunchPlume-lH1zITP-.js";import{T as I}from"./TimelineTracks-C02lbugN.js";const S=y.catalog({en:()=>d(()=>import("./LaunchParameterTexts_en-DvrCwbDM.js"),[],import.meta.url).then(r=>r.launchParameterTexts_en),fr:()=>d(()=>import("./LaunchParameterTexts_fr-Bh_1zVzy.js"),[],import.meta.url).then(r=>r.launchParameterTexts_fr),es:()=>d(()=>import("./LaunchParameterTexts_es--RUAegVp.js"),[],import.meta.url).then(r=>r.launchParameterTexts_es),it:()=>d(()=>import("./LaunchParameterTexts_it-CWDx9nJy.js"),[],import.meta.url).then(r=>r.launchParameterTexts_it)});class n{static plumeValue(e){return t=>T.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:"engine",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 s=e[i],a=e[i+1],l=a.t===s.t?0:(t-s.t)/(a.t-s.t),o=(m,h)=>m+(h-m)*l;return{t,lat:o(s.lat,a.lat),lng:o(s.lng,a.lng),altitudeKm:Math.max(0,o(s.altitudeKm,a.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:"launch",parameters:[{type:"said",key:"title",label:"name",group:"vehicle"},{type:"text",key:"vehicle.mission",label:"mission",placeholder:"Starlink Group 10-49",group:"vehicle"},{type:"number",key:"vehicle.engine.thrustKN",min:1,max:1e5,step:1,unit:"kN",label:"thrustVacuum",hint:"merlinVacuum934Rl10110A",group:"engine"},{type:"number",key:"vehicle.engine.specificImpulseS",min:100,max:500,step:1,unit:"s",label:"specificImpulseVacuum",hint:"times981MSIt",group:"engine"},{type:"choice",key:"vehicle.engine.propellant",label:"propellant",hint:"whatTheExhaustIsMadeOf",choices:[{value:"rp1-lox",label:"keroseneAndOxygen"},{value:"methane-lox",label:"methaneAndOxygen"},{value:"hydrogen-lox",label:"hydrogenAndOxygen"},{value:"hypergolic",label:"hypergolic"},{value:"solid",label:"solid"}],group:"engine"},n.burn("burnFromT",{label:"engineStart",hint:"whenTheEngineStartedInSeconds",ends:e=>e[0]}),n.burn("burnUntilT",{label:"engineCutOff",hint:"whenTheEngineStoppedInSeconds",ends:e=>e[e.length-1]}),n.plume("exhaustKgPerS",{min:.1,max:1e5,step:.1,unit:"kg/s",label:"exhaustFlow",hint:"howMuchExhaustLeavesTheEngine",group:"plume"}),n.plume("condensedShare",{min:0,max:1,step:.01,label:"shareThatScatters",hint:"theShareOfTheExhaustThat",group:"plume"}),n.plume("particleRadiusUm",{min:.05,max:5,step:.05,unit:"µm",label:"particleRadius",group:"plume"}),n.plume("lifetimeS",{min:10,max:3600,step:10,unit:"s",label:"trailLifetime",hint:"howLongTheNarrowTrailLasts",group:"plume"}),n.plume("expansionKmPerS",{min:0,max:5,step:.01,unit:"km/s",label:"trailSpreading",group:"plume"}),n.plume("initialRadiusKm",{min:0,max:50,step:.1,unit:"km",label:"radiusAtRelease",group:"plume"}),n.plume("collarShare",{min:0,max:1,step:.01,label:"shareInTheCollar",hint:"theCollarIsTheExhaustJust",group:"collar"}),n.plume("collarExpansionKmPerS",{min:0,max:10,step:.05,unit:"km/s",label:"collarSpreading",hint:"howFastTheCollarWidensThree",group:"collar"}),n.plume("collarLifetimeS",{min:1,max:300,step:1,unit:"s",label:"collarLifetime",group:"collar"})]};static PLACE={kind:"launch-place",title:"placeOfThePath",parameters:[{type:"number",key:"t",min:-3600,max:36e3,step:.1,unit:"s",scale:.001,required:!0,label:"time",hint:"secondsOfTheRecordingNegativeBefore"},{type:"position",key:"lat",secondKey:"lng",saidKey:"saidPosition",native:"geo",step:1,label:"position"},{type:"number",key:"altitudeKm",min:0,max:2e3,step:.1,unit:"km",required:!0,label:"altitude"}]};static jetContext(e,t){return{launch:e,index:t}}static jetValue(e){return(t,i)=>{const{launch:s,index:a}=i??{};return s?e(T.releaseOf(s,t,a)):void 0}}static JET_GROUP="jet";static JET={kind:"launch-jet",title:"jet",parameters:[{type:"choice",key:"kind",required:!0,label:"what",choices:[{value:"burn",label:"engineBurn"},{value:"vent",label:"propellantVented"}],group:n.JET_GROUP},{type:"number",key:"fromT",min:-36e3,max:36e3,step:.1,unit:"s",scale:.001,required:!0,label:"from",hint:"secondsOfTheRecordingNegativeBefore2",group:n.JET_GROUP},{type:"number",key:"untilT",min:-36e3,max:36e3,step:.1,unit:"s",scale:.001,required:!0,label:"until",group:n.JET_GROUP},{type:"number",key:"angleDeg",min:0,max:180,step:1,unit:"°",effective:()=>0,label:"directionFromAft",hint:"t0StraightBackAlongTheStage",group:n.JET_GROUP},{type:"number",key:"azimuthDeg",min:-360,max:360,step:1,unit:"°",effective:()=>0,label:"side",hint:"roundTheLineOfMotionWhich",group:n.JET_GROUP},{type:"number",key:"spinPeriodS",min:-3600,max:3600,step:.1,unit:"s",label:"spinPeriod",hint:"howLongTheStageTakesTo",group:n.JET_GROUP},{type:"number",key:"speedKmPerS",min:0,max:10,step:.01,unit:"km/s",effective:n.jetValue(e=>e.speedKmPerS),label:"speed",hint:"howFastItLeavesTheStage",group:n.JET_GROUP},{type:"number",key:"massKgPerS",min:0,max:1e5,step:.1,unit:"kg/s",effective:n.jetValue(e=>e.massKgPerS),label:"flow",group:n.JET_GROUP},{type:"number",key:"condensedShare",min:0,max:1,step:.01,effective:n.jetValue(e=>e.condensedShare),label:"shareThatScatters",group:n.JET_GROUP},{type:"number",key:"particleRadiusUm",min:.05,max:5,step:.05,unit:"µm",effective:n.jetValue(e=>e.particleRadiusUm),label:"particleRadius",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:"spreading",hint:"howFastEachPuffOfIt",group:n.JET_GROUP},{type:"number",key:"initialRadiusKm",min:0,max:50,step:.1,unit:"km",effective:n.jetValue(e=>e.initialRadiusKm),label:"radiusAtRelease",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:"lifetime",group:n.JET_GROUP}]};static publish(){b.publish(n.SET)}}const P=y.catalog({en:()=>d(()=>import("./LaunchEditorMessages_en-BnzNAYW9.js"),[],import.meta.url).then(r=>r.launchEditorMessages_en),fr:()=>d(()=>import("./LaunchEditorMessages_fr-Ds_VOB8c.js"),[],import.meta.url).then(r=>r.launchEditorMessages_fr),es:()=>d(()=>import("./LaunchEditorMessages_es-BE0dEl7I.js"),[],import.meta.url).then(r=>r.launchEditorMessages_es),it:()=>d(()=>import("./LaunchEditorMessages_it-DPQaR8HY.js"),[],import.meta.url).then(r=>r.launchEditorMessages_it)});class u{constructor(e,t,i){this.container=e,this.host=t,w.attach(e,"launch-editor-part",u.STYLE),this.language=i,b.of("launch")||n.publish(),this.ready=this.setLanguage(i)}messages;ready;parameterTexts;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,s]=await Promise.all([P.load(e),S.load(e)]);t===this.languageToken&&(this.messages=i,this.parameterTexts=s,this.render(),this.sync())}sync(){if(!this.messages)return;const e=this.launches;this.shown=[...e],e.some(s=>s.id===this.currentId)||(this.currentId=e[0]?.id),this.list?.setItems(e.map(s=>({id:s.id,label:this.labelOf(s)})),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=this.resolved(b.of("launch"));this.form??=new x(this.element("launch-parameters"),this.language,"",{said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()}),this.form.show(i,t,()=>this.written())}refresh(){if(!this.messages)return;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.messages&&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.messages&&(this.currentId=e,this.row="path",this.placeIndex=0,this.jetIndex=0,this.sync())}resolved(e){return j.resolve(e,this.parameterTexts)}render(){if(!this.messages)return;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}">${g.PLUS} ${e.jetBurn}</button>
|
|
8
|
+
<button id="launch-jet-add-vent" type="button" title="${e.addJet}">${g.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}">${g.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}">${g.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 k({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??u.VEHICLES[0].id),onRemove:()=>this.deleteCurrent()}),this.list.setLabels({list:e.launch,remove:e.deleteLaunch,add:e.addLaunch,empty:e.none}),this.list.setKinds(u.VEHICLES.map(i=>({value:i.id,label:i.vehicle.name??i.id}))),this.timeline=new I(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:u.PATH_COLOR,times:e.track.map(h=>h.t),active:this.row==="path",selectedTime:this.row==="path"?e.track[this.placeIndex]?.t:void 0,open:()=>this.selectPlace(this.placeIndex),pressed:(h,c)=>{const p=c===void 0?-1:(this.current?.track??[]).findIndex(f=>f.t===c);this.selectPlace(p>=0?p:this.placeIndex)},move:(h,c)=>this.movePlace(h,c),add:()=>this.addPlaceAt(this.host.currentTime())},s=(e.jets??[]).map((h,c)=>({id:`jet-${c}`,label:this.jetLabel(h,c),color:u.JET_COLOR,times:[h.fromT,h.untilT],spans:[{t:h.fromT,until:h.untilT,label:""}],active:this.row==="jet"&&c===this.jetIndex,open:()=>this.selectJet(c),pressed:()=>this.selectJet(c),move:(p,f)=>this.moveJetEnd(c,p,f),add:()=>this.addJet(h.kind??"burn",this.host.currentTime())})),a=n.instantsOf(e),l=Math.min(...a),o=Math.max(...a),m=Math.max(500,(o-l)/10);this.timeline.show([i,...s],this.host.duration(),this.host.currentTime(),{from:l-m,to:o+m})}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<=u.MIN_PLACES,this.placeForm?this.placeForm.sync(e):(this.placeForm=new x(this.element("launch-place-parameters"),this.language,"launchPlace."),this.placeForm.show(this.resolved(n.PLACE),new v(()=>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 s={...i.track[e]};t(s),i.track=i.track.map((a,l)=>l===e?s:a).sort((a,l)=>a.t-l.t),this.placeIndex=i.track.indexOf(s),this.syncPlace(),this.written()}movePlace(e,t){const i=this.current?.track.findIndex(s=>s.t===e)??-1;i<0||(this.editPlace(i,s=>{s.t=t}),this.syncPlace(!0))}addPlaceAt(e){const t=this.current;if(!t)return;const i=t.track.findIndex(s=>Math.abs(s.t-e)<1);if(i<0){const s=n.placeAt(t.track,Math.round(e));t.track=[...t.track,s].sort((a,l)=>a.t-l.t),this.host.changed(),this.selectPlace(t.track.indexOf(s));return}this.selectPlace(i)}removePlace(){const e=this.current;!e||e.track.length<=u.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 x(this.element("launch-jet-parameters"),this.language,"launchJet."),this.jetForm.show(this.resolved(n.JET),new v(()=>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 s={...i.jets[e]};t(s),i.jets=i.jets.map((a,l)=>l===e?s:a),this.written()}moveJetEnd(e,t,i){const s=this.current?.jets?.[e];s&&(this.editJet(e,a=>{const l=t===s.fromT?[i,s.untilT]:[s.fromT,i];a.fromT=Math.min(l[0],l[1]),a.untilT=Math.max(l[0],l[1])}),this.selectJet(e))}addJet(e,t){const i=this.current;if(!i)return;const s=i.track,a=Math.round(t),l=e==="vent"?{kind:e,fromT:a,untilT:a+3e4,angleDeg:90}:{kind:e,fromT:a,untilT:a+3e4};!i.jets?.length&&i.burnFromT===void 0&&i.burnUntilT===void 0&&(i.burnFromT=s[0].t,i.burnUntilT=s[s.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,s)=>s!==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,s=a=>({lat:t.lat+a*Math.cos(i)/111.32,lng:t.lng+a*Math.sin(i)/(111.32*Math.max(.05,Math.cos(t.lat*Math.PI/180)))});return[{t:0,...s(300),altitudeKm:80},{t:6e4,...s(450),altitudeKm:160}]}static VEHICLES=[{id:"falcon-9",vehicle:{name:"Falcon 9"}}];addLaunch(e){const t=this.startOfNew();if(!t)return;const i=u.VEHICLES.find(o=>o.id===e)??u.VEHICLES[0];let s=this.launches.length+1;for(;this.launches.some(o=>o.id===`launch-${s}`);)s++;const a={id:`launch-${s}`,vehicle:{...i.vehicle},track:t},l=this.host.sighting();l.skyEvents={...l.skyEvents,launches:[...this.launches,a]},this.currentId=a.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=E.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{u as LaunchEditor};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={title:"Launches",name:"Rocket plume",detail:"{name} — {part}, {distance} away, {height} km up",ascent:"exhaust of the ascent",burn:"exhaust of an engine burn",vent:"vented propellant"};export{e as launchKindMessages_en};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={title:"Lanzamientos",name:"Estela de cohete",detail:"{name} — {part}, a {distance}, a {height} km de altitud",ascent:"escape del ascenso",burn:"escape de un encendido",vent:"propelentes purgados"};export{e as launchKindMessages_es};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={title:"Lancements",name:"Panache de fusée",detail:"{name} — {part}, à {distance}, à {height} km d'altitude",ascent:"échappement de la montée",burn:"échappement d'un allumage",vent:"ergols vidangés"};export{e as launchKindMessages_fr};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a={title:"Lanci",name:"Scia di razzo",detail:"{name} — {part}, a {distance}, a {height} km di quota",ascent:"scarico dell'ascesa",burn:"scarico di un'accensione",vent:"propellenti scaricati"};export{a as launchKindMessages_it};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={engine:"Engine",launch:"Launch",name:"Name",vehicle:"Vehicle",mission:"Mission",thrustVacuum:"Thrust (vacuum)",merlinVacuum934Rl10110A:"Merlin Vacuum 934, RL10 110, a solid booster several thousand. With the specific impulse, it sets how much exhaust leaves each second.",specificImpulseVacuum:"Specific impulse (vacuum)",times981MSIt:"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.",propellant:"Propellant",whatTheExhaustIsMadeOf:"What the exhaust is made of decides how much of it turns into particles that scatter light.",keroseneAndOxygen:"Kerosene and oxygen",methaneAndOxygen:"Methane and oxygen",hydrogenAndOxygen:"Hydrogen and oxygen",hypergolic:"Hypergolic",solid:"Solid",engineStart:"Engine start",whenTheEngineStartedInSeconds:"When the engine started, in seconds of the recording; it may be before it. Empty: the first point of the path.",engineCutOff:"Engine cut-off",whenTheEngineStoppedInSeconds:"When the engine stopped, in seconds of the recording. Empty: the last point of the path. Nothing is let go after it.",exhaustFlow:"Exhaust flow",howMuchExhaustLeavesTheEngine:"How much exhaust leaves the engine each second: how bright the plume is. Thrust over exhaust velocity when the engine is stated.",plume:"Plume",shareThatScatters:"Share that scatters",theShareOfTheExhaustThat:"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.",particleRadius:"Particle radius",trailLifetime:"Trail lifetime",howLongTheNarrowTrailLasts:"How long the narrow trail lasts before the particles have gone.",trailSpreading:"Trail spreading",radiusAtRelease:"Radius at release",shareInTheCollar:"Share in the collar",theCollarIsTheExhaustJust:"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.",collar:"Collar",collarSpreading:"Collar spreading",howFastTheCollarWidensThree:"How fast the collar widens: three quarters of the exhaust velocity when the engine is stated.",collarLifetime:"Collar lifetime",placeOfThePath:"Place of the path",time:"Time",secondsOfTheRecordingNegativeBefore:"Seconds of the recording; negative before it began: a stage seen minutes after its launch was already high when the recording started.",position:"Position",altitude:"Altitude",jet:"Jet",what:"What",engineBurn:"Engine burn",propellantVented:"Propellant vented",from:"From",secondsOfTheRecordingNegativeBefore2:"Seconds of the recording; negative before it began.",until:"Until",directionFromAft:"Direction from aft",t0StraightBackAlongTheStage:"0 straight back along the stage's motion (an engine pushing it on), 90 sideways, 180 straight ahead (an engine braking it).",side:"Side",roundTheLineOfMotionWhich:"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.",spinPeriod:"Spin period",howLongTheStageTakesTo:"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.",speed:"Speed",howFastItLeavesTheStage:"How fast it leaves the stage. A burn: the engine's exhaust velocity.",flow:"Flow",spreading:"Spreading",howFastEachPuffOfIt:"How fast each puff of it widens: a narrow jet keeps the arms of a spiral apart.",lifetime:"Lifetime"};export{e as launchParameterTexts_en};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={engine:"Motor",launch:"Lanzamiento",name:"Nombre",vehicle:"Lanzador",mission:"Misión",thrustVacuum:"Empuje (en el vacío)",merlinVacuum934Rl10110A:"Merlin Vacuum 934, RL10 110, un propulsor sólido varios miles. Con el impulso específico, fija el caudal de escape.",specificImpulseVacuum:"Impulso específico (en el vacío)",times981MSIt:"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.",propellant:"Propelentes",whatTheExhaustIsMadeOf:"De qué está hecho el escape decide qué parte se vuelve partículas que difunden la luz.",keroseneAndOxygen:"Queroseno y oxígeno",methaneAndOxygen:"Metano y oxígeno",hydrogenAndOxygen:"Hidrógeno y oxígeno",hypergolic:"Hipergólico",solid:"Sólido",engineStart:"Encendido del motor",whenTheEngineStartedInSeconds:"Cuándo se encendió el motor, en segundos de la grabación; puede ser antes. Vacío: el primer punto de la trayectoria.",engineCutOff:"Apagado del motor",whenTheEngineStoppedInSeconds:"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.",exhaustFlow:"Caudal de escape",howMuchExhaustLeavesTheEngine:"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.",plume:"Estela",shareThatScatters:"Parte que difunde",theShareOfTheExhaustThat:"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.",particleRadius:"Radio de las partículas",trailLifetime:"Duración de la estela",howLongTheNarrowTrailLasts:"Cuánto dura la estela estrecha antes de que las partículas hayan desaparecido.",trailSpreading:"Expansión de la estela",radiusAtRelease:"Radio al soltar",shareInTheCollar:"Parte en el collar",theCollarIsTheExhaustJust:"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.",collar:"Collar",collarSpreading:"Expansión del collar",howFastTheCollarWidensThree:"La rapidez con que el collar se ensancha: tres cuartos de la velocidad de escape cuando se da el motor.",collarLifetime:"Duración del collar",placeOfThePath:"Punto de la trayectoria",time:"Instante",secondsOfTheRecordingNegativeBefore:"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.",position:"Posición",altitude:"Altitud",jet:"Chorro",what:"Qué",engineBurn:"Encendido del motor",propellantVented:"Propelentes purgados",from:"Desde",secondsOfTheRecordingNegativeBefore2:"Segundos de la grabación; negativos antes de que empezara.",until:"Hasta",directionFromAft:"Dirección desde atrás",t0StraightBackAlongTheStage:"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).",side:"Lado",roundTheLineOfMotionWhich:"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.",spinPeriod:"Período de giro",howLongTheStageTakesTo:"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.",speed:"Velocidad",howFastItLeavesTheStage:"La velocidad con que sale de la etapa. Un encendido: la velocidad de escape del motor.",flow:"Caudal",spreading:"Expansión",howFastEachPuffOfIt:"La rapidez con que se ensancha cada bocanada: un chorro estrecho mantiene separados los brazos de una espiral.",lifetime:"Duración"};export{e as launchParameterTexts_es};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={engine:"Moteur",launch:"Lancement",name:"Nom",vehicle:"Lanceur",mission:"Mission",thrustVacuum:"Poussée (dans le vide)",merlinVacuum934Rl10110A:"Merlin Vacuum 934, RL10 110, un booster à poudre plusieurs milliers. Avec l'impulsion spécifique, elle fixe le débit d'échappement.",specificImpulseVacuum:"Impulsion spécifique (dans le vide)",times981MSIt:"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.",propellant:"Ergols",whatTheExhaustIsMadeOf:"Ce dont l'échappement est fait décide quelle part devient des particules qui diffusent la lumière.",keroseneAndOxygen:"Kérosène et oxygène",methaneAndOxygen:"Méthane et oxygène",hydrogenAndOxygen:"Hydrogène et oxygène",hypergolic:"Hypergolique",solid:"Poudre",engineStart:"Allumage du moteur",whenTheEngineStartedInSeconds:"Quand le moteur s'est allumé, en secondes de l'enregistrement ; avant lui si besoin. Vide : le premier point du chemin.",engineCutOff:"Extinction du moteur",whenTheEngineStoppedInSeconds:"Quand le moteur s'est éteint, en secondes de l'enregistrement. Vide : le dernier point du chemin. Rien n'est lâché après.",exhaustFlow:"Débit d'échappement",howMuchExhaustLeavesTheEngine:"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é.",plume:"Panache",shareThatScatters:"Part qui diffuse",theShareOfTheExhaustThat:"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.",particleRadius:"Rayon des particules",trailLifetime:"Durée de la traînée",howLongTheNarrowTrailLasts:"Combien de temps la traînée étroite dure avant que les particules aient disparu.",trailSpreading:"Étalement de la traînée",radiusAtRelease:"Rayon au lâcher",shareInTheCollar:"Part dans la collerette",theCollarIsTheExhaustJust:"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.",collar:"Collerette",collarSpreading:"Étalement de la collerette",howFastTheCollarWidensThree:"La vitesse à laquelle la collerette s'élargit : les trois quarts de la vitesse d'éjection quand le moteur est donné.",collarLifetime:"Durée de la collerette",placeOfThePath:"Point du chemin",time:"Instant",secondsOfTheRecordingNegativeBefore:"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é.",position:"Position",altitude:"Altitude",jet:"Jet",what:"Quoi",engineBurn:"Allumage du moteur",propellantVented:"Ergols vidangés",from:"Début",secondsOfTheRecordingNegativeBefore2:"Secondes de l'enregistrement ; négatives avant son début.",until:"Fin",directionFromAft:"Direction depuis l'arrière",t0StraightBackAlongTheStage:"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).",side:"Côté",roundTheLineOfMotionWhich:"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.",spinPeriod:"Période de rotation",howLongTheStageTakesTo:"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.",speed:"Vitesse",howFastItLeavesTheStage:"La vitesse à laquelle il quitte l'étage. Un allumage : la vitesse d'éjection du moteur.",flow:"Débit",spreading:"Étalement",howFastEachPuffOfIt:"La vitesse à laquelle chaque bouffée s'élargit : un jet étroit garde les bras d'une spirale séparés.",lifetime:"Durée"};export{e as launchParameterTexts_fr};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={engine:"Motore",launch:"Lancio",name:"Nome",vehicle:"Lanciatore",mission:"Missione",thrustVacuum:"Spinta (nel vuoto)",merlinVacuum934Rl10110A:"Merlin Vacuum 934, RL10 110, un booster solido diverse migliaia. Con l'impulso specifico, fissa la portata dello scarico.",specificImpulseVacuum:"Impulso specifico (nel vuoto)",times981MSIt:"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.",propellant:"Propellenti",whatTheExhaustIsMadeOf:"Di cosa è fatto lo scarico decide quanta parte diventa particelle che diffondono la luce.",keroseneAndOxygen:"Cherosene e ossigeno",methaneAndOxygen:"Metano e ossigeno",hydrogenAndOxygen:"Idrogeno e ossigeno",hypergolic:"Ipergolico",solid:"Solido",engineStart:"Accensione del motore",whenTheEngineStartedInSeconds:"Quando si è acceso il motore, in secondi della registrazione; può essere prima. Vuoto: il primo punto del percorso.",engineCutOff:"Spegnimento del motore",whenTheEngineStoppedInSeconds:"Quando si è spento il motore, in secondi della registrazione. Vuoto: l'ultimo punto del percorso. Dopo non si rilascia nulla.",exhaustFlow:"Portata di scarico",howMuchExhaustLeavesTheEngine:"La massa di scarico che esce dal motore ogni secondo: la luminosità della scia. La spinta sulla velocità di scarico quando il motore è dato.",plume:"Scia",shareThatScatters:"Parte che diffonde",theShareOfTheExhaustThat:"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.",particleRadius:"Raggio delle particelle",trailLifetime:"Durata della scia",howLongTheNarrowTrailLasts:"Quanto dura la scia stretta prima che le particelle siano sparite.",trailSpreading:"Espansione della scia",radiusAtRelease:"Raggio al rilascio",shareInTheCollar:"Parte nel collare",theCollarIsTheExhaustJust:"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.",collar:"Collare",collarSpreading:"Espansione del collare",howFastTheCollarWidensThree:"Quanto in fretta il collare si allarga: tre quarti della velocità di scarico quando il motore è dato.",collarLifetime:"Durata del collare",placeOfThePath:"Punto del percorso",time:"Istante",secondsOfTheRecordingNegativeBefore:"Secondi della registrazione; negativi prima del suo inizio: uno stadio visto minuti dopo il lancio era già alto quando la registrazione è iniziata.",position:"Posizione",altitude:"Altitudine",jet:"Getto",what:"Cosa",engineBurn:"Accensione del motore",propellantVented:"Propellenti scaricati",from:"Da",secondsOfTheRecordingNegativeBefore2:"Secondi della registrazione; negativi prima del suo inizio.",until:"Fino a",directionFromAft:"Direzione da dietro",t0StraightBackAlongTheStage:"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).",side:"Lato",roundTheLineOfMotionWhich:"Attorno alla linea del moto, il lato da cui esce all'inizio: 0 opposto alla Terra, 90 a destra del moto.",spinPeriod:"Periodo di rotazione",howLongTheStageTakesTo:"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.",speed:"Velocità",howFastItLeavesTheStage:"La velocità con cui lascia lo stadio. Un'accensione: la velocità di scarico del motore.",flow:"Portata",spreading:"Espansione",howFastEachPuffOfIt:"Quanto in fretta si allarga ogni sbuffo: un getto stretto tiene separati i bracci di una spirale.",lifetime:"Durata"};export{e as launchParameterTexts_it};
|