@rr0/ufoathome 0.124.0 → 0.125.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/dist-embed-interview/rr0-interview.mjs +8 -7
  2. package/dist-embed-scene/{AdsbLolArchiveProvider-Ju7E64iO.js → AdsbLolArchiveProvider-CL1XUape.js} +1 -1
  3. package/dist-embed-scene/{ContrailSystem-BlsY0hsn.js → ContrailSystem-CG5BhBF7.js} +1 -1
  4. package/dist-embed-scene/GLTFLoader-CowOlg4J.js +1 -0
  5. package/dist-embed-scene/{HeadlightSystem-k2VkX7hN.js → HeadlightSystem-OwCRe0Vs.js} +1 -1
  6. package/dist-embed-scene/RailwaySystem-usuVIAY1.js +41 -0
  7. package/dist-embed-scene/{RoadMarkings-Bd5i68iF.js → RoadMarkings-DbE4nCJ2.js} +1 -1
  8. package/dist-embed-scene/SceneNames_es-B9tudMDH.js +1 -0
  9. package/dist-embed-scene/SceneNames_fr-DAd-g0yB.js +1 -0
  10. package/dist-embed-scene/SceneNames_it-BLLX--oG.js +1 -0
  11. package/dist-embed-scene/{TraceSystem-D2DpL5Qj.js → TraceSystem-B9WBM9ut.js} +1 -1
  12. package/dist-embed-scene/WaterSystem-yC8sKIc5.js +1 -0
  13. package/dist-embed-scene/rr0-scene.mjs +374 -334
  14. package/dist-embed-scene/sightingSchema-v2l1p6Ld.js +1 -0
  15. package/dist-embed-sighting/{AdsbLolArchiveProvider-BUE3bdCg.js → AdsbLolArchiveProvider-DvCD0VGc.js} +1 -1
  16. package/dist-embed-sighting/ContrailSystem-XVzDvxFV.js +1 -0
  17. package/dist-embed-sighting/GLTFLoader-DjN5_ISf.js +1 -0
  18. package/dist-embed-sighting/{HeadlightSystem-DmXqrF-e.js → HeadlightSystem-BAkFE-MU.js} +1 -1
  19. package/dist-embed-sighting/RailwaySystem-BMOTAo7T.js +41 -0
  20. package/dist-embed-sighting/{RoadMarkings-C_046g21.js → RoadMarkings-DtoEUDmh.js} +1 -1
  21. package/dist-embed-sighting/SceneNames_es-VHJ-mGWu.js +1 -0
  22. package/dist-embed-sighting/SceneNames_fr-BtjbcaRx.js +1 -0
  23. package/dist-embed-sighting/SceneNames_it-Ck8f90Z6.js +1 -0
  24. package/dist-embed-sighting/{SightingMessages_es-C88y-33t.js → SightingMessages_es-OXYzPf-m.js} +1 -1
  25. package/dist-embed-sighting/{SightingMessages_fr-DC2iwVp3.js → SightingMessages_fr-ylqIoox7.js} +1 -1
  26. package/dist-embed-sighting/{SightingMessages_it-B5t71z1M.js → SightingMessages_it-B9f92W5s.js} +1 -1
  27. package/dist-embed-sighting/{TraceSystem-DxQWm8ZH.js → TraceSystem-DpokUmzt.js} +2 -2
  28. package/dist-embed-sighting/WaterSystem-BLt9Dsxc.js +1 -0
  29. package/dist-embed-sighting/rr0-sighting.mjs +379 -339
  30. package/dist-embed-sighting/sightingSchema-v2l1p6Ld.js +1 -0
  31. package/dist-embed-sighting-editor/{AdsbLolArchiveProvider-CFgVABcu.js → AdsbLolArchiveProvider-BtbGVTLo.js} +1 -1
  32. package/dist-embed-sighting-editor/{BodyEditor-Dg97ZrRa.js → BodyEditor-DinH26FA.js} +1 -1
  33. package/dist-embed-sighting-editor/ContrailSystem-Bh3PmOP9.js +1 -0
  34. package/dist-embed-sighting-editor/{CoverageAssessor-8zrC-ZY0.js → CoverageAssessor-DCGCl8ic.js} +1 -1
  35. package/dist-embed-sighting-editor/{GLTFLoader-RPFGUAaO.js → GLTFLoader-Bpggnw6G.js} +1 -1
  36. package/dist-embed-sighting-editor/{HeadlightSystem-DbRok2GO.js → HeadlightSystem-DOjC-oxf.js} +1 -1
  37. package/dist-embed-sighting-editor/HynekAssessor-DTuaJ9gE.js +1 -0
  38. package/dist-embed-sighting-editor/{InterviewEditorElement-DRjEJwEk.js → InterviewEditorElement-BRL8pvdi.js} +8 -7
  39. package/dist-embed-sighting-editor/{LaunchEditor-byu9U1W7.js → LaunchEditor-CFmH6y0N.js} +1 -1
  40. package/dist-embed-sighting-editor/ModelSource-SZRN-dar.js +1 -0
  41. package/dist-embed-sighting-editor/{ModelThumbnails-hmPAkRbd.js → ModelThumbnails-6N7NAP44.js} +1 -1
  42. package/dist-embed-sighting-editor/{ModelViewer-Mvug9CHB.js → ModelViewer-C_mVYZ1c.js} +1 -1
  43. package/dist-embed-sighting-editor/RailwaySystem-BTm6OfuJ.js +41 -0
  44. package/dist-embed-sighting-editor/{RoadMarkings-BKfyWjdC.js → RoadMarkings-AaLPDthv.js} +1 -1
  45. package/dist-embed-sighting-editor/SceneNames_es-4pppn42v.js +1 -0
  46. package/dist-embed-sighting-editor/SceneNames_fr-odZ6uYWU.js +1 -0
  47. package/dist-embed-sighting-editor/SceneNames_it-lXfB7y6i.js +1 -0
  48. package/dist-embed-sighting-editor/{SightingEditorMessages_es-DvIK6dPp.js → SightingEditorMessages_es-1QZ2n8km.js} +2 -2
  49. package/dist-embed-sighting-editor/{SightingEditorMessages_fr-Ds1GsY_1.js → SightingEditorMessages_fr-DAg8lRfr.js} +2 -2
  50. package/dist-embed-sighting-editor/{SightingEditorMessages_it-Y2D8aYCY.js → SightingEditorMessages_it-C2TQ7muu.js} +2 -2
  51. package/dist-embed-sighting-editor/{SightingFileEditor-C0NC8jbz.js → SightingFileEditor-7inIgp24.js} +1 -1
  52. package/dist-embed-sighting-editor/{TraceSystem-BMYhHoF0.js → TraceSystem-D8oL7SlQ.js} +2 -2
  53. package/dist-embed-sighting-editor/WaterSystem-1r0jEJ6E.js +1 -0
  54. package/dist-embed-sighting-editor/{caseSchema-BDFgjA8v.js → caseSchema-ByeWR3Rx.js} +1 -1
  55. package/dist-embed-sighting-editor/{interviewSchema-CMRZUnRy.js → interviewSchema-m_h5f8H0.js} +1 -1
  56. package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +403 -425
  57. package/dist-embed-sighting-editor/sightingSchema-v2l1p6Ld.js +1 -0
  58. package/dist-embed-sighting-editor/surroundingsSources-98rSCu2Y.js +1 -0
  59. package/dist-embed-sighting-editor/{trafficRuntime-BtljEizX.js → trafficRuntime-Dk4XdgcY.js} +1 -1
  60. package/package.json +3 -1
  61. package/dist-embed-scene/GLTFLoader-BHGcTcu1.js +0 -1
  62. package/dist-embed-scene/SceneNames_es-b8rqu51e.js +0 -1
  63. package/dist-embed-scene/SceneNames_fr-sF9gfZV2.js +0 -1
  64. package/dist-embed-scene/SceneNames_it-CoR2S3bM.js +0 -1
  65. package/dist-embed-scene/sightingSchema-kkSSrggd.js +0 -1
  66. package/dist-embed-sighting/ContrailSystem-DjBzEFUl.js +0 -1
  67. package/dist-embed-sighting/GLTFLoader-DvLBfH-C.js +0 -1
  68. package/dist-embed-sighting/SceneNames_es-rKjN2baM.js +0 -1
  69. package/dist-embed-sighting/SceneNames_fr-CSUSeZT0.js +0 -1
  70. package/dist-embed-sighting/SceneNames_it-C-mVddAw.js +0 -1
  71. package/dist-embed-sighting/sightingSchema-kkSSrggd.js +0 -1
  72. package/dist-embed-sighting-editor/ContrailSystem-DSdLswxr.js +0 -1
  73. package/dist-embed-sighting-editor/HynekAssessor-9gYrshkH.js +0 -1
  74. package/dist-embed-sighting-editor/ModelSource-f1GhdDou.js +0 -1
  75. package/dist-embed-sighting-editor/SceneNames_es-cN-l95fv.js +0 -1
  76. package/dist-embed-sighting-editor/SceneNames_fr-ZUtpsigH.js +0 -1
  77. package/dist-embed-sighting-editor/SceneNames_it-DLqJc0Rc.js +0 -1
  78. package/dist-embed-sighting-editor/sightingSchema-kkSSrggd.js +0 -1
  79. package/dist-embed-sighting-editor/surroundingsSources-BtDVuj-U.js +0 -1
@@ -1 +1 @@
1
- const e={color:"Colore",transparency:"Trasparenza",halo:"Alone",blur:"Sfocatura",brightness:"Brillantezza",shapeTitle:"Nome",utcOffset:"Fuso orario",cloudBase:"Base delle nuvole",elevation:"Altitudine",heightAboveGround:"Altezza dal suolo",duration:"Durata",placeName:"Luogo",latitude:"Latitudine",longitude:"Longitudine",heading:"Orientamento",pitch:"Inclinazione",roll:"Rollio",sway:"Oscillazione a riposo",swayTitle:"Quanto il corpo che regge lo strumento muove la vista quando non cammina: 1 per una persona in piedi, 0 per un treppiede. Vuoto: 1 (0 se il resoconto dice che l'osservatore era paralizzato)",lightPollution:"Cielo notturno",lightPollutionTitle:"Lo zenit di una notte senza Luna in questo luogo, in magnitudini per secondo d'arco quadrato, come lo legge uno Sky Quality Meter o lo dà l'atlante mondiale della brillanza artificiale del cielo (Falchi et al. 2016, lightpollutionmap.info, «SQM»). 22 è un cielo naturale; una periferia è intorno a 19, un centro città a 17. Vuoto: un cielo naturale",observationTime:"Inizio dell'osservazione",observationEndTime:"Fine dell'osservazione",assessmentGroup:"Valutazione",assessmentNames:{coverage:"Dati dell'osservatore"},assessmentVerdicts:{"hynek.nl":"NL — luce notturna","hynek.dd":"DD — disco diurno","hynek.rv":"RV — radar-visivo","hynek.ce1":"IR1 — incontro ravvicinato","hynek.ce2":"IR2 — con traccia fisica","hynek.ce3":"IR3 — con entità"},timeQualifierApproximate:"Approssimativa",timeQualifierUncertain:"Incerta",timeQualifierBoth:"Incerta e approssimativa",timeSeasonSpring:"Primavera",timeSeasonSummer:"Estate",timeSeasonAutumn:"Autunno",timeSeasonWinter:"Inverno",summaryGroups:{observation:"Osservazione",location:"Posizione",temporal:"Tempo",weather:"Meteo",sound:"Suono"},summaryGroup:"Riepilogo",summaryDescription:"Descrizione",closeDescription:"Chiudi la descrizione",observerGroup:"Osservatore",observerId:"ID",observerTitle:"Titolo",observerLastName:"Cognome",observerFirstNames:"Nomi",sightingId:"ID",tags:"Etichette",cloudCover:"Copertura nuvolosa",highCloudCover:"Nubi di ghiaccio (cirri)",focalLength:"Lunghezza focale",fieldOfView:"Campo visivo",aperture:"Apertura",exposure:"Esposizione",focusDistance:"Messa a fuoco a",iceCrystalAlignment:"Allineamento dei cristalli",rareIceCrystals:"Cristalli rari",cloudDarkness:"Oscurità delle nuvole",precipitationType:"Precipitazioni",precipitationNone:"Nessuna",precipitationRain:"Pioggia",precipitationSnow:"Neve",precipitationHail:"Grandine",precipitationIntensity:"Intensità",windDirection:"Direzione del vento",windSpeed:"Velocità del vento",storm:"Temporale",cloudsGroup:"Nuvole",precipitationGroup:"Precipitazioni",windGroup:"Vento",soundKind:"Suono",soundNone:"Nessuno (silenzioso)",soundHum:"Ronzio",soundWhistle:"Fischio",soundRumble:"Rombo",soundCrackle:"Crepitio",soundVolume:"Volume",soundPitch:"Tono",soundSrc:"Registrazione",instrument:"Osservato con",filter:"Davanti",filterNone:"niente",filterSolarVisual:"un filtro solare per l'occhio (occhiali da eclissi, densità 5)",filterSolarPhoto:"una pellicola solare per fotocamera (densità 3,8)",decorAircraft:"Aeromobile",decorEntity:"Essere",decorAltitude:"Altitudine",decorLights:"Luci",decorLightsNone:"nessuna",decor:"Ambiente",decorBuilding:"Edificio",decorTree:"Albero",decorShrub:"Cespuglio",decorBridge:"Ponte",decorWire:"Linea aerea",decorCrop:"Filare di coltura",decorTerrace:"Terrazzamento",decorMound:"Mucchio di pietre",decorWall:"Muretto a secco",decorStreetlight:"Lampione",decorVehicle:"Veicolo",decorObserver:"Altro osservatore",decorEast:"Distanza a est",decorNorth:"Distanza a nord",decorHeading:"Orientamento",decorColor:"Colore",decorLit:"Acceso",decorTitle:"Nome",milestones:"Momenti",milestoneLabel:"Etichetta",milestoneNote:"Cosa succede",addMilestone:"Dai un nome a questo momento",deleteMilestone:"Elimina momento",goToMilestone:"Vai a questo momento",decorWidth:"Larghezza",decorLength:"Lunghezza",decorHeight:"Altezza",decorModel:"Modello 3D",decorModelAdvanced:"Modello da un indirizzo",decorModelUrl:"Indirizzo glTF/GLB",decorModelTitle:"Nome del modello",decorModelAuthor:"Autore",decorModelLicense:"Licenza",decorModelSource:"Provenienza",decorObserverSide:"Posizione dell'osservatore",decorObserverSideNone:"Non presente",decorSideFront:"Davanti",decorSideBehind:"Dietro",decorSideLeft:"Sinistra",decorSideRight:"Destra",decorSideFrontLeft:"Davanti a sinistra",decorSideFrontRight:"Davanti a destra",decorSideBehindLeft:"Dietro a sinistra",decorSideBehindRight:"Dietro a destra"},o={...e,accountBy:"Resoconto di",unnamedObserver:"Osservatore {n}",about:"Informazioni",close:"Chiudi",observation:"Osservazione",date:"Data",location:"Luogo",case:"Caso",description:"Descrizione",source:"Fonte",basis:{stated:"dichiarato",derived:"dedotto",assumed:"supposto"},credits:"Crediti",editThisObservation:"Modifica questa osservazione",embed:"Incorpora",embedReplay:"Lettore",embedEdit:"Editor",share:"Condividi",embedObservation:"Incorpora l'osservazione",back:"Indietro",embedCopy:"Copia",shareLink:"Link",shareScope:"Condividi",shareScopeCase:"Il caso intero",shareOpensOn:"Si apre su",shareStartAt:"Inizia a",shareOptionLabels:"Mostra i chip",shareOptionMap:"Apri la mappa",shareOptionMilestones:"Mostra i momenti",shareOptionCompare:"Confronta col resoconto",embedCopied:"Copiato",showLabels:"Mostra ciò che indica",interpretation:"Interpretazione",account:"Resoconto",interpretationBy:"{title}, di {by}",confrontation:"A confronto con il resoconto",confrontationDirection:"scarto di {deg}°",confrontationWidth:"larghezza ×{ratio}",confrontationHeight:"altezza ×{ratio}",showComparison:"Confronta con il resoconto",hideComparison:"Smetti di confrontare con il resoconto",hideLabels:"Nascondi ciò che indica"};export{o as sightingMessages_it};
1
+ const e={color:"Colore",transparency:"Trasparenza",halo:"Alone",blur:"Sfocatura",brightness:"Brillantezza",shapeTitle:"Nome",utcOffset:"Fuso orario",cloudBase:"Base delle nuvole",elevation:"Altitudine",heightAboveGround:"Altezza dal suolo",duration:"Durata",placeName:"Luogo",latitude:"Latitudine",longitude:"Longitudine",heading:"Orientamento",pitch:"Inclinazione",roll:"Rollio",sway:"Oscillazione a riposo",swayTitle:"Quanto il corpo che regge lo strumento muove la vista quando non cammina: 1 per una persona in piedi, 0 per un treppiede. Vuoto: 1 (0 se il resoconto dice che l'osservatore era paralizzato)",lightPollution:"Cielo notturno",lightPollutionTitle:"Lo zenit di una notte senza Luna in questo luogo, in magnitudini per secondo d'arco quadrato, come lo legge uno Sky Quality Meter o lo dà l'atlante mondiale della brillanza artificiale del cielo (Falchi et al. 2016, lightpollutionmap.info, «SQM»). 22 è un cielo naturale; una periferia è intorno a 19, un centro città a 17. Vuoto: un cielo naturale",observationTime:"Inizio dell'osservazione",observationEndTime:"Fine dell'osservazione",assessmentGroup:"Valutazione",assessmentNames:{coverage:"Dati dell'osservatore"},assessmentVerdicts:{"hynek.nl":"NL — luce notturna","hynek.dd":"DD — disco diurno","hynek.rv":"RV — radar-visivo","hynek.ce1":"IR1 — incontro ravvicinato","hynek.ce2":"IR2 — con traccia fisica","hynek.ce3":"IR3 — con entità"},timeQualifierApproximate:"Approssimativa",timeQualifierUncertain:"Incerta",timeQualifierBoth:"Incerta e approssimativa",timeSeasonSpring:"Primavera",timeSeasonSummer:"Estate",timeSeasonAutumn:"Autunno",timeSeasonWinter:"Inverno",summaryGroups:{observation:"Osservazione",location:"Posizione",temporal:"Tempo",weather:"Meteo",sound:"Suono"},summaryGroup:"Riepilogo",summaryDescription:"Descrizione",closeDescription:"Chiudi la descrizione",observerGroup:"Osservatore",observerId:"ID",observerTitle:"Titolo",observerLastName:"Cognome",observerFirstNames:"Nomi",sightingId:"ID",tags:"Etichette",cloudCover:"Copertura nuvolosa",highCloudCover:"Nubi di ghiaccio (cirri)",focalLength:"Lunghezza focale",fieldOfView:"Campo visivo",aperture:"Apertura",exposure:"Esposizione",focusDistance:"Messa a fuoco a",iceCrystalAlignment:"Allineamento dei cristalli",rareIceCrystals:"Cristalli rari",cloudDarkness:"Oscurità delle nuvole",precipitationType:"Precipitazioni",precipitationNone:"Nessuna",precipitationRain:"Pioggia",precipitationSnow:"Neve",precipitationHail:"Grandine",precipitationIntensity:"Intensità",windDirection:"Direzione del vento",windSpeed:"Velocità del vento",storm:"Temporale",cloudsGroup:"Nuvole",precipitationGroup:"Precipitazioni",windGroup:"Vento",soundKind:"Suono",soundNone:"Nessuno (silenzioso)",soundHum:"Ronzio",soundWhistle:"Fischio",soundRumble:"Rombo",soundCrackle:"Crepitio",soundVolume:"Volume",soundPitch:"Tono",soundSrc:"Registrazione",instrument:"Osservato con",filter:"Davanti",filterNone:"niente",filterSolarVisual:"un filtro solare per l'occhio (occhiali da eclissi, densità 5)",filterSolarPhoto:"una pellicola solare per fotocamera (densità 3,8)",decorAircraft:"Aeromobile",decorEntity:"Essere",decorAltitude:"Altitudine",decorLights:"Luci",decorLightsNone:"nessuna",decor:"Ambiente",decorBuilding:"Edificio",decorTree:"Albero",decorShrub:"Cespuglio",decorBridge:"Ponte",decorWire:"Linea aerea",decorCrop:"Filare di coltura",decorTerrace:"Terrazzamento",decorMound:"Mucchio di pietre",decorWall:"Muretto a secco",decorStreetlight:"Lampione",decorTrafficLight:"Semaforo",decorCrossing:"Attraversamento pedonale",decorRoadSign:"Segnale stradale",decorVehicle:"Veicolo",decorObserver:"Altro osservatore",decorEast:"Distanza a est",decorNorth:"Distanza a nord",decorHeading:"Orientamento",decorColor:"Colore",decorLit:"Acceso",decorTitle:"Nome",milestones:"Momenti",milestoneLabel:"Etichetta",milestoneNote:"Cosa succede",addMilestone:"Dai un nome a questo momento",deleteMilestone:"Elimina momento",goToMilestone:"Vai a questo momento",decorWidth:"Larghezza",decorLength:"Lunghezza",decorHeight:"Altezza",decorModel:"Modello 3D",decorModelAdvanced:"Modello da un indirizzo",decorModelUrl:"Indirizzo glTF/GLB",decorModelTitle:"Nome del modello",decorModelAuthor:"Autore",decorModelLicense:"Licenza",decorModelSource:"Provenienza",decorObserverSide:"Posizione dell'osservatore",decorObserverSideNone:"Non presente",decorSideFront:"Davanti",decorSideBehind:"Dietro",decorSideLeft:"Sinistra",decorSideRight:"Destra",decorSideFrontLeft:"Davanti a sinistra",decorSideFrontRight:"Davanti a destra",decorSideBehindLeft:"Dietro a sinistra",decorSideBehindRight:"Dietro a destra"},o={...e,accountBy:"Resoconto di",unnamedObserver:"Osservatore {n}",about:"Informazioni",close:"Chiudi",observation:"Osservazione",date:"Data",location:"Luogo",case:"Caso",description:"Descrizione",source:"Fonte",basis:{stated:"dichiarato",derived:"dedotto",assumed:"supposto"},credits:"Crediti",editThisObservation:"Modifica questa osservazione",embed:"Incorpora",embedReplay:"Lettore",embedEdit:"Editor",share:"Condividi",embedObservation:"Incorpora l'osservazione",back:"Indietro",embedCopy:"Copia",shareLink:"Link",shareScope:"Condividi",shareScopeCase:"Il caso intero",shareOpensOn:"Si apre su",shareStartAt:"Inizia a",shareOptionLabels:"Mostra i chip",shareOptionMap:"Apri la mappa",shareOptionMilestones:"Mostra i momenti",shareOptionCompare:"Confronta col resoconto",embedCopied:"Copiato",showLabels:"Mostra ciò che indica",interpretation:"Interpretazione",account:"Resoconto",interpretationBy:"{title}, di {by}",confrontation:"A confronto con il resoconto",confrontationDirection:"scarto di {deg}°",confrontationWidth:"larghezza ×{ratio}",confrontationHeight:"altezza ×{ratio}",showComparison:"Confronta con il resoconto",hideComparison:"Smetti di confrontare con il resoconto",hideLabels:"Nascondi ciò che indica"};export{o as sightingMessages_it};
@@ -1,4 +1,4 @@
1
- import{I as ee,F,b as G,d as M,W as te,B as j,e as $,f as E,g as ie,h as I,U as J,i as ne,j as O,M as se,k as B,m as oe,n as ae,o as re,G as le,C as ce,q as de,t as fe,P as ue,u as pe,v as he,w as me,x as V,y as ge}from"./rr0-sighting.mjs";const k=new j,P=new E;class Q extends ee{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";const e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],n=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],i=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(i),this.setAttribute("position",new F(e,3)),this.setAttribute("uv",new F(n,2))}applyMatrix4(e){const n=this.attributes.instanceStart,i=this.attributes.instanceEnd;return n!==void 0&&(n.applyMatrix4(e),i.applyMatrix4(e),n.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let n;e instanceof Float32Array?n=e:Array.isArray(e)&&(n=new Float32Array(e));const i=new G(n,6,1);return this.setAttribute("instanceStart",new M(i,3,0)),this.setAttribute("instanceEnd",new M(i,3,3)),this.instanceCount=this.attributes.instanceStart.count,this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let n;e instanceof Float32Array?n=e:Array.isArray(e)&&(n=new Float32Array(e));const i=new G(n,6,1);return this.setAttribute("instanceColorStart",new M(i,3,0)),this.setAttribute("instanceColorEnd",new M(i,3,3)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new te(e.geometry)),this}fromLineSegments(e){const n=e.geometry;return this.setPositions(n.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new j);const e=this.attributes.instanceStart,n=this.attributes.instanceEnd;e!==void 0&&n!==void 0&&(this.boundingBox.setFromBufferAttribute(e),k.setFromBufferAttribute(n),this.boundingBox.union(k))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new $),this.boundingBox===null&&this.computeBoundingBox();const e=this.attributes.instanceStart,n=this.attributes.instanceEnd;if(e!==void 0&&n!==void 0){const i=this.boundingSphere.center;this.boundingBox.getCenter(i);let t=0;for(let o=0,l=e.count;o<l;o++)P.fromBufferAttribute(e,o),t=Math.max(t,i.distanceToSquared(P)),P.fromBufferAttribute(n,o),t=Math.max(t,i.distanceToSquared(P));this.boundingSphere.radius=Math.sqrt(t),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}}O.line={worldUnits:{value:1},linewidth:{value:1},resolution:{value:new ne},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}};I.line={uniforms:J.merge([O.common,O.fog,O.line]),vertexShader:`
1
+ import{I as ee,F,j as G,k as M,W as te,m as j,n as Z,o as E,q as ie,t as I,U as $,d as ne,u as O,b as se,v as B,w as oe,x as ae,y as re,G as le,C as ce,z as de,B as fe,P as ue,E as pe,H as he,J as me,K as V,g as ge}from"./rr0-sighting.mjs";const k=new j,P=new E;class Q extends ee{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";const e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],n=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],i=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(i),this.setAttribute("position",new F(e,3)),this.setAttribute("uv",new F(n,2))}applyMatrix4(e){const n=this.attributes.instanceStart,i=this.attributes.instanceEnd;return n!==void 0&&(n.applyMatrix4(e),i.applyMatrix4(e),n.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let n;e instanceof Float32Array?n=e:Array.isArray(e)&&(n=new Float32Array(e));const i=new G(n,6,1);return this.setAttribute("instanceStart",new M(i,3,0)),this.setAttribute("instanceEnd",new M(i,3,3)),this.instanceCount=this.attributes.instanceStart.count,this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let n;e instanceof Float32Array?n=e:Array.isArray(e)&&(n=new Float32Array(e));const i=new G(n,6,1);return this.setAttribute("instanceColorStart",new M(i,3,0)),this.setAttribute("instanceColorEnd",new M(i,3,3)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new te(e.geometry)),this}fromLineSegments(e){const n=e.geometry;return this.setPositions(n.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new j);const e=this.attributes.instanceStart,n=this.attributes.instanceEnd;e!==void 0&&n!==void 0&&(this.boundingBox.setFromBufferAttribute(e),k.setFromBufferAttribute(n),this.boundingBox.union(k))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Z),this.boundingBox===null&&this.computeBoundingBox();const e=this.attributes.instanceStart,n=this.attributes.instanceEnd;if(e!==void 0&&n!==void 0){const i=this.boundingSphere.center;this.boundingBox.getCenter(i);let t=0;for(let o=0,l=e.count;o<l;o++)P.fromBufferAttribute(e,o),t=Math.max(t,i.distanceToSquared(P)),P.fromBufferAttribute(n,o),t=Math.max(t,i.distanceToSquared(P));this.boundingSphere.radius=Math.sqrt(t),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}}O.line={worldUnits:{value:1},linewidth:{value:1},resolution:{value:new ne},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}};I.line={uniforms:$.merge([O.common,O.fog,O.line]),vertexShader:`
2
2
  #include <common>
3
3
  #include <color_pars_vertex>
4
4
  #include <fog_pars_vertex>
@@ -390,4 +390,4 @@ import{I as ee,F,b as G,d as M,W as te,B as j,e as $,f as E,g as ie,h as I,U as
390
390
  #include <premultiplied_alpha_fragment>
391
391
 
392
392
  }
393
- `};class N extends ie{constructor(e){super({type:"LineMaterial",uniforms:J.clone(I.line.uniforms),vertexShader:I.line.vertexShader,fragmentShader:I.line.fragmentShader,clipping:!0}),this.isLineMaterial=!0,this.setValues(e)}get color(){return this.uniforms.diffuse.value}set color(e){this.uniforms.diffuse.value=e}get worldUnits(){return"WORLD_UNITS"in this.defines}set worldUnits(e){e===!0!==this.worldUnits&&(this.needsUpdate=!0),e===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}get linewidth(){return this.uniforms.linewidth.value}set linewidth(e){this.uniforms.linewidth&&(this.uniforms.linewidth.value=e)}get dashed(){return"USE_DASH"in this.defines}set dashed(e){e===!0!==this.dashed&&(this.needsUpdate=!0),e===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}get dashScale(){return this.uniforms.dashScale.value}set dashScale(e){this.uniforms.dashScale.value=e}get dashSize(){return this.uniforms.dashSize.value}set dashSize(e){this.uniforms.dashSize.value=e}get dashOffset(){return this.uniforms.dashOffset.value}set dashOffset(e){this.uniforms.dashOffset.value=e}get gapSize(){return this.uniforms.gapSize.value}set gapSize(e){this.uniforms.gapSize.value=e}get opacity(){return this.uniforms.opacity.value}set opacity(e){this.uniforms&&(this.uniforms.opacity.value=e)}get resolution(){return this.uniforms.resolution.value}set resolution(e){this.uniforms.resolution.value.copy(e)}get alphaToCoverage(){return"USE_ALPHA_TO_COVERAGE"in this.defines}set alphaToCoverage(e){this.defines&&(e===!0!==this.alphaToCoverage&&(this.needsUpdate=!0),e===!0?this.defines.USE_ALPHA_TO_COVERAGE="":delete this.defines.USE_ALPHA_TO_COVERAGE)}}const H=new B,q=new E,X=new E,f=new B,u=new B,x=new B,W=new E,R=new ae,p=new oe,K=new E,T=new j,C=new $,S=new B;let b,z;function Z(h,e,n){return S.set(0,0,-e,1).applyMatrix4(h.projectionMatrix),S.multiplyScalar(1/S.w),S.x=z/n.width,S.y=z/n.height,S.applyMatrix4(h.projectionMatrixInverse),S.multiplyScalar(1/S.w),Math.abs(Math.max(S.x,S.y))}function ve(h,e){const n=h.matrixWorld,i=h.geometry,t=i.attributes.instanceStart,o=i.attributes.instanceEnd,l=Math.min(i.instanceCount,t.count);for(let s=0,a=l;s<a;s++){p.start.fromBufferAttribute(t,s),p.end.fromBufferAttribute(o,s),p.applyMatrix4(n);const d=new E,m=new E;b.distanceSqToSegment(p.start,p.end,m,d),m.distanceTo(d)<z*.5&&e.push({point:m,pointOnLine:d,distance:b.origin.distanceTo(m),object:h,face:null,faceIndex:s,uv:null,uv1:null})}}function ye(h,e,n){const i=e.projectionMatrix,o=h.material.resolution,l=h.matrixWorld,s=h.geometry,a=s.attributes.instanceStart,d=s.attributes.instanceEnd,m=Math.min(s.instanceCount,a.count),c=-e.near;b.at(1,x),x.w=1,x.applyMatrix4(e.matrixWorldInverse),x.applyMatrix4(i),x.multiplyScalar(1/x.w),x.x*=o.x/2,x.y*=o.y/2,x.z=0,W.copy(x),R.multiplyMatrices(e.matrixWorldInverse,l);for(let g=0,r=m;g<r;g++){if(f.fromBufferAttribute(a,g),u.fromBufferAttribute(d,g),f.w=1,u.w=1,f.applyMatrix4(R),u.applyMatrix4(R),f.z>c&&u.z>c)continue;if(f.z>c){const _=f.z-u.z,w=(f.z-c)/_;f.lerp(u,w)}else if(u.z>c){const _=u.z-f.z,w=(u.z-c)/_;u.lerp(f,w)}f.applyMatrix4(i),u.applyMatrix4(i),f.multiplyScalar(1/f.w),u.multiplyScalar(1/u.w),f.x*=o.x/2,f.y*=o.y/2,u.x*=o.x/2,u.y*=o.y/2,p.start.copy(f),p.start.z=0,p.end.copy(u),p.end.z=0;const y=p.closestPointToPointParameter(W,!0);p.at(y,K);const U=re.lerp(f.z,u.z,y),L=U>=-1&&U<=1,D=W.distanceTo(K)<z*.5;if(L&&D){p.start.fromBufferAttribute(a,g),p.end.fromBufferAttribute(d,g),p.start.applyMatrix4(l),p.end.applyMatrix4(l);const _=new E,w=new E;b.distanceSqToSegment(p.start,p.end,w,_),n.push({point:w,pointOnLine:_,distance:b.origin.distanceTo(w),object:h,face:null,faceIndex:g,uv:null,uv1:null})}}}class we extends se{constructor(e=new Q,n=new N({color:Math.random()*16777215})){super(e,n),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){const e=this.geometry,n=e.attributes.instanceStart,i=e.attributes.instanceEnd,t=new Float32Array(2*n.count);for(let l=0,s=0,a=n.count;l<a;l++,s+=2)q.fromBufferAttribute(n,l),X.fromBufferAttribute(i,l),t[s]=s===0?0:t[s-1],t[s+1]=t[s]+q.distanceTo(X);const o=new G(t,2,1);return e.setAttribute("instanceDistanceStart",new M(o,1,0)),e.setAttribute("instanceDistanceEnd",new M(o,1,1)),this}raycast(e,n){const i=this.material.worldUnits,t=e.camera;if(t===null&&!i&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.'),i===!1&&(this.material.resolution.x===0||this.material.resolution.y===0))return;const o=e.params.Line2!==void 0&&e.params.Line2.threshold||0;b=e.ray;const l=this.matrixWorld,s=this.geometry,a=this.material;z=a.linewidth+o,s.boundingSphere===null&&s.computeBoundingSphere(),C.copy(s.boundingSphere).applyMatrix4(l);let d;if(i)d=z*.5;else{const c=Math.max(t.near,C.distanceToPoint(b.origin));d=Z(t,c,a.resolution)}if(C.radius+=d,b.intersectsSphere(C)===!1)return;s.boundingBox===null&&s.computeBoundingBox(),T.copy(s.boundingBox).applyMatrix4(l);let m;if(i)m=z*.5;else{const c=Math.max(t.near,T.distanceToPoint(b.origin));m=Z(t,c,a.resolution)}T.expandByScalar(m),b.intersectsBox(T)!==!1&&(i?ve(this,n):ye(this,t,n))}onBeforeRender(e){const n=this.material.uniforms;n&&n.resolution&&(e.getViewport(H),this.material.uniforms.resolution.value.set(H.z,H.w))}}class Y extends Q{constructor(){super(),this.isLineGeometry=!0,this.type="LineGeometry"}setPositions(e){const n=e.length-3,i=new Float32Array(2*n);for(let t=0;t<n;t+=3)i[2*t]=e[t],i[2*t+1]=e[t+1],i[2*t+2]=e[t+2],i[2*t+3]=e[t+3],i[2*t+4]=e[t+4],i[2*t+5]=e[t+5];return super.setPositions(i),this}setColors(e){const n=e.length-3,i=new Float32Array(2*n);for(let t=0;t<n;t+=3)i[2*t]=e[t],i[2*t+1]=e[t+1],i[2*t+2]=e[t+2],i[2*t+3]=e[t+3],i[2*t+4]=e[t+4],i[2*t+5]=e[t+5];return super.setColors(i),this}setFromPoints(e){const n=e.length-1,i=new Float32Array(6*n);for(let t=0;t<n;t++)i[6*t]=e[t].x,i[6*t+1]=e[t].y,i[6*t+2]=e[t].z||0,i[6*t+3]=e[t+1].x,i[6*t+4]=e[t+1].y,i[6*t+5]=e[t+1].z||0;return super.setPositions(i),this}fromLine(e){const n=e.geometry;return this.setPositions(n.attributes.position.array),this}}class xe extends we{constructor(e=new Y,n=new N({color:Math.random()*16777215})){super(e,n),this.isLine2=!0,this.type="Line2"}}class A{constructor(e){this.layer=e,this.group.name="traces"}static LINE_WIDTH_PX=2.5;static MARKER_SIZE_PX=9;static LABEL_HEIGHT_PX=15;static STEP_M=15;static LIFT_M=.3;group=new le;materials=[];pointsMaterials=[];labels=[];viewportHeightPx=720;fovDeg=60;set(e,n,i,t,o,l){this.empty();for(const s of e){const a=this.positions(s,i,t,o,l),d=new ce(s.color??de),m=n.get(s.id);if(m&&a.length>=3&&this.addLabel(m,this.labelAnchor(a,s.kind)),s.kind==="point"){const c=new fe;c.setAttribute("position",new F(a.slice(0,3),3));const g=new ue({color:d,size:A.MARKER_SIZE_PX,sizeAttenuation:!1,depthTest:!1,fog:!1});this.pointsMaterials.push(g);const r=new pe(c,g);r.name="trace point",r.frustumCulled=!1,r.layers.set(this.layer),this.group.add(r)}else if(a.length>=6){const c=new Y;c.setPositions(s.kind==="polygon"?[...a,a[0],a[1],a[2]]:a);const g=new N({color:d.getHex(),linewidth:A.LINE_WIDTH_PX,worldUnits:!1,transparent:!0,opacity:.92,depthTest:!1,fog:!1});this.materials.push(g);const r=new xe(c,g);r.name=`trace ${s.kind}`,r.frustumCulled=!1,r.layers.set(this.layer),this.group.add(r)}}}setView(e,n){for(const i of this.materials)i.resolution.copy(e);e.y===this.viewportHeightPx&&n===this.fovDeg||(this.viewportHeightPx=e.y,this.fovDeg=n,this.scaleLabels())}get any(){return this.group.children.length>0}dispose(){this.empty()}labelAnchor(e,n){let i=0;if(n==="line"){let t=-1;for(let o=0;o+2<e.length;o+=3){const l=Math.hypot(e[o],e[o+2]);l>t&&(t=l,i=o)}}return[e[i],e[i+1],e[i+2]]}addLabel(e,n){const i=document.createElement("canvas"),t=i.getContext("2d");if(!t)return;const o="bold 30px sans-serif";t.font=o;const l=10;i.width=Math.ceil(t.measureText(e).width)+l*2,i.height=44,t.font=o,t.fillStyle="rgba(0, 0, 0, 0.6)",t.beginPath(),t.roundRect(0,0,i.width,i.height,10),t.fill(),t.fillStyle="#ffffff",t.textBaseline="middle",t.fillText(e,l,i.height/2+2);const s=new he({map:new me(i),depthTest:!1,depthWrite:!1,fog:!1,sizeAttenuation:!1}),a=new V(s);a.name="trace name",a.center.set(0,0),a.position.set(n[0],n[1],n[2]),a.frustumCulled=!1,a.layers.set(this.layer),this.labels.push({sprite:a,aspect:i.width/i.height}),this.group.add(a),this.scaleLabels()}scaleLabels(){const e=A.LABEL_HEIGHT_PX/(this.viewportHeightPx/2)*Math.tan(this.fovDeg*Math.PI/360);for(const{sprite:n,aspect:i}of this.labels)n.scale.set(e*i,e,1)}empty(){for(const e of[...this.group.children])this.group.remove(e),e instanceof V?(e.material.map?.dispose(),e.material.dispose()):e.geometry.dispose();this.labels.length=0;for(const e of this.materials.splice(0))e.dispose();for(const e of this.pointsMaterials.splice(0))e.dispose()}positions(e,n,i,t,o){const l=e.altitude??"ground",s=e.points.map(r=>{const{x:v,z:y}=ge(r.lat,r.lng,n,i);return{x:v,z:y,altM:r.altM??0}}),a=l!=="absolute",d=[],m=(r,v,y)=>l==="absolute"?y-t:o(r,v)+(l==="relative"?y:0)+A.LIFT_M,c=e.kind==="polygon",g=c?s.length:s.length-1;for(let r=0;r<Math.max(g,1);r++){const v=s[r],y=s[(r+1)%s.length],U=a&&e.kind!=="point"?Math.max(1,Math.ceil(Math.hypot(y.x-v.x,y.z-v.z)/A.STEP_M)):1;for(let L=0;L<U;L++){const D=L/U,_=v.x+(y.x-v.x)*D,w=v.z+(y.z-v.z)*D;d.push(_,m(_,w,v.altM+(y.altM-v.altM)*D),w)}}if(!c&&e.kind!=="point"){const r=s[s.length-1];d.push(r.x,m(r.x,r.z,r.altM),r.z)}return d}}export{A as TraceSystem};
393
+ `};class N extends ie{constructor(e){super({type:"LineMaterial",uniforms:$.clone(I.line.uniforms),vertexShader:I.line.vertexShader,fragmentShader:I.line.fragmentShader,clipping:!0}),this.isLineMaterial=!0,this.setValues(e)}get color(){return this.uniforms.diffuse.value}set color(e){this.uniforms.diffuse.value=e}get worldUnits(){return"WORLD_UNITS"in this.defines}set worldUnits(e){e===!0!==this.worldUnits&&(this.needsUpdate=!0),e===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}get linewidth(){return this.uniforms.linewidth.value}set linewidth(e){this.uniforms.linewidth&&(this.uniforms.linewidth.value=e)}get dashed(){return"USE_DASH"in this.defines}set dashed(e){e===!0!==this.dashed&&(this.needsUpdate=!0),e===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}get dashScale(){return this.uniforms.dashScale.value}set dashScale(e){this.uniforms.dashScale.value=e}get dashSize(){return this.uniforms.dashSize.value}set dashSize(e){this.uniforms.dashSize.value=e}get dashOffset(){return this.uniforms.dashOffset.value}set dashOffset(e){this.uniforms.dashOffset.value=e}get gapSize(){return this.uniforms.gapSize.value}set gapSize(e){this.uniforms.gapSize.value=e}get opacity(){return this.uniforms.opacity.value}set opacity(e){this.uniforms&&(this.uniforms.opacity.value=e)}get resolution(){return this.uniforms.resolution.value}set resolution(e){this.uniforms.resolution.value.copy(e)}get alphaToCoverage(){return"USE_ALPHA_TO_COVERAGE"in this.defines}set alphaToCoverage(e){this.defines&&(e===!0!==this.alphaToCoverage&&(this.needsUpdate=!0),e===!0?this.defines.USE_ALPHA_TO_COVERAGE="":delete this.defines.USE_ALPHA_TO_COVERAGE)}}const H=new B,q=new E,X=new E,f=new B,u=new B,x=new B,W=new E,R=new ae,p=new oe,K=new E,T=new j,C=new Z,S=new B;let b,z;function J(h,e,n){return S.set(0,0,-e,1).applyMatrix4(h.projectionMatrix),S.multiplyScalar(1/S.w),S.x=z/n.width,S.y=z/n.height,S.applyMatrix4(h.projectionMatrixInverse),S.multiplyScalar(1/S.w),Math.abs(Math.max(S.x,S.y))}function ve(h,e){const n=h.matrixWorld,i=h.geometry,t=i.attributes.instanceStart,o=i.attributes.instanceEnd,l=Math.min(i.instanceCount,t.count);for(let s=0,a=l;s<a;s++){p.start.fromBufferAttribute(t,s),p.end.fromBufferAttribute(o,s),p.applyMatrix4(n);const d=new E,m=new E;b.distanceSqToSegment(p.start,p.end,m,d),m.distanceTo(d)<z*.5&&e.push({point:m,pointOnLine:d,distance:b.origin.distanceTo(m),object:h,face:null,faceIndex:s,uv:null,uv1:null})}}function ye(h,e,n){const i=e.projectionMatrix,o=h.material.resolution,l=h.matrixWorld,s=h.geometry,a=s.attributes.instanceStart,d=s.attributes.instanceEnd,m=Math.min(s.instanceCount,a.count),c=-e.near;b.at(1,x),x.w=1,x.applyMatrix4(e.matrixWorldInverse),x.applyMatrix4(i),x.multiplyScalar(1/x.w),x.x*=o.x/2,x.y*=o.y/2,x.z=0,W.copy(x),R.multiplyMatrices(e.matrixWorldInverse,l);for(let g=0,r=m;g<r;g++){if(f.fromBufferAttribute(a,g),u.fromBufferAttribute(d,g),f.w=1,u.w=1,f.applyMatrix4(R),u.applyMatrix4(R),f.z>c&&u.z>c)continue;if(f.z>c){const _=f.z-u.z,w=(f.z-c)/_;f.lerp(u,w)}else if(u.z>c){const _=u.z-f.z,w=(u.z-c)/_;u.lerp(f,w)}f.applyMatrix4(i),u.applyMatrix4(i),f.multiplyScalar(1/f.w),u.multiplyScalar(1/u.w),f.x*=o.x/2,f.y*=o.y/2,u.x*=o.x/2,u.y*=o.y/2,p.start.copy(f),p.start.z=0,p.end.copy(u),p.end.z=0;const y=p.closestPointToPointParameter(W,!0);p.at(y,K);const U=re.lerp(f.z,u.z,y),L=U>=-1&&U<=1,D=W.distanceTo(K)<z*.5;if(L&&D){p.start.fromBufferAttribute(a,g),p.end.fromBufferAttribute(d,g),p.start.applyMatrix4(l),p.end.applyMatrix4(l);const _=new E,w=new E;b.distanceSqToSegment(p.start,p.end,w,_),n.push({point:w,pointOnLine:_,distance:b.origin.distanceTo(w),object:h,face:null,faceIndex:g,uv:null,uv1:null})}}}class we extends se{constructor(e=new Q,n=new N({color:Math.random()*16777215})){super(e,n),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){const e=this.geometry,n=e.attributes.instanceStart,i=e.attributes.instanceEnd,t=new Float32Array(2*n.count);for(let l=0,s=0,a=n.count;l<a;l++,s+=2)q.fromBufferAttribute(n,l),X.fromBufferAttribute(i,l),t[s]=s===0?0:t[s-1],t[s+1]=t[s]+q.distanceTo(X);const o=new G(t,2,1);return e.setAttribute("instanceDistanceStart",new M(o,1,0)),e.setAttribute("instanceDistanceEnd",new M(o,1,1)),this}raycast(e,n){const i=this.material.worldUnits,t=e.camera;if(t===null&&!i&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.'),i===!1&&(this.material.resolution.x===0||this.material.resolution.y===0))return;const o=e.params.Line2!==void 0&&e.params.Line2.threshold||0;b=e.ray;const l=this.matrixWorld,s=this.geometry,a=this.material;z=a.linewidth+o,s.boundingSphere===null&&s.computeBoundingSphere(),C.copy(s.boundingSphere).applyMatrix4(l);let d;if(i)d=z*.5;else{const c=Math.max(t.near,C.distanceToPoint(b.origin));d=J(t,c,a.resolution)}if(C.radius+=d,b.intersectsSphere(C)===!1)return;s.boundingBox===null&&s.computeBoundingBox(),T.copy(s.boundingBox).applyMatrix4(l);let m;if(i)m=z*.5;else{const c=Math.max(t.near,T.distanceToPoint(b.origin));m=J(t,c,a.resolution)}T.expandByScalar(m),b.intersectsBox(T)!==!1&&(i?ve(this,n):ye(this,t,n))}onBeforeRender(e){const n=this.material.uniforms;n&&n.resolution&&(e.getViewport(H),this.material.uniforms.resolution.value.set(H.z,H.w))}}class Y extends Q{constructor(){super(),this.isLineGeometry=!0,this.type="LineGeometry"}setPositions(e){const n=e.length-3,i=new Float32Array(2*n);for(let t=0;t<n;t+=3)i[2*t]=e[t],i[2*t+1]=e[t+1],i[2*t+2]=e[t+2],i[2*t+3]=e[t+3],i[2*t+4]=e[t+4],i[2*t+5]=e[t+5];return super.setPositions(i),this}setColors(e){const n=e.length-3,i=new Float32Array(2*n);for(let t=0;t<n;t+=3)i[2*t]=e[t],i[2*t+1]=e[t+1],i[2*t+2]=e[t+2],i[2*t+3]=e[t+3],i[2*t+4]=e[t+4],i[2*t+5]=e[t+5];return super.setColors(i),this}setFromPoints(e){const n=e.length-1,i=new Float32Array(6*n);for(let t=0;t<n;t++)i[6*t]=e[t].x,i[6*t+1]=e[t].y,i[6*t+2]=e[t].z||0,i[6*t+3]=e[t+1].x,i[6*t+4]=e[t+1].y,i[6*t+5]=e[t+1].z||0;return super.setPositions(i),this}fromLine(e){const n=e.geometry;return this.setPositions(n.attributes.position.array),this}}class xe extends we{constructor(e=new Y,n=new N({color:Math.random()*16777215})){super(e,n),this.isLine2=!0,this.type="Line2"}}class A{constructor(e){this.layer=e,this.group.name="traces"}static LINE_WIDTH_PX=2.5;static MARKER_SIZE_PX=9;static LABEL_HEIGHT_PX=15;static STEP_M=15;static LIFT_M=.3;group=new le;materials=[];pointsMaterials=[];labels=[];viewportHeightPx=720;fovDeg=60;set(e,n,i,t,o,l){this.empty();for(const s of e){const a=this.positions(s,i,t,o,l),d=new ce(s.color??de),m=n.get(s.id);if(m&&a.length>=3&&this.addLabel(m,this.labelAnchor(a,s.kind)),s.kind==="point"){const c=new fe;c.setAttribute("position",new F(a.slice(0,3),3));const g=new ue({color:d,size:A.MARKER_SIZE_PX,sizeAttenuation:!1,depthTest:!1,fog:!1});this.pointsMaterials.push(g);const r=new pe(c,g);r.name="trace point",r.frustumCulled=!1,r.layers.set(this.layer),this.group.add(r)}else if(a.length>=6){const c=new Y;c.setPositions(s.kind==="polygon"?[...a,a[0],a[1],a[2]]:a);const g=new N({color:d.getHex(),linewidth:A.LINE_WIDTH_PX,worldUnits:!1,transparent:!0,opacity:.92,depthTest:!1,fog:!1});this.materials.push(g);const r=new xe(c,g);r.name=`trace ${s.kind}`,r.frustumCulled=!1,r.layers.set(this.layer),this.group.add(r)}}}setView(e,n){for(const i of this.materials)i.resolution.copy(e);e.y===this.viewportHeightPx&&n===this.fovDeg||(this.viewportHeightPx=e.y,this.fovDeg=n,this.scaleLabels())}get any(){return this.group.children.length>0}dispose(){this.empty()}labelAnchor(e,n){let i=0;if(n==="line"){let t=-1;for(let o=0;o+2<e.length;o+=3){const l=Math.hypot(e[o],e[o+2]);l>t&&(t=l,i=o)}}return[e[i],e[i+1],e[i+2]]}addLabel(e,n){const i=document.createElement("canvas"),t=i.getContext("2d");if(!t)return;const o="bold 30px sans-serif";t.font=o;const l=10;i.width=Math.ceil(t.measureText(e).width)+l*2,i.height=44,t.font=o,t.fillStyle="rgba(0, 0, 0, 0.6)",t.beginPath(),t.roundRect(0,0,i.width,i.height,10),t.fill(),t.fillStyle="#ffffff",t.textBaseline="middle",t.fillText(e,l,i.height/2+2);const s=new he({map:new me(i),depthTest:!1,depthWrite:!1,fog:!1,sizeAttenuation:!1}),a=new V(s);a.name="trace name",a.center.set(0,0),a.position.set(n[0],n[1],n[2]),a.frustumCulled=!1,a.layers.set(this.layer),this.labels.push({sprite:a,aspect:i.width/i.height}),this.group.add(a),this.scaleLabels()}scaleLabels(){const e=A.LABEL_HEIGHT_PX/(this.viewportHeightPx/2)*Math.tan(this.fovDeg*Math.PI/360);for(const{sprite:n,aspect:i}of this.labels)n.scale.set(e*i,e,1)}empty(){for(const e of[...this.group.children])this.group.remove(e),e instanceof V?(e.material.map?.dispose(),e.material.dispose()):e.geometry.dispose();this.labels.length=0;for(const e of this.materials.splice(0))e.dispose();for(const e of this.pointsMaterials.splice(0))e.dispose()}positions(e,n,i,t,o){const l=e.altitude??"ground",s=e.points.map(r=>{const{x:v,z:y}=ge(r.lat,r.lng,n,i);return{x:v,z:y,altM:r.altM??0}}),a=l!=="absolute",d=[],m=(r,v,y)=>l==="absolute"?y-t:o(r,v)+(l==="relative"?y:0)+A.LIFT_M,c=e.kind==="polygon",g=c?s.length:s.length-1;for(let r=0;r<Math.max(g,1);r++){const v=s[r],y=s[(r+1)%s.length],U=a&&e.kind!=="point"?Math.max(1,Math.ceil(Math.hypot(y.x-v.x,y.z-v.z)/A.STEP_M)):1;for(let L=0;L<U;L++){const D=L/U,_=v.x+(y.x-v.x)*D,w=v.z+(y.z-v.z)*D;d.push(_,m(_,w,v.altM+(y.altM-v.altM)*D),w)}}if(!c&&e.kind!=="point"){const r=s[s.length-1];d.push(r.x,m(r.x,r.z,r.altM),r.z)}return d}}export{A as TraceSystem};
@@ -0,0 +1 @@
1
+ import{G as O,M as w,C as A,g as M,b as R,d as v,e as b,B,F as L}from"./rr0-sighting.mjs";class r{static LIFT_M=.05;static RENDER_ORDER=1.04;static LEVEL_QUANTILE=.2;static BODY_ALBEDO=[.035,.045,.04];static IOR=1.33;static ROUGHNESS=.08;static MAX_SAMPLES=48;group=new O;material=new w({color:new A(...r.BODY_ALBEDO),roughness:r.ROUGHNESS,metalness:0,ior:r.IOR,polygonOffset:!0,polygonOffsetFactor:-2,polygonOffsetUnits:-2});constructor(){this.group.name="water"}set(s,e,n,p,t,o){this.clear();for(const l of s){const f=l.rings.map(i=>r.clip(i.map(h=>M(h.lat,h.lng,e,n)),t)),a=f[0];if(!a||a.length<3)continue;const g=f.slice(1).filter(i=>i.length>=3),u=r.level(a,g,p,o);if(u===void 0)continue;const c=r.geometry(a,g,u+r.LIFT_M);if(!c)continue;const x=new R(c,this.material);x.name=`water ${l.id}`,x.renderOrder=r.RENDER_ORDER,x.receiveShadow=!0,this.group.add(x)}}get count(){return this.group.children.length}clear(){for(const s of[...this.group.children])s.geometry.dispose(),this.group.remove(s)}dispose(){this.clear(),this.material.dispose()}static level(s,e,n,p){const t=s.map(i=>i.x),o=s.map(i=>i.z),[l,f,a,g]=[Math.min(...t),Math.max(...t),Math.min(...o),Math.max(...o)],u=Math.max(p,(f-l)/r.MAX_SAMPLES,(g-a)/r.MAX_SAMPLES,.5),c=[];for(let i=a+u/2;i<g;i+=u)for(let h=l+u/2;h<f;h+=u){const z={x:h,z:i};if(!r.contains(s,z)||e.some(E=>r.contains(E,z)))continue;const d=n(h,i);Number.isFinite(d)&&c.push(d)}if(c.length===0)for(const i of s)c.push(n(i.x,i.z));const x=c.filter(Number.isFinite).sort((i,h)=>i-h);if(x.length!==0)return x[Math.floor((x.length-1)*r.LEVEL_QUANTILE)]}static clip(s,e){let n=s;const p=[{inside:t=>t.x>=-e,cross:(t,o)=>r.atX(t,o,-e)},{inside:t=>t.x<=e,cross:(t,o)=>r.atX(t,o,e)},{inside:t=>t.z>=-e,cross:(t,o)=>r.atZ(t,o,-e)},{inside:t=>t.z<=e,cross:(t,o)=>r.atZ(t,o,e)}];for(const t of p){const o=[];for(let l=0;l<n.length;l++){const f=n[l],a=n[(l+n.length-1)%n.length];t.inside(f)?(t.inside(a)||o.push(t.cross(a,f)),o.push(f)):t.inside(a)&&o.push(t.cross(a,f))}if(n=o,n.length===0)break}return n}static atX(s,e,n){return{x:n,z:s.z+(e.z-s.z)*(n-s.x)/(e.x-s.x)}}static atZ(s,e,n){return{x:s.x+(e.x-s.x)*(n-s.z)/(e.z-s.z),z:n}}static contains(s,e){let n=!1;for(let p=0,t=s.length-1;p<s.length;t=p++){const o=s[p],l=s[t];o.z>e.z!=l.z>e.z&&e.x<(l.x-o.x)*(e.z-o.z)/(l.z-o.z)+o.x&&(n=!n)}return n}static geometry(s,e,n){const p=c=>new v(c.x,c.z),t=s.map(p),o=e.map(c=>c.map(p)),l=b.triangulateShape(t,o);if(l.length===0)return;const f=[...t,...o.flat()],a=[];for(const[c,x,i]of l){const[h,z,d]=[f[c],f[x],f[i]],E=(z.y-h.y)*(d.x-h.x)-(z.x-h.x)*(d.y-h.y)>0;for(const m of E?[h,z,d]:[h,d,z])a.push(m.x,n,m.y)}const g=new B;g.setAttribute("position",new L(a,3));const u=new Float32Array(a.length);for(let c=1;c<u.length;c+=3)u[c]=1;return g.setAttribute("normal",new L(u,3)),g.computeBoundingSphere(),g}}export{r as WaterSystem};