@arcgis/core 4.33.0-next.20250320 → 4.33.0-next.20250321

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 (30) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/1034155c525d2b7baaa1.js +1 -0
  3. package/assets/esri/core/workers/chunks/2b9ce6648823f6962f58.js +1 -0
  4. package/assets/esri/core/workers/chunks/{9e11307b4cc3b523d178.js → 9cfce9414b874878d761.js} +1 -1
  5. package/assets/esri/themes/base/_mixins.scss +4 -0
  6. package/assets/esri/themes/dark/main.css +1 -1
  7. package/assets/esri/themes/light/main.css +1 -1
  8. package/assets/esri/themes/light/view.css +1 -1
  9. package/chunks/BloomBlur.glsl.js +7 -7
  10. package/chunks/BloomComposition.glsl.js +2 -2
  11. package/geometry/support/buffer/BufferView.js +1 -1
  12. package/package.json +1 -1
  13. package/support/revision.js +1 -1
  14. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  15. package/views/3d/layers/graphics/deconflictorDebug.js +1 -1
  16. package/views/3d/support/buffer/InterleavedLayout.js +1 -1
  17. package/views/3d/webgl-engine/effects/bloom/BloomBlur.glsl.js +1 -1
  18. package/views/3d/webgl-engine/effects/bloom/BloomComposition.glsl.js +1 -1
  19. package/views/3d/webgl-engine/effects/bloom/BloomPresets.glsl.js +5 -0
  20. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  21. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  22. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  23. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  24. package/widgets/Daylight.js +1 -1
  25. package/widgets/ElevationProfile/support/visualizationUtils.js +1 -1
  26. package/widgets/ShadowCast.js +1 -1
  27. package/widgets/support/globalCss.js +1 -1
  28. package/widgets/support/timeWidgetUtils.js +1 -1
  29. package/assets/esri/core/workers/chunks/657ae4a0461d45044b28.js +0 -1
  30. package/assets/esri/core/workers/chunks/c528a2ca3b1b73df5a5d.js +0 -1
@@ -2,9 +2,9 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{gauss as e}from"../core/mathUtils.js";import{ScreenSpacePass as r}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{Gamma as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{FloatPassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as s}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{NoParameters as l}from"../views/webgl/NoParameters.js";import{ShaderBuilder as n}from"../views/webgl/ShaderBuilder.js";var a;!function(e){e[e.Horizontal=0]="Horizontal",e[e.Vertical=1]="Vertical",e[e.COUNT=2]="COUNT"}(a||(a={}));const c={sunny:5e-4,cloudy:5e-4,rainy:.0022,snowy:.0022,foggy:.0022};class u extends l{constructor(){super(...arguments),this.blurRadius=c.sunny}}function d(l){const c=new n,u=c.fragment;c.include(r),c.include(o),u.uniforms.add(new i("colorTexture",(e=>e.color)),new t("blurRadius",(e=>e.blurRadius)));let d="";const m=15;for(let e=0;e<m;e++){d+=`locations1D[${e}] = ${(e/(m-1)*2-1).toFixed(3).toString()};`}const v=2;let f="";for(let r=0;r<m;r++){f+=`locations1DWeights[${r}] = ${e(r-Math.floor(m/2),v).toFixed(7).toString()};`}const g=l.bloomStage===a.Horizontal;return u.code.add(s`
6
- float locations1D[${s.int(m)}];
7
- float locations1DWeights[${s.int(m)}];
5
+ import{gauss as e}from"../core/mathUtils.js";import{ScreenSpacePass as r}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{Gamma as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{FloatPassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as s}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{blurRadiusPresets as l}from"../views/3d/webgl-engine/effects/bloom/BloomPresets.glsl.js";import{NoParameters as n}from"../views/webgl/NoParameters.js";import{ShaderBuilder as a}from"../views/webgl/ShaderBuilder.js";var c;!function(e){e[e.Horizontal=0]="Horizontal",e[e.Vertical=1]="Vertical",e[e.COUNT=2]="COUNT"}(c||(c={}));class u extends n{constructor(){super(...arguments),this.blurRadius=l.sunny}}function m(l){const n=new a,u=n.fragment;n.include(r),n.include(o),u.uniforms.add(new i("colorTexture",(e=>e.color)),new t("blurRadius",(e=>e.blurRadius)));let m="";const d=15;for(let e=0;e<d;e++){m+=`locations1D[${e}] = ${(e/(d-1)*2-1).toFixed(3).toString()};`}const f=2;let v="";for(let r=0;r<d;r++){v+=`locations1DWeights[${r}] = ${e(r-Math.floor(d/2),f).toFixed(7).toString()};`}const g=l.bloomStage===c.Horizontal;return u.code.add(s`
6
+ float locations1D[${s.int(d)}];
7
+ float locations1DWeights[${s.int(d)}];
8
8
 
9
9
  vec4 blurUniformSamples(sampler2D toBlur) {
10
10
  vec4 res = vec4(0.0);
@@ -12,11 +12,11 @@ import{gauss as e}from"../core/mathUtils.js";import{ScreenSpacePass as r}from"..
12
12
  vec2 aspectCorrection = vec2(1.0, size.x / size.y);
13
13
  vec2 uvInPixel = uv * size;
14
14
 
15
- ${d}
16
- ${f}
15
+ ${m}
16
+ ${v}
17
17
  vec2 pixelCenterShift = 0.5 / size;
18
18
 
19
- for(int i=0;i < ${s.int(m)}; i++) {
19
+ for(int i=0;i < ${s.int(d)}; i++) {
20
20
  float uv1D = locations1D[i] + ${g?"pixelCenterShift.x":"pixelCenterShift.y"};
21
21
  vec2 uvOffset = ${g?"vec2(uv1D, 0.0)":"vec2(0.0, uv1D)"};
22
22
 
@@ -29,4 +29,4 @@ import{gauss as e}from"../core/mathUtils.js";import{ScreenSpacePass as r}from"..
29
29
 
30
30
  return res;
31
31
  }
32
- `).main.add(s`fragColor = blurUniformSamples(colorTexture);`),c}const m=Object.freeze(Object.defineProperty({__proto__:null,BloomBlurPassParameters:u,get BlurDirection(){return a},blurRadiusPresets:c,build:d},Symbol.toStringTag,{value:"Module"}));export{m as B,a,u as b,c,d};
32
+ `).main.add(s`fragColor = blurUniformSamples(colorTexture);`),n}const d=Object.freeze(Object.defineProperty({__proto__:null,BloomBlurPassParameters:u,get BlurDirection(){return c},build:m},Symbol.toStringTag,{value:"Module"}));export{d as B,c as a,u as b,m as c};
@@ -2,7 +2,7 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{ScreenSpacePass as o}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{Gamma as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{Float2BindUniform as l}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{FloatPassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{FloatsPassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js";import{glsl as s}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{IntegerPassUniform as d}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{Texture2DBindUniform as i}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{Texture2DPassUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{NoParameters as n}from"../views/webgl/NoParameters.js";import{ShaderBuilder as c}from"../views/webgl/ShaderBuilder.js";class u extends n{constructor(o=p.sunny,e=[1,.8,.6,.4,.2],r=[.15,.05,.01,0,0]){super(),this.exposure=o,this.lodFactors=e,this.lodFactorsFront=r}}const p={sunny:25,cloudy:25,rainy:15,snowy:15,foggy:15},f=new u;class g extends u{constructor(){super(...arguments),this.bloomLod=-1}}function F(){const n=new c,u=n.fragment;return n.include(o),n.include(r),u.include(e),u.uniforms.add(new m("colorTexture",(o=>o.color)),new m("bloomTexture0",(o=>o.bloomTexture0)),new m("bloomTexture1",(o=>o.bloomTexture1)),new m("bloomTexture2",(o=>o.bloomTexture2)),new m("bloomTexture3",(o=>o.bloomTexture3)),new m("bloomTexture4",(o=>o.bloomTexture4)),new t("exposure",(o=>o.exposure)),new d("bloomLod",(o=>o.bloomLod)),new i("depthTexture",(o=>o.mainDepth)),new l("nearFar",(o=>o.camera.nearFar)),new a("lodFactors",(o=>o.lodFactors),5),new a("lodFactorsFront",(o=>o.lodFactorsFront),5)).code.add(s`vec3 simpleExposureTonemap(vec3 hdrColor, float exposure) {
5
+ import{ScreenSpacePass as o}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{Gamma as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{Float2BindUniform as l}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{FloatPassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{FloatsPassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js";import{glsl as s}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{IntegerPassUniform as d}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{Texture2DBindUniform as i}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{Texture2DPassUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{exposurePresets as n,lodFactorsPresets as c}from"../views/3d/webgl-engine/effects/bloom/BloomPresets.glsl.js";import{NoParameters as u}from"../views/webgl/NoParameters.js";import{ShaderBuilder as p}from"../views/webgl/ShaderBuilder.js";class f extends u{constructor(o=n.sunny,e=c.sunny.far,r=c.sunny.near){super(),this.exposure=o,this.lodFactors=e,this.lodFactorsFront=r}}const g=new f;class b extends f{constructor(){super(...arguments),this.bloomLod=-1}}function F(){const n=new p,c=n.fragment;return n.include(o),n.include(r),c.include(e),c.uniforms.add(new m("colorTexture",(o=>o.color)),new m("bloomTexture0",(o=>o.bloomTexture0)),new m("bloomTexture1",(o=>o.bloomTexture1)),new m("bloomTexture2",(o=>o.bloomTexture2)),new m("bloomTexture3",(o=>o.bloomTexture3)),new m("bloomTexture4",(o=>o.bloomTexture4)),new t("exposure",(o=>o.exposure)),new d("bloomLod",(o=>o.bloomLod)),new i("depthTexture",(o=>o.mainDepth)),new l("nearFar",(o=>o.camera.nearFar)),new a("lodFactors",(o=>o.lodFactors),5),new a("lodFactorsFront",(o=>o.lodFactorsFront),5)).code.add(s`vec3 simpleExposureTonemap(vec3 hdrColor, float exposure) {
6
6
  vec3 mapped = vec3(1.0) - exp(-hdrColor * exposure);
7
7
  return mapped;
8
8
  }`).main.add(s`vec4 color = texture(colorTexture, uv);
@@ -29,4 +29,4 @@ fragColor += mix(lodFactors[4], lodFactorsFront[4], modifierFactors) * lod4;
29
29
  fragColor = bloomLod == 0 ? lodFactors[0] * lod0 : bloomLod == 1 ? lodFactors[1] * lod1 : bloomLod == 2 ? lodFactors[2] * lod2 : bloomLod == 3 ? lodFactors[3] * lod3 : bloomLod == 4 ? lodFactors[4] * lod4 : fragColor;
30
30
  fragColor = vec4(simpleExposureTonemap(fragColor.rgb, exposure), fragColor.a);
31
31
  fragColor += color;
32
- fragColor = delinearizeGamma(fragColor);`),n}const x=Object.freeze(Object.defineProperty({__proto__:null,BloomCompositionPassParameters:g,build:F,defaultCompositionParameters:f,exposurePresets:p},Symbol.toStringTag,{value:"Module"}));export{x as B,g as a,F as b,f as d,p as e};
32
+ fragColor = delinearizeGamma(fragColor);`),n}const w=Object.freeze(Object.defineProperty({__proto__:null,BloomCompositionPassParameters:b,build:F,defaultCompositionParameters:g},Symbol.toStringTag,{value:"Module"}));export{w as B,b as a,F as b,g as d};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{Float16Array as e}from"@petamoriken/float16";import{BufferViewMat3Impl as t}from"./internals/Mat3.js";import{BufferViewMat4Impl as r}from"./internals/Mat4.js";import{BufferViewScalarImpl as s}from"./internals/Scalar.js";import{BufferViewVec2Impl as f}from"./internals/Vec2.js";import{BufferViewVec3Impl as n}from"./internals/Vec3.js";import{BufferViewVec4Impl as i}from"./internals/Vec4.js";class y extends s{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}static fromTypedArray(e,t){return new y(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class c extends f{constructor(t,r=0,s,f){super(e,t,r,s,f),this.elementType="f16"}slice(e,t){return this.sliceBuffer(c,e,t)}static fromTypedArray(e,t){return new c(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f16"}}class u extends f{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}slice(e,t){return this.sliceBuffer(u,e,t)}static fromTypedArray(e,t){return new u(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class a extends n{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}slice(e,t){return this.sliceBuffer(a,e,t)}static fromTypedArray(e,t){return new a(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class l extends i{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}slice(e,t){return this.sliceBuffer(l,e,t)}static fromTypedArray(e,t){return new l(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class p extends t{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}slice(e,t){return this.sliceBuffer(p,e,t)}static fromTypedArray(e,t){return new p(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class b extends t{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(b,e,t)}static fromTypedArray(e,t){return new b(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class h extends r{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}slice(e,t){return this.sliceBuffer(h,e,t)}static fromTypedArray(e,t){return new h(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class o extends r{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(o,e,t)}static fromTypedArray(e,t){return new o(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class m extends s{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(m,e,t)}static fromTypedArray(e,t){return new m(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class T extends f{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(T,e,t)}static fromTypedArray(e,t){return new T(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class d extends n{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(d,e,t)}static fromTypedArray(e,t){return new d(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class O extends i{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(O,e,t)}static fromTypedArray(e,t){return new O(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class A extends s{constructor(e,t=0,r,s){super(Uint8Array,e,t,r,s),this.elementType="u8"}slice(e,t){return this.sliceBuffer(A,e,t)}static fromTypedArray(e,t){return new A(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u8"}}class x extends f{constructor(e,t=0,r,s){super(Uint8Array,e,t,r,s),this.elementType="u8"}slice(e,t){return this.sliceBuffer(x,e,t)}static fromTypedArray(e,t){return new x(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u8"}}class g extends n{constructor(e,t=0,r,s){super(Uint8Array,e,t,r,s),this.elementType="u8"}slice(e,t){return this.sliceBuffer(g,e,t)}static fromTypedArray(e,t){return new g(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u8"}}class w extends i{constructor(e,t=0,r,s){super(Uint8Array,e,t,r,s),this.elementType="u8"}slice(e,t){return this.sliceBuffer(w,e,t)}static fromTypedArray(e,t){return new w(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u8"}}class E extends s{constructor(e,t=0,r,s){super(Uint16Array,e,t,r,s),this.elementType="u16"}slice(e,t){return this.sliceBuffer(E,e,t)}static fromTypedArray(e,t){return new E(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u16"}}class L extends f{constructor(e,t=0,r,s){super(Uint16Array,e,t,r,s),this.elementType="u16"}slice(e,t){return this.sliceBuffer(L,e,t)}static fromTypedArray(e,t){return new L(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u16"}}class B extends n{constructor(e,t=0,r,s){super(Uint16Array,e,t,r,s),this.elementType="u16"}slice(e,t){return this.sliceBuffer(B,e,t)}static fromTypedArray(e,t){return new B(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u16"}}class F extends i{constructor(e,t=0,r,s){super(Uint16Array,e,t,r,s),this.elementType="u16"}slice(e,t){return this.sliceBuffer(F,e,t)}static fromTypedArray(e,t){return new F(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u16"}}class I extends s{constructor(e,t=0,r,s){super(Uint32Array,e,t,r,s),this.elementType="u32"}slice(e,t){return this.sliceBuffer(I,e,t)}static fromTypedArray(e,t){return new I(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u32"}}class U extends f{constructor(e,t=0,r,s){super(Uint32Array,e,t,r,s),this.elementType="u32"}slice(e,t){return this.sliceBuffer(U,e,t)}static fromTypedArray(e,t){return new U(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u32"}}class j extends n{constructor(e,t=0,r,s){super(Uint32Array,e,t,r,s),this.elementType="u32"}slice(e,t){return this.sliceBuffer(j,e,t)}static fromTypedArray(e,t){return new j(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u32"}}class V extends i{constructor(e,t=0,r,s){super(Uint32Array,e,t,r,s),this.elementType="u32"}slice(e,t){return this.sliceBuffer(V,e,t)}static fromTypedArray(e,t){return new V(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u32"}}class M extends s{constructor(e,t=0,r,s){super(Int8Array,e,t,r,s),this.elementType="i8"}slice(e,t){return this.sliceBuffer(M,e,t)}static fromTypedArray(e,t){return new M(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i8"}}class k extends f{constructor(e,t=0,r,s){super(Int8Array,e,t,r,s),this.elementType="i8"}slice(e,t){return this.sliceBuffer(k,e,t)}static fromTypedArray(e,t){return new k(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i8"}}class S extends n{constructor(e,t=0,r,s){super(Int8Array,e,t,r,s),this.elementType="i8"}slice(e,t){return this.sliceBuffer(S,e,t)}static fromTypedArray(e,t){return new S(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i8"}}class q extends i{constructor(e,t=0,r,s){super(Int8Array,e,t,r,s),this.elementType="i8"}slice(e,t){return this.sliceBuffer(q,e,t)}static fromTypedArray(e,t){return new q(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i8"}}class v extends s{constructor(e,t=0,r,s){super(Int16Array,e,t,r,s),this.elementType="i16"}slice(e,t){return this.sliceBuffer(v,e,t)}static fromTypedArray(e,t){return new v(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i16"}}class z extends f{constructor(e,t=0,r,s){super(Int16Array,e,t,r,s),this.elementType="i16"}slice(e,t){return this.sliceBuffer(z,e,t)}static fromTypedArray(e,t){return new z(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i16"}}class C extends n{constructor(e,t=0,r,s){super(Int16Array,e,t,r,s),this.elementType="i16"}slice(e,t){return this.sliceBuffer(C,e,t)}static fromTypedArray(e,t){return new C(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i16"}}class D extends i{constructor(e,t=0,r,s){super(Int16Array,e,t,r,s),this.elementType="i16"}slice(e,t){return this.sliceBuffer(D,e,t)}static fromTypedArray(e,t){return new D(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i16"}}class G extends s{constructor(e,t=0,r,s){super(Int32Array,e,t,r,s),this.elementType="i32"}slice(e,t){return this.sliceBuffer(G,e,t)}static fromTypedArray(e,t){return new G(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i32"}}class H extends f{constructor(e,t=0,r,s){super(Int32Array,e,t,r,s),this.elementType="i32"}slice(e,t){return this.sliceBuffer(H,e,t)}static fromTypedArray(e,t){return new H(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i32"}}class J extends n{constructor(e,t=0,r,s){super(Int32Array,e,t,r,s),this.elementType="i32"}slice(e,t){return this.sliceBuffer(J,e,t)}static fromTypedArray(e,t){return new J(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i32"}}class K extends i{constructor(e,t=0,r,s){super(Int32Array,e,t,r,s),this.elementType="i32"}slice(e,t){return this.sliceBuffer(K,e,t)}static fromTypedArray(e,t){return new K(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i32"}}export{y as BufferViewFloat,m as BufferViewFloat64,v as BufferViewInt16,G as BufferViewInt32,M as BufferViewInt8,p as BufferViewMat3f,b as BufferViewMat3f64,h as BufferViewMat4f,o as BufferViewMat4f64,E as BufferViewUint16,I as BufferViewUint32,A as BufferViewUint8,u as BufferViewVec2f,c as BufferViewVec2f16,T as BufferViewVec2f64,z as BufferViewVec2i16,H as BufferViewVec2i32,k as BufferViewVec2i8,L as BufferViewVec2u16,U as BufferViewVec2u32,x as BufferViewVec2u8,a as BufferViewVec3f,d as BufferViewVec3f64,C as BufferViewVec3i16,J as BufferViewVec3i32,S as BufferViewVec3i8,B as BufferViewVec3u16,j as BufferViewVec3u32,g as BufferViewVec3u8,l as BufferViewVec4f,O as BufferViewVec4f64,D as BufferViewVec4i16,K as BufferViewVec4i32,q as BufferViewVec4i8,F as BufferViewVec4u16,V as BufferViewVec4u32,w as BufferViewVec4u8};
5
+ import{Float16Array as e}from"@petamoriken/float16";import{BufferViewMat3Impl as t}from"./internals/Mat3.js";import{BufferViewMat4Impl as r}from"./internals/Mat4.js";import{BufferViewScalarImpl as s}from"./internals/Scalar.js";import{BufferViewVec2Impl as f}from"./internals/Vec2.js";import{BufferViewVec3Impl as n}from"./internals/Vec3.js";import{BufferViewVec4Impl as i}from"./internals/Vec4.js";class y extends s{constructor(t,r=0,s,f){super(e,t,r,s,f),this.elementType="f16"}static fromTypedArray(e,t){return new y(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f16"}}class c extends s{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}static fromTypedArray(e,t){return new c(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class u extends f{constructor(t,r=0,s,f){super(e,t,r,s,f),this.elementType="f16"}slice(e,t){return this.sliceBuffer(u,e,t)}static fromTypedArray(e,t){return new u(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f16"}}class a extends f{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}slice(e,t){return this.sliceBuffer(a,e,t)}static fromTypedArray(e,t){return new a(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class l extends n{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}slice(e,t){return this.sliceBuffer(l,e,t)}static fromTypedArray(e,t){return new l(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class p extends i{constructor(t,r=0,s,f){super(e,t,r,s,f),this.elementType="f16"}slice(e,t){return this.sliceBuffer(p,e,t)}static fromTypedArray(e,t){return new p(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f16"}}class b extends i{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}slice(e,t){return this.sliceBuffer(b,e,t)}static fromTypedArray(e,t){return new b(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class h extends t{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}slice(e,t){return this.sliceBuffer(h,e,t)}static fromTypedArray(e,t){return new h(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class o extends t{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(o,e,t)}static fromTypedArray(e,t){return new o(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class m extends r{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}slice(e,t){return this.sliceBuffer(m,e,t)}static fromTypedArray(e,t){return new m(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class T extends r{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(T,e,t)}static fromTypedArray(e,t){return new T(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class d extends s{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(d,e,t)}static fromTypedArray(e,t){return new d(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class O extends f{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(O,e,t)}static fromTypedArray(e,t){return new O(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class A extends n{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(A,e,t)}static fromTypedArray(e,t){return new A(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class x extends i{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(x,e,t)}static fromTypedArray(e,t){return new x(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class g extends s{constructor(e,t=0,r,s){super(Uint8Array,e,t,r,s),this.elementType="u8"}slice(e,t){return this.sliceBuffer(g,e,t)}static fromTypedArray(e,t){return new g(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u8"}}class w extends f{constructor(e,t=0,r,s){super(Uint8Array,e,t,r,s),this.elementType="u8"}slice(e,t){return this.sliceBuffer(w,e,t)}static fromTypedArray(e,t){return new w(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u8"}}class E extends n{constructor(e,t=0,r,s){super(Uint8Array,e,t,r,s),this.elementType="u8"}slice(e,t){return this.sliceBuffer(E,e,t)}static fromTypedArray(e,t){return new E(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u8"}}class L extends i{constructor(e,t=0,r,s){super(Uint8Array,e,t,r,s),this.elementType="u8"}slice(e,t){return this.sliceBuffer(L,e,t)}static fromTypedArray(e,t){return new L(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u8"}}class B extends s{constructor(e,t=0,r,s){super(Uint16Array,e,t,r,s),this.elementType="u16"}slice(e,t){return this.sliceBuffer(B,e,t)}static fromTypedArray(e,t){return new B(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u16"}}class F extends f{constructor(e,t=0,r,s){super(Uint16Array,e,t,r,s),this.elementType="u16"}slice(e,t){return this.sliceBuffer(F,e,t)}static fromTypedArray(e,t){return new F(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u16"}}class I extends n{constructor(e,t=0,r,s){super(Uint16Array,e,t,r,s),this.elementType="u16"}slice(e,t){return this.sliceBuffer(I,e,t)}static fromTypedArray(e,t){return new I(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u16"}}class U extends i{constructor(e,t=0,r,s){super(Uint16Array,e,t,r,s),this.elementType="u16"}slice(e,t){return this.sliceBuffer(U,e,t)}static fromTypedArray(e,t){return new U(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u16"}}class j extends s{constructor(e,t=0,r,s){super(Uint32Array,e,t,r,s),this.elementType="u32"}slice(e,t){return this.sliceBuffer(j,e,t)}static fromTypedArray(e,t){return new j(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u32"}}class V extends f{constructor(e,t=0,r,s){super(Uint32Array,e,t,r,s),this.elementType="u32"}slice(e,t){return this.sliceBuffer(V,e,t)}static fromTypedArray(e,t){return new V(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u32"}}class M extends n{constructor(e,t=0,r,s){super(Uint32Array,e,t,r,s),this.elementType="u32"}slice(e,t){return this.sliceBuffer(M,e,t)}static fromTypedArray(e,t){return new M(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u32"}}class k extends i{constructor(e,t=0,r,s){super(Uint32Array,e,t,r,s),this.elementType="u32"}slice(e,t){return this.sliceBuffer(k,e,t)}static fromTypedArray(e,t){return new k(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u32"}}class S extends s{constructor(e,t=0,r,s){super(Int8Array,e,t,r,s),this.elementType="i8"}slice(e,t){return this.sliceBuffer(S,e,t)}static fromTypedArray(e,t){return new S(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i8"}}class q extends f{constructor(e,t=0,r,s){super(Int8Array,e,t,r,s),this.elementType="i8"}slice(e,t){return this.sliceBuffer(q,e,t)}static fromTypedArray(e,t){return new q(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i8"}}class v extends n{constructor(e,t=0,r,s){super(Int8Array,e,t,r,s),this.elementType="i8"}slice(e,t){return this.sliceBuffer(v,e,t)}static fromTypedArray(e,t){return new v(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i8"}}class z extends i{constructor(e,t=0,r,s){super(Int8Array,e,t,r,s),this.elementType="i8"}slice(e,t){return this.sliceBuffer(z,e,t)}static fromTypedArray(e,t){return new z(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i8"}}class C extends s{constructor(e,t=0,r,s){super(Int16Array,e,t,r,s),this.elementType="i16"}slice(e,t){return this.sliceBuffer(C,e,t)}static fromTypedArray(e,t){return new C(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i16"}}class D extends f{constructor(e,t=0,r,s){super(Int16Array,e,t,r,s),this.elementType="i16"}slice(e,t){return this.sliceBuffer(D,e,t)}static fromTypedArray(e,t){return new D(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i16"}}class G extends n{constructor(e,t=0,r,s){super(Int16Array,e,t,r,s),this.elementType="i16"}slice(e,t){return this.sliceBuffer(G,e,t)}static fromTypedArray(e,t){return new G(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i16"}}class H extends i{constructor(e,t=0,r,s){super(Int16Array,e,t,r,s),this.elementType="i16"}slice(e,t){return this.sliceBuffer(H,e,t)}static fromTypedArray(e,t){return new H(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i16"}}class J extends s{constructor(e,t=0,r,s){super(Int32Array,e,t,r,s),this.elementType="i32"}slice(e,t){return this.sliceBuffer(J,e,t)}static fromTypedArray(e,t){return new J(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i32"}}class K extends f{constructor(e,t=0,r,s){super(Int32Array,e,t,r,s),this.elementType="i32"}slice(e,t){return this.sliceBuffer(K,e,t)}static fromTypedArray(e,t){return new K(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i32"}}class N extends n{constructor(e,t=0,r,s){super(Int32Array,e,t,r,s),this.elementType="i32"}slice(e,t){return this.sliceBuffer(N,e,t)}static fromTypedArray(e,t){return new N(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i32"}}class P extends i{constructor(e,t=0,r,s){super(Int32Array,e,t,r,s),this.elementType="i32"}slice(e,t){return this.sliceBuffer(P,e,t)}static fromTypedArray(e,t){return new P(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i32"}}export{c as BufferViewFloat,y as BufferViewFloat16,d as BufferViewFloat64,C as BufferViewInt16,J as BufferViewInt32,S as BufferViewInt8,h as BufferViewMat3f,o as BufferViewMat3f64,m as BufferViewMat4f,T as BufferViewMat4f64,B as BufferViewUint16,j as BufferViewUint32,g as BufferViewUint8,a as BufferViewVec2f,u as BufferViewVec2f16,O as BufferViewVec2f64,D as BufferViewVec2i16,K as BufferViewVec2i32,q as BufferViewVec2i8,F as BufferViewVec2u16,V as BufferViewVec2u32,w as BufferViewVec2u8,l as BufferViewVec3f,A as BufferViewVec3f64,G as BufferViewVec3i16,N as BufferViewVec3i32,v as BufferViewVec3i8,I as BufferViewVec3u16,M as BufferViewVec3u32,E as BufferViewVec3u8,b as BufferViewVec4f,p as BufferViewVec4f16,x as BufferViewVec4f64,H as BufferViewVec4i16,P as BufferViewVec4i32,z as BufferViewVec4i8,U as BufferViewVec4u16,k as BufferViewVec4u32,L as BufferViewVec4u8};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "4.33.0-next.20250320",
3
+ "version": "4.33.0-next.20250321",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- const b="20250320",e="03eb049d7ffb642209be27a0cb5e4d8f9a34846c";export{b as buildDate,e as commitHash};
5
+ const d="20250321",a="c5aa68b1e291f690906b6d33498ad8f1f9dd9dc3";export{d as buildDate,a as commitHash};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as i}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{lerp as e}from"../../../../core/mathUtils.js";import s from"../../../../core/PooledArray.js";import{property as r}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as a}from"../../../../core/accessorSupport/decorators/subclass.js";import{transpose as o}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{t as l,j as h,h as p,i as u,c as d}from"../../../../chunks/vec32.js";import{ZEROS as f,create as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{s as m,t as b,b as g}from"../../../../chunks/vec42.js";import{create as v}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{UpdatingHandles as y}from"../../../../core/support/UpdatingHandles.js";import{getReferenceEllipsoid as G}from"../../../../geometry/ellipsoidUtils.js";import{create as w,empty as S,offset as D,width as N,height as B,expand as I,intersects as j}from"../../../../geometry/support/aaBoundingRect.js";import{d as T,a as C,e as P}from"../../../../chunks/boundedPlane.js";import{create as V}from"../../../../geometry/support/ray.js";import{a as A,h as x,j as O,c as M}from"../../../../chunks/sphere.js";import{drawAccelerationStruct as E,prepare as z,drawPoly as F}from"./deconflictorDebug.js";import{VisibilityGroup as L,VisibilityFlag as X}from"./enums.js";import R from"../../webgl/RenderCamera.js";import{newIntersector as Y}from"../../webgl-engine/lib/Intersector.js";import{StoreResults as H}from"../../webgl-engine/lib/IntersectorInterfaces.js";import{applyPrecomputedScaleFactor as W}from"../../webgl-engine/lib/screenSizePerspectiveUtils.js";import{VertexAttribute as U}from"../../webgl-engine/lib/VertexAttribute.js";import{HUDMaterial as k}from"../../webgl-engine/materials/HUDMaterial.js";import{ScaleInfo as q}from"../../webgl-engine/materials/ScaleInfo.js";const J=_(),K=_(),Q=v(),Z=v(),$=_(),ii=c(),ti=M(),ei=V(),si=_(),ri=w();class ai{constructor(){this.aabr=w(),this.distance=0,this.distanceToTerrain=0,this.culled=!1,this.visible=!1}}class oi{constructor(i,t){this.graphics3DGraphic=i,this.slicePlaneEnabled=t,this.info={}}}var ci;!function(i){i[i.Idle=0]="Idle",i[i.Process=1]="Process",i[i.Sort=2]="Sort",i[i.Deconflict=3]="Deconflict",i[i.NumStates=4]="NumStates"}(ci||(ci={}));class ni{constructor(){this.camera=new R,this.slicePlane=T(),this.slicePlaneEnabled=!1}copyFrom(i){this.camera.copyFrom(i.camera),C(i.slicePlane,this.slicePlane),this.slicePlaneEnabled=i.slicePlaneEnabled}}let li=class extends t{get dirty(){return this._dirty}get state(){return this._state}constructor(i){super(i),this._dirty=!1,this._viewState=new ni,this._state=ci.Idle,this._active=new Map,this._visible=new Map,this._iterators=new fi,this._accBinsNumX=15,this._accBinsNumY=20,this._accBinsSizeX=0,this._accBinsSizeY=0,this._accBins=null,this.accNumTests=0,this._updatingHandles=new y}destroy(){this._updatingHandles.destroy(),this._active.clear(),this._visible.clear(),this._iterators=null}setDirty(){!this._dirty&&this._active.size>0&&(this._dirty=!0,this.notifyChange("updating"))}get updating(){return this._state!==ci.Idle||this._dirty||this._updatingHandles.updating}get updatingProgress(){if(!this.updating)return 1;const i=this._state/ci.NumStates;return this._dirty?.5*i:i}get running(){return this.view.ready&&null!=this.view.state&&this.updating}runTask(i){switch(this._state){case ci.Idle:this._startUpdate(),i.madeProgress();case ci.Process:if(this._state=ci.Process,!this._processActiveGraphics(i))return;case ci.Sort:if(this._state=ci.Sort,!this._sortVisibleGraphics(i))return;case ci.Deconflict:if(this._state=ci.Deconflict,!this._deconflictVisibleGraphics(i))return;default:E(this,this._visible),this._state=ci.Idle,this.notifyChange("updating")}}modifyGraphics(i,t){t?i.forEach((i=>this.addToActiveGraphics(i))):i.forEach((i=>this.removeFromActiveGraphics(i))),this.setDirty()}layerSupportsDeconfliction(i){if(null==i||"object3d"!==i.type)return!1;const t=i.stageObject;if(1!==(t?.geometries.length??0))return!1;const e=t?.geometries[0],s=e?.material;return s instanceof k}_startUpdate(){z(this.view),this._dirty=!1,this._viewState.copyFrom(this.viewState);const{fullWidth:i,fullHeight:t}=this._viewState.camera;this._initBins(i,t),this._resetIterators()}addToActiveGraphics(i){i.info[this.visibilityGroup]=new ai,this._active.set(i.graphics3DGraphic.graphic.uid,i),this.setDirty()}removeFromActiveGraphics(i){this._visible.delete(i.graphics3DGraphic.graphic.uid),hi(i,this.visibilityGroup),delete i.info[this.visibilityGroup],this._active.delete(i.graphics3DGraphic.graphic.uid),this.setDirty()}_createTerrainIntersector(){const i=Y(this.view.state.viewingMode);i.options.store=H.MIN;const t=this.view.basemapTerrain,e=this.view.state.camera;return o(ii,this._viewState.camera.viewInverseTransposeMatrix),s=>{l(K,s,ii),i.reset(e.eye,K,e),t.intersect(i,null,e.eye,K);const r=i.results.ground.dist;return null!=r?r*h(K,e.eye):0}}_processActiveGraphics(i){const t=this._ensureActiveGraphicsIterator(),e=this._viewState.camera.inverseProjectionMatrix,s="global"===this.view.viewingMode&&1===this.view.map.ground.opacity&&this._viewState.camera.relativeElevation>0,r=this.view.map.ground.opacity>0?this._createTerrainIntersector():null,a=s?ti:null;let o=0;for(null!=a&&(l(A(a),f,this._viewState.camera.viewMatrix),a[3]=G(this.view.spatialReference).radius,o=x(a,f));!i.done;){i.madeProgress();const s=t.next();if(!0===s.done)return this._resetActiveGraphicsIterator(),!0;const c=s.value,n=c?.info[this.visibilityGroup];n&&(this._collectGraphics3DGraphics(c,e,a,o,r),n.culled?(this._setGraphicVisibility(c,!1),this._visible.delete(c.graphics3DGraphic.graphic.uid)):this._visible.set(c.graphics3DGraphic.graphic.uid,c))}return!1}_sortVisibleGraphics(i){const t=this._ensureSortGraphicsIterator();for(;!i.done;){const e=t.next();if(i.madeProgress(),!0===e.done)return this._resetSortGraphicsIterator(),!0}return!1}_deconflictVisibleGraphics(i){const t=this._ensureVisibleGraphicsIterator(),e=this.visibilityGroup===L.LABEL;for(;!i.done;){i.madeProgress();const s=t.next();if(!0===s.done)return this._resetVisibleGraphicsIterator(),!0;const r=s.value,a=r.info[this.visibilityGroup];if(!a||a.culled){this._setGraphicVisibility(r,!1);continue}const o=r.graphics3DGraphic,c=!e||o.isVisible();a.visible=c&&!this._isConflicted(r),a.visible&&this._addToBins(r),this._setGraphicVisibility(r,a.visible),F(a,a.visible)}return!1}_resetIterators(){this._iterators.active=null,this._iterators.visible=null,this._iterators.sort=null}_ensureActiveGraphicsIterator(){return this._iterators.active||(this._iterators.active=pi(this._active)),this._iterators.active}_resetActiveGraphicsIterator(){this._iterators.active=null}_ensureVisibleGraphicsIterator(){return this._iterators.visible||(this._iterators.visible=pi(this._visible)),this._iterators.visible}_resetVisibleGraphicsIterator(){this._iterators.visible=null}_ensureSortGraphicsIterator(){return this._iterators.sort||(this._iterators.sort=ui(this._visible,this._iterators.sortArray,this.visibilityGroup)),this._iterators.sort}_resetSortGraphicsIterator(){this._iterators.sort=null}_collectGraphics3DGraphics(i,t,e,s,r){const a=i.graphics3DGraphic;if(a.destroyed)return;const o=i.info[this.visibilityGroup];if(!a.isVisible(L.GRAPHIC,X.DECONFLICTION))return void(o.culled=!0);const c=this.getGraphicsLayers(a);S(o.aabr);let n=null;for(const l of c){if(!this.layerSupportsDeconfliction(l))continue;const a=l.stageObject.geometries[0].material;if(null==n){if(n=gi,this._getProjectionInfo(l,t,n),n.isOutsideScreen||this._isCulledBySlice(i,J)||null!=e&&bi(n,e,s))return void(o.culled=!0);n.distanceToTerrain=r?.(n.positionView)??0}this._expandBoundingRect(o,l,a,n)}null==n?o.culled=!0:(o.distance=n.distance,o.distanceToTerrain=n.distanceToTerrain,o.culled=!1)}_getProjectionInfo(i,t,e){const s=this._viewState.camera,r=i.stageObject,a=r.geometries[0],o=a.material,c=A(r.boundingVolumeWorldSpace.bounds);l(J,c,s.viewMatrix);const n=a.attributes,h=n.get(U.NORMAL).data,d=n.get(U.CENTEROFFSETANDDISTANCE).data;o.applyShaderOffsetsView(J,h,r.transformation,d,s,e.scaleInfo,J),m(Q,J[0],J[1],J[2],1),b(Z,Q,s.projectionMatrix),p(e.positionNDC,Z,1/Z[3]),o.applyShaderOffsetsNDC(e.positionNDC,d,s,e.positionNDC,$),e.distanceWithoutPolygonOffset=s.depthNDCToWorld($[2]),e.distance=$[2]===e.positionNDC[2]?e.distanceWithoutPolygonOffset:s.depthNDCToWorld(e.positionNDC[2]),m(Z,e.positionNDC[0],e.positionNDC[1],e.positionNDC[2],1),b(Q,Z,t),g(Q,Q,1/Q[3]),u(e.positionView,J[0],J[1],J[2])}_isCulledBySlice(i,t){return i.slicePlaneEnabled&&this._viewState.slicePlaneEnabled&&P(this._viewState.slicePlane,t)}_expandBoundingRect(i,t,s,{positionNDC:r,scaleInfo:a}){const o=this._viewState.camera,c=t.getScreenSize(_i);W(c,a.factor,c),c[0]*=o.pixelRatio,c[1]*=o.pixelRatio;const n=D(s.calculateRelativeScreenBounds(c,a.factorAlignment.scale,ri),e(0,o.fullWidth,.5+.5*r[0]),e(0,o.fullHeight,.5+.5*r[1])),l=this.marginFactor;if(0!==l){const i=l*Math.min(N(n),B(n));n[0]-=i,n[1]-=i,n[2]+=i,n[3]+=i}I(i.aabr,n,i.aabr)}_isConflicted(i){const t=i.graphics3DGraphic.graphic.uid,e=i.info[this.visibilityGroup];let s=!0;for(let r=Math.floor(e.aabr[0]/this._accBinsSizeX);r<=Math.floor(e.aabr[2]/this._accBinsSizeX);r++)if(!(r<0||r>=this._accBinsNumX))for(let i=Math.floor(e.aabr[1]/this._accBinsSizeY);i<=Math.floor(e.aabr[3]/this._accBinsSizeY);i++){if(i<0||i>=this._accBinsNumY)continue;s=!1;const a=this._accBins[r][i];for(let i=0;i<a.length;i++){const s=a.data[i],r=s.info[this.visibilityGroup];if(r&&r.visible&&s.graphics3DGraphic.graphic.uid!==t&&(this.accNumTests++,j(r.aabr,e.aabr)))return!0}}return s}_initBins(i,t){if(null==this._accBins){this._accBins=[];for(let i=0;i<this._accBinsNumX;i++){this._accBins.push([]);const i=this._accBins[this._accBins.length-1];for(let t=0;t<this._accBinsNumY;t++)i.push(new s)}}else for(let e=0;e<this._accBinsNumX;e++)for(let i=0;i<this._accBinsNumY;i++)this._accBins[e][i].clear();this._accBinsSizeX=i/this._accBinsNumX,this._accBinsSizeY=t/this._accBinsNumY,this.accNumTests=0}_addToBins(i){const t=i.info[this.visibilityGroup],e=Math.floor(t.aabr[0]/this._accBinsSizeX),s=Math.floor(t.aabr[2]/this._accBinsSizeX),r=Math.floor(t.aabr[1]/this._accBinsSizeY),a=Math.floor(t.aabr[3]/this._accBinsSizeY);for(let o=e;o<=s;o++)if(!(o<0||o>=this._accBinsNumX))for(let t=r;t<=a;t++)t<0||t>=this._accBinsNumY||this._accBins[o][t].push(i)}_setGraphicVisibility(i,t){const e=i.graphics3DGraphic;e.destroyed||(e.setVisibilityFlag(this.visibilityGroup,X.DECONFLICTION,t),this.visibilityGroup===L.LABEL&&this.view.labeler.setLabelGraphicVisibility(e,t))}};function hi(i,t){const e=i.graphics3DGraphic;e.destroyed||e.setVisibilityFlag(t,X.DECONFLICTION,!0)}function*pi(i){if(Map.prototype.entries){const t=i.entries();for(let i=t.next();!i.done;i=t.next())yield i.value[1]}else yield*i.values()}function*ui(i,t,e){t.clear(),i.forEach(((i,s)=>{const r=t.pushNew();r.id=s,r.visible=i.graphics3DGraphic.getVisibilityFlag(e,X.DECONFLICTION);const a=i.info?.[e];r.prio=i.graphics3DGraphic.deconflictionPriority,r.distance=a?a.distance:Number.MAX_VALUE,r.behindTerrain=!!a&&0!==a.distanceToTerrain&&a.distance>a.distanceToTerrain})),yield;const s=t.iterableSort(((i,t)=>i.behindTerrain!==t.behindTerrain?+i.behindTerrain-+t.behindTerrain:i.prio!==t.prio?t.prio-i.prio:i.distance!==t.distance?i.distance-t.distance:i.visible!==t.visible?+t.visible-+i.visible:i.id-t.id));for(let r=s.next();!r.done;r=s.next())yield;t.forAll((t=>{const e=i.get(t.id);e&&(i.delete(t.id),i.set(t.id,e))})),t.clear()}i([r({constructOnly:!0})],li.prototype,"view",void 0),i([r({type:Boolean,readOnly:!0})],li.prototype,"updating",null),i([r({readOnly:!0})],li.prototype,"_updatingHandles",void 0),li=i([a("esri.views.3d.layers.graphics.Deconflictor")],li);class di{constructor(){this.id=0,this.visible=!1,this.behindTerrain=!1,this.prio=0,this.distance=0}}class fi{constructor(i=null,t=null,e=null){this.active=i,this.visible=t,this.sort=e,this.sortArray=new s({allocator:i=>i||new di})}}const _i=n();class mi{constructor(){this.positionView=_(),this.positionNDC=_(),this.distance=0,this.distanceToTerrain=0,this.distanceWithoutPolygonOffset=0,this.scaleInfo=new q}get isOutsideScreen(){const i=this.positionNDC;return i[0]<-1||i[1]<-1||i[2]<-1||i[0]>=1||i[1]>=1||i[2]>=1}}function bi(i,t,e){return d(ei.direction,i.positionView),u(ei.origin,0,0,0),!!O(t,ei,si)&&i.distanceWithoutPolygonOffset>e}const gi=new mi;export{li as Deconflictor,oi as DeconflictorGraphic,ni as DeconflictorViewState,ci as State};
5
+ import{_ as i}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{lerp as s}from"../../../../core/mathUtils.js";import e from"../../../../core/PooledArray.js";import{property as r}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as a}from"../../../../core/accessorSupport/decorators/subclass.js";import{transpose as o}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{t as l,j as h,h as p,i as u,c as d}from"../../../../chunks/vec32.js";import{ZEROS as _,create as f}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{s as m,t as b,b as g}from"../../../../chunks/vec42.js";import{create as v}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{UpdatingHandles as y}from"../../../../core/support/UpdatingHandles.js";import{getReferenceEllipsoid as G}from"../../../../geometry/ellipsoidUtils.js";import{create as w,empty as S,offset as B,width as N,height as D,expand as I,intersects as T}from"../../../../geometry/support/aaBoundingRect.js";import{d as j,a as C,e as P}from"../../../../chunks/boundedPlane.js";import{create as V}from"../../../../geometry/support/ray.js";import{a as A,h as x,j as O,c as M}from"../../../../chunks/sphere.js";import{drawAccelerationStruct as E,prepare as z,drawPoly as X}from"./deconflictorDebug.js";import{VisibilityGroup as Y,VisibilityFlag as F}from"./enums.js";import L from"../../webgl/RenderCamera.js";import{newIntersector as R}from"../../webgl-engine/lib/Intersector.js";import{StoreResults as H}from"../../webgl-engine/lib/IntersectorInterfaces.js";import{applyPrecomputedScaleFactor as W}from"../../webgl-engine/lib/screenSizePerspectiveUtils.js";import{VertexAttribute as U}from"../../webgl-engine/lib/VertexAttribute.js";import{HUDMaterial as k}from"../../webgl-engine/materials/HUDMaterial.js";import{ScaleInfo as q}from"../../webgl-engine/materials/ScaleInfo.js";const J=f(),K=f(),Q=v(),Z=v(),$=f(),ii=c(),ti=M(),si=V(),ei=f(),ri=w();class ai{constructor(){this.aabr=w(),this.distance=0,this.distanceToTerrain=0,this.culled=!1,this.visible=!1}}class oi{constructor(i,t){this.graphics3DGraphic=i,this.slicePlaneEnabled=t,this.info={}}}var ci;!function(i){i[i.Idle=0]="Idle",i[i.Process=1]="Process",i[i.Sort=2]="Sort",i[i.Deconflict=3]="Deconflict",i[i.NumStates=4]="NumStates"}(ci||(ci={}));class ni{constructor(){this.camera=new L,this.slicePlane=j(),this.slicePlaneEnabled=!1}copyFrom(i){this.camera.copyFrom(i.camera),C(i.slicePlane,this.slicePlane),this.slicePlaneEnabled=i.slicePlaneEnabled}}let li=class extends t{get dirty(){return this._dirty}get state(){return this._state}constructor(i){super(i),this._dirty=!1,this._viewState=new ni,this._state=ci.Idle,this._active=new Map,this._visible=new Map,this._iterators=new _i,this._accBinsNumX=15,this._accBinsNumY=20,this._accBinsSizeX=0,this._accBinsSizeY=0,this._accBins=null,this._accNumTests=0,this._updatingHandles=new y}destroy(){this._updatingHandles.destroy(),this._active.clear(),this._visible.clear(),this._iterators=null}setDirty(){!this._dirty&&this._active.size>0&&(this._dirty=!0,this.notifyChange("updating"))}get updating(){return this._state!==ci.Idle||this._dirty||this._updatingHandles.updating}get updatingProgress(){if(!this.updating)return 1;const i=this._state/ci.NumStates;return this._dirty?.5*i:i}get running(){return this.view.ready&&null!=this.view.state&&this.updating}runTask(i){switch(this._state){case ci.Idle:this._startUpdate(),i.madeProgress();case ci.Process:if(this._state=ci.Process,!this._processActiveGraphics(i))return;case ci.Sort:if(this._state=ci.Sort,!this._sortVisibleGraphics(i))return;case ci.Deconflict:if(this._state=ci.Deconflict,!this._deconflictVisibleGraphics(i))return;default:E((()=>({bins:this._accBins,numX:this._accBinsNumX,numY:this._accBinsNumY,sizeX:this._accBinsSizeX,sizeY:this._accBinsSizeY,numTests:this._accNumTests,numVisible:this._visible.size}))),this._state=ci.Idle,this.notifyChange("updating")}}modifyGraphics(i,t){t?i.forEach((i=>this.addToActiveGraphics(i))):i.forEach((i=>this.removeFromActiveGraphics(i))),this.setDirty()}layerSupportsDeconfliction(i){if(null==i||"object3d"!==i.type)return!1;const t=i.stageObject;if(1!==(t?.geometries.length??0))return!1;const s=t?.geometries[0],e=s?.material;return e instanceof k}_startUpdate(){z(this.view),this._dirty=!1,this._viewState.copyFrom(this.viewState);const{fullWidth:i,fullHeight:t}=this._viewState.camera;this._initBins(i,t),this._resetIterators()}addToActiveGraphics(i){i.info[this.visibilityGroup]=new ai,this._active.set(i.graphics3DGraphic.graphic.uid,i),this.setDirty()}removeFromActiveGraphics(i){this._visible.delete(i.graphics3DGraphic.graphic.uid),hi(i,this.visibilityGroup),delete i.info[this.visibilityGroup],this._active.delete(i.graphics3DGraphic.graphic.uid),this.setDirty()}_createTerrainIntersector(){const i=R(this.view.state.viewingMode);i.options.store=H.MIN;const t=this.view.basemapTerrain,s=this.view.state.camera;return o(ii,this._viewState.camera.viewInverseTransposeMatrix),e=>{l(K,e,ii),i.reset(s.eye,K,s),t.intersect(i,null,s.eye,K);const r=i.results.ground.dist;return null!=r?r*h(K,s.eye):0}}_processActiveGraphics(i){const t=this._ensureActiveGraphicsIterator(),s=this._viewState.camera.inverseProjectionMatrix,e="global"===this.view.viewingMode&&1===this.view.map.ground.opacity&&this._viewState.camera.relativeElevation>0,r=this.view.map.ground.opacity>0?this._createTerrainIntersector():null,a=e?ti:null;let o=0;for(null!=a&&(l(A(a),_,this._viewState.camera.viewMatrix),a[3]=G(this.view.spatialReference).radius,o=x(a,_));!i.done;){i.madeProgress();const e=t.next();if(!0===e.done)return this._resetActiveGraphicsIterator(),!0;const c=e.value,n=c?.info[this.visibilityGroup];n&&(this._collectGraphics3DGraphics(c,s,a,o,r),n.culled?(this._setGraphicVisibility(c,!1),this._visible.delete(c.graphics3DGraphic.graphic.uid)):this._visible.set(c.graphics3DGraphic.graphic.uid,c))}return!1}_sortVisibleGraphics(i){const t=this._ensureSortGraphicsIterator();for(;!i.done;){const s=t.next();if(i.madeProgress(),!0===s.done)return this._resetSortGraphicsIterator(),!0}return!1}_deconflictVisibleGraphics(i){const t=this._ensureVisibleGraphicsIterator(),s=this.visibilityGroup===Y.LABEL;for(;!i.done;){i.madeProgress();const e=t.next();if(!0===e.done)return this._resetVisibleGraphicsIterator(),!0;const r=e.value,a=r.info[this.visibilityGroup];if(!a||a.culled){this._setGraphicVisibility(r,!1);continue}const o=r.graphics3DGraphic,c=!s||o.isVisible();a.visible=c&&!this._isConflicted(r),a.visible&&this._addToBins(r),this._setGraphicVisibility(r,a.visible),X(a,a.visible)}return!1}_resetIterators(){this._iterators.active=null,this._iterators.visible=null,this._iterators.sort=null}_ensureActiveGraphicsIterator(){return this._iterators.active||(this._iterators.active=pi(this._active)),this._iterators.active}_resetActiveGraphicsIterator(){this._iterators.active=null}_ensureVisibleGraphicsIterator(){return this._iterators.visible||(this._iterators.visible=pi(this._visible)),this._iterators.visible}_resetVisibleGraphicsIterator(){this._iterators.visible=null}_ensureSortGraphicsIterator(){return this._iterators.sort||(this._iterators.sort=ui(this._visible,this._iterators.sortArray,this.visibilityGroup)),this._iterators.sort}_resetSortGraphicsIterator(){this._iterators.sort=null}_collectGraphics3DGraphics(i,t,s,e,r){const a=i.graphics3DGraphic;if(a.destroyed)return;const o=i.info[this.visibilityGroup];if(!a.isVisible(Y.GRAPHIC,F.DECONFLICTION))return void(o.culled=!0);const c=this.getGraphicsLayers(a);S(o.aabr);let n=null;for(const l of c){if(!this.layerSupportsDeconfliction(l))continue;const a=l.stageObject.geometries[0].material;if(null==n){if(n=gi,this._getProjectionInfo(l,t,n),n.isOutsideScreen||this._isCulledBySlice(i,J)||null!=s&&bi(n,s,e))return void(o.culled=!0);n.distanceToTerrain=r?.(n.positionView)??0}this._expandBoundingRect(o,l,a,n)}null==n?o.culled=!0:(o.distance=n.distance,o.distanceToTerrain=n.distanceToTerrain,o.culled=!1)}_getProjectionInfo(i,t,s){const e=this._viewState.camera,r=i.stageObject,a=r.geometries[0],o=a.material,c=A(r.boundingVolumeWorldSpace.bounds);l(J,c,e.viewMatrix);const n=a.attributes,h=n.get(U.NORMAL).data,d=n.get(U.CENTEROFFSETANDDISTANCE).data;o.applyShaderOffsetsView(J,h,r.transformation,d,e,s.scaleInfo,J),m(Q,J[0],J[1],J[2],1),b(Z,Q,e.projectionMatrix),p(s.positionNDC,Z,1/Z[3]),o.applyShaderOffsetsNDC(s.positionNDC,d,e,s.positionNDC,$),s.distanceWithoutPolygonOffset=e.depthNDCToWorld($[2]),s.distance=$[2]===s.positionNDC[2]?s.distanceWithoutPolygonOffset:e.depthNDCToWorld(s.positionNDC[2]),m(Z,s.positionNDC[0],s.positionNDC[1],s.positionNDC[2],1),b(Q,Z,t),g(Q,Q,1/Q[3]),u(s.positionView,J[0],J[1],J[2])}_isCulledBySlice(i,t){return i.slicePlaneEnabled&&this._viewState.slicePlaneEnabled&&P(this._viewState.slicePlane,t)}_expandBoundingRect(i,t,e,{positionNDC:r,scaleInfo:a}){const o=this._viewState.camera,c=t.getScreenSize(fi);W(c,a.factor,c),c[0]*=o.pixelRatio,c[1]*=o.pixelRatio;const n=B(e.calculateRelativeScreenBounds(c,a.factorAlignment.scale,ri),s(0,o.fullWidth,.5+.5*r[0]),s(0,o.fullHeight,.5+.5*r[1])),l=this.marginFactor;if(0!==l){const i=l*Math.min(N(n),D(n));n[0]-=i,n[1]-=i,n[2]+=i,n[3]+=i}I(i.aabr,n,i.aabr)}_isConflicted(i){const t=i.graphics3DGraphic.graphic.uid,s=i.info[this.visibilityGroup];let e=!0;for(let r=Math.floor(s.aabr[0]/this._accBinsSizeX);r<=Math.floor(s.aabr[2]/this._accBinsSizeX);r++)if(!(r<0||r>=this._accBinsNumX))for(let i=Math.floor(s.aabr[1]/this._accBinsSizeY);i<=Math.floor(s.aabr[3]/this._accBinsSizeY);i++){if(i<0||i>=this._accBinsNumY)continue;e=!1;const a=this._accBins[r][i];for(let i=0;i<a.length;i++){const e=a.data[i],r=e.info[this.visibilityGroup];if(r&&r.visible&&e.graphics3DGraphic.graphic.uid!==t&&(this._accNumTests++,T(r.aabr,s.aabr)))return!0}}return e}_initBins(i,t){if(null==this._accBins){this._accBins=[];for(let i=0;i<this._accBinsNumX;i++){this._accBins.push([]);const i=this._accBins[this._accBins.length-1];for(let t=0;t<this._accBinsNumY;t++)i.push(new e)}}else for(let s=0;s<this._accBinsNumX;s++)for(let i=0;i<this._accBinsNumY;i++)this._accBins[s][i].clear();this._accBinsSizeX=i/this._accBinsNumX,this._accBinsSizeY=t/this._accBinsNumY,this._accNumTests=0}_addToBins(i){const t=i.info[this.visibilityGroup],s=Math.floor(t.aabr[0]/this._accBinsSizeX),e=Math.floor(t.aabr[2]/this._accBinsSizeX),r=Math.floor(t.aabr[1]/this._accBinsSizeY),a=Math.floor(t.aabr[3]/this._accBinsSizeY);for(let o=s;o<=e;o++)if(!(o<0||o>=this._accBinsNumX))for(let t=r;t<=a;t++)t<0||t>=this._accBinsNumY||this._accBins[o][t].push(i)}_setGraphicVisibility(i,t){const s=i.graphics3DGraphic;s.destroyed||(s.setVisibilityFlag(this.visibilityGroup,F.DECONFLICTION,t),this.visibilityGroup===Y.LABEL&&this.view.labeler.setLabelGraphicVisibility(s,t))}};function hi(i,t){const s=i.graphics3DGraphic;s.destroyed||s.setVisibilityFlag(t,F.DECONFLICTION,!0)}function*pi(i){if(Map.prototype.entries){const t=i.entries();for(let i=t.next();!i.done;i=t.next())yield i.value[1]}else yield*i.values()}function*ui(i,t,s){t.clear(),i.forEach(((i,e)=>{const r=t.pushNew();r.id=e,r.visible=i.graphics3DGraphic.getVisibilityFlag(s,F.DECONFLICTION);const a=i.info?.[s];r.prio=i.graphics3DGraphic.deconflictionPriority,r.distance=a?a.distance:Number.MAX_VALUE,r.behindTerrain=!!a&&0!==a.distanceToTerrain&&a.distance>a.distanceToTerrain})),yield;const e=t.iterableSort(((i,t)=>i.behindTerrain!==t.behindTerrain?+i.behindTerrain-+t.behindTerrain:i.prio!==t.prio?t.prio-i.prio:i.distance!==t.distance?i.distance-t.distance:i.visible!==t.visible?+t.visible-+i.visible:i.id-t.id));for(let r=e.next();!r.done;r=e.next())yield;t.forAll((t=>{const s=i.get(t.id);s&&(i.delete(t.id),i.set(t.id,s))})),t.clear()}i([r({constructOnly:!0})],li.prototype,"view",void 0),i([r({type:Boolean,readOnly:!0})],li.prototype,"updating",null),i([r({readOnly:!0})],li.prototype,"_updatingHandles",void 0),li=i([a("esri.views.3d.layers.graphics.Deconflictor")],li);class di{constructor(){this.id=0,this.visible=!1,this.behindTerrain=!1,this.prio=0,this.distance=0}}class _i{constructor(i=null,t=null,s=null){this.active=i,this.visible=t,this.sort=s,this.sortArray=new e({allocator:i=>i||new di})}}const fi=n();class mi{constructor(){this.positionView=f(),this.positionNDC=f(),this.distance=0,this.distanceToTerrain=0,this.distanceWithoutPolygonOffset=0,this.scaleInfo=new q}get isOutsideScreen(){const i=this.positionNDC;return i[0]<-1||i[1]<-1||i[2]<-1||i[0]>=1||i[1]>=1||i[2]>=1}}function bi(i,t,s){return d(si.direction,i.positionView),u(si.origin,0,0,0),!!O(t,si,ei)&&i.distanceWithoutPolygonOffset>s}const gi=new mi;export{li as Deconflictor,oi as DeconflictorGraphic,ni as DeconflictorViewState,ci as State};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{debugFlags as t}from"../../support/debugFlags.js";let e,n,i=!1,l=!1,o=!1,s=!1,a=null;function c(t,e){if(!l||!n)return;u();const i=n;let o=0;for(let n=0;n<t.accBinsNumX;n++)for(let e=0;e<t.accBinsNumY;e++){const l=t.accBins[n][t.accBinsNumY-1-e];o+=l.length;const s=n*t.accBinsSizeX,a=(n+1)*t.accBinsSizeX,c=e*t.accBinsSizeY,r=(e+1)*t.accBinsSizeY;i.fillText(l.length.toFixed(),s+5,c+15),h(s,a,c,r,"blue")}i.fillText("total totalShownLabels: "+o,70,40),i.fillText("total visible labels: "+e.size,70,50),i.fillText("total numTests: "+t.accNumTests,70,30)}function r(n){o=t.DECONFLICTOR_SHOW_VISIBLE,s=t.DECONFLICTOR_SHOW_INVISIBLE,i=o||s,l=t.DECONFLICTOR_SHOW_GRID,a=null,i||l?a=()=>p(n):e&&(e.parentElement.removeChild(e),e=null)}function u(){a&&(a(),a=null)}function p(t){null==e&&(e=document.createElement("canvas"),e.setAttribute("id","debugCanvas2d"),t.surface.parentElement.style.position="relative",t.surface.parentElement.appendChild(e));const{state:i}=t,{camera:l,pixelRatio:o}=i,{width:s,height:a}=l,c=s*o,r=a*o;e.setAttribute("width",`${c}px`),e.setAttribute("height",`${r}px`),e.setAttribute("style",`position:absolute;left:0px;top:0px;display:block;pointer-events:none;width:${s}px;height:${a}px`),n=e.getContext("2d"),n.clearRect(0,0,s,a),n.font="12px Arial"}function h(t,i,l,o,s){u();const a=e.height,c=n;c.beginPath(),c.lineWidth=1,c.strokeStyle=s,c.moveTo(t,a-l),c.lineTo(i,a-l),c.stroke(),c.lineTo(i,a-o),c.stroke(),c.lineTo(i,a-l),c.stroke(),c.lineTo(t,a-l),c.stroke(),c.lineTo(t,a-l),c.stroke(),c.closePath()}function f(t,e){i&&(e&&o||!e&&s)&&h(t.aabr[0],t.aabr[2],t.aabr[1],t.aabr[3],e?"green":"red")}export{c as drawAccelerationStruct,f as drawPoly,r as prepare};
5
+ import{debugFlags as e}from"../../support/debugFlags.js";let t,l,n=!1,i=!1,o=!1,s=!1,a=null;function r(e){const t=i?e():null;if(!t?.bins)return;c();const n=l;let o=0;for(let l=0;l<t.numX;l++)for(let e=0;e<t.numY;e++){const i=t.bins[l][t.numY-1-e];o+=i.length;const s=l*t.sizeX,a=(l+1)*t.sizeX,r=e*t.sizeY,u=(e+1)*t.sizeY;n.fillText(i.length.toFixed(),s+5,r+15),b(s,a,r,u,"blue")}n.fillText("total totalShownLabels: "+o,70,40),n.fillText("total visible labels: "+t.numVisible,70,50),n.fillText("total numTests: "+t.numTests,70,30)}function u(r){o=e.DECONFLICTOR_SHOW_VISIBLE,s=e.DECONFLICTOR_SHOW_INVISIBLE,n=o||s,i=e.DECONFLICTOR_SHOW_GRID,a=null,n||i?(l&&t&&l.clearRect(0,0,t.width,t.height),a=()=>h(r)):t&&(t.parentElement.removeChild(t),t=null)}function c(){a&&(a(),a=null)}function h(e){null==t&&(t=document.createElement("canvas"),t.setAttribute("id","debugCanvas2d"),e.surface.parentElement.style.position="relative",e.surface.parentElement.appendChild(t),t.style.position="absolute",t.style.width="100%",t.style.height="100%",t.style.display="block",t.style.pointerEvents="none",l=t.getContext("2d"),l.font="12px Arial");const{width:n,height:i}=e.state.camera;t.width=n,t.height=i}function b(e,n,i,o,s){c();const a=t.height,r=l;r.beginPath(),r.lineWidth=1,r.strokeStyle=s,r.moveTo(e,a-i),r.lineTo(n,a-i),r.stroke(),r.lineTo(n,a-o),r.stroke(),r.lineTo(e,a-o),r.stroke(),r.lineTo(e,a-i),r.stroke(),r.closePath()}function d(e,t){n&&(t&&o||!t&&s)&&b(e.aabr[0],e.aabr[2],e.aabr[1],e.aabr[3],t?"green":"red")}export{r as drawAccelerationStruct,d as drawPoly,u as prepare};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{BufferViewVec2f16 as e,BufferViewVec2f as t,BufferViewVec2f64 as i,BufferViewVec3f as s,BufferViewVec3f64 as r,BufferViewVec4f as n,BufferViewVec4f64 as h,BufferViewMat3f as d,BufferViewMat3f64 as u,BufferViewMat4f as f,BufferViewMat4f64 as o,BufferViewVec4u8 as l,BufferViewFloat as p,BufferViewFloat64 as c,BufferViewUint8 as a,BufferViewUint16 as _,BufferViewInt8 as y,BufferViewVec2i8 as F,BufferViewVec2i16 as m,BufferViewVec2u8 as b,BufferViewVec4u16 as g,BufferViewUint32 as w,BufferViewVec3u8 as v,BufferViewVec2u16 as E,BufferViewVec3u16 as M,BufferViewVec2u32 as T,BufferViewVec3u32 as A,BufferViewVec4u32 as B,BufferViewVec3i8 as U,BufferViewVec4i8 as C,BufferViewInt16 as L,BufferViewVec3i16 as j,BufferViewVec4i16 as x,BufferViewInt32 as z,BufferViewVec2i32 as $,BufferViewVec3i32 as V,BufferViewVec4i32 as k}from"../../../../geometry/support/buffer/BufferView.js";import{elementTypeSize as q}from"../../../../geometry/support/buffer/types.js";import{assert as D}from"../../webgl-engine/lib/Util.js";class G{constructor(e,t){this.layout=e,this.buffer="number"==typeof t?new ArrayBuffer(t*e.stride):t;for(const i of e.fields.keys()){const t=e.fields.get(i);this[i]=new t.constructor(this.buffer,t.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.buffer.byteLength/this.stride}get byteLength(){return this.buffer.byteLength}getField(e,t){const i=this[e];return i&&i.elementCount===t.ElementCount&&i.elementType===t.ElementType?i:null}slice(e,t){return new G(this.layout,this.buffer.slice(e*this.stride,t*this.stride))}copyFrom(e,t=0,i=0,s=e.count){const r=this.stride;if(r%4==0){const n=new Uint32Array(e.buffer,t*r,s*r/4);new Uint32Array(this.buffer,i*r,s*r/4).set(n)}else{const n=new Uint8Array(e.buffer,t*r,s*r);new Uint8Array(this.buffer,i*r,s*r).set(n)}return this}get cachedMemory(){return this.byteLength}dispose(){}}class H{constructor(e){this._stride=0,this._fields=new Map,e&&(this._stride=e.stride,e.fields.forEach((e=>this._fields.set(e[0],{...e[1],constructor:O(e[1].constructor)}))))}freeze(){return this}vec2f16(t,i){return this._appendField(t,e,i),this}vec2f(e,i){return this._appendField(e,t,i),this}vec2f64(e,t){return this._appendField(e,i,t),this}vec3f(e,t){return this._appendField(e,s,t),this}vec3f64(e,t){return this._appendField(e,r,t),this}vec4f(e,t){return this._appendField(e,n,t),this}vec4f64(e,t){return this._appendField(e,h,t),this}mat3f(e,t){return this._appendField(e,d,t),this}mat3f64(e,t){return this._appendField(e,u,t),this}mat4f(e,t){return this._appendField(e,f,t),this}mat4f64(e,t){return this._appendField(e,o,t),this}vec4u8(e,t){return this._appendField(e,l,t),this}f32(e,t){return this._appendField(e,p,t),this}f64(e,t){return this._appendField(e,c,t),this}u8(e,t){return this._appendField(e,a,t),this}u16(e,t){return this._appendField(e,_,t),this}i8(e,t){return this._appendField(e,y,t),this}vec2i8(e,t){return this._appendField(e,F,t),this}vec2i16(e,t){return this._appendField(e,m,t),this}vec2u8(e,t){return this._appendField(e,b,t),this}vec4u16(e,t){return this._appendField(e,g,t),this}u32(e,t){return this._appendField(e,w,t),this}_appendField(e,t,i){if(this._fields.has(e))return void D(!1,`${e} already added to vertex buffer layout`);const s=t.ElementCount*q(t.ElementType),r=this._stride;this._fields.set(e,{constructor:t,size:s,offset:r,optional:i}),this._alignFields()}_alignFields(){let e=0,t=1;this._fields.forEach((i=>{const s=q(i.constructor.ElementType);e=Math.floor((e+s-1)/s)*s,i.offset=e,e+=i.size,t=Math.max(t,s)})),e=Math.floor((e+t-1)/t)*t,this._stride=e}createBuffer(e){return new G(this,e)}createView(e){return new G(this,e)}clone(){const e=new H;return e._stride=this._stride,e._fields=new Map,this._fields.forEach(((t,i)=>e._fields.set(i,t))),e.BufferType=this.BufferType,e}get stride(){return this._stride}get fields(){return this._fields}}function I(){return new H}class J{constructor(e){this.fields=new Array,e.fields.forEach(((e,t)=>{const i={...e,constructor:N(e.constructor)};this.fields.push([t,i])})),this.stride=e.stride}}const K=[p,t,s,n,d,f,c,i,r,h,u,o,a,b,v,l,_,E,M,g,w,T,A,B,y,F,U,C,L,m,j,x,z,$,V,k];function N(e){return`${e.ElementType}_${e.ElementCount}`}function O(e){return P.get(e)}const P=new Map;K.forEach((e=>P.set(N(e),e)));export{G as InterleavedBuffer,H as InterleavedLayout,J as PackedLayout,I as newLayout};
5
+ import{BufferViewVec2f16 as e,BufferViewVec2f as t,BufferViewVec2f64 as i,BufferViewVec3f as s,BufferViewVec3f64 as r,BufferViewVec4f16 as n,BufferViewVec4f as h,BufferViewVec4f64 as d,BufferViewMat3f as u,BufferViewMat3f64 as f,BufferViewMat4f as o,BufferViewMat4f64 as l,BufferViewVec4u8 as p,BufferViewFloat16 as c,BufferViewFloat as a,BufferViewFloat64 as _,BufferViewUint8 as y,BufferViewUint16 as F,BufferViewInt8 as m,BufferViewVec2i8 as b,BufferViewVec2i16 as g,BufferViewVec2u8 as w,BufferViewVec4u16 as v,BufferViewUint32 as E,BufferViewVec3u8 as M,BufferViewVec2u16 as T,BufferViewVec3u16 as A,BufferViewVec2u32 as B,BufferViewVec3u32 as U,BufferViewVec4u32 as C,BufferViewVec3i8 as L,BufferViewVec4i8 as j,BufferViewInt16 as x,BufferViewVec3i16 as z,BufferViewVec4i16 as $,BufferViewInt32 as V,BufferViewVec2i32 as k,BufferViewVec3i32 as q,BufferViewVec4i32 as D}from"../../../../geometry/support/buffer/BufferView.js";import{elementTypeSize as G}from"../../../../geometry/support/buffer/types.js";import{assert as H}from"../../webgl-engine/lib/Util.js";class I{constructor(e,t){this.layout=e,this.buffer="number"==typeof t?new ArrayBuffer(t*e.stride):t;for(const i of e.fields.keys()){const t=e.fields.get(i);this[i]=new t.constructor(this.buffer,t.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.buffer.byteLength/this.stride}get byteLength(){return this.buffer.byteLength}getField(e,t){const i=this[e];return i&&i.elementCount===t.ElementCount&&i.elementType===t.ElementType?i:null}slice(e,t){return new I(this.layout,this.buffer.slice(e*this.stride,t*this.stride))}copyFrom(e,t=0,i=0,s=e.count){const r=this.stride;if(r%4==0){const n=new Uint32Array(e.buffer,t*r,s*r/4);new Uint32Array(this.buffer,i*r,s*r/4).set(n)}else{const n=new Uint8Array(e.buffer,t*r,s*r);new Uint8Array(this.buffer,i*r,s*r).set(n)}return this}get cachedMemory(){return this.byteLength}dispose(){}}class J{constructor(e){this._stride=0,this._fields=new Map,e&&(this._stride=e.stride,e.fields.forEach((e=>this._fields.set(e[0],{...e[1],constructor:Q(e[1].constructor)}))))}freeze(){return this}vec2f16(t,i){return this._appendField(t,e,i),this}vec2f(e,i){return this._appendField(e,t,i),this}vec2f64(e,t){return this._appendField(e,i,t),this}vec3f(e,t){return this._appendField(e,s,t),this}vec3f64(e,t){return this._appendField(e,r,t),this}vec4f16(e,t){return this._appendField(e,n,t),this}vec4f(e,t){return this._appendField(e,h,t),this}vec4f64(e,t){return this._appendField(e,d,t),this}mat3f(e,t){return this._appendField(e,u,t),this}mat3f64(e,t){return this._appendField(e,f,t),this}mat4f(e,t){return this._appendField(e,o,t),this}mat4f64(e,t){return this._appendField(e,l,t),this}vec4u8(e,t){return this._appendField(e,p,t),this}f16(e,t){return this._appendField(e,c,t),this}f32(e,t){return this._appendField(e,a,t),this}f64(e,t){return this._appendField(e,_,t),this}u8(e,t){return this._appendField(e,y,t),this}u16(e,t){return this._appendField(e,F,t),this}i8(e,t){return this._appendField(e,m,t),this}vec2i8(e,t){return this._appendField(e,b,t),this}vec2i16(e,t){return this._appendField(e,g,t),this}vec2u8(e,t){return this._appendField(e,w,t),this}vec4u16(e,t){return this._appendField(e,v,t),this}u32(e,t){return this._appendField(e,E,t),this}_appendField(e,t,i){if(this._fields.has(e))return void H(!1,`${e} already added to vertex buffer layout`);const s=t.ElementCount*G(t.ElementType),r=this._stride;this._fields.set(e,{constructor:t,size:s,offset:r,optional:i}),this._alignFields()}_alignFields(){let e=0,t=1;this._fields.forEach((i=>{const s=G(i.constructor.ElementType);e=Math.floor((e+s-1)/s)*s,i.offset=e,e+=i.size,t=Math.max(t,s)})),e=Math.floor((e+t-1)/t)*t,this._stride=e}createBuffer(e){return new I(this,e)}createView(e){return new I(this,e)}clone(){const e=new J;return e._stride=this._stride,e._fields=new Map,this._fields.forEach(((t,i)=>e._fields.set(i,t))),e.BufferType=this.BufferType,e}get stride(){return this._stride}get fields(){return this._fields}}function K(){return new J}class N{constructor(e){this.fields=new Array,e.fields.forEach(((e,t)=>{const i={...e,constructor:P(e.constructor)};this.fields.push([t,i])})),this.stride=e.stride}}const O=[a,t,s,h,u,o,_,i,r,d,f,l,y,w,M,p,F,T,A,v,E,B,U,C,m,b,L,j,x,g,z,$,V,k,q,D];function P(e){return`${e.ElementType}_${e.ElementCount}`}function Q(e){return R.get(e)}const R=new Map;O.forEach((e=>R.set(P(e),e)));export{I as InterleavedBuffer,J as InterleavedLayout,N as PackedLayout,K as newLayout};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../../core/mathUtils.js";import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{b as BloomBlurPassParameters,a as BlurDirection,c as blurRadiusPresets,d as build}from"../../../../../chunks/BloomBlur.glsl.js";
5
+ import"../../../../../core/mathUtils.js";import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"./BloomPresets.glsl.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{b as BloomBlurPassParameters,a as BlurDirection,c as build}from"../../../../../chunks/BloomBlur.glsl.js";
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/output/ReadDepth.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderModules/Float2BindUniform.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/FloatsPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/IntegerPassUniform.js";import"../../core/shaderModules/Texture2DBindUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{a as BloomCompositionPassParameters,b as build,d as defaultCompositionParameters,e as exposurePresets}from"../../../../../chunks/BloomComposition.glsl.js";
5
+ import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/output/ReadDepth.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderModules/Float2BindUniform.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/FloatsPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/IntegerPassUniform.js";import"../../core/shaderModules/Texture2DBindUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"./BloomPresets.glsl.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{a as BloomCompositionPassParameters,b as build,d as defaultCompositionParameters}from"../../../../../chunks/BloomComposition.glsl.js";
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
+ */
5
+ const n={sunny:25,cloudy:25,rainy:15,snowy:15,foggy:15},y={sunny:5e-4,cloudy:5e-4,rainy:5e-4,snowy:.0022,foggy:.0022};class o{constructor(n,y){this.near=n,this.far=y}}const s={sunny:new o([.15,.05,.01,0,0],[1,.4,.2,.1,.05]),cloudy:new o([.15,.05,.01,0,0],[1,.4,.2,.1,.05]),rainy:new o([.15,.05,.01,0,0],[1,.4,.2,.1,.05]),snowy:new o([.15,.05,.01,0,0],[1,.4,.2,.1,.05]),foggy:new o([.15,.05,.01,0,0],[1,.4,.2,.1,.05])};export{y as blurRadiusPresets,n as exposurePresets,s as lodFactorsPresets};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../chunks/tslib.es6.js";import{lerp as t}from"../../../../../core/mathUtils.js";import{watch as r,syncAndInitial as s}from"../../../../../core/reactiveUtils.js";import{property as o}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as i}from"../../../../../core/accessorSupport/decorators/subclass.js";import{RenderCategory as a}from"../../../webgl.js";import m from"../../../webgl/RenderNode.js";import{b as u,c as l,a as n}from"../../../../../chunks/BloomBlur.glsl.js";import{BloomBlurTechnique as h}from"./BloomBlurTechnique.js";import{BloomBlurTechniqueConfiguration as c}from"./BloomBlurTechniqueConfiguration.js";import{a as p,e as b}from"../../../../../chunks/BloomComposition.glsl.js";import{BloomCompositionTechnique as d}from"./BloomCompositionTechnique.js";import{a as _}from"../../../../../chunks/BloomDepthAdjust.glsl.js";import{BloomDepthAdjustTechnique as g}from"./BloomDepthAdjustTechnique.js";import{RenderRequestType as f}from"../../lib/basicInterfaces.js";import{ColorAttachment1 as P,DepthStencilAttachment as j,FramebufferBit as T}from"../../../../webgl/enums.js";let q=class extends m{constructor(e){super(e),this.consumes={required:[a.COMPOSITE,"emissive"]},this.produces=a.COMPOSITE,this._blurHorizontalConfiguration=new c,this._blurVerticalConfiguration=new c,this._compositionParameters=new p,this._depthAdjustParameters=new _,this._blurParameters=new u,this._blurScale=3.06,this._bloomResults=new Array}initialize(){this.addHandles([r((()=>this._updateFogParameters()),(()=>{}),s)])}destroy(){}_updateFogParameters(){const e=this.view.environment.weather;if("sunny"===e.type||"cloudy"===e.type)this._blurParameters.blurRadius=l[e.type],this._compositionParameters.exposure=b[e.type];else{const r="foggy"===e.type?e.fogStrength:e.precipitation;this._blurParameters.blurRadius=t(l[e.type],.004,r),this._compositionParameters.exposure=t(3,b[e.type],1-r)}this.requestRender(f.UPDATE)}precompile(){this._blurHorizontalConfiguration.bloomStage=n.Horizontal,this._blurVerticalConfiguration.bloomStage=n.Vertical,this.techniques.precompile(h,this._blurHorizontalConfiguration),this.techniques.precompile(h,this._blurVerticalConfiguration),this.techniques.precompile(d),this.techniques.precompile(g)}render(e){const t=e.find((({name:e})=>e===a.COMPOSITE)),r=t.getAttachment(P)?.attachment;if(!r)return t;const s=this.techniques.get(h,this._blurHorizontalConfiguration),o=this.techniques.get(h,this._blurVerticalConfiguration),i=this.techniques.get(d),m=this.techniques.get(g);if(!(s.compiled&&o.compiled&&i.compiled&&m.compiled))return this.requestRender(f.UPDATE),t;const u=t.getTexture(),l=this.fboCache,{fullWidth:n,fullHeight:c}=this.bindParameters.camera,p=this.renderingContext,b=l.acquire(n,c,"emissiveDepthAdjusted");this._depthAdjustParameters.color=r,this._prepareFBO(b,n,c),p.bindTechnique(m,this.bindParameters,this._depthAdjustParameters),p.screen.draw();let _=b.getTexture(),T=Math.round(n/2),q=Math.round(c/2);const C=5,x=this._blurParameters.blurRadius;for(let a=0;a<C;a++){const e=l.acquire(T,q,"bloomHorizontal");this._blurParameters.color=_,this._prepareFBO(e,T,q),p.bindTechnique(s,this.bindParameters,this._blurParameters),p.screen.draw(),0===a&&b.release();const t=l.acquire(T,q,"bloomVertical");this._blurParameters.color=e.getTexture(),this._prepareFBO(t,T,q),p.bindTechnique(o,this.bindParameters,this._blurParameters),p.screen.draw(),e.release(),this._bloomResults[a]=t,T=Math.ceil(T/2),q=Math.ceil(q/2),_=this._bloomResults[a].getTexture(),this._blurParameters.blurRadius*=this._blurScale}this._blurParameters.blurRadius=x,this._compositionParameters.color=u,this._compositionParameters.bloomTexture0=this._bloomResults[0].getTexture(),this._compositionParameters.bloomTexture1=this._bloomResults[1].getTexture(),this._compositionParameters.bloomTexture2=this._bloomResults[2].getTexture(),this._compositionParameters.bloomTexture3=this._bloomResults[3].getTexture(),this._compositionParameters.bloomTexture4=this._bloomResults[4].getTexture();const R=this.acquireOutputFramebuffer();return this._prepareFBO(R,n,c),p.bindTechnique(i,this.bindParameters,this._compositionParameters),p.screen.draw(),this._bloomResults.forEach((e=>e.release())),R.attachDepth(t.getAttachment(j)),R.attachColor(t.getAttachment(P),P),R}_prepareFBO(e,t,r){const s=this.renderingContext;s.bindFramebuffer(e.fbo),s.setViewport(0,0,t,r),s.setClearColor(0,0,0,0),s.clear(T.COLOR)}get test(){return{compositionParameters:this._compositionParameters,depthAdjustParameters:this._depthAdjustParameters,blurParameters:this._blurParameters}}};e([o()],q.prototype,"consumes",void 0),e([o()],q.prototype,"produces",void 0),q=e([i("esri.views.3d.webgl-engine.effects.bloom.BloomRenderNode")],q);export{q as BloomRenderNode};
5
+ import{_ as e}from"../../../../../chunks/tslib.es6.js";import{lerp as t}from"../../../../../core/mathUtils.js";import{watch as r,syncAndInitial as s}from"../../../../../core/reactiveUtils.js";import{property as o}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as i}from"../../../../../core/accessorSupport/decorators/subclass.js";import{RenderCategory as a}from"../../../webgl.js";import m from"../../../webgl/RenderNode.js";import{b as l,a as n}from"../../../../../chunks/BloomBlur.glsl.js";import{BloomBlurTechnique as u}from"./BloomBlurTechnique.js";import{BloomBlurTechniqueConfiguration as h}from"./BloomBlurTechniqueConfiguration.js";import{a as c}from"../../../../../chunks/BloomComposition.glsl.js";import{BloomCompositionTechnique as p}from"./BloomCompositionTechnique.js";import{a as d}from"../../../../../chunks/BloomDepthAdjust.glsl.js";import{BloomDepthAdjustTechnique as b}from"./BloomDepthAdjustTechnique.js";import{blurRadiusPresets as _,exposurePresets as g,lodFactorsPresets as f}from"./BloomPresets.glsl.js";import{RenderRequestType as P}from"../../lib/basicInterfaces.js";import{ColorAttachment1 as j,DepthStencilAttachment as T,FramebufferBit as q}from"../../../../webgl/enums.js";let C=class extends m{constructor(e){super(e),this.consumes={required:[a.COMPOSITE,"emissive"]},this.produces=a.COMPOSITE,this._blurHorizontalConfiguration=new h,this._blurVerticalConfiguration=new h,this._compositionParameters=new c,this._depthAdjustParameters=new d,this._blurParameters=new l,this._blurScale=3.06,this._bloomResults=new Array}initialize(){this.addHandles([r((()=>this._updateFogParameters()),(()=>{}),s)])}destroy(){}_updateFogParameters(){const e=this.view.environment.weather;if("sunny"===e.type||"cloudy"===e.type)this._blurParameters.blurRadius=_[e.type],this._compositionParameters.exposure=g[e.type];else{const r="foggy"===e.type?e.fogStrength:e.precipitation;this._blurParameters.blurRadius=t(_.cloudy,_[e.type],r),this._compositionParameters.exposure=t(g[e.type],3,r)}this._compositionParameters.lodFactors=f[e.type].far,this._compositionParameters.lodFactorsFront=f[e.type].near,this.requestRender(P.UPDATE)}precompile(){this._blurHorizontalConfiguration.bloomStage=n.Horizontal,this._blurVerticalConfiguration.bloomStage=n.Vertical,this.techniques.precompile(u,this._blurHorizontalConfiguration),this.techniques.precompile(u,this._blurVerticalConfiguration),this.techniques.precompile(p),this.techniques.precompile(b)}render(e){const t=e.find((({name:e})=>e===a.COMPOSITE)),r=t.getAttachment(j)?.attachment;if(!r)return t;const s=this.techniques.get(u,this._blurHorizontalConfiguration),o=this.techniques.get(u,this._blurVerticalConfiguration),i=this.techniques.get(p),m=this.techniques.get(b);if(!(s.compiled&&o.compiled&&i.compiled&&m.compiled))return this.requestRender(P.UPDATE),t;const l=t.getTexture(),n=this.fboCache,{fullWidth:h,fullHeight:c}=this.bindParameters.camera,d=this.renderingContext,_=n.acquire(h,c,"emissiveDepthAdjusted");this._depthAdjustParameters.color=r,this._prepareFBO(_,h,c),d.bindTechnique(m,this.bindParameters,this._depthAdjustParameters),d.screen.draw();let g=_.getTexture(),f=Math.round(h/2),q=Math.round(c/2);const C=5,x=this._blurParameters.blurRadius;for(let a=0;a<C;a++){const e=n.acquire(f,q,"bloomHorizontal");this._blurParameters.color=g,this._prepareFBO(e,f,q),d.bindTechnique(s,this.bindParameters,this._blurParameters),d.screen.draw(),0===a&&_.release();const t=n.acquire(f,q,"bloomVertical");this._blurParameters.color=e.getTexture(),this._prepareFBO(t,f,q),d.bindTechnique(o,this.bindParameters,this._blurParameters),d.screen.draw(),e.release(),this._bloomResults[a]=t,f=Math.ceil(f/2),q=Math.ceil(q/2),g=this._bloomResults[a].getTexture(),this._blurParameters.blurRadius*=this._blurScale}this._blurParameters.blurRadius=x,this._compositionParameters.color=l,this._compositionParameters.bloomTexture0=this._bloomResults[0].getTexture(),this._compositionParameters.bloomTexture1=this._bloomResults[1].getTexture(),this._compositionParameters.bloomTexture2=this._bloomResults[2].getTexture(),this._compositionParameters.bloomTexture3=this._bloomResults[3].getTexture(),this._compositionParameters.bloomTexture4=this._bloomResults[4].getTexture();const R=this.acquireOutputFramebuffer();return this._prepareFBO(R,h,c),d.bindTechnique(i,this.bindParameters,this._compositionParameters),d.screen.draw(),this._bloomResults.forEach((e=>e.release())),R.attachDepth(t.getAttachment(T)),R.attachColor(t.getAttachment(j),j),R}_prepareFBO(e,t,r){const s=this.renderingContext;s.bindFramebuffer(e.fbo),s.setViewport(0,0,t,r),s.setClearColor(0,0,0,0),s.clear(q.COLOR)}get test(){return{compositionParameters:this._compositionParameters,depthAdjustParameters:this._depthAdjustParameters,blurParameters:this._blurParameters}}};e([o()],C.prototype,"consumes",void 0),e([o()],C.prototype,"produces",void 0),C=e([i("esri.views.3d.webgl-engine.effects.bloom.BloomRenderNode")],C);export{C as BloomRenderNode};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{clamp as e}from"../../../../core/mathUtils.js";import{clone as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{p as i}from"../../../../chunks/vec32.js";import{ZEROS as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as s}from"../../../../geometry/support/aaBoundingBox.js";import{newLayout as a}from"../../support/buffer/InterleavedLayout.js";import{isShadowRelatedOutput as o,is3DGeometryOutputMRT as n,isColorOrColorEmission as c,ShaderOutput as h}from"../core/shaderLibrary/ShaderOutput.js";import{EmissionSource as u}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as m}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as l}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{olidEnabled as p}from"../effects/geometry/olidUtils.js";import f from"../lib/GLMaterial.js";import{Material as d}from"../lib/Material.js";import{isPathGeometry as b}from"../lib/PathGeometry.js";import{MeshIntersectionOptions as g,intersectAabbInvDir as v}from"../lib/RayIntersections.js";import{RenderSlot as S}from"../lib/RenderSlot.js";import{VertexAttribute as _}from"../lib/VertexAttribute.js";import{DefaultBufferWriter as y}from"./DefaultBufferWriter.js";import{vertexAttributeLocations as A,PathTechnique as O,PathPassParameters as j}from"./PathTechnique.js";import{PathTechniqueConfiguration as P}from"./PathTechniqueConfiguration.js";import{alphaCutoff as L}from"../../../../webscene/support/AlphaCutoff.js";class R extends d{constructor(e,t){super(e,x),this._vertexBufferLayout=T(),this.vertexAttributeLocations=A,this.supportsEdges=!0,this.produces=new Map([[S.OPAQUE_MATERIAL,e=>(this.parameters.castShadows&&o(e)||n(e))&&!this.transparent],[S.TRANSPARENT_MATERIAL,e=>(this.parameters.castShadows&&o(e)||n(e))&&this.transparent]]),this._configuration=new P(t.spherical)}get hasEmissions(){return!i(this.parameters.emissiveFactor,r)}getConfiguration(e,t){return this._configuration.output=e,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.transparent,this._configuration.hasOccludees=t.hasOccludees,c(e)?(this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?m.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?m.WindingOrder:m.None,this._configuration.receiveShadows=t.shadowMap.enabled,this._configuration.receiveAmbientOcclusion=null!=t.ssao):this._configuration.receiveShadows=this._configuration.receiveAmbientOcclusion=!1,this._configuration.pbrMode=this.parameters.usePBR?l.Schematic:l.Disabled,this._configuration.emissionSource=this.parameters.usePBR?u.Value:u.None,this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}isVisibleForOutput(e){return e!==h.Shadow&&e!==h.ShadowExcludeHighlight&&e!==h.ShadowHighlight||this.parameters.castShadows}get visible(){return this.parameters.opacity>=L}intersect(i,r,a,o,n,c){const h=i;if(!b(h))return;const u=h.path,m=t(this.parameters.size);if(this.parameters.vvSize){const{offset:t,factor:i,minSize:r,maxSize:s,fallback:a}=this.parameters.vvSize,o=u.sizeAttributeValue;Number.isNaN(o)?(m[0]*=a[0],m[1]*=a[2]):(m[0]*=e(t[0]+o*i[0],r[0],s[0]),m[1]*=e(t[2]+o*i[2],r[2],s[2]))}const l=new g(!1,a.options.normalRequired),p=Math.max(m[0],m[1]),f=i.boundingInfo;if(null==f)return void M(u,m,o,n,l,c);const d=s(f.bbMin[0]-p,f.bbMin[1]-p,f.bbMin[2]-p,f.bbMax[0]+p,f.bbMax[1]+p,f.bbMax[2]+p),S=[n[0]-o[0],n[1]-o[1],n[2]-o[2]],_=Math.sqrt(S[0]*S[0]+S[1]*S[1]+S[2]*S[2]),y=[_/S[0],_/S[1],_/S[2]];v(d,o,y,a.tolerance)&&M(u,m,o,n,l,c)}createBufferWriter(){return new y(this._vertexBufferLayout)}createGLMaterial(e){return new w(e)}get transparent(){const{parameters:e}=this;return e.drivenOpacity||e.opacity<1}}function T(){const e=a().vec3f(_.POSITION).vec4f(_.PROFILEVERTEXANDNORMAL).vec4f(_.FEATUREVALUE).vec2f(_.PROFILEAUXDATA).vec2i16(_.PROFILERIGHT,{glNormalized:!0}).vec2i16(_.PROFILEUP,{glNormalized:!0});return p()&&e.vec4u8(_.OLIDCOLOR),e}class w extends f{beginSlot(e){return this.getTechnique(O,e)}}function M(e,t,i,r,s,a){e.baked.size&&e.baked.size[0]===t[0]&&e.baked.size[1]===t[1]||e.baked.bake(t),e.baked.intersect(i,r,s,a)}class x extends j{constructor(){super(...arguments),this.doubleSided=!1,this.doubleSidedType="normal",this.castShadows=!0,this.hasSlicePlane=!1,this.drivenOpacity=!1,this.usePBR=!1}}export{x as Parameters,R as PathMaterial};
5
+ import{clamp as e}from"../../../../core/mathUtils.js";import{clone as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{p as i}from"../../../../chunks/vec32.js";import{ZEROS as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as s}from"../../../../geometry/support/aaBoundingBox.js";import{newLayout as a}from"../../support/buffer/InterleavedLayout.js";import{isShadowRelatedOutput as o,is3DGeometryOutputMRT as n,isColorOrColorEmission as c,ShaderOutput as h}from"../core/shaderLibrary/ShaderOutput.js";import{EmissionSource as u}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as m}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as l}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{olidEnabled as p}from"../effects/geometry/olidUtils.js";import f from"../lib/GLMaterial.js";import{Material as d}from"../lib/Material.js";import{isPathGeometry as b}from"../lib/PathGeometry.js";import{MeshIntersectionOptions as g,intersectAabbInvDir as v}from"../lib/RayIntersections.js";import{RenderSlot as S}from"../lib/RenderSlot.js";import{VertexAttribute as _}from"../lib/VertexAttribute.js";import{DefaultBufferWriter as y}from"./DefaultBufferWriter.js";import{vertexAttributeLocations as A,PathTechnique as O,PathPassParameters as j}from"./PathTechnique.js";import{PathTechniqueConfiguration as P}from"./PathTechniqueConfiguration.js";import{alphaCutoff as L}from"../../../../webscene/support/AlphaCutoff.js";class R extends d{constructor(e,t){super(e,x),this._vertexBufferLayout=T(),this.vertexAttributeLocations=A,this.supportsEdges=!0,this.produces=new Map([[S.OPAQUE_MATERIAL,e=>(this.parameters.castShadows&&o(e)||n(e))&&!this.transparent],[S.TRANSPARENT_MATERIAL,e=>(this.parameters.castShadows&&o(e)||n(e))&&this.transparent]]),this._configuration=new P(t.spherical)}get hasEmissions(){return!i(this.parameters.emissiveFactor,r)}getConfiguration(e,t){return this._configuration.output=e,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.transparent,this._configuration.hasOccludees=t.hasOccludees,c(e)?(this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?m.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?m.WindingOrder:m.None,this._configuration.receiveShadows=t.shadowMap.enabled,this._configuration.receiveAmbientOcclusion=null!=t.ssao):this._configuration.receiveShadows=this._configuration.receiveAmbientOcclusion=!1,this._configuration.pbrMode=this.parameters.usePBR?l.Schematic:l.Disabled,this._configuration.emissionSource=this.parameters.usePBR?u.Value:u.None,this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}isVisibleForOutput(e){return e!==h.Shadow&&e!==h.ShadowExcludeHighlight&&e!==h.ShadowHighlight||this.parameters.castShadows}get visible(){return this.parameters.opacity>=L}intersect(i,r,a,o,n,c){const h=i;if(!b(h))return;const u=h.path,m=t(this.parameters.size);if(this.parameters.vvSize){const{offset:t,factor:i,minSize:r,maxSize:s,fallback:a}=this.parameters.vvSize,o=u.sizeAttributeValue;Number.isNaN(o)?(m[0]*=a[0],m[1]*=a[2]):(m[0]*=e(t[0]+o*i[0],r[0],s[0]),m[1]*=e(t[2]+o*i[2],r[2],s[2]))}const l=new g(!1,a.options.normalRequired),p=Math.max(m[0],m[1]),f=i.boundingInfo;if(null==f)return void M(u,m,o,n,l,c);const d=s(f.bbMin[0]-p,f.bbMin[1]-p,f.bbMin[2]-p,f.bbMax[0]+p,f.bbMax[1]+p,f.bbMax[2]+p),S=[n[0]-o[0],n[1]-o[1],n[2]-o[2]],_=Math.sqrt(S[0]*S[0]+S[1]*S[1]+S[2]*S[2]),y=[_/S[0],_/S[1],_/S[2]];v(d,o,y,a.tolerance)&&M(u,m,o,n,l,c)}createBufferWriter(){return new y(this._vertexBufferLayout)}createGLMaterial(e){return new w(e)}get transparent(){const{parameters:e}=this;return e.drivenOpacity||e.opacity<1}}function T(){const e=a().vec3f(_.POSITION).vec4f(_.PROFILEVERTEXANDNORMAL).vec4f16(_.FEATUREVALUE).vec2f(_.PROFILEAUXDATA).vec2i16(_.PROFILERIGHT,{glNormalized:!0}).vec2i16(_.PROFILEUP,{glNormalized:!0});return p()&&e.vec4u8(_.OLIDCOLOR),e}class w extends f{beginSlot(e){return this.getTechnique(O,e)}}function M(e,t,i,r,s,a){e.baked.size&&e.baked.size[0]===t[0]&&e.baked.size[1]===t[1]||e.baked.bake(t),e.baked.intersect(i,r,s,a)}class x extends j{constructor(){super(...arguments),this.doubleSided=!1,this.doubleSidedType="normal",this.castShadows=!0,this.hasSlicePlane=!1,this.drivenOpacity=!1,this.usePBR=!1}}export{x as Parameters,R as PathMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{Float16Array as e}from"@petamoriken/float16";import t from"../../../../core/Logger.js";import{clamp as r}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as i}from"../../../../core/screenUtils.js";import{copy as s}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{i as a,d as n,f as o,h as l,g as c,c as p,l as h,j as m,t as f}from"../../../../chunks/vec32.js";import{create as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as T}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{PlaneIndex as d}from"../../../../geometry/support/frustum.js";import{create as _,distance2 as E,fromPoints as A,closestLineSegmentPoint as R}from"../../../../geometry/support/lineSegment.js";import{create as g,fromPoints as O,signedDistance as S,getNormal as I}from"../../../../geometry/support/plane.js";import{newLayout as v}from"../../support/buffer/InterleavedLayout.js";import{isHighlightOrOID as P,isColorOrColorEmission as N,isDepth as L,isColorEmissionHighlightOIDOrDepth as b,is2DGeometryOutput as C,ShaderOutput as U}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as y}from"../effects/geometry/olidUtils.js";import j from"../lib/GLMaterial.js";import{Material as D,RenderOccludedFlag as w}from"../lib/Material.js";import{RenderSlot as F}from"../lib/RenderSlot.js";import{isTranslationMatrix as M}from"../lib/Util.js";import{VertexAttribute as x}from"../lib/VertexAttribute.js";import{VisualVariablePassParameters as J}from"./VisualVariablePassParameters.js";import{LineMarkerAnchor as B}from"../shaders/LineMarkerTechniqueConfiguration.js";import{r as z}from"../../../../chunks/RibbonLine.glsl.js";import{vertexAttributeLocations as H,RibbonLineTechnique as G}from"../shaders/RibbonLineTechnique.js";import{RibbonLineTechniqueConfiguration as k,CapType as V}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as Z}from"../../../../webscene/support/AlphaCutoff.js";var W;!function(e){e[e.LEFT_JOIN_START=-2]="LEFT_JOIN_START",e[e.LEFT_JOIN_END=-1]="LEFT_JOIN_END",e[e.LEFT_CAP_START=-4]="LEFT_CAP_START",e[e.LEFT_CAP_END=-5]="LEFT_CAP_END",e[e.RIGHT_JOIN_START=2]="RIGHT_JOIN_START",e[e.RIGHT_JOIN_END=1]="RIGHT_JOIN_END",e[e.RIGHT_CAP_START=4]="RIGHT_CAP_START",e[e.RIGHT_CAP_END=5]="RIGHT_CAP_END"}(W||(W={}));class Y extends D{constructor(e){super(e,X),this._configuration=new k,this.vertexAttributeLocations=H,this.produces=new Map([[F.OPAQUE_MATERIAL,e=>P(e)||N(e)&&this.parameters.renderOccluded===w.OccludeAndTransparentStencil],[F.OPAQUE_MATERIAL_WITHOUT_NORMALS,e=>L(e)],[F.OCCLUDER_MATERIAL,e=>b(e)&&this.parameters.renderOccluded===w.OccludeAndTransparentStencil],[F.TRANSPARENT_OCCLUDER_MATERIAL,e=>b(e)&&this.parameters.renderOccluded===w.OccludeAndTransparentStencil],[F.TRANSPARENT_MATERIAL,e=>N(e)&&this.parameters.writeDepth&&this.parameters.renderOccluded!==w.OccludeAndTransparentStencil],[F.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>N(e)&&!this.parameters.writeDepth&&this.parameters.renderOccluded!==w.OccludeAndTransparentStencil],[F.DRAPED_MATERIAL,e=>C(e)]])}getConfiguration(e,t){this._configuration.output=e,this._configuration.oitPass=t.oitPass,this._configuration.draped=t.slot===F.DRAPED_MATERIAL;const r=null!=this.parameters.stipplePattern&&e!==U.Highlight;return this._configuration.stippleEnabled=r,this._configuration.stippleOffColorEnabled=r&&null!=this.parameters.stippleOffColor,this._configuration.stipplePreferContinuous=r&&this.parameters.stipplePreferContinuous,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.roundJoins="round"===this.parameters.join,this._configuration.capType=this.parameters.cap,this._configuration.applyMarkerOffset=null!=this.parameters.markerParameters&&ee(this.parameters.markerParameters),this._configuration.hasPolygonOffset=this.parameters.hasPolygonOffset,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.innerColorEnabled=this.parameters.innerWidth>0&&null!=this.parameters.innerColor,this._configuration.falloffEnabled=this.parameters.falloff>0,this._configuration.hasOccludees=t.hasOccludees,this._configuration.occluder=this.parameters.renderOccluded===w.OccludeAndTransparentStencil,this._configuration.terrainDepthTest=t.terrainDepthTest&&N(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration.wireframe=this.parameters.wireframe,this._configuration}get visible(){return this.parameters.color[3]>=Z||null!=this.parameters.stipplePattern&&(this.parameters.stippleOffColor?.[3]??0)>Z}intersectDraped({attributes:e,screenToWorldRatio:t},i,s,a,n,o){if(!s.options.selectionMode)return;const l=e.get(x.SIZE);let c=this.parameters.width;if(this.parameters.vvSize){const t=e.get(x.SIZEFEATUREATTRIBUTE).data[0];Number.isNaN(t)?c*=this.parameters.vvSize.fallback[0]:c*=r(this.parameters.vvSize.offset[0]+t*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else l&&(c*=l.data[0]);const p=a[0],h=a[1],m=(c/2+4)*t;let f=Number.MAX_VALUE,u=0;const T=e.get(x.POSITION).data,d=$(this.parameters,e)?T.length-2:T.length-5;for(let _=0;_<d;_+=3){const e=T[_],t=T[_+1],i=(_+3)%T.length,s=p-e,a=h-t,n=T[i]-e,o=T[i+1]-t,l=r((n*s+o*a)/(n*n+o*o),0,1),c=n*l-s,m=o*l-a,d=c*c+m*m;d<f&&(f=d,u=_/3)}f<m*m&&n(o.dist,o.normal,u,!1)}intersect(e,i,f,u,T,_){if(!f.options.selectionMode||!e.visible)return;if(!M(i))return void t.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial").error("intersection assumes a translation-only matrix");const g=e.attributes,v=g.get(x.POSITION).data;let P=this.parameters.width;if(this.parameters.vvSize){const e=g.get(x.SIZEFEATUREATTRIBUTE).data[0];Number.isNaN(e)||(P*=r(this.parameters.vvSize.offset[0]+e*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0]))}else g.has(x.SIZE)&&(P*=g.get(x.SIZE).data[0]);const N=f.camera,L=ae;s(L,f.point);const b=P*N.pixelRatio/2+4*N.pixelRatio;a(Te[0],L[0]-b,L[1]+b,0),a(Te[1],L[0]+b,L[1]+b,0),a(Te[2],L[0]+b,L[1]-b,0),a(Te[3],L[0]-b,L[1]-b,0);for(let t=0;t<4;t++)if(!N.unprojectFromRenderScreen(Te[t],de[t]))return;O(N.eye,de[0],de[1],_e),O(N.eye,de[1],de[2],Ee),O(N.eye,de[2],de[3],Ae),O(N.eye,de[3],de[0],Re);let C=Number.MAX_VALUE,U=0;const y=$(this.parameters,g)?v.length-2:v.length-5;for(let t=0;t<y;t+=3){te[0]=v[t]+i[12],te[1]=v[t+1]+i[13],te[2]=v[t+2]+i[14];const e=(t+3)%v.length;if(re[0]=v[e]+i[12],re[1]=v[e+1]+i[13],re[2]=v[e+2]+i[14],S(_e,te)<0&&S(_e,re)<0||S(Ee,te)<0&&S(Ee,re)<0||S(Ae,te)<0&&S(Ae,re)<0||S(Re,te)<0&&S(Re,re)<0)continue;if(N.projectToRenderScreen(te,ne),N.projectToRenderScreen(re,oe),ne[2]<0&&oe[2]>0){n(ie,te,re);const e=N.frustum,t=-S(e[d.NEAR],te)/o(ie,I(e[d.NEAR]));l(ie,ie,t),c(te,te,ie),N.projectToRenderScreen(te,ne)}else if(ne[2]>0&&oe[2]<0){n(ie,re,te);const e=N.frustum,t=-S(e[d.NEAR],re)/o(ie,I(e[d.NEAR]));l(ie,ie,t),c(re,re,ie),N.projectToRenderScreen(re,oe)}else if(ne[2]<0&&oe[2]<0)continue;ne[2]=0,oe[2]=0;const r=E(A(ne,oe,pe),L);r<C&&(C=r,p(le,te),p(ce,re),U=t/3)}const j=f.rayBegin,D=f.rayEnd;if(C<b*b){let e=Number.MAX_VALUE;if(R(A(le,ce,pe),A(j,D,he),se)){n(se,se,j);const t=h(se);l(se,se,1/t),e=t/m(j,D)}_(e,se,U,!1)}}get _layout(){const e=v().vec3f(x.POSITION).vec3f(x.PREVPOSITION).vec3f(x.NEXTPOSITION).vec2f16(x.LINEPARAMETERS).f32(x.U0);return this.parameters.vvSize?e.f32(x.SIZEFEATUREATTRIBUTE):e.f32(x.SIZE),this.parameters.vvColor?e.f32(x.COLORFEATUREATTRIBUTE):e.vec4u8(x.COLOR),this.parameters.vvOpacity&&e.f32(x.OPACITYFEATUREATTRIBUTE),y()&&e.vec4u8(x.OLIDCOLOR),e}createBufferWriter(){return new Q(this._layout,this.parameters)}createGLMaterial(e){return new q(e)}validateParameters(e){"miter"!==e.join&&(e.miterLimit=0),null!=e.markerParameters&&(e.markerScale=e.markerParameters.width/e.width)}}class q extends j{constructor(){super(...arguments),this._stipplePattern=null}dispose(){super.dispose(),this._stippleTextures.release(this._stipplePattern),this._stipplePattern=null}beginSlot(e){const t=this._material.parameters.stipplePattern;return this._stipplePattern!==t&&(this._material.setParameters({stippleTexture:this._stippleTextures.swap(t,this._stipplePattern)}),this._stipplePattern=t),this.getTechnique(G,e)}}class X extends J{constructor(){super(...arguments),this.width=0,this.color=T,this.join="miter",this.cap=V.BUTT,this.miterLimit=5,this.writeDepth=!0,this.hasPolygonOffset=!1,this.stippleTexture=null,this.stipplePreferContinuous=!0,this.markerParameters=null,this.markerScale=1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.isClosed=!1,this.falloff=0,this.innerWidth=0,this.wireframe=!1}get transparent(){return this.color[3]<1||null!=this.stipplePattern&&(this.stippleOffColor?.[3]??0)<1}}class Q{constructor(e,t){this.vertexBufferLayout=e,this._parameters=t,this.numJoinSubdivisions=0;const r=t.stipplePattern?1:0;switch(this._parameters.join){case"miter":case"bevel":this.numJoinSubdivisions=r;break;case"round":this.numJoinSubdivisions=z+r}}_isClosed(e){return $(this._parameters,e)}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){const t=2,r=e.get(x.POSITION).indices.length/2+1,i=this._isClosed(e);let s=i?2:2*t;return s+=((i?r:r-1)-(i?0:1))*(2*this.numJoinSubdivisions+4),s+=2,this._parameters.wireframe&&(s=2+4*(s-2)),s}write(t,r,i,s,n,o){const l=me,c=fe,h=ue,u=i.get(x.POSITION),T=u.indices,d=u.data.length/3,_=i.get(x.DISTANCETOSTART)?.data;T&&T.length!==2*(d-1)&&console.warn("RibbonLineMaterial does not support indices");const E=i.get(x.SIZEFEATUREATTRIBUTE)?.data[0]??i.get(x.SIZE)?.data[0]??1;let A=[1,1,1,1],R=0;const g=this.vertexBufferLayout.fields.has(x.COLORFEATUREATTRIBUTE);g?R=i.get(x.COLORFEATUREATTRIBUTE).data[0]:i.has(x.COLOR)&&(A=i.get(x.COLOR).data);const O=this.vertexBufferLayout.fields.has(x.OPACITYFEATUREATTRIBUTE),S=O?i.get(x.OPACITYFEATUREATTRIBUTE).data[0]:0,I=new Float32Array(n.buffer),v=new e(n.buffer),P=new Uint8Array(n.buffer),N=this.vertexBufferLayout.stride/4;let L=o*N;const b=L;let C=0;const U=_?(e,t,r)=>C=_[r]:(e,t,r)=>C+=m(e,t),j=(e,t,r,i,a,n,o)=>{I[L++]=t[0],I[L++]=t[1],I[L++]=t[2],I[L++]=e[0],I[L++]=e[1],I[L++]=e[2],I[L++]=r[0],I[L++]=r[1],I[L++]=r[2];const l=2*L;if(L++,v[l]=i,v[l+1]=a,I[L++]=o,I[L++]=E,g)I[L++]=R;else{const e=Math.min(4*n,A.length-4),t=4*L;L++,P[t]=A[e],P[t+1]=A[e+1],P[t+2]=A[e+2],P[t+3]=A[e+3]}if(O&&(I[L++]=S),y()){const e=4*L;L++,s&&(P[e]=s[0],P[e+1]=s[1],P[e+2]=s[2],P[e+3]=s[3])}};L+=N,a(c,u.data[0],u.data[1],u.data[2]),t&&f(c,c,t);const D=this._isClosed(i);if(D){const e=u.data.length-3;a(l,u.data[e],u.data[e+1],u.data[e+2]),t&&f(l,l,t)}else a(h,u.data[3],u.data[4],u.data[5]),t&&f(h,h,t),j(c,c,h,1,W.LEFT_CAP_START,0,0),j(c,c,h,1,W.RIGHT_CAP_START,0,0),p(l,c),p(c,h);const w=D?0:1,F=D?d:d-1;for(let e=w;e<F;e++){const r=(e+1)%d*3;a(h,u.data[r],u.data[r+1],u.data[r+2]),t&&f(h,h,t),U(l,c,e),j(l,c,h,0,W.LEFT_JOIN_END,e,C),j(l,c,h,0,W.RIGHT_JOIN_END,e,C);const i=this.numJoinSubdivisions;for(let t=0;t<i;++t){const r=(t+1)/(i+1);j(l,c,h,r,W.LEFT_JOIN_END,e,C),j(l,c,h,r,W.RIGHT_JOIN_END,e,C)}j(l,c,h,1,W.LEFT_JOIN_START,e,C),j(l,c,h,1,W.RIGHT_JOIN_START,e,C),p(l,c),p(c,h)}D?(a(h,u.data[3],u.data[4],u.data[5]),t&&f(h,h,t),C=U(l,c,F),j(l,c,h,0,W.LEFT_JOIN_END,w,C),j(l,c,h,0,W.RIGHT_JOIN_END,w,C)):(C=U(l,c,F),j(l,c,c,0,W.LEFT_CAP_END,F,C),j(l,c,c,0,W.RIGHT_CAP_END,F,C)),K(I,b+N,I,b,N);return L=K(I,L-N,I,L,N),this._parameters.wireframe&&this._addWireframeVertices(n,b,L,N),null}_addWireframeVertices(e,t,r,i){const s=new Float32Array(e.buffer,r*Float32Array.BYTES_PER_ELEMENT),a=new Float32Array(e.buffer,t*Float32Array.BYTES_PER_ELEMENT,r-t);let n=0;const o=e=>n=K(a,e,s,n,i);for(let l=0;l<a.length-1;l+=2*i)o(l),o(l+2*i),o(l+1*i),o(l+2*i),o(l+1*i),o(l+3*i)}}function K(e,t,r,i,s){for(let a=0;a<s;a++)r[i++]=e[t++];return i}function $(e,t){if(!e.isClosed)return!1;return t.get(x.POSITION).indices.length>2}function ee(e){return e.anchor===B.Tip&&e.hideOnShortSegments&&"begin-end"===e.placement&&e.worldSpace}const te=u(),re=u(),ie=u(),se=u(),ae=u(),ne=i(),oe=i(),le=u(),ce=u(),pe=_(),he=_(),me=u(),fe=u(),ue=u(),Te=[i(),i(),i(),i()],de=[u(),u(),u(),u()],_e=g(),Ee=g(),Ae=g(),Re=g();export{X as Parameters,Y as RibbonLineMaterial};
5
+ import{Float16Array as e}from"@petamoriken/float16";import t from"../../../../core/Logger.js";import{clamp as r}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as i}from"../../../../core/screenUtils.js";import{copy as s}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{i as a,d as n,f as o,h as l,g as c,c as p,l as h,j as m,t as u}from"../../../../chunks/vec32.js";import{create as f}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as T}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{PlaneIndex as d}from"../../../../geometry/support/frustum.js";import{create as _,distance2 as E,fromPoints as A,closestLineSegmentPoint as R}from"../../../../geometry/support/lineSegment.js";import{create as g,fromPoints as O,signedDistance as S,getNormal as I}from"../../../../geometry/support/plane.js";import{newLayout as v}from"../../support/buffer/InterleavedLayout.js";import{isHighlightOrOID as P,isColorOrColorEmission as N,isDepth as L,isColorEmissionHighlightOIDOrDepth as b,is2DGeometryOutput as C,ShaderOutput as U}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as y}from"../effects/geometry/olidUtils.js";import j from"../lib/GLMaterial.js";import{Material as D,RenderOccludedFlag as w}from"../lib/Material.js";import{RenderSlot as F}from"../lib/RenderSlot.js";import{isTranslationMatrix as M}from"../lib/Util.js";import{VertexAttribute as x}from"../lib/VertexAttribute.js";import{VisualVariablePassParameters as J}from"./VisualVariablePassParameters.js";import{LineMarkerAnchor as B}from"../shaders/LineMarkerTechniqueConfiguration.js";import{r as z}from"../../../../chunks/RibbonLine.glsl.js";import{vertexAttributeLocations as H,RibbonLineTechnique as G}from"../shaders/RibbonLineTechnique.js";import{RibbonLineTechniqueConfiguration as k,CapType as V}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as Z}from"../../../../webscene/support/AlphaCutoff.js";var W;!function(e){e[e.LEFT_JOIN_START=-2]="LEFT_JOIN_START",e[e.LEFT_JOIN_END=-1]="LEFT_JOIN_END",e[e.LEFT_CAP_START=-4]="LEFT_CAP_START",e[e.LEFT_CAP_END=-5]="LEFT_CAP_END",e[e.RIGHT_JOIN_START=2]="RIGHT_JOIN_START",e[e.RIGHT_JOIN_END=1]="RIGHT_JOIN_END",e[e.RIGHT_CAP_START=4]="RIGHT_CAP_START",e[e.RIGHT_CAP_END=5]="RIGHT_CAP_END"}(W||(W={}));class Y extends D{constructor(e){super(e,X),this._configuration=new k,this.vertexAttributeLocations=H,this.produces=new Map([[F.OPAQUE_MATERIAL,e=>P(e)||N(e)&&this.parameters.renderOccluded===w.OccludeAndTransparentStencil],[F.OPAQUE_MATERIAL_WITHOUT_NORMALS,e=>L(e)],[F.OCCLUDER_MATERIAL,e=>b(e)&&this.parameters.renderOccluded===w.OccludeAndTransparentStencil],[F.TRANSPARENT_OCCLUDER_MATERIAL,e=>b(e)&&this.parameters.renderOccluded===w.OccludeAndTransparentStencil],[F.TRANSPARENT_MATERIAL,e=>N(e)&&this.parameters.writeDepth&&this.parameters.renderOccluded!==w.OccludeAndTransparentStencil],[F.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>N(e)&&!this.parameters.writeDepth&&this.parameters.renderOccluded!==w.OccludeAndTransparentStencil],[F.DRAPED_MATERIAL,e=>C(e)]])}getConfiguration(e,t){this._configuration.output=e,this._configuration.oitPass=t.oitPass,this._configuration.draped=t.slot===F.DRAPED_MATERIAL;const r=null!=this.parameters.stipplePattern&&e!==U.Highlight;return this._configuration.stippleEnabled=r,this._configuration.stippleOffColorEnabled=r&&null!=this.parameters.stippleOffColor,this._configuration.stipplePreferContinuous=r&&this.parameters.stipplePreferContinuous,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.roundJoins="round"===this.parameters.join,this._configuration.capType=this.parameters.cap,this._configuration.applyMarkerOffset=null!=this.parameters.markerParameters&&ee(this.parameters.markerParameters),this._configuration.hasPolygonOffset=this.parameters.hasPolygonOffset,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.innerColorEnabled=this.parameters.innerWidth>0&&null!=this.parameters.innerColor,this._configuration.falloffEnabled=this.parameters.falloff>0,this._configuration.hasOccludees=t.hasOccludees,this._configuration.occluder=this.parameters.renderOccluded===w.OccludeAndTransparentStencil,this._configuration.terrainDepthTest=t.terrainDepthTest&&N(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration.wireframe=this.parameters.wireframe,this._configuration}get visible(){return this.parameters.color[3]>=Z||null!=this.parameters.stipplePattern&&(this.parameters.stippleOffColor?.[3]??0)>Z}intersectDraped({attributes:e,screenToWorldRatio:t},i,s,a,n,o){if(!s.options.selectionMode)return;const l=e.get(x.SIZE);let c=this.parameters.width;if(this.parameters.vvSize){const t=e.get(x.SIZEFEATUREATTRIBUTE).data[0];Number.isNaN(t)?c*=this.parameters.vvSize.fallback[0]:c*=r(this.parameters.vvSize.offset[0]+t*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else l&&(c*=l.data[0]);const p=a[0],h=a[1],m=(c/2+4)*t;let u=Number.MAX_VALUE,f=0;const T=e.get(x.POSITION).data,d=$(this.parameters,e)?T.length-2:T.length-5;for(let _=0;_<d;_+=3){const e=T[_],t=T[_+1],i=(_+3)%T.length,s=p-e,a=h-t,n=T[i]-e,o=T[i+1]-t,l=r((n*s+o*a)/(n*n+o*o),0,1),c=n*l-s,m=o*l-a,d=c*c+m*m;d<u&&(u=d,f=_/3)}u<m*m&&n(o.dist,o.normal,f,!1)}intersect(e,i,u,f,T,_){if(!u.options.selectionMode||!e.visible)return;if(!M(i))return void t.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial").error("intersection assumes a translation-only matrix");const g=e.attributes,v=g.get(x.POSITION).data;let P=this.parameters.width;if(this.parameters.vvSize){const e=g.get(x.SIZEFEATUREATTRIBUTE).data[0];Number.isNaN(e)||(P*=r(this.parameters.vvSize.offset[0]+e*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0]))}else g.has(x.SIZE)&&(P*=g.get(x.SIZE).data[0]);const N=u.camera,L=ae;s(L,u.point);const b=P*N.pixelRatio/2+4*N.pixelRatio;a(Te[0],L[0]-b,L[1]+b,0),a(Te[1],L[0]+b,L[1]+b,0),a(Te[2],L[0]+b,L[1]-b,0),a(Te[3],L[0]-b,L[1]-b,0);for(let t=0;t<4;t++)if(!N.unprojectFromRenderScreen(Te[t],de[t]))return;O(N.eye,de[0],de[1],_e),O(N.eye,de[1],de[2],Ee),O(N.eye,de[2],de[3],Ae),O(N.eye,de[3],de[0],Re);let C=Number.MAX_VALUE,U=0;const y=$(this.parameters,g)?v.length-2:v.length-5;for(let t=0;t<y;t+=3){te[0]=v[t]+i[12],te[1]=v[t+1]+i[13],te[2]=v[t+2]+i[14];const e=(t+3)%v.length;if(re[0]=v[e]+i[12],re[1]=v[e+1]+i[13],re[2]=v[e+2]+i[14],S(_e,te)<0&&S(_e,re)<0||S(Ee,te)<0&&S(Ee,re)<0||S(Ae,te)<0&&S(Ae,re)<0||S(Re,te)<0&&S(Re,re)<0)continue;if(N.projectToRenderScreen(te,ne),N.projectToRenderScreen(re,oe),ne[2]<0&&oe[2]>0){n(ie,te,re);const e=N.frustum,t=-S(e[d.NEAR],te)/o(ie,I(e[d.NEAR]));l(ie,ie,t),c(te,te,ie),N.projectToRenderScreen(te,ne)}else if(ne[2]>0&&oe[2]<0){n(ie,re,te);const e=N.frustum,t=-S(e[d.NEAR],re)/o(ie,I(e[d.NEAR]));l(ie,ie,t),c(re,re,ie),N.projectToRenderScreen(re,oe)}else if(ne[2]<0&&oe[2]<0)continue;ne[2]=0,oe[2]=0;const r=E(A(ne,oe,pe),L);r<C&&(C=r,p(le,te),p(ce,re),U=t/3)}const j=u.rayBegin,D=u.rayEnd;if(C<b*b){let e=Number.MAX_VALUE;if(R(A(le,ce,pe),A(j,D,he),se)){n(se,se,j);const t=h(se);l(se,se,1/t),e=t/m(j,D)}_(e,se,U,!1)}}get _layout(){const e=v().vec3f(x.POSITION).vec3f(x.PREVPOSITION).vec3f(x.NEXTPOSITION).vec2f16(x.LINEPARAMETERS).f32(x.U0);return this.parameters.vvColor?e.f32(x.COLORFEATUREATTRIBUTE):e.vec4u8(x.COLOR),this.parameters.vvSize?e.f16(x.SIZEFEATUREATTRIBUTE):e.f16(x.SIZE),this.parameters.vvOpacity&&e.f16(x.OPACITYFEATUREATTRIBUTE),y()&&e.vec4u8(x.OLIDCOLOR),e}createBufferWriter(){return new Q(this._layout,this.parameters)}createGLMaterial(e){return new q(e)}validateParameters(e){"miter"!==e.join&&(e.miterLimit=0),null!=e.markerParameters&&(e.markerScale=e.markerParameters.width/e.width)}}class q extends j{constructor(){super(...arguments),this._stipplePattern=null}dispose(){super.dispose(),this._stippleTextures.release(this._stipplePattern),this._stipplePattern=null}beginSlot(e){const t=this._material.parameters.stipplePattern;return this._stipplePattern!==t&&(this._material.setParameters({stippleTexture:this._stippleTextures.swap(t,this._stipplePattern)}),this._stipplePattern=t),this.getTechnique(G,e)}}class X extends J{constructor(){super(...arguments),this.width=0,this.color=T,this.join="miter",this.cap=V.BUTT,this.miterLimit=5,this.writeDepth=!0,this.hasPolygonOffset=!1,this.stippleTexture=null,this.stipplePreferContinuous=!0,this.markerParameters=null,this.markerScale=1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.isClosed=!1,this.falloff=0,this.innerWidth=0,this.wireframe=!1}get transparent(){return this.color[3]<1||null!=this.stipplePattern&&(this.stippleOffColor?.[3]??0)<1}}class Q{constructor(e,t){this.vertexBufferLayout=e,this._parameters=t,this.numJoinSubdivisions=0;const r=t.stipplePattern?1:0;switch(this._parameters.join){case"miter":case"bevel":this.numJoinSubdivisions=r;break;case"round":this.numJoinSubdivisions=z+r}}_isClosed(e){return $(this._parameters,e)}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){const t=2,r=e.get(x.POSITION).indices.length/2+1,i=this._isClosed(e);let s=i?2:2*t;return s+=((i?r:r-1)-(i?0:1))*(2*this.numJoinSubdivisions+4),s+=2,this._parameters.wireframe&&(s=2+4*(s-2)),s}write(t,r,i,s,n,o){const l=i.get(x.POSITION),c=l.indices,h=l.data.length/3,f=i.get(x.DISTANCETOSTART)?.data;c&&c.length!==2*(h-1)&&console.warn("RibbonLineMaterial does not support indices");const T=i.get(x.SIZEFEATUREATTRIBUTE)?.data[0]??i.get(x.SIZE)?.data[0]??1;let d=[1,1,1,1],_=0;const E=this.vertexBufferLayout.fields.has(x.COLORFEATUREATTRIBUTE);E?_=i.get(x.COLORFEATUREATTRIBUTE).data[0]:i.has(x.COLOR)&&(d=i.get(x.COLOR).data);const A=this.vertexBufferLayout.fields.has(x.OPACITYFEATUREATTRIBUTE),R=A?i.get(x.OPACITYFEATUREATTRIBUTE).data[0]:0,g=new Float32Array(n.buffer),O=new e(n.buffer),S=new Uint8Array(n.buffer),I=this.vertexBufferLayout.stride/4;let v=o*I;const P=v;let N=0;const L=f?(e,t,r)=>N=f[r]:(e,t,r)=>N+=m(e,t),b=(e,t,r,i,a,n,o)=>{g[v++]=t[0],g[v++]=t[1],g[v++]=t[2],g[v++]=e[0],g[v++]=e[1],g[v++]=e[2],g[v++]=r[0],g[v++]=r[1],g[v++]=r[2];let l=2*v;if(O[l]=i,O[l+1]=a,v++,g[v++]=o,E)g[v++]=_;else{const e=Math.min(4*n,d.length-4),t=4*v;v++,S[t]=d[e],S[t+1]=d[e+1],S[t+2]=d[e+2],S[t+3]=d[e+3]}l=2*v,O[l++]=T,A&&(O[l++]=R);let c=2*l;y()&&s&&(S[c++]=s[0],S[c++]=s[1],S[c++]=s[2],S[c++]=s[3]),v=Math.ceil(.25*c)};v+=I;const C=a(me,l.data[0],l.data[1],l.data[2]);t&&u(C,C,t);const U=this._isClosed(i),j=ue,D=fe;if(U){const e=l.data.length-3;a(j,l.data[e],l.data[e+1],l.data[e+2]),t&&u(j,j,t)}else a(D,l.data[3],l.data[4],l.data[5]),t&&u(D,D,t),b(C,C,D,1,W.LEFT_CAP_START,0,0),b(C,C,D,1,W.RIGHT_CAP_START,0,0),p(j,C),p(C,D);const w=U?0:1,F=U?h:h-1;for(let e=w;e<F;e++){const r=(e+1)%h*3;a(D,l.data[r],l.data[r+1],l.data[r+2]),t&&u(D,D,t),L(j,C,e),b(j,C,D,0,W.LEFT_JOIN_END,e,N),b(j,C,D,0,W.RIGHT_JOIN_END,e,N);const i=this.numJoinSubdivisions;for(let t=0;t<i;++t){const r=(t+1)/(i+1);b(j,C,D,r,W.LEFT_JOIN_END,e,N),b(j,C,D,r,W.RIGHT_JOIN_END,e,N)}b(j,C,D,1,W.LEFT_JOIN_START,e,N),b(j,C,D,1,W.RIGHT_JOIN_START,e,N),p(j,C),p(C,D)}U?(a(D,l.data[3],l.data[4],l.data[5]),t&&u(D,D,t),N=L(j,C,F),b(j,C,D,0,W.LEFT_JOIN_END,w,N),b(j,C,D,0,W.RIGHT_JOIN_END,w,N)):(N=L(j,C,F),b(j,C,C,0,W.LEFT_CAP_END,F,N),b(j,C,C,0,W.RIGHT_CAP_END,F,N)),K(g,P+I,g,P,I);return v=K(g,v-I,g,v,I),this._parameters.wireframe&&this._addWireframeVertices(n,P,v,I),null}_addWireframeVertices(e,t,r,i){const s=new Float32Array(e.buffer,r*Float32Array.BYTES_PER_ELEMENT),a=new Float32Array(e.buffer,t*Float32Array.BYTES_PER_ELEMENT,r-t);let n=0;const o=e=>n=K(a,e,s,n,i);for(let l=0;l<a.length-1;l+=2*i)o(l),o(l+2*i),o(l+1*i),o(l+2*i),o(l+1*i),o(l+3*i)}}function K(e,t,r,i,s){for(let a=0;a<s;a++)r[i++]=e[t++];return i}function $(e,t){if(!e.isClosed)return!1;return t.get(x.POSITION).indices.length>2}function ee(e){return e.anchor===B.Tip&&e.hideOnShortSegments&&"begin-end"===e.placement&&e.worldSpace}const te=f(),re=f(),ie=f(),se=f(),ae=f(),ne=i(),oe=i(),le=f(),ce=f(),pe=_(),he=_(),me=f(),ue=f(),fe=f(),Te=[i(),i(),i(),i()],de=[f(),f(),f(),f()],_e=g(),Ee=g(),Ae=g(),Re=g();export{X as Parameters,Y as RibbonLineMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{hasIdentityRotation as e,isOrthoNormal as t}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{BufferViewVec4u8 as f,BufferViewVec2f as r,BufferViewVec4f as o,BufferViewFloat as i,BufferViewVec2i16 as s,BufferViewVec2f16 as n,BufferViewVec3f as c}from"../../../../../geometry/support/buffer/BufferView.js";import{assert as l}from"../../lib/Util.js";import{VertexAttribute as d}from"../../lib/VertexAttribute.js";function u(e,t,f,r=1){const{data:o,indices:i}=e,s=t.typedBuffer,n=t.typedBufferStride,c=i.length;if(f*=n,1===r)for(let l=0;l<c;++l)s[f]=o[i[l]],f+=n;else for(let l=0;l<c;++l){const e=o[i[l]];for(let t=0;t<r;t++)s[f]=e,f+=n}}function a(e,t,f){const{data:r,indices:o}=e,i=t.typedBuffer,s=t.typedBufferStride,n=o.length;f*=s;for(let c=0;c<n;++c){const e=2*o[c];i[f]=r[e],i[f+1]=r[e+1],f+=s}}function p(e,t,f,r=1){const{data:o,indices:i}=e,s=t.typedBuffer,n=t.typedBufferStride,c=i.length;if(f*=n,1===r)for(let l=0;l<c;++l){const e=3*i[l];s[f]=o[e],s[f+1]=o[e+1],s[f+2]=o[e+2],f+=n}else for(let l=0;l<c;++l){const e=3*i[l];for(let t=0;t<r;++t)s[f]=o[e],s[f+1]=o[e+1],s[f+2]=o[e+2],f+=n}}function y(e,t,f,r=1){const{data:o,indices:i}=e,s=t.typedBuffer,n=t.typedBufferStride,c=i.length;if(f*=n,1===r)for(let l=0;l<c;++l){const e=4*i[l];s[f]=o[e],s[f+1]=o[e+1],s[f+2]=o[e+2],s[f+3]=o[e+3],f+=n}else for(let l=0;l<c;++l){const e=4*i[l];for(let t=0;t<r;++t)s[f]=o[e],s[f+1]=o[e+1],s[f+2]=o[e+2],s[f+3]=o[e+3],f+=n}}function B(e,t,f){const r=e.typedBuffer,o=e.typedBufferStride;t*=o;for(let i=0;i<f;++i)r[t]=0,r[t+1]=0,r[t+2]=0,r[t+3]=0,t+=o}function g(e,t,f){const{data:r,indices:o}=e,i=t.typedBuffer,s=t.typedBufferStride,n=o.length;f*=s;for(let c=0;c<n;++c){const e=9*o[c];for(let t=0;t<9;++t)i[f+t]=r[e+t];f+=s}}function b(e,t,f){const{data:r,indices:o}=e,i=t.typedBuffer,s=t.typedBufferStride,n=o.length;f*=s;for(let c=0;c<n;++c){const e=16*o[c];for(let t=0;t<16;++t)i[f+t]=r[e+t];f+=s}}function O(t,f,r,o,i=1){if(!f)return void p(t,r,o,i);const{data:s,indices:n}=t,c=r.typedBuffer,l=r.typedBufferStride,d=n.length,u=f[0],a=f[1],y=f[2],B=f[4],g=f[5],b=f[6],O=f[8],h=f[9],m=f[10],N=f[12],S=f[13],I=f[14];o*=l;let F=0,R=0,z=0;const E=e(f)?e=>{F=s[e]+N,R=s[e+1]+S,z=s[e+2]+I}:e=>{const t=s[e],f=s[e+1],r=s[e+2];F=u*t+B*f+O*r+N,R=a*t+g*f+h*r+S,z=y*t+b*f+m*r+I};if(1===i)for(let e=0;e<d;++e)E(3*n[e]),c[o]=F,c[o+1]=R,c[o+2]=z,o+=l;else for(let e=0;e<d;++e){E(3*n[e]);for(let e=0;e<i;++e)c[o]=F,c[o+1]=R,c[o+2]=z,o+=l}}function h(f,r,o,i,s=1){if(!r)return void p(f,o,i,s);const{data:n,indices:c}=f,l=r,d=o.typedBuffer,u=o.typedBufferStride,a=c.length,y=l[0],B=l[1],g=l[2],b=l[4],O=l[5],h=l[6],m=l[8],N=l[9],S=l[10],I=!t(l),F=1e-6,R=1-F;i*=u;let z=0,E=0,A=0;const L=e(l)?e=>{z=n[e],E=n[e+1],A=n[e+2]}:e=>{const t=n[e],f=n[e+1],r=n[e+2];z=y*t+b*f+m*r,E=B*t+O*f+N*r,A=g*t+h*f+S*r};if(1===s)if(I)for(let e=0;e<a;++e){L(3*c[e]);const t=z*z+E*E+A*A;if(t<R&&t>F){const e=1/Math.sqrt(t);d[i]=z*e,d[i+1]=E*e,d[i+2]=A*e}else d[i]=z,d[i+1]=E,d[i+2]=A;i+=u}else for(let e=0;e<a;++e)L(3*c[e]),d[i]=z,d[i+1]=E,d[i+2]=A,i+=u;else for(let e=0;e<a;++e){if(L(3*c[e]),I){const e=z*z+E*E+A*A;if(e<R&&e>F){const t=1/Math.sqrt(e);z*=t,E*=t,A*=t}}for(let e=0;e<s;++e)d[i]=z,d[i+1]=E,d[i+2]=A,i+=u}}function m(e,f,r,o,i=1){if(!f)return void y(e,r,o,i);const{data:s,indices:n}=e,c=f,l=r.typedBuffer,d=r.typedBufferStride,u=n.length,a=c[0],p=c[1],B=c[2],g=c[4],b=c[5],O=c[6],h=c[8],m=c[9],N=c[10],S=!t(c),I=1e-6,F=1-I;if(o*=d,1===i)for(let t=0;t<u;++t){const e=4*n[t],f=s[e],r=s[e+1],i=s[e+2],c=s[e+3];let u=a*f+g*r+h*i,y=p*f+b*r+m*i,R=B*f+O*r+N*i;if(S){const e=u*u+y*y+R*R;if(e<F&&e>I){const t=1/Math.sqrt(e);u*=t,y*=t,R*=t}}l[o]=u,l[o+1]=y,l[o+2]=R,l[o+3]=c,o+=d}else for(let t=0;t<u;++t){const e=4*n[t],f=s[e],r=s[e+1],c=s[e+2],u=s[e+3];let y=a*f+g*r+h*c,R=p*f+b*r+m*c,z=B*f+O*r+N*c;if(S){const e=y*y+R*R+z*z;if(e<F&&e>I){const t=1/Math.sqrt(e);y*=t,R*=t,z*=t}}for(let t=0;t<i;++t)l[o]=y,l[o+1]=R,l[o+2]=z,l[o+3]=u,o+=d}}function N(e,t,f,r,o=1){const{data:i,indices:s}=e,n=f.typedBuffer,c=f.typedBufferStride,l=s.length;if(r*=c,t!==i.length||4!==t)if(1!==o)if(4!==t)for(let d=0;d<l;++d){const e=3*s[d];for(let t=0;t<o;++t)n[r]=i[e],n[r+1]=i[e+1],n[r+2]=i[e+2],n[r+3]=255,r+=c}else for(let d=0;d<l;++d){const e=4*s[d];for(let t=0;t<o;++t)n[r]=i[e],n[r+1]=i[e+1],n[r+2]=i[e+2],n[r+3]=i[e+3],r+=c}else{if(4===t){for(let e=0;e<l;++e){const t=4*s[e];n[r]=i[t],n[r+1]=i[t+1],n[r+2]=i[t+2],n[r+3]=i[t+3],r+=c}return}for(let e=0;e<l;++e){const t=3*s[e];n[r]=i[t],n[r+1]=i[t+1],n[r+2]=i[t+2],n[r+3]=255,r+=c}}else{n[r]=i[0],n[r+1]=i[1],n[r+2]=i[2],n[r+3]=i[3];const e=new Uint32Array(f.typedBuffer.buffer,f.start),t=c/4,s=e[r/=4];r+=t;const d=l*o;for(let f=1;f<d;++f)e[r]=s,r+=t}}function S(e,t,f){const{data:r,indices:o}=e,i=t.typedBuffer,s=t.typedBufferStride,n=o.length,c=r[0];f*=s;for(let l=0;l<n;++l)i[f]=c,f+=s}function I(e,t,f,r,o=1){const i=t.typedBuffer,s=t.typedBufferStride;if(r*=s,1===o)for(let n=0;n<f;++n)i[r]=e[0],i[r+1]=e[1],i[r+2]=e[2],i[r+3]=e[3],r+=s;else for(let n=0;n<f;++n)for(let t=0;t<o;++t)i[r]=e[0],i[r+1]=e[1],i[r+2]=e[2],i[r+3]=e[3],r+=s}function F(e,t,r,o,i,s,n){let c={numItems:0,numVerticesPerItem:0};for(const l of r.fields.keys()){const r=e.get(l),u=r?.indices;if(r&&u)l===d.POSITION&&(c={numItems:1,numVerticesPerItem:u.length}),R(l,r,o,i,s,n);else if(l===d.OLIDCOLOR&&null!=t){const r=e.get(d.POSITION)?.indices;if(r){const e=r.length;I(t,s.getField(l,f),e,n)}}}return c}function R(e,t,u,p,B,g){switch(e){case d.POSITION:{l(3===t.size);const f=B.getField(e,c);l(!!f,`No buffer view for ${e}`),f&&O(t,u,f,g);break}case d.NORMAL:{l(3===t.size);const f=B.getField(e,c);l(!!f,`No buffer view for ${e}`),f&&h(t,p,f,g);break}case d.NORMALCOMPRESSED:case d.PROFILERIGHT:case d.PROFILEUP:{l(2===t.size);const f=B.getField(e,s);l(!!f,`No buffer view for ${e}`),f&&a(t,f,g);break}case d.UV0:{l(2===t.size);const f=B.getField(e,n);l(!!f,`No buffer view for ${e}`),f&&a(t,f,g);break}case d.UVI:{l(2===t.size);const f=B.getField(e,s);l(!!f,`No buffer view for ${e}`),f&&a(t,f,g);break}case d.COLOR:case d.SYMBOLCOLOR:{const r=B.getField(e,f);l(!!r,`No buffer view for ${e}`),l(3===t.size||4===t.size),!r||3!==t.size&&4!==t.size||N(t,t.size,r,g);break}case d.COLORFEATUREATTRIBUTE:{const f=B.getField(e,i);l(!!f,`No buffer view for ${e}`),l(1===t.size),f&&1===t.size&&S(t,f,g);break}case d.TANGENT:{l(4===t.size);const f=B.getField(e,o);l(!!f,`No buffer view for ${e}`),f&&m(t,u,f,g);break}case d.PROFILEVERTEXANDNORMAL:case d.FEATUREVALUE:{l(4===t.size);const f=B.getField(e,o);l(!!f,`No buffer view for ${e}`),f&&y(t,f,g)}break;case d.PROFILEAUXDATA:{l(2===t.size);const f=B.getField(e,r);l(!!f,`No buffer view for ${e}`),f&&a(t,f,g)}}}export{u as writeBufferFloat,g as writeBufferMat3f,b as writeBufferMat4f,a as writeBufferVec2,p as writeBufferVec3,y as writeBufferVec4,B as writeBufferVec4Zeros,N as writeColor,S as writeColorFeatureAttribute,R as writeDefaultAttribute,F as writeDefaultAttributes,h as writeNormal,I as writeOlidColor,O as writePosition,m as writeTangent};
5
+ import{hasIdentityRotation as e,isOrthoNormal as t}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{BufferViewVec4u8 as f,BufferViewVec2f as r,BufferViewVec4f16 as o,BufferViewVec4f as i,BufferViewFloat as s,BufferViewVec2i16 as n,BufferViewVec2f16 as c,BufferViewVec3f as l}from"../../../../../geometry/support/buffer/BufferView.js";import{assert as d}from"../../lib/Util.js";import{VertexAttribute as u}from"../../lib/VertexAttribute.js";function a(e,t,f,r=1){const{data:o,indices:i}=e,s=t.typedBuffer,n=t.typedBufferStride,c=i.length;if(f*=n,1===r)for(let l=0;l<c;++l)s[f]=o[i[l]],f+=n;else for(let l=0;l<c;++l){const e=o[i[l]];for(let t=0;t<r;t++)s[f]=e,f+=n}}function p(e,t,f){const{data:r,indices:o}=e,i=t.typedBuffer,s=t.typedBufferStride,n=o.length;f*=s;for(let c=0;c<n;++c){const e=2*o[c];i[f]=r[e],i[f+1]=r[e+1],f+=s}}function g(e,t,f,r=1){const{data:o,indices:i}=e,s=t.typedBuffer,n=t.typedBufferStride,c=i.length;if(f*=n,1===r)for(let l=0;l<c;++l){const e=3*i[l];s[f]=o[e],s[f+1]=o[e+1],s[f+2]=o[e+2],f+=n}else for(let l=0;l<c;++l){const e=3*i[l];for(let t=0;t<r;++t)s[f]=o[e],s[f+1]=o[e+1],s[f+2]=o[e+2],f+=n}}function y(e,t,f,r=1){const{data:o,indices:i}=e,s=t.typedBuffer,n=t.typedBufferStride,c=i.length;if(f*=n,1===r)for(let l=0;l<c;++l){const e=4*i[l];s[f]=o[e],s[f+1]=o[e+1],s[f+2]=o[e+2],s[f+3]=o[e+3],f+=n}else for(let l=0;l<c;++l){const e=4*i[l];for(let t=0;t<r;++t)s[f]=o[e],s[f+1]=o[e+1],s[f+2]=o[e+2],s[f+3]=o[e+3],f+=n}}function B(e,t,f){const r=e.typedBuffer,o=e.typedBufferStride;t*=o;for(let i=0;i<f;++i)r[t]=0,r[t+1]=0,r[t+2]=0,r[t+3]=0,t+=o}function b(e,t,f){const{data:r,indices:o}=e,i=t.typedBuffer,s=t.typedBufferStride,n=o.length;f*=s;for(let c=0;c<n;++c){const e=9*o[c];for(let t=0;t<9;++t)i[f+t]=r[e+t];f+=s}}function O(e,t,f){const{data:r,indices:o}=e,i=t.typedBuffer,s=t.typedBufferStride,n=o.length;f*=s;for(let c=0;c<n;++c){const e=16*o[c];for(let t=0;t<16;++t)i[f+t]=r[e+t];f+=s}}function h(t,f,r,o,i=1){if(!f)return void g(t,r,o,i);const{data:s,indices:n}=t,c=r.typedBuffer,l=r.typedBufferStride,d=n.length,u=f[0],a=f[1],p=f[2],y=f[4],B=f[5],b=f[6],O=f[8],h=f[9],m=f[10],N=f[12],S=f[13],F=f[14];o*=l;let I=0,R=0,z=0;const E=e(f)?e=>{I=s[e]+N,R=s[e+1]+S,z=s[e+2]+F}:e=>{const t=s[e],f=s[e+1],r=s[e+2];I=u*t+y*f+O*r+N,R=a*t+B*f+h*r+S,z=p*t+b*f+m*r+F};if(1===i)for(let e=0;e<d;++e)E(3*n[e]),c[o]=I,c[o+1]=R,c[o+2]=z,o+=l;else for(let e=0;e<d;++e){E(3*n[e]);for(let e=0;e<i;++e)c[o]=I,c[o+1]=R,c[o+2]=z,o+=l}}function m(f,r,o,i,s=1){if(!r)return void g(f,o,i,s);const{data:n,indices:c}=f,l=r,d=o.typedBuffer,u=o.typedBufferStride,a=c.length,p=l[0],y=l[1],B=l[2],b=l[4],O=l[5],h=l[6],m=l[8],N=l[9],S=l[10],F=!t(l),I=1e-6,R=1-I;i*=u;let z=0,E=0,v=0;const w=e(l)?e=>{z=n[e],E=n[e+1],v=n[e+2]}:e=>{const t=n[e],f=n[e+1],r=n[e+2];z=p*t+b*f+m*r,E=y*t+O*f+N*r,v=B*t+h*f+S*r};if(1===s)if(F)for(let e=0;e<a;++e){w(3*c[e]);const t=z*z+E*E+v*v;if(t<R&&t>I){const e=1/Math.sqrt(t);d[i]=z*e,d[i+1]=E*e,d[i+2]=v*e}else d[i]=z,d[i+1]=E,d[i+2]=v;i+=u}else for(let e=0;e<a;++e)w(3*c[e]),d[i]=z,d[i+1]=E,d[i+2]=v,i+=u;else for(let e=0;e<a;++e){if(w(3*c[e]),F){const e=z*z+E*E+v*v;if(e<R&&e>I){const t=1/Math.sqrt(e);z*=t,E*=t,v*=t}}for(let e=0;e<s;++e)d[i]=z,d[i+1]=E,d[i+2]=v,i+=u}}function N(e,f,r,o,i=1){if(!f)return void y(e,r,o,i);const{data:s,indices:n}=e,c=f,l=r.typedBuffer,d=r.typedBufferStride,u=n.length,a=c[0],p=c[1],g=c[2],B=c[4],b=c[5],O=c[6],h=c[8],m=c[9],N=c[10],S=!t(c),F=1e-6,I=1-F;if(o*=d,1===i)for(let t=0;t<u;++t){const e=4*n[t],f=s[e],r=s[e+1],i=s[e+2],c=s[e+3];let u=a*f+B*r+h*i,y=p*f+b*r+m*i,R=g*f+O*r+N*i;if(S){const e=u*u+y*y+R*R;if(e<I&&e>F){const t=1/Math.sqrt(e);u*=t,y*=t,R*=t}}l[o]=u,l[o+1]=y,l[o+2]=R,l[o+3]=c,o+=d}else for(let t=0;t<u;++t){const e=4*n[t],f=s[e],r=s[e+1],c=s[e+2],u=s[e+3];let y=a*f+B*r+h*c,R=p*f+b*r+m*c,z=g*f+O*r+N*c;if(S){const e=y*y+R*R+z*z;if(e<I&&e>F){const t=1/Math.sqrt(e);y*=t,R*=t,z*=t}}for(let t=0;t<i;++t)l[o]=y,l[o+1]=R,l[o+2]=z,l[o+3]=u,o+=d}}function S(e,t,f,r,o=1){const{data:i,indices:s}=e,n=f.typedBuffer,c=f.typedBufferStride,l=s.length;if(r*=c,t!==i.length||4!==t)if(1!==o)if(4!==t)for(let d=0;d<l;++d){const e=3*s[d];for(let t=0;t<o;++t)n[r]=i[e],n[r+1]=i[e+1],n[r+2]=i[e+2],n[r+3]=255,r+=c}else for(let d=0;d<l;++d){const e=4*s[d];for(let t=0;t<o;++t)n[r]=i[e],n[r+1]=i[e+1],n[r+2]=i[e+2],n[r+3]=i[e+3],r+=c}else{if(4===t){for(let e=0;e<l;++e){const t=4*s[e];n[r]=i[t],n[r+1]=i[t+1],n[r+2]=i[t+2],n[r+3]=i[t+3],r+=c}return}for(let e=0;e<l;++e){const t=3*s[e];n[r]=i[t],n[r+1]=i[t+1],n[r+2]=i[t+2],n[r+3]=255,r+=c}}else{n[r]=i[0],n[r+1]=i[1],n[r+2]=i[2],n[r+3]=i[3];const e=new Uint32Array(f.typedBuffer.buffer,f.start),t=c/4,s=e[r/=4];r+=t;const d=l*o;for(let f=1;f<d;++f)e[r]=s,r+=t}}function F(e,t,f){const{data:r,indices:o}=e,i=t.typedBuffer,s=t.typedBufferStride,n=o.length,c=r[0];f*=s;for(let l=0;l<n;++l)i[f]=c,f+=s}function I(e,t,f,r,o=1){const i=t.typedBuffer,s=t.typedBufferStride;if(r*=s,1===o)for(let n=0;n<f;++n)i[r]=e[0],i[r+1]=e[1],i[r+2]=e[2],i[r+3]=e[3],r+=s;else for(let n=0;n<f;++n)for(let t=0;t<o;++t)i[r]=e[0],i[r+1]=e[1],i[r+2]=e[2],i[r+3]=e[3],r+=s}function R(e,t,r,o,i,s,n){let c={numItems:0,numVerticesPerItem:0};for(const l of r.fields.keys()){const r=e.get(l),d=r?.indices;if(r&&d)l===u.POSITION&&(c={numItems:1,numVerticesPerItem:d.length}),z(l,r,o,i,s,n);else if(l===u.OLIDCOLOR&&null!=t){const r=e.get(u.POSITION)?.indices;if(r){const e=r.length;I(t,s.getField(l,f),e,n)}}}return c}function z(e,t,a,g,B,b){switch(e){case u.POSITION:{d(3===t.size);const f=B.getField(e,l);d(!!f,`No buffer view for ${e}`),f&&h(t,a,f,b);break}case u.NORMAL:{d(3===t.size);const f=B.getField(e,l);d(!!f,`No buffer view for ${e}`),f&&m(t,g,f,b);break}case u.NORMALCOMPRESSED:case u.PROFILERIGHT:case u.PROFILEUP:{d(2===t.size);const f=B.getField(e,n);d(!!f,`No buffer view for ${e}`),f&&p(t,f,b);break}case u.UV0:{d(2===t.size);const f=B.getField(e,c);d(!!f,`No buffer view for ${e}`),f&&p(t,f,b);break}case u.UVI:{d(2===t.size);const f=B.getField(e,n);d(!!f,`No buffer view for ${e}`),f&&p(t,f,b);break}case u.COLOR:case u.SYMBOLCOLOR:{const r=B.getField(e,f);d(!!r,`No buffer view for ${e}`),d(3===t.size||4===t.size),!r||3!==t.size&&4!==t.size||S(t,t.size,r,b);break}case u.COLORFEATUREATTRIBUTE:{const f=B.getField(e,s);d(!!f,`No buffer view for ${e}`),d(1===t.size),f&&1===t.size&&F(t,f,b);break}case u.TANGENT:{d(4===t.size);const f=B.getField(e,i);d(!!f,`No buffer view for ${e}`),f&&N(t,a,f,b);break}case u.PROFILEVERTEXANDNORMAL:{d(4===t.size);const f=B.getField(e,i);d(!!f,`No buffer view for ${e}`),f&&y(t,f,b)}break;case u.FEATUREVALUE:{d(4===t.size);const f=B.getField(e,o);d(!!f,`No buffer view for ${e}`),f&&y(t,f,b)}break;case u.PROFILEAUXDATA:{d(2===t.size);const f=B.getField(e,r);d(!!f,`No buffer view for ${e}`),f&&p(t,f,b)}}}export{a as writeBufferFloat,b as writeBufferMat3f,O as writeBufferMat4f,p as writeBufferVec2,g as writeBufferVec3,y as writeBufferVec4,B as writeBufferVec4Zeros,S as writeColor,F as writeColorFeatureAttribute,z as writeDefaultAttribute,R as writeDefaultAttributes,m as writeNormal,I as writeOlidColor,h as writePosition,N as writeTangent};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Logger.js";import{watch as i,syncAndInitial as s}from"../core/reactiveUtils.js";import{property as o}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import a from"./Widget.js";import{css as n}from"./Daylight/css.js";import r from"./Daylight/DaylightViewModel.js";import d from"./Daylight/VisibleElements.js";import{orderedSeasons as c}from"./Daylight/support/daylightUtils.js";import p from"./Daylight/support/SliderWithDropdown.js";import{loadCalciteComponents as h}from"./support/componentsUtils.js";import{globalCss as g}from"./support/globalCss.js";import{Heading as m}from"./support/Heading.js";import{onPrimaryTickCreated as u,onSecondaryTickCreated as y,useAmPm as b}from"./support/timeWidgetUtils.js";import"./support/widgetUtils.js";import{messageBundle as v}from"./support/decorators/messageBundle.js";import{tsx as S,tsxFragment as w}from"./support/jsxFactory.js";const k="date";let C=class extends a{constructor(e,t){super(e,t),this.headingLevel=3,this.viewModel=new r,this.visibleElements=new d,this.dateOrSeason=k,this._timeSlider=new p({viewModel:this.viewModel.timeSliderViewModel,steps:this.timeSliderSteps,labelInputsEnabled:!1,visibleElements:{labels:!0},tickConfigs:[{mode:"position",values:[0,360,720,1080,1439],labelsVisible:!0,tickCreatedFunction:(e,t,i)=>u({tickElement:t,labelElement:i,tickClasses:_,onClick:this._makeGoToTime(e)})},{mode:"position",values:[120,240,480,600,840,960,1200,1320],tickCreatedFunction:(e,t)=>y({tickElement:t,tickClasses:_,onClick:this._makeGoToTime(e)})}]}),this._onPlayDayClick=()=>{this.viewModel.toggleDayPlaying()},this._onDateChange=e=>{const t=e.currentTarget.valueAsDate;this.viewModel.onDateChange(Array.isArray(t)?t[0]:t)},this._onYearPlayClick=()=>{this.viewModel.toggleYearPlaying()},this._onSeasonChange=e=>{this.viewModel.currentSeason=e.currentTarget.value},this._onSunLightingCheckboxChange=()=>{this.viewModel.toggleSunLightingEnabled()},this._onShadowCheckboxChange=()=>{this.viewModel.toggleDirectShadowsEnabled()}}get icon(){return"brightness"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.title??""}set label(e){this._overrideIfSome("label",e)}get playSpeedMultiplier(){return this.viewModel.playSpeedMultiplier}set playSpeedMultiplier(e){this.viewModel.playSpeedMultiplier=e}get timeSliderSteps(){return this._timeSlider?.steps??5}set timeSliderSteps(e){this._timeSlider.steps=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}postInitialize(){this.viewModel.isSupported&&this.addHandles([i((()=>this.viewModel.timeSliderViewModel),(e=>this._timeSlider.viewModel=e),s),i((()=>this.visibleElements?.timezone),(e=>this._timeSlider.showDropDown=e),s),i((()=>!this.viewModel.sunLightingEnabled),(e=>{this._timeSlider.disabled=e}),s)])}destroy(){this._timeSlider.destroy()}render(){const{messages:e,viewModel:t,visibleElements:i}=this,s=t.isSupported;return S("div",{class:this.classes(n.base,g.widget)},s?S(w,null,i.header?S(m,{level:this.headingLevel},e.title):null,this._renderTimeOptions(),i.datePicker?this._renderDateOrSeason():null,i.sunLightingToggle?this._renderSunLightingToggle():null,i.shadowsToggle?this._renderShadowsToggle():null):S("div",{class:n.panelError,key:"unsupported"},S("p",null,e.unsupported)))}loadDependencies(){return h({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),checkbox:()=>import("@esri/calcite-components/dist/components/calcite-checkbox"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),"input-date-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-date-picker"),option:()=>import("@esri/calcite-components/dist/components/calcite-option"),select:()=>import("@esri/calcite-components/dist/components/calcite-select")})}_renderTimeOptions(){const{viewModel:e,visibleElements:t,messages:i}=this,{directShadowsEnabled:s,dayPlaying:o}=e,l=!e.sunLightingEnabled;return S("div",{class:this.classes(n.dayContainer,{[n.sliderShadowOn]:s,[n.sliderShadowOff]:!s,[n.sliderDateOn]:t.datePicker,[n.sliderDateOff]:!t.datePicker,[n.sliderAmPmOn]:b(),[n.containerDisabled]:l}),key:"daylight-time-options"},this._timeSlider.render(),t.playButtons?this._renderPlayPauseButton({playing:o,disabled:l,label:i.playDay,onClick:this._onPlayDayClick}):null)}_renderDateOptions(){const{viewModel:e,visibleElements:t,messages:i}=this,{yearPlaying:s}=e,o=!e.sunLightingEnabled;return S("div",{class:this.classes(n.dateContainer,o&&n.containerDisabled),key:n.dateContainer},S("calcite-input-date-picker",{class:n.datePicker,"data-testid":"daylight-date-picker",disabled:o,key:n.datePicker,overlayPositioning:"fixed",placement:"bottom",valueAsDate:e.localDate,onCalciteInputDatePickerChange:this._onDateChange}),t.playButtons?this._renderPlayPauseButton({playing:s,disabled:o,label:i.playYear,onClick:this._onYearPlayClick}):null)}_renderPlayPauseButton({playing:e,disabled:t,label:i,onClick:s}){return S("calcite-button",{appearance:"solid",class:n.playPauseButton,disabled:t,iconStart:e?"pause-f":"play-f",label:i,onclick:s,round:!0,title:i,type:"button"})}_renderSeasonSelect(){const{messages:e,viewModel:t}=this,i=!t.sunLightingEnabled;return S("calcite-select",{class:this.classes(n.seasonPicker),disabled:i,label:e.season,onCalciteSelectChange:this._onSeasonChange},c.map((i=>S("calcite-option",{selected:t.currentSeason===i,value:i},e[i]))))}_renderDateOrSeason(){return"date"===this.dateOrSeason?this._renderDateOptions():this._renderSeasonSelect()}_renderSunLightingToggle(){const e=this.messages?.sunLightingToggle;return S("calcite-label",{key:"date-time-toggle",layout:"inline",scale:"s",title:e?.tooltip},S("calcite-checkbox",{checked:this.viewModel.sunLightingEnabled,class:n.sunLightingCheckbox,onCalciteCheckboxChange:this._onSunLightingCheckboxChange}),e?.label)}_renderShadowsToggle(){const e=this.messages.shadowsToggle;return S("calcite-label",{key:"shadow-toggle",layout:"inline",scale:"s",title:e?.tooltip},S("calcite-checkbox",{checked:this.viewModel.directShadowsEnabled,class:n.shadowsCheckbox,onCalciteCheckboxChange:this._onShadowCheckboxChange}),e.label)}_makeGoToTime(e){return()=>{this.viewModel.timeSliderPosition=e}}};e([o(),v("esri/widgets/Daylight/t9n/Daylight")],C.prototype,"messages",void 0),e([o(),v("esri/widgets/support/t9n/timezone")],C.prototype,"timezoneMessages",void 0),e([o()],C.prototype,"headingLevel",void 0),e([o()],C.prototype,"icon",null),e([o()],C.prototype,"label",null),e([o()],C.prototype,"playSpeedMultiplier",null),e([o()],C.prototype,"timeSliderSteps",null),e([o()],C.prototype,"view",null),e([o({type:r})],C.prototype,"viewModel",void 0),e([o({type:d,nonNullable:!0})],C.prototype,"visibleElements",void 0),e([o({cast(e){return"season"===e||"date"===e?e:(t.getLogger(this).warn(`"${e}" is not a valid option. Acceptable values are only "date" or "season". Defaulting to "${k}".`),k)}})],C.prototype,"dateOrSeason",void 0),e([o()],C.prototype,"_timeSlider",void 0),C=e([l("esri.widgets.Daylight")],C);const _=[g.interactive,g.anchor],D=C;export{D as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Logger.js";import{watch as i,syncAndInitial as s}from"../core/reactiveUtils.js";import{property as o}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{onLocaleChange as a}from"../intl/locale.js";import n from"./Widget.js";import{css as r}from"./Daylight/css.js";import d from"./Daylight/DaylightViewModel.js";import c from"./Daylight/VisibleElements.js";import{orderedSeasons as p}from"./Daylight/support/daylightUtils.js";import h from"./Daylight/support/SliderWithDropdown.js";import{css as g}from"./Slider/css.js";import{loadCalciteComponents as m}from"./support/componentsUtils.js";import{globalCss as u}from"./support/globalCss.js";import{Heading as y}from"./support/Heading.js";import{onPrimaryTickCreated as b,onSecondaryTickCreated as S,adjustTimeSliderForLocale as v,useAmPm as w}from"./support/timeWidgetUtils.js";import"./support/widgetUtils.js";import{messageBundle as k}from"./support/decorators/messageBundle.js";import{tsx as _,tsxFragment as C}from"./support/jsxFactory.js";const D="date";let M=class extends n{constructor(e,t){super(e,t),this.headingLevel=3,this.viewModel=new d,this.visibleElements=new c,this.dateOrSeason=D,this._timeSlider=new h({viewModel:this.viewModel.timeSliderViewModel,steps:this.timeSliderSteps,labelInputsEnabled:!1,visibleElements:{labels:!0},tickConfigs:[{mode:"position",values:[0,360,720,1080,1439],labelsVisible:!0,tickCreatedFunction:(e,t,i)=>b({tickElement:t,labelElement:i,tickClasses:f,onClick:this._makeGoToTime(e)})},{mode:"position",values:[120,240,480,600,840,960,1200,1320],tickCreatedFunction:(e,t)=>S({tickElement:t,tickClasses:f,onClick:this._makeGoToTime(e)})}]}),this._onPlayDayClick=()=>{this.viewModel.toggleDayPlaying()},this._onDateChange=e=>{const t=e.currentTarget.valueAsDate;this.viewModel.onDateChange(Array.isArray(t)?t[0]:t)},this._onYearPlayClick=()=>{this.viewModel.toggleYearPlaying()},this._onSeasonChange=e=>{this.viewModel.currentSeason=e.currentTarget.value},this._onSunLightingCheckboxChange=()=>{this.viewModel.toggleSunLightingEnabled()},this._onShadowCheckboxChange=()=>{this.viewModel.toggleDirectShadowsEnabled()}}get icon(){return"brightness"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.title??""}set label(e){this._overrideIfSome("label",e)}get playSpeedMultiplier(){return this.viewModel.playSpeedMultiplier}set playSpeedMultiplier(e){this.viewModel.playSpeedMultiplier=e}get timeSliderSteps(){return this._timeSlider?.steps??5}set timeSliderSteps(e){this._timeSlider.steps=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}postInitialize(){this.viewModel.isSupported&&(this.addHandles([i((()=>this.viewModel.timeSliderViewModel),(e=>this._timeSlider.viewModel=e),s),i((()=>this.visibleElements?.timezone),(e=>this._timeSlider.showDropDown=e),s),i((()=>!this.viewModel.sunLightingEnabled),(e=>{this._timeSlider.disabled=e}),s),a((()=>this._adjustTimeSliderPadding()))]),this._adjustTimeSliderPadding())}destroy(){this._timeSlider.destroy()}render(){const{messages:e,viewModel:t,visibleElements:i}=this,s=t.isSupported;return _("div",{class:this.classes(r.base,u.widget)},s?_(C,null,i.header?_(y,{level:this.headingLevel},e.title):null,this._renderTimeOptions(),i.datePicker?this._renderDateOrSeason():null,i.sunLightingToggle?this._renderSunLightingToggle():null,i.shadowsToggle?this._renderShadowsToggle():null):_("div",{class:r.panelError,key:"unsupported"},_("p",null,e.unsupported)))}loadDependencies(){return m({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),checkbox:()=>import("@esri/calcite-components/dist/components/calcite-checkbox"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),"input-date-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-date-picker"),option:()=>import("@esri/calcite-components/dist/components/calcite-option"),select:()=>import("@esri/calcite-components/dist/components/calcite-select")})}_adjustTimeSliderPadding(){v(this.domNode?.querySelector(`.${g.base}`))}_renderTimeOptions(){const{viewModel:e,visibleElements:t,messages:i}=this,{directShadowsEnabled:s,dayPlaying:o}=e,l=!e.sunLightingEnabled;return _("div",{class:this.classes(r.dayContainer,{[r.sliderShadowOn]:s,[r.sliderShadowOff]:!s,[r.sliderDateOn]:t.datePicker,[r.sliderDateOff]:!t.datePicker,[r.sliderAmPmOn]:w(),[r.containerDisabled]:l}),key:"daylight-time-options"},this._timeSlider.render(),t.playButtons?this._renderPlayPauseButton({playing:o,disabled:l,label:i.playDay,onClick:this._onPlayDayClick}):null)}_renderDateOptions(){const{viewModel:e,visibleElements:t,messages:i}=this,{yearPlaying:s}=e,o=!e.sunLightingEnabled;return _("div",{class:this.classes(r.dateContainer,o&&r.containerDisabled),key:r.dateContainer},_("calcite-input-date-picker",{class:r.datePicker,"data-testid":"daylight-date-picker",disabled:o,key:r.datePicker,overlayPositioning:"fixed",placement:"bottom",valueAsDate:e.localDate,onCalciteInputDatePickerChange:this._onDateChange}),t.playButtons?this._renderPlayPauseButton({playing:s,disabled:o,label:i.playYear,onClick:this._onYearPlayClick}):null)}_renderPlayPauseButton({playing:e,disabled:t,label:i,onClick:s}){return _("calcite-button",{appearance:"solid",class:r.playPauseButton,disabled:t,iconStart:e?"pause-f":"play-f",label:i,onclick:s,round:!0,title:i,type:"button"})}_renderSeasonSelect(){const{messages:e,viewModel:t}=this,i=!t.sunLightingEnabled;return _("calcite-select",{class:this.classes(r.seasonPicker),disabled:i,label:e.season,onCalciteSelectChange:this._onSeasonChange},p.map((i=>_("calcite-option",{selected:t.currentSeason===i,value:i},e[i]))))}_renderDateOrSeason(){return"date"===this.dateOrSeason?this._renderDateOptions():this._renderSeasonSelect()}_renderSunLightingToggle(){const e=this.messages?.sunLightingToggle;return _("calcite-label",{key:"date-time-toggle",layout:"inline",scale:"s",title:e?.tooltip},_("calcite-checkbox",{checked:this.viewModel.sunLightingEnabled,class:r.sunLightingCheckbox,onCalciteCheckboxChange:this._onSunLightingCheckboxChange}),e?.label)}_renderShadowsToggle(){const e=this.messages.shadowsToggle;return _("calcite-label",{key:"shadow-toggle",layout:"inline",scale:"s",title:e?.tooltip},_("calcite-checkbox",{checked:this.viewModel.directShadowsEnabled,class:r.shadowsCheckbox,onCalciteCheckboxChange:this._onShadowCheckboxChange}),e.label)}_makeGoToTime(e){return()=>{this.viewModel.timeSliderPosition=e}}};e([o(),k("esri/widgets/Daylight/t9n/Daylight")],M.prototype,"messages",void 0),e([o(),k("esri/widgets/support/t9n/timezone")],M.prototype,"timezoneMessages",void 0),e([o()],M.prototype,"headingLevel",void 0),e([o()],M.prototype,"icon",null),e([o()],M.prototype,"label",null),e([o()],M.prototype,"playSpeedMultiplier",null),e([o()],M.prototype,"timeSliderSteps",null),e([o()],M.prototype,"view",null),e([o({type:d})],M.prototype,"viewModel",void 0),e([o({type:c,nonNullable:!0})],M.prototype,"visibleElements",void 0),e([o({cast(e){return"season"===e||"date"===e?e:(t.getLogger(this).warn(`"${e}" is not a valid option. Acceptable values are only "date" or "season". Defaulting to "${D}".`),D)}})],M.prototype,"dateOrSeason",void 0),e([o()],M.prototype,"_timeSlider",void 0),M=e([l("esri.widgets.Daylight")],M);const f=[u.interactive,u.anchor],P=M;export{P as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../geometry/Polyline.js";function t(t,l){const n=t.samples??[],s=n.length-1,o=[];let r=[];for(let e=0;e<=s;e++){const{x:t,y:l,z:p}=n[e];null!=p&&r.push([t,l,p]),e!==s&&null!=p||!r.length||(o.push(r),r=[])}return new e({paths:o,hasZ:!0,spatialReference:l})}export{t as createLineGeometry};
5
+ import{createPolyline as t}from"../../../views/draw/support/createUtils.js";function e(e,l){const s=e.samples??[],n=s.length-1,r=[];let o=[];for(let t=0;t<=n;t++){const{x:e,y:l,z:p}=s[t];null!=p&&o.push([e,l,p]),t!==n&&null!=p||!o.length||(r.push(o),o=[])}return t(r,l,!0)}export{e as createLineGeometry};