@rr0/ufoathome 0.185.1 → 0.185.2

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 (60) hide show
  1. package/dist-embed-scene/{AdsbLolArchiveProvider-B0Yi081_.js → AdsbLolArchiveProvider-CzTJVwX_.js} +1 -1
  2. package/dist-embed-scene/{BeamEditor-DXIKipID.js → BeamEditor-B1rrWZ8t.js} +1 -1
  3. package/dist-embed-scene/{BeamSystem-ebEMoYD3.js → BeamSystem-BxfhSMvb.js} +1 -1
  4. package/dist-embed-scene/ControlPasses-X_kTXa-p.js +29 -0
  5. package/dist-embed-scene/{Flightradar24Provider-CpwhYfIE.js → Flightradar24Provider-ae0_oe2g.js} +1 -1
  6. package/dist-embed-scene/{GLTFLoader-BxToReDu.js → GLTFLoader-CZ-8eVJ4.js} +1 -1
  7. package/dist-embed-scene/{LanternEditor-JvQQ8GOQ.js → LanternEditor-DbaHa2ey.js} +1 -1
  8. package/dist-embed-scene/{LaserBeam-B48FKTrt.js → LaserBeam-DW1f0LPn.js} +1 -1
  9. package/dist-embed-scene/{LaunchEditor-DIxYPs4d.js → LaunchEditor-M8G5W83U.js} +2 -2
  10. package/dist-embed-scene/{LaunchPlume-FP3Yk-8B.js → LaunchPlume-BtEO63Vx.js} +1 -1
  11. package/dist-embed-scene/{LaunchSimulation-v4khqz4r.js → LaunchSimulation-xgRnC8OK.js} +1 -1
  12. package/dist-embed-scene/{ModuleSession-CLUE46BO.js → ModuleSession-BGUJHOk9.js} +2 -2
  13. package/dist-embed-scene/ModuleThree-BljKXj42.js +1 -0
  14. package/dist-embed-scene/{ParameterForm-BFp5BoHL.js → ParameterForm-DMplRkcQ.js} +6 -6
  15. package/dist-embed-scene/{ReentryEditor-ByVtt--5.js → ReentryEditor-FFxrv4q7.js} +1 -1
  16. package/dist-embed-scene/{ReentrySimulation-nzg5V3kJ.js → ReentrySimulation-xFQ_R53U.js} +1 -1
  17. package/dist-embed-scene/{ReferenceSystem-D9IdSvFM.js → ReferenceSystem-Dyc08-lR.js} +1 -1
  18. package/dist-embed-scene/{SceneNames_en-BSE4vlLT.js → SceneNames_en-CIzANCLW.js} +1 -1
  19. package/dist-embed-scene/{SceneNames_es-CZyu8Wnr.js → SceneNames_es-DntR6o9V.js} +1 -1
  20. package/dist-embed-scene/{SceneNames_fr-CphfTjGw.js → SceneNames_fr-7wmERMPd.js} +1 -1
  21. package/dist-embed-scene/{SceneNames_it-DQ_cY7aP.js → SceneNames_it-Bxtenoxp.js} +1 -1
  22. package/dist-embed-scene/{TimelineTracks-BOjTfdGu.js → TimelineTracks-CZBILU3f.js} +2 -2
  23. package/dist-embed-scene/{UfoMessages_en-CXQNZd8v.js → UfoMessages_en-AS8tBKJW.js} +1 -1
  24. package/dist-embed-scene/rr0-scene.mjs +241 -241
  25. package/dist-embed-sighting/{AdsbLolArchiveProvider-BqLvFUVC.js → AdsbLolArchiveProvider-D9EKDsic.js} +1 -1
  26. package/dist-embed-sighting/{BeamEditor-CcOf6lNz.js → BeamEditor-Cod7HUNj.js} +2 -2
  27. package/dist-embed-sighting/{BeamSystem-B5d0Ymn5.js → BeamSystem-BZ2f4hh1.js} +1 -1
  28. package/dist-embed-sighting/{CaseReportExport-TKaz2rai.js → CaseReportExport-Drb2dd78.js} +1 -1
  29. package/dist-embed-sighting/ControlPasses-BnlLorfW.js +29 -0
  30. package/dist-embed-sighting/{Flightradar24Provider-DQtEJ3tX.js → Flightradar24Provider-DQ-bvlMM.js} +1 -1
  31. package/dist-embed-sighting/{GLTFLoader-VIIHsteW.js → GLTFLoader-DPrksej_.js} +1 -1
  32. package/dist-embed-sighting/{LanternEditor-D1BA5pRP.js → LanternEditor-9zPknaGj.js} +1 -1
  33. package/dist-embed-sighting/{LaserBeam-BjjC_CzP.js → LaserBeam-CFUYJu2F.js} +1 -1
  34. package/dist-embed-sighting/{LaunchEditor-TTSgWqbE.js → LaunchEditor-GiZERDOz.js} +1 -1
  35. package/dist-embed-sighting/{LaunchPlume-B2Fjd2_C.js → LaunchPlume-CuDQMA8K.js} +1 -1
  36. package/dist-embed-sighting/{LaunchSimulation-BcmPicEe.js → LaunchSimulation-Fpwvzpf1.js} +1 -1
  37. package/dist-embed-sighting/{ModuleSession-CY9_UusZ.js → ModuleSession-CY6DsJx0.js} +2 -2
  38. package/dist-embed-sighting/ModuleThree-EigESy50.js +1 -0
  39. package/dist-embed-sighting/{ParameterForm-BaUeWd7v.js → ParameterForm-BHITM-mQ.js} +1 -1
  40. package/dist-embed-sighting/{ReentryEditor-CGN3ewTE.js → ReentryEditor-C_AN8aTr.js} +1 -1
  41. package/dist-embed-sighting/{ReentrySimulation-C2kIulZ6.js → ReentrySimulation-sBnymskP.js} +1 -1
  42. package/dist-embed-sighting/{ReferenceSystem-BRTCOQHk.js → ReferenceSystem-Cn6gWxGT.js} +1 -1
  43. package/dist-embed-sighting/{TimelineTracks-Ddv5sZHp.js → TimelineTracks-B7EcGLEf.js} +1 -1
  44. package/dist-embed-sighting/rr0-sighting.mjs +273 -273
  45. package/dist-embed-sighting-editor/{CaseReportExport-7rLVAHxs.js → CaseReportExport-COqBs7VN.js} +1 -1
  46. package/dist-embed-sighting-editor/ControlPasses-BsZQ-_CW.js +29 -0
  47. package/dist-embed-sighting-editor/{GLTFLoader-CJy8wjmO.js → GLTFLoader-D7spTlJl.js} +1 -1
  48. package/dist-embed-sighting-editor/{ModuleConformance-B8OYKQop.js → ModuleConformance-D7QNv2-c.js} +2 -2
  49. package/dist-embed-sighting-editor/{ModuleSession-BQSTCqob.js → ModuleSession-DTZs4At5.js} +2 -2
  50. package/dist-embed-sighting-editor/ModuleThree-COSQVAvF.js +1 -0
  51. package/dist-embed-sighting-editor/{ModulesPanelElement-CZcbo6lq.js → ModulesPanelElement-9x7kP_Tx.js} +3 -3
  52. package/dist-embed-sighting-editor/{ReferenceSystem-BxKEbMVI.js → ReferenceSystem-ZQRGSWgC.js} +1 -1
  53. package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +278 -278
  54. package/package.json +1 -1
  55. package/dist-embed-scene/ControlPasses-BMma2JRm.js +0 -29
  56. package/dist-embed-scene/ModuleThree-DQfMGMDy.js +0 -1
  57. package/dist-embed-sighting/ControlPasses-BxgSO3B9.js +0 -29
  58. package/dist-embed-sighting/ModuleThree-BhryLUjX.js +0 -1
  59. package/dist-embed-sighting-editor/ControlPasses-oqSnNDq6.js +0 -29
  60. package/dist-embed-sighting-editor/ModuleThree-DwGM2nF4.js +0 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rr0/ufoathome",
3
3
  "type": "module",
4
- "version": "0.185.1",
4
+ "version": "0.185.2",
5
5
  "description": "UFO@home — record and replay a UFO sighting's shape, movement and appearance",
6
6
  "author": "Jérôme Beau <rr0@rr0.org> (https://rr0.org)",
7
7
  "license": "MIT",
@@ -1,29 +0,0 @@
1
- import{$ as A,V as F,a0 as E,a1 as P,a2 as M,a3 as R,a4 as D,e as U,C as b,q as k}from"./rr0-scene.mjs";class w{target;wideCamera=new A;materials=new Map;draw(a){const{renderer:s,camera:r,equidistant:e}=a,i=s.getDrawingBufferSize(new F),n=i.x,o=i.y,t=n/o;if(e&&!E.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,o),l=this.drawDistance(a,c,f),d=this.drawPhenomenon(a,c,f),h=Math.tan(c.fov*Math.PI/360),u=new Float32Array(n*o),p=new Uint8Array(n*o);for(let v=0;v<o;v++)for(let g=0;g<n;g++){const m=this.sourcePixel(g,v,n,o,r.fov,t,h,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];p[x]=Math.max(y,C,T,_)>w.LIGHT_THRESHOLD?255:0}return{width:n,height:o,distanceM:u,phenomenon:p}}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,i,n,o,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,i);if(l.z>=0)return-1;const d=l.x/-l.z/(o*n),h=l.y/-l.z/o,u=Math.floor((d+1)/2*r),p=Math.floor((h+1)/2*e);return u<0||u>=r||p<0||p>=e?-1:p*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 P(a,s,{type:D,format:R,minFilter:M,magFilter:M,depthBuffer:!0}),this.target}drawDistance(a,s,r){const{renderer:e,scene:i}=a,n=[],o=[];for(const t of a.sky)t.visible&&(t.visible=!1,n.push(t));i.traverseVisible(t=>{if(t instanceof U){if(a.isSolid(t)){o.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(i,s))}finally{for(const t of n)t.visible=!0;for(const{mesh:t,material:c}of o)t.material=c}}drawPhenomenon(a,s,r){return this.drawInto(a,r,()=>a.drawPhenomena(s))}drawInto(a,s,r){const{renderer:e,scene:i}=a,n=e.getRenderTarget(),o=e.autoClear,t=e.shadowMap.autoUpdate,c=i.fog,f=i.background,l=e.getClearAlpha(),d=e.getClearColor(new b);i.fog=null,i.background=null,e.shadowMap.autoUpdate=!1,e.setRenderTarget(s),e.setClearColor(0,0),e.clear(!0,!0,!0),e.autoClear=!1;try{r();const h=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,h),h}finally{e.autoClear=o,e.shadowMap.autoUpdate=t,e.setRenderTarget(n),e.setClearColor(d,l),i.fog=c,i.background=f}}distanceMaterial(a){const s=a.alphaTest??0,r=a.map??a.alphaMap??null,e=s>0&&r!==null,i=`${a.side}:${e?`${r.uuid}:${s}`:"-"}`;let n=this.materials.get(i);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(i,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};
@@ -1 +0,0 @@
1
- import{p as a,V as e,bm as s,H as r,K as t,ab as i,q as o,a5 as n,z as l,E as b,ar as d,ac as m,ad as u,bn as M,h as B,N as G,e as S,w as c,aJ as p,aG as y,aK as f,G as h,aX as x,F as C,bo as E,Q as L,bp as g,bq as D,br as P,C as T,J as A,B as F,i as V,bs as q,aa as v,Z as H}from"./rr0-scene.mjs";const K={AdditiveBlending:H,BackSide:v,BoxGeometry:q,BufferAttribute:V,BufferGeometry:F,CanvasTexture:A,Color:T,ConeGeometry:P,CylinderGeometry:D,DataTexture:g,DoubleSide:L,Euler:E,Float32BufferAttribute:C,FrontSide:x,Group:h,Line:f,LineBasicMaterial:y,LineSegments:p,Matrix4:c,Mesh:S,MeshBasicMaterial:G,MeshStandardMaterial:B,NormalBlending:M,Object3D:u,PlaneGeometry:m,PointLight:d,Points:b,PointsMaterial:l,Quaternion:n,ShaderMaterial:o,SphereGeometry:i,Sprite:t,SpriteMaterial:r,TorusGeometry:s,Vector2:e,Vector3:a};export{K as MODULE_THREE};
@@ -1,29 +0,0 @@
1
- import{am as A,y as F,an as E,ao as P,ap as y,aq as R,ar as D,x as U,C as b,a3 as k}from"./rr0-sighting.mjs";class w{target;wideCamera=new A;materials=new Map;draw(a){const{renderer:s,camera:r,equidistant:e}=a,o=s.getDrawingBufferSize(new F),n=o.x,i=o.y,t=n/i;if(e&&!E.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 M=d[m*4],C=d[m*4+1],T=d[m*4+2],_=d[m*4+3];h[x]=Math.max(M,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 P(a,s,{type:D,format:R,minFilter:y,magFilter:y,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 U){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 b);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};
@@ -1 +0,0 @@
1
- import{a2 as a,y as e,bE as s,ae as t,ag as r,ay as i,a3 as o,as as n,ac as b,ad as l,aU as d,az as u,aA as m,bF as M,K as y,ah as G,x as B,a9 as S,ba as c,b7 as f,bb as h,G as x,bo as p,J as E,bG as g,ai as C,bH as L,bI as A,bJ as D,C as P,af as T,E as F,N as v,bK as H,ax as J,al as K}from"./rr0-sighting.mjs";const O={AdditiveBlending:K,BackSide:J,BoxGeometry:H,BufferAttribute:v,BufferGeometry:F,CanvasTexture:T,Color:P,ConeGeometry:D,CylinderGeometry:A,DataTexture:L,DoubleSide:C,Euler:g,Float32BufferAttribute:E,FrontSide:p,Group:x,Line:h,LineBasicMaterial:f,LineSegments:c,Matrix4:S,Mesh:B,MeshBasicMaterial:G,MeshStandardMaterial:y,NormalBlending:M,Object3D:m,PlaneGeometry:u,PointLight:d,Points:l,PointsMaterial:b,Quaternion:n,ShaderMaterial:o,SphereGeometry:i,Sprite:r,SpriteMaterial:t,TorusGeometry:s,Vector2:e,Vector3:a};export{O as MODULE_THREE};
@@ -1,29 +0,0 @@
1
- import{ax as b,b1 as A,bn as F,bo as E,bp as M,bq as P,br as R,ap as D,aS as U,b9 as S}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 S({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};
@@ -1 +0,0 @@
1
- import{V as a,b1 as e,cc as s,bi as t,bk as r,by as i,b9 as o,Q as n,bh as b,aQ as c,bH as l,bz as d,G as m,cd as u,ar as M,aD as B,ap as S,K as y,bY as G,bV as f,bZ as h,am as p,ca as x,b3 as g,J as C,aE as D,ce as E,cf as L,cg as P,aS as T,bj as V,aB as A,aC as F,ch as Q,bx as j,aF as k}from"./rr0-sighting-editor.mjs";const H={AdditiveBlending:k,BackSide:j,BoxGeometry:Q,BufferAttribute:F,BufferGeometry:A,CanvasTexture:V,Color:T,ConeGeometry:P,CylinderGeometry:L,DataTexture:E,DoubleSide:D,Euler:C,Float32BufferAttribute:g,FrontSide:x,Group:p,Line:h,LineBasicMaterial:f,LineSegments:G,Matrix4:y,Mesh:S,MeshBasicMaterial:B,MeshStandardMaterial:M,NormalBlending:u,Object3D:m,PlaneGeometry:d,PointLight:l,Points:c,PointsMaterial:b,Quaternion:n,ShaderMaterial:o,SphereGeometry:i,Sprite:r,SpriteMaterial:t,TorusGeometry:s,Vector2:e,Vector3:a};export{H as MODULE_THREE};