@arcgis/core 4.33.0-next.20250307 → 4.33.0-next.20250308
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{1e7a70a1871fea29169e.js → 400951e3e742452a5fe2.js} +16 -16
- package/core/MapUtils.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/utils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/GraphicInstanceStore.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/createGraphicSymbolMeshSchemas.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/SceneLayerView3D.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js +7 -7
- package/views/3d/webgl-engine/lib/GLTextureMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/widgets/support/LabeledSwitch.js +1 -1
|
@@ -40,7 +40,7 @@ outputHighlight(isHighlightOccluded());
|
|
|
40
40
|
uint levelBits = readLevelBits(highlightToAdd, highlightLevel);
|
|
41
41
|
if ((levelBits & 1u) == 0u) { discard; }
|
|
42
42
|
outputHighlight(isHighlightOccluded());
|
|
43
|
-
}`)):r.code.add(i.H`void calculateOcclusionAndOutputHighlight() {}`)}},10764:(e,t,r)=>{r.d(t,{I:()=>o});var i=r(31821),n=r(46540);function o(e){e.attributes.add(n.r.POSITION,"vec3"),e.vertex.code.add(i.H`vec3 positionModel() { return position; }`)}},11725:(e,t,r)=>{r.d(t,{im:()=>u,m$:()=>i});var i,n,o=r(51850),a=r(69720),s=r(96672),c=r(39341),l=r(43616),d=r(65786);class u extends a.J{constructor(e,t){super(),this.type=s.X.Material,this.supportsEdges=!1,this._renderPriority=0,this.vertexAttributeLocations=c.D,this._pp0=(0,o.fA)(0,0,1),this._pp1=(0,o.fA)(0,0,0),this._parameters=new t,(0,l.MB)(this._parameters,e),this.validateParameters(this._parameters)}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,l.MB)(this._parameters,e)&&(this.validateParameters(this._parameters),t&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations)&&!!(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}queryRenderOccludedState(e){return this.visible&&this.parameters.renderOccluded===e}get hasEmissions(){return!1}intersectDraped(e,t,r,i,n,o){return this._pp0[0]=this._pp1[0]=i[0],this._pp0[1]=this._pp1[1]=i[1],this.intersect(e,t,r,this._pp0,this._pp1,n)}}(n=i||(i={}))[n.None=0]="None",n[n.Occlude=1]="Occlude",n[n.Transparent=2]="Transparent",n[n.OccludeAndTransparent=4]="OccludeAndTransparent",n[n.OccludeAndTransparentStencil=8]="OccludeAndTransparentStencil",n[n.Opaque=16]="Opaque",d.Y},11787:(e,t,r)=>{r.d(t,{$U:()=>re});var i=r(38954),n=r(51850),o=r(24151),a=r(1843),s=r(49255),c=r(96336),l=r(22911),d=r(62602),u=r(59469),h=r(16943),m=r(89192),f=r(25634),p=r(11725),v=r(33524),g=r(70328),_=r(96672),T=r(620),x=r(46540);class A{constructor(e=!1,t=!0){this.isVerticalRay=e,this.normalRequired=t}}const b=(0,g.vt)();function E(e,t,r,n,o,a){if(!e.visible)return;const s=(0,i.a)(F,n,r),c=(e,t,r)=>{a(e,r,t,!1)},l=new A(!1,t.options.normalRequired);if(e.boundingInfo){(0,T.vA)(e.type===_.X.Mesh);const i=t.tolerance;M(e.boundingInfo,r,s,i,o,l,c)}else{const t=e.attributes.get(x.r.POSITION),n=t.indices;!function(e,t,r,n,o,a,s,c,l,d){const u=t,h=B,m=Math.abs(u[0]),f=Math.abs(u[1]),p=Math.abs(u[2]),v=m>=f?m>=p?0:2:f>=p?1:2,g=v,_=u[g]<0?2:1,T=(v+_)%3,x=(v+(3-_))%3,A=u[T]/u[g],b=u[x]/u[g],E=1/u[g],S=w,M=I,C=O,{normalRequired:R}=l;for(let t=r;t<n;++t){const r=3*t,n=s*o[r];(0,i.i)(h[0],a[n+0],a[n+1],a[n+2]);const l=s*o[r+1];(0,i.i)(h[1],a[l+0],a[l+1],a[l+2]);const u=s*o[r+2];(0,i.i)(h[2],a[u+0],a[u+1],a[u+2]),c&&((0,i.c)(h[0],c.applyToVertex(h[0][0],h[0][1],h[0][2],t)),(0,i.c)(h[1],c.applyToVertex(h[1][0],h[1][1],h[1][2],t)),(0,i.c)(h[2],c.applyToVertex(h[2][0],h[2][1],h[2][2],t))),(0,i.a)(S,h[0],e),(0,i.a)(M,h[1],e),(0,i.a)(C,h[2],e);const m=S[T]-A*S[g],f=S[x]-b*S[g],p=M[T]-A*M[g],v=M[x]-b*M[g],_=C[T]-A*C[g],w=C[x]-b*C[g],I=_*v-w*p,O=m*w-f*_,N=p*f-v*m;if((I<0||O<0||N<0)&&(I>0||O>0||N>0))continue;const P=I+O+N;if(0===P)continue;const L=I*(E*S[g])+O*(E*M[g])+N*(E*C[g]);if(L*Math.sign(P)<0)continue;const D=L/P;D>=0&&d(D,t,R?y(h):null)}}(r,s,0,n.length/3,n,t.data,t.stride,o,l,c)}}const S=(0,n.vt)();function M(e,t,r,n,o,a,s){if(null==e)return;const c=function(e,t){return(0,i.i)(t,1/e[0],1/e[1],1/e[2])}(r,S);if((0,g.Ne)(b,e.bbMin),(0,g.vI)(b,e.bbMax),null!=o&&o.applyToAabb(b),function(e,t,r,i){return function(e,t,r,i){const n=(e[0]-i-t[0])*r[0],o=(e[3]+i-t[0])*r[0];let a=Math.min(n,o),s=Math.max(n,o);const c=(e[1]-i-t[1])*r[1],l=(e[4]+i-t[1])*r[1];if(s=Math.min(s,Math.max(c,l)),s<0)return!1;if(a=Math.max(a,Math.min(c,l)),a>s)return!1;const d=(e[2]-i-t[2])*r[2],u=(e[5]+i-t[2])*r[2];return s=Math.min(s,Math.max(d,u)),!(s<0)&&(a=Math.max(a,Math.min(d,u)),!(a>s)&&a<1/0)}(e,t,r,i)}(b,t,c,n)){const{primitiveIndices:i,position:c}=e,l=i?i.length:c.indices.length/3;if(l>D){const i=e.getChildren();if(void 0!==i){for(const e of i)M(e,t,r,n,o,a,s);return}}!function(e,t,r,i,n,o,a,s,c,l,d){const u=e[0],h=e[1],m=e[2],f=t[0],p=t[1],v=t[2],{normalRequired:g}=l;for(let e=0;e<i;++e){const t=s[e],r=3*t,i=a*n[r];let l=o[i],_=o[i+1],T=o[i+2];const x=a*n[r+1];let A=o[x],b=o[x+1],E=o[x+2];const S=a*n[r+2];let M=o[S],R=o[S+1],w=o[S+2];null!=c&&([l,_,T]=c.applyToVertex(l,_,T,e),[A,b,E]=c.applyToVertex(A,b,E,e),[M,R,w]=c.applyToVertex(M,R,w,e));const I=A-l,O=b-_,y=E-T,P=M-l,L=R-_,D=w-T,F=p*D-L*v,B=v*P-D*f,U=f*L-P*p,G=I*F+O*B+y*U;if(Math.abs(G)<=H)continue;const z=u-l,V=h-_,W=m-T,j=z*F+V*B+W*U;if(G>0){if(j<0||j>G)continue}else if(j>0||j<G)continue;const k=V*y-O*W,Y=W*I-y*z,q=z*O-I*V,X=f*k+p*Y+v*q;if(G>0){if(X<0||j+X>G)continue}else if(X>0||j+X<G)continue;const $=(P*k+L*Y+D*q)/G;$>=0&&d($,t,g?N(I,O,y,P,L,D,C):null)}}(t,r,0,l,c.indices,c.data,c.stride,i,o,a,s)}}const C=(0,n.vt)();function R(e,t,r,i,n,o,a,s){const c=e[0],l=e[1],d=e[2],u=t[0],h=t[1],m=t[2];for(let e=r;e<i;++e){const t=3*e,r=t+1,i=t+2,f=o*t,p=n[f],v=n[f+1],g=n[f+2],_=o*r,T=o*i,x=n[_]-p,A=n[_+1]-v,b=n[_+2]-g,E=n[T]-p,S=n[T+1]-v,M=n[T+2]-g,R=h*M-S*m,w=m*E-M*u,I=u*S-E*h,O=x*R+A*w+b*I;if(Math.abs(O)<=H)continue;const y=c-p,P=l-v,L=d-g,D=y*R+P*w+L*I;if(O>0){if(D<0||D>O)continue}else if(D>0||D<O)continue;const F=P*b-A*L,B=L*x-b*y,U=y*A-x*P,G=u*F+h*B+m*U;if(O>0){if(G<0||D+G>O)continue}else if(G>0||D+G<O)continue;const z=(E*F+S*B+M*U)/O;z>=0&&s(z,e,a?N(x,A,b,E,S,M,C):null)}}const w=(0,n.vt)(),I=(0,n.vt)(),O=(0,n.vt)();function N(e,t,r,n,o,a,s){return(0,i.i)(P,e,t,r),(0,i.i)(L,n,o,a),(0,i.e)(s,P,L),(0,i.n)(s,s),s}function y(e){return(0,i.a)(P,e[1],e[0]),(0,i.a)(L,e[2],e[0]),(0,i.e)(C,P,L),(0,i.n)(C,C),C}const P=(0,n.vt)(),L=(0,n.vt)(),D=1e3,H=1e-7,F=(0,n.vt)(),B=[(0,n.vt)(),(0,n.vt)(),(0,n.vt)()];var U=r(13464),G=r(16396),z=r(13030),V=r(59907);class W{constructor(e){this.vertexBufferLayout=e}elementCount(e){return e.get(x.r.POSITION).indices.length}write(e,t,r,i,n,o){return(0,V.SA)(r,i,this.vertexBufferLayout,e,t,n,o)}intersect(e,t,r,n,o,a,s){const c=this.vertexBufferLayout.createView(e).getField(x.r.POSITION,z.xs);if(null==c)return;const l=(0,i.a)(j,a,o),d=c.count/3,u=n.options.normalRequired;R(o,l,0,d,c.typedBuffer,c.typedBufferStride,u,((e,t,r)=>{s(e,r,t,!1)}))}}const j=(0,n.vt)();var k=r(43616),Y=r(97225),q=r(90237),X=r(53466),$=r(51976),Z=r(35256);class J extends Z.E{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=m.sf.Opaque,this.doubleSidedMode=d.W.None,this.pbrMode=u.A9.Disabled,this.cullFace=m.s2.None,this.normalType=c.W.Attribute,this.customDepthTest=m.it.Less,this.emissionSource=l.ZX.None,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.vvSize=!1,this.vvColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instanced=!1,this.instancedColor=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.occlusionPass=!1,this.hasVvInstancing=!0,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0}get textureCoordinateType(){return this.hasColorTexture||this.hasMetallicRoughnessTexture||this.emissionSource===l.ZX.Texture||this.hasOcclusionTexture||this.hasNormalTexture?X.I.Default:X.I.None}get objectAndLayerIdColorInstanced(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}(0,q._)([(0,$.W)({count:m.sf.COUNT})],J.prototype,"alphaDiscardMode",void 0),(0,q._)([(0,$.W)({count:d.W.COUNT})],J.prototype,"doubleSidedMode",void 0),(0,q._)([(0,$.W)({count:u.A9.COUNT})],J.prototype,"pbrMode",void 0),(0,q._)([(0,$.W)({count:m.s2.COUNT})],J.prototype,"cullFace",void 0),(0,q._)([(0,$.W)({count:c.W.COUNT})],J.prototype,"normalType",void 0),(0,q._)([(0,$.W)({count:m.it.COUNT})],J.prototype,"customDepthTest",void 0),(0,q._)([(0,$.W)({count:l.ZX.COUNT})],J.prototype,"emissionSource",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasVertexColors",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasSymbolColors",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasVerticalOffset",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasColorTexture",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasMetallicRoughnessTexture",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasOcclusionTexture",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasNormalTexture",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasScreenSizePerspective",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasVertexTangents",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasOccludees",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasModelTransformation",void 0),(0,q._)([(0,$.W)()],J.prototype,"offsetBackfaces",void 0),(0,q._)([(0,$.W)()],J.prototype,"vvSize",void 0),(0,q._)([(0,$.W)()],J.prototype,"vvColor",void 0),(0,q._)([(0,$.W)()],J.prototype,"receiveShadows",void 0),(0,q._)([(0,$.W)()],J.prototype,"receiveAmbientOcclusion",void 0),(0,q._)([(0,$.W)()],J.prototype,"textureAlphaPremultiplied",void 0),(0,q._)([(0,$.W)()],J.prototype,"instanced",void 0),(0,q._)([(0,$.W)()],J.prototype,"instancedColor",void 0),(0,q._)([(0,$.W)()],J.prototype,"writeDepth",void 0),(0,q._)([(0,$.W)()],J.prototype,"transparent",void 0),(0,q._)([(0,$.W)()],J.prototype,"enableOffset",void 0),(0,q._)([(0,$.W)()],J.prototype,"terrainDepthTest",void 0),(0,q._)([(0,$.W)()],J.prototype,"cullAboveTerrain",void 0),(0,q._)([(0,$.W)()],J.prototype,"snowCover",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasColorTextureTransform",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasEmissionTextureTransform",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasNormalTextureTransform",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasOcclusionTextureTransform",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasMetallicRoughnessTextureTransform",void 0);var K=r(97220),Q=r(57323);class ee extends Y.R5{constructor(e,t){super(e,t,new K.$(Q.R,(()=>r.e(9933).then(r.bind(r,39933))))),this.type="RealisticTreeTechnique"}}var te=r(49788);class re extends p.im{constructor(e,t){super(e,ne),this.materialType="default",this.supportsEdges=!0,this.produces=new Map([[U.N.OPAQUE_MATERIAL,e=>((0,s.iq)(e)||(0,s.PJ)(e))&&!this.parameters.transparent],[U.N.TRANSPARENT_MATERIAL,e=>((0,s.iq)(e)||(0,s.PJ)(e))&&this.parameters.transparent&&this.parameters.writeDepth],[U.N.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>((0,s.XY)(e)||(0,s.PJ)(e))&&this.parameters.transparent&&!this.parameters.writeDepth]]),this._vertexBufferLayout=function(e){const t=(0,a.BP)().vec3f(x.r.POSITION);return e.normalType===c.W.Compressed?t.vec2i16(x.r.NORMALCOMPRESSED,{glNormalized:!0}):t.vec3f(x.r.NORMAL),e.hasVertexTangents&&t.vec4f(x.r.TANGENT),(e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId)&&t.vec2f(x.r.UV0),e.hasVertexColors&&t.vec4u8(x.r.COLOR),e.hasSymbolColors&&t.vec4u8(x.r.SYMBOLCOLOR),(0,h.E)()&&t.vec4u8(x.r.OBJECTANDLAYERIDCOLOR),t}(this.parameters),this._configuration=new J(t.spherical)}isVisibleForOutput(e){return e!==s.V.Shadow&&e!==s.V.ShadowExcludeHighlight&&e!==s.V.ShadowHighlight||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:i}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t?1:i[3])>=te.Q}get hasEmissions(){return!!this.parameters.emissiveTextureId||!(0,i.p)(this.parameters.emissiveFactor,n.uY)}getConfiguration(e,t){const r=this.parameters,{treeRendering:i,doubleSided:n,doubleSidedType:o}=r;return this._configuration.output=e,this._configuration.hasNormalTexture=!i&&!!r.normalTextureId,this._configuration.hasColorTexture=!!r.textureId,this._configuration.hasVertexTangents=!i&&r.hasVertexTangents,this._configuration.instanced=r.isInstanced,this._configuration.instancedDoublePrecision=r.instancedDoublePrecision,this._configuration.vvSize=!!r.vvSize,this._configuration.hasVerticalOffset=null!=r.verticalOffset,this._configuration.hasScreenSizePerspective=null!=r.screenSizePerspective,this._configuration.hasSlicePlane=r.hasSlicePlane,this._configuration.alphaDiscardMode=r.textureAlphaMode,this._configuration.normalType=i?c.W.Attribute:r.normalType,this._configuration.transparent=r.transparent,this._configuration.writeDepth=r.writeDepth,null!=r.customDepthTest&&(this._configuration.customDepthTest=r.customDepthTest),this._configuration.hasOccludees=t.hasOccludees,this._configuration.cullFace=r.hasSlicePlane?m.s2.None:r.cullFace,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration.hasModelTransformation=!i&&null!=r.modelTransformation,this._configuration.hasVertexColors=r.hasVertexColors,this._configuration.hasSymbolColors=r.hasSymbolColors,this._configuration.doubleSidedMode=i?d.W.WindingOrder:n&&"normal"===o?d.W.View:n&&"winding-order"===o?d.W.WindingOrder:d.W.None,this._configuration.instancedColor=r.hasInstancedColor,(0,s.RN)(e)?(this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.receiveShadows=r.receiveShadows,this._configuration.receiveAmbientOcclusion=r.receiveAmbientOcclusion&&null!=t.ssao):(this._configuration.terrainDepthTest=!1,this._configuration.receiveShadows=this._configuration.receiveAmbientOcclusion=!1),this._configuration.vvColor=!!r.vvColor,this._configuration.textureAlphaPremultiplied=!!r.textureAlphaPremultiplied,this._configuration.pbrMode=r.usePBR?r.isSchematic?u.A9.Schematic:u.A9.Normal:u.A9.Disabled,this._configuration.hasMetallicRoughnessTexture=!i&&!!r.metallicRoughnessTextureId,this._configuration.emissionSource=i?l.ZX.None:null!=r.emissiveTextureId?l.ZX.Texture:r.usePBR?l.ZX.Value:l.ZX.None,this._configuration.hasOcclusionTexture=!i&&!!r.occlusionTextureId,this._configuration.offsetBackfaces=!(!r.transparent||!r.offsetTransparentBackfaces),this._configuration.oitPass=t.oitPass,this._configuration.enableOffset=t.camera.relativeElevation<v.xt,this._configuration.snowCover=function(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}(t),this._configuration.hasColorTextureTransform=!!r.colorTextureTransformMatrix,this._configuration.hasNormalTextureTransform=!!r.normalTextureTransformMatrix,this._configuration.hasEmissionTextureTransform=!!r.emissiveTextureTransformMatrix,this._configuration.hasOcclusionTextureTransform=!!r.occlusionTextureTransformMatrix,this._configuration.hasMetallicRoughnessTextureTransform=!!r.metallicRoughnessTextureTransformMatrix,this._configuration}intersect(e,t,r,n,a,s){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,i.i)(de,t[12],t[13],t[14]);let s=null;switch(r.viewingMode){case o.RT.Global:s=(0,i.n)(ce,de);break;case o.RT.Local:s=(0,i.c)(ce,se)}let c=0;const l=(0,i.d)(ue,de,e.eye),d=(0,i.l)(l),u=(0,i.h)(l,l,1/d);let h=null;this.parameters.screenSizePerspective&&(h=(0,i.f)(s,u)),c+=(0,k.kE)(e,d,this.parameters.verticalOffset,h??0,this.parameters.screenSizePerspective),(0,i.h)(s,s,c),(0,i.q)(le,s,r.transform.inverseRotation),n=(0,i.d)(oe,n,le),a=(0,i.d)(ae,a,le)}E(e,r,n,a,(0,G.ou)(r.verticalOffset),s)}createGLMaterial(e){return new ie(e)}createBufferWriter(){return new W(this._vertexBufferLayout)}}class ie extends f.m8{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,i.i)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?ee:Y.R5,e)}}class ne extends Y.uD{constructor(){super(...arguments),this.treeRendering=!1,this.hasVertexTangents=!1}}const oe=(0,n.vt)(),ae=(0,n.vt)(),se=(0,n.fA)(0,0,1),ce=(0,n.vt)(),le=(0,n.vt)(),de=(0,n.vt)(),ue=(0,n.vt)()},11955:(e,t,r)=>{r.d(t,{S:()=>s}),r(69270),r(74333).n;var i=r(20304),n=r(31821),o=r(89192),a=r(49788);function s(e,t){!function(e,t,r){const i=e.fragment,s=t.alphaDiscardMode,c=s===o.sf.Blend;s!==o.sf.Mask&&s!==o.sf.MaskBlend||i.uniforms.add(r),i.code.add(n.H`
|
|
43
|
+
}`)):r.code.add(i.H`void calculateOcclusionAndOutputHighlight() {}`)}},10764:(e,t,r)=>{r.d(t,{I:()=>o});var i=r(31821),n=r(46540);function o(e){e.attributes.add(n.r.POSITION,"vec3"),e.vertex.code.add(i.H`vec3 positionModel() { return position; }`)}},11725:(e,t,r)=>{r.d(t,{im:()=>u,m$:()=>i});var i,n,o=r(51850),a=r(69720),s=r(96672),c=r(39341),l=r(43616),d=r(65786);class u extends a.J{constructor(e,t){super(),this.type=s.X.Material,this.supportsEdges=!1,this._renderPriority=0,this.vertexAttributeLocations=c.D,this._pp0=(0,o.fA)(0,0,1),this._pp1=(0,o.fA)(0,0,0),this._parameters=new t,(0,l.MB)(this._parameters,e),this.validateParameters(this._parameters)}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,l.MB)(this._parameters,e)&&(this.validateParameters(this._parameters),t&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations)&&!!(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}queryRenderOccludedState(e){return this.visible&&this.parameters.renderOccluded===e}get hasEmissions(){return!1}intersectDraped(e,t,r,i,n,o){return this._pp0[0]=this._pp1[0]=i[0],this._pp0[1]=this._pp1[1]=i[1],this.intersect(e,t,r,this._pp0,this._pp1,n)}}(n=i||(i={}))[n.None=0]="None",n[n.Occlude=1]="Occlude",n[n.Transparent=2]="Transparent",n[n.OccludeAndTransparent=4]="OccludeAndTransparent",n[n.OccludeAndTransparentStencil=8]="OccludeAndTransparentStencil",n[n.Opaque=16]="Opaque",d.Y},11787:(e,t,r)=>{r.d(t,{$U:()=>re});var i=r(38954),n=r(51850),o=r(24151),a=r(1843),s=r(49255),c=r(96336),l=r(22911),d=r(62602),u=r(59469),h=r(16943),m=r(89192),f=r(25634),p=r(11725),v=r(33524),g=r(70328),_=r(96672),T=r(620),x=r(46540);class A{constructor(e=!1,t=!0){this.isVerticalRay=e,this.normalRequired=t}}const b=(0,g.vt)();function E(e,t,r,n,o,a){if(!e.visible)return;const s=(0,i.a)(F,n,r),c=(e,t,r)=>{a(e,r,t,!1)},l=new A(!1,t.options.normalRequired);if(e.boundingInfo){(0,T.vA)(e.type===_.X.Mesh);const i=t.tolerance;M(e.boundingInfo,r,s,i,o,l,c)}else{const t=e.attributes.get(x.r.POSITION),n=t.indices;!function(e,t,r,n,o,a,s,c,l,d){const u=t,h=B,m=Math.abs(u[0]),f=Math.abs(u[1]),p=Math.abs(u[2]),v=m>=f?m>=p?0:2:f>=p?1:2,g=v,_=u[g]<0?2:1,T=(v+_)%3,x=(v+(3-_))%3,A=u[T]/u[g],b=u[x]/u[g],E=1/u[g],S=w,M=I,C=O,{normalRequired:R}=l;for(let t=r;t<n;++t){const r=3*t,n=s*o[r];(0,i.i)(h[0],a[n+0],a[n+1],a[n+2]);const l=s*o[r+1];(0,i.i)(h[1],a[l+0],a[l+1],a[l+2]);const u=s*o[r+2];(0,i.i)(h[2],a[u+0],a[u+1],a[u+2]),c&&((0,i.c)(h[0],c.applyToVertex(h[0][0],h[0][1],h[0][2],t)),(0,i.c)(h[1],c.applyToVertex(h[1][0],h[1][1],h[1][2],t)),(0,i.c)(h[2],c.applyToVertex(h[2][0],h[2][1],h[2][2],t))),(0,i.a)(S,h[0],e),(0,i.a)(M,h[1],e),(0,i.a)(C,h[2],e);const m=S[T]-A*S[g],f=S[x]-b*S[g],p=M[T]-A*M[g],v=M[x]-b*M[g],_=C[T]-A*C[g],w=C[x]-b*C[g],I=_*v-w*p,O=m*w-f*_,y=p*f-v*m;if((I<0||O<0||y<0)&&(I>0||O>0||y>0))continue;const P=I+O+y;if(0===P)continue;const L=I*(E*S[g])+O*(E*M[g])+y*(E*C[g]);if(L*Math.sign(P)<0)continue;const D=L/P;D>=0&&d(D,t,R?N(h):null)}}(r,s,0,n.length/3,n,t.data,t.stride,o,l,c)}}const S=(0,n.vt)();function M(e,t,r,n,o,a,s){if(null==e)return;const c=function(e,t){return(0,i.i)(t,1/e[0],1/e[1],1/e[2])}(r,S);if((0,g.Ne)(b,e.bbMin),(0,g.vI)(b,e.bbMax),null!=o&&o.applyToAabb(b),function(e,t,r,i){return function(e,t,r,i){const n=(e[0]-i-t[0])*r[0],o=(e[3]+i-t[0])*r[0];let a=Math.min(n,o),s=Math.max(n,o);const c=(e[1]-i-t[1])*r[1],l=(e[4]+i-t[1])*r[1];if(s=Math.min(s,Math.max(c,l)),s<0)return!1;if(a=Math.max(a,Math.min(c,l)),a>s)return!1;const d=(e[2]-i-t[2])*r[2],u=(e[5]+i-t[2])*r[2];return s=Math.min(s,Math.max(d,u)),!(s<0)&&(a=Math.max(a,Math.min(d,u)),!(a>s)&&a<1/0)}(e,t,r,i)}(b,t,c,n)){const{primitiveIndices:i,position:c}=e,l=i?i.length:c.indices.length/3;if(l>D){const i=e.getChildren();if(void 0!==i){for(const e of i)M(e,t,r,n,o,a,s);return}}!function(e,t,r,i,n,o,a,s,c,l,d){const u=e[0],h=e[1],m=e[2],f=t[0],p=t[1],v=t[2],{normalRequired:g}=l;for(let e=0;e<i;++e){const t=s[e],r=3*t,i=a*n[r];let l=o[i],_=o[i+1],T=o[i+2];const x=a*n[r+1];let A=o[x],b=o[x+1],E=o[x+2];const S=a*n[r+2];let M=o[S],R=o[S+1],w=o[S+2];null!=c&&([l,_,T]=c.applyToVertex(l,_,T,e),[A,b,E]=c.applyToVertex(A,b,E,e),[M,R,w]=c.applyToVertex(M,R,w,e));const I=A-l,O=b-_,N=E-T,P=M-l,L=R-_,D=w-T,F=p*D-L*v,B=v*P-D*f,U=f*L-P*p,G=I*F+O*B+N*U;if(Math.abs(G)<=H)continue;const z=u-l,V=h-_,W=m-T,j=z*F+V*B+W*U;if(G>0){if(j<0||j>G)continue}else if(j>0||j<G)continue;const k=V*N-O*W,Y=W*I-N*z,q=z*O-I*V,X=f*k+p*Y+v*q;if(G>0){if(X<0||j+X>G)continue}else if(X>0||j+X<G)continue;const $=(P*k+L*Y+D*q)/G;$>=0&&d($,t,g?y(I,O,N,P,L,D,C):null)}}(t,r,0,l,c.indices,c.data,c.stride,i,o,a,s)}}const C=(0,n.vt)();function R(e,t,r,i,n,o,a,s){const c=e[0],l=e[1],d=e[2],u=t[0],h=t[1],m=t[2];for(let e=r;e<i;++e){const t=3*e,r=t+1,i=t+2,f=o*t,p=n[f],v=n[f+1],g=n[f+2],_=o*r,T=o*i,x=n[_]-p,A=n[_+1]-v,b=n[_+2]-g,E=n[T]-p,S=n[T+1]-v,M=n[T+2]-g,R=h*M-S*m,w=m*E-M*u,I=u*S-E*h,O=x*R+A*w+b*I;if(Math.abs(O)<=H)continue;const N=c-p,P=l-v,L=d-g,D=N*R+P*w+L*I;if(O>0){if(D<0||D>O)continue}else if(D>0||D<O)continue;const F=P*b-A*L,B=L*x-b*N,U=N*A-x*P,G=u*F+h*B+m*U;if(O>0){if(G<0||D+G>O)continue}else if(G>0||D+G<O)continue;const z=(E*F+S*B+M*U)/O;z>=0&&s(z,e,a?y(x,A,b,E,S,M,C):null)}}const w=(0,n.vt)(),I=(0,n.vt)(),O=(0,n.vt)();function y(e,t,r,n,o,a,s){return(0,i.i)(P,e,t,r),(0,i.i)(L,n,o,a),(0,i.e)(s,P,L),(0,i.n)(s,s),s}function N(e){return(0,i.a)(P,e[1],e[0]),(0,i.a)(L,e[2],e[0]),(0,i.e)(C,P,L),(0,i.n)(C,C),C}const P=(0,n.vt)(),L=(0,n.vt)(),D=1e3,H=1e-7,F=(0,n.vt)(),B=[(0,n.vt)(),(0,n.vt)(),(0,n.vt)()];var U=r(13464),G=r(16396),z=r(13030),V=r(59907);class W{constructor(e){this.vertexBufferLayout=e}elementCount(e){return e.get(x.r.POSITION).indices.length}write(e,t,r,i,n,o){return(0,V.SA)(r,i,this.vertexBufferLayout,e,t,n,o)}intersect(e,t,r,n,o,a,s){const c=this.vertexBufferLayout.createView(e).getField(x.r.POSITION,z.xs);if(null==c)return;const l=(0,i.a)(j,a,o),d=c.count/3,u=n.options.normalRequired;R(o,l,0,d,c.typedBuffer,c.typedBufferStride,u,((e,t,r)=>{s(e,r,t,!1)}))}}const j=(0,n.vt)();var k=r(43616),Y=r(97225),q=r(90237),X=r(53466),$=r(51976),Z=r(35256);class J extends Z.E{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=m.sf.Opaque,this.doubleSidedMode=d.W.None,this.pbrMode=u.A9.Disabled,this.cullFace=m.s2.None,this.normalType=c.W.Attribute,this.customDepthTest=m.it.Less,this.emissionSource=l.ZX.None,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.vvSize=!1,this.vvColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instanced=!1,this.instancedColor=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.occlusionPass=!1,this.hasVvInstancing=!0,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0}get textureCoordinateType(){return this.hasColorTexture||this.hasMetallicRoughnessTexture||this.emissionSource===l.ZX.Texture||this.hasOcclusionTexture||this.hasNormalTexture?X.I.Default:X.I.None}get objectAndLayerIdColorInstanced(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}(0,q._)([(0,$.W)({count:m.sf.COUNT})],J.prototype,"alphaDiscardMode",void 0),(0,q._)([(0,$.W)({count:d.W.COUNT})],J.prototype,"doubleSidedMode",void 0),(0,q._)([(0,$.W)({count:u.A9.COUNT})],J.prototype,"pbrMode",void 0),(0,q._)([(0,$.W)({count:m.s2.COUNT})],J.prototype,"cullFace",void 0),(0,q._)([(0,$.W)({count:c.W.COUNT})],J.prototype,"normalType",void 0),(0,q._)([(0,$.W)({count:m.it.COUNT})],J.prototype,"customDepthTest",void 0),(0,q._)([(0,$.W)({count:l.ZX.COUNT})],J.prototype,"emissionSource",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasVertexColors",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasSymbolColors",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasVerticalOffset",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasColorTexture",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasMetallicRoughnessTexture",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasOcclusionTexture",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasNormalTexture",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasScreenSizePerspective",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasVertexTangents",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasOccludees",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasModelTransformation",void 0),(0,q._)([(0,$.W)()],J.prototype,"offsetBackfaces",void 0),(0,q._)([(0,$.W)()],J.prototype,"vvSize",void 0),(0,q._)([(0,$.W)()],J.prototype,"vvColor",void 0),(0,q._)([(0,$.W)()],J.prototype,"receiveShadows",void 0),(0,q._)([(0,$.W)()],J.prototype,"receiveAmbientOcclusion",void 0),(0,q._)([(0,$.W)()],J.prototype,"textureAlphaPremultiplied",void 0),(0,q._)([(0,$.W)()],J.prototype,"instanced",void 0),(0,q._)([(0,$.W)()],J.prototype,"instancedColor",void 0),(0,q._)([(0,$.W)()],J.prototype,"writeDepth",void 0),(0,q._)([(0,$.W)()],J.prototype,"transparent",void 0),(0,q._)([(0,$.W)()],J.prototype,"enableOffset",void 0),(0,q._)([(0,$.W)()],J.prototype,"terrainDepthTest",void 0),(0,q._)([(0,$.W)()],J.prototype,"cullAboveTerrain",void 0),(0,q._)([(0,$.W)()],J.prototype,"snowCover",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasColorTextureTransform",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasEmissionTextureTransform",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasNormalTextureTransform",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasOcclusionTextureTransform",void 0),(0,q._)([(0,$.W)()],J.prototype,"hasMetallicRoughnessTextureTransform",void 0);var K=r(97220),Q=r(57323);class ee extends Y.R5{constructor(e,t){super(e,t,new K.$(Q.R,(()=>r.e(9933).then(r.bind(r,39933))))),this.type="RealisticTreeTechnique"}}var te=r(49788);class re extends p.im{constructor(e,t){super(e,ne),this.materialType="default",this.supportsEdges=!0,this.produces=new Map([[U.N.OPAQUE_MATERIAL,e=>((0,s.iq)(e)||(0,s.PJ)(e))&&!this.parameters.transparent],[U.N.TRANSPARENT_MATERIAL,e=>((0,s.iq)(e)||(0,s.PJ)(e))&&this.parameters.transparent&&this.parameters.writeDepth],[U.N.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>((0,s.XY)(e)||(0,s.PJ)(e))&&this.parameters.transparent&&!this.parameters.writeDepth]]),this._vertexBufferLayout=function(e){const t=(0,a.BP)().vec3f(x.r.POSITION);return e.normalType===c.W.Compressed?t.vec2i16(x.r.NORMALCOMPRESSED,{glNormalized:!0}):t.vec3f(x.r.NORMAL),e.hasVertexTangents&&t.vec4f(x.r.TANGENT),(e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId)&&t.vec2f(x.r.UV0),e.hasVertexColors&&t.vec4u8(x.r.COLOR),e.hasSymbolColors&&t.vec4u8(x.r.SYMBOLCOLOR),(0,h.E)()&&t.vec4u8(x.r.OBJECTANDLAYERIDCOLOR),t}(this.parameters),this._configuration=new J(t.spherical)}isVisibleForOutput(e){return e!==s.V.Shadow&&e!==s.V.ShadowExcludeHighlight&&e!==s.V.ShadowHighlight||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:i}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t?1:i[3])>=te.Q}get hasEmissions(){return!!this.parameters.emissiveTextureId||!(0,i.p)(this.parameters.emissiveFactor,n.uY)}getConfiguration(e,t){const r=this.parameters,{treeRendering:i,doubleSided:n,doubleSidedType:o}=r;return this._configuration.output=e,this._configuration.hasNormalTexture=!i&&!!r.normalTextureId,this._configuration.hasColorTexture=!!r.textureId,this._configuration.hasVertexTangents=!i&&r.hasVertexTangents,this._configuration.instanced=r.isInstanced,this._configuration.instancedDoublePrecision=r.instancedDoublePrecision,this._configuration.vvSize=!!r.vvSize,this._configuration.hasVerticalOffset=null!=r.verticalOffset,this._configuration.hasScreenSizePerspective=null!=r.screenSizePerspective,this._configuration.hasSlicePlane=r.hasSlicePlane,this._configuration.alphaDiscardMode=r.textureAlphaMode,this._configuration.normalType=i?c.W.Attribute:r.normalType,this._configuration.transparent=r.transparent,this._configuration.writeDepth=r.writeDepth,null!=r.customDepthTest&&(this._configuration.customDepthTest=r.customDepthTest),this._configuration.hasOccludees=t.hasOccludees,this._configuration.cullFace=r.hasSlicePlane?m.s2.None:r.cullFace,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration.hasModelTransformation=!i&&null!=r.modelTransformation,this._configuration.hasVertexColors=r.hasVertexColors,this._configuration.hasSymbolColors=r.hasSymbolColors,this._configuration.doubleSidedMode=i?d.W.WindingOrder:n&&"normal"===o?d.W.View:n&&"winding-order"===o?d.W.WindingOrder:d.W.None,this._configuration.instancedColor=r.hasInstancedColor,(0,s.RN)(e)?(this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.receiveShadows=r.receiveShadows,this._configuration.receiveAmbientOcclusion=r.receiveAmbientOcclusion&&null!=t.ssao):(this._configuration.terrainDepthTest=!1,this._configuration.receiveShadows=this._configuration.receiveAmbientOcclusion=!1),this._configuration.vvColor=!!r.vvColor,this._configuration.textureAlphaPremultiplied=!!r.textureAlphaPremultiplied,this._configuration.pbrMode=r.usePBR?r.isSchematic?u.A9.Schematic:u.A9.Normal:u.A9.Disabled,this._configuration.hasMetallicRoughnessTexture=!i&&!!r.metallicRoughnessTextureId,this._configuration.emissionSource=i?l.ZX.None:null!=r.emissiveTextureId?l.ZX.Texture:r.usePBR?l.ZX.Value:l.ZX.None,this._configuration.hasOcclusionTexture=!i&&!!r.occlusionTextureId,this._configuration.offsetBackfaces=!(!r.transparent||!r.offsetTransparentBackfaces),this._configuration.oitPass=t.oitPass,this._configuration.enableOffset=t.camera.relativeElevation<v.xt,this._configuration.snowCover=function(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}(t),this._configuration.hasColorTextureTransform=!!r.colorTextureTransformMatrix,this._configuration.hasNormalTextureTransform=!!r.normalTextureTransformMatrix,this._configuration.hasEmissionTextureTransform=!!r.emissiveTextureTransformMatrix,this._configuration.hasOcclusionTextureTransform=!!r.occlusionTextureTransformMatrix,this._configuration.hasMetallicRoughnessTextureTransform=!!r.metallicRoughnessTextureTransformMatrix,this._configuration}intersect(e,t,r,n,a,s){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,i.i)(de,t[12],t[13],t[14]);let s=null;switch(r.viewingMode){case o.RT.Global:s=(0,i.n)(ce,de);break;case o.RT.Local:s=(0,i.c)(ce,se)}let c=0;const l=(0,i.d)(ue,de,e.eye),d=(0,i.l)(l),u=(0,i.h)(l,l,1/d);let h=null;this.parameters.screenSizePerspective&&(h=(0,i.f)(s,u)),c+=(0,k.kE)(e,d,this.parameters.verticalOffset,h??0,this.parameters.screenSizePerspective),(0,i.h)(s,s,c),(0,i.q)(le,s,r.transform.inverseRotation),n=(0,i.d)(oe,n,le),a=(0,i.d)(ae,a,le)}E(e,r,n,a,(0,G.ou)(r.verticalOffset),s)}createGLMaterial(e){return new ie(e)}createBufferWriter(){return new W(this._vertexBufferLayout)}}class ie extends f.m8{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,i.i)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?ee:Y.R5,e)}}class ne extends Y.uD{constructor(){super(...arguments),this.treeRendering=!1,this.hasVertexTangents=!1}}const oe=(0,n.vt)(),ae=(0,n.vt)(),se=(0,n.fA)(0,0,1),ce=(0,n.vt)(),le=(0,n.vt)(),de=(0,n.vt)(),ue=(0,n.vt)()},11955:(e,t,r)=>{r.d(t,{S:()=>s}),r(69270),r(74333).n;var i=r(20304),n=r(31821),o=r(89192),a=r(49788);function s(e,t){!function(e,t,r){const i=e.fragment,s=t.alphaDiscardMode,c=s===o.sf.Blend;s!==o.sf.Mask&&s!==o.sf.MaskBlend||i.uniforms.add(r),i.code.add(n.H`
|
|
44
44
|
void discardOrAdjustAlpha(inout vec4 color) {
|
|
45
45
|
${s===o.sf.Opaque?"color.a = 1.0;":`if (color.a < ${c?n.H.float(a.Q):"textureAlphaCutoff"}) {\n discard;\n } ${(0,n.If)(s===o.sf.Mask,"else { color.a = 1.0; }")}`}
|
|
46
46
|
}
|
|
@@ -124,7 +124,7 @@ return fallOffFunction(vv, vn, 0.1);
|
|
|
124
124
|
// Anti-tone map to reduce contrast and drag dark region farther: (x^0.2 + 1.2 * x^4) / 2.2
|
|
125
125
|
A = (pow(A, 0.2) + 1.2 * A * A * A * A) / 2.2;
|
|
126
126
|
|
|
127
|
-
fragOcclusion = A;`),e}function g(e){return Math.max(10,20*e.computeScreenPixelSizeAtDist(Math.abs(4*e.relativeElevation)))}const _=(0,n.vt)(),T=Object.freeze(Object.defineProperty({__proto__:null,build:v,getRadius:g},Symbol.toStringTag,{value:"Module"}))},16396:(e,t,r)=>{r.d(t,{ou:()=>l}),r(77690),r(29242),r(58083),r(9093);var i=r(38954),n=r(51850),o=r(97937),a=r(24151),s=r(57005);const c=new class{constructor(e=0){this.offset=e,this.sphere=(0,o.c)(),this.tmpVertex=(0,n.vt)()}applyToVertex(e,t,r){const n=this.objectTransform.transform,o=(0,i.i)(d,e,t,r),a=(0,i.t)(o,o,n),s=this.offset/(0,i.l)(a);(0,i.b)(a,a,a,s);const c=this.objectTransform.inverse;return(0,i.t)(this.tmpVertex,a,c),this.tmpVertex}applyToMinMax(e,t){const r=this.offset/(0,i.l)(e);(0,i.b)(e,e,e,r);const n=this.offset/(0,i.l)(t);(0,i.b)(t,t,t,n)}applyToAabb(e){const t=this.offset/Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]+=e[0]*t,e[1]+=e[1]*t,e[2]+=e[2]*t;const r=this.offset/Math.sqrt(e[3]*e[3]+e[4]*e[4]+e[5]*e[5]);return e[3]+=e[3]*r,e[4]+=e[4]*r,e[5]+=e[5]*r,e}applyToBoundingSphere(e){const t=(0,i.l)((0,o.a)(e)),r=this.offset/t;return(0,i.b)((0,o.a)(this.sphere),(0,o.a)(e),(0,o.a)(e),r),this.sphere[3]=e[3]+e[3]*this.offset/t,this.sphere}};function l(e){return null!=e?(c.offset=e,c):null}new class{constructor(e=0){this.componentLocalOriginLength=0,this._totalOffset=0,this._offset=0,this._tmpVertex=(0,n.vt)(),this._tmpMbs=(0,o.c)(),this._tmpObb=new s.ab,this._resetOffset(e)}_resetOffset(e){this._offset=e,this._totalOffset=e}set offset(e){this._resetOffset(e)}get offset(){return this._offset}set componentOffset(e){this._totalOffset=this._offset+e}set localOrigin(e){this.componentLocalOriginLength=(0,i.l)(e)}applyToVertex(e,t,r){const n=(0,i.i)(d,e,t,r),o=(0,i.i)(u,e,t,r+this.componentLocalOriginLength),a=this._totalOffset/(0,i.l)(o);return(0,i.b)(this._tmpVertex,n,o,a),this._tmpVertex}applyToAabb(e){const t=this.componentLocalOriginLength,r=e[0],i=e[1],n=e[2]+t,o=e[3],a=e[4],s=e[5]+t,c=Math.abs(r),l=Math.abs(i),d=Math.abs(n),u=Math.abs(o),h=Math.abs(a),m=Math.abs(s),f=.5*(1+Math.sign(r*o))*Math.min(c,u),p=.5*(1+Math.sign(i*a))*Math.min(l,h),v=.5*(1+Math.sign(n*s))*Math.min(d,m),g=Math.max(c,u),_=Math.max(l,h),T=Math.max(d,m),x=Math.sqrt(f*f+p*p+v*v),A=Math.sign(c+r),b=Math.sign(l+i),E=Math.sign(d+n),S=Math.sign(u+o),M=Math.sign(h+a),C=Math.sign(m+s),R=this._totalOffset;if(x<R)return e[0]-=(1-A)*R,e[1]-=(1-b)*R,e[2]-=(1-E)*R,e[3]+=S*R,e[4]+=M*R,e[5]+=C*R,e;const w=R/Math.sqrt(g*g+_*_+T*T),I=R/x,O=I-w,N=-O;return e[0]+=r*(A*N+I),e[1]+=i*(b*N+I),e[2]+=n*(E*N+I),e[3]+=o*(S*O+w),e[4]+=a*(M*O+w),e[5]+=s*(C*O+w),e}applyToMbs(e){const t=(0,i.l)((0,o.a)(e)),r=this._totalOffset/t;return(0,i.b)((0,o.a)(this._tmpMbs),(0,o.a)(e),(0,o.a)(e),r),this._tmpMbs[3]=e[3]+e[3]*this._totalOffset/t,this._tmpMbs}applyToObb(e){return(0,s.gm)(e,this._totalOffset,this._totalOffset,a.RT.Global,this._tmpObb),this._tmpObb}},new class{constructor(e=0){this.offset=e,this.tmpVertex=(0,n.vt)()}applyToVertex(e,t,r){const n=(0,i.i)(d,e,t,r),o=(0,i.g)(u,n,this.localOrigin),a=this.offset/(0,i.l)(o);return(0,i.b)(this.tmpVertex,n,o,a),this.tmpVertex}applyToAabb(e){const t=h,r=m,i=f;for(let n=0;n<3;++n)t[n]=e[0+n]+this.localOrigin[n],r[n]=e[3+n]+this.localOrigin[n],i[n]=t[n];const n=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=n[t],e[t+3]=n[t];const o=t=>{const r=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=Math.min(e[t],r[t]),e[t+3]=Math.max(e[t+3],r[t])};for(let e=1;e<8;++e){for(let n=0;n<3;++n)i[n]=e&1<<n?r[n]:t[n];o(i)}let a=0;for(let e=0;e<3;++e)t[e]*r[e]<0&&(a|=1<<e);if(0!==a&&7!==a)for(let e=0;e<8;++e)if(!(a&e)){for(let n=0;n<3;++n)i[n]=a&1<<n?0:e&1<<n?t[n]:r[n];o(i)}for(let t=0;t<3;++t)e[t]-=this.localOrigin[t],e[t+3]-=this.localOrigin[t];return e}};const d=(0,n.vt)(),u=(0,n.vt)(),h=(0,n.vt)(),m=(0,n.vt)(),f=(0,n.vt)()},17352:(e,t,r)=>{r.d(t,{b:()=>j,f:()=>x}),r(44208);var i=r(53966),n=r(34727),o=r(4341),a=r(58083),s=r(9093),c=r(38954),l=r(51850),d=r(19419),u=r(88582),h=r(11964),m=r(27921),f=r(71351),p=r(44280),v=r(32114);const g=()=>i.A.getLogger("esri.views.3d.support.geometryUtils.boundedPlane");function _(e=H){return{plane:(0,m.vt)(e.plane),origin:(0,l.o8)(e.origin),basis1:(0,l.o8)(e.basis1),basis2:(0,l.o8)(e.basis2)}}function T(e,t=_()){return x(e.origin,e.basis1,e.basis2,t)}function x(e,t,r,i=_()){return(0,c.c)(i.origin,e),(0,c.c)(i.basis1,t),(0,c.c)(i.basis2,r),A(i),function(e,t){Math.abs((0,c.f)(e.basis1,e.basis2)/((0,c.l)(e.basis1)*(0,c.l)(e.basis2)))>1e-6&&g().warn(t,"Provided basis vectors are not perpendicular"),Math.abs((0,c.f)(e.basis1,N(e)))>1e-6&&g().warn(t,"Basis vectors and plane normal are not perpendicular"),Math.abs(-(0,c.f)(N(e),e.origin)-e.plane[3])>1e-6&&g().warn(t,"Plane offset is not consistent with plane origin")}(i,"fromValues()"),i}function A(e){(0,m.mR)(e.basis2,e.basis1,e.origin,e.plane)}function b(e,t,r){e!==r&&T(e,r);const i=(0,c.h)(v.rq.get(),N(e),t);return(0,c.g)(r.origin,r.origin,i),r.plane[3]-=t,r}function E(e,t=_()){const r=(e[2]-e[0])/2,i=(e[3]-e[1])/2;return(0,c.i)(t.origin,e[0]+r,e[1]+i,0),(0,c.i)(t.basis1,r,0,0),(0,c.i)(t.basis2,0,i,0),(0,m.fA)(0,0,1,0,t.plane),t}function S(e,t,r){return!!(0,m.Ui)(e.plane,t,r)&&y(e,r)}function M(e,t,r){const i=F.get();D(e,t,i,F.get());let o=Number.POSITIVE_INFINITY;for(const a of z){const s=L(e,a,B.get()),l=v.rq.get();if((0,m.T7)(i,s,l)){const e=(0,c.o)(v.rq.get(),t.origin,l),i=Math.abs((0,n.XM)((0,c.f)(t.direction,e)));i<o&&(o=i,(0,c.c)(r,l))}}return o===Number.POSITIVE_INFINITY?C(e,t,r):r}function C(e,t,r){if(S(e,t,r))return r;const i=F.get(),n=F.get();D(e,t,i,n);let o=Number.POSITIVE_INFINITY;for(const a of z){const s=L(e,a,B.get()),l=v.rq.get();if((0,m.gv)(i,s,l)){const e=(0,f.kb)(t,l);if(!(0,m.Tj)(n,l))continue;e<o&&(o=e,(0,c.c)(r,l))}}return I(e,t.origin)<o&&R(e,t.origin,r),r}function R(e,t,r){const i=(0,m._I)(e.plane,t,v.rq.get()),n=(0,h.H6)(P(e,e.basis1),i,-1,1,v.rq.get()),o=(0,h.H6)(P(e,e.basis2),i,-1,1,v.rq.get());return(0,c.d)(r,(0,c.g)(v.rq.get(),n,o),e.origin),r}function w(e,t,r){const{origin:i,basis1:n,basis2:o}=e,a=(0,c.d)(v.rq.get(),t,i),s=(0,p.gr)(n,a),l=(0,p.gr)(o,a),d=(0,p.gr)(N(e),a);return(0,c.i)(r,s,l,d)}function I(e,t){const r=w(e,t,v.rq.get()),{basis1:i,basis2:n}=e,o=(0,c.l)(i),a=(0,c.l)(n),s=Math.max(Math.abs(r[0])-o,0),l=Math.max(Math.abs(r[1])-a,0),d=r[2];return s*s+l*l+d*d}function O(e,t){const r=-e.plane[3];return(0,p.gr)(N(e),t)-r}function N(e){return(0,m.Qj)(e.plane)}function y(e,t){const r=(0,c.d)(v.rq.get(),t,e.origin),i=(0,c.k)(e.basis1),n=(0,c.k)(e.basis2),o=(0,c.f)(e.basis1,r),a=(0,c.f)(e.basis2,r);return-o-i<0&&o-i<0&&-a-n<0&&a-n<0}function P(e,t){const r=B.get();return(0,c.c)(r.origin,e.origin),(0,c.c)(r.vector,t),r}function L(e,t,r){const{basis1:i,basis2:n,origin:o}=e,a=(0,c.h)(v.rq.get(),i,t.origin[0]),s=(0,c.h)(v.rq.get(),n,t.origin[1]);(0,c.g)(r.origin,a,s),(0,c.g)(r.origin,r.origin,o);const l=(0,c.h)(v.rq.get(),i,t.direction[0]),d=(0,c.h)(v.rq.get(),n,t.direction[1]);return(0,c.h)(r.vector,(0,c.g)(l,l,d),2),r}function D(e,t,r,i){const n=N(e);(0,m.mR)(n,t.direction,t.origin,r),(0,m.mR)((0,m.Qj)(r),n,t.origin,i)}const H={plane:(0,m.vt)(),origin:(0,l.fA)(0,0,0),basis1:(0,l.fA)(1,0,0),basis2:(0,l.fA)(0,1,0)},F=new o.I(m.vt),B=new o.I(h.vt),U=(0,l.vt)(),G=new o.I((()=>_())),z=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],V=(0,s.vt)(),W=(0,s.vt)(),j=Object.freeze(Object.defineProperty({__proto__:null,BoundedPlaneClass:class{constructor(){this.plane=(0,m.vt)(),this.origin=(0,l.vt)(),this.basis1=(0,l.vt)(),this.basis2=(0,l.vt)()}},altitudeAt:O,axisAt:function(e,t,r,i){return function(e,t,r){switch(t){case u._.X:(0,c.c)(r,e.basis1),(0,c.n)(r,r);break;case u._.Y:(0,c.c)(r,e.basis2),(0,c.n)(r,r);break;case u._.Z:(0,c.c)(r,N(e))}return r}(e,r,i)},cameraFrustumCoverage:function(e,t){return(t-e)/t},closestPoint:C,closestPointOnSilhouette:M,copy:T,copyWithoutVerify:function(e,t){(0,c.c)(t.origin,e.origin),(0,c.c)(t.basis1,e.basis1),(0,c.c)(t.basis2,e.basis2),(0,m.C)(t.plane,e.plane)},create:_,distance:function(e,t){return Math.sqrt(I(e,t))},distance2:I,distanceToSilhouette:function(e,t){let r=Number.NEGATIVE_INFINITY;for(const i of z){const n=L(e,i,B.get()),o=(0,h.kb)(n,t);o>r&&(r=o)}return Math.sqrt(r)},elevate:b,equals:function(e,t){return(0,c.p)(e.basis1,t.basis1)&&(0,c.p)(e.basis2,t.basis2)&&(0,c.p)(e.origin,t.origin)},extrusionContainsPoint:function(e,t){return(0,m.Tj)(e.plane,t)&&y(e,t)},fromAABoundingRect:E,fromValues:x,getExtent:function(e,t){const r=e.basis1[0],i=e.basis2[1],[n,o]=e.origin;return(0,d.fA)(n-r,o-i,n+r,o+i,t)},intersectRay:S,intersectRayClosestSilhouette:function(e,t,r){if(S(e,t,r))return r;const i=M(e,t,v.rq.get());return(0,c.g)(r,t.origin,(0,c.h)(v.rq.get(),t.direction,(0,c.j)(t.origin,i)/(0,c.l)(t.direction))),r},normal:N,projectPoint:R,projectPointLocal:w,rotate:function(e,t,r,i){return e!==i&&T(e,i),(0,a.$0)(W,t,r),(0,c.t)(i.basis1,e.basis1,W),(0,c.t)(i.basis2,e.basis2,W),A(i),i},setAltitudeAt:function(e,t,r,i){const n=O(e,t),o=(0,c.h)(U,N(e),r-n);return(0,c.g)(i,t,o),i},setExtent:function(e,t,r){return E(t,r),b(r,O(e,e.origin),r),r},transform:function(e,t,r){return e!==r&&T(e,r),(0,a.B8)(V,t),(0,a.mg)(V,V),(0,c.t)(r.basis1,e.basis1,V),(0,c.t)(r.basis2,e.basis2,V),(0,c.t)((0,m.Qj)(r.plane),(0,m.Qj)(e.plane),V),(0,c.t)(r.origin,e.origin,t),(0,m.mP)(r.plane,r.plane,r.origin),r},up:H,updateUnboundedPlane:A,wrap:function(e,t,r){const i=G.get();return i.origin=e,i.basis1=t,i.basis2=r,i.plane=(0,m.LV)(0,0,0,0),A(i),i}},Symbol.toStringTag,{value:"Module"}))},17478:(e,t,r)=>{r.d(t,{h:()=>a,p:()=>s});var i=r(24326),n=r(89192);class o{constructor(){this.uid=(0,i.c)()}}class a extends o{constructor(e){super(),this.highlightName=e,this.channel=n.Mg.Highlight}}class s extends o{constructor(){super(...arguments),this.channel=n.Mg.MaskOccludee}}},20304:(e,t,r)=>{r.d(t,{m:()=>o});var i=r(69270),n=r(74333);class o extends n.n{constructor(e,t){super(e,"float",i.c.Pass,((r,i,n)=>r.setUniform1f(e,t(i,n))))}}},20693:(e,t,r)=>{r.d(t,{yu:()=>f,Nz:()=>T,NB:()=>p,S7:()=>_});var i=r(58083),n=r(9093),o=r(38954),a=r(51850),s=r(23205),c=r(40710),l=r(33094),d=r(58029),u=r(69270),h=r(74333);class m extends h.n{constructor(e,t){super(e,"mat4",u.c.Draw,((r,i,n)=>r.setUniformMatrix4fv(e,t(i,n))))}}function f(e,t){t.instancedDoublePrecision?e.constants.add("cameraPosition","vec3",a.uY):e.uniforms.add(new c.W("cameraPosition",((e,t)=>(0,o.i)(g,t.camera.viewInverseTransposeMatrix[3]-e.origin[0],t.camera.viewInverseTransposeMatrix[7]-e.origin[1],t.camera.viewInverseTransposeMatrix[11]-e.origin[2]))))}function p(e,t){if(!t.instancedDoublePrecision)return void e.uniforms.add(new d.F("proj",(e=>e.camera.projectionMatrix)),new m("view",((e,t)=>(0,i.Tl)(v,t.camera.viewMatrix,e.origin))),new c.W("localOrigin",(e=>e.origin)));const r=({camera:e})=>(0,o.i)(g,e.viewInverseTransposeMatrix[3],e.viewInverseTransposeMatrix[7],e.viewInverseTransposeMatrix[11]);e.uniforms.add(new d.F("proj",(e=>e.camera.projectionMatrix)),new d.F("view",(e=>(0,i.Tl)(v,e.camera.viewMatrix,r(e)))),new s.d("localOrigin",(e=>r(e))))}const v=(0,n.vt)(),g=(0,a.vt)();function _(e){e.uniforms.add(new d.F("viewNormal",(e=>e.camera.viewInverseTransposeMatrix)))}function T(e){e.uniforms.add(new l.U("pixelRatio",(e=>e.camera.pixelRatio/e.overlayStretch)))}},22393:(e,t,r)=>{r.d(t,{c:()=>s});var i=r(31821);function n(e){const t=e.fragment.code;t.add(i.H`vec3 evaluateDiffuseIlluminationHemisphere(vec3 ambientGround, vec3 ambientSky, float NdotNG)
|
|
127
|
+
fragOcclusion = A;`),e}function g(e){return Math.max(10,20*e.computeScreenPixelSizeAtDist(Math.abs(4*e.relativeElevation)))}const _=(0,n.vt)(),T=Object.freeze(Object.defineProperty({__proto__:null,build:v,getRadius:g},Symbol.toStringTag,{value:"Module"}))},16396:(e,t,r)=>{r.d(t,{ou:()=>l}),r(77690),r(29242),r(58083),r(9093);var i=r(38954),n=r(51850),o=r(97937),a=r(24151),s=r(57005);const c=new class{constructor(e=0){this.offset=e,this.sphere=(0,o.c)(),this.tmpVertex=(0,n.vt)()}applyToVertex(e,t,r){const n=this.objectTransform.transform,o=(0,i.i)(d,e,t,r),a=(0,i.t)(o,o,n),s=this.offset/(0,i.l)(a);(0,i.b)(a,a,a,s);const c=this.objectTransform.inverse;return(0,i.t)(this.tmpVertex,a,c),this.tmpVertex}applyToMinMax(e,t){const r=this.offset/(0,i.l)(e);(0,i.b)(e,e,e,r);const n=this.offset/(0,i.l)(t);(0,i.b)(t,t,t,n)}applyToAabb(e){const t=this.offset/Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]+=e[0]*t,e[1]+=e[1]*t,e[2]+=e[2]*t;const r=this.offset/Math.sqrt(e[3]*e[3]+e[4]*e[4]+e[5]*e[5]);return e[3]+=e[3]*r,e[4]+=e[4]*r,e[5]+=e[5]*r,e}applyToBoundingSphere(e){const t=(0,i.l)((0,o.a)(e)),r=this.offset/t;return(0,i.b)((0,o.a)(this.sphere),(0,o.a)(e),(0,o.a)(e),r),this.sphere[3]=e[3]+e[3]*this.offset/t,this.sphere}};function l(e){return null!=e?(c.offset=e,c):null}new class{constructor(e=0){this.componentLocalOriginLength=0,this._totalOffset=0,this._offset=0,this._tmpVertex=(0,n.vt)(),this._tmpMbs=(0,o.c)(),this._tmpObb=new s.ab,this._resetOffset(e)}_resetOffset(e){this._offset=e,this._totalOffset=e}set offset(e){this._resetOffset(e)}get offset(){return this._offset}set componentOffset(e){this._totalOffset=this._offset+e}set localOrigin(e){this.componentLocalOriginLength=(0,i.l)(e)}applyToVertex(e,t,r){const n=(0,i.i)(d,e,t,r),o=(0,i.i)(u,e,t,r+this.componentLocalOriginLength),a=this._totalOffset/(0,i.l)(o);return(0,i.b)(this._tmpVertex,n,o,a),this._tmpVertex}applyToAabb(e){const t=this.componentLocalOriginLength,r=e[0],i=e[1],n=e[2]+t,o=e[3],a=e[4],s=e[5]+t,c=Math.abs(r),l=Math.abs(i),d=Math.abs(n),u=Math.abs(o),h=Math.abs(a),m=Math.abs(s),f=.5*(1+Math.sign(r*o))*Math.min(c,u),p=.5*(1+Math.sign(i*a))*Math.min(l,h),v=.5*(1+Math.sign(n*s))*Math.min(d,m),g=Math.max(c,u),_=Math.max(l,h),T=Math.max(d,m),x=Math.sqrt(f*f+p*p+v*v),A=Math.sign(c+r),b=Math.sign(l+i),E=Math.sign(d+n),S=Math.sign(u+o),M=Math.sign(h+a),C=Math.sign(m+s),R=this._totalOffset;if(x<R)return e[0]-=(1-A)*R,e[1]-=(1-b)*R,e[2]-=(1-E)*R,e[3]+=S*R,e[4]+=M*R,e[5]+=C*R,e;const w=R/Math.sqrt(g*g+_*_+T*T),I=R/x,O=I-w,y=-O;return e[0]+=r*(A*y+I),e[1]+=i*(b*y+I),e[2]+=n*(E*y+I),e[3]+=o*(S*O+w),e[4]+=a*(M*O+w),e[5]+=s*(C*O+w),e}applyToMbs(e){const t=(0,i.l)((0,o.a)(e)),r=this._totalOffset/t;return(0,i.b)((0,o.a)(this._tmpMbs),(0,o.a)(e),(0,o.a)(e),r),this._tmpMbs[3]=e[3]+e[3]*this._totalOffset/t,this._tmpMbs}applyToObb(e){return(0,s.gm)(e,this._totalOffset,this._totalOffset,a.RT.Global,this._tmpObb),this._tmpObb}},new class{constructor(e=0){this.offset=e,this.tmpVertex=(0,n.vt)()}applyToVertex(e,t,r){const n=(0,i.i)(d,e,t,r),o=(0,i.g)(u,n,this.localOrigin),a=this.offset/(0,i.l)(o);return(0,i.b)(this.tmpVertex,n,o,a),this.tmpVertex}applyToAabb(e){const t=h,r=m,i=f;for(let n=0;n<3;++n)t[n]=e[0+n]+this.localOrigin[n],r[n]=e[3+n]+this.localOrigin[n],i[n]=t[n];const n=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=n[t],e[t+3]=n[t];const o=t=>{const r=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=Math.min(e[t],r[t]),e[t+3]=Math.max(e[t+3],r[t])};for(let e=1;e<8;++e){for(let n=0;n<3;++n)i[n]=e&1<<n?r[n]:t[n];o(i)}let a=0;for(let e=0;e<3;++e)t[e]*r[e]<0&&(a|=1<<e);if(0!==a&&7!==a)for(let e=0;e<8;++e)if(!(a&e)){for(let n=0;n<3;++n)i[n]=a&1<<n?0:e&1<<n?t[n]:r[n];o(i)}for(let t=0;t<3;++t)e[t]-=this.localOrigin[t],e[t+3]-=this.localOrigin[t];return e}};const d=(0,n.vt)(),u=(0,n.vt)(),h=(0,n.vt)(),m=(0,n.vt)(),f=(0,n.vt)()},17352:(e,t,r)=>{r.d(t,{b:()=>j,f:()=>x}),r(44208);var i=r(53966),n=r(34727),o=r(4341),a=r(58083),s=r(9093),c=r(38954),l=r(51850),d=r(19419),u=r(88582),h=r(11964),m=r(27921),f=r(71351),p=r(44280),v=r(32114);const g=()=>i.A.getLogger("esri.views.3d.support.geometryUtils.boundedPlane");function _(e=H){return{plane:(0,m.vt)(e.plane),origin:(0,l.o8)(e.origin),basis1:(0,l.o8)(e.basis1),basis2:(0,l.o8)(e.basis2)}}function T(e,t=_()){return x(e.origin,e.basis1,e.basis2,t)}function x(e,t,r,i=_()){return(0,c.c)(i.origin,e),(0,c.c)(i.basis1,t),(0,c.c)(i.basis2,r),A(i),function(e,t){Math.abs((0,c.f)(e.basis1,e.basis2)/((0,c.l)(e.basis1)*(0,c.l)(e.basis2)))>1e-6&&g().warn(t,"Provided basis vectors are not perpendicular"),Math.abs((0,c.f)(e.basis1,y(e)))>1e-6&&g().warn(t,"Basis vectors and plane normal are not perpendicular"),Math.abs(-(0,c.f)(y(e),e.origin)-e.plane[3])>1e-6&&g().warn(t,"Plane offset is not consistent with plane origin")}(i,"fromValues()"),i}function A(e){(0,m.mR)(e.basis2,e.basis1,e.origin,e.plane)}function b(e,t,r){e!==r&&T(e,r);const i=(0,c.h)(v.rq.get(),y(e),t);return(0,c.g)(r.origin,r.origin,i),r.plane[3]-=t,r}function E(e,t=_()){const r=(e[2]-e[0])/2,i=(e[3]-e[1])/2;return(0,c.i)(t.origin,e[0]+r,e[1]+i,0),(0,c.i)(t.basis1,r,0,0),(0,c.i)(t.basis2,0,i,0),(0,m.fA)(0,0,1,0,t.plane),t}function S(e,t,r){return!!(0,m.Ui)(e.plane,t,r)&&N(e,r)}function M(e,t,r){const i=F.get();D(e,t,i,F.get());let o=Number.POSITIVE_INFINITY;for(const a of z){const s=L(e,a,B.get()),l=v.rq.get();if((0,m.T7)(i,s,l)){const e=(0,c.o)(v.rq.get(),t.origin,l),i=Math.abs((0,n.XM)((0,c.f)(t.direction,e)));i<o&&(o=i,(0,c.c)(r,l))}}return o===Number.POSITIVE_INFINITY?C(e,t,r):r}function C(e,t,r){if(S(e,t,r))return r;const i=F.get(),n=F.get();D(e,t,i,n);let o=Number.POSITIVE_INFINITY;for(const a of z){const s=L(e,a,B.get()),l=v.rq.get();if((0,m.gv)(i,s,l)){const e=(0,f.kb)(t,l);if(!(0,m.Tj)(n,l))continue;e<o&&(o=e,(0,c.c)(r,l))}}return I(e,t.origin)<o&&R(e,t.origin,r),r}function R(e,t,r){const i=(0,m._I)(e.plane,t,v.rq.get()),n=(0,h.H6)(P(e,e.basis1),i,-1,1,v.rq.get()),o=(0,h.H6)(P(e,e.basis2),i,-1,1,v.rq.get());return(0,c.d)(r,(0,c.g)(v.rq.get(),n,o),e.origin),r}function w(e,t,r){const{origin:i,basis1:n,basis2:o}=e,a=(0,c.d)(v.rq.get(),t,i),s=(0,p.gr)(n,a),l=(0,p.gr)(o,a),d=(0,p.gr)(y(e),a);return(0,c.i)(r,s,l,d)}function I(e,t){const r=w(e,t,v.rq.get()),{basis1:i,basis2:n}=e,o=(0,c.l)(i),a=(0,c.l)(n),s=Math.max(Math.abs(r[0])-o,0),l=Math.max(Math.abs(r[1])-a,0),d=r[2];return s*s+l*l+d*d}function O(e,t){const r=-e.plane[3];return(0,p.gr)(y(e),t)-r}function y(e){return(0,m.Qj)(e.plane)}function N(e,t){const r=(0,c.d)(v.rq.get(),t,e.origin),i=(0,c.k)(e.basis1),n=(0,c.k)(e.basis2),o=(0,c.f)(e.basis1,r),a=(0,c.f)(e.basis2,r);return-o-i<0&&o-i<0&&-a-n<0&&a-n<0}function P(e,t){const r=B.get();return(0,c.c)(r.origin,e.origin),(0,c.c)(r.vector,t),r}function L(e,t,r){const{basis1:i,basis2:n,origin:o}=e,a=(0,c.h)(v.rq.get(),i,t.origin[0]),s=(0,c.h)(v.rq.get(),n,t.origin[1]);(0,c.g)(r.origin,a,s),(0,c.g)(r.origin,r.origin,o);const l=(0,c.h)(v.rq.get(),i,t.direction[0]),d=(0,c.h)(v.rq.get(),n,t.direction[1]);return(0,c.h)(r.vector,(0,c.g)(l,l,d),2),r}function D(e,t,r,i){const n=y(e);(0,m.mR)(n,t.direction,t.origin,r),(0,m.mR)((0,m.Qj)(r),n,t.origin,i)}const H={plane:(0,m.vt)(),origin:(0,l.fA)(0,0,0),basis1:(0,l.fA)(1,0,0),basis2:(0,l.fA)(0,1,0)},F=new o.I(m.vt),B=new o.I(h.vt),U=(0,l.vt)(),G=new o.I((()=>_())),z=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],V=(0,s.vt)(),W=(0,s.vt)(),j=Object.freeze(Object.defineProperty({__proto__:null,BoundedPlaneClass:class{constructor(){this.plane=(0,m.vt)(),this.origin=(0,l.vt)(),this.basis1=(0,l.vt)(),this.basis2=(0,l.vt)()}},altitudeAt:O,axisAt:function(e,t,r,i){return function(e,t,r){switch(t){case u._.X:(0,c.c)(r,e.basis1),(0,c.n)(r,r);break;case u._.Y:(0,c.c)(r,e.basis2),(0,c.n)(r,r);break;case u._.Z:(0,c.c)(r,y(e))}return r}(e,r,i)},cameraFrustumCoverage:function(e,t){return(t-e)/t},closestPoint:C,closestPointOnSilhouette:M,copy:T,copyWithoutVerify:function(e,t){(0,c.c)(t.origin,e.origin),(0,c.c)(t.basis1,e.basis1),(0,c.c)(t.basis2,e.basis2),(0,m.C)(t.plane,e.plane)},create:_,distance:function(e,t){return Math.sqrt(I(e,t))},distance2:I,distanceToSilhouette:function(e,t){let r=Number.NEGATIVE_INFINITY;for(const i of z){const n=L(e,i,B.get()),o=(0,h.kb)(n,t);o>r&&(r=o)}return Math.sqrt(r)},elevate:b,equals:function(e,t){return(0,c.p)(e.basis1,t.basis1)&&(0,c.p)(e.basis2,t.basis2)&&(0,c.p)(e.origin,t.origin)},extrusionContainsPoint:function(e,t){return(0,m.Tj)(e.plane,t)&&N(e,t)},fromAABoundingRect:E,fromValues:x,getExtent:function(e,t){const r=e.basis1[0],i=e.basis2[1],[n,o]=e.origin;return(0,d.fA)(n-r,o-i,n+r,o+i,t)},intersectRay:S,intersectRayClosestSilhouette:function(e,t,r){if(S(e,t,r))return r;const i=M(e,t,v.rq.get());return(0,c.g)(r,t.origin,(0,c.h)(v.rq.get(),t.direction,(0,c.j)(t.origin,i)/(0,c.l)(t.direction))),r},normal:y,projectPoint:R,projectPointLocal:w,rotate:function(e,t,r,i){return e!==i&&T(e,i),(0,a.$0)(W,t,r),(0,c.t)(i.basis1,e.basis1,W),(0,c.t)(i.basis2,e.basis2,W),A(i),i},setAltitudeAt:function(e,t,r,i){const n=O(e,t),o=(0,c.h)(U,y(e),r-n);return(0,c.g)(i,t,o),i},setExtent:function(e,t,r){return E(t,r),b(r,O(e,e.origin),r),r},transform:function(e,t,r){return e!==r&&T(e,r),(0,a.B8)(V,t),(0,a.mg)(V,V),(0,c.t)(r.basis1,e.basis1,V),(0,c.t)(r.basis2,e.basis2,V),(0,c.t)((0,m.Qj)(r.plane),(0,m.Qj)(e.plane),V),(0,c.t)(r.origin,e.origin,t),(0,m.mP)(r.plane,r.plane,r.origin),r},up:H,updateUnboundedPlane:A,wrap:function(e,t,r){const i=G.get();return i.origin=e,i.basis1=t,i.basis2=r,i.plane=(0,m.LV)(0,0,0,0),A(i),i}},Symbol.toStringTag,{value:"Module"}))},17478:(e,t,r)=>{r.d(t,{h:()=>a,p:()=>s});var i=r(24326),n=r(89192);class o{constructor(){this.uid=(0,i.c)()}}class a extends o{constructor(e){super(),this.highlightName=e,this.channel=n.Mg.Highlight}}class s extends o{constructor(){super(...arguments),this.channel=n.Mg.MaskOccludee}}},20304:(e,t,r)=>{r.d(t,{m:()=>o});var i=r(69270),n=r(74333);class o extends n.n{constructor(e,t){super(e,"float",i.c.Pass,((r,i,n)=>r.setUniform1f(e,t(i,n))))}}},20693:(e,t,r)=>{r.d(t,{yu:()=>f,Nz:()=>T,NB:()=>p,S7:()=>_});var i=r(58083),n=r(9093),o=r(38954),a=r(51850),s=r(23205),c=r(40710),l=r(33094),d=r(58029),u=r(69270),h=r(74333);class m extends h.n{constructor(e,t){super(e,"mat4",u.c.Draw,((r,i,n)=>r.setUniformMatrix4fv(e,t(i,n))))}}function f(e,t){t.instancedDoublePrecision?e.constants.add("cameraPosition","vec3",a.uY):e.uniforms.add(new c.W("cameraPosition",((e,t)=>(0,o.i)(g,t.camera.viewInverseTransposeMatrix[3]-e.origin[0],t.camera.viewInverseTransposeMatrix[7]-e.origin[1],t.camera.viewInverseTransposeMatrix[11]-e.origin[2]))))}function p(e,t){if(!t.instancedDoublePrecision)return void e.uniforms.add(new d.F("proj",(e=>e.camera.projectionMatrix)),new m("view",((e,t)=>(0,i.Tl)(v,t.camera.viewMatrix,e.origin))),new c.W("localOrigin",(e=>e.origin)));const r=({camera:e})=>(0,o.i)(g,e.viewInverseTransposeMatrix[3],e.viewInverseTransposeMatrix[7],e.viewInverseTransposeMatrix[11]);e.uniforms.add(new d.F("proj",(e=>e.camera.projectionMatrix)),new d.F("view",(e=>(0,i.Tl)(v,e.camera.viewMatrix,r(e)))),new s.d("localOrigin",(e=>r(e))))}const v=(0,n.vt)(),g=(0,a.vt)();function _(e){e.uniforms.add(new d.F("viewNormal",(e=>e.camera.viewInverseTransposeMatrix)))}function T(e){e.uniforms.add(new l.U("pixelRatio",(e=>e.camera.pixelRatio/e.overlayStretch)))}},22393:(e,t,r)=>{r.d(t,{c:()=>s});var i=r(31821);function n(e){const t=e.fragment.code;t.add(i.H`vec3 evaluateDiffuseIlluminationHemisphere(vec3 ambientGround, vec3 ambientSky, float NdotNG)
|
|
128
128
|
{
|
|
129
129
|
return ((1.0 - NdotNG) * ambientGround + (1.0 + NdotNG) * ambientSky) * 0.5;
|
|
130
130
|
}`),t.add(i.H`float integratedRadiance(float cosTheta2, float roughness)
|
|
@@ -231,7 +231,7 @@ if (lvpos.z >= 1.0 || lvpos.x < 0.0 || lvpos.x > 1.0 || lvpos.y < 0.0 || lvpos.y
|
|
|
231
231
|
ivec2 size = textureSize(shadowMap, 0);
|
|
232
232
|
vec2 uv = cascadeCoordinates(i, size, lvpos);
|
|
233
233
|
return filterShadow(uv, lvpos, size, shadowMap);
|
|
234
|
-
}`)}h.Y,h.Y},25634:(e,t,r)=>{r.d(t,{m8:()=>c,NV:()=>d});var i=r(97768),n=r(74887),o=r(89192);class a{constructor(e){this._material=e.material,this._techniques=e.techniques,this._output=e.output}dispose(){}get _stippleTextures(){return this._techniques.context.stippleTextures}get _markerTextures(){return this._techniques.context.markerTextures}getTechnique(e,t){return this._techniques.get(e,this._material.getConfiguration(this._output,t))}ensureResources(e){return o.Am.LOADED}}var s=r(65786);class c extends a{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,(e=>this._textureNormal=e)),this._acquire(e.emissiveTextureId,(e=>this._textureEmissive=e)),this._acquire(e.occlusionTextureId,(e=>this._textureOcclusion=e)),this._acquire(e.metallicRoughnessTextureId,(e=>this._textureMetallicRoughness=e))}dispose(){super.dispose(),this._texture=(0,i.Gz)(this._texture),this._textureNormal=(0,i.Gz)(this._textureNormal),this._textureEmissive=(0,i.Gz)(this._textureEmissive),this._textureOcclusion=(0,i.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,i.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?o.Am.LOADED:o.Am.LOADING}get textureBindParameters(){return new d(
|
|
234
|
+
}`)}h.Y,h.Y},25634:(e,t,r)=>{r.d(t,{m8:()=>c,NV:()=>d});var i=r(97768),n=r(74887),o=r(89192);class a{constructor(e){this._material=e.material,this._techniques=e.techniques,this._output=e.output}dispose(){}get _stippleTextures(){return this._techniques.context.stippleTextures}get _markerTextures(){return this._techniques.context.markerTextures}getTechnique(e,t){return this._techniques.get(e,this._material.getConfiguration(this._output,t))}ensureResources(e){return o.Am.LOADED}}var s=r(65786);class c extends a{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,(e=>this._textureNormal=e)),this._acquire(e.emissiveTextureId,(e=>this._textureEmissive=e)),this._acquire(e.occlusionTextureId,(e=>this._textureOcclusion=e)),this._acquire(e.metallicRoughnessTextureId,(e=>this._textureMetallicRoughness=e))}dispose(){super.dispose(),this._texture=(0,i.Gz)(this._texture),this._textureNormal=(0,i.Gz)(this._textureNormal),this._textureEmissive=(0,i.Gz)(this._textureEmissive),this._textureOcclusion=(0,i.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,i.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?o.Am.LOADED:o.Am.LOADING}get textureBindParameters(){return new d(this._texture?.glTexture??null,this._textureNormal?.glTexture??null,this._textureEmissive?.glTexture??null,this._textureOcclusion?.glTexture??null,this._textureMetallicRoughness?.glTexture??null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=(0,i.Gz)(this._texture),this._acquire(e,(e=>this._texture=e)))}_acquire(e,t){if(null==e)return void t(null);const r=this._textures.acquire(e);if((0,n.$X)(r))return++this._numLoading,void r.then((e=>{if(this._disposed)return(0,i.Gz)(e),void t(null);t(e)})).finally((()=>--this._numLoading));t(r)}}class l extends s.Y{constructor(e=null){super(),this.textureEmissive=e}}class d extends l{constructor(e,t,r,i,n,o,a){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=i,this.textureMetallicRoughness=n,this.scale=o,this.normalTextureTransformMatrix=a}}},26857:(e,t,r)=>{r.d(t,{b:()=>c});var i=r(90237),n=r(69622),o=r(10107),a=(r(44208),r(53966),r(87811),r(40608));let s=class extends n.A{constructor(){super(...arguments),this.SCENEVIEW_HITTEST_RETURN_INTERSECTOR=!1,this.DECONFLICTOR_SHOW_VISIBLE=!1,this.DECONFLICTOR_SHOW_INVISIBLE=!1,this.DECONFLICTOR_SHOW_GRID=!1,this.LABELS_SHOW_BORDER=!1,this.TEXT_SHOW_BASELINE=!1,this.TEXT_SHOW_BORDER=!1,this.OVERLAY_DRAW_DEBUG_TEXTURE=!1,this.OVERLAY_SHOW_CENTER=!1,this.SHOW_POI=!1,this.TESTS_DISABLE_OPTIMIZATIONS=!1,this.TESTS_DISABLE_FAST_UPDATES=!1,this.DRAW_MESH_GEOMETRY_NORMALS=!1,this.FEATURE_TILE_FETCH_SHOW_TILES=!1,this.FEATURE_TILE_TREE_SHOW_TILES=!1,this.TERRAIN_TILE_TREE_SHOW_TILES=!1,this.I3S_TREE_SHOW_TILES=!1,this.I3S_SHOW_MODIFICATIONS=!1,this.LOD_INSTANCE_RENDERER_DISABLE_UPDATES=!1,this.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL=!1,this.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES=!1,this.LINE_WIREFRAMES=!1}};(0,i._)([(0,o.MZ)()],s.prototype,"SCENEVIEW_HITTEST_RETURN_INTERSECTOR",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"DECONFLICTOR_SHOW_VISIBLE",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"DECONFLICTOR_SHOW_INVISIBLE",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"DECONFLICTOR_SHOW_GRID",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"LABELS_SHOW_BORDER",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"TEXT_SHOW_BASELINE",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"TEXT_SHOW_BORDER",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"OVERLAY_DRAW_DEBUG_TEXTURE",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"OVERLAY_SHOW_CENTER",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"SHOW_POI",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"TESTS_DISABLE_OPTIMIZATIONS",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"TESTS_DISABLE_FAST_UPDATES",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"DRAW_MESH_GEOMETRY_NORMALS",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"FEATURE_TILE_FETCH_SHOW_TILES",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"FEATURE_TILE_TREE_SHOW_TILES",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"TERRAIN_TILE_TREE_SHOW_TILES",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"I3S_TREE_SHOW_TILES",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"I3S_SHOW_MODIFICATIONS",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"LOD_INSTANCE_RENDERER_DISABLE_UPDATES",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES",void 0),(0,i._)([(0,o.MZ)()],s.prototype,"LINE_WIREFRAMES",void 0),s=(0,i._)([(0,a.$)("esri.views.3d.support.debugFlags")],s);const c=new s},27950:(e,t,r)=>{r.d(t,{N:()=>a});var i=r(66104),n=r(63365),o=r(31821);function a(e){e.include(n.a),e.code.add(o.H`
|
|
235
235
|
vec3 mixExternalColor(vec3 internalColor, vec3 textureColor, vec3 externalColor, int mode) {
|
|
236
236
|
// workaround for artifacts in macOS using Intel Iris Pro
|
|
237
237
|
// see: https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/10475
|
|
@@ -271,7 +271,7 @@ return filterShadow(uv, lvpos, size, shadowMap);
|
|
|
271
271
|
// multiply or tint (or something invalid)
|
|
272
272
|
return allMixed;
|
|
273
273
|
}
|
|
274
|
-
`)}},28449:(e,t,r)=>{function i(e,t,r){for(let i=0;i<r;++i)t[2*i]=e[i],t[2*i+1]=e[i]-t[2*i]}function n(e,t){const r=e.length;for(let i=0;i<r;++i)a[0]=e[i],t[i]=a[0];return t}function o(e,t){const r=e.length;for(let i=0;i<r;++i)a[0]=e[i],a[1]=e[i]-a[0],t[i]=a[1];return t}r.d(t,{Zo:()=>n,jA:()=>o,jS:()=>i});const a=new Float32Array(2)},28491:(e,t,r)=>{r.d(t,{D:()=>V,b:()=>z});var i=r(91829),n=r(46686),o=r(32680),a=r(49255),s=r(76591),c=r(76597),l=r(82991),d=r(96336),u=r(10764),h=r(71955),m=r(53466),f=r(92700),p=r(72824),v=r(35640),g=r(40261),_=r(77695),T=r(54849),x=r(74081),A=r(98619),b=r(62602),E=r(22393),S=r(59469),M=r(25618),C=r(96598),R=r(51406),w=r(42398),I=r(11955),O=r(27950),
|
|
274
|
+
`)}},28449:(e,t,r)=>{function i(e,t,r){for(let i=0;i<r;++i)t[2*i]=e[i],t[2*i+1]=e[i]-t[2*i]}function n(e,t){const r=e.length;for(let i=0;i<r;++i)a[0]=e[i],t[i]=a[0];return t}function o(e,t){const r=e.length;for(let i=0;i<r;++i)a[0]=e[i],a[1]=e[i]-a[0],t[i]=a[1];return t}r.d(t,{Zo:()=>n,jA:()=>o,jS:()=>i});const a=new Float32Array(2)},28491:(e,t,r)=>{r.d(t,{D:()=>V,b:()=>z});var i=r(91829),n=r(46686),o=r(32680),a=r(49255),s=r(76591),c=r(76597),l=r(82991),d=r(96336),u=r(10764),h=r(71955),m=r(53466),f=r(92700),p=r(72824),v=r(35640),g=r(40261),_=r(77695),T=r(54849),x=r(74081),A=r(98619),b=r(62602),E=r(22393),S=r(59469),M=r(25618),C=r(96598),R=r(51406),w=r(42398),I=r(11955),O=r(27950),y=r(20693),N=r(33079),P=r(71988),L=r(20304),D=r(31821),H=r(63761),F=r(46540),B=r(60517),U=r(14113),G=r(49788);function z(e){const t=new U.N5,{vertex:r,fragment:z,varyings:V}=t,{output:W,normalType:j,offsetBackfaces:k,instancedColor:Y,spherical:q,receiveShadows:X,snowCover:$,pbrMode:Z,textureAlphaPremultiplied:J,instancedDoublePrecision:K,hasVertexColors:Q,hasVertexTangents:ee,hasColorTexture:te,hasNormalTexture:re,hasNormalTextureTransform:ie,hasColorTextureTransform:ne}=e;if((0,y.NB)(r,e),t.include(u.I),V.add("vpos","vec3",{invariant:!0}),t.include(w.A,e),t.include(l.B,e),t.include(v.G,e),t.include(R.q2,e),!(0,a.RN)(W))return t.include(g.E,e),t;t.include(R.Sx,e),t.include(R.MU,e),t.include(R.O1,e),t.include(R.QM,e),(0,y.yu)(r,e),t.include(d.Y,e),t.include(c.d,e);const oe=j===d.W.Attribute||j===d.W.Compressed;return oe&&k&&t.include(o.M),t.include(_.W,e),t.include(p.Mh,e),Y&&t.attributes.add(F.r.INSTANCECOLOR,"vec4"),V.add("vPositionLocal","vec3"),t.include(m.U,e),t.include(n.oD,e),t.include(h.K,e),t.include(f.c,e),r.uniforms.add(new P.E("externalColor",(e=>"ignore"===e.colorMixMode?i.Un:e.externalColor))),V.add("vcolorExt","vec4"),t.include(C.Z,e),r.main.add(D.H`
|
|
275
275
|
forwardNormalizedVertexColor();
|
|
276
276
|
vcolorExt = externalColor;
|
|
277
277
|
${(0,D.If)(Y,"vcolorExt *= instanceColor * 0.003921568627451;")}
|
|
@@ -300,7 +300,7 @@ return filterShadow(uv, lvpos, size, shadowMap);
|
|
|
300
300
|
if (vcolorExt.a < ${D.H.float(G.Q)}) {
|
|
301
301
|
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
302
302
|
}
|
|
303
|
-
`),t.include(x.kA,e),t.include(T.n,e),t.include(I.S,e),t.include(K?M.G:M.Bz,e),t.fragment.include(s.HQ,e),t.include(B.z,e),(0,
|
|
303
|
+
`),t.include(x.kA,e),t.include(T.n,e),t.include(I.S,e),t.include(K?M.G:M.Bz,e),t.fragment.include(s.HQ,e),t.include(B.z,e),(0,y.yu)(z,e),z.uniforms.add(r.uniforms.get("localOrigin"),new N.t("ambient",(e=>e.ambient)),new N.t("diffuse",(e=>e.diffuse)),new L.m("opacity",(e=>e.opacity)),new L.m("layerOpacity",(e=>e.layerOpacity))),te&&z.uniforms.add(new H.N("tex",(e=>e.texture))),t.include(S._Z,e),t.include(E.c,e),z.include(O.N),t.include(b.r,e),(0,x.a8)(z),(0,x.eU)(z),(0,A.O4)(z),z.main.add(D.H`
|
|
304
304
|
discardBySlice(vpos);
|
|
305
305
|
discardByTerrainDepth();
|
|
306
306
|
${te?D.H`
|
|
@@ -494,7 +494,7 @@ vec4 vvLocalNormal(vec3 _normal) { return vec4(_normal, 1.0); }`),t.vvColor?(r.c
|
|
|
494
494
|
return (-z - nearFar[0]) / (nearFar[1] - nearFar[0]);
|
|
495
495
|
}`)}function d(e,t){const{vertex:r}=e;switch(t.output){case i.V.Color:case i.V.ColorEmission:if(t.receiveShadows)return s(e),void r.code.add(a.H`void forwardLinearDepth() { linearDepth = gl_Position.w; }`);break;case i.V.Shadow:case i.V.ShadowHighlight:case i.V.ShadowExcludeHighlight:case i.V.ViewshedShadow:return e.include(n.em,t),s(e),c(e),l(e),void r.code.add(a.H`void forwardLinearDepth() {
|
|
496
496
|
linearDepth = calculateLinearDepth(nearFar, vPosition_view.z);
|
|
497
|
-
}`)}r.code.add(a.H`void forwardLinearDepth() {}`)}},47286:(e,t,r)=>{r.d(t,{G:()=>o});var i=r(69270),n=r(74333);class o extends n.n{constructor(e,t){super(e,"vec2",i.c.Pass,((r,i,n)=>r.setUniform2fv(e,t(i,n))))}}},48833:(e,t,r)=>{r.d(t,{g:()=>U}),r(44208);var i=r(49186),n=r(65529),o=r(97768),a=r(74887),s=r(34275),c=r(84952),l=r(99677),d=r(56058),u=r(89192),h=r(2741);let m;var f=r(92993),p=r(63907),v=r(30164),g=r(42293);let _=null,T=null;async function x(){return null==T&&(m??=(async()=>{const e=await r.e(9321).then(r.bind(r,49321)),t=await e.default({locateFile:e=>(0,h.s)(`esri/libs/basisu/${e}`)});return t.initializeBasis(),t})(),T=m,_=await T),T}function A(e,t,r,i,n){const o=(0,g.IB)(t?p.CQ.COMPRESSED_RGBA8_ETC2_EAC:p.CQ.COMPRESSED_RGB8_ETC2),a=n&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*o*a)}function b(e){return e.getNumImages()>=1&&!e.isUASTC()}function E(e){return e.getFaces()>=1&&e.isETC1S()}function S(e,t,r,i,n,o,a,s){const{compressedTextureETC:c,compressedTextureS3TC:l}=e.capabilities,[d,u]=c?i?[f.n.ETC2_RGBA,p.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[f.n.ETC1_RGB,p.CQ.COMPRESSED_RGB8_ETC2]:l?i?[f.n.BC3_RGBA,p.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[f.n.BC1_RGB,p.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[f.n.RGBA32,p.Ab.RGBA],h=t.hasMipmap?r:Math.min(1,r),m=[];for(let e=0;e<h;e++)m.push(new Uint8Array(a(e,d))),s(e,d,m[e]);return t.internalFormat=u,t.hasMipmap=m.length>1,t.samplingMode=t.hasMipmap?p.Cj.LINEAR_MIPMAP_LINEAR:p.Cj.LINEAR,t.width=n,t.height=o,new v.g(e,t,{type:"compressed",levels:m})}var M=r(69720),C=r(96672),R=r(53966);const w=()=>R.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function I(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const O=I("DXT1"),N=I("DXT3"),y=I("DXT5");function P(e,t){return t=16*Math.floor(t/16),Math.min(16*Math.round(e/16),t)}function L(e,{maxPreferredTextureSize:t,maxTextureSize:r}){const i=Math.max(e.width,e.height),n=e.width*e.height,o=t*t;if(i<=r&&n<=o)return e;const a=Math.min(Math.sqrt(o/n),r/i);return D(e,P(Math.round(e.width*a),r),P(Math.round(e.height*a),r))}function D(e,t,r){if(e instanceof ImageData)return D(function(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new i.A("Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}(e),t,r);const n=document.createElement("canvas");return n.width=t,n.height=r,n.getContext("2d").drawImage(e,0,0,n.width,n.height),n}var H,F=r(620),B=r(67171);class U extends M.J{constructor(e,t){super(),this._data=e,this.type=C.X.Texture,this.events=new n.A,this._parameters={...z,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.frameUpdate=void 0}_startPreload(e){e instanceof HTMLVideoElement?(this.frameUpdate=t=>this._frameUpdate(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e)}_startPreloadVideoElement(e){if(!((0,c.w8)(e.src)||"auto"===e.preload&&e.crossOrigin)){e.preload="auto",e.crossOrigin="anonymous";const t=!e.paused;if(e.src=e.src,t&&e.autoplay){const t=()=>{e.removeEventListener("canplay",t),e.play()};e.addEventListener("canplay",t)}}}_startPreloadImageElement(e){(0,c.DB)(e.src)||(0,c.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new B.R;return t.wrapMode=this._parameters.wrap??p.pF.REPEAT,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?p.Cj.LINEAR_MIPMAP_LINEAR:p.Cj.LINEAR,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t}get glTexture(){return this._glTexture??this._emptyTexture}get loaded(){return null!=this._glTexture}get usedMemory(){return this._glTexture?.usedMemory||function(e,t){if(null==e)return 0;if((0,s.mw)(e)||(0,s.mg)(e))return t.encoding===u.JS.KTX2_ENCODING?function(e,t){if(null==_)return e.byteLength;const r=new _.KTX2File(new Uint8Array(e)),i=E(r)?A(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):t.encoding===u.JS.BASIS_ENCODING?function(e,t){if(null==_)return e.byteLength;const r=new _.BasisFile(new Uint8Array(e)),i=b(r)?A(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?G(e):t;return(t.mipmap?4/3:1)*r*i*(t.components||4)||0}(this._data,this._parameters)}load(e){if(this._loadingPromise)return this._loadingPromise;if(this._glTexture)return this._glTexture;const t=this._data;return null==t?(this._glTexture=new v.g(e,this._createDescriptor(e),null),this._glTexture):(this._emptyTexture=e.emptyTexture,this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):(0,s.mg)(t)&&this._parameters.encoding===u.JS.DDS_ENCODING?this._loadFromDDSData(e,t):(0,s.mw)(t)&&this._parameters.encoding===u.JS.DDS_ENCODING?this._loadFromDDSData(e,new Uint8Array(t)):((0,s.mw)(t)||(0,s.mg)(t))&&this._parameters.encoding===u.JS.KTX2_ENCODING?this._loadFromKTX2(e,t):((0,s.mw)(t)||(0,s.mg)(t))&&this._parameters.encoding===u.JS.BASIS_ENCODING?this._loadFromBasis(e,t):(0,s.mg)(t)?this._loadFromPixelData(e,t):(0,s.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):null)}_frameUpdate(e,t){return null==this._glTexture||e.readyState<H.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._glTexture.setData(e),this._glTexture.descriptor.hasMipmap&&this._glTexture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._glTexture=function(e,t,r){const i=function(e,t){const r=new Int32Array(e.buffer,e.byteOffset,31);if(542327876!==r[0])return w().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return w().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let n,o;switch(i){case O:n=8,o=p.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case N:n=16,o=p.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case y:n=16,o=p.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return w().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let a=1,s=r[4],c=r[3];(3&s||3&c)&&(w().warn("Rounding up compressed texture size to nearest multiple of 4."),s=s+3&-4,c=c+3&-4);const l=s,d=c;let u,h;131072&r[2]&&!1!==t&&(a=Math.max(1,r[7]));let m=e.byteOffset+r[1]+4;const f=[];for(let t=0;t<a;++t)h=(s+3>>2)*(c+3>>2)*n,u=new Uint8Array(e.buffer,m,h),f.push(u),m+=h,s=Math.max(1,s>>1),c=Math.max(1,c>>1);return{textureData:{type:"compressed",levels:f},internalFormat:o,width:l,height:d}}(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:n,internalFormat:o,width:a,height:s}=i;return t.samplingMode=n.levels.length>1?p.Cj.LINEAR_MIPMAP_LINEAR:p.Cj.LINEAR,t.hasMipmap=n.levels.length>1,t.internalFormat=o,t.width=a,t.height=s,new v.g(e,t,n)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._glTexture}_loadFromKTX2(e,t){return this._loadAsync((()=>async function(e,t,r){null==_&&(_=await x());const i=new _.KTX2File(new Uint8Array(r));if(!E(i))return null;i.startTranscoding();const n=S(e,t,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),((e,t)=>i.getImageTranscodedSizeInBytes(e,0,0,t)),((e,t,r)=>i.transcodeImage(r,e,0,0,t,0,-1,-1)));return i.close(),i.delete(),n}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromBasis(e,t){return this._loadAsync((()=>async function(e,t,r){null==_&&(_=await x());const i=new _.BasisFile(new Uint8Array(r));if(!b(i))return null;i.startTranscoding();const n=S(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),((e,t)=>i.getImageTranscodedSizeInBytes(0,e,t)),((e,t,r)=>i.transcodeImage(r,0,e,t,0,0)));return i.close(),i.delete(),n}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromPixelData(e,t){(0,F.vA)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return r.pixelFormat=1===this._parameters.components?p.Ab.LUMINANCE:3===this._parameters.components?p.Ab.RGB:p.Ab.RGBA,r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._glTexture=new v.g(e,r,t),this._glTexture}_loadFromURL(e,t){return this._loadAsync((async r=>{const i=await(0,l.D)(t,{signal:r});return(0,a.Te)(r),this._loadFromImage(e,i)}))}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync((async r=>{const i=await(0,d.Sx)(t,t.src,!1,r);return(0,a.Te)(r),this._loadFromImage(e,i)}))}_loadFromVideoElement(e,t){return t.readyState>=H.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync((r=>new Promise(((n,s)=>{const c=()=>{t.removeEventListener("loadeddata",l),t.removeEventListener("error",d),(0,o.xt)(u)},l=()=>{t.readyState>=H.HAVE_CURRENT_DATA&&(c(),n(this._loadFromImage(e,t)))},d=e=>{c(),s(e||new i.A("Failed to load video"))};t.addEventListener("loadeddata",l),t.addEventListener("error",d);const u=(0,a.u7)(r,(()=>d((0,a.NK)())))}))))}_loadFromImage(e,t){let r=t;r instanceof HTMLVideoElement||(r=L(r,e.parameters));const i=G(r);this._parameters.width=i.width,this._parameters.height=i.height;const n=this._createDescriptor(e);return n.pixelFormat=3===this._parameters.components?p.Ab.RGB:p.Ab.RGBA,n.width=i.width,n.height=i.height,n.shouldCompress=this._parameters.shouldCompress,this._glTexture=new v.g(e,n,r),this._emptyTexture=null,this._glTexture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null),this._emptyTexture=null};return r.then(i,i),r}unload(){if(this._glTexture=(0,o.WD)(this._glTexture),this._emptyTexture=null,null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function G(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}!function(e){e[e.HAVE_NOTHING=0]="HAVE_NOTHING",e[e.HAVE_METADATA=1]="HAVE_METADATA",e[e.HAVE_CURRENT_DATA=2]="HAVE_CURRENT_DATA",e[e.HAVE_FUTURE_DATA=3]="HAVE_FUTURE_DATA",e[e.HAVE_ENOUGH_DATA=4]="HAVE_ENOUGH_DATA"}(H||(H={}));const z={wrap:{s:p.pF.REPEAT,t:p.pF.REPEAT},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1,shouldCompress:!1}},49788:(e,t,r)=>{r.d(t,{Q:()=>i});const i=1/255.5},51406:(e,t,r)=>{r.d(t,{MU:()=>l,O1:()=>d,QM:()=>u,Sx:()=>c,q2:()=>s});var i=r(29242),n=r(53466),o=r(31821),a=r(35644);function s(e,t){t.hasColorTextureTransform?(e.varyings.add("colorUV","vec2"),e.vertex.uniforms.add(new a.k("colorTextureTransformMatrix",(e=>e.colorTextureTransformMatrix??i.zK))).code.add(o.H`void forwardColorUV(){
|
|
497
|
+
}`)}r.code.add(a.H`void forwardLinearDepth() {}`)}},47286:(e,t,r)=>{r.d(t,{G:()=>o});var i=r(69270),n=r(74333);class o extends n.n{constructor(e,t){super(e,"vec2",i.c.Pass,((r,i,n)=>r.setUniform2fv(e,t(i,n))))}}},48833:(e,t,r)=>{r.d(t,{g:()=>U}),r(44208);var i=r(49186),n=r(65529),o=r(97768),a=r(74887),s=r(34275),c=r(84952),l=r(99677),d=r(56058),u=r(89192),h=r(2741);let m;var f=r(92993),p=r(63907),v=r(30164),g=r(42293);let _=null,T=null;async function x(){return null==T&&(m??=(async()=>{const e=await r.e(9321).then(r.bind(r,49321)),t=await e.default({locateFile:e=>(0,h.s)(`esri/libs/basisu/${e}`)});return t.initializeBasis(),t})(),T=m,_=await T),T}function A(e,t,r,i,n){const o=(0,g.IB)(t?p.CQ.COMPRESSED_RGBA8_ETC2_EAC:p.CQ.COMPRESSED_RGB8_ETC2),a=n&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*o*a)}function b(e){return e.getNumImages()>=1&&!e.isUASTC()}function E(e){return e.getFaces()>=1&&e.isETC1S()}function S(e,t,r,i,n,o,a,s){const{compressedTextureETC:c,compressedTextureS3TC:l}=e.capabilities,[d,u]=c?i?[f.n.ETC2_RGBA,p.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[f.n.ETC1_RGB,p.CQ.COMPRESSED_RGB8_ETC2]:l?i?[f.n.BC3_RGBA,p.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[f.n.BC1_RGB,p.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[f.n.RGBA32,p.Ab.RGBA],h=t.hasMipmap?r:Math.min(1,r),m=[];for(let e=0;e<h;e++)m.push(new Uint8Array(a(e,d))),s(e,d,m[e]);return t.internalFormat=u,t.hasMipmap=m.length>1,t.samplingMode=t.hasMipmap?p.Cj.LINEAR_MIPMAP_LINEAR:p.Cj.LINEAR,t.width=n,t.height=o,new v.g(e,t,{type:"compressed",levels:m})}var M=r(69720),C=r(96672),R=r(53966);const w=()=>R.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function I(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const O=I("DXT1"),y=I("DXT3"),N=I("DXT5");function P(e,t){return t=16*Math.floor(t/16),Math.min(16*Math.round(e/16),t)}function L(e,{maxPreferredTextureSize:t,maxTextureSize:r}){const i=Math.max(e.width,e.height),n=e.width*e.height,o=t*t;if(i<=r&&n<=o)return e;const a=Math.min(Math.sqrt(o/n),r/i);return D(e,P(Math.round(e.width*a),r),P(Math.round(e.height*a),r))}function D(e,t,r){if(e instanceof ImageData)return D(function(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new i.A("Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}(e),t,r);const n=document.createElement("canvas");return n.width=t,n.height=r,n.getContext("2d").drawImage(e,0,0,n.width,n.height),n}var H,F=r(620),B=r(67171);class U extends M.J{constructor(e,t){super(),this._data=e,this.type=C.X.Texture,this.events=new n.A,this._parameters={...z,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.frameUpdate=void 0}_startPreload(e){e instanceof HTMLVideoElement?(this.frameUpdate=t=>this._frameUpdate(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e)}_startPreloadVideoElement(e){if(!((0,c.w8)(e.src)||"auto"===e.preload&&e.crossOrigin)){e.preload="auto",e.crossOrigin="anonymous";const t=!e.paused;if(e.src=e.src,t&&e.autoplay){const t=()=>{e.removeEventListener("canplay",t),e.play()};e.addEventListener("canplay",t)}}}_startPreloadImageElement(e){(0,c.DB)(e.src)||(0,c.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new B.R;return t.wrapMode=this._parameters.wrap??p.pF.REPEAT,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?p.Cj.LINEAR_MIPMAP_LINEAR:p.Cj.LINEAR,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t}get glTexture(){return this._glTexture??this._emptyTexture}get loaded(){return null!=this._glTexture}get usedMemory(){return this._glTexture?.usedMemory||function(e,t){if(null==e)return 0;if((0,s.mw)(e)||(0,s.mg)(e))return t.encoding===u.JS.KTX2_ENCODING?function(e,t){if(null==_)return e.byteLength;const r=new _.KTX2File(new Uint8Array(e)),i=E(r)?A(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):t.encoding===u.JS.BASIS_ENCODING?function(e,t){if(null==_)return e.byteLength;const r=new _.BasisFile(new Uint8Array(e)),i=b(r)?A(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?G(e):t;return(t.mipmap?4/3:1)*r*i*(t.components||4)||0}(this._data,this._parameters)}load(e){if(this._loadingPromise)return this._loadingPromise;if(this._glTexture)return this._glTexture;const t=this._data;return null==t?(this._glTexture=new v.g(e,this._createDescriptor(e),null),this._glTexture):(this._emptyTexture=e.emptyTexture,this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):(0,s.mg)(t)&&this._parameters.encoding===u.JS.DDS_ENCODING?this._loadFromDDSData(e,t):(0,s.mw)(t)&&this._parameters.encoding===u.JS.DDS_ENCODING?this._loadFromDDSData(e,new Uint8Array(t)):((0,s.mw)(t)||(0,s.mg)(t))&&this._parameters.encoding===u.JS.KTX2_ENCODING?this._loadFromKTX2(e,t):((0,s.mw)(t)||(0,s.mg)(t))&&this._parameters.encoding===u.JS.BASIS_ENCODING?this._loadFromBasis(e,t):(0,s.mg)(t)?this._loadFromPixelData(e,t):(0,s.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):null)}_frameUpdate(e,t){return null==this._glTexture||e.readyState<H.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._glTexture.setData(e),this._glTexture.descriptor.hasMipmap&&this._glTexture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._glTexture=function(e,t,r){const i=function(e,t){const r=new Int32Array(e.buffer,e.byteOffset,31);if(542327876!==r[0])return w().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return w().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let n,o;switch(i){case O:n=8,o=p.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case y:n=16,o=p.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case N:n=16,o=p.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return w().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let a=1,s=r[4],c=r[3];(3&s||3&c)&&(w().warn("Rounding up compressed texture size to nearest multiple of 4."),s=s+3&-4,c=c+3&-4);const l=s,d=c;let u,h;131072&r[2]&&!1!==t&&(a=Math.max(1,r[7]));let m=e.byteOffset+r[1]+4;const f=[];for(let t=0;t<a;++t)h=(s+3>>2)*(c+3>>2)*n,u=new Uint8Array(e.buffer,m,h),f.push(u),m+=h,s=Math.max(1,s>>1),c=Math.max(1,c>>1);return{textureData:{type:"compressed",levels:f},internalFormat:o,width:l,height:d}}(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:n,internalFormat:o,width:a,height:s}=i;return t.samplingMode=n.levels.length>1?p.Cj.LINEAR_MIPMAP_LINEAR:p.Cj.LINEAR,t.hasMipmap=n.levels.length>1,t.internalFormat=o,t.width=a,t.height=s,new v.g(e,t,n)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._glTexture}_loadFromKTX2(e,t){return this._loadAsync((()=>async function(e,t,r){null==_&&(_=await x());const i=new _.KTX2File(new Uint8Array(r));if(!E(i))return null;i.startTranscoding();const n=S(e,t,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),((e,t)=>i.getImageTranscodedSizeInBytes(e,0,0,t)),((e,t,r)=>i.transcodeImage(r,e,0,0,t,0,-1,-1)));return i.close(),i.delete(),n}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromBasis(e,t){return this._loadAsync((()=>async function(e,t,r){null==_&&(_=await x());const i=new _.BasisFile(new Uint8Array(r));if(!b(i))return null;i.startTranscoding();const n=S(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),((e,t)=>i.getImageTranscodedSizeInBytes(0,e,t)),((e,t,r)=>i.transcodeImage(r,0,e,t,0,0)));return i.close(),i.delete(),n}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromPixelData(e,t){(0,F.vA)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return r.pixelFormat=1===this._parameters.components?p.Ab.LUMINANCE:3===this._parameters.components?p.Ab.RGB:p.Ab.RGBA,r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._glTexture=new v.g(e,r,t),this._glTexture}_loadFromURL(e,t){return this._loadAsync((async r=>{const i=await(0,l.D)(t,{signal:r});return(0,a.Te)(r),this._loadFromImage(e,i)}))}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync((async r=>{const i=await(0,d.Sx)(t,t.src,!1,r);return(0,a.Te)(r),this._loadFromImage(e,i)}))}_loadFromVideoElement(e,t){return t.readyState>=H.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync((r=>new Promise(((n,s)=>{const c=()=>{t.removeEventListener("loadeddata",l),t.removeEventListener("error",d),(0,o.xt)(u)},l=()=>{t.readyState>=H.HAVE_CURRENT_DATA&&(c(),n(this._loadFromImage(e,t)))},d=e=>{c(),s(e||new i.A("Failed to load video"))};t.addEventListener("loadeddata",l),t.addEventListener("error",d);const u=(0,a.u7)(r,(()=>d((0,a.NK)())))}))))}_loadFromImage(e,t){let r=t;r instanceof HTMLVideoElement||(r=L(r,e.parameters));const i=G(r);this._parameters.width=i.width,this._parameters.height=i.height;const n=this._createDescriptor(e);return n.pixelFormat=3===this._parameters.components?p.Ab.RGB:p.Ab.RGBA,n.width=i.width,n.height=i.height,n.shouldCompress=this._parameters.shouldCompress,this._glTexture=new v.g(e,n,r),this._emptyTexture=null,this._glTexture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null),this._emptyTexture=null};return r.then(i,i),r}unload(){if(this._glTexture=(0,o.WD)(this._glTexture),this._emptyTexture=null,null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function G(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}!function(e){e[e.HAVE_NOTHING=0]="HAVE_NOTHING",e[e.HAVE_METADATA=1]="HAVE_METADATA",e[e.HAVE_CURRENT_DATA=2]="HAVE_CURRENT_DATA",e[e.HAVE_FUTURE_DATA=3]="HAVE_FUTURE_DATA",e[e.HAVE_ENOUGH_DATA=4]="HAVE_ENOUGH_DATA"}(H||(H={}));const z={wrap:{s:p.pF.REPEAT,t:p.pF.REPEAT},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1,shouldCompress:!1}},49788:(e,t,r)=>{r.d(t,{Q:()=>i});const i=1/255.5},51406:(e,t,r)=>{r.d(t,{MU:()=>l,O1:()=>d,QM:()=>u,Sx:()=>c,q2:()=>s});var i=r(29242),n=r(53466),o=r(31821),a=r(35644);function s(e,t){t.hasColorTextureTransform?(e.varyings.add("colorUV","vec2"),e.vertex.uniforms.add(new a.k("colorTextureTransformMatrix",(e=>e.colorTextureTransformMatrix??i.zK))).code.add(o.H`void forwardColorUV(){
|
|
498
498
|
colorUV = (colorTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
|
|
499
499
|
}`)):e.vertex.code.add(o.H`void forwardColorUV(){}`)}function c(e,t){t.hasNormalTextureTransform&&t.textureCoordinateType!==n.I.None?(e.varyings.add("normalUV","vec2"),e.vertex.uniforms.add(new a.k("normalTextureTransformMatrix",(e=>e.normalTextureTransformMatrix??i.zK))).code.add(o.H`void forwardNormalUV(){
|
|
500
500
|
normalUV = (normalTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
|
|
@@ -544,14 +544,14 @@ vuv0 = getUV0();
|
|
|
544
544
|
}`);case i.Atlas:return e.attributes.add(s.r.UV0,"vec2"),e.varyings.add("vuv0","vec2"),e.attributes.add(s.r.UVREGION,"vec4"),e.varyings.add("vuvRegion","vec4"),void e.vertex.code.add(a.H`void forwardTextureCoordinates() {
|
|
545
545
|
vuv0 = uv0;
|
|
546
546
|
vuvRegion = uvRegion;
|
|
547
|
-
}`);default:(0,o.Xb)(t.textureCoordinateType);case i.None:return void e.vertex.code.add(a.H`void forwardTextureCoordinates() {}`);case i.COUNT:return}}(n=i||(i={}))[n.None=0]="None",n[n.Default=1]="Default",n[n.Atlas=2]="Atlas",n[n.Compressed=3]="Compressed",n[n.COUNT=4]="COUNT"},54849:(e,t,r)=>{r.d(t,{n:()=>W});var i,n,o,a,s,c,l=r(31821),d=r(12791),u=r(90237),h=r(34727),m=r(97768),f=r(36708),p=r(78659),v=r(10107),g=(r(44208),r(53966),r(87811),r(40608)),_=r(37585);r(9093),r(48353),r(9762),(c=i||(i={})).OPAQUE="opaque-color",c.TRANSPARENT="transparent-color",c.COMPOSITE="composite-color",c.FINAL="final-color",function(e){e.SSAO="ssao",e.LASERLINES="laserline-color",e.ANTIALIASING="aa-color",e.HIGHLIGHTS="highlight-color",e.MAGNIFIER="magnifier-color",e.OCCLUDED="occluded-color",e.VIEWSHED="viewshed-color",e.OPAQUE_ENVIRONMENT="opaque-environment-color",e.TRANSPARENT_ENVIRONMENT="transparent-environment-color",e.FOCUSAREA="focus-area"}(n||(n={})),(s=o||(o={}))[s.RED=0]="RED",s[s.RG=1]="RG",s[s.RGBA4=2]="RGBA4",s[s.RGBA=3]="RGBA",s[s.RGBA_MIPMAP=4]="RGBA_MIPMAP",s[s.R16F=5]="R16F",s[s.RGBA16F=6]="RGBA16F",function(e){e[e.DEPTH_STENCIL_TEXTURE=0]="DEPTH_STENCIL_TEXTURE",e[e.DEPTH16_BUFFER=1]="DEPTH16_BUFFER"}(a||(a={}));var T=r(69622),x=r(49186),A=r(89192);let b=class extends T.A{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces=i.COMPOSITE,this.requireGeometryDepth=!1,this._dirty=!0}initialize(){this.addHandles([(0,f.wB)((()=>this.view.ready),(e=>{e&&this.view._stage?.renderer.addRenderNode(this)}),f.Vh)])}destroy(){this.view._stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new x.A("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view._stage.renderView.renderingContext.gl}get techniques(){return this.view._stage.renderView.techniques}acquireOutputFramebuffer(){const e=this._frameBuffer?.getTexture()?.descriptor,t=this.view._stage.renderer.fboCache.acquire(e?.width??640,e?.height??480,this.produces);return t.fbo?.initializeAndBind(),t}bindRenderTarget(){return this._frameBuffer?.fbo?.initializeAndBind(),this._frameBuffer}requestRender(e){e===A.C7.UPDATE&&this.view._stage?.renderView.requestRender(e),this._dirty=!0}resetWebGLState(){this.renderingContext.resetState(),this.renderingContext.bindFramebuffer(this._frameBuffer?.fbo)}get fboCache(){return this.view._stage.renderer.fboCache}get bindParameters(){return this.renderContext.bind}get renderingContext(){return this.view._stage.renderView.renderingContext}get renderContext(){return this.view._stage?.renderer.renderContext}updateAnimation(e){return!!this._dirty&&(this._dirty=!1,!0)}doRender(e){this._frameBuffer=e.find((({name:e})=>e===this.produces));try{return this.render(e)}finally{this._frameBuffer=null}}};(0,u._)([(0,v.MZ)({constructOnly:!0})],b.prototype,"view",void 0),(0,u._)([(0,v.MZ)({constructOnly:!0})],b.prototype,"consumes",void 0),(0,u._)([(0,v.MZ)()],b.prototype,"produces",void 0),(0,u._)([(0,v.MZ)({readOnly:!0})],b.prototype,"techniques",null),b=(0,u._)([(0,g.$)("esri.views.3d.webgl.RenderNode")],b);const E=b;var S=r(97220),M=r(98958),C=r(95774),R=r(90644);class w extends M.w{constructor(e,t){super(e,t,new S.$(C.S,(()=>r.e(9384).then(r.bind(r,59384)))))}initializePipeline(){return(0,R.Ey)({colorWrite:R.kn})}}var I=r(48163),O=r(65786);class N extends O.Y{constructor(){super(...arguments),this.projScale=1}}class y extends N{constructor(){super(...arguments),this.intensity=1}}class P extends O.Y{}class L extends P{constructor(){super(...arguments),this.blurSize=(0,I.vt)()}}var D=r(15581);class H extends M.w{constructor(e,t){super(e,t,new S.$(D.S,(()=>r.e(191).then(r.bind(r,90191)))))}initializePipeline(){return(0,R.Ey)({colorWrite:R.kn})}}var F=r(63907),B=r(30164),U=r(67171);const G=2;let z=class extends E{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=n.SSAO,this.isEnabled=()=>!1,this._enableTime=(0,p.l5)(0),this._passParameters=new y,this._drawParameters=new L}initialize(){const e=Uint8Array.from(atob("eXKEvZaUc66cjIKElE1jlJ6MjJ6Ufkl+jn2fcXp5jBx7c6KEflSGiXuXeW6OWs+tfqZ2Yot2Y7Zzfo2BhniEj3xoiXuXj4eGZpqEaHKDWjSMe7palFlzc3BziYOGlFVzg6Zzg7CUY5JrjFF7eYJ4jIKEcyyEonSXe7qUfqZ7j3xofqZ2c4R5lFZ5Y0WUbppoe1l2cIh2ezyUho+BcHN2cG6DbpqJhqp2e1GcezhrdldzjFGUcyxjc3aRjDyEc1h7Sl17c6aMjH92pb6Mjpd4dnqBjMOEhqZleIOBYzB7gYx+fnqGjJuEkWlwnCx7fGl+c4hjfGyRe5qMlNOMfnqGhIWHc6OMi4GDc6aMfqZuc6aMzqJzlKZ+lJ6Me3qRfoFue0WUhoR5UraEa6qMkXiPjMOMlJOGe7JrUqKMjK6MeYRzdod+Sl17boiPc6qEeYBlcIh2c1WEe7GDiWCDa0WMjEmMdod+Y0WcdntzhmN8WjyMjKJjiXtzgYxYaGd+a89zlEV7e2GJfnd+lF1rcK5zc4p5cHuBhL6EcXp5eYB7fnh8iX6HjIKEeaxuiYOGc66RfG2Ja5hzjlGMjEmMe9OEgXuPfHyGhPeEdl6JY02McGuMfnqGhFiMa3WJfnx2l4hwcG1uhmN8c0WMc39og1GBbrCEjE2EZY+JcIh2cIuGhIWHe0mEhIVrc09+gY5+eYBlnCyMhGCDl3drfmmMgX15aGd+gYx+fnuRfnhzY1SMsluJfnd+hm98WtNrcIuGh4SEj0qPdkqOjFF7jNNjdnqBgaqUjMt7boeBhnZ4jDR7c5pze4GGjEFrhLqMjHyMc0mUhKZze4WEa117kWlwbpqJjHZ2eX2Bc09zeId+e0V7WlF7jHJ2l72BfId8l3eBgXyBe897jGl7c66cgW+Xc76EjKNbgaSEjGx4fId8jFFjgZB8cG6DhlFziZhrcIh2fH6HgUqBgXiPY8dahGFzjEmMhEFre2dxhoBzc5SGfleGe6alc7aUeYBlhKqUdlp+cH5za4OEczxza0Gcc4J2jHZ5iXuXjH2Jh5yRjH2JcFx+hImBjH+MpddCl3dreZeJjIt8ZW18bm1zjoSEeIOBlF9oh3N7hlqBY4+UeYFwhLJjeYFwaGd+gUqBYxiEYot2fqZ2ondzhL6EYyiEY02Ea0VjgZB8doaGjHxoc66cjEGEiXuXiXWMiZhreHx8frGMe75rY02Ec5pzfnhzlEp4a3VzjM+EhFFza3mUY7Zza1V5e2iMfGyRcziEhDyEkXZ2Y4OBnCx7g5t2eyBjgV6EhEFrcIh2dod+c4Z+nJ5zjm15jEmUeYxijJp7nL6clIpjhoR5WrZraGd+fnuRa6pzlIiMg6ZzfHx5foh+eX1ufnB5eX1ufnB5aJt7UqKMjIh+e3aBfm5lbYSBhGFze6J4c39oc0mUc4Z+e0V7fKFVe0WEdoaGY02Ec4Z+Y02EZYWBfH6HgU1+gY5+hIWUgW+XjJ57ebWRhFVScHuBfJ6PhBx7WqJzlM+Ujpd4gHZziX6HjHmEgZN+lJt5boiPe2GJgX+GjIGJgHZzeaxufnB5hF2JtdN7jJ57hp57hK6ElFVzg6ZzbmiEbndzhIWHe3uJfoFue3qRhJd2j3xoc65zlE1jc3p8lE1jhniEgXJ7e657vZaUc3qBh52BhIF4aHKDa9drgY5+c52GWqZzbpqJe8tjnM+UhIeMfo2BfGl+hG1zSmmMjKJjZVaGgX15c1lze0mEp4OHa3mUhIWHhDyclJ6MeYOJkXiPc0VzhFiMlKaEboSJa5Jze41re3qRhn+HZYWBe0mEc4p5fnORbox5lEp4hGFjhGGEjJuEc1WEhLZjeHeGa7KlfHx2hLaMeX1ugY5+hIWHhKGPjMN7c1WEho1zhoBzZYx7fnhzlJt5exyUhFFziXtzfmmMa6qMYyiEiXxweV12kZSMeWqXSl17fnhzxmmMrVGEe1mcc4p5eHeGjK6MgY5+doaGa6pzlGV7g1qBh4KHkXiPeW6OaKqafqZ2eXZ5e1V7jGd7boSJc3BzhJd2e0mcYot2h1RoY8dahK6EQmWEWjx7e1l2lL6UgXyBdnR4eU9zc0VreX1umqaBhld7fo2Bc6KEc5Z+hDyEcIeBWtNrfHyGe5qMhMuMe5qMhEGEbVVupcNzg3aHhIF4boeBe0mEdlptc39ofFl5Y8uUlJOGiYt2UmGEcyxjjGx4jFF7a657ZYWBnElzhp57iXtrgZN+tfOEhIOBjE2HgU1+e8tjjKNbiWCDhE15gUqBgYN7fnqGc66ce9d7iYSBj0qPcG6DnGGcT3eGa6qMZY+JlIiMl4hwc3aRdnqBlGV7eHJ2hLZjfnuRhDyEeX6MSk17g6Z+c6aUjHmEhIF4gXyBc76EZW18fGl+fkl+jCxrhoVwhDyUhIqGlL2DlI6EhJd2tdN7eYORhEGMa2Faa6pzc3Bzc4R5lIRznM+UY9eMhDycc5Z+c4p5c4iGY117pb6MgXuPrbJafnx2eYOJeXZ5e657hDyEcziElKZjfoB5eHeGj4WRhGGEe6KGeX1utTStc76EhFGJnCyMa5hzfH6HnNeceYB7hmN8gYuMhIVrczSMgYF8h3N7c5pza5hzjJqEYIRdgYuMlL2DeYRzhGGEeX1uhLaEc4iGeZ1zdl6JhrVteX6Me2iMfm5lWqJzSpqEa6pzdnmchHx2c6OMhNdrhoR5g3aHczxzeW52gV6Ejm15frGMc0Vzc4Z+l3drfniJe+9rWq5rlF1rhGGEhoVwe9OEfoh+e7pac09+c3qBY0lrhDycdnp2lJ6MiYOGhGCDc3aRlL2DlJt5doaGdnp2gYF8gWeOjF2Uc4R5c5Z+jEmMe7KEc4mEeYJ4dmyBe0mcgXiPbqJ7eYB7fmGGiYSJjICGlF1reZ2PnElzbpqJfH6Hc39oe4WEc5eJhK6EhqyJc3qBgZB8c09+hEmEaHKDhFGJc5SGiXWMUpaEa89zc6OMnCyMiXtrho+Be5qMc7KEjJ57dmN+hKGPjICGbmiEe7prdod+hGCDdnmchBx7eX6MkXZ2hGGEa657hm98jFFjY5JreYOJgY2EjHZ2a295Y3FajJ6Mc1J+YzB7e4WBjF2Uc4R5eV12gYxzg1qBeId+c9OUc5pzjFFjgY5+hFiMlIaPhoR5lIpjjIKBlNdSe7KEeX2BfrGMhIqGc65zjE2UhK6EklZ+QmWEeziMWqZza3VzdnR4foh+gYF8n3iJiZhrnKp7gYF8eId+lJ6Me1lrcIuGjKJjhmN8c66MjFF7a6prjJ6UnJ5zezyUfruRWlF7nI5zfHyGe657h4SEe8tjhBx7jFFjc09+c39ojICMeZeJeXt+YzRzjHZ2c0WEcIeBeXZ5onSXkVR+gYJ+eYFwdldzgYF7eX2BjJ6UiXuXlE1jh4SEe1mchLJjc4Z+hqZ7eXZ5bm1zlL6Ue5p7iWeGhKqUY5pzjKJjcIeBe8t7gXyBYIRdlEp4a3mGnK6EfmmMZpqEfFl5gYxzjKZuhGFjhoKGhHx2fnx2eXuMe3aBiWeGvbKMe6KGa5hzYzB7gZOBlGV7hmN8hqZlYot2Y117a6pzc6KEfId8foB5rctrfneJfJ6PcHN2hFiMc5pzjH92c0VzgY2EcElzdmCBlFVzg1GBc65zY4OBboeBcHiBeYJ4ewxzfHx5lIRzlEmEnLKEbk1zfJ6PhmN8eYBljBiEnMOEiXxwezyUcIeBe76EdsKEeX2BdnR4jGWUrXWMjGd7fkl+j4WRlEGMa5Jzho+BhDyEfnqMeXt+g3aHlE1jczClhNN7ZW18eHx8hGFjZW18iXWMjKJjhH57gYuMcIuGWjyMe4ZtjJuExmmMj4WRdntzi4GDhFFzYIRdnGGcjJp7Y0F7e4WEkbCGiX57fnSHa657a6prhBCMe3Z+SmmMjH92eHJ2hK6EY1FzexhrvbKMnI5za4OEfnd+eXuMhImBe897hLaMjN+EfG+BeIOBhF1+eZeJi4GDkXZ2eXKEgZ6Ejpd4c2GHa1V5e5KUfqZuhCx7jKp7lLZrg11+hHx2hFWUoot2nI5zgbh5mo9zvZaUe3qRbqKMfqZ2kbCGhFiM"),(e=>e.charCodeAt(0))),t=new U.R;t.wrapMode=F.pF.CLAMP_TO_EDGE,t.pixelFormat=F.Ab.RGB,t.wrapMode=F.pF.REPEAT,t.hasMipmap=!0,t.width=32,t.height=32,this._passParameters.noiseTexture=new B.g(this.renderingContext,t,e),this.techniques.precompile(H),this.techniques.precompile(w),this.addHandles((0,f.wB)((()=>this.isEnabled()),(()=>this._enableTime=(0,p.l5)(0))))}destroy(){this._passParameters.noiseTexture=(0,m.WD)(this._passParameters.noiseTexture)}render(e){const t=this.bindParameters,r=e.find((({name:e})=>"normals"===e)),i=r?.getTexture(),a=r?.getTexture(F.nI),s=this.fboCache,c=t.camera,l=c.fullViewport[2],d=c.fullViewport[3],u=Math.round(l/G),m=Math.round(d/G),f=this.techniques.get(H),v=this.techniques.get(w);if(!f.compiled||!v.compiled)return this._enableTime=(0,p.l5)(performance.now()),this.requestRender(A.C7.UPDATE),s.acquire(u,m,n.SSAO,o.RED);0===this._enableTime&&(this._enableTime=(0,p.l5)(performance.now()));const g=this.renderingContext,T=this.view.qualitySettings.fadeDuration,x=c.relativeElevation,b=(0,h.qE)((5e5-x)/2e5,0,1),E=T>0?Math.min(T,performance.now()-this._enableTime)/T:1,S=E*b;this._passParameters.normalTexture=i,this._passParameters.depthTexture=a,this._passParameters.projScale=1/c.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*V/(0,D.g)(c)**6*S;const M=s.acquire(l,d,"ssao input",o.RG);g.bindFramebuffer(M.fbo),g.setViewport(0,0,l,d),g.bindTechnique(f,t,this._passParameters,this._drawParameters),g.screen.draw();const C=s.acquire(u,m,"ssao blur",o.RED);g.bindFramebuffer(C.fbo),this._drawParameters.colorTexture=M.getTexture(),(0,_.hZ)(this._drawParameters.blurSize,0,G/d),g.bindTechnique(v,t,this._passParameters,this._drawParameters),g.setViewport(0,0,u,m),g.screen.draw(),M.release();const R=s.acquire(u,m,n.SSAO,o.RED);return g.bindFramebuffer(R.fbo),g.setViewport(0,0,l,d),g.setClearColor(1,1,1,0),g.clear(F.NV.COLOR),this._drawParameters.colorTexture=C.getTexture(),(0,_.hZ)(this._drawParameters.blurSize,G/l,0),g.bindTechnique(v,t,this._passParameters,this._drawParameters),g.setViewport(0,0,u,m),g.screen.draw(),g.setViewport4fv(c.fullViewport),C.release(),E<1&&this.requestRender(A.C7.UPDATE),R}};(0,u._)([(0,v.MZ)()],z.prototype,"consumes",void 0),(0,u._)([(0,v.MZ)()],z.prototype,"produces",void 0),(0,u._)([(0,v.MZ)({constructOnly:!0})],z.prototype,"isEnabled",void 0),z=(0,u._)([(0,g.$)("esri.views.3d.webgl-engine.effects.ssao.SSAO")],z);const V=.5;function W(e,t){const r=e.fragment;t.receiveAmbientOcclusion?(r.uniforms.add(new d.x("ssaoTex",(e=>e.ssao?.getTexture()))),r.constants.add("blurSizePixelsInverse","float",1/G),r.code.add(l.H`float evaluateAmbientOcclusionInverse() {
|
|
547
|
+
}`);default:(0,o.Xb)(t.textureCoordinateType);case i.None:return void e.vertex.code.add(a.H`void forwardTextureCoordinates() {}`);case i.COUNT:return}}(n=i||(i={}))[n.None=0]="None",n[n.Default=1]="Default",n[n.Atlas=2]="Atlas",n[n.Compressed=3]="Compressed",n[n.COUNT=4]="COUNT"},54849:(e,t,r)=>{r.d(t,{n:()=>W});var i,n,o,a,s,c,l=r(31821),d=r(12791),u=r(90237),h=r(34727),m=r(97768),f=r(36708),p=r(78659),v=r(10107),g=(r(44208),r(53966),r(87811),r(40608)),_=r(37585);r(9093),r(48353),r(9762),(c=i||(i={})).OPAQUE="opaque-color",c.TRANSPARENT="transparent-color",c.COMPOSITE="composite-color",c.FINAL="final-color",function(e){e.SSAO="ssao",e.LASERLINES="laserline-color",e.ANTIALIASING="aa-color",e.HIGHLIGHTS="highlight-color",e.MAGNIFIER="magnifier-color",e.OCCLUDED="occluded-color",e.VIEWSHED="viewshed-color",e.OPAQUE_ENVIRONMENT="opaque-environment-color",e.TRANSPARENT_ENVIRONMENT="transparent-environment-color",e.FOCUSAREA="focus-area"}(n||(n={})),(s=o||(o={}))[s.RED=0]="RED",s[s.RG=1]="RG",s[s.RGBA4=2]="RGBA4",s[s.RGBA=3]="RGBA",s[s.RGBA_MIPMAP=4]="RGBA_MIPMAP",s[s.R16F=5]="R16F",s[s.RGBA16F=6]="RGBA16F",function(e){e[e.DEPTH_STENCIL_TEXTURE=0]="DEPTH_STENCIL_TEXTURE",e[e.DEPTH16_BUFFER=1]="DEPTH16_BUFFER"}(a||(a={}));var T=r(69622),x=r(49186),A=r(89192);let b=class extends T.A{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces=i.COMPOSITE,this.requireGeometryDepth=!1,this._dirty=!0}initialize(){this.addHandles([(0,f.wB)((()=>this.view.ready),(e=>{e&&this.view._stage?.renderer.addRenderNode(this)}),f.Vh)])}destroy(){this.view._stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new x.A("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view._stage.renderView.renderingContext.gl}get techniques(){return this.view._stage.renderView.techniques}acquireOutputFramebuffer(){const e=this._frameBuffer?.getTexture()?.descriptor,t=this.view._stage.renderer.fboCache.acquire(e?.width??640,e?.height??480,this.produces);return t.fbo?.initializeAndBind(),t}bindRenderTarget(){return this._frameBuffer?.fbo?.initializeAndBind(),this._frameBuffer}requestRender(e){e===A.C7.UPDATE&&this.view._stage?.renderView.requestRender(e),this._dirty=!0}resetWebGLState(){this.renderingContext.resetState(),this.renderingContext.bindFramebuffer(this._frameBuffer?.fbo)}get fboCache(){return this.view._stage.renderer.fboCache}get bindParameters(){return this.renderContext.bind}get renderingContext(){return this.view._stage.renderView.renderingContext}get renderContext(){return this.view._stage?.renderer.renderContext}updateAnimation(e){return!!this._dirty&&(this._dirty=!1,!0)}doRender(e){this._frameBuffer=e.find((({name:e})=>e===this.produces));try{return this.render(e)}finally{this._frameBuffer=null}}};(0,u._)([(0,v.MZ)({constructOnly:!0})],b.prototype,"view",void 0),(0,u._)([(0,v.MZ)({constructOnly:!0})],b.prototype,"consumes",void 0),(0,u._)([(0,v.MZ)()],b.prototype,"produces",void 0),(0,u._)([(0,v.MZ)({readOnly:!0})],b.prototype,"techniques",null),b=(0,u._)([(0,g.$)("esri.views.3d.webgl.RenderNode")],b);const E=b;var S=r(97220),M=r(98958),C=r(95774),R=r(90644);class w extends M.w{constructor(e,t){super(e,t,new S.$(C.S,(()=>r.e(9384).then(r.bind(r,59384)))))}initializePipeline(){return(0,R.Ey)({colorWrite:R.kn})}}var I=r(48163),O=r(65786);class y extends O.Y{constructor(){super(...arguments),this.projScale=1}}class N extends y{constructor(){super(...arguments),this.intensity=1}}class P extends O.Y{}class L extends P{constructor(){super(...arguments),this.blurSize=(0,I.vt)()}}var D=r(15581);class H extends M.w{constructor(e,t){super(e,t,new S.$(D.S,(()=>r.e(191).then(r.bind(r,90191)))))}initializePipeline(){return(0,R.Ey)({colorWrite:R.kn})}}var F=r(63907),B=r(30164),U=r(67171);const G=2;let z=class extends E{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=n.SSAO,this.isEnabled=()=>!1,this._enableTime=(0,p.l5)(0),this._passParameters=new N,this._drawParameters=new L}initialize(){const e=Uint8Array.from(atob("eXKEvZaUc66cjIKElE1jlJ6MjJ6Ufkl+jn2fcXp5jBx7c6KEflSGiXuXeW6OWs+tfqZ2Yot2Y7Zzfo2BhniEj3xoiXuXj4eGZpqEaHKDWjSMe7palFlzc3BziYOGlFVzg6Zzg7CUY5JrjFF7eYJ4jIKEcyyEonSXe7qUfqZ7j3xofqZ2c4R5lFZ5Y0WUbppoe1l2cIh2ezyUho+BcHN2cG6DbpqJhqp2e1GcezhrdldzjFGUcyxjc3aRjDyEc1h7Sl17c6aMjH92pb6Mjpd4dnqBjMOEhqZleIOBYzB7gYx+fnqGjJuEkWlwnCx7fGl+c4hjfGyRe5qMlNOMfnqGhIWHc6OMi4GDc6aMfqZuc6aMzqJzlKZ+lJ6Me3qRfoFue0WUhoR5UraEa6qMkXiPjMOMlJOGe7JrUqKMjK6MeYRzdod+Sl17boiPc6qEeYBlcIh2c1WEe7GDiWCDa0WMjEmMdod+Y0WcdntzhmN8WjyMjKJjiXtzgYxYaGd+a89zlEV7e2GJfnd+lF1rcK5zc4p5cHuBhL6EcXp5eYB7fnh8iX6HjIKEeaxuiYOGc66RfG2Ja5hzjlGMjEmMe9OEgXuPfHyGhPeEdl6JY02McGuMfnqGhFiMa3WJfnx2l4hwcG1uhmN8c0WMc39og1GBbrCEjE2EZY+JcIh2cIuGhIWHe0mEhIVrc09+gY5+eYBlnCyMhGCDl3drfmmMgX15aGd+gYx+fnuRfnhzY1SMsluJfnd+hm98WtNrcIuGh4SEj0qPdkqOjFF7jNNjdnqBgaqUjMt7boeBhnZ4jDR7c5pze4GGjEFrhLqMjHyMc0mUhKZze4WEa117kWlwbpqJjHZ2eX2Bc09zeId+e0V7WlF7jHJ2l72BfId8l3eBgXyBe897jGl7c66cgW+Xc76EjKNbgaSEjGx4fId8jFFjgZB8cG6DhlFziZhrcIh2fH6HgUqBgXiPY8dahGFzjEmMhEFre2dxhoBzc5SGfleGe6alc7aUeYBlhKqUdlp+cH5za4OEczxza0Gcc4J2jHZ5iXuXjH2Jh5yRjH2JcFx+hImBjH+MpddCl3dreZeJjIt8ZW18bm1zjoSEeIOBlF9oh3N7hlqBY4+UeYFwhLJjeYFwaGd+gUqBYxiEYot2fqZ2ondzhL6EYyiEY02Ea0VjgZB8doaGjHxoc66cjEGEiXuXiXWMiZhreHx8frGMe75rY02Ec5pzfnhzlEp4a3VzjM+EhFFza3mUY7Zza1V5e2iMfGyRcziEhDyEkXZ2Y4OBnCx7g5t2eyBjgV6EhEFrcIh2dod+c4Z+nJ5zjm15jEmUeYxijJp7nL6clIpjhoR5WrZraGd+fnuRa6pzlIiMg6ZzfHx5foh+eX1ufnB5eX1ufnB5aJt7UqKMjIh+e3aBfm5lbYSBhGFze6J4c39oc0mUc4Z+e0V7fKFVe0WEdoaGY02Ec4Z+Y02EZYWBfH6HgU1+gY5+hIWUgW+XjJ57ebWRhFVScHuBfJ6PhBx7WqJzlM+Ujpd4gHZziX6HjHmEgZN+lJt5boiPe2GJgX+GjIGJgHZzeaxufnB5hF2JtdN7jJ57hp57hK6ElFVzg6ZzbmiEbndzhIWHe3uJfoFue3qRhJd2j3xoc65zlE1jc3p8lE1jhniEgXJ7e657vZaUc3qBh52BhIF4aHKDa9drgY5+c52GWqZzbpqJe8tjnM+UhIeMfo2BfGl+hG1zSmmMjKJjZVaGgX15c1lze0mEp4OHa3mUhIWHhDyclJ6MeYOJkXiPc0VzhFiMlKaEboSJa5Jze41re3qRhn+HZYWBe0mEc4p5fnORbox5lEp4hGFjhGGEjJuEc1WEhLZjeHeGa7KlfHx2hLaMeX1ugY5+hIWHhKGPjMN7c1WEho1zhoBzZYx7fnhzlJt5exyUhFFziXtzfmmMa6qMYyiEiXxweV12kZSMeWqXSl17fnhzxmmMrVGEe1mcc4p5eHeGjK6MgY5+doaGa6pzlGV7g1qBh4KHkXiPeW6OaKqafqZ2eXZ5e1V7jGd7boSJc3BzhJd2e0mcYot2h1RoY8dahK6EQmWEWjx7e1l2lL6UgXyBdnR4eU9zc0VreX1umqaBhld7fo2Bc6KEc5Z+hDyEcIeBWtNrfHyGe5qMhMuMe5qMhEGEbVVupcNzg3aHhIF4boeBe0mEdlptc39ofFl5Y8uUlJOGiYt2UmGEcyxjjGx4jFF7a657ZYWBnElzhp57iXtrgZN+tfOEhIOBjE2HgU1+e8tjjKNbiWCDhE15gUqBgYN7fnqGc66ce9d7iYSBj0qPcG6DnGGcT3eGa6qMZY+JlIiMl4hwc3aRdnqBlGV7eHJ2hLZjfnuRhDyEeX6MSk17g6Z+c6aUjHmEhIF4gXyBc76EZW18fGl+fkl+jCxrhoVwhDyUhIqGlL2DlI6EhJd2tdN7eYORhEGMa2Faa6pzc3Bzc4R5lIRznM+UY9eMhDycc5Z+c4p5c4iGY117pb6MgXuPrbJafnx2eYOJeXZ5e657hDyEcziElKZjfoB5eHeGj4WRhGGEe6KGeX1utTStc76EhFGJnCyMa5hzfH6HnNeceYB7hmN8gYuMhIVrczSMgYF8h3N7c5pza5hzjJqEYIRdgYuMlL2DeYRzhGGEeX1uhLaEc4iGeZ1zdl6JhrVteX6Me2iMfm5lWqJzSpqEa6pzdnmchHx2c6OMhNdrhoR5g3aHczxzeW52gV6Ejm15frGMc0Vzc4Z+l3drfniJe+9rWq5rlF1rhGGEhoVwe9OEfoh+e7pac09+c3qBY0lrhDycdnp2lJ6MiYOGhGCDc3aRlL2DlJt5doaGdnp2gYF8gWeOjF2Uc4R5c5Z+jEmMe7KEc4mEeYJ4dmyBe0mcgXiPbqJ7eYB7fmGGiYSJjICGlF1reZ2PnElzbpqJfH6Hc39oe4WEc5eJhK6EhqyJc3qBgZB8c09+hEmEaHKDhFGJc5SGiXWMUpaEa89zc6OMnCyMiXtrho+Be5qMc7KEjJ57dmN+hKGPjICGbmiEe7prdod+hGCDdnmchBx7eX6MkXZ2hGGEa657hm98jFFjY5JreYOJgY2EjHZ2a295Y3FajJ6Mc1J+YzB7e4WBjF2Uc4R5eV12gYxzg1qBeId+c9OUc5pzjFFjgY5+hFiMlIaPhoR5lIpjjIKBlNdSe7KEeX2BfrGMhIqGc65zjE2UhK6EklZ+QmWEeziMWqZza3VzdnR4foh+gYF8n3iJiZhrnKp7gYF8eId+lJ6Me1lrcIuGjKJjhmN8c66MjFF7a6prjJ6UnJ5zezyUfruRWlF7nI5zfHyGe657h4SEe8tjhBx7jFFjc09+c39ojICMeZeJeXt+YzRzjHZ2c0WEcIeBeXZ5onSXkVR+gYJ+eYFwdldzgYF7eX2BjJ6UiXuXlE1jh4SEe1mchLJjc4Z+hqZ7eXZ5bm1zlL6Ue5p7iWeGhKqUY5pzjKJjcIeBe8t7gXyBYIRdlEp4a3mGnK6EfmmMZpqEfFl5gYxzjKZuhGFjhoKGhHx2fnx2eXuMe3aBiWeGvbKMe6KGa5hzYzB7gZOBlGV7hmN8hqZlYot2Y117a6pzc6KEfId8foB5rctrfneJfJ6PcHN2hFiMc5pzjH92c0VzgY2EcElzdmCBlFVzg1GBc65zY4OBboeBcHiBeYJ4ewxzfHx5lIRzlEmEnLKEbk1zfJ6PhmN8eYBljBiEnMOEiXxwezyUcIeBe76EdsKEeX2BdnR4jGWUrXWMjGd7fkl+j4WRlEGMa5Jzho+BhDyEfnqMeXt+g3aHlE1jczClhNN7ZW18eHx8hGFjZW18iXWMjKJjhH57gYuMcIuGWjyMe4ZtjJuExmmMj4WRdntzi4GDhFFzYIRdnGGcjJp7Y0F7e4WEkbCGiX57fnSHa657a6prhBCMe3Z+SmmMjH92eHJ2hK6EY1FzexhrvbKMnI5za4OEfnd+eXuMhImBe897hLaMjN+EfG+BeIOBhF1+eZeJi4GDkXZ2eXKEgZ6Ejpd4c2GHa1V5e5KUfqZuhCx7jKp7lLZrg11+hHx2hFWUoot2nI5zgbh5mo9zvZaUe3qRbqKMfqZ2kbCGhFiM"),(e=>e.charCodeAt(0))),t=new U.R;t.wrapMode=F.pF.CLAMP_TO_EDGE,t.pixelFormat=F.Ab.RGB,t.wrapMode=F.pF.REPEAT,t.hasMipmap=!0,t.width=32,t.height=32,this._passParameters.noiseTexture=new B.g(this.renderingContext,t,e),this.techniques.precompile(H),this.techniques.precompile(w),this.addHandles((0,f.wB)((()=>this.isEnabled()),(()=>this._enableTime=(0,p.l5)(0))))}destroy(){this._passParameters.noiseTexture=(0,m.WD)(this._passParameters.noiseTexture)}render(e){const t=this.bindParameters,r=e.find((({name:e})=>"normals"===e)),i=r?.getTexture(),a=r?.getTexture(F.nI),s=this.fboCache,c=t.camera,l=c.fullViewport[2],d=c.fullViewport[3],u=Math.round(l/G),m=Math.round(d/G),f=this.techniques.get(H),v=this.techniques.get(w);if(!f.compiled||!v.compiled)return this._enableTime=(0,p.l5)(performance.now()),this.requestRender(A.C7.UPDATE),s.acquire(u,m,n.SSAO,o.RED);0===this._enableTime&&(this._enableTime=(0,p.l5)(performance.now()));const g=this.renderingContext,T=this.view.qualitySettings.fadeDuration,x=c.relativeElevation,b=(0,h.qE)((5e5-x)/2e5,0,1),E=T>0?Math.min(T,performance.now()-this._enableTime)/T:1,S=E*b;this._passParameters.normalTexture=i,this._passParameters.depthTexture=a,this._passParameters.projScale=1/c.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*V/(0,D.g)(c)**6*S;const M=s.acquire(l,d,"ssao input",o.RG);g.bindFramebuffer(M.fbo),g.setViewport(0,0,l,d),g.bindTechnique(f,t,this._passParameters,this._drawParameters),g.screen.draw();const C=s.acquire(u,m,"ssao blur",o.RED);g.bindFramebuffer(C.fbo),this._drawParameters.colorTexture=M.getTexture(),(0,_.hZ)(this._drawParameters.blurSize,0,G/d),g.bindTechnique(v,t,this._passParameters,this._drawParameters),g.setViewport(0,0,u,m),g.screen.draw(),M.release();const R=s.acquire(u,m,n.SSAO,o.RED);return g.bindFramebuffer(R.fbo),g.setViewport(0,0,l,d),g.setClearColor(1,1,1,0),g.clear(F.NV.COLOR),this._drawParameters.colorTexture=C.getTexture(),(0,_.hZ)(this._drawParameters.blurSize,G/l,0),g.bindTechnique(v,t,this._passParameters,this._drawParameters),g.setViewport(0,0,u,m),g.screen.draw(),g.setViewport4fv(c.fullViewport),C.release(),E<1&&this.requestRender(A.C7.UPDATE),R}};(0,u._)([(0,v.MZ)()],z.prototype,"consumes",void 0),(0,u._)([(0,v.MZ)()],z.prototype,"produces",void 0),(0,u._)([(0,v.MZ)({constructOnly:!0})],z.prototype,"isEnabled",void 0),z=(0,u._)([(0,g.$)("esri.views.3d.webgl-engine.effects.ssao.SSAO")],z);const V=.5;function W(e,t){const r=e.fragment;t.receiveAmbientOcclusion?(r.uniforms.add(new d.x("ssaoTex",(e=>e.ssao?.getTexture()))),r.constants.add("blurSizePixelsInverse","float",1/G),r.code.add(l.H`float evaluateAmbientOcclusionInverse() {
|
|
548
548
|
vec2 ssaoTextureSizeInverse = 1.0 / vec2(textureSize(ssaoTex, 0));
|
|
549
549
|
return texture(ssaoTex, gl_FragCoord.xy * blurSizePixelsInverse * ssaoTextureSizeInverse).r;
|
|
550
550
|
}
|
|
551
551
|
float evaluateAmbientOcclusion() {
|
|
552
552
|
return 1.0 - evaluateAmbientOcclusionInverse();
|
|
553
553
|
}`)):r.code.add(l.H`float evaluateAmbientOcclusionInverse() { return 1.0; }
|
|
554
|
-
float evaluateAmbientOcclusion() { return 0.0; }`)}},57323:(e,t,r)=>{r.d(t,{R:()=>F,b:()=>H});var i=r(46686),n=r(32680),o=r(49255),a=r(76591),s=r(76597),c=r(82991),l=r(96336),d=r(10764),u=r(71955),h=r(53466),m=r(92700),f=r(35640),p=r(40261),v=r(54849),g=r(74081),_=r(98619),T=r(22393),x=r(59469),A=r(25618),b=r(96598),E=r(42398),S=r(11955),M=r(27950),C=r(20693),R=r(33079),w=r(71988),I=r(20304),O=r(31821),
|
|
554
|
+
float evaluateAmbientOcclusion() { return 0.0; }`)}},57323:(e,t,r)=>{r.d(t,{R:()=>F,b:()=>H});var i=r(46686),n=r(32680),o=r(49255),a=r(76591),s=r(76597),c=r(82991),l=r(96336),d=r(10764),u=r(71955),h=r(53466),m=r(92700),f=r(35640),p=r(40261),v=r(54849),g=r(74081),_=r(98619),T=r(22393),x=r(59469),A=r(25618),b=r(96598),E=r(42398),S=r(11955),M=r(27950),C=r(20693),R=r(33079),w=r(71988),I=r(20304),O=r(31821),y=r(63761),N=r(46540),P=r(60517),L=r(14113),D=r(49788);function H(e){const t=new L.N5,{vertex:r,fragment:H,varyings:F}=t,{output:B,offsetBackfaces:U,instancedColor:G,pbrMode:z,snowCover:V,spherical:W}=e,j=z===x.A9.Normal||z===x.A9.Schematic;if((0,C.NB)(r,e),t.include(d.I),F.add("vpos","vec3",{invariant:!0}),t.include(E.A,e),t.include(c.B,e),t.include(f.G,e),t.include(b.Z,e),(0,o.RN)(B)&&((0,C.yu)(t.vertex,e),t.include(l.Y,e),t.include(s.d,e),U&&t.include(n.M),G&&t.attributes.add(N.r.INSTANCECOLOR,"vec4"),F.add("vNormalWorld","vec3"),F.add("localvpos","vec3",{invariant:!0}),t.include(h.U,e),t.include(i.oD,e),t.include(u.K,e),t.include(m.c,e),r.uniforms.add(new w.E("externalColor",(e=>e.externalColor))),F.add("vcolorExt","vec4"),r.main.add(O.H`
|
|
555
555
|
forwardNormalizedVertexColor();
|
|
556
556
|
vcolorExt = externalColor;
|
|
557
557
|
${(0,O.If)(G,"vcolorExt *= instanceColor * 0.003921568627451;")}
|
|
@@ -573,7 +573,7 @@ float evaluateAmbientOcclusion() { return 0.0; }`)}},57323:(e,t,r)=>{r.d(t,{R:()
|
|
|
573
573
|
|
|
574
574
|
gl_Position = alphaCut ? vec4(1e38, 1e38, 1e38, 1.0) :
|
|
575
575
|
${(0,O.If)(U,"offsetBackfacingClipPosition(basePosition, vpos, vNormalWorld, cameraPosition);","basePosition;")}
|
|
576
|
-
`)),(0,o.RN)(B)){const{hasColorTexture:i,hasColorTextureTransform:n,receiveShadows:o}=e;t.include(g.kA,e),t.include(v.n,e),t.include(S.S,e),t.include(e.instancedDoublePrecision?A.G:A.Bz,e),t.fragment.include(a.HQ,e),t.include(P.z,e),(0,C.yu)(t.fragment,e),(0,_.Gc)(H),(0,g.a8)(H),(0,g.eU)(H),H.uniforms.add(r.uniforms.get("localOrigin"),r.uniforms.get("view"),new R.t("ambient",(e=>e.ambient)),new R.t("diffuse",(e=>e.diffuse)),new I.m("opacity",(e=>e.opacity)),new I.m("layerOpacity",(e=>e.layerOpacity))),i&&H.uniforms.add(new
|
|
576
|
+
`)),(0,o.RN)(B)){const{hasColorTexture:i,hasColorTextureTransform:n,receiveShadows:o}=e;t.include(g.kA,e),t.include(v.n,e),t.include(S.S,e),t.include(e.instancedDoublePrecision?A.G:A.Bz,e),t.fragment.include(a.HQ,e),t.include(P.z,e),(0,C.yu)(t.fragment,e),(0,_.Gc)(H),(0,g.a8)(H),(0,g.eU)(H),H.uniforms.add(r.uniforms.get("localOrigin"),r.uniforms.get("view"),new R.t("ambient",(e=>e.ambient)),new R.t("diffuse",(e=>e.diffuse)),new I.m("opacity",(e=>e.opacity)),new I.m("layerOpacity",(e=>e.layerOpacity))),i&&H.uniforms.add(new y.N("tex",(e=>e.texture))),t.include(x._Z,e),t.include(T.c,e),H.include(M.N),(0,_.O4)(H),H.main.add(O.H`
|
|
577
577
|
discardBySlice(vpos);
|
|
578
578
|
discardByTerrainDepth();
|
|
579
579
|
vec4 texColor = ${i?`texture(tex, ${n?"colorUV":"vuv0"})`:" vec4(1.0)"};
|
|
@@ -605,13 +605,13 @@ float evaluateAmbientOcclusion() { return 0.0; }`)}},57323:(e,t,r)=>{r.d(t,{R:()
|
|
|
605
605
|
vec4 emission = ${V?"vec4(0.0)":"getEmissions()"};
|
|
606
606
|
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance);`:O.H`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
|
|
607
607
|
vec4 finalColor = vec4(shadedColor, opacity_);
|
|
608
|
-
outputColorHighlightOID(finalColor, vpos);`)}return t.include(p.E,e),t}const F=Object.freeze(Object.defineProperty({__proto__:null,build:H},Symbol.toStringTag,{value:"Module"}))},57917:(e,t,r)=>{r.d(t,{S:()=>n});var i=r(34275);function n(e){if(e.length<i.y9)return Array.from(e);if(Array.isArray(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,i.jq)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return Float32Array.from(e);default:return Float64Array.from(e)}}},59469:(e,t,r)=>{r.d(t,{A9:()=>i,_Z:()=>m});var i,n,o=r(99208),a=r(40710),s=r(33079),c=r(31821),l=r(15976),d=r(63761),u=r(
|
|
608
|
+
outputColorHighlightOID(finalColor, vpos);`)}return t.include(p.E,e),t}const F=Object.freeze(Object.defineProperty({__proto__:null,build:H},Symbol.toStringTag,{value:"Module"}))},57917:(e,t,r)=>{r.d(t,{S:()=>n});var i=r(34275);function n(e){if(e.length<i.y9)return Array.from(e);if(Array.isArray(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,i.jq)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return Float32Array.from(e);default:return Float64Array.from(e)}}},59469:(e,t,r)=>{r.d(t,{A9:()=>i,_Z:()=>m});var i,n,o=r(99208),a=r(40710),s=r(33079),c=r(31821),l=r(15976),d=r(63761),u=(r(74810),r(69270)),h=r(65786);function m(e,t){const r=t.pbrMode,n=e.fragment;if(r!==i.Schematic&&r!==i.Disabled&&r!==i.Normal)return void n.code.add(c.H`void applyPBRFactors() {}`);if(r===i.Disabled)return void n.code.add(c.H`void applyPBRFactors() {}
|
|
609
609
|
float getBakedOcclusion() { return 1.0; }`);if(r===i.Schematic)return void n.code.add(c.H`vec3 mrr = vec3(0.0, 0.6, 0.2);
|
|
610
610
|
float occlusion = 1.0;
|
|
611
611
|
void applyPBRFactors() {}
|
|
612
|
-
float getBakedOcclusion() { return 1.0; }`);const{hasMetallicRoughnessTexture:
|
|
613
|
-
float occlusion;`),
|
|
614
|
-
${(0,c.If)(
|
|
612
|
+
float getBakedOcclusion() { return 1.0; }`);const{hasMetallicRoughnessTexture:h,hasMetallicRoughnessTextureTransform:m,hasOcclusionTexture:f,hasOcclusionTextureTransform:p,bindType:v}=t;(h||f)&&e.include(o.r,t),n.code.add(c.H`vec3 mrr;
|
|
613
|
+
float occlusion;`),h&&n.uniforms.add(v===u.c.Pass?new d.N("texMetallicRoughness",(e=>e.textureMetallicRoughness)):new l.o("texMetallicRoughness",(e=>e.textureMetallicRoughness))),f&&n.uniforms.add(v===u.c.Pass?new d.N("texOcclusion",(e=>e.textureOcclusion)):new l.o("texOcclusion",(e=>e.textureOcclusion))),n.uniforms.add(v===u.c.Pass?new s.t("mrrFactors",(e=>e.mrrFactors)):new a.W("mrrFactors",(e=>e.mrrFactors))),n.code.add(c.H`
|
|
614
|
+
${(0,c.If)(h,c.H`void applyMetallicRoughness(vec2 uv) {
|
|
615
615
|
vec3 metallicRoughness = textureLookup(texMetallicRoughness, uv).rgb;
|
|
616
616
|
mrr[0] *= metallicRoughness.b;
|
|
617
617
|
mrr[1] *= metallicRoughness.g;
|
|
@@ -627,10 +627,10 @@ float occlusion;`),u&&n.uniforms.add(v===h.c.Pass?new d.N("texMetallicRoughness"
|
|
|
627
627
|
mrr = mrrFactors;
|
|
628
628
|
occlusion = 1.0;
|
|
629
629
|
|
|
630
|
-
${(0,c.If)(
|
|
630
|
+
${(0,c.If)(h,`applyMetallicRoughness(${m?"metallicRoughnessUV":"vuv0"});`)}
|
|
631
631
|
${(0,c.If)(f,`applyOcclusion(${p?"occlusionUV":"vuv0"});`)}
|
|
632
632
|
}
|
|
633
|
-
`)}(n=i||(i={}))[n.Disabled=0]="Disabled",n[n.Normal=1]="Normal",n[n.Schematic=2]="Schematic",n[n.Water=3]="Water",n[n.WaterOnIntegratedMesh=4]="WaterOnIntegratedMesh",n[n.Simplified=5]="Simplified",n[n.TerrainWithWater=6]="TerrainWithWater",n[n.COUNT=7]="COUNT",
|
|
633
|
+
`)}(n=i||(i={}))[n.Disabled=0]="Disabled",n[n.Normal=1]="Normal",n[n.Schematic=2]="Schematic",n[n.Water=3]="Water",n[n.WaterOnIntegratedMesh=4]="WaterOnIntegratedMesh",n[n.Simplified=5]="Simplified",n[n.TerrainWithWater=6]="TerrainWithWater",n[n.COUNT=7]="COUNT",h.Y},59643:(e,t,r)=>{var i;r.d(t,{Y:()=>i}),function(e){e[e.NONE=0]="NONE",e[e.ColorAlpha=1]="ColorAlpha",e[e.FrontFace=2]="FrontFace",e[e.COUNT=3]="COUNT"}(i||(i={}))},59907:(e,t,r)=>{r.d(t,{Hk:()=>h,Pq:()=>u,SA:()=>v,Ut:()=>d,p1:()=>m,tH:()=>p,tb:()=>f,uO:()=>s});var i=r(58083),n=r(13030),o=r(620),a=r(46540);function s(e,t,r,i=1){const{data:n,indices:o}=e,a=t.typedBuffer,s=t.typedBufferStride,c=o.length;if(r*=s,1===i)for(let e=0;e<c;++e)a[r]=n[o[e]],r+=s;else for(let e=0;e<c;++e){const t=n[o[e]];for(let e=0;e<i;e++)a[r]=t,r+=s}}function c(e,t,r){const{data:i,indices:n}=e,o=t.typedBuffer,a=t.typedBufferStride,s=n.length;r*=a;for(let e=0;e<s;++e){const t=2*n[e];o[r]=i[t],o[r+1]=i[t+1],r+=a}}function l(e,t,r,i){const{data:n,indices:o}=e,a=t.typedBuffer,s=t.typedBufferStride,c=o.length;if(r*=s,null==i||1===i)for(let e=0;e<c;++e){const t=3*o[e];a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],r+=s}else for(let e=0;e<c;++e){const t=3*o[e];for(let e=0;e<i;++e)a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],r+=s}}function d(e,t,r,i=1){const{data:n,indices:o}=e,a=t.typedBuffer,s=t.typedBufferStride,c=o.length;if(r*=s,1===i)for(let e=0;e<c;++e){const t=4*o[e];a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],a[r+3]=n[t+3],r+=s}else for(let e=0;e<c;++e){const t=4*o[e];for(let e=0;e<i;++e)a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],a[r+3]=n[t+3],r+=s}}function u(e,t,r){const i=e.typedBuffer,n=e.typedBufferStride;t*=n;for(let e=0;e<r;++e)i[t]=0,i[t+1]=0,i[t+2]=0,i[t+3]=0,t+=n}function h(e,t,r,n,o=1){if(!t)return void l(e,r,n,o);const{data:a,indices:s}=e,c=r.typedBuffer,d=r.typedBufferStride,u=s.length,h=t[0],m=t[1],f=t[2],p=t[4],v=t[5],g=t[6],_=t[8],T=t[9],x=t[10],A=t[12],b=t[13],E=t[14];n*=d;let S=0,M=0,C=0;const R=(0,i.tZ)(t)?e=>{S=a[e]+A,M=a[e+1]+b,C=a[e+2]+E}:e=>{const t=a[e],r=a[e+1],i=a[e+2];S=h*t+p*r+_*i+A,M=m*t+v*r+T*i+b,C=f*t+g*r+x*i+E};if(1===o)for(let e=0;e<u;++e)R(3*s[e]),c[n]=S,c[n+1]=M,c[n+2]=C,n+=d;else for(let e=0;e<u;++e){R(3*s[e]);for(let e=0;e<o;++e)c[n]=S,c[n+1]=M,c[n+2]=C,n+=d}}function m(e,t,r,n,o=1){if(!t)return void l(e,r,n,o);const{data:a,indices:s}=e,c=t,d=r.typedBuffer,u=r.typedBufferStride,h=s.length,m=c[0],f=c[1],p=c[2],v=c[4],g=c[5],_=c[6],T=c[8],x=c[9],A=c[10],b=!(0,i.ut)(c),E=1e-6,S=1-E;n*=u;let M=0,C=0,R=0;const w=(0,i.tZ)(c)?e=>{M=a[e],C=a[e+1],R=a[e+2]}:e=>{const t=a[e],r=a[e+1],i=a[e+2];M=m*t+v*r+T*i,C=f*t+g*r+x*i,R=p*t+_*r+A*i};if(1===o)if(b)for(let e=0;e<h;++e){w(3*s[e]);const t=M*M+C*C+R*R;if(t<S&&t>E){const e=1/Math.sqrt(t);d[n]=M*e,d[n+1]=C*e,d[n+2]=R*e}else d[n]=M,d[n+1]=C,d[n+2]=R;n+=u}else for(let e=0;e<h;++e)w(3*s[e]),d[n]=M,d[n+1]=C,d[n+2]=R,n+=u;else for(let e=0;e<h;++e){if(w(3*s[e]),b){const e=M*M+C*C+R*R;if(e<S&&e>E){const t=1/Math.sqrt(e);M*=t,C*=t,R*=t}}for(let e=0;e<o;++e)d[n]=M,d[n+1]=C,d[n+2]=R,n+=u}}function f(e,t,r,i,n=1){const{data:o,indices:a}=e,s=r.typedBuffer,c=r.typedBufferStride,l=a.length;if(i*=c,t!==o.length||4!==t)if(1!==n)if(4!==t)for(let e=0;e<l;++e){const t=3*a[e];for(let e=0;e<n;++e)s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=255,i+=c}else for(let e=0;e<l;++e){const t=4*a[e];for(let e=0;e<n;++e)s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=o[t+3],i+=c}else{if(4===t){for(let e=0;e<l;++e){const t=4*a[e];s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=o[t+3],i+=c}return}for(let e=0;e<l;++e){const t=3*a[e];s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=255,i+=c}}else{s[i]=o[0],s[i+1]=o[1],s[i+2]=o[2],s[i+3]=o[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=c/4,a=e[i/=4];i+=t;const d=l*n;for(let r=1;r<d;++r)e[i]=a,i+=t}}function p(e,t,r,i,n=1){const o=t.typedBuffer,a=t.typedBufferStride;if(i*=a,1===n)for(let t=0;t<r;++t)o[i]=e[0],o[i+1]=e[1],o[i+2]=e[2],o[i+3]=e[3],i+=a;else for(let t=0;t<r;++t)for(let t=0;t<n;++t)o[i]=e[0],o[i+1]=e[1],o[i+2]=e[2],o[i+3]=e[3],i+=a}function v(e,t,r,i,o,s,c){let l={numItems:0,numVerticesPerItem:0};for(const d of r.fields.keys()){const r=e.get(d),u=r?.indices;if(r&&u)d===a.r.POSITION&&(l={numItems:1,numVerticesPerItem:u.length}),g(d,r,i,o,s,c);else if(d===a.r.OBJECTANDLAYERIDCOLOR&&null!=t){const r=e.get(a.r.POSITION)?.indices;if(r){const e=r.length;p(t,s.getField(d,n.XP),e,c)}}}return l}function g(e,t,r,s,l,u){switch(e){case a.r.POSITION:{(0,o.vA)(3===t.size);const i=l.getField(e,n.xs);(0,o.vA)(!!i,`No buffer view for ${e}`),i&&h(t,r,i,u);break}case a.r.NORMAL:{(0,o.vA)(3===t.size);const r=l.getField(e,n.xs);(0,o.vA)(!!r,`No buffer view for ${e}`),r&&m(t,s,r,u);break}case a.r.NORMALCOMPRESSED:{(0,o.vA)(2===t.size);const r=l.getField(e,n.mJ);(0,o.vA)(!!r,`No buffer view for ${e}`),r&&c(t,r,u);break}case a.r.UV0:{(0,o.vA)(2===t.size);const r=l.getField(e,n.gH);(0,o.vA)(!!r,`No buffer view for ${e}`),r&&c(t,r,u);break}case a.r.COLOR:case a.r.SYMBOLCOLOR:{const r=l.getField(e,n.XP);(0,o.vA)(!!r,`No buffer view for ${e}`),(0,o.vA)(3===t.size||4===t.size),!r||3!==t.size&&4!==t.size||f(t,t.size,r,u);break}case a.r.COLORFEATUREATTRIBUTE:{const r=l.getField(e,n.Y$);(0,o.vA)(!!r,`No buffer view for ${e}`),(0,o.vA)(1===t.size),r&&1===t.size&&function(e,t,r){const{data:i,indices:n}=e,o=t.typedBuffer,a=t.typedBufferStride,s=n.length,c=i[0];r*=a;for(let e=0;e<s;++e)o[r]=c,r+=a}(t,r,u);break}case a.r.TANGENT:{(0,o.vA)(4===t.size);const a=l.getField(e,n.Eq);(0,o.vA)(!!a,`No buffer view for ${e}`),a&&function(e,t,r,n,o=1){if(!t)return void d(e,r,n,o);const{data:a,indices:s}=e,c=t,l=r.typedBuffer,u=r.typedBufferStride,h=s.length,m=c[0],f=c[1],p=c[2],v=c[4],g=c[5],_=c[6],T=c[8],x=c[9],A=c[10],b=!(0,i.ut)(c),E=1e-6,S=1-E;if(n*=u,1===o)for(let e=0;e<h;++e){const t=4*s[e],r=a[t],i=a[t+1],o=a[t+2],c=a[t+3];let d=m*r+v*i+T*o,h=f*r+g*i+x*o,M=p*r+_*i+A*o;if(b){const e=d*d+h*h+M*M;if(e<S&&e>E){const t=1/Math.sqrt(e);d*=t,h*=t,M*=t}}l[n]=d,l[n+1]=h,l[n+2]=M,l[n+3]=c,n+=u}else for(let e=0;e<h;++e){const t=4*s[e],r=a[t],i=a[t+1],c=a[t+2],d=a[t+3];let h=m*r+v*i+T*c,M=f*r+g*i+x*c,C=p*r+_*i+A*c;if(b){const e=h*h+M*M+C*C;if(e<S&&e>E){const t=1/Math.sqrt(e);h*=t,M*=t,C*=t}}for(let e=0;e<o;++e)l[n]=h,l[n+1]=M,l[n+2]=C,l[n+3]=d,n+=u}}(t,r,a,u);break}case a.r.PROFILERIGHT:case a.r.PROFILEUP:case a.r.PROFILEVERTEXANDNORMAL:case a.r.FEATUREVALUE:{(0,o.vA)(4===t.size);const r=l.getField(e,n.Eq);(0,o.vA)(!!r,`No buffer view for ${e}`),r&&d(t,r,u)}}}},60517:(e,t,r)=>{r.d(t,{z:()=>d});var i=r(49255),n=r(22911),o=r(2981),a=r(63365),s=r(31821),c=r(59643),l=r(49788);function d(e,t){e.include(o.Q,t),e.include(n.NL,t),e.fragment.include(a.a);const r=t.output===i.V.ObjectAndLayerIdColor,d=(0,i.LG)(t.output),u=(0,i.RN)(t.output)&&t.oitPass===c.Y.ColorAlpha,h=(0,i.RN)(t.output)&&t.oitPass!==c.Y.ColorAlpha,m=t.discardInvisibleFragments;let f=0;(h||d||u)&&e.outputs.add("fragColor","vec4",f++),d&&e.outputs.add("fragEmission","vec4",f++),u&&e.outputs.add("fragAlpha","float",f++),e.fragment.code.add(s.H`
|
|
634
634
|
void outputColorHighlightOID(vec4 finalColor, const in vec3 vWorldPosition) {
|
|
635
635
|
${(0,s.If)(r,"finalColor.a = 1.0;")}
|
|
636
636
|
|
|
@@ -932,7 +932,7 @@ return dot(rgba, RGBA4_2_FLOAT_FACTORS);
|
|
|
932
932
|
`)),t.hasVertexTangents&&s.code.add(h.H`
|
|
933
933
|
vec4 dpTransformVertexTangent(vec4 _tangent) {
|
|
934
934
|
${r?n?"return vec4(normalLocalOriginFromModel * (instanceModelNormal * _tangent.xyz), _tangent.w);":"return vec4(normalLocalOriginFromModel * _tangent.xyz, _tangent.w);":n?"return vec4(instanceModelNormal * _tangent.xyz, _tangent.w);":"return _tangent;"}
|
|
935
|
-
}`)}const T=(0,s.vt)()},89192:(e,t,r)=>{var i,n,o,a,s,c,l,d;r.d(t,{Am:()=>a,C7:()=>o,JS:()=>d,Mg:()=>c,dd:()=>s,it:()=>n,s2:()=>i,sf:()=>l}),function(e){e[e.None=0]="None",e[e.Front=1]="Front",e[e.Back=2]="Back",e[e.COUNT=3]="COUNT"}(i||(i={})),function(e){e[e.Less=0]="Less",e[e.Lequal=1]="Lequal",e[e.COUNT=2]="COUNT"}(n||(n={})),function(e){e[e.BACKGROUND=0]="BACKGROUND",e[e.UPDATE=1]="UPDATE"}(o||(o={})),function(e){e[e.NOT_LOADED=0]="NOT_LOADED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED"}(a||(a={})),function(e){e[e.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",e[e.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(s||(s={})),function(e){e[e.Highlight=0]="Highlight",e[e.MaskOccludee=1]="MaskOccludee"}(c||(c={})),function(e){e[e.Blend=0]="Blend",e[e.Opaque=1]="Opaque",e[e.Mask=2]="Mask",e[e.MaskBlend=3]="MaskBlend",e[e.COUNT=4]="COUNT"}(l||(l={})),function(e){e.DDS_ENCODING="image/vnd-ms.dds",e.KTX2_ENCODING="image/ktx2",e.BASIS_ENCODING="image/x.basis"}(d||(d={}))},89786:(e,t,r)=>{function i(e){const t=3.141592653589793,r=.3183098861837907;e.vertex.constants.add("PI","float",t),e.fragment.constants.add("PI","float",t),e.fragment.constants.add("LIGHT_NORMALIZATION","float",r),e.fragment.constants.add("INV_PI","float",r),e.fragment.constants.add("HALF_PI","float",1.570796326794897),e.fragment.constants.add("TWO_PI","float",6.28318530717958)}r.d(t,{p:()=>i})},90644:(e,t,r)=>{r.d(t,{Ey:()=>E,Ky:()=>c,Os:()=>s,Uy:()=>h,Xt:()=>u,kn:()=>m,p3:()=>a});var i=r(89192),n=r(63907);function o(e,t,r=n.Tb.ADD,i=[0,0,0,0]){return{srcRgb:e,srcAlpha:e,dstRgb:t,dstAlpha:t,opRgb:r,opAlpha:r,color:{r:i[0],g:i[1],b:i[2],a:i[3]}}}function a(e,t,r,i,o=n.Tb.ADD,a=n.Tb.ADD,s=[0,0,0,0]){return{srcRgb:e,srcAlpha:t,dstRgb:r,dstAlpha:i,opRgb:o,opAlpha:a,color:{r:s[0],g:s[1],b:s[2],a:s[3]}}}o(n.dn.ZERO,n.dn.ONE_MINUS_SRC_ALPHA),o(n.dn.ONE,n.dn.ZERO),o(n.dn.ONE,n.dn.ONE);const s=o(n.dn.ONE,n.dn.ONE_MINUS_SRC_ALPHA),c=a(n.dn.SRC_ALPHA,n.dn.ONE,n.dn.ONE_MINUS_SRC_ALPHA,n.dn.ONE_MINUS_SRC_ALPHA),l={face:n.Y7.BACK,mode:n.Ac.CCW},d={face:n.Y7.FRONT,mode:n.Ac.CCW},u=e=>e===i.s2.Back?l:e===i.s2.Front?d:null,h={zNear:0,zFar:1},m={r:!0,g:!0,b:!0,a:!0};function f(e){return C.intern(e)}function p(e){return w.intern(e)}function v(e){return O.intern(e)}function g(e){return
|
|
935
|
+
}`)}const T=(0,s.vt)()},89192:(e,t,r)=>{var i,n,o,a,s,c,l,d;r.d(t,{Am:()=>a,C7:()=>o,JS:()=>d,Mg:()=>c,dd:()=>s,it:()=>n,s2:()=>i,sf:()=>l}),function(e){e[e.None=0]="None",e[e.Front=1]="Front",e[e.Back=2]="Back",e[e.COUNT=3]="COUNT"}(i||(i={})),function(e){e[e.Less=0]="Less",e[e.Lequal=1]="Lequal",e[e.COUNT=2]="COUNT"}(n||(n={})),function(e){e[e.BACKGROUND=0]="BACKGROUND",e[e.UPDATE=1]="UPDATE"}(o||(o={})),function(e){e[e.NOT_LOADED=0]="NOT_LOADED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED"}(a||(a={})),function(e){e[e.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",e[e.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(s||(s={})),function(e){e[e.Highlight=0]="Highlight",e[e.MaskOccludee=1]="MaskOccludee"}(c||(c={})),function(e){e[e.Blend=0]="Blend",e[e.Opaque=1]="Opaque",e[e.Mask=2]="Mask",e[e.MaskBlend=3]="MaskBlend",e[e.COUNT=4]="COUNT"}(l||(l={})),function(e){e.DDS_ENCODING="image/vnd-ms.dds",e.KTX2_ENCODING="image/ktx2",e.BASIS_ENCODING="image/x.basis"}(d||(d={}))},89786:(e,t,r)=>{function i(e){const t=3.141592653589793,r=.3183098861837907;e.vertex.constants.add("PI","float",t),e.fragment.constants.add("PI","float",t),e.fragment.constants.add("LIGHT_NORMALIZATION","float",r),e.fragment.constants.add("INV_PI","float",r),e.fragment.constants.add("HALF_PI","float",1.570796326794897),e.fragment.constants.add("TWO_PI","float",6.28318530717958)}r.d(t,{p:()=>i})},90644:(e,t,r)=>{r.d(t,{Ey:()=>E,Ky:()=>c,Os:()=>s,Uy:()=>h,Xt:()=>u,kn:()=>m,p3:()=>a});var i=r(89192),n=r(63907);function o(e,t,r=n.Tb.ADD,i=[0,0,0,0]){return{srcRgb:e,srcAlpha:e,dstRgb:t,dstAlpha:t,opRgb:r,opAlpha:r,color:{r:i[0],g:i[1],b:i[2],a:i[3]}}}function a(e,t,r,i,o=n.Tb.ADD,a=n.Tb.ADD,s=[0,0,0,0]){return{srcRgb:e,srcAlpha:t,dstRgb:r,dstAlpha:i,opRgb:o,opAlpha:a,color:{r:s[0],g:s[1],b:s[2],a:s[3]}}}o(n.dn.ZERO,n.dn.ONE_MINUS_SRC_ALPHA),o(n.dn.ONE,n.dn.ZERO),o(n.dn.ONE,n.dn.ONE);const s=o(n.dn.ONE,n.dn.ONE_MINUS_SRC_ALPHA),c=a(n.dn.SRC_ALPHA,n.dn.ONE,n.dn.ONE_MINUS_SRC_ALPHA,n.dn.ONE_MINUS_SRC_ALPHA),l={face:n.Y7.BACK,mode:n.Ac.CCW},d={face:n.Y7.FRONT,mode:n.Ac.CCW},u=e=>e===i.s2.Back?l:e===i.s2.Front?d:null,h={zNear:0,zFar:1},m={r:!0,g:!0,b:!0,a:!0};function f(e){return C.intern(e)}function p(e){return w.intern(e)}function v(e){return O.intern(e)}function g(e){return N.intern(e)}function _(e){return L.intern(e)}function T(e){return H.intern(e)}function x(e){return B.intern(e)}function A(e){return G.intern(e)}function b(e){return V.intern(e)}function E(e){return j.intern(e)}class S{constructor(e,t){this._makeKey=e,this._makeRef=t,this._interns=new Map}intern(e){if(!e)return null;const t=this._makeKey(e),r=this._interns;return r.has(t)||r.set(t,this._makeRef(e)),r.get(t)??null}}function M(e){return"["+e.join(",")+"]"}const C=new S(R,(e=>({__tag:"Blending",...e})));function R(e){return e?M([e.srcRgb,e.srcAlpha,e.dstRgb,e.dstAlpha,e.opRgb,e.opAlpha,e.color.r,e.color.g,e.color.b,e.color.a]):null}const w=new S(I,(e=>({__tag:"Culling",...e})));function I(e){return e?M([e.face,e.mode]):null}const O=new S(y,(e=>({__tag:"PolygonOffset",...e})));function y(e){return e?M([e.factor,e.units]):null}const N=new S(P,(e=>({__tag:"DepthTest",...e})));function P(e){return e?M([e.func]):null}const L=new S(D,(e=>({__tag:"StencilTest",...e})));function D(e){return e?M([e.function.func,e.function.ref,e.function.mask,e.operation.fail,e.operation.zFail,e.operation.zPass]):null}const H=new S(F,(e=>({__tag:"DepthWrite",...e})));function F(e){return e?M([e.zNear,e.zFar]):null}const B=new S(U,(e=>({__tag:"ColorWrite",...e})));function U(e){return e?M([e.r,e.g,e.b,e.a]):null}const G=new S(z,(e=>({__tag:"StencilWrite",...e})));function z(e){return e?M([e.mask]):null}const V=new S(W,(e=>({__tag:"DrawBuffers",...e})));function W(e){return e?M(e.buffers):null}const j=new S((function(e){return e?M([R(e.blending),I(e.culling),y(e.polygonOffset),P(e.depthTest),D(e.stencilTest),F(e.depthWrite),U(e.colorWrite),z(e.stencilWrite),W(e.drawBuffers)]):null}),(e=>({blending:f(e.blending),culling:p(e.culling),polygonOffset:v(e.polygonOffset),depthTest:g(e.depthTest),stencilTest:_(e.stencilTest),depthWrite:T(e.depthWrite),colorWrite:x(e.colorWrite),stencilWrite:A(e.stencilWrite),drawBuffers:b(e.drawBuffers)})))},92700:(e,t,r)=>{r.d(t,{c:()=>o});var i=r(31821),n=r(46540);function o(e,t){t.hasVertexColors?(e.attributes.add(n.r.COLOR,"vec4"),e.varyings.add("vColor","vec4"),e.vertex.code.add(i.H`void forwardVertexColor() { vColor = color; }`),e.vertex.code.add(i.H`void forwardNormalizedVertexColor() { vColor = color * 0.003921568627451; }`)):e.vertex.code.add(i.H`void forwardVertexColor() {}
|
|
936
936
|
void forwardNormalizedVertexColor() {}`)}},92993:(e,t,r)=>{var i;r.d(t,{n:()=>i}),function(e){e[e.ETC1_RGB=0]="ETC1_RGB",e[e.ETC2_RGBA=1]="ETC2_RGBA",e[e.BC1_RGB=2]="BC1_RGB",e[e.BC3_RGBA=3]="BC3_RGBA",e[e.BC4_R=4]="BC4_R",e[e.BC5_RG=5]="BC5_RG",e[e.BC7_M6_RGB=6]="BC7_M6_RGB",e[e.BC7_M5_RGBA=7]="BC7_M5_RGBA",e[e.PVRTC1_4_RGB=8]="PVRTC1_4_RGB",e[e.PVRTC1_4_RGBA=9]="PVRTC1_4_RGBA",e[e.ASTC_4x4_RGBA=10]="ASTC_4x4_RGBA",e[e.ATC_RGB=11]="ATC_RGB",e[e.ATC_RGBA=12]="ATC_RGBA",e[e.FXT1_RGB=17]="FXT1_RGB",e[e.PVRTC2_4_RGB=18]="PVRTC2_4_RGB",e[e.PVRTC2_4_RGBA=19]="PVRTC2_4_RGBA",e[e.ETC2_EAC_R11=20]="ETC2_EAC_R11",e[e.ETC2_EAC_RG11=21]="ETC2_EAC_RG11",e[e.RGBA32=13]="RGBA32",e[e.RGB565=14]="RGB565",e[e.BGR565=15]="BGR565",e[e.RGBA4444=16]="RGBA4444"}(i||(i={}))},94656:(e,t,r)=>{r.d(t,{Y2:()=>l,en:()=>c});var i=r(49186),n=r(44208),o=r(53966);const a=()=>o.A.getLogger("esri.views.webgl.checkWebGLError"),s=!!(0,n.A)("enable-feature:webgl-debug");function c(){return s}function l(e){if(c()){const t=e.getError();if(t){const r=function(e,t){switch(t){case e.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case e.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case e.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case e.INVALID_FRAMEBUFFER_OPERATION:return"Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.";case e.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case e.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}(e,t),n=(new Error).stack;a().error(new i.A("webgl-error","WebGL error occurred",{message:r,stack:n}))}}}},95774:(e,t,r)=>{r.d(t,{S:()=>m,b:()=>h});var i=r(82048),n=r(52540),o=r(68259),a=r(20304),s=r(31821),c=r(15976),l=r(63761),d=r(14113);const u=4;function h(){const e=new d.N5,t=e.fragment;e.include(i.c);const r=(u+1)/2,h=1/(2*r*r);return t.include(n.E),t.uniforms.add(new l.N("depthMap",(e=>e.depthTexture)),new c.o("tex",(e=>e.colorTexture)),new o.t("blurSize",(e=>e.blurSize)),new a.m("projScale",((e,t)=>{const r=t.camera.distance;return r>5e4?Math.max(0,e.projScale-(r-5e4)):e.projScale}))),t.code.add(s.H`
|
|
937
937
|
void blurFunction(vec2 uv, float r, float center_d, float sharpness, inout float wTotal, inout float bTotal) {
|
|
938
938
|
float c = texture(tex, uv).r;
|
package/core/MapUtils.js
CHANGED
|
@@ -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
|
-
function n(n,t){for(const r of n.values())if(t(r))return!0;return!1}function t(n,t){for(const r of n.values())if(t(r))return r;return null}function
|
|
5
|
+
function n(n,t){for(const r of n.values())if(t(r))return!0;return!1}function t(n,t){if(null==n&&null==t)return!0;if(null==n||null==t||n.size!==t.size)return!1;for(const[r,u]of n)if(!t.has(r)||u!==t.get(r))return!1;return!0}function r(n,t){for(const r of n.values())if(t(r))return r;return null}function u(n,t,r){const u=n.get(t);if(void 0!==u)return u;const e=r();return n.set(t,e),e}function e(n){const t=new Map;return r=>(t.has(r)||t.set(r,n(r)),t.get(r))}export{t as equals,r as findInMap,u as getOrCreateMapValue,e as memoize,n as someMap};
|
package/package.json
CHANGED
package/support/revision.js
CHANGED
|
@@ -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
|
|
5
|
+
const c="20250308",d="8b445ff74a9dc27738190cd14ca119ed1dfb3698";export{c as buildDate,d as commitHash};
|