@rr0/ufoathome 0.177.2 → 0.178.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/rr0-interview.mjs +3 -3
- package/dist-embed-scene/{AdsbLolArchiveProvider-BHGe8FVN.js → AdsbLolArchiveProvider-B0Yi081_.js} +1 -1
- package/dist-embed-scene/{BeamEditor-zq64GorX.js → BeamEditor-DFGRzRny.js} +1 -1
- package/dist-embed-scene/{BeamSystem-BXee1GYk.js → BeamSystem-ebEMoYD3.js} +1 -1
- package/dist-embed-scene/{ContrailSystem-BSbI2jUe.js → ContrailSystem-Bn--uCNU.js} +1 -1
- package/dist-embed-scene/ControlPasses-BMma2JRm.js +29 -0
- package/dist-embed-scene/FilmChrome-DYiyzoB_.js +1 -0
- package/dist-embed-scene/{Flightradar24Provider-Dx2Fb8yO.js → Flightradar24Provider-CpwhYfIE.js} +1 -1
- package/dist-embed-scene/GLTFLoader-BxToReDu.js +1 -0
- package/dist-embed-scene/GenerativeKit-DR6C3LMC.js +4 -0
- package/dist-embed-scene/GenerativeKitMessages-Cu7wXgYa.js +1 -0
- package/dist-embed-scene/GenerativeKitMessages_en-Cl3kA96x.js +33 -0
- package/dist-embed-scene/GenerativeKitMessages_es-CEU93Cl3.js +33 -0
- package/dist-embed-scene/GenerativeKitMessages_fr-DmW0OAmF.js +33 -0
- package/dist-embed-scene/GenerativeKitMessages_it-Ba87kumS.js +33 -0
- package/dist-embed-scene/{HeadlightSystem-_BIIKhQ2.js → HeadlightSystem-l2XbBvXf.js} +1 -1
- package/dist-embed-scene/LanternEditor-H8VYYbRn.js +9 -0
- package/dist-embed-scene/{LaserBeam-DmH2JeMa.js → LaserBeam-B48FKTrt.js} +1 -1
- package/dist-embed-scene/LaunchEditor-CIYcS0Y-.js +22 -0
- package/dist-embed-scene/{LaunchPlume-BRnjFVcY.js → LaunchPlume-eEIp7_hM.js} +1 -1
- package/dist-embed-scene/{LaunchSimulation-DL7QBfEl.js → LaunchSimulation-DNNEzmzs.js} +1 -1
- package/dist-embed-scene/{ModuleSession-BvQABNEZ.js → ModuleSession-DLoAutYP.js} +2 -2
- package/dist-embed-scene/ModuleThree-R2LhnY95.js +1 -0
- package/dist-embed-scene/{ParameterForm-BMIW4Gkh.js → ParameterForm-ez-n_0Dw.js} +9 -9
- package/dist-embed-scene/{RailwaySystem-DZQr_rS_.js → RailwaySystem-C3Y0a9aT.js} +1 -1
- package/dist-embed-scene/{ReentryEditor-DJO_M-8-.js → ReentryEditor-CwY4oANp.js} +1 -1
- package/dist-embed-scene/{ReentrySimulation-pWRgNLjt.js → ReentrySimulation-BDgEPekW.js} +1 -1
- package/dist-embed-scene/ReferenceSystem-D9IdSvFM.js +1 -0
- package/dist-embed-scene/{SceneNames_en-CqzjDgS4.js → SceneNames_en-BCTAMSLj.js} +1 -1
- package/dist-embed-scene/{SceneNames_es-DMfxIS0T.js → SceneNames_es-BOWBdXXS.js} +1 -1
- package/dist-embed-scene/{SceneNames_fr-DydzEE4a.js → SceneNames_fr-De6iQ9ff.js} +1 -1
- package/dist-embed-scene/{SceneNames_it-DJAACEvb.js → SceneNames_it-DfBWbCPR.js} +1 -1
- package/dist-embed-scene/{TimelineTracks-B-bXAaF7.js → TimelineTracks-BQXJMJaJ.js} +1 -1
- package/dist-embed-scene/{TraceSystem-gVZk_ffU.js → TraceSystem-BD6YpW6g.js} +2 -2
- package/dist-embed-scene/UfoMessages_en-CXQNZd8v.js +1 -0
- package/dist-embed-scene/UfoMessages_es-CO-v8Jl6.js +1 -0
- package/dist-embed-scene/UfoMessages_fr-CGkQBn5r.js +1 -0
- package/dist-embed-scene/UfoMessages_it-BScqxIaH.js +1 -0
- package/dist-embed-scene/VideoButton-Cy_r767Z.js +1 -0
- package/dist-embed-scene/VideoExport-B8ZhHNnd.js +169 -0
- package/dist-embed-scene/{WaterSystem-DI_NBDfH.js → WaterSystem-DbyWlKho.js} +1 -1
- package/dist-embed-scene/browser-CltifEM0.js +1 -0
- package/dist-embed-scene/logo-h2-w4Mwu.png +0 -0
- package/dist-embed-scene/rr0-scene.mjs +426 -296
- package/dist-embed-scene/{sightingSchema-BfOYR_OD.js → sightingSchema-pBDQNwMz.js} +1 -1
- package/dist-embed-scene/trafficRuntime-CJIPy2oO.js +2 -0
- package/dist-embed-sighting/{AdsbLolArchiveProvider-DK4qEYPv.js → AdsbLolArchiveProvider-BqLvFUVC.js} +1 -1
- package/dist-embed-sighting/{BallesterGuaspAssessor-FGskpWWG.js → BallesterGuaspAssessor-CLQvJKlm.js} +1 -1
- package/dist-embed-sighting/{BeamEditor-BglkfKa6.js → BeamEditor-CcOf6lNz.js} +1 -1
- package/dist-embed-sighting/{BeamSystem-DDtPjozC.js → BeamSystem-B5d0Ymn5.js} +1 -1
- package/dist-embed-sighting/CaseExportMessages_en-jHlu58Y7.js +1 -0
- package/dist-embed-sighting/CaseExportMessages_es-dCQQFgjq.js +1 -0
- package/dist-embed-sighting/CaseExportMessages_fr-sDfEgjWg.js +1 -0
- package/dist-embed-sighting/CaseExportMessages_it-BJaglZtP.js +1 -0
- package/dist-embed-sighting/CaseMessages_en-CBS5QChl.js +1 -0
- package/dist-embed-sighting/CaseMessages_es-DAMl4aTC.js +1 -0
- package/dist-embed-sighting/CaseMessages_fr-C3wQxAk_.js +1 -0
- package/dist-embed-sighting/CaseMessages_it-CyrREg6v.js +1 -0
- package/dist-embed-sighting/CaseReportExport-Uf7Bs2Qz.js +65 -0
- package/dist-embed-sighting/CaseReportTexts_en-DlN7p1pC.js +1 -0
- package/dist-embed-sighting/CaseReportTexts_es-CncAEaey.js +1 -0
- package/dist-embed-sighting/CaseReportTexts_fr-B5nP6RlP.js +1 -0
- package/dist-embed-sighting/CaseReportTexts_it-Dc-oPmXB.js +1 -0
- package/dist-embed-sighting/{ContrailSystem-DXV0DnrQ.js → ContrailSystem-CqpZgLkb.js} +1 -1
- package/dist-embed-sighting/ControlPasses-BxgSO3B9.js +29 -0
- package/dist-embed-sighting/FilmChrome-DYiyzoB_.js +1 -0
- package/dist-embed-sighting/{Flightradar24Provider-Ch4GdVJG.js → Flightradar24Provider-DQtEJ3tX.js} +1 -1
- package/dist-embed-sighting/GLTFLoader-VIIHsteW.js +1 -0
- package/dist-embed-sighting/GenerativeKit-DR6C3LMC.js +4 -0
- package/dist-embed-sighting/GenerativeKitMessages-BudEc93g.js +1 -0
- package/dist-embed-sighting/GenerativeKitMessages_en-Cl3kA96x.js +33 -0
- package/dist-embed-sighting/GenerativeKitMessages_es-CEU93Cl3.js +33 -0
- package/dist-embed-sighting/GenerativeKitMessages_fr-DmW0OAmF.js +33 -0
- package/dist-embed-sighting/GenerativeKitMessages_it-Ba87kumS.js +33 -0
- package/dist-embed-sighting/HeadlightSystem-B4RR270O.js +34 -0
- package/dist-embed-sighting/{HynekAssessor-Cb8mZ9Ib.js → HynekAssessor-CJ9APziM.js} +1 -1
- package/dist-embed-sighting/LanternEditor-D1BA5pRP.js +9 -0
- package/dist-embed-sighting/{LaserBeam-DkKFSSp_.js → LaserBeam-BjjC_CzP.js} +1 -1
- package/dist-embed-sighting/LaunchEditor-TTSgWqbE.js +22 -0
- package/dist-embed-sighting/LaunchPlume-B2Fjd2_C.js +1 -0
- package/dist-embed-sighting/{LaunchSimulation-DUvH6_BB.js → LaunchSimulation-BcmPicEe.js} +1 -1
- package/dist-embed-sighting/{ModuleSession-GzfQ8_LE.js → ModuleSession-CY9_UusZ.js} +2 -2
- package/dist-embed-sighting/ModuleThree-BhryLUjX.js +1 -0
- package/dist-embed-sighting/{NearestApproach-BeKwz4vK.js → NearestApproach-iBLl7o1g.js} +1 -1
- package/dist-embed-sighting/ParameterForm-BaUeWd7v.js +91 -0
- package/dist-embed-sighting/{PoherAssessor-JLqDISRf.js → PoherAssessor-DDRUgnRW.js} +1 -1
- package/dist-embed-sighting/RailwaySystem-C1nfRJfj.js +41 -0
- package/dist-embed-sighting/ReadingSensitivityMessages_en-CF6XauSj.js +1 -0
- package/dist-embed-sighting/ReadingSensitivityMessages_es-Ca-13TTT.js +1 -0
- package/dist-embed-sighting/ReadingSensitivityMessages_fr-Djdd6Hdq.js +1 -0
- package/dist-embed-sighting/ReadingSensitivityMessages_it-CPUXxMqD.js +1 -0
- package/dist-embed-sighting/{ReentryEditor-BHgPXlx3.js → ReentryEditor-CGN3ewTE.js} +1 -1
- package/dist-embed-sighting/ReentrySimulation-C2kIulZ6.js +1 -0
- package/dist-embed-sighting/{ReferenceSystem-B5diz1Lt.js → ReferenceSystem-BRTCOQHk.js} +1 -1
- package/dist-embed-sighting/{RoadMarkings-Dv3xdtFG.js → RoadMarkings-CNLt-BEg.js} +1 -1
- package/dist-embed-sighting/{SceneNames_en-BbQ55UYu.js → SceneNames_en-ChY7v63o.js} +1 -1
- package/dist-embed-sighting/{SceneNames_es-DsJpGSDK.js → SceneNames_es-DH4YgJV5.js} +1 -1
- package/dist-embed-sighting/{SceneNames_fr-CKr5m8QL.js → SceneNames_fr-Ca52lykk.js} +1 -1
- package/dist-embed-sighting/{SceneNames_it-qSw1j95v.js → SceneNames_it-BQe9GLaj.js} +1 -1
- package/dist-embed-sighting/{SightingMessages_en-DuokT218.js → SightingMessages_en-Xm6PILcs.js} +1 -1
- package/dist-embed-sighting/{SightingMessages_es-JO8WQ1_V.js → SightingMessages_es-DMp0MUjJ.js} +1 -1
- package/dist-embed-sighting/{SightingMessages_fr-3C2RZVNA.js → SightingMessages_fr-NvQKGPaf.js} +1 -1
- package/dist-embed-sighting/{SightingMessages_it-BEMBUACg.js → SightingMessages_it-CKIf49Zt.js} +1 -1
- package/dist-embed-sighting/{TimelineTracks-XzShW15O.js → TimelineTracks-Ddv5sZHp.js} +1 -1
- package/{dist-embed-sighting-editor/TraceSystem-CDHG18il.js → dist-embed-sighting/TraceSystem-BkUPo1Xf.js} +2 -2
- package/dist-embed-sighting/UfoMessages_en-cLvtpfIC.js +1 -0
- package/dist-embed-sighting/UfoMessages_es-CO-v8Jl6.js +1 -0
- package/dist-embed-sighting/UfoMessages_fr-CGkQBn5r.js +1 -0
- package/dist-embed-sighting/UfoMessages_it-BScqxIaH.js +1 -0
- package/dist-embed-sighting/VideoButton-C62NkJrH.js +1 -0
- package/dist-embed-sighting/VideoExport-B8ZhHNnd.js +169 -0
- package/dist-embed-sighting/{WaterSystem-CcLIPQfy.js → WaterSystem-DrSAhM5g.js} +1 -1
- package/dist-embed-sighting/browser-CltifEM0.js +1 -0
- package/dist-embed-sighting/logo-h2-w4Mwu.png +0 -0
- package/dist-embed-sighting/rr0-sighting.mjs +531 -337
- package/dist-embed-sighting/{sightingSchema-BfOYR_OD.js → sightingSchema-pBDQNwMz.js} +1 -1
- package/dist-embed-sighting/trafficRuntime-CFgDqQz4.js +2 -0
- package/dist-embed-sighting-editor/{AdsbLolArchiveProvider-CXB-CDQ2.js → AdsbLolArchiveProvider-fZkxLAHp.js} +1 -1
- package/dist-embed-sighting-editor/{BallesterGuaspAssessor-Bb8Kl2FU.js → BallesterGuaspAssessor-DASadJjI.js} +1 -1
- package/dist-embed-sighting-editor/{BeamEditor-DJtZYFp0.js → BeamEditor-B2diaX_e.js} +1 -1
- package/dist-embed-sighting-editor/{BeamSystem-C6Wk_vNQ.js → BeamSystem-BfNJfayv.js} +1 -1
- package/dist-embed-sighting-editor/{BodyEditor-Cj7TgjV-.js → BodyEditor-CCBXFuuL.js} +1 -1
- package/dist-embed-sighting-editor/BodyEditorMessages_en-CckxSS1L.js +1 -0
- package/dist-embed-sighting-editor/BodyEditorMessages_es-B8GlFFBo.js +1 -0
- package/dist-embed-sighting-editor/BodyEditorMessages_fr-638ypdqf.js +1 -0
- package/dist-embed-sighting-editor/BodyEditorMessages_it-SKpMkHFI.js +1 -0
- package/dist-embed-sighting-editor/CaseEditorMessages_en-DrJY0M8h.js +1 -0
- package/dist-embed-sighting-editor/CaseEditorMessages_es-j8EeOBq6.js +1 -0
- package/dist-embed-sighting-editor/CaseEditorMessages_fr-BkwEF9mu.js +1 -0
- package/dist-embed-sighting-editor/CaseEditorMessages_it-d3Z0PBEw.js +1 -0
- package/dist-embed-sighting-editor/CaseExportMessages_en-jHlu58Y7.js +1 -0
- package/dist-embed-sighting-editor/CaseExportMessages_es-dCQQFgjq.js +1 -0
- package/dist-embed-sighting-editor/CaseExportMessages_fr-sDfEgjWg.js +1 -0
- package/dist-embed-sighting-editor/CaseExportMessages_it-BJaglZtP.js +1 -0
- package/dist-embed-sighting-editor/CaseReportExport-iCzv1W9B.js +65 -0
- package/dist-embed-sighting-editor/CaseReportTexts_en-DlN7p1pC.js +1 -0
- package/dist-embed-sighting-editor/CaseReportTexts_es-CncAEaey.js +1 -0
- package/dist-embed-sighting-editor/CaseReportTexts_fr-B5nP6RlP.js +1 -0
- package/dist-embed-sighting-editor/CaseReportTexts_it-Dc-oPmXB.js +1 -0
- package/dist-embed-sighting-editor/{ContrailSystem-e-OLIzTk.js → ContrailSystem-BWvO9taK.js} +1 -1
- package/dist-embed-sighting-editor/ControlPasses-BQ_DUxa_.js +29 -0
- package/dist-embed-sighting-editor/{CoverageAssessor-DUDmS-aG.js → CoverageAssessor-CSktyUlP.js} +1 -1
- package/dist-embed-sighting-editor/FilmChrome-DYiyzoB_.js +1 -0
- package/dist-embed-sighting-editor/{Flightradar24Provider-DtcvpdT3.js → Flightradar24Provider-OvRZWZWj.js} +1 -1
- package/dist-embed-sighting-editor/{GLTFLoader-AHdd-c6G.js → GLTFLoader-CM7Uk25s.js} +1 -1
- package/dist-embed-sighting-editor/GenerativeKit-DR6C3LMC.js +4 -0
- package/dist-embed-sighting-editor/GenerativeKitMessages-BNXaLr1m.js +1 -0
- package/dist-embed-sighting-editor/GenerativeKitMessages_en-Cl3kA96x.js +33 -0
- package/dist-embed-sighting-editor/GenerativeKitMessages_es-CEU93Cl3.js +33 -0
- package/dist-embed-sighting-editor/GenerativeKitMessages_fr-DmW0OAmF.js +33 -0
- package/dist-embed-sighting-editor/GenerativeKitMessages_it-Ba87kumS.js +33 -0
- package/dist-embed-sighting-editor/{GeoExportTexts-DAllttgw.js → GeoExportTexts-DBGGdRnP.js} +1 -1
- package/dist-embed-sighting-editor/{GeoJsonExport-3snOe-2J.js → GeoJsonExport-BZ-0v8fM.js} +1 -1
- package/dist-embed-sighting-editor/GeographicFigures-DqhWddS9.js +1 -0
- package/dist-embed-sighting-editor/{HeadlightSystem-CLhqQjbe.js → HeadlightSystem-C-8Gl3vu.js} +1 -1
- package/dist-embed-sighting-editor/{HynekAssessor-DvVp-CLS.js → HynekAssessor-CH2E88xV.js} +1 -1
- package/dist-embed-sighting-editor/{InterviewEditorElement-44XFadV4.js → InterviewEditorElement-Bz3hyZ-m.js} +2 -2
- package/dist-embed-sighting-editor/{KmlExport-B0SKgn4U.js → KmlExport-Bh4eTycx.js} +1 -1
- package/dist-embed-sighting-editor/{KmlImport-B9mAzJwr.js → KmlImport-CKxaATTA.js} +1 -1
- package/dist-embed-sighting-editor/LanternEditor-tTk1vUZm.js +9 -0
- package/dist-embed-sighting-editor/{LaserBeam-QJPhnVO_.js → LaserBeam-CtogDP38.js} +1 -1
- package/dist-embed-sighting-editor/LaunchEditor-CteAalch.js +22 -0
- package/dist-embed-sighting-editor/{LaunchPlume-C_r62XTj.js → LaunchPlume-BtRrJTP9.js} +1 -1
- package/dist-embed-sighting-editor/{LaunchSimulation-BSDTfZTv.js → LaunchSimulation-xKwguVJt.js} +1 -1
- package/dist-embed-sighting-editor/{ModelSource-B85niY1n.js → ModelSource-CnKzaNDn.js} +1 -1
- package/dist-embed-sighting-editor/{ModelThumbnails-uYh2sUIb.js → ModelThumbnails-UE_Er5EW.js} +1 -1
- package/dist-embed-sighting-editor/{ModelViewer-DLZhhuq5.js → ModelViewer-DoCshJc6.js} +1 -1
- package/dist-embed-sighting-editor/{ModuleConformance-CBMdTSVo.js → ModuleConformance-BKvZnuw9.js} +2 -2
- package/dist-embed-sighting-editor/{ModuleSession-rFLStWcj.js → ModuleSession-CJstaNEN.js} +3 -3
- package/dist-embed-sighting-editor/ModuleThree-1hxqvWFa.js +1 -0
- package/dist-embed-sighting-editor/{ModulesPanelElement-CGp6DrpQ.js → ModulesPanelElement-DdGqqdn4.js} +3 -3
- package/dist-embed-sighting-editor/{NearestApproach-Ctw1-XBO.js → NearestApproach-BH3Yw8Qz.js} +1 -1
- package/dist-embed-sighting-editor/{PictureRegistration-ZyvGfReK.js → PictureRegistration-B9C6iY17.js} +1 -1
- package/dist-embed-sighting-editor/{PoherAssessor-CLKwvgUL.js → PoherAssessor-DWcCWUfa.js} +1 -1
- package/dist-embed-sighting-editor/RailwaySystem-D3VBmx1X.js +41 -0
- package/dist-embed-sighting-editor/ReadingSensitivityMessages_en-CF6XauSj.js +1 -0
- package/dist-embed-sighting-editor/ReadingSensitivityMessages_es-Ca-13TTT.js +1 -0
- package/dist-embed-sighting-editor/ReadingSensitivityMessages_fr-Djdd6Hdq.js +1 -0
- package/dist-embed-sighting-editor/ReadingSensitivityMessages_it-CPUXxMqD.js +1 -0
- package/dist-embed-sighting-editor/{ReentryEditor-DXe8wen6.js → ReentryEditor-BDyG-48K.js} +2 -2
- package/dist-embed-sighting-editor/{ReentrySimulation-BxVE5Dsn.js → ReentrySimulation-BQj0wWXW.js} +1 -1
- package/dist-embed-sighting-editor/ReferenceSystem-C9NRL7UY.js +1 -0
- package/dist-embed-sighting-editor/RoadMarkings-ByQL2MTo.js +1 -0
- package/dist-embed-sighting-editor/SceneNames_en-BdRB6cjg.js +1 -0
- package/dist-embed-sighting-editor/SceneNames_es-Dk0UmXHp.js +1 -0
- package/dist-embed-sighting-editor/SceneNames_fr-_z2iZ8Bm.js +1 -0
- package/dist-embed-sighting-editor/SceneNames_it-CE7fanb3.js +1 -0
- package/dist-embed-sighting-editor/{SightingEditorMessages_en-G8-sD56V.js → SightingEditorMessages_en-jinQLW0J.js} +1 -1
- package/dist-embed-sighting-editor/{SightingEditorMessages_es-DEmsmIRU.js → SightingEditorMessages_es-CsrGiJYn.js} +1 -1
- package/dist-embed-sighting-editor/{SightingEditorMessages_fr-D2HXab_N.js → SightingEditorMessages_fr-cQ6KnPU1.js} +1 -1
- package/dist-embed-sighting-editor/{SightingEditorMessages_it-LpFdlGY5.js → SightingEditorMessages_it-D3Rqso5s.js} +1 -1
- package/dist-embed-sighting-editor/{SightingFileEditor-CnKF2ndt.js → SightingFileEditor-BCjntT4l.js} +1 -1
- package/dist-embed-sighting-editor/{TraceImport-CL8lefw6.js → TraceImport-uGVIjCrc.js} +2 -2
- package/{dist-embed-sighting/TraceSystem-XybhI4uJ.js → dist-embed-sighting-editor/TraceSystem-g262KZ3G.js} +2 -2
- package/dist-embed-sighting-editor/UfoMessages_en-JeMK-39o.js +1 -0
- package/dist-embed-sighting-editor/UfoMessages_es-CO-v8Jl6.js +1 -0
- package/dist-embed-sighting-editor/UfoMessages_fr-CGkQBn5r.js +1 -0
- package/dist-embed-sighting-editor/UfoMessages_it-BScqxIaH.js +1 -0
- package/dist-embed-sighting-editor/VideoButton-CqCZ65oK.js +1 -0
- package/dist-embed-sighting-editor/VideoExport-B8ZhHNnd.js +169 -0
- package/dist-embed-sighting-editor/WaterSystem-CIbQPMqE.js +1 -0
- package/dist-embed-sighting-editor/browser-CltifEM0.js +1 -0
- package/dist-embed-sighting-editor/logo-h2-w4Mwu.png +0 -0
- package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +610 -398
- package/dist-embed-sighting-editor/{sightingSchema-9xw8srxN.js → sightingSchema-RamhmoRU.js} +1 -1
- package/dist-embed-sighting-editor/{surroundingsSources-DXpzMDPy.js → surroundingsSources-BExFsNzP.js} +1 -1
- package/dist-embed-sighting-editor/trafficRuntime-CPRQW0Ho.js +2 -0
- package/package.json +2 -1
- package/dist-embed-scene/GLTFLoader-DDba3PaV.js +0 -1
- package/dist-embed-scene/LanternEditor-2q5seAWj.js +0 -9
- package/dist-embed-scene/LaunchEditor-Cupksu8A.js +0 -22
- package/dist-embed-scene/ModuleThree-12Uq6OyD.js +0 -1
- package/dist-embed-scene/ReferenceSystem-D9agTeWl.js +0 -1
- package/dist-embed-scene/UfoMessages_en-CRIdIMYy.js +0 -1
- package/dist-embed-scene/UfoMessages_es-BoulVpJw.js +0 -1
- package/dist-embed-scene/UfoMessages_fr-8f6FJbk6.js +0 -1
- package/dist-embed-scene/UfoMessages_it-cngzFg3N.js +0 -1
- package/dist-embed-scene/browser-_Ncw3Jhn.js +0 -1
- package/dist-embed-scene/trafficRuntime-BDtw1Kqi.js +0 -2
- package/dist-embed-sighting/CaseMessages_en-DEyvxYxv.js +0 -1
- package/dist-embed-sighting/CaseMessages_es-DDsQ93tK.js +0 -1
- package/dist-embed-sighting/CaseMessages_fr-DoHbDEkG.js +0 -1
- package/dist-embed-sighting/CaseMessages_it-CF8sKknV.js +0 -1
- package/dist-embed-sighting/GLTFLoader-BDyucwJ-.js +0 -1
- package/dist-embed-sighting/HeadlightSystem-DGUfgm2c.js +0 -34
- package/dist-embed-sighting/LanternEditor-CaZ1JhZS.js +0 -9
- package/dist-embed-sighting/LaunchEditor-QRG2uHH8.js +0 -22
- package/dist-embed-sighting/LaunchPlume-DBINBQgQ.js +0 -1
- package/dist-embed-sighting/ModuleThree-tnKi-oul.js +0 -1
- package/dist-embed-sighting/ParameterForm-DW6cQmYI.js +0 -91
- package/dist-embed-sighting/RailwaySystem-BfTJvmf3.js +0 -41
- package/dist-embed-sighting/ReentrySimulation-C3BR2hs3.js +0 -1
- package/dist-embed-sighting/UfoMessages_en-CoSqGYwb.js +0 -1
- package/dist-embed-sighting/UfoMessages_es-BoulVpJw.js +0 -1
- package/dist-embed-sighting/UfoMessages_fr-8f6FJbk6.js +0 -1
- package/dist-embed-sighting/UfoMessages_it-cngzFg3N.js +0 -1
- package/dist-embed-sighting/browser-_Ncw3Jhn.js +0 -1
- package/dist-embed-sighting/trafficRuntime-BAuwwA-Z.js +0 -2
- package/dist-embed-sighting-editor/BodyEditorMessages_en-zfy3BJb5.js +0 -1
- package/dist-embed-sighting-editor/BodyEditorMessages_es-w95anMnI.js +0 -1
- package/dist-embed-sighting-editor/BodyEditorMessages_fr-ixsDgTbt.js +0 -1
- package/dist-embed-sighting-editor/BodyEditorMessages_it-B3oQzqHE.js +0 -1
- package/dist-embed-sighting-editor/CaseEditorMessages_en-D47ntA6R.js +0 -1
- package/dist-embed-sighting-editor/CaseEditorMessages_es-CyIdBeD_.js +0 -1
- package/dist-embed-sighting-editor/CaseEditorMessages_fr-DXaZI1jZ.js +0 -1
- package/dist-embed-sighting-editor/CaseEditorMessages_it-Cp1-Jm34.js +0 -1
- package/dist-embed-sighting-editor/GeographicFigures-CLBS2HJ-.js +0 -1
- package/dist-embed-sighting-editor/LanternEditor-ngKN2Zt3.js +0 -9
- package/dist-embed-sighting-editor/LaunchEditor-B8KlP5eo.js +0 -22
- package/dist-embed-sighting-editor/ModuleThree-DrKN6B-3.js +0 -1
- package/dist-embed-sighting-editor/RailwaySystem-C67LdkZv.js +0 -41
- package/dist-embed-sighting-editor/ReferenceSystem-B201fXMC.js +0 -1
- package/dist-embed-sighting-editor/RoadMarkings-DJ2HL-6g.js +0 -1
- package/dist-embed-sighting-editor/SceneNames_en-DggkchR4.js +0 -1
- package/dist-embed-sighting-editor/SceneNames_es-BtXXqtTk.js +0 -1
- package/dist-embed-sighting-editor/SceneNames_fr-I6FOP0oQ.js +0 -1
- package/dist-embed-sighting-editor/SceneNames_it-DrW4eXBX.js +0 -1
- package/dist-embed-sighting-editor/UfoMessages_en-BxhQNf5z.js +0 -1
- package/dist-embed-sighting-editor/UfoMessages_es-BoulVpJw.js +0 -1
- package/dist-embed-sighting-editor/UfoMessages_fr-8f6FJbk6.js +0 -1
- package/dist-embed-sighting-editor/UfoMessages_it-cngzFg3N.js +0 -1
- package/dist-embed-sighting-editor/WaterSystem-B2xlCmn2.js +0 -1
- package/dist-embed-sighting-editor/browser-_Ncw3Jhn.js +0 -1
- package/dist-embed-sighting-editor/trafficRuntime-_7Uw8kC_.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={title:"Dossier {title} : rapport",generated:"Établi le {date} par UFO@home {version}, d'après le dossier et ses enregistrements tels qu'ils étaient alors.",method:"Ce rapport réunit, pour chaque témoin, les directions et tailles que l'enregistrement lui attribue en disant sur quoi elles reposent, et les autres valeurs justifiées ; puis, pour chaque lecture (l'explication proposée par un enquêteur), ce qu'elle a supposé, ses constats et sa sensibilité. Une lecture est confrontée aux seules indications du témoin, vues de sa position au même instant ; un écart n'est une contradiction qu'au-delà de l'incertitude d'un témoin pour ce type d'estimation (lois d'erreur des témoins). Les marges disent de combien chaque valeur supposée par la lecture peut varier avant qu'elle reproduise moins ; une marge est suffisante si elle couvre au moins la moitié de l'incertitude de la valeur de chaque côté. Le relief n'est pas pris en compte.",print:"Imprimer ou enregistrer en PDF",witnesses:"Témoins",witnessHeading:"Observation de {witness}",indications:"Indications du témoin",noIndication:"L'enregistrement n'attribue au témoin, en disant sur quoi elles reposent, aucune direction ni taille.",values:"Valeurs et ce sur quoi elles reposent",readingsCompared:"Lectures comparées",readingHeading:"{title} (lecture de {witness})",by:"Par {names}.",made:"Élaborée le {time}.",supposed:"Valeurs supposées",noneSupposed:"Rien de supposé.",findings:"Constats",noFinding:"Aucun constat.",sensitivity:"Sensibilité",comparisons:"Comparaison aux indications du témoin",interviews:"Interviews",account:"Récit",sources:"Sources",place:"Lieu",duration:"Durée",instrument:"Instrument",map:"Carte",mapCaption:"Vue de dessus, nord en haut : chaque témoin (point), ses lignes de visée aux instants où il a donné une direction, l'incertitude de l'azimut en éventail, et la trajectoire que chaque lecture place. Sol plat, sans fond de carte.",scale:"{metres} m",timelineCaption:"Les instants où le témoin a donné une indication (points) et les moments que nomme le compte rendu (repères), sur la durée de l'observation.",pictures:"Vues simulées",picturesCaption:"La scène simulée vue de la position du témoin, aux instants où il a donné une indication : son compte rendu, puis chaque lecture. Une illustration, pas une preuve : une image ressemblante ne valide pas une lecture, ce sont les écarts chiffrés ci-dessus qui en jugent.",accountView:"Compte rendu",noPicture:"vue non obtenue",figureCaption:"Où le témoin a dit avoir vu le phénomène (disques, l'incertitude de la direction en grisé) et où chaque lecture le place au même instant (croix).",azimuth:"Azimut",altitude:"Hauteur",saidLegend:"Dit par le témoin",columns:{instant:"Instant",phenomenon:"Phénomène",azimuth:"Azimut",altitude:"Hauteur",size:"Taille",uncertainty:"Incertitude",basis:"Base",rests:"Sur quoi elle repose",path:"Valeur",value:"Valeur donnée",reading:"Lecture",reads:"Lit",reproduced:"Reproduit",compared:"Indications dites",gap:"Écart médian",separation:"Écart",robustness:"Robustesse",supposedCount:"Valeurs supposées",knob:"Valeur décalée",from:"De",to:"À",reference:"Incertitude",covered:"Couverte",said:"Dit",read:"Lu",agrees:"Reproduit",outcome:"Résultat",against:"Contre",origin:"Origine",title:"Titre",witness:"Témoin",time:"Date",by:"Par",medium:"Moyen",finding:"Constat"},bases:{established:"établie",measured:"mesurée",stated:"énoncée",derived:"déduite",assumed:"supposée",fitted:"ajustée"},outcomes:{holds:"tient",fails:"échoue",untested:"non testable"},grounds:{established:"un élément établi",supposed:"une supposition"},origins:{written:"écrit par l'auteur",computed:"calculé"},knobs:{azimuth:"direction",altitude:"hauteur",distance:"distance",size:"taille",time:"instant"},robustness:{sufficient:"marge suffisante",fineTuned:"réglage fin ({knob})",tooFew:"trop peu reproduit",unjudged:"aucune loi pour en juger",nothing:"rien à confronter"},better:"Un autre réglage en reproduit davantage : {knob} {amount}, {agreed} sur {compared}.",noLaw:"aucune loi",yes:"oui",no:"non"};export{e as caseReportTexts_fr};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={title:"Caso {title}: rapporto",generated:"Elaborato il {date} da UFO@home {version}, dal caso e dalle sue registrazioni come erano allora.",method:"Questo rapporto riunisce, per ciascun testimone, le direzioni e le dimensioni che la registrazione gli attribuisce dicendo su cosa si basano, e gli altri valori giustificati; poi, per ciascuna lettura (la spiegazione proposta da un investigatore), ciò che ha supposto, le sue constatazioni e la sua sensibilità. Una lettura è confrontata solo con le indicazioni del testimone, viste dalla sua posizione nello stesso istante; uno scarto è una contraddizione solo oltre l'incertezza di un testimone per quel tipo di stima (leggi di errore dei testimoni). I margini dicono di quanto può variare ciascun valore supposto dalla lettura prima che riproduca meno; un margine è sufficiente se copre almeno metà dell'incertezza del valore da ciascun lato. Il rilievo non è considerato.",print:"Stampa o salva in PDF",witnesses:"Testimoni",witnessHeading:"Osservazione di {witness}",indications:"Indicazioni del testimone",noIndication:"La registrazione non attribuisce al testimone, dicendo su cosa si basano, nessuna direzione né dimensione.",values:"Valori e su cosa si basano",readingsCompared:"Letture a confronto",readingHeading:"{title} (lettura di {witness})",by:"Di {names}.",made:"Elaborata il {time}.",supposed:"Valori supposti",noneSupposed:"Niente di supposto.",findings:"Constatazioni",noFinding:"Nessuna constatazione.",sensitivity:"Sensibilità",comparisons:"Confronto con le indicazioni del testimone",interviews:"Interviste",account:"Resoconto",sources:"Fonti",place:"Luogo",duration:"Durata",instrument:"Strumento",map:"Mappa",mapCaption:"Vista dall'alto, nord in alto: ciascun testimone (punto), le sue linee di vista negli istanti in cui ha dato una direzione, l'incertezza dell'azimut a ventaglio, e la traiettoria che colloca ciascuna lettura. Suolo piano, senza mappa di sfondo.",scale:"{metres} m",timelineCaption:"Gli istanti in cui il testimone ha dato un'indicazione (punti) e i momenti che il resoconto nomina (segni), lungo la durata dell'osservazione.",pictures:"Viste simulate",picturesCaption:"La scena simulata vista dalla posizione del testimone, negli istanti in cui ha dato un'indicazione: il suo resoconto, poi ciascuna lettura. Un'illustrazione, non una prova: un'immagine somigliante non convalida una lettura, sono gli scarti calcolati qui sopra a giudicarla.",accountView:"Resoconto",noPicture:"vista non ottenuta",figureCaption:"Dove il testimone ha detto di aver visto il fenomeno (dischi, l'incertezza della direzione in grigio) e dove ciascuna lettura lo colloca nello stesso istante (croci).",azimuth:"Azimut",altitude:"Altezza",saidLegend:"Detto dal testimone",columns:{instant:"Istante",phenomenon:"Fenomeno",azimuth:"Azimut",altitude:"Altezza",size:"Dimensione",uncertainty:"Incertezza",basis:"Base",rests:"Su cosa si basa",path:"Valore",value:"Valore dato",reading:"Lettura",reads:"Legge",reproduced:"Riproduce",compared:"Indicazioni date",gap:"Scarto mediano",separation:"Scarto",robustness:"Robustezza",supposedCount:"Valori supposti",knob:"Valore spostato",from:"Da",to:"A",reference:"Incertezza",covered:"Coperta",said:"Detto",read:"Letto",agrees:"Riproduce",outcome:"Esito",against:"Contro",origin:"Origine",title:"Titolo",witness:"Testimone",time:"Data",by:"Di",medium:"Mezzo",finding:"Constatazione"},bases:{established:"accertato",measured:"misurato",stated:"dichiarato",derived:"dedotto",assumed:"supposto",fitted:"adattato"},outcomes:{holds:"regge",fails:"fallisce",untested:"non verificabile"},grounds:{established:"ciò che è accertato",supposed:"una supposizione"},origins:{written:"scritto dall'autore",computed:"calcolato"},knobs:{azimuth:"direzione",altitude:"altezza",distance:"distanza",size:"dimensione",time:"istante"},robustness:{sufficient:"margine sufficiente",fineTuned:"regolazione fine ({knob})",tooFew:"troppo poco riprodotto",unjudged:"nessuna legge per giudicarla",nothing:"niente da confrontare"},better:"Un'altra regolazione ne riproduce di più: {knob} {amount}, {agreed} su {compared}.",noLaw:"nessuna legge",yes:"sì",no:"no"};export{e as caseReportTexts_it};
|
package/dist-embed-sighting-editor/{ContrailSystem-e-OLIzTk.js → ContrailSystem-BWvO9taK.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ak as F,az as m,aA as I,an as X,aB as B,aC as D}from"./rr0-sighting-editor.mjs";import{C as x}from"./ContrailGrowth-DwHS8If9.js";class h{static MAX_SEGMENTS=8e3;static MIN_PIXELS=2;static UNRESOLVED_CONTRAST=.5;static STATIONS=[0,.5,1,1.5,2.25];static VERTICES_PER_SEGMENT=12*(h.STATIONS.length-1);static ICE_ASYMMETRY=.75;static phase(t){const s=h.ICE_ASYMMETRY;return(1-s*s)/(1+s*s-2*s*t)**1.5}object;group=new F;trails=[];positions=new Float32Array(h.MAX_SEGMENTS*h.VERTICES_PER_SEGMENT*3);colors=new Float32Array(h.MAX_SEGMENTS*h.VERTICES_PER_SEGMENT*4);segments=0;constructor(){const t=new m;t.setAttribute("position",new I(this.positions,3)),t.setAttribute("color",new I(this.colors,4)),t.setDrawRange(0,0),this.object=new X(t,new B({vertexColors:!0,transparent:!0,depthWrite:!1,side:D})),this.object.frustumCulled=!1,this.object.name="contrails",this.group.name="contrails",this.group.add(this.object)}get segmentCount(){return this.segments}set(t){this.trails=t}update(t,s,c){let p=0;this.segments=0;for(const o of this.trails){const u=this.samplesOf(o,t,s),i=c(o.id);for(let a=0;a+1<u.length;a++){const n=u[a],M=u[a+1];if(!n.forms||!M.forms)continue;if(this.segments>=h.MAX_SEGMENTS)break;const d=this.pushSegment(p,n,M,o.spanM,i,s);d>p&&this.segments++,p=d}}const y=this.object.geometry;y.setDrawRange(0,p);for(const[o,u]of[["position",3],["color",4]]){const i=y.getAttribute(o);i.clearUpdateRanges(),p>0&&i.addUpdateRange(0,p*u),i.needsUpdate=!0}}samplesOf(t,s,c){const p=s-x.FORMATION_S*1e3,y=[],o=(n,M,d,z,l,N)=>({x:M+n.driftEastMs*l+c.origin.x,y:z,z:-(d+n.driftNorthMs*l)+c.origin.z,age:l,forms:N,point:n});let u=-1;t.points.forEach((n,M)=>{n.tMs>p||(u=M,y.push(o(n,n.eastM,n.northM,n.upM,(s-n.tMs)/1e3,n.forms)))});const i=t.points[u],a=t.points[u+1];if(i&&a){const n=(p-i.tMs)/(a.tMs-i.tMs),M=(d,z)=>d+(z-d)*n;y.push(o(i,M(i.eastM,a.eastM),M(i.northM,a.northM),M(i.upM,a.upM),x.FORMATION_S,i.forms&&a.forms))}return y}pushSegment(t,s,c,p,y,o){const u=e=>({persistent:e.point.persistent,lifetimeS:e.point.lifetimeS,spanM:p,shearPerS:e.point.shearPerS,saturatedForS:e.point.saturatedForS}),i=x.opacity(s.age,u(s)),a=x.opacity(c.age,u(c));if(i<=0&&a<=0)return t;const n={x:c.x-s.x,y:c.y-s.y,z:c.z-s.z};if(Math.hypot(n.x,n.y,n.z)<1e-6)return t;const M={x:(s.x+c.x)/2-o.eye.x,y:(s.y+c.y)/2-o.eye.y,z:(s.z+c.z)/2-o.eye.z},d=this.normalise(this.cross(n,M)),z=e=>{if(!o.sun)return y;const r={x:e.x-o.eye.x,y:e.y-o.eye.y,z:e.z-o.eye.z},E=h.phase((o.sun.x*r.x+o.sun.y*r.y+o.sun.z*r.z)/(Math.hypot(r.x,r.y,r.z)||1));return[y[0]*E,y[1]*E,y[2]*E]},l=(e,r)=>{const E=Math.hypot(e.x-o.eye.x,e.y-o.eye.y,e.z-o.eye.z),A=x.widthM(p,e.age,e.point.shearPerS),g=Math.max(A,h.MIN_PIXELS*o.pixelRad*E),T=r*(A/g)**h.UNRESOLVED_CONTRAST,S=x.profileExponent(e.age),G=h.STATIONS.map((j,P)=>P===h.STATIONS.length-1?0:T*Math.exp(-Math.LN2*j**S));return{half:g/2,profile:G,scattered:z(e)}},N=[{sample:s,...l(s,i)},{sample:c,...l(c,a)}],w=h.STATIONS.length-1,f=(e,r,E)=>{const A=h.STATIONS[r],g=e.half*A*E,T=t*3;this.positions[T]=e.sample.x+d.x*g,this.positions[T+1]=e.sample.y+d.y*g,this.positions[T+2]=e.sample.z+d.z*g;const S=t*4;this.colors[S]=e.scattered[0],this.colors[S+1]=e.scattered[1],this.colors[S+2]=e.scattered[2],this.colors[S+3]=e.profile[r],t++},[R,O]=N;for(const e of[-1,1])for(let r=0;r<w;r++)f(R,r+1,e),f(R,r,e),f(O,r+1,e),f(R,r,e),f(O,r,e),f(O,r+1,e);return t}cross(t,s){return{x:t.y*s.z-t.z*s.y,y:t.z*s.x-t.x*s.z,z:t.x*s.y-t.y*s.x}}normalise(t){const s=Math.hypot(t.x,t.y,t.z)||1;return{x:t.x/s,y:t.y/s,z:t.z/s}}dispose(){this.object.geometry.dispose(),this.object.material.dispose(),this.group.removeFromParent()}}export{h as ContrailSystem};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import{av as b,a$ as A,bl as F,bm as E,bn as M,bo as P,bp as R,an as D,aQ as U,b7 as k}from"./rr0-sighting-editor.mjs";class w{target;wideCamera=new b;materials=new Map;draw(a){const{renderer:s,camera:r,equidistant:e}=a,o=s.getDrawingBufferSize(new A),n=o.x,i=o.y,t=n/i;if(e&&!F.supports(r.fov,t))throw new Error(`A field of ${r.fov}° is drawn through a cube, which the control passes do not follow yet: export through a narrower field.`);const c=this.sourceCamera(r,e?e.sourceFovDeg(r.fov,t):r.fov),f=this.usableTarget(n,i),l=this.drawDistance(a,c,f),d=this.drawPhenomenon(a,c,f),p=Math.tan(c.fov*Math.PI/360),u=new Float32Array(n*i),h=new Uint8Array(n*i);for(let v=0;v<i;v++)for(let g=0;g<n;g++){const m=this.sourcePixel(g,v,n,i,r.fov,t,p,e);if(m<0)continue;const x=v*n+g;u[x]=l[m*4];const y=d[m*4],C=d[m*4+1],T=d[m*4+2],_=d[m*4+3];h[x]=Math.max(y,C,T,_)>w.LIGHT_THRESHOLD?255:0}return{width:n,height:i,distanceM:u,phenomenon:h}}dispose(){this.target?.dispose();for(const a of this.materials.values())a.dispose();this.materials.clear()}static LIGHT_THRESHOLD=1e-6;sourcePixel(a,s,r,e,o,n,i,t){if(!t)return(e-1-s)*r+a;const c=(a+.5)/r*2-1,f=1-(s+.5)/e*2,l=t.directionFor(c,f,o);if(l.z>=0)return-1;const d=l.x/-l.z/(i*n),p=l.y/-l.z/i,u=Math.floor((d+1)/2*r),h=Math.floor((p+1)/2*e);return u<0||u>=r||h<0||h>=e?-1:h*r+u}sourceCamera(a,s){const r=this.wideCamera.copy(a);return r.fov=s,r.clearViewOffset(),r.updateProjectionMatrix(),r.updateMatrixWorld(),r}usableTarget(a,s){return this.target?(this.target.width!==a||this.target.height!==s)&&this.target.setSize(a,s):this.target=new E(a,s,{type:R,format:P,minFilter:M,magFilter:M,depthBuffer:!0}),this.target}drawDistance(a,s,r){const{renderer:e,scene:o}=a,n=[],i=[];for(const t of a.sky)t.visible&&(t.visible=!1,n.push(t));o.traverseVisible(t=>{if(t instanceof D){if(a.isSolid(t)){i.push({mesh:t,material:t.material}),t.material=Array.isArray(t.material)?t.material.map(c=>this.distanceMaterial(c)):this.distanceMaterial(t.material);return}}else if(!t.isPoints&&!t.isLine&&!t.isSprite)return;n.push(t)});for(const t of n)t.visible=!1;try{return this.drawInto(a,r,()=>e.render(o,s))}finally{for(const t of n)t.visible=!0;for(const{mesh:t,material:c}of i)t.material=c}}drawPhenomenon(a,s,r){return this.drawInto(a,r,()=>a.drawPhenomena(s))}drawInto(a,s,r){const{renderer:e,scene:o}=a,n=e.getRenderTarget(),i=e.autoClear,t=e.shadowMap.autoUpdate,c=o.fog,f=o.background,l=e.getClearAlpha(),d=e.getClearColor(new U);o.fog=null,o.background=null,e.shadowMap.autoUpdate=!1,e.setRenderTarget(s),e.setClearColor(0,0),e.clear(!0,!0,!0),e.autoClear=!1;try{r();const p=new Float32Array(s.width*s.height*4),u=e.getContext();return u.bindBuffer(u.PIXEL_PACK_BUFFER,null),e.readRenderTargetPixels(s,0,0,s.width,s.height,p),p}finally{e.autoClear=i,e.shadowMap.autoUpdate=t,e.setRenderTarget(n),e.setClearColor(d,l),o.fog=c,o.background=f}}distanceMaterial(a){const s=a.alphaTest??0,r=a.map??a.alphaMap??null,e=s>0&&r!==null,o=`${a.side}:${e?`${r.uuid}:${s}`:"-"}`;let n=this.materials.get(o);return n||(n=new k({defines:e?{CUTOUT:"",USE_UV:""}:{},uniforms:{cutoutMap:{value:r},cutoutAlpha:{value:s}},vertexShader:w.VERTEX,fragmentShader:w.FRAGMENT,side:a.side}),this.materials.set(o,n)),n}static VERTEX=`
|
|
2
|
+
#include <common>
|
|
3
|
+
#include <uv_pars_vertex>
|
|
4
|
+
#include <batching_pars_vertex>
|
|
5
|
+
#include <morphtarget_pars_vertex>
|
|
6
|
+
#include <skinning_pars_vertex>
|
|
7
|
+
varying float vDistance;
|
|
8
|
+
void main() {
|
|
9
|
+
#include <uv_vertex>
|
|
10
|
+
#include <batching_vertex>
|
|
11
|
+
#include <skinbase_vertex>
|
|
12
|
+
#include <begin_vertex>
|
|
13
|
+
#include <morphtarget_vertex>
|
|
14
|
+
#include <skinning_vertex>
|
|
15
|
+
#include <project_vertex>
|
|
16
|
+
vDistance = length(mvPosition.xyz);
|
|
17
|
+
}
|
|
18
|
+
`;static FRAGMENT=`
|
|
19
|
+
#include <uv_pars_fragment>
|
|
20
|
+
uniform sampler2D cutoutMap;
|
|
21
|
+
uniform float cutoutAlpha;
|
|
22
|
+
varying float vDistance;
|
|
23
|
+
void main() {
|
|
24
|
+
#ifdef CUTOUT
|
|
25
|
+
if (texture2D(cutoutMap, vUv).a < cutoutAlpha) discard;
|
|
26
|
+
#endif
|
|
27
|
+
gl_FragColor = vec4(vDistance, 0.0, 0.0, 1.0);
|
|
28
|
+
}
|
|
29
|
+
`}export{w as ControlPasses};
|
package/dist-embed-sighting-editor/{CoverageAssessor-DUDmS-aG.js → CoverageAssessor-CSktyUlP.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{aU as o}from"./rr0-sighting-editor.mjs";const l=[{id:"when",paths:["time"]},{id:"where",paths:["place.locations.*.lat","place.locations.*.lng","observerTrack.keyframes.*.pose.lat","observerTrack.keyframes.*.pose.lng"]},{id:"facing",paths:["observerTrack.keyframes.*.pose.headingDeg"]},{id:"apparent-size",paths:["timeline.keyframes.*.shapes.*.shape.angular.widthDeg","timeline.keyframes.*.shapes.*.shape.angular.heightDeg"]},{id:"sky-position",paths:["timeline.keyframes.*.shapes.*.shape.aim.azimuthDeg","timeline.keyframes.*.shapes.*.shape.aim.altitudeDeg"]},{id:"how-long",paths:["durationSeconds","endTime"]},{id:"appearance",paths:["timeline.keyframes.*.shapes.*.shape.kind","timeline.keyframes.*.shapes.*.shape.title","timeline.keyframes.*.shapes.*.shape.color","timeline.keyframes.*.shapes.*.shape.brightness"]},{id:"movement",paths:["timeline.keyframes.1.t","observerTrack.keyframes.1.t"]},{id:"sound",paths:["soundTrack.keyframes.*.sound.kind"]},{id:"conditions",paths:["weatherTrack.keyframes.*.weather.*","weather.*"]}],d=["fitted","assumed","derived","stated","measured","established"];class p{about="observer";async assess(a){const i=o(a,!0),s=l.map(e=>p.answer(e,i,a));return{score:s.filter(e=>e.basis==="stated").length/s.length,criteria:s}}static answer(a,i,s){const e=a.paths.flatMap(t=>p.resolve(t,i));if(e.length===0)return{id:a.id,paths:[]};const r=e.map(t=>p.basisAt(t,s)??"stated");return{id:a.id,basis:d.find(t=>r.includes(t)),paths:e}}static basisAt(a,i){const s=a.split(".");for(let e=s.length;e>0;e--){const r=i.provenance.at(s.slice(0,e).join("."))?.basis;if(r)return r}}static resolve(a,i){let s=[{path:[],value:i}];for(const e of a.split("."))s=s.flatMap(({path:r,value:t})=>{if(typeof t!="object"||t===null)return[];if(e!=="*"){const n=t[e];return n===void 0?[]:[{path:[...r,e],value:n}]}return Object.entries(t).filter(([,n])=>n!==void 0).map(([n,h])=>({path:[...r,n],value:h}))});return s.filter(({value:e})=>e!==null&&e!==""&&!(Array.isArray(e)&&e.length===0)).map(({path:e})=>e.join("."))}}export{p as CoverageAssessor};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class o{static TEXT_SHARE=.032;static MARGIN=.8;static LINE_SHARE=.9;static FONT="system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif";static LOGO_URL=new URL(""+new URL("logo-h2-w4Mwu.png",import.meta.url).href,import.meta.url).href;static LOGO_SHARE=.08;static LOGO_OPACITY=.45;static logo;static loadLogo(){return o.logo??=fetch(o.LOGO_URL).then(t=>t.ok?t.blob():Promise.reject(new Error(`Logo: ${t.status}`))).then(t=>createImageBitmap(t)).catch(t=>{console.warn("UFO@home: the film's logo could not be loaded:",t)})}static paint(t,i,e){const{width:d,height:f}=t.canvas,l=Math.max(10,Math.round(f*o.TEXT_SHARE));let c=d*o.LINE_SHARE;t.save();try{if(e){const s=Math.round(f*o.LOGO_SHARE),w=l*o.MARGIN;t.globalAlpha=o.LOGO_OPACITY,t.imageSmoothingQuality="high",t.drawImage(e,d-w-s,f-w-s,s,s),t.globalAlpha=1,c=Math.min(c,d-2*(s+2*w))}if(i.map){const s=i.map;t.drawImage(s.canvas,s.left*d,s.top*f,s.width*d,s.height*f)}t.fillStyle="#fff",t.shadowColor="rgba(0, 0, 0, 0.9)",t.shadowBlur=l*.3,t.shadowOffsetY=l*.06,i.time&&(t.font=`600 ${l}px ${o.FONT}`,t.textBaseline="top",t.textAlign="left",t.fillText(i.time,l*o.MARGIN,l*o.MARGIN)),i.caption&&o.paintCaption(t,i.caption,l,c)}finally{t.restore()}}static paintCaption(t,i,e,d){const{width:f,height:l}=t.canvas,c=`700 ${e}px ${o.FONT}`,s=`400 ${e}px ${o.FONT}`,R=[...i.label.split(/\s+/).filter(Boolean).map(n=>({text:n,font:c})),...i.note?`— ${i.note}`.split(/\s+/).filter(Boolean).map(n=>({text:n,font:s})):[]].map(n=>(t.font=n.font,{...n,width:t.measureText(n.text).width}));t.font=s;const u=t.measureText(" ").width,h=[];let a={words:[],width:0};for(const n of R){const p=a.width+(a.words.length>0?u:0)+n.width;a.words.length>0&&p>d&&(h.push(a),a={words:[],width:0}),a.width+=(a.words.length>0?u:0)+n.width,a.words.push(n)}a.words.length>0&&h.push(a);const A=e*1.3;t.textBaseline="alphabetic",t.textAlign="left";let x=l-e*o.MARGIN-(h.length-1)*A;for(const n of h){let p=(f-n.width)/2;for(const O of n.words)t.font=O.font,t.fillText(O.text,p,x),p+=O.width+u;x+=A}}}export{o as FilmChrome};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ai as R,ab as l,a9 as I}from"./rr0-sighting-editor.mjs";class p extends Error{constructor(t){super(t),this.problem=t}}class e{citation=R;static FIRST_MS=Date.UTC(2016,4,11);static DEFAULT_RADIUS_KM=100;static RINGS_KM=[25,50];static SNAPSHOT_LIMIT=60;static SMALLEST_PLAN_RESULTS=20;static MAX_TRACED=8;static CREDITS_PER_SNAPSHOT_FLIGHT=8;static CREDITS_PER_TRACK=40;static CREDITS_FOR_NOTHING=1;static MAX_CREDITS_PER_PAGE=5e3;static WORST_CASE_CREDITS=(e.MAX_TRACED-1)*e.RINGS_KM.length*e.CREDITS_PER_SNAPSHOT_FLIGHT+e.SNAPSHOT_LIMIT*e.CREDITS_PER_SNAPSHOT_FLIGHT+e.MAX_TRACED*e.CREDITS_PER_TRACK;static API="https://fr24api.flightradar24.com/api";static IN_THE_AIR_FT="1-60000";static KM_PER_DEG=111.32;token;fetchImpl;settleMs;requestsPerMinute;snapshots=[];tracks=new Map;descriptions=new Map;requestTimes=[];tokenOfMemory;latestQuestion=0;creditsSpent=0;constructor(t){this.token=t.token,this.fetchImpl=t.fetchImpl??fetch.bind(globalThis),this.settleMs=t.settleMs??1500,this.requestsPerMinute=t.requestsPerMinute??10}mayCover(t){return t>=e.FIRST_MS&&t<=Date.now()}async between(t,n,i,o=e.DEFAULT_RADIUS_KM){const u=this.token();if(!u)return{status:"failed",problem:"credential"};u!==this.tokenOfMemory&&this.forgetAnswers(u);try{const c=await this.snapshotFor(u,t,n,i,o);if(!c)return{status:"failed"};const s=c.flights.slice(0,e.MAX_TRACED),h=await Promise.all(s.map(a=>this.trackOf(u,a))),f=[];return s.forEach((a,r)=>{const S=h[r].filter(T=>T.t>=n&&T.t<=i&&l.groundDistanceKm(t,T)<=o);S.length>0&&f.push({...e.addressOf(a),points:S})}),{status:"found",tracks:f,creditsSpent:this.creditsSpent,partial:{traced:s.length,seen:c.flights.length,moreSeen:c.flights.length>=e.SMALLEST_PLAN_RESULTS,withinKm:c.withinKm}}}catch(c){return{status:"failed",problem:c instanceof p?c.problem:"network",creditsSpent:this.creditsSpent}}}async describe(t){return this.descriptions.get(I.keyOf(t))}static addressOf(t){const n=t.hex?Number.parseInt(t.hex,16):Number.NaN;return Number.isFinite(n)?{icao:n,nonIcao:!1}:{icao:Number.parseInt(t.fr24_id,16),nonIcao:!0}}static boundsAround(t,n){const i=n/e.KM_PER_DEG,o=Math.min(90,t.lat+i),u=Math.max(-90,t.lat-i),c=Math.cos(Math.max(Math.abs(o),Math.abs(u))*Math.PI/180),s=c<1e-6?180:n/(e.KM_PER_DEG*c),h=Math.max(-180,t.lng-s),f=Math.min(180,t.lng+s);return[o,u,h,f].map(a=>a.toFixed(3)).join(",")}forgetAnswers(t){this.tokenOfMemory=t,this.snapshots.length=0,this.tracks.clear(),this.descriptions.clear()}async snapshotFor(t,n,i,o,u){const c=`${n.lat.toFixed(3)},${n.lng.toFixed(3)},${u}`;for(const f of this.snapshots){const a=await f.catch(()=>{});if(a&&a.place===c&&a.t>=i&&a.t<=o)return a}const s=++this.latestQuestion;if(this.settleMs>0&&await new Promise(f=>setTimeout(f,this.settleMs)),s!==this.latestQuestion)return;if(this.creditsSpent+e.WORST_CASE_CREDITS>e.MAX_CREDITS_PER_PAGE)throw new p("budget");const h=this.askSnapshot(t,n,Math.round((i+o)/2),u,c);return this.snapshots.push(h),h.catch(()=>this.snapshots.splice(this.snapshots.indexOf(h),1)),h}async askSnapshot(t,n,i,o,u){const c=[...e.RINGS_KM.filter(a=>a<o),o];let s=[],h=o;for(const a of c)if(h=a,s=await this.flightsWithin(t,n,i,a),s.length>=e.MAX_TRACED)break;const f=a=>l.groundDistanceKm(n,{lat:a.lat,lng:a.lon});return{t:i,place:u,withinKm:h,flights:[...s].sort((a,r)=>f(a)-f(r))}}async flightsWithin(t,n,i,o){const u=new URLSearchParams({timestamp:String(Math.floor(i/1e3)),bounds:e.boundsAround(n,o),altitude_ranges:e.IN_THE_AIR_FT,limit:String(e.SNAPSHOT_LIMIT)}),s=(await this.get(t,`/historic/flight-positions/full?${u}`)).data??[];this.creditsSpent+=s.length>0?s.length*e.CREDITS_PER_SNAPSHOT_FLIGHT:e.CREDITS_FOR_NOTHING;for(const h of s){const f={type:h.type||void 0,registration:h.reg||void 0};(f.type||f.registration)&&this.descriptions.set(I.keyOf(e.addressOf(h)),f)}return s}trackOf(t,n){let i=this.tracks.get(n.fr24_id);return i||(i=this.get(t,`/flight-tracks?flight_id=${encodeURIComponent(n.fr24_id)}`).then(o=>{const c=(Array.isArray(o)?o:o.data??[]).flatMap(s=>s.tracks??[]);return this.creditsSpent+=c.length>0?e.CREDITS_PER_TRACK:e.CREDITS_FOR_NOTHING,c.filter(s=>s.source?.toUpperCase()!=="ESTIMATED"&&s.alt>0).map(s=>({t:Date.parse(s.timestamp),lat:s.lat,lng:s.lon,altitudeFt:s.alt,groundSpeedKt:s.gspeed,trackDeg:s.track})).sort((s,h)=>s.t-h.t)}),i.catch(()=>this.tracks.delete(n.fr24_id)),this.tracks.set(n.fr24_id,i)),i}async get(t,n){await this.paced();const i=await this.fetchImpl(`${e.API}${n}`,{headers:{Accept:"application/json","Accept-Version":"v1",Authorization:`Bearer ${t}`}});if(!i.ok)throw new p(e.problemOf(i.status));return await i.json()}static problemOf(t){switch(t){case 401:return"credential";case 402:return"credits";case 429:return"rate";case 400:case 403:case 404:return"refused";default:return"network"}}async paced(){for(;;){const t=Date.now();for(;this.requestTimes.length>0&&t-this.requestTimes[0]>=6e4;)this.requestTimes.shift();if(this.requestTimes.length<this.requestsPerMinute){this.requestTimes.push(t);return}await new Promise(n=>setTimeout(n,6e4-(t-this.requestTimes[0])+50))}}}export{e as Flightradar24Provider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bn as be,bo as Q,bp as he,bq as Le,br as v,bs as de,aT as y,aV as pe,aJ as F,bt as w,bh as U,bd as Me,bu as Se,an as ye,w as K,bv as we,V as C,Q as me,bw as Ne,u as ge,bx as Ie,by as Oe,at as V,bz as Ce,bA as Te,bB as Fe,bC as Pe,bD as He,bi as J,bE as Re,bF as Z,bG as ke,bH as De,b9 as Ge,bI as X,bJ as ve,ai as Ee,av as Ue,au as G,bK as Ke,as as Be,bL as je,ag as Ve,bM as Xe,bN as ze,bO as qe,aH as We,ad as z,ao as Ye,b7 as Qe,bP as Je,bQ as Ze,bR as $e,bS as en,bT as nn,bU as tn,bV as xe,a$ as sn,bj as ne,bW as te,bX as se,bY as ie,bZ as re,b_ as rn,b$ as on,aj as an,ak as cn}from"./rr0-sighting-editor.mjs";function oe(f,n){if(n===be)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 Le{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 bn(e)}),this.register(function(e){return new Ln(e)}),this.register(function(e){return new Mn(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 Sn(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 yn(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 wn(i,this.dracoLoader);break;case g.KHR_TEXTURE_TRANSFORM:r[l]=new Nn;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],w);const l=o.range!==void 0?o.range:0;switch(o.type){case"directional":c=new ye(u),c.target.position.set(0,0,-1),c.add(c.target);break;case"point":c=new Se(u),c.distance=l;break;case"spot":c=new Me(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),S(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],w),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?y: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?y: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?y: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?y: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],w)}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?y: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?y: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],w),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?y: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?y: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],w),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?y: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?y: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 bn{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 Ln{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 Mn{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 Sn{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!==L.TRIANGLES&&c.mode!==L.TRIANGLE_STRIP&&c.mode!==L.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 we(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 b=o[E];x.instanceColor=new Ne(b.array,b.itemSize,b.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 yn{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 wn{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,w,h)})})}}class Nn{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 b=r[R+E+a],N=r[R+E+o]*u,M=r[p+E+a],k=r[p+E]*u;i[E]=A*b+x*N+m*M+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 L={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 S(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),S(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,b=new A(r[1],x,t.sparse.count*T),N=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 M=0,k=b.length;M<k;M++){const P=b[M];if(m.setX(P,N[M*o]),o>=2&&m.setY(P,N[M*o+1]),o>=3&&m.setZ(P,N[M*o+2]),o>=4&&m.setW(P,N[M*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),S(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],w),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],w)}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),S(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===L.TRIANGLES||m.mode===L.TRIANGLE_STRIP||m.mode===L.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===L.TRIANGLE_STRIP?T.geometry=oe(T.geometry,he):m.mode===L.TRIANGLE_FAN&&(T.geometry=oe(T.geometry,Q));else if(m.mode===L.LINES)T=new Xe(R,A);else if(m.mode===L.LINE_STRIP)T=new ze(R,A);else if(m.mode===L.LINE_LOOP)T=new qe(R,A);else if(m.mode===L.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),S(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)),S(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 b=h[x],N=d[x],M=p[x],k=R[x],P=m[x];if(b===void 0)continue;b.updateMatrix&&b.updateMatrix();const B=s._createAnimationTracks(b,N,M,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 S(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),S(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)),S(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!==w&&"COLOR_0"in s&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${re.workingColorSpace}" not supported.`),S(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{by as Le,bz as Q,bA as he,bB as Me,bC as v,bD as de,a_ as y,a$ as pe,aQ as F,bE as w,bs as U,bj as be,bF as Se,au as ye,G as B,bG as we,V as C,Q as me,bH as Ne,C as ge,bI as Ie,bJ as Oe,aA as V,bK as Ce,bL as Te,bM as Fe,bN as Pe,bO as He,bt as J,bn as Re,bP as Z,bQ as ke,bR as De,bf as Ge,bS as X,bT as ve,ap as Ee,aC as Ue,aB as G,bU as Be,az as Ke,bV as je,an as Ve,bW as Xe,bX as ze,bY as qe,aO as We,ak as z,av as Ye,bd as Qe,bZ as Je,b_ as Ze,b$ as $e,c0 as en,c1 as nn,c2 as tn,c3 as xe,b5 as sn,bu as ne,c4 as te,c5 as se,c6 as ie,c7 as re,c8 as rn,c9 as on,aq as an,ar as cn}from"./rr0-sighting-editor.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 bn(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 Sn(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 yn(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 wn(i,this.dracoLoader);break;case g.KHR_TEXTURE_TRANSFORM:r[l]=new Nn;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],w);const l=o.range!==void 0?o.range:0;switch(o.type){case"directional":c=new ye(u),c.target.position.set(0,0,-1),c.add(c.target);break;case"point":c=new Se(u),c.distance=l;break;case"spot":c=new be(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),S(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],w),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?y: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?y: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?y: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?y: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],w)}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?y: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?y: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],w),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?y: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?y: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],w),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?y: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?y: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 bn{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 Sn{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 B,m=new C,T=new me,A=new C(1,1,1),x=new we(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 Ne(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 yn{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 wn{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,w,h)})})}}class Nn{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],N=r[R+E+o]*u,b=r[p+E+a],k=r[p+E]*u;i[E]=A*L+x*N+m*b+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 S(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 B;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),S(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),N=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 b=0,k=L.length;b<k;b++){const P=L[b];if(m.setX(P,N[b*o]),o>=2&&m.setY(P,N[b*o+1]),o>=3&&m.setZ(P,N[b*o+2]),o>=4&&m.setW(P,N[b*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),S(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],w),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],w)}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),S(l,i),e.associations.set(l,{materials:n}),i.extensions&&O(t,l,i),l})}createUniqueName(n){const e=Be.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 Ke,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),S(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)),S(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 B;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],N=d[x],b=p[x],k=R[x],P=m[x];if(L===void 0)continue;L.updateMatrix&&L.updateMatrix();const K=s._createAnimationTracks(L,N,b,k,P);if(K)for(let j=0;j<K.length;j++)T.push(K[j])}const A=new $e(i,void 0,T);return S(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),S(u,i),i.extensions&&O(s,u,i),i.matrix!==void 0){const l=new B;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)),S(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 Bn(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!==w&&"COLOR_0"in s&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${re.workingColorSpace}" not supported.`),S(f,n),Bn(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,4 @@
|
|
|
1
|
+
import{zip as x}from"./browser-CltifEM0.js";import{g as $,V as A,O as T,B as v,M as D,C as F,Q as _}from"./VideoExport-B8ZhHNnd.js";class p{static DEPTH_NEAR_M=1;static DEPTH_FAR_M=2e4;static MASK_MARGIN_PX=4;static depthLevel(e){if(!(e>0))return 0;const t=1-Math.log(e/p.DEPTH_NEAR_M)/Math.log(p.DEPTH_FAR_M/p.DEPTH_NEAR_M);return Math.min(1,Math.max(0,t))}static dilate(e,t,a,r,o=p.MASK_MARGIN_PX){const i=new Uint8Array(e.length);for(let n=0;n<r;n++)for(let s=0;s<a;s++){let f=0;for(let m=-o;m<=o&&!f;m++){const h=s+m;h>=0&&h<a&&e[n*a+h]&&(f=255)}i[n*a+s]=f}for(let n=0;n<r;n++)for(let s=0;s<a;s++){let f=0;for(let m=-o;m<=o&&!f;m++){const h=n+m;h>=0&&h<r&&i[h*a+s]&&(f=255)}t[n*a+s]=f}}}class g{static of(e,t){const a=e,r=t.rate&&t.rate>0?t.rate:1,o=n=>Math.max(0,(n-t.fromSeconds)/r);return[`Realistic, steady first-person view, as seen by a pedestrian's own eyes, ${a.place?.name??"place not stated"}, local time ${a.time??"not stated"}.`,"Keep exactly the geometry, horizon, framing, lighting and motion of the reference video: only make the textures (vegetation, ground,","buildings, clouds, rain) photographic. Render the phenomenon as realistically as the rest (same grain, blur, haze and light), but keep","its shape, size, colour, brightness, position and motion exactly those of the reference video.","","Phenomenon, as drawn by the reconstruction from the testimony:",...g.shapes(a,t.fromSeconds),...g.section("What happens:",g.milestones(a,t,o)),...g.section("Weather and light (follow this, not the reference's own colours):",g.weather(a,t,o)),"","Negative prompt:","added objects, windows, portholes, lights or beams not in the reference, smoke, people, animals, camera shake beyond the reference,","lens flares not in the reference, any change of the phenomenon's shape, size, colour, brightness, position or motion, text, logos."].join(`
|
|
2
|
+
`)+`
|
|
3
|
+
`}static section(e,t){return t.length>0?["",e,...t]:[]}static text(e,t="en"){if(e!==void 0)return typeof e=="string"?e:e[t]??e.en??Object.values(e)[0]}static shapes(e,t){const a=new Map;for(const r of e.timeline?.keyframes??[])for(const o of r.shapes??[])(r.t<=t*1e3||!a.has(o.sourceId))&&a.set(o.sourceId,o.shape);return a.size===0?["- none drawn."]:[...a.entries()].map(([r,o])=>{const i=o.angular?`${o.angular.widthDeg}° wide and ${o.angular.heightDeg}° tall as seen`:"size not stated",n=o.aim?`, at azimuth ${Math.round(o.aim.azimuthDeg)}°, ${o.aim.altitudeDeg.toFixed(1)}° above the horizon`:"";return`- ${g.text(o.title)??r}: colour ${o.color??"not stated"}, ${i}${n}.`})}static milestones(e,t,a){return(e.milestones??[]).filter(r=>r.t/1e3>=t.fromSeconds&&r.t/1e3<=t.toSeconds).map(r=>`- ${a(r.t/1e3).toFixed(1)} s into the video: ${g.text(r.note)??""}`)}static weather(e,t,a){const r=(e.tags??[]).length>0?[`- ${(e.tags??[]).join(", ")}.`]:[];let o="";for(const i of e.weatherTrack?.keyframes??[]){const n=i.t/1e3;if(n>t.toSeconds)break;const s=g.describe(i.weather);s!==o&&(o=s,r.push(`- ${n<=t.fromSeconds?"from the start":`from ${a(n).toFixed(1)} s into the video`}: ${s}.`))}return r}static describe(e){const t=[];return typeof e.cloudCover=="number"&&t.push(e.cloudCover>=.95?"overcast":`cloud cover ${Math.round(e.cloudCover*100)} %`),typeof e.cloudBaseM=="number"&&t.push(`cloud base ${Math.round(e.cloudBaseM)} m`),t.push(e.precipitationType&&e.precipitationType!=="none"?`${e.precipitationType}, intensity ${e.precipitationIntensity??"not stated"}`:"no precipitation"),t.join(", ")}}class b{static async make(e,t,a,r){const o=Math.max(2,Math.floor(e.film.width/2)*2),i=Math.max(2,Math.floor(e.film.height/2)*2),n=await $(["avc","vp9","av1"],{width:o,height:i});if(!n)throw new Error(`No video codec for ${o}×${i}`);const s=await Promise.all(["depth","phenomenon-mask","sky-mask"].map(w=>b.passFilm(w,o,i,n))),[f,m,h]=s;let l,y,E=0;try{const w=await A.film({...e.film,frameAt:(c,d,M)=>e.film.frameAt(c,d,M)?(l=e.drawControlPasses(),!0):!1,hearInto:c=>e.film.hearInto(c),afterFrame:async(c,d)=>{if(c===0&&(y=await d.canvas.convertToBlob({type:"image/png"})),!l)throw new Error(`No control passes for frame ${c}`);b.paint(l,f.context,m.context,h.context),l=void 0;for(const M of s)await M.source.add(c/A.FRAME_RATE,1/A.FRAME_RATE);E=c+1}},a,r),u=await Promise.all(s.map(async c=>{await c.output.finalize();const d=c.output.target.buffer;if(!d)throw new Error(`Empty ${c.name} film`);return[c.name,new Uint8Array(d)]}));return await b.zipped(e,t,new Uint8Array(await w.arrayBuffer()),u,y,E)}catch(w){throw await Promise.all(s.map(u=>u.output.cancel().catch(()=>{}))),w}}static async passFilm(e,t,a,r){const o=new OffscreenCanvas(t,a),i=o.getContext("2d");if(!i)throw new Error("No 2D context");i.imageSmoothingEnabled=!1;const n=new T({format:new D({fastStart:"in-memory"}),target:new v}),s=new F(o,{codec:r,quality:_});return n.addVideoTrack(s,{frameRate:A.FRAME_RATE}),await n.start(),{name:e,output:n,source:s,context:i}}static paint(e,t,a,r){const{width:o,height:i}=e,n=o*i,s=new Uint8Array(n);p.dilate(e.phenomenon,s,o,i);const f={depth:new ImageData(o,i),phenomenon:new ImageData(o,i),sky:new ImageData(o,i)};for(let l=0;l<n;l++){const y=e.distanceM[l],E=Math.round(p.depthLevel(y)*255),w=y>0?0:255,u=l*4;for(const[c,d]of[[f.depth.data,E],[f.phenomenon.data,s[l]],[f.sky.data,w]])c[u]=d,c[u+1]=d,c[u+2]=d,c[u+3]=255}const m=new OffscreenCanvas(o,i),h=m.getContext("2d");for(const[l,y]of[[t,f.depth],[a,f.phenomenon],[r,f.sky]])h.putImageData(y,0,0),l.drawImage(m,0,0,l.canvas.width,l.canvas.height)}static zipped(e,t,a,r,o,i){const n=new TextEncoder,s=e.film.fromMs/1e3,f=e.film.toMs/1e3,m=e.film.rate>0?e.film.rate:1,h=Math.round(i/A.FRAME_RATE*10)/10,l=new Date().toISOString().slice(0,10),y={title:e.title,source:e.source??"",date:l,fps:String(A.FRAME_RATE),duration:String(h),near:String(p.DEPTH_NEAR_M),far:String(p.DEPTH_FAR_M),margin:String(p.MASK_MARGIN_PX),label:t.label},E=t.readme.replace(/\{(\w+)\}/g,(d,M)=>y[M]??d),w={title:e.title,source:e.source,madeBy:A.MADE_BY,date:l,clip:{fromSeconds:s/m,toSeconds:f/m,fps:A.FRAME_RATE,frames:i,width:e.film.width,height:e.film.height},depth:{encoding:"1 - ln(d / near) / ln(far / near), clamped to 0..1; 0 for the sky",nearM:p.DEPTH_NEAR_M,farM:p.DEPTH_FAR_M},phenomenonMaskMarginPx:p.MASK_MARGIN_PX,label:t.label},u={level:0},c={"reference.mp4":[a,u],...Object.fromEntries(r.map(([d,M])=>[`${d}.mp4`,[M,u]])),"prompt.txt":n.encode(g.of(e.recording,{fromSeconds:s,toSeconds:f,rate:m})),[t.readmeFile]:n.encode(E),"manifest.json":n.encode(JSON.stringify(w,null,2)+`
|
|
4
|
+
`)};return(async()=>(o&&(c["first-frame.png"]=[new Uint8Array(await o.arrayBuffer()),u]),new Promise((d,M)=>x(c,(R,S)=>R?M(R):d(new Blob([S],{type:"application/zip"}))))))()}}export{b as GenerativeKit};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{k as r,_ as t}from"./rr0-sighting-editor.mjs";const i=r.catalog({en:()=>t(()=>import("./GenerativeKitMessages_en-Cl3kA96x.js"),[],import.meta.url).then(e=>e.generativeKitMessages_en),fr:()=>t(()=>import("./GenerativeKitMessages_fr-DmW0OAmF.js"),[],import.meta.url).then(e=>e.generativeKitMessages_fr),es:()=>t(()=>import("./GenerativeKitMessages_es-CEU93Cl3.js"),[],import.meta.url).then(e=>e.generativeKitMessages_es),it:()=>t(()=>import("./GenerativeKitMessages_it-Ba87kumS.js"),[],import.meta.url).then(e=>e.generativeKitMessages_it)});export{i as generativeKitMessages};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const e={readmeFile:"README.md",label:"Generated reconstruction, not real footage",readme:`# Generative AI kit: {title}
|
|
2
|
+
|
|
3
|
+
This kit is for making, with a video generator (Runway, Kling, Luma, Veo…), a realistic version of the UFO@home reconstruction of this observation, without letting the generator invent the testimony.
|
|
4
|
+
|
|
5
|
+
Source: {source}
|
|
6
|
+
Made with UFO@home (https://ufoathome.org) on {date}.
|
|
7
|
+
|
|
8
|
+
## Contents
|
|
9
|
+
|
|
10
|
+
- **reference.mp4**: the reconstruction as the player shows it, with its sound, without caption or logo ({fps} frames/s, {duration} s).
|
|
11
|
+
- **first-frame.png**: its first frame, for generators that start from an image.
|
|
12
|
+
- **depth.mp4**: how far each pixel is, white near, black far and for the sky, on a logarithmic scale from {near} m to {far} m, the same for the whole video.
|
|
13
|
+
- **phenomenon-mask.mp4**: in white, where the phenomenon the witness described stands, grown by {margin} pixels: what the generated phenomenon must not leave.
|
|
14
|
+
- **sky-mask.mp4**: in white, the sky.
|
|
15
|
+
- **prompt.txt**: the prompt and the negative prompt, written from the recording's own statements only.
|
|
16
|
+
- **manifest.json**: the provenance and the same information, for a program.
|
|
17
|
+
|
|
18
|
+
## How to use it
|
|
19
|
+
|
|
20
|
+
1. In the generator, choose a mode that starts from a video ("video to video", "restyle", "modify video"…) and give it reference.mp4. If the video is too long for it, cut it around the moment you want.
|
|
21
|
+
2. Paste the contents of prompt.txt. Set the transformation to the lowest that makes the picture realistic: the geometry, the horizon, the framing and the motion must stay those of the reference.
|
|
22
|
+
3. If the generator takes a depth control video, give it depth.mp4.
|
|
23
|
+
4. The generator renders the phenomenon too, so that it has the same grain, blur and light as the rest. Then check the result by laying phenomenon-mask.mp4 over the generated video: if the phenomenon leaves it, changes shape, size, colour or motion, or gains details (portholes, lights, reflections), reject the video and start again with a weaker transformation.
|
|
24
|
+
5. Burn into the whole picture, not into a corner: "{label}".
|
|
25
|
+
6. Cite the source above wherever the video is published.
|
|
26
|
+
|
|
27
|
+
## Do not
|
|
28
|
+
|
|
29
|
+
- Show the generated video to a witness before interviewing them: a realistic picture can change what they remember.
|
|
30
|
+
- Give the generator the witness's account as its prompt: it would draw every word of it, what the witness did not say included.
|
|
31
|
+
- Paste the phenomenon of reference.mp4 back over the generated video: less realistic than the rest, it would look stuck on and draw the eye more than anything else.
|
|
32
|
+
- Present the result as evidence: it shows a reconstruction, not what was seen.
|
|
33
|
+
`};export{e as generativeKitMessages_en};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const e={readmeFile:"LEEME.md",label:"Reconstrucción generada, no una imagen real",readme:`# Kit para IA generativa: {title}
|
|
2
|
+
|
|
3
|
+
Este kit sirve para producir, con un generador de vídeo (Runway, Kling, Luma, Veo…), una versión realista de la reconstrucción UFO@home de esta observación, sin dejar que el generador invente el testimonio.
|
|
4
|
+
|
|
5
|
+
Fuente: {source}
|
|
6
|
+
Hecho con UFO@home (https://ufoathome.org) el {date}.
|
|
7
|
+
|
|
8
|
+
## Contenido
|
|
9
|
+
|
|
10
|
+
- **reference.mp4**: la reconstrucción tal como la muestra el reproductor, con su sonido, sin leyenda ni logotipo ({fps} imágenes/s, {duration} s).
|
|
11
|
+
- **first-frame.png**: su primera imagen, para los generadores que parten de una imagen.
|
|
12
|
+
- **depth.mp4**: la distancia de cada píxel, blanco cerca, negro lejos y para el cielo, en una escala logarítmica de {near} m a {far} m, la misma para todo el vídeo.
|
|
13
|
+
- **phenomenon-mask.mp4**: en blanco, el lugar del fenómeno descrito por el testigo, ampliado {margin} píxeles: de donde el fenómeno generado no debe salir.
|
|
14
|
+
- **sky-mask.mp4**: en blanco, el cielo.
|
|
15
|
+
- **prompt.txt**: el prompt y el prompt negativo, en inglés, escritos solo a partir de lo que afirma el registro.
|
|
16
|
+
- **manifest.json**: la procedencia y la misma información, para un programa.
|
|
17
|
+
|
|
18
|
+
## Modo de empleo
|
|
19
|
+
|
|
20
|
+
1. En el generador, elegir un modo que parta de un vídeo («video to video», «restyle», «modify video»…) y darle reference.mp4. Si el vídeo es demasiado largo para él, cortarlo en torno al momento deseado.
|
|
21
|
+
2. Pegar el contenido de prompt.txt. Ajustar la transformación al mínimo que haga la imagen realista: la geometría, el horizonte, el encuadre y el movimiento deben seguir siendo los de la referencia.
|
|
22
|
+
3. Si el generador acepta un vídeo de control de profundidad («depth»), darle depth.mp4.
|
|
23
|
+
4. El generador también reproduce el fenómeno, para que tenga el mismo grano, el mismo desenfoque y la misma luz que el resto. Después, controlar el resultado superponiendo phenomenon-mask.mp4 al vídeo generado: si el fenómeno se sale, cambia de forma, tamaño, color o movimiento, o gana detalles (ojos de buey, luces, reflejos), descartar el vídeo y volver a empezar con una transformación más débil.
|
|
24
|
+
5. Incrustar en toda la imagen, y no en una esquina: «{label}».
|
|
25
|
+
6. Citar la fuente anterior allí donde se publique el vídeo.
|
|
26
|
+
|
|
27
|
+
## No hacer
|
|
28
|
+
|
|
29
|
+
- Mostrar el vídeo generado a un testigo antes de haberlo entrevistado: una imagen realista puede modificar su recuerdo.
|
|
30
|
+
- Dar al generador el texto del testimonio como prompt: dibujaría cada palabra, incluido lo que el testigo no dijo.
|
|
31
|
+
- Volver a pegar el fenómeno de reference.mp4 sobre el vídeo generado: menos realista que el resto, parecería añadido y atraería la mirada más que todo lo demás.
|
|
32
|
+
- Presentar el resultado como una prueba: muestra una reconstrucción, no lo que se vio.
|
|
33
|
+
`};export{e as generativeKitMessages_es};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const e={readmeFile:"LISEZ-MOI.md",label:"Reconstitution générée, pas une image réelle",readme:`# Kit pour IA générative : {title}
|
|
2
|
+
|
|
3
|
+
Ce kit sert à produire, avec un générateur vidéo (Runway, Kling, Luma, Veo…), une version réaliste de la reconstitution UFO@home de cette observation, sans laisser le générateur inventer le témoignage.
|
|
4
|
+
|
|
5
|
+
Source : {source}
|
|
6
|
+
Fait avec UFO@home (https://ufoathome.org) le {date}.
|
|
7
|
+
|
|
8
|
+
## Contenu
|
|
9
|
+
|
|
10
|
+
- **reference.mp4** : la reconstitution telle que le lecteur la montre, avec son son, sans légende ni logo ({fps} images/s, {duration} s).
|
|
11
|
+
- **first-frame.png** : sa première image, pour les générateurs qui partent d'une image.
|
|
12
|
+
- **depth.mp4** : la distance de chaque pixel, blanc près, noir loin et pour le ciel, sur une échelle logarithmique de {near} m à {far} m, la même pour toute la vidéo.
|
|
13
|
+
- **phenomenon-mask.mp4** : en blanc, la place du phénomène décrit par le témoin, élargie de {margin} pixels : ce dont le phénomène généré ne doit pas sortir.
|
|
14
|
+
- **sky-mask.mp4** : en blanc, le ciel.
|
|
15
|
+
- **prompt.txt** : le prompt et le prompt négatif, en anglais, écrits à partir des seuls énoncés de l'enregistrement.
|
|
16
|
+
- **manifest.json** : la provenance et ces mêmes informations, pour un programme.
|
|
17
|
+
|
|
18
|
+
## Mode d'emploi
|
|
19
|
+
|
|
20
|
+
1. Dans le générateur, choisir un mode qui part d'une vidéo (« video to video », « restyle », « modify video »…) et y déposer reference.mp4. Si la vidéo est trop longue pour lui, la couper autour du moment voulu.
|
|
21
|
+
2. Coller le contenu de prompt.txt. Régler la transformation au plus bas qui rende l'image réaliste : la géométrie, l'horizon, le cadrage et le mouvement doivent rester ceux de la référence.
|
|
22
|
+
3. Si le générateur accepte une vidéo de contrôle de profondeur (« depth »), lui donner depth.mp4.
|
|
23
|
+
4. Le générateur rend aussi le phénomène, pour qu'il ait le même grain, le même flou et la même lumière que le reste. Contrôler ensuite le résultat en superposant phenomenon-mask.mp4 à la vidéo générée : si le phénomène en sort, change de forme, de taille, de couleur ou de mouvement, ou gagne des détails (hublots, lumières, reflets), rejeter la vidéo et recommencer avec une transformation plus faible.
|
|
24
|
+
5. Incruster sur toute l'image, et pas dans un coin : « {label} ».
|
|
25
|
+
6. Citer la source ci-dessus partout où la vidéo est publiée.
|
|
26
|
+
|
|
27
|
+
## À ne pas faire
|
|
28
|
+
|
|
29
|
+
- Montrer la vidéo générée à un témoin avant de l'avoir interrogé : une image réaliste peut modifier son souvenir.
|
|
30
|
+
- Donner au générateur le texte du témoignage comme prompt : il en dessinerait chaque mot, y compris ce que le témoin n'a pas dit.
|
|
31
|
+
- Recoller le phénomène de reference.mp4 sur la vidéo générée : moins réaliste que le reste, il aurait l'air rapporté et attirerait l'œil plus que tout le reste.
|
|
32
|
+
- Présenter le résultat comme une preuve : il montre une reconstitution, pas ce qui a été vu.
|
|
33
|
+
`};export{e as generativeKitMessages_fr};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const e={readmeFile:"LEGGIMI.md",label:"Ricostruzione generata, non un'immagine reale",readme:`# Kit per IA generativa: {title}
|
|
2
|
+
|
|
3
|
+
Questo kit serve a produrre, con un generatore video (Runway, Kling, Luma, Veo…), una versione realistica della ricostruzione UFO@home di questa osservazione, senza lasciare che il generatore inventi la testimonianza.
|
|
4
|
+
|
|
5
|
+
Fonte: {source}
|
|
6
|
+
Fatto con UFO@home (https://ufoathome.org) il {date}.
|
|
7
|
+
|
|
8
|
+
## Contenuto
|
|
9
|
+
|
|
10
|
+
- **reference.mp4**: la ricostruzione come la mostra il lettore, con il suo sonoro, senza didascalia né logo ({fps} immagini/s, {duration} s).
|
|
11
|
+
- **first-frame.png**: la sua prima immagine, per i generatori che partono da un'immagine.
|
|
12
|
+
- **depth.mp4**: la distanza di ogni pixel, bianco vicino, nero lontano e per il cielo, su una scala logaritmica da {near} m a {far} m, la stessa per tutto il video.
|
|
13
|
+
- **phenomenon-mask.mp4**: in bianco, il posto del fenomeno descritto dal testimone, allargato di {margin} pixel: ciò da cui il fenomeno generato non deve uscire.
|
|
14
|
+
- **sky-mask.mp4**: in bianco, il cielo.
|
|
15
|
+
- **prompt.txt**: il prompt e il prompt negativo, in inglese, scritti solo a partire da ciò che afferma la registrazione.
|
|
16
|
+
- **manifest.json**: la provenienza e le stesse informazioni, per un programma.
|
|
17
|
+
|
|
18
|
+
## Istruzioni
|
|
19
|
+
|
|
20
|
+
1. Nel generatore, scegliere una modalità che parta da un video («video to video», «restyle», «modify video»…) e dargli reference.mp4. Se il video è troppo lungo per esso, tagliarlo attorno al momento voluto.
|
|
21
|
+
2. Incollare il contenuto di prompt.txt. Regolare la trasformazione al minimo che renda l'immagine realistica: la geometria, l'orizzonte, l'inquadratura e il movimento devono restare quelli del riferimento.
|
|
22
|
+
3. Se il generatore accetta un video di controllo della profondità («depth»), dargli depth.mp4.
|
|
23
|
+
4. Il generatore rende anche il fenomeno, perché abbia la stessa grana, la stessa sfocatura e la stessa luce del resto. Poi controllare il risultato sovrapponendo phenomenon-mask.mp4 al video generato: se il fenomeno ne esce, cambia forma, dimensione, colore o movimento, o acquista dettagli (oblò, luci, riflessi), scartare il video e ricominciare con una trasformazione più debole.
|
|
24
|
+
5. Sovrimprimere su tutta l'immagine, e non in un angolo: «{label}».
|
|
25
|
+
6. Citare la fonte qui sopra ovunque il video sia pubblicato.
|
|
26
|
+
|
|
27
|
+
## Da non fare
|
|
28
|
+
|
|
29
|
+
- Mostrare il video generato a un testimone prima di averlo intervistato: un'immagine realistica può modificarne il ricordo.
|
|
30
|
+
- Dare al generatore il testo della testimonianza come prompt: ne disegnerebbe ogni parola, compreso ciò che il testimone non ha detto.
|
|
31
|
+
- Reincollare il fenomeno di reference.mp4 sul video generato: meno realistico del resto, sembrerebbe aggiunto e attirerebbe lo sguardo più di tutto il resto.
|
|
32
|
+
- Presentare il risultato come una prova: mostra una ricostruzione, non ciò che è stato visto.
|
|
33
|
+
`};export{e as generativeKitMessages_it};
|
package/dist-embed-sighting-editor/{GeoExportTexts-DAllttgw.js → GeoExportTexts-DBGGdRnP.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{k as _,_ as e}from"./rr0-sighting-editor.mjs";const r=_.catalog({en:()=>e(()=>import("./GeoExportTexts_en-Dq0fSJQp.js"),[],import.meta.url).then(t=>t.geoExportTexts_en),fr:()=>e(()=>import("./GeoExportTexts_fr-DVAMpZIR.js"),[],import.meta.url).then(t=>t.geoExportTexts_fr),es:()=>e(()=>import("./GeoExportTexts_es-CoVHdOo0.js"),[],import.meta.url).then(t=>t.geoExportTexts_es),it:()=>e(()=>import("./GeoExportTexts_it-Bh1uJBQp.js"),[],import.meta.url).then(t=>t.geoExportTexts_it)});export{r as GEO_EXPORT_TEXTS};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{G as n}from"./GeographicFigures-
|
|
1
|
+
import{G as n}from"./GeographicFigures-DqhWddS9.js";import"./rr0-sighting-editor.mjs";class r{static of(o,e,t,i){const c=n.of(o,t,i),a={type:"FeatureCollection",name:n.fill(t.document,{name:e}),description:`${t.documentNote} ${t.heightNote}`,features:c.map(s=>r.feature(s))};return`${JSON.stringify(a,void 0,2)}
|
|
2
2
|
`}static feature(o){return{type:"Feature",properties:{name:o.name,...o.note?{description:o.note}:{},group:o.group,folder:o.groupName,heights:o.heights,...o.color?{stroke:o.color,...o.kind==="polygon"?{fill:o.color}:{},...o.kind==="point"?{"marker-color":o.color}:{}}:{}},geometry:r.geometry(o)}}static geometry(o){const e=o.points.map(t=>r.position(t.lng,t.lat,t.altM));switch(o.kind){case"point":return{type:"Point",coordinates:e[0]};case"line":return{type:"LineString",coordinates:e};case"polygon":return{type:"Polygon",coordinates:[[...e,e[0]]]}}}static position(o,e,t){return[Number(n.round(o,7)),Number(n.round(e,7)),Number(n.round(t,2))]}}export{r as GeoJsonExport};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{K as L,B as v,L as k}from"./rr0-sighting-editor.mjs";const b=Math.PI/180;class l{static SIGHT_LINE_M=5e3;static FLAT={heightAt:()=>0};static of(n,t,e){return[...l.observer(n,t),...l.sightLines(n,t,e),...l.bodies(n,t,e),...l.traces(n,t,e)]}static observer(n,t){const e=[];for(const r of n.observerTrack.allKeyframes){const s=L(n,r.t);if(s?.lat===void 0||s.lng===void 0)continue;const d=s.elevationM??0;e.push({t:r.t,at:{lat:s.lat,lng:s.lng,altM:d+v.EYE_HEIGHT_M},...s.headingDeg===void 0?{}:{headingDeg:s.headingDeg},elevationM:d})}if(e.length===0)return[];const o=e[0],a=[{group:"observer",groupName:t.folderObserver,name:l.fill(t.observerPoint,{s:l.seconds(o.t)}),note:l.fill(t.observerNote,{elevation:l.round(o.elevationM,1),heading:o.headingDeg===void 0?"—":l.round(o.headingDeg,0)}),kind:"point",points:[o.at],heights:"observer-ground"}];return e.some(r=>r.at.lat!==o.at.lat||r.at.lng!==o.at.lng)&&a.push({group:"observer",groupName:t.folderObserver,name:t.observerPath,kind:"line",points:e.map(r=>r.at),heights:"observer-ground"}),a}static sightLines(n,t,e){const o=[];for(const a of n.timeline.allKeyframes){const i=L(n,a.t);if(i?.lat===void 0||i.lng===void 0)continue;const r={lat:i.lat,lng:i.lng,altM:(i.elevationM??0)+v.EYE_HEIGHT_M};for(const s of a.shapes){const d=s.shape.aim;d&&o.push({group:"sight-line",groupName:t.folderSightLines,name:l.fill(t.sightLine,{what:l.nameOf(e.read(s.shape.title),s.sourceId,t),s:l.seconds(a.t)}),note:l.fill(t.sightLineNote,{azimuth:l.round(d.azimuthDeg,1),altitude:l.round(d.altitudeDeg,1),km:l.round(l.SIGHT_LINE_M/1e3,0)}),kind:"line",points:[r,l.along(r,d.azimuthDeg,d.altitudeDeg)],heights:"observer-ground"})}}return o}static along(n,t,e){const o=l.SIGHT_LINE_M*Math.cos(e*b),a=k.toGeo({eastM:Math.sin(t*b)*o,northM:Math.cos(t*b)*o},n);return{lat:a.lat,lng:a.lng,altM:n.altM+l.SIGHT_LINE_M*Math.sin(e*b)}}static bodies(n,t,e){const o=n.interpretation?.bodies??[],a=L(n,0);if(o.length===0||a?.lat===void 0||a.lng===void 0)return[];const i={lat:a.lat,lng:a.lng},r=[];for(const s of o){const d=new v(s,l.FLAT,h=>v.eyeOf(n,h,l.FLAT)),f=[];for(const h of[...s.track].sort((c,m)=>c.t-m.t)){const c=d.at(h.t);if(!c)continue;const m=k.toGeo({eastM:c.eastM,northM:c.northM},i),u={lat:m.lat,lng:m.lng,altM:c.upM},M=f[f.length-1];M&&M.lat===u.lat&&M.lng===u.lng&&M.altM===u.altM||f.push(u)}if(f.length===0)continue;const y=l.nameOf(e.read(s.title),s.id,t);r.push({group:"body",groupName:t.folderBodies,name:l.fill(f.length===1?t.bodyPoint:t.bodyPath,{what:y}),note:t.bodyNote,kind:f.length===1?"point":"line",points:f,heights:"observer-ground"})}return r}static traces(n,t,e){return n.traces.map(o=>({group:"trace",groupName:t.folderTraces,name:e.read(o.title)??o.id,...e.read(o.source)?{note:e.read(o.source)}:{},kind:o.kind,points:o.points.map(a=>({lat:a.lat,lng:a.lng,altM:a.altM??0})),heights:o.altitude??"ground",...o.color?{color:o.color}:{}}))}static nameOf(n,t,e){return n&&n.trim()?n.trim():l.fill(e.unnamed,{id:t})}static seconds(n){return l.round(n/1e3,1)}static round(n,t){const e=10**t;return String(Math.round(n*e)/e)}static fill(n,t){return Object.entries(t).reduce((e,[o,a])=>e.replaceAll(`{${o}}`,a),n)}}export{l as G};
|
package/dist-embed-sighting-editor/{HeadlightSystem-CLhqQjbe.js → HeadlightSystem-C-8Gl3vu.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bj as A,an as g,V as P,bk as m,az as C,aA as E,b7 as L,aQ as x,aC as R,aD as D}from"./rr0-sighting-editor.mjs";class i{constructor(e){this.scene=e}static REAL_BEAMS=4;static LAMPS=2;static DISTANCE_M=500;static AIR_LENGTH_M=90;static CLEAR_AIR_SCATTER_PER_M=2e-4;static SHADOW_MAP_PX=1024;beams=new Map;static airGeometry;has(e){return this.beams.has(e)}get size(){return this.beams.size}lamps(e){return this.beams.get(e)?.lamps??[]}airMeshes(e){return this.beams.get(e)?.air??[]}add(e){if(this.beams.has(e))return!0;if(this.beams.size>=i.REAL_BEAMS)return!1;const t=[],r=[];for(let n=0;n<i.LAMPS;n++){const a=new A(16777215,0,i.DISTANCE_M,Math.PI/8,.5,2);a.castShadow=e==="observer",a.shadow.mapSize.set(i.SHADOW_MAP_PX,i.SHADOW_MAP_PX),a.shadow.camera.near=.4,a.shadow.camera.far=110,a.shadow.bias=-4e-4,a.shadow.normalBias=.04,a.shadow.radius=2,this.scene.add(a),this.scene.add(a.target),t.push(a);const o=new g(i.airCone(),i.airMaterial());o.visible=!1,o.frustumCulled=!1,o.renderOrder=8,o.castShadow=!1,o.receiveShadow=!1,o.name="headlight air",this.scene.add(o),r.push(o)}return this.beams.set(e,{lamps:t,air:r}),!0}remove(e){const t=this.beams.get(e);if(t){for(const r of t.lamps)r.removeFromParent(),r.target.removeFromParent(),r.dispose();for(const r of t.air)r.removeFromParent(),r.material.dispose();this.beams.delete(e)}}clear(e){for(const t of[...this.beams.keys()])e&&t==="observer"||this.remove(t)}dispose(){this.clear(!1),i.airGeometry?.dispose(),i.airGeometry=void 0}aim(e,t,r,n,a,o,u){const c=this.beams.get(e),w=Math.max(u,i.CLEAR_AIR_SCATTER_PER_M);if(!c)return;const l=m.BEAMS[t],v=new P(-n.z,0,n.x),b=e==="observer"&&l!==void 0;c.lamps.forEach((s,d)=>{if(!l){s.intensity=0,c.air[d].visible=!1,s.shadow.autoUpdate=!1;return}const f=d===0?-1:1,h=l.pitchDeg*Math.PI/180,p=l.candela*m.DISPLAY_GAIN*o/c.lamps.length;s.color.set(l.color),s.intensity=p,s.angle=l.halfAngleDeg*Math.PI/180,s.penumbra=l.penumbra,b?(s.shadow.autoUpdate||(s.shadow.needsUpdate=!0),s.shadow.autoUpdate=!0):s.shadow.autoUpdate=!1,s.position.copy(r).addScaledVector(v,f*a);const M=n.clone().addScaledVector(v,-f*Math.tan(m.TOE_IN_DEG*Math.PI/180)).normalize();s.target.position.set(s.position.x+M.x*Math.cos(h)*50,s.position.y-Math.sin(h)*50,s.position.z+M.z*Math.cos(h)*50),s.target.updateMatrixWorld(),this.aimAir(c.air[d],s,l.color,p,w)})}aimAir(e,t,r,n,a){if(e.visible=a*n>1e-4,!e.visible)return;const o=i.AIR_LENGTH_M,u=o*Math.tan(t.angle);e.position.copy(t.position),e.scale.set(u,u,o),e.lookAt(t.target.position),e.updateMatrixWorld();const c=e.material.uniforms;c.uColor.value.set(r),c.uCandela.value=n,c.uScatter.value=a,c.uLength.value=o,c.uRadius.value=u}static airCone(){if(i.airGeometry)return i.airGeometry;const e=24,t=new Float32Array((e+1)*3);for(let a=0;a<e;a++){const o=a/e*Math.PI*2;t.set([Math.cos(o),Math.sin(o),1],(a+1)*3)}const r=[];for(let a=0;a<e;a++)r.push(0,1+a,1+(a+1)%e);const n=new C;return n.setAttribute("position",new E(t,3)),n.setIndex(r),i.airGeometry=n,n}static airMaterial(){return new L({transparent:!0,depthWrite:!1,depthTest:!0,blending:D,side:R,uniforms:{uColor:{value:new x(1,1,1)},uCandela:{value:0},uScatter:{value:0},uLength:{value:90},uRadius:{value:20}},vertexShader:`
|
|
2
2
|
varying vec3 vLocal;
|
|
3
3
|
varying vec3 vNormalView;
|
|
4
4
|
varying vec3 vViewDir;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{aV as n,aW as c}from"./rr0-sighting-editor.mjs";import{N as p}from"./NearestApproach-BH3Yw8Qz.js";const l=-6,u=150;class o{about="temporal";async assess(e){const t=o.daylight(e),i=e.decor.map((s,r)=>({object:s,index:r})).filter(({object:s})=>s.kind==="entity"),a=p.of(e),d=a!==void 0&&a.m<=u;return{verdict:i.length>0?"ce3":d?"ce1":t===void 0?void 0:t?"dd":"nl",criteria:[{id:"entities",basis:i.length>0?"stated":void 0,paths:i.map(({index:s})=>`decor.${s}`)},{id:"traces",paths:[],unsupported:!0},{id:"proximity",basis:a?.basis,paths:a?.paths??[]},{id:"radar",paths:[],unsupported:!0},{id:"daylight",basis:t===void 0?void 0:"derived",paths:t===void 0?[]:["time","place"]}]}}static daylight(e){const t=e.event.place?.[0],i=e.event.time;if(!t||!i)return;const a=n(i,t.lng,e.event.utcOffsetHours);if(a)return c("Sun",a,{lat:t.lat,lng:t.lng,elevationM:0}).altitudeDeg>l}}export{o as HynekAssessor};
|