@arcgis/core 6.0.0-next.29 → 6.0.0-next.30
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/WebDocument2D.js +1 -1
- package/WebMap.d.ts +3 -19
- package/WebMap.js +1 -1
- package/WebScene.js +1 -1
- package/arcgisGlobal.d.ts +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/039d9bc5b5015012f811.js +1 -0
- package/assets/esri/core/workers/chunks/{b01688ccc29d33bfc82d.js → 28a821de9dbf10324033.js} +1 -1
- package/assets/esri/core/workers/chunks/{d3c3fb079ad97970f834.js → 4fb2fcc95f852bf8f86c.js} +1 -1
- package/assets/esri/core/workers/chunks/{84940d8e14caf5a27e04.js → 64b360625c68cb863a08.js} +1 -1
- package/assets/esri/core/workers/chunks/71f792a20077aa739f87.js +1 -0
- package/assets/esri/core/workers/chunks/{e480e7d5f40049a2053b.js → 7af4edc6e87d27b9d467.js} +1 -1
- package/assets/esri/core/workers/chunks/90c1d10eae7ae71889b0.js +1 -0
- package/assets/esri/core/workers/chunks/{8a485130781b49dbf608.js → 9d40786c5ceface786ba.js} +1 -1
- package/assets/esri/core/workers/chunks/aba259a70bee68d2edb7.js +1 -0
- package/assets/esri/core/workers/chunks/c33a9635c294c8774977.js +1 -0
- package/assets/esri/views/3d/environment/resources/milkyway-band.avif +0 -0
- package/chunks/GlobalIllumination.glsl.js +16 -10
- package/chunks/GlobalIlluminationBlur.glsl.js +14 -14
- package/chunks/GlobalIlluminationUpscale.glsl.js +4 -4
- package/chunks/RibbonLine.glsl.js +78 -75
- package/config.js +1 -1
- package/core/workers/WorkerHandle.js +1 -1
- package/kernel.js +1 -1
- package/layers/WMTSLayer.d.ts +1 -1
- package/layers/WMTSLayer.js +1 -1
- package/layers/mixins/TiledImagery.d.ts +7 -0
- package/layers/support/WMTSSublayer.d.ts +5 -5
- package/networks/Network.js +1 -1
- package/networks/support/TopologyValidationJobInfo.js +1 -1
- package/package.json +2 -2
- package/rest/networks/support/ValidateNetworkTopologyResult.js +1 -1
- package/support/timeUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
- package/views/2d/layers/GeospatialPDFLayerView2D.js +1 -1
- package/views/2d/layers/SketchLayerView2D.js +1 -1
- package/views/2d/layers/WMTSLayerView2D.js +1 -1
- package/views/2d/types.d.ts +2 -1
- package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/visualElements/Object3DVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/StageObjectVisualElement.js +2 -0
- package/views/3d/layers/WMTSLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/ElevationAligners.js +1 -1
- package/views/3d/layers/graphics/Graphics3DBufferGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayerConstants.js +1 -1
- package/views/3d/layers/graphics/Graphics3DStageObjectGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/elevationAlignmentUtils.js +1 -1
- package/views/3d/layers/graphics/pointUtils.js +1 -1
- package/views/3d/terrain/ExtentHelper.js +1 -1
- package/views/3d/terrain/PatchGeometryFactory.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/SphericalPatch.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/tileUtils.js +1 -1
- package/views/3d/types.d.ts +2 -1
- package/views/3d/webgl-engine/Stage.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexInfo.glsl.js +10 -11
- package/views/3d/webgl-engine/core/shaderLibrary/util/PackedUint32.glsl.js +2 -0
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationUpscale.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/globalIlluminationUniforms.js +2 -0
- package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
- package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/PackedUint32.js +2 -0
- package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/PathVertexInfo.js +1 -1
- package/views/3d/webgl-engine/lib/RibbonLineVertexInfo.js +2 -0
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterialBaseInstance.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterialBaseInstance.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/parts/Model.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineLayouts.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTextureBuffer.glsl.js +1 -1
- package/views/SelectionManager.d.ts +5 -5
- package/views/SelectionManager.js +1 -1
- package/views/input/InputManager.js +1 -1
- package/views/layers/WMTSLayerView.d.ts +16 -0
- package/views/layers/WMTSLayerView.js +2 -0
- package/views/layers/support/highlightUtils.js +1 -1
- package/views/selection/SelectionOperation.js +1 -1
- package/views/selection/types.d.ts +3 -3
- package/views/support/GeometryWorker.js +1 -1
- package/views/support/GeometryWorkerHandle.js +1 -1
- package/views/support/selectionUtils.js +1 -1
- package/webdoc/support/webdocLoadUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.js +1 -1
- package/widgets/FeatureTable/AttachmentsColumn.js +1 -1
- package/widgets/FeatureTable/RelationshipColumn.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementWorkerUtils.js +1 -1
- package/widgets/support/SelectionList/GroupLayerItem.d.ts +5 -5
- package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
- package/widgets/support/SelectionList/ItemBase.d.ts +3 -3
- package/widgets/support/SelectionList/LayerItem.js +1 -1
- package/widgets/support/SelectionList/SelectionListViewModel.d.ts +5 -6
- package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
- package/widgets/support/SelectionList/types.d.ts +3 -1
- package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
- package/widgets/support/Selector2D/selectorUtils.js +1 -1
- package/widgets/support/symbolPreviewUtils.js +1 -1
- package/assets/esri/core/workers/chunks/2de4296590bf9f9e9add.js +0 -1
- package/assets/esri/core/workers/chunks/4976f5567fc7f1b63d10.js +0 -1
- package/assets/esri/core/workers/chunks/53c7510df09b71ab5646.js +0 -1
- package/assets/esri/core/workers/chunks/66c2a28a851130b87c04.js +0 -1
- package/assets/esri/core/workers/chunks/e7aaf7579592b79d6dd7.js +0 -1
- package/layers/geospatialPDF/CIM2DLayerview.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[309],{20309(e,t,r){r.r(t),r.d(t,{default:()=>me});var i,l=r(32198),s=r(56507),a=r(4576),o=r(7762),n=r(49186),u=r(4718),p=r(25728),d=r(17676),c=r(36708),m=r(84952),h=r(91429),y=r(5443),f=r(4146),g=r(47314),w=r(63074),x=r(34287),v=r(8303),M=r(54310),C=r(25036),I=r(33446),S=r(87045),T=r(65509),L=r(83703),A=r(25482);let E=i=class extends A.o{constructor(e){super(e),this.fullExtent=null,this.id=null,this.tileInfo=null}clone(){let e=new i;return this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent?.clone()??null),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("tileInfo")&&(e.tileInfo=this.tileInfo?.clone()??null),e}};(0,l.Cg)([(0,h.MZ)({type:y.A,json:{read:{source:"fullExtent"}}})],E.prototype,"fullExtent",void 0),(0,l.Cg)([(0,h.MZ)({type:String,json:{read:{source:"id"}}})],E.prototype,"id",void 0),(0,l.Cg)([(0,h.MZ)({type:S.A,json:{read:{source:"tileInfo"}}})],E.prototype,"tileInfo",void 0),E=i=(0,l.Cg)([(0,h.$K)("esri.layers.support.TileMatrixSet")],E);const b=E;var P;let O=P=class extends A.o{constructor(e){super(e),this.id=null,this.title=null,this.description=null,this.legendUrl=null}clone(){let e=new P;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("isDefault")&&(e.isDefault=this.isDefault),this.hasOwnProperty("keywords")&&(e.keywords=this.keywords&&this.keywords.slice()),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("title")&&(e.title=this.title),e}};(0,l.Cg)([(0,h.MZ)({json:{read:{source:"id"}}})],O.prototype,"id",void 0),(0,l.Cg)([(0,h.MZ)({json:{read:{source:"title"}}})],O.prototype,"title",void 0),(0,l.Cg)([(0,h.MZ)({json:{read:{source:"abstract"}}})],O.prototype,"description",void 0),(0,l.Cg)([(0,h.MZ)({json:{read:{source:"legendUrl"}}})],O.prototype,"legendUrl",void 0),(0,l.Cg)([(0,h.MZ)({json:{read:{source:"isDefault"}}})],O.prototype,"isDefault",void 0),(0,l.Cg)([(0,h.MZ)({json:{read:{source:"keywords"}}})],O.prototype,"keywords",void 0),O=P=(0,l.Cg)([(0,h.$K)("esri.layers.support.WMTSStyle")],O);const R=O;var F,Z=r(36005);let V=F=class extends A.o{constructor(e){super(e),this.description=null,this.fullExtent=null,this.fullExtents=null,this.id=null,this.imageFormats=null,this.layer=null,this.parent=null,this.styles=null,this.title=null,this.tileMatrixSetId=null,this.tileMatrixSets=null}readFullExtent(e,t){return(e=t.fullExtent)?y.A.fromJSON(e):null}readFullExtents(e,t){return t.fullExtents?.length?t.fullExtents.map(e=>y.A.fromJSON(e)):t.tileMatrixSets?.map(e=>y.A.fromJSON(e.fullExtent)).filter(e=>e)??[]}get imageFormat(){let e=this._get("imageFormat");return e||=this.imageFormats?.length?this.imageFormats[0]:"",e}set imageFormat(e){let t=this.imageFormats;e&&(e.includes("image/")||t&&!t.includes(e))&&(e.includes("image/")||(e="image/"+e),t&&!t.includes(e))?console.error("The layer doesn't support the format of "+e):this._set("imageFormat",e)}get styleId(){let e=this._get("styleId");return e||=this.styles?.at(0)?.id??"",e}set styleId(e){this._set("styleId",e)}get tileMatrixSet(){return this.tileMatrixSets?.find(({id:e})=>e===this.tileMatrixSetId)??null}clone(){let e=new F;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("imageFormats")&&(e.imageFormats=this.imageFormats?.slice()??null),this.hasOwnProperty("imageFormat")&&(e.imageFormat=this.imageFormat),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent?.clone()),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("styleId")&&(e.styleId=this.styleId),this.hasOwnProperty("styles")&&(e.styles=this.styles?.clone()),this.hasOwnProperty("tileMatrixSetId")&&(e.tileMatrixSetId=this.tileMatrixSetId),this.hasOwnProperty("tileMatrixSets")&&(e.tileMatrixSets=this.tileMatrixSets?.clone()),this.hasOwnProperty("title")&&(e.title=this.title),e}};(0,l.Cg)([(0,h.MZ)()],V.prototype,"description",void 0),(0,l.Cg)([(0,h.MZ)({type:y.A})],V.prototype,"fullExtent",void 0),(0,l.Cg)([(0,Z.w)("fullExtent",["fullExtent"])],V.prototype,"readFullExtent",null),(0,l.Cg)([(0,h.MZ)({readOnly:!0})],V.prototype,"fullExtents",void 0),(0,l.Cg)([(0,Z.w)("fullExtents",["fullExtents","tileMatrixSets"])],V.prototype,"readFullExtents",null),(0,l.Cg)([(0,h.MZ)()],V.prototype,"id",void 0),(0,l.Cg)([(0,h.MZ)()],V.prototype,"imageFormat",null),(0,l.Cg)([(0,h.MZ)({json:{read:{source:"formats"}}})],V.prototype,"imageFormats",void 0),(0,l.Cg)([(0,h.MZ)()],V.prototype,"layer",void 0),(0,l.Cg)([(0,h.MZ)()],V.prototype,"parent",void 0),(0,l.Cg)([(0,h.MZ)()],V.prototype,"styleId",null),(0,l.Cg)([(0,h.MZ)({type:o.A.ofType(R),json:{read:{source:"styles"}}})],V.prototype,"styles",void 0),(0,l.Cg)([(0,h.MZ)({json:{write:{ignoreOrigin:!0}}})],V.prototype,"title",void 0),(0,l.Cg)([(0,h.MZ)()],V.prototype,"tileMatrixSetId",void 0),(0,l.Cg)([(0,h.MZ)({readOnly:!0})],V.prototype,"tileMatrixSet",null),(0,l.Cg)([(0,h.MZ)({type:o.A.ofType(b),json:{read:{source:"tileMatrixSets"}}})],V.prototype,"tileMatrixSets",void 0),V=F=(0,l.Cg)([(0,h.$K)("esri.layers.support.WMTSSublayer")],V);var U=r(73941),_=r(86738),j=r(22530),N=r(38458),k=r(13043),D=r(91806);const W=90.71428571428571;function K(e){let t=e.replaceAll(/ows:/gi,"");return(new DOMParser).parseFromString(t,"text/xml")}function B(e){if(!H("Contents",e.documentElement))throw new n.A("wmtslayer:wmts-capabilities-xml-is-not-valid","the wmts get capabilities response is not compliant")}function $(e){return e.nodeType===Node.ELEMENT_NODE}function H(e,t){for(let r=0;r<t.childNodes.length;r++){let i=t.childNodes[r];if($(i)&&i.nodeName===e)return i}return null}function J(e,t){let r=[];for(let i=0;i<t.childNodes.length;i++){let l=t.childNodes[i];$(l)&&l.nodeName===e&&r.push(l)}return r}function q(e,t){let r=[];for(let i=0;i<t.childNodes.length;i++){let l=t.childNodes[i];$(l)&&l.nodeName===e&&r.push(l)}return r.map(e=>e.textContent).filter(a.Ru)}function G(e,t){return e.split(">").forEach(e=>{t&&=H(e,t)}),t&&t.textContent}function z(e,t,r,i){let l;return Array.prototype.slice.call(i.childNodes).some(i=>{if(i.nodeName.includes(e)){let e=H(t,i)?.textContent;if(e===r||r.split(":")&&r.split(":")[1]===e)return l=i,!0}return!1}),l}function Q(e,t,r,i,l){let s=G("Abstract",t),a=q("Format",t);return{id:e,fullExtent:Y(t),fullExtents:ee(t),description:s,formats:a,styles:te(t,i),title:G("Title",t),tileMatrixSets:re(l,t,r)}}function X(e,t){let r=[],i=e.layerMap?.get(t);if(!i)return null;let l,s,a,o,n=J("ResourceURL",i),u=J("Dimension",i);return u.length&&(l=G("Identifier",u[0]),s=q("Default",u[0])||q("Value",u[0])),u.length>1&&(a=G("Identifier",u[1]),o=q("Default",u[1])||q("Value",u[1])),e.dimensionMap.set(t,{dimensions:s,dimensions2:o}),n.forEach(e=>{let t=e.getAttribute("template");if("tile"===e.getAttribute("resourceType")){if(l&&s.length)if(t.includes("{"+l+"}"))t=t.replace("{"+l+"}","{dimensionValue}");else{let e=t.toLowerCase().indexOf("{"+l.toLowerCase()+"}");e>-1&&(t=t.slice(0,e)+"{dimensionValue}"+t.slice(e+l.length+2))}if(a&&o.length)if(t.includes("{"+a+"}"))t=t.replace("{"+a+"}","{dimensionValue2}");else{let e=t.toLowerCase().indexOf("{"+a.toLowerCase()+"}");e>-1&&(t=t.slice(0,e)+"{dimensionValue2}"+t.slice(e+a.length+2))}r.push({template:t,format:e.getAttribute("format"),resourceType:"tile"})}}),r}function Y(e){let t=H("WGS84BoundingBox",e),r=t?G("LowerCorner",t).split(" "):["-180","-90"],i=t?G("UpperCorner",t).split(" "):["180","90"];return{xmin:parseFloat(r[0]),ymin:parseFloat(r[1]),xmax:parseFloat(i[0]),ymax:parseFloat(i[1]),spatialReference:{wkid:4326}}}function ee(e){let t=[];return(0,k.p)(e,{BoundingBox:e=>{if(!e.getAttribute("crs"))return;let r,i,l,s,a=e.getAttribute("crs").toLowerCase(),o=ie(a),n=a.includes("epsg")&&(0,N.m)(o.wkid);(0,k.p)(e,{LowerCorner:e=>{[r,i]=e.textContent.split(" ").map(e=>Number.parseFloat(e)),n&&([r,i]=[i,r])},UpperCorner:e=>{[l,s]=e.textContent.split(" ").map(e=>Number.parseFloat(e)),n&&([l,s]=[s,l])}}),t.push({xmin:r,ymin:i,xmax:l,ymax:s,spatialReference:o})}}),t}function te(e,t){return J("Style",e).map(e=>{let r=H("LegendURL",e),i=H("Keywords",e),l=i?q("Keyword",i):[],s=r?.getAttribute("xlink:href");return t&&(s=s?.replace(/^http:/i,"https:")),{abstract:G("Abstract",e),id:G("Identifier",e),isDefault:"true"===e.getAttribute("isDefault"),keywords:l,legendUrl:s,title:G("Title",e)}})}function re(e,t,r){return J("TileMatrixSetLink",t).map(t=>function(e,t,r){let i=H("TileMatrixSet",t).textContent,l=q("TileMatrix",t),s=r.find(e=>{let t=H("Identifier",e)?.textContent;return!!(t===i||i.split(":")&&i.split(":")[1]===t)}),a=H("TileMatrixSetLimits",t),o=a&&J("TileMatrixLimits",a),n=new Map;if(o?.length)for(let e of o){let t=H("TileMatrix",e).textContent,r=+H("MinTileRow",e).textContent,i=+H("MaxTileRow",e).textContent,l=+H("MinTileCol",e).textContent,s=+H("MaxTileCol",e).textContent;n.set(t,{minCol:l,maxCol:s,minRow:r,maxRow:i})}let u=G("SupportedCRS",s).toLowerCase(),p=function(e,t){return le(H("TileMatrix",e),t)}(s,u),d=p.spatialReference,c=H("TileMatrix",s),m=[parseInt(G("TileWidth",c),10),parseInt(G("TileHeight",c),10)],h=[];return l.length?l.forEach((e,t)=>{let r=z("TileMatrix","Identifier",e,s);h.push(ae(r,u,t,i,n))}):J("TileMatrix",s).forEach((e,t)=>{h.push(ae(e,u,t,i,n))}),{id:i,fullExtent:se(e,s,p,m,h[0]).toJSON(),tileInfo:new S.A({dpi:96,spatialReference:d,size:m,origin:p,lods:h}).toJSON()}}(e,t,r))}function ie(e){e=e.toLowerCase();let t=parseInt(e.split(":").pop(),10);(900913===t||3857===t)&&(t=102100);let r=function(e){return e.includes("crs84")||e.includes("crs:84")?4326:e.includes("crs83")||e.includes("crs:83")?4269:e.includes("crs27")||e.includes("crs:27")?4267:null}(e);return null!=r&&(t=r),{wkid:t}}function le(e,t){let r=ie(t),[i,l]=G("TopLeftCorner",e).split(" ").map(e=>parseFloat(e));return t.includes("epsg")&&(0,N.m)(r.wkid)?new _.A({x:l,y:i,spatialReference:r}):new _.A({x:i,y:l,spatialReference:r})}function se(e,t,r,i,l){let s,a,o,n,u,p,d=H("BoundingBox",t);if(d&&(s=G("LowerCorner",d).split(" "),a=G("UpperCorner",d).split(" ")),s&&s.length>1&&a&&a.length>1)o=parseFloat(s[0]),u=parseFloat(s[1]),n=parseFloat(a[0]),p=parseFloat(a[1]);else{let e=H("TileMatrix",t),s=parseInt(G("MatrixWidth",e),10),a=parseInt(G("MatrixHeight",e),10);o=r.x,p=r.y,n=o+s*i[0]*l.resolution,u=p-a*i[1]*l.resolution}return function(e,t,r){return"1.0.0"===e&&(0,N.m)(t.wkid)&&!(r.spatialReference.isGeographic&&r.x<-90&&r.y>=-90)}(e,r.spatialReference,r)?new y.A(u,o,p,n,r.spatialReference):new y.A(o,u,n,p,r.spatialReference)}function ae(e,t,r,i,l){let s=ie(t),a=G("Identifier",e),o=parseFloat(G("ScaleDenominator",e)),n=oe(s.wkid,o,i);o*=96/W;let u=+G("MatrixWidth",e),p=+G("MatrixHeight",e),{maxCol:d=u-1,maxRow:c=p-1,minCol:m=0,minRow:h=0}=l.get(a)??{},{x:y,y:f}=le(e,t);return new D.A({cols:[m,d],level:r,levelValue:a,origin:[y,f],scale:o,resolution:n,rows:[h,c]})}function oe(e,t,r){let i;return i=j.A.hasOwnProperty(""+e)?j.A.values[j.A[e]]:"default028mm"===r?6370997*Math.PI/180:(0,U.y7)(e).metersPerDegree,7*t/25e3/i}var ne,ue=r(43937);const pe={"image/png":".png","image/png8":".png","image/png24":".png","image/png32":".png","image/jpg":".jpg","image/jpeg":".jpeg","image/gif":".gif","image/bmp":".bmp","image/tiff":".tif","image/jpgpng":"","image/jpegpng":"","image/unknown":""},de=new Set(["version","service","request","layer","style","format","tilematrixset","tilematrix","tilerow","tilecol"]);let ce=ne=class extends((0,w.dM)((0,M.J)((0,C.j)((0,x.q)((0,v.A)((0,p.M)(f.A))))))){constructor(...e){super(...e),this.activeLayer=null,this.copyright="",this.customParameters=null,this.customLayerParameters=null,this.operationalLayerType="WebTiledLayer",this.resourceInfo=null,this.serviceMode="RESTful",this.sublayers=null,this.type="wmts",this.version="1.0.0",this.addHandles([(0,c.wB)(()=>this.activeLayer,(e,t)=>{t&&!this.sublayers?.includes(t)&&(t.layer=null,t.parent=null),e&&(e.layer=this,e.parent=this)},c.OH),(0,c.on)(()=>this.sublayers,"after-add",({item:e})=>{e.layer=this,e.parent=this},c.OH),(0,c.on)(()=>this.sublayers,"after-remove",({item:e})=>{e.layer=null,e.parent=null},c.OH),(0,c.wB)(()=>this.sublayers,(e,t)=>{if(t)for(let e of t)e.layer=null,e.parent=null;if(e)for(let t of e)t.layer=this,t.parent=this},c.OH)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMTS"]},e).catch(d.QP).then(()=>this._fetchService(e)).catch(e=>{throw(0,d.QP)(e),new n.A("wmtslayer:unsupported-service-data","Invalid response from the WMTS service.",{error:e})})),Promise.resolve(this)}readActiveLayerFromService(e,t,r){this.activeLayer||=new V;let i=t.layers.find(e=>e.id===this.activeLayer.id);return i||=t.layers[0],this.activeLayer.read(i,r),this.activeLayer}readActiveLayerFromItemOrWebDoc(e,t){let{templateUrl:r,wmtsInfo:i}=t,l=r?this._getLowerCasedUrlParams(r):null,s=i?.layerIdentifier,a=null,o=i?.tileMatrixSet;o&&(Array.isArray(o)?o.length&&(a=o[0]):a=o);let n=l?.format,u=l?.style;return new V({id:s,imageFormat:n,styleId:u,tileMatrixSetId:a})}writeActiveLayer(e,t,r,i){let{activeLayer:l,loaded:s}=this,{id:a,tileMatrixSet:o,tileMatrixSetId:n,imageFormat:u,styleId:p}=l;t.templateUrl=s?this.getUrlTemplate(a,n,u,p):void 0,t.tileInfo=s?o?.tileInfo?.toJSON(i)??null:void 0,t.wmtsInfo={...t.wmtsInfo,layerIdentifier:a,tileMatrixSet:n}}readCustomParameters(e,t){let r=t.wmtsInfo;return r?this._mergeParams(r.customParameters,r.url):null}get fullExtent(){return this.fullExtents?.[0]}set fullExtent(e){this._override("fullExtent",e)}get fullExtents(){return this.activeLayer?.fullExtents}readServiceMode(e,t){return t.templateUrl.includes("?")?"KVP":"RESTful"}readSublayersFromService(e,t,r){return function(e,t){return e.map(e=>{let r=new V;return r.read(e,t),r})}(t.layers,r)}get supportedSpatialReferences(){return this.activeLayer.tileMatrixSets?.map(e=>e.tileInfo?.spatialReference).toArray().filter(a.Ru)??[]}get tilemapCache(){let e=this.activeLayer?.tileMatrixSet?.tileInfo;return e?new T.A(e):void 0}get title(){return this.activeLayer?.title??"Layer"}set title(e){this._overrideIfSome("title",e)}get url(){return this._get("url")}set url(e){e&&e.endsWith("/")?this._set("url",e.slice(0,-1)):this._set("url",e)}createWebTileLayer(e){let t=this.getUrlTemplate(this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId),r=this._getTileMatrixSetById(e.tileMatrixSetId)?.tileInfo,i=e.fullExtent,l=new L.x({layerIdentifier:e.id,tileMatrixSet:e.tileMatrixSetId,url:this.url});return this.customLayerParameters&&(l.customLayerParameters=this.customLayerParameters),this.customParameters&&(l.customParameters=this.customParameters),new g.default({fullExtent:i,urlTemplate:t,tileInfo:r,wmtsInfo:l})}async fetchTile(e,t,r,i={}){let{signal:l}=i,a=this.getTileUrl(e,t,r,i.tileMatrixSetId),{data:o}=await(0,s.A)(a,{responseType:"image",signal:l});return o}async fetchImageBitmapTile(e,t,r,i={}){let{signal:l}=i;if(this.fetchTile!==ne.prototype.fetchTile){let l=await this.fetchTile(e,t,r,i);return(0,I.Cp)(l,e,t,r,i)}let a=this.getTileUrl(e,t,r,i.tileMatrixSetId),{data:o}=await(0,s.A)(a,{responseType:"blob",signal:l});return(0,I.Cp)(o,e,t,r,i)}findSublayerById(e){return this.sublayers?.find(t=>t.id===e)}getTileUrl(e,t,r,i=this.activeLayer.tileMatrixSetId){let l=this._getTileMatrixSetById(i)?.tileInfo?.lods[e],s=l?l.levelValue||`${l.level}`:`${e}`,a=this.resourceInfo?"":function(e,t,r,i,l,s,a,o){let n=function(e,t,r){let i=X(e,t),l=i?.filter(e=>e.format===r);return(l?.length?l:i)??[]}(e,t,i);if(!(n?.length>0))return"";let{dimensionMap:u}=e,p=u.get(t).dimensions?.[0],d=u.get(t).dimensions2?.[0];return n[a%n.length].template.replaceAll(/\{Style\}/gi,l??"").replaceAll(/\{TileMatrixSet\}/gi,r??"").replaceAll(/\{TileMatrix\}/gi,s).replaceAll(/\{TileRow\}/gi,""+a).replaceAll(/\{TileCol\}/gi,""+o).replaceAll(/\{dimensionValue\}/gi,p).replaceAll(/\{dimensionValue2\}/gi,d)}({dimensionMap:this.dimensionMap,layerMap:this.layerMap},this.activeLayer.id,i,this.activeLayer.imageFormat,this.activeLayer.styleId,s,t,r);return a||=this.getUrlTemplate(this.activeLayer.id,i,this.activeLayer.imageFormat,this.activeLayer.styleId).replaceAll(/\{level\}/gi,s).replaceAll(/\{row\}/gi,`${t}`).replaceAll(/\{col\}/gi,`${r}`),a=this._appendCustomLayerParameters(a),a}updateFrom(e){let{tileMatrixSet:t}=e;t&&(this.activeLayer.tileMatrixSetId=t.id,this.fullExtent=t.fullExtent?.clone()??null)}getUrlTemplate(e,t,r,i){if(!this.resourceInfo){let r=function(e,t,r,i){let{dimensionMap:l}=e,s=X(e,t),a="";if(s&&s.length>0){let e=l.get(t).dimensions?.[0],o=l.get(t).dimensions2?.[0];a=s[0].template,a.endsWith(".xxx")&&(a=a.slice(0,-4)),a=a.replaceAll(/\{Style\}/gi,i),a=a.replaceAll(/\{TileMatrixSet\}/gi,r),a=a.replaceAll(/\{TileMatrix\}/gi,"{level}"),a=a.replaceAll(/\{TileRow\}/gi,"{row}"),a=a.replaceAll(/\{TileCol\}/gi,"{col}"),a=a.replaceAll(/\{dimensionValue\}/gi,e),a=a.replaceAll(/\{dimensionValue2\}/gi,o)}return a}({dimensionMap:this.dimensionMap,layerMap:this.layerMap},e,t,i);if(r)return r}if("KVP"===this.serviceMode)return this.url+"?SERVICE=WMTS&VERSION="+this.version+"&REQUEST=GetTile&LAYER="+e+"&STYLE="+i+"&FORMAT="+r+"&TILEMATRIXSET="+t+"&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}";if("RESTful"===this.serviceMode){let l="",s=r.toLowerCase();return pe[s]&&(l=pe[s]),this.url+e+"/"+i+"/"+t+"/{level}/{row}/{col}"+l}return""}async _fetchService(e){if(this.resourceInfo)return"KVP"===this.resourceInfo.serviceMode&&!this.url.includes("?")&&(this.url+="?"),function(e){for(let t of e.layers)for(let e of t.tileMatrixSets??[]){let{tileInfo:t}=e;if(t&&96!==t.dpi){for(let r of t.lods??[])r.scale=96*r.scale/t.dpi,r.resolution=oe(t.spatialReference?.wkid,r.scale*W/96,e.id);t.dpi=96}}}(this.resourceInfo),void this.read(this.resourceInfo,{origin:"service"});let t=null;try{let{data:r}=await this._getCapabilities(this.serviceMode,e);t=K(r),B(t)}catch{let r="KVP"===this.serviceMode?"RESTful":"KVP";try{let{data:i}=await this._getCapabilities(r,e);t=K(i),B(t),this.serviceMode=r}catch(e){throw new n.A("wmtslayer:unsupported-service-data","Services does not support RESTful or KVP service modes.",{error:e})}}let{serviceMode:r,url:i}=this,l=function(e,t){let r=e.documentElement,i=new Map,l=new Map,s=H("Contents",r);if(!s)throw new n.A("wmtslayer:wmts-capabilities-xml-is-not-valid","Can't retrieve xml capabilities element");let a,o,u=(H("OperationsMetadata",r)?.querySelector("[name='GetTile']"))?.getElementsByTagName("Get"),p=u&&Array.prototype.slice.call(u),d=t.url?.indexOf("https"),c=void 0!==d&&d>-1,m=t.serviceMode,h=t?.url;p?.length&&p.some(e=>{let t=H("Constraint",e);return!t||z("AllowedValues","Value",m,t)?(h=e.attributes[0].nodeValue,!0):(!t||z("AllowedValues","Value","RESTful",t)||z("AllowedValues","Value","REST",t)?o=e.attributes[0].nodeValue:(!t||z("AllowedValues","Value","KVP",t))&&(a=e.attributes[0].nodeValue),!1)}),h||(o?(h=o,m="RESTful"):a?(h=a,m="KVP"):h=H("ServiceMetadataURL",r)?.getAttribute("xlink:href"));let y=h.indexOf("1.0.0/");-1===y&&"RESTful"===m?h+="/":y>-1&&(h=h.slice(0,y)),"KVP"===m&&(h+=y>-1?"":"?"),c&&(h=h.replace(/^http:/i,"https:"));let f=G("ServiceIdentification>ServiceTypeVersion",r),g=G("ServiceIdentification>AccessConstraints",r),w=g&&/^none$/i.test(g)?null:g,x=J("Layer",s),v=J("TileMatrixSet",s);return{copyright:w,dimensionMap:l,layerMap:i,layers:x.map(e=>{let t=G("Identifier",e);return i.set(t,e),Q(t,e,v,c,f)}),serviceMode:m,tileUrl:h}}(t,{serviceMode:r,url:i});this.read(l,{origin:"service"})}async _getCapabilities(e,t){let r=this._getCapabilitiesUrl(e);return await(0,s.A)(r,{...t,responseType:"text"})}_getTileMatrixSetById(e){return this.findSublayerById(this.activeLayer.id)?.tileMatrixSets?.find(({id:t})=>t===e)}_appendCustomParameters(e){return this._appendParameters(e,this.customParameters)}_appendCustomLayerParameters(e){return this._appendParameters(e,{...(0,u.o8)(this.customParameters),...this.customLayerParameters})}_appendParameters(e,t){let r=(0,m.An)(e),i={...r.query,...t},l=(0,m.x0)(i);return""===l?r.path:`${r.path}?${l}`}_getCapabilitiesUrl(e){this.url=(0,m.An)(this.url).path;let t=this.url;switch(e){case"KVP":t+=`?request=GetCapabilities&service=WMTS&version=${this.version}`;break;case"RESTful":{let e=`/${this.version}/WMTSCapabilities.xml`,r=new RegExp(e,"i");t=t.replace(r,""),t+=e;break}}return this._appendCustomParameters(t)}_getLowerCasedUrlParams(e){if(!e)return null;let t=(0,m.An)(e).query;if(!t)return null;let r={};return Object.keys(t).forEach(e=>{r[e.toLowerCase()]=t[e]}),r}_mergeParams(e,t){let r=this._getLowerCasedUrlParams(t);if(r){let t=Object.keys(r);t.length&&(e=e?(0,u.o8)(e):{},t.forEach(t=>{!e.hasOwnProperty(t)&&!de.has(t)&&(e[t]=r[t])}))}return e}};(0,l.Cg)([(0,h.MZ)()],ce.prototype,"dimensionMap",void 0),(0,l.Cg)([(0,h.MZ)()],ce.prototype,"layerMap",void 0),(0,l.Cg)([(0,h.MZ)({type:V,json:{origins:{"web-document":{write:{ignoreOrigin:!0}}}}})],ce.prototype,"activeLayer",void 0),(0,l.Cg)([(0,Z.w)("service","activeLayer",["layers"])],ce.prototype,"readActiveLayerFromService",null),(0,l.Cg)([(0,Z.w)(["web-document","portal-item"],"activeLayer",["wmtsInfo"])],ce.prototype,"readActiveLayerFromItemOrWebDoc",null),(0,l.Cg)([(0,ue.K)(["web-document","portal-item"],"activeLayer",{templateUrl:{type:String},tileInfo:{type:S.A},"wmtsInfo.layerIdentifier":{type:String},"wmtsInfo.tileMatrixSet":{type:String}})],ce.prototype,"writeActiveLayer",null),(0,l.Cg)([(0,h.MZ)({type:String,value:"",json:{write:!0}})],ce.prototype,"copyright",void 0),(0,l.Cg)([(0,h.MZ)({type:["show","hide"]})],ce.prototype,"listMode",void 0),(0,l.Cg)([(0,h.MZ)({json:{read:!0,write:!0}})],ce.prototype,"blendMode",void 0),(0,l.Cg)([(0,h.MZ)({json:{origins:{"web-document":{read:{source:["wmtsInfo.customParameters","wmtsInfo.url"]},write:{target:"wmtsInfo.customParameters"}},"portal-item":{read:{source:["wmtsInfo.customParameters","wmtsInfo.url"]},write:{target:"wmtsInfo.customParameters"}}}}})],ce.prototype,"customParameters",void 0),(0,l.Cg)([(0,Z.w)(["portal-item","web-document"],"customParameters")],ce.prototype,"readCustomParameters",null),(0,l.Cg)([(0,h.MZ)({json:{origins:{"web-document":{read:{source:"wmtsInfo.customLayerParameters"},write:{target:"wmtsInfo.customLayerParameters"}},"portal-item":{read:{source:"wmtsInfo.customLayerParameters"},write:{target:"wmtsInfo.customLayerParameters"}}}}})],ce.prototype,"customLayerParameters",void 0),(0,l.Cg)([(0,h.MZ)({type:y.A,json:{write:{ignoreOrigin:!0},origins:{"web-document":{read:{source:"fullExtent"}},"portal-item":{read:{source:"fullExtent"}}}}})],ce.prototype,"fullExtent",null),(0,l.Cg)([(0,h.MZ)({readOnly:!0})],ce.prototype,"fullExtents",null),(0,l.Cg)([(0,h.MZ)({type:["WebTiledLayer"]})],ce.prototype,"operationalLayerType",void 0),(0,l.Cg)([(0,h.MZ)()],ce.prototype,"resourceInfo",void 0),(0,l.Cg)([(0,h.MZ)()],ce.prototype,"serviceMode",void 0),(0,l.Cg)([(0,Z.w)(["portal-item","web-document"],"serviceMode",["templateUrl"])],ce.prototype,"readServiceMode",null),(0,l.Cg)([(0,h.MZ)({type:o.A.ofType(V)})],ce.prototype,"sublayers",void 0),(0,l.Cg)([(0,Z.w)("service","sublayers",["layers"])],ce.prototype,"readSublayersFromService",null),(0,l.Cg)([(0,h.MZ)({readOnly:!0})],ce.prototype,"supportedSpatialReferences",null),(0,l.Cg)([(0,h.MZ)({readOnly:!0})],ce.prototype,"tilemapCache",null),(0,l.Cg)([(0,h.MZ)({json:{read:{source:"title"}}})],ce.prototype,"title",null),(0,l.Cg)([(0,h.MZ)({json:{read:!1},readOnly:!0,value:"wmts"})],ce.prototype,"type",void 0),(0,l.Cg)([(0,h.MZ)({json:{origins:{service:{read:{source:"tileUrl"}},"web-document":{read:{source:"wmtsInfo.url"},write:{target:"wmtsInfo.url"}},"portal-item":{read:{source:"wmtsInfo.url"},write:{target:"wmtsInfo.url"}}}}})],ce.prototype,"url",null),(0,l.Cg)([(0,h.MZ)()],ce.prototype,"version",void 0),ce=ne=(0,l.Cg)([(0,h.$K)("esri.layers.WMTSLayer")],ce);const me=ce},38458(e,t,r){r.d(t,{m:()=>l});const i=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function l(e){return null!=e&&i.some(([t,r])=>e>=t&&e<=r)}},13043(e,t,r){function i(e,t){if(e&&t)for(let r of e.children)if(r.localName in t){let e=t[r.localName];if("function"==typeof e){let t=e(r);t&&i(r,t)}else i(r,e)}}function*l(e,t){for(let r of e.children)if(r.localName in t){let e=t[r.localName];"function"==typeof e?yield e(r):yield*l(r,e)}}r.d(t,{i:()=>l,p:()=>i})},65509(e,t,r){r.d(t,{A:()=>s});var i=r(49186),l=r(17676);class s{constructor(e,t=0,r=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=r,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(r)||(this.maxLOD=e.lods[e.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,t,r){let i=this.tileInfo?.lodAt(e);return!i||e<this.minLOD||e>this.maxLOD?"unavailable":i.cols&&i.rows?r>=i.cols[0]&&r<=i.cols[1]&&t>=i.rows[0]&&t<=i.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,r,s){await(0,l.NO)(s);let a=this.getAvailability(e,t,r);if("unavailable"===a)throw new i.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:r});return a}async fetchAvailabilityUpsample(e,t,r,i,s){await(0,l.NO)(s),i.level=e,i.row=t,i.col=r;let a=this.tileInfo;return a.updateTileInfo(i),this.fetchAvailability(e,t,r,s).catch(e=>{if((0,l.zf)(e))throw e;if(a.upsampleTile(i))return this.fetchAvailabilityUpsample(i.level,i.row,i.col,i,s);throw e})}}}}]);
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepthLastFrame as t}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepthLastFrame.glsl.js";import{mainLightDirection as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/lightingUniforms.js";import{ScreenSpaceRayMarching as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js";import{CameraSpace as i}from"../views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js";import{viewMatrix as a}from"../views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js";import{FloatBindUniform as o}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{FloatPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as c,If as l}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as u}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Texture2DBindUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{Texture2DPassUniform as f}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{GlobalIlluminationColorQuantization as p}from"../views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationColorQuantization.glsl.js";import{
|
|
2
|
+
import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepthLastFrame as t}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepthLastFrame.glsl.js";import{mainLightDirection as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/lightingUniforms.js";import{ScreenSpaceRayMarching as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js";import{CameraSpace as i}from"../views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js";import{viewMatrix as a}from"../views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js";import{FloatBindUniform as o}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{FloatPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as c,If as l}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as u}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Texture2DBindUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{Texture2DPassUniform as f}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{GlobalIlluminationColorQuantization as p}from"../views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationColorQuantization.glsl.js";import{normalMap as m,depthMap as h,resolutionScale as g}from"../views/3d/webgl-engine/effects/globalIllumination/globalIlluminationUniforms.js";import{floatBlendReductionFactor as _}from"../views/3d/webgl-engine/shaders/floatBlendScale.glsl.js";import{ToneMapping as v}from"../views/3d/webgl-engine/shaders/ToneMapping.glsl.js";import{ColorAttachment1 as y,SizedPixelFormat as b}from"../views/webgl/enums.js";import{NoParameters as x}from"../views/webgl/NoParameters.js";import{ShaderBuilder as S}from"../views/webgl/ShaderBuilder.js";class C extends x{constructor(){super(...arguments),this.projScale=1,this.resolutionScale=1,this.accumulatedFrames=0,this.temporalSampleFrame=0,this.glowBoost=0}}function w(x){let C=new S,w=C.fragment;C.include(e),C.include(i),w.include(t),w.include(p),w.include(v),C.include(r,x),w.uniforms.add(n,a,m,h,g,new f(`lastFrameGlobalIlluminationTexture`,(e,t)=>e.globalIllumination??t.globalIllumination?.getTexture()),new f(`lastFrameGlobalIlluminationWeightTexture`,(e,t)=>e.globalIlluminationWeights??t.globalIllumination?.getTexture(y)),new d(`lastFrameDepthTexture`,e=>e.reprojection.lastFrameDepth?.attachment),new u(`reprojectionProjectionMatrix`,e=>e.reprojection.lastFrameCamera.projectionMatrix),new u(`reprojectionViewMatrix`,e=>e.reprojection.viewMatrix),new s(`accumulatedFrames`,e=>e.accumulatedFrames),new s(`temporalSampleFrame`,e=>e.temporalSampleFrame));let{hasColor:T,hasEmission:E}=x;return T&&E&&(w.uniforms.add(new s(`emissionBoostFactor`,e=>2.5+e.glowBoost),new o(`inputScale`,e=>e.reprojection.lastFrameEmission?.getTexture()?.descriptor.internalFormat===b.RGBA8?_:1),new d(`lastFrameEmissionTexture`,e=>e.reprojection.lastFrameEmission?.getTexture())),w.code.add(c`bool hasHitReprojectionMismatch(vec3 hit, vec2 hitReprojectedCoordinate, float colorBlendWeight) {
|
|
3
3
|
if (colorBlendWeight != 1.0) {
|
|
4
4
|
return false;
|
|
5
5
|
}
|
|
@@ -19,15 +19,21 @@ hitReprojectedCoordinate
|
|
|
19
19
|
float relativeDepthMismatch = abs(storedLastFrameDepth - expectedLastFrameDepth) /
|
|
20
20
|
max(max(storedLastFrameDepth, expectedLastFrameDepth), 0.00001);
|
|
21
21
|
return relativeDepthMismatch > reprojectionMismatchThreshold;
|
|
22
|
-
}`)),
|
|
22
|
+
}`)),w.constants.add(`rayMarchMinReach`,`float`,.15),w.constants.add(`rayMarchMaxReach`,`float`,x.rayMarchMaxReach),w.constants.add(`rayMarchWorldReach`,`float`,25),w.constants.add(`rayMarchMaxSteps`,`float`,x.rayMarchMaxSteps),w.constants.add(`factorDaylightDirectional`,`float`,.8),w.constants.add(`highQualityIdleColorBlendStart`,`float`,.3),w.constants.add(`highQualityIdleColorBlendEnd`,`float`,.008),w.constants.add(`highQualityIdleColorBlendFrames`,`float`,150),w.constants.add(`highQualityIdleOcclusionBlendEnd`,`float`,.008),w.constants.add(`highQualityIdleOcclusionBlendExponent`,`float`,2),w.constants.add(`highQualityIdleOcclusionBlendFrames`,`float`,60),w.constants.add(`highQualityIdleOcclusionBlendStart`,`float`,.095),w.constants.add(`accumulationDitherScale`,`float`,.0039),w.constants.add(`lowQualityColorBlendWeight`,`float`,.0028),w.constants.add(`lowQualityColorDitherScale`,`float`,.25),w.constants.add(`lowQualityOcclusionBlendWeight`,`float`,.008),w.constants.add(`reprojectionMismatchThreshold`,`float`,.01),w.constants.add(`reprojectionMismatchColorScale`,`float`,.45),w.constants.add(`stableHistoryColorBlendWeight`,`float`,.008),w.constants.add(`strongHistoryOcclusionThreshold`,`float`,.02),w.constants.add(`weakHistoryOcclusionBlendWeight`,`float`,.1),w.constants.add(`weakHistoryOcclusionThreshold`,`float`,.5),w.constants.add(`storedColorBlendWeightScale`,`float`,6),w.code.add(c`float computeIdleColorBlendWeight(float accumulatedFrames) {
|
|
23
23
|
float idleColorBlendProgress = clamp(accumulatedFrames / highQualityIdleColorBlendFrames, 0.0, 1.0);
|
|
24
|
-
return mix(
|
|
24
|
+
return mix(
|
|
25
|
+
highQualityIdleColorBlendStart,
|
|
26
|
+
highQualityIdleColorBlendEnd,
|
|
27
|
+
pow(idleColorBlendProgress, 1.0/5.0)
|
|
25
28
|
);
|
|
26
29
|
}
|
|
27
30
|
float computeIdleOcclusionBlendWeight(float accumulatedFrames) {
|
|
28
31
|
float idleOcclusionBlendProgress = clamp(accumulatedFrames / highQualityIdleOcclusionBlendFrames, 0.0, 1.0);
|
|
29
|
-
return mix(
|
|
30
|
-
|
|
32
|
+
return mix(
|
|
33
|
+
highQualityIdleOcclusionBlendStart,
|
|
34
|
+
highQualityIdleOcclusionBlendEnd,
|
|
35
|
+
pow(idleOcclusionBlendProgress, highQualityIdleOcclusionBlendExponent)
|
|
36
|
+
);
|
|
31
37
|
}
|
|
32
38
|
vec3 sampleCosineHemisphere(vec2 u) {
|
|
33
39
|
float phi = 6.28318530718 * u.x;
|
|
@@ -60,7 +66,7 @@ blueNoiseDitherValue(pixel, frame, vec2(0.25881904, 0.9659258), 0.37),
|
|
|
60
66
|
blueNoiseDitherValue(pixel, frame, vec2(1.0, 0.0), 0.61)
|
|
61
67
|
);
|
|
62
68
|
return value * 2.0 - 1.0;
|
|
63
|
-
}`),
|
|
69
|
+
}`),C.outputs.add(`fragGlobalIllumination`,`vec4`,0),C.outputs.add(`fragWeight`,`vec2`,1),w.main.add(c`
|
|
64
70
|
float depth = depthFromTexture(depthMap, uv);
|
|
65
71
|
|
|
66
72
|
// Early out if depth is out of range, such as in the sky
|
|
@@ -73,7 +79,7 @@ return value * 2.0 - 1.0;
|
|
|
73
79
|
// Get the normal of current fragment
|
|
74
80
|
ivec2 iuv = ivec2(uv * vec2(textureSize(normalMap, 0)));
|
|
75
81
|
|
|
76
|
-
vec4 normalTexel= texelFetch(normalMap, iuv, 0);
|
|
82
|
+
vec4 normalTexel = texelFetch(normalMap, iuv, 0);
|
|
77
83
|
|
|
78
84
|
// 0.0 alpha excludes the surface as a receiver (e.g. water)
|
|
79
85
|
if (normalTexel.a == 0.0) {
|
|
@@ -162,7 +168,7 @@ return value * 2.0 - 1.0;
|
|
|
162
168
|
// 0.0 alpha excludes the surface as a receiver (e.g. water), but a valid ray hit still occludes as opaque
|
|
163
169
|
hitOpacity = storedHitOpacity == 0.0 ? 1.0 : storedHitOpacity;
|
|
164
170
|
|
|
165
|
-
${l(
|
|
171
|
+
${l(T&&E,c`
|
|
166
172
|
// Reproject the sampled hit to read emission.
|
|
167
173
|
vec2 hitReprojectedCoordinate = reprojectionCoordinate(hit);
|
|
168
174
|
bool rejectReprojectedHitEmission = hasHitReprojectionMismatch(hit, hitReprojectedCoordinate, colorBlendWeight);
|
|
@@ -191,7 +197,7 @@ return value * 2.0 - 1.0;
|
|
|
191
197
|
? receiverOpacity * randomDirectionSample.b * accumulationDitherScale
|
|
192
198
|
: 0.0;
|
|
193
199
|
|
|
194
|
-
${l(
|
|
200
|
+
${l(T,c`
|
|
195
201
|
// Accumulate emission
|
|
196
202
|
float colorDitherScale = isScaledGlobalIllumination ? lowQualityColorDitherScale : 1.0;
|
|
197
203
|
fragGlobalIllumination.rgb = mix(
|
|
@@ -217,4 +223,4 @@ return value * 2.0 - 1.0;
|
|
|
217
223
|
fragGlobalIllumination = quantizeGlobalIlluminationColor(fragGlobalIllumination);
|
|
218
224
|
|
|
219
225
|
fragWeight = vec2(occlusionBlendWeight, colorBlendWeight * storedColorBlendWeightScale);
|
|
220
|
-
`),
|
|
226
|
+
`),C}const T=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationPassParameters:C,build:w},Symbol.toStringTag,{value:`Module`}));export{C as G,T as a,w as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{ScreenSpacePass as t}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as n}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{GlobalIlluminationWeights as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/GlobalIlluminationWeights.glsl.js";import{CameraSpace as i}from"../views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js";import{BooleanBindUniform as a}from"../views/3d/webgl-engine/core/shaderModules/BooleanBindUniform.js";import{Float2DrawUniform as o}from"../views/3d/webgl-engine/core/shaderModules/Float2DrawUniform.js";import{
|
|
2
|
+
import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{ScreenSpacePass as t}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as n}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{GlobalIlluminationWeights as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/GlobalIlluminationWeights.glsl.js";import{CameraSpace as i}from"../views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js";import{BooleanBindUniform as a}from"../views/3d/webgl-engine/core/shaderModules/BooleanBindUniform.js";import{Float2DrawUniform as o}from"../views/3d/webgl-engine/core/shaderModules/Float2DrawUniform.js";import{glsl as s}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DDrawUniform as c}from"../views/3d/webgl-engine/core/shaderModules/Texture2DDrawUniform.js";import{GlobalIlluminationColorQuantization as l}from"../views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationColorQuantization.glsl.js";import{depthMap as u,normalMap as d,resolutionScale as f,projScale as p}from"../views/3d/webgl-engine/effects/globalIllumination/globalIlluminationUniforms.js";import{ditherNoise as m}from"../views/3d/webgl-engine/shaders/ditherNoise.glsl.js";import{FloatBlendScaleConfiguration as h}from"../views/3d/webgl-engine/shaders/floatBlendScale.glsl.js";import{NoParameters as g}from"../views/webgl/NoParameters.js";import{ShaderBuilder as _}from"../views/webgl/ShaderBuilder.js";class v extends g{constructor(){super(...arguments),this.blurSize=e()}}function y(){let e=new _,h=e.fragment;e.include(t),e.include(i),e.include(r),h.include(n),h.include(m,b),h.include(l),h.uniforms.add(u,d,f,p,new a(`hasEmission`,e=>e.reprojection.lastFrameEmission!=null),new c(`globalIlluminationTexture`,e=>e.texture),new c(`globalIlluminationWeightTexture`,e=>e.weightTexture),new o(`blurSize`,e=>e.blurSize));let g=.03;return h.code.add(s`
|
|
3
3
|
void accumulateBlurSample(
|
|
4
4
|
vec2 sampleUv,
|
|
5
5
|
float sampleOffset,
|
|
@@ -22,10 +22,10 @@ import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{Sc
|
|
|
22
22
|
float normalSimilarityWeight = globalIlluminationNormalSimilarityWeight(sampleNormal, centerNormal);
|
|
23
23
|
float depthNormalCorrection = globalIlluminationDepthNormalCorrection(sampleNormal);
|
|
24
24
|
vec3 emission = sampleGlobalIllumination.rgb;
|
|
25
|
-
float emissionSpatialWeightMultiplier = isScaledGlobalIllumination ? ${
|
|
25
|
+
float emissionSpatialWeightMultiplier = isScaledGlobalIllumination ? ${s.float(120)} : 1.0;
|
|
26
26
|
|
|
27
27
|
float emissionWeight = exp(
|
|
28
|
-
-sampleOffset * sampleOffset * ${
|
|
28
|
+
-sampleOffset * sampleOffset * ${s.float(.04081632653061224)} * ${s.float(.1)} * emissionSpatialWeightMultiplier
|
|
29
29
|
- depthDelta * depthDelta * depthSharpness * depthNormalCorrection
|
|
30
30
|
);
|
|
31
31
|
emissionWeight *= normalSimilarityWeight;
|
|
@@ -36,15 +36,15 @@ import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{Sc
|
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
float occlusionSpatialKernelScale = centerOcclusionBlendWeight > ${
|
|
40
|
-
? ${
|
|
41
|
-
: ${
|
|
39
|
+
float occlusionSpatialKernelScale = centerOcclusionBlendWeight > ${s.float(g)}
|
|
40
|
+
? ${s.float(.08)}
|
|
41
|
+
: ${s.float(1.5)};
|
|
42
42
|
float occlusionWeight = exp(-sampleOffset * sampleOffset * occlusionSpatialKernelScale - depthDelta * depthDelta * depthSharpness);
|
|
43
43
|
occlusionWeight *= normalSimilarityWeight;
|
|
44
44
|
occlusionWeightSum += occlusionWeight;
|
|
45
45
|
occlusionSum += occlusionWeight * sampleGlobalIllumination.a;
|
|
46
46
|
}
|
|
47
|
-
`),
|
|
47
|
+
`),h.main.add(s`
|
|
48
48
|
vec3 emissionSum = vec3(0.0);
|
|
49
49
|
float emissionWeightSum = 0.0;
|
|
50
50
|
|
|
@@ -52,7 +52,7 @@ import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{Sc
|
|
|
52
52
|
float centerOcclusionBlendWeight = texture(globalIlluminationWeightTexture, uv).r;
|
|
53
53
|
float centerColorBlendWeight = texture(globalIlluminationWeightTexture, uv).g;
|
|
54
54
|
bool isScaledGlobalIllumination = resolutionScale < 1.0;
|
|
55
|
-
bool shouldReuseCenterOcclusion = isScaledGlobalIllumination && centerOcclusionBlendWeight <= ${
|
|
55
|
+
bool shouldReuseCenterOcclusion = isScaledGlobalIllumination && centerOcclusionBlendWeight <= ${s.float(g)};
|
|
56
56
|
bool shouldSkipLowQualityBlur = !hasEmission && shouldReuseCenterOcclusion;
|
|
57
57
|
if (shouldSkipLowQualityBlur) {
|
|
58
58
|
fragColor = quantizeGlobalIlluminationColor(centerGlobalIllumination);
|
|
@@ -68,11 +68,11 @@ import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{Sc
|
|
|
68
68
|
float lowQualityBlurScale = hasEmission
|
|
69
69
|
? mix(
|
|
70
70
|
1.0,
|
|
71
|
-
${
|
|
72
|
-
smoothstep(0.0, ${
|
|
71
|
+
${s.float(2.5)},
|
|
72
|
+
smoothstep(0.0, ${s.float(.2)}, centerColorBlendWeight)
|
|
73
73
|
)
|
|
74
74
|
: 1.0;
|
|
75
|
-
for (int sampleOffset = -${
|
|
75
|
+
for (int sampleOffset = -${s.int(4)}; sampleOffset <= ${s.int(4)}; ++sampleOffset) {
|
|
76
76
|
float sampleOffsetFloat = float(sampleOffset);
|
|
77
77
|
vec2 sampleUv = uv + sampleOffsetFloat * blurSize * lowQualityBlurScale;
|
|
78
78
|
accumulateBlurSample(
|
|
@@ -94,9 +94,9 @@ import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{Sc
|
|
|
94
94
|
vec3 blurredEmission = (emissionSum / emissionWeightSum).rgb;
|
|
95
95
|
|
|
96
96
|
// Dither the blurred color to reduce quantization banding and wrong color accumulation.
|
|
97
|
-
float dither = ditherNoise(vec4(blurredEmission, occlusion)) - ${
|
|
98
|
-
blurredEmission += isScaledGlobalIllumination ? ${
|
|
97
|
+
float dither = ditherNoise(vec4(blurredEmission, occlusion)) - ${s.float(30517578125e-15)};
|
|
98
|
+
blurredEmission += isScaledGlobalIllumination ? ${s.float(.85)} * dither : dither;
|
|
99
99
|
|
|
100
100
|
// Quantize both filtered lighting and inverse occlusion before RGBA8 storage.
|
|
101
101
|
fragColor = quantizeGlobalIlluminationColor(vec4(blurredEmission, occlusion));
|
|
102
|
-
`),e}const
|
|
102
|
+
`),e}const b=new h;b.useFloatBlend=!1;const x=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationBlurDrawParameters:v,build:y},Symbol.toStringTag,{value:`Module`}));export{v as G,x as a,y as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as t}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{GlobalIlluminationWeights as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/GlobalIlluminationWeights.glsl.js";import{CameraSpace as r}from"../views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js";import{
|
|
2
|
+
import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as t}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{GlobalIlluminationWeights as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/GlobalIlluminationWeights.glsl.js";import{CameraSpace as r}from"../views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js";import{glsl as i}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DDrawUniform as a}from"../views/3d/webgl-engine/core/shaderModules/Texture2DDrawUniform.js";import{GlobalIlluminationColorQuantization as o}from"../views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationColorQuantization.glsl.js";import{depthMap as s,normalMap as c,projScale as l}from"../views/3d/webgl-engine/effects/globalIllumination/globalIlluminationUniforms.js";import{NoParameters as u}from"../views/webgl/NoParameters.js";import{ShaderBuilder as d}from"../views/webgl/ShaderBuilder.js";class f extends u{}function p(){let u=new d,f=u.fragment;return u.include(e),u.include(r),u.include(n),f.include(t),f.include(o),f.uniforms.add(s,c,l,new a(`tex`,e=>e.colorTexture),new a(`globalIlluminationWeightTexture`,e=>e.weightTexture)),f.code.add(i`
|
|
3
3
|
float computeDepthWeight(float sampleDepth, float centerDepth, float depthSharpness) {
|
|
4
4
|
float depthDelta = abs(sampleDepth - centerDepth);
|
|
5
5
|
return exp(-0.08 - depthDelta * depthDelta * depthSharpness);
|
|
@@ -14,7 +14,7 @@ import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/Scr
|
|
|
14
14
|
void sampleJointBilateralUpscale(vec2 sampleUv, out vec4 upscaledColor, out vec2 upscaledWeight) {
|
|
15
15
|
float centerDepth = linearDepthFromTexture(depthMap, sampleUv);
|
|
16
16
|
vec3 centerNormal = normalFromTexture(normalMap, sampleUv);
|
|
17
|
-
float depthSharpness = ${
|
|
17
|
+
float depthSharpness = ${i.float(100)} * globalIlluminationDepthSharpness(projScale, centerDepth, centerNormal);
|
|
18
18
|
|
|
19
19
|
vec2 lowResTextureSize = vec2(textureSize(tex, 0));
|
|
20
20
|
vec2 texelPosition = sampleUv * lowResTextureSize - 0.5;
|
|
@@ -78,5 +78,5 @@ import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/Scr
|
|
|
78
78
|
weight11 * jointBilateralWeight11
|
|
79
79
|
) / jointBilateralWeightSum;
|
|
80
80
|
}
|
|
81
|
-
`),
|
|
82
|
-
fragColor = quantizeGlobalIlluminationColor(fragColor);`),
|
|
81
|
+
`),u.outputs.add(`fragColor`,`vec4`,0),u.outputs.add(`fragWeight`,`vec2`,1),f.main.add(i`sampleJointBilateralUpscale(uv, fragColor, fragWeight);
|
|
82
|
+
fragColor = quantizeGlobalIlluminationColor(fragColor);`),u}const m=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationUpscaleDrawParameters:f,build:p},Symbol.toStringTag,{value:`Module`}));export{f as G,m as a,p as b};
|