@arcgis/core 5.2.0-next.42 → 5.2.0-next.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/20fefb9278501781de14.js +1 -0
  4. package/assets/esri/core/workers/chunks/{590e977f8eeb379b86c8.js → 4063ea53cba3dd897e53.js} +11 -17
  5. package/assets/esri/core/workers/chunks/{67468c50ecb1fbedda87.js → 57a1e2b716b74f0124f7.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{2e79fb1b8445b2091cdb.js → 60e8524d324fd14444d7.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{90ace5f9b4af1beea6bf.js → 7b6b8d0673976c6c26de.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{321dbc60f44819c2b4de.js → 81d55594cee124040565.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{82f4aa0533db009b11d8.js → 89682d9d4f606f82056b.js} +2 -2
  10. package/assets/esri/core/workers/chunks/9114a575b78a7ea18d0f.js +1 -0
  11. package/assets/esri/core/workers/chunks/{d66d58ed5d66520ab1bf.js → 9de18cea5780319302cb.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{f1d3cf674b6bea89e122.js → c0637d1c9337a6ba46b0.js} +1 -1
  13. package/assets/esri/core/workers/chunks/ce2320e7b9c4ca96ff27.js +1 -0
  14. package/assets/esri/core/workers/chunks/{934044f2ef6ce199b399.js → d45e30f15142b5861111.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{c50e4e8c6188e64e7d45.js → d7775ed1402946e414ef.js} +1 -1
  16. package/assets/esri/core/workers/chunks/e2f45990d8459d14cb90.js +1 -0
  17. package/chunks/Component.glsl.js +2 -2
  18. package/chunks/CutFillTargetDepth.glsl.js +1 -2
  19. package/chunks/Path.glsl.js +4 -4
  20. package/chunks/Terrain.glsl.js +2 -2
  21. package/config.js +1 -1
  22. package/kernel.js +1 -1
  23. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  24. package/package.json +2 -2
  25. package/support/revision.js +1 -1
  26. package/third-party-notices.txt +156 -0
  27. package/views/2d/engine/webgl/RenderingDevice.js +1 -1
  28. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
  29. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedLineShader.js +1 -1
  30. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
  31. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimationUniformInfo.js +1 -1
  32. package/views/2d/engine/webgl/shaderGraph/techniques/blend/BlendTechnique.js +1 -1
  33. package/views/2d/engine/webgl/shaderGraph/techniques/bloom/BloomTechnique.js +1 -1
  34. package/views/2d/engine/webgl/shaderGraph/techniques/blur/BlurTechnique.js +1 -1
  35. package/views/2d/engine/webgl/shaderGraph/techniques/opacity/OpacityTechnique.js +1 -1
  36. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterHighlightTechnique.js +1 -1
  37. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/BaseRasterProcessorTechnique.js +1 -1
  38. package/views/2d/engine/webgl/shaderGraph/techniques/utility/BitBlitTechnique.js +1 -1
  39. package/views/2d/engine/webgl/shaderGraph/techniques/utility/HighlightTechnique.js +1 -1
  40. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  41. package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
  42. package/views/2d/layers/features/sources/strategies/FeatureDrillDownTileLoadStrategy.js +1 -1
  43. package/views/2d/layers/features/sources/strategies/FeatureHybridTileLoadStrategy.js +1 -1
  44. package/views/2d/layers/features/sources/strategies/FeaturePagedTileLoadStrategy.js +1 -1
  45. package/views/3d/analysis/LineOfSight/LineOfSightAggregateManipulatedObject3D.js +1 -1
  46. package/views/3d/analysis/LineOfSight/LineOfSightConfiguration.js +1 -1
  47. package/views/3d/analysis/LineOfSight/LineOfSightDrawToolRenderer.js +1 -1
  48. package/views/3d/analysis/LineOfSight/LineOfSightManipulators.js +1 -1
  49. package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +1 -1
  50. package/views/3d/analysis/LineOfSight/LineOfSightTool2.js +1 -1
  51. package/views/3d/terrain/GeometryState.js +1 -1
  52. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  53. package/views/3d/terrain/PatchRenderData.js +1 -1
  54. package/views/3d/terrain/TerrainSurface.js +1 -1
  55. package/views/3d/terrain/Tile.js +1 -1
  56. package/views/3d/terrain/TileAgent.js +1 -1
  57. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +1 -1
  58. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js +4 -10
  59. package/views/3d/webgl-engine/effects/WeatherFader.js +1 -1
  60. package/views/3d/webgl-engine/lib/CutFillComputation.js +1 -1
  61. package/views/3d/webgl-engine/shaders/CutFillTargetDepth.glsl.js +1 -1
  62. package/views/GroundView.js +1 -1
  63. package/views/support/LayerViewManager.js +1 -1
  64. package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
  65. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  66. package/widgets/BatchAttributeForm.js +1 -1
  67. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  68. package/widgets/FeatureTable/Grid/EditorColumn.js +1 -1
  69. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  70. package/widgets/support/dateUtils.js +1 -1
  71. package/assets/esri/core/workers/chunks/18d874739ee9ffad7480.js +0 -1
  72. package/assets/esri/core/workers/chunks/551d0c5432f7a08dea77.js +0 -1
  73. package/assets/esri/core/workers/chunks/5923ebadd4f75be2c9cc.js +0 -1
  74. package/assets/esri/core/workers/chunks/c3fae4f4522604a9c17e.js +0 -1
  75. /package/assets/esri/core/workers/chunks/{82f4aa0533db009b11d8.js.LICENSE.txt → 89682d9d4f606f82056b.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../../../../core/has.js";import"../../../../core/Logger.js";import{TechniqueProgramCache as e}from"./shaderGraph/techniques/TechniqueProgramCache.js";class t{constructor(){this._currentPipelineStateNeedsUpdate=!1,this._programCache=new e}dispose(){this._programCache.destroy()}clearShaderCache(){this._programCache.destroy(),this._programCache=new e}setShader(e){return this._shaderState={shader:e.shader,uniforms:e.uniforms,textures:e.textures,defines:e.defines,optionalAttributes:e.optionalAttributes,useComputeBuffer:e.useComputeBuffer??!1},this._shaderState}setPipelineState(e){e!==this._currentPipelineState&&(this._currentPipelineState=e,this._currentPipelineStateNeedsUpdate=!0)}updatePipelineState(e){this._currentPipelineStateNeedsUpdate&&(this._currentPipelineStateNeedsUpdate=!1,this._updatePipelineState(e))}getPipelineState(){return this._currentPipelineState}setStencilRef(e,t){if(null==this._currentPipelineState)throw new Error("Pipeline state not defined. Call setPipelineState before calling submitDraw ");const{stencil:s}=this._currentPipelineState;if(s){const{test:r}=s;if(r){const{compare:s,mask:i}=r;if(null==t)throw new Error("InternalError: Stencil reference expected for target but not defined");e.setStencilFunctionSeparate(1032,s,t,i)}}}setPipelineStateNeedsUpdate(e){this._currentPipelineStateNeedsUpdate=e}getShaderState(){return this._shaderState}getProgramCache(){return this._programCache}submitDraw(e,t,s){let r=s?.stencilRef;if(!this._shaderState)return null;const{shader:i,uniforms:n,textures:a,defines:l,optionalAttributes:o}=this._shaderState,c=e.context,d=t.getAttributePrecisionPackFactors(),p=this._programCache.getProgram(i,d,n,a??{},l??{},o??{});if(p.setUniforms(n),p.setTextures(a),p.bind(c),this.updatePipelineState(c),null==r){const e=t.getStencilReference();null!=e&&(r=e)}return null!=r&&this.setStencilRef(c,r),t.draw(e,i.locationInfo),p.cleanupTemporaryTextures(),{vertexShader:p.vertexShader,fragmentShader:p.fragmentShader}}submitDrawMesh(e,t,s,r){this.submitDrawMeshUntyped(e,t,s,r)}submitDrawMeshUntyped(e,t,s,r){const i=r?.parts,n=r?.stencilRef,{precisionFactors:a,materialKey:l}=t,{shader:o,uniforms:c,textures:d,defines:p,optionalAttributes:h}=this.setShader(t),u=this._programCache.getProgram(o,a||{},c,d??{},p??{},h??{},l);if(u.setUniforms(c),u.setTextures(d),u.bind(e),this.updatePipelineState(e),this.setStencilRef(e,n),i)for(const S of i)s.bind(e,t.shader.locationInfo,S),s.draw(e);else for(let S=0;S<s.parts.length;S++)s.bind(e,t.shader.locationInfo,S),s.draw(e);s.unbind(e),u.cleanupTemporaryTextures()}_updatePipelineState(e){if(null==this._currentPipelineState)throw new Error("Pipeline state not defined. Call setPipelineState before calling submitDraw ");const{color:t,depth:s,stencil:r}=this._currentPipelineState;if(t){const{blendMode:s,write:r}=t;switch(e.setColorMask(...r),e.setBlendingEnabled("none"!==s),e.setBlendEquation(32774),s){case"composite":e.setBlendFunctionSeparate(1,771,1,771);break;case"additive":e.setBlendFunctionSeparate(1,1,1,1);break;case"custom":{const{blendParameters:s,blendEquation:r}=t,{dstAlpha:i,dstRGB:n,srcAlpha:a,srcRGB:l}=s;r&&e.setBlendEquation(r),e.setBlendFunctionSeparate(l,n,a,i);break}case"delete":e.setBlendEquation(32779),e.setBlendFunctionSeparate(1,771,1,771);break;case"none":e.setBlendingEnabled(!1)}}else e.setColorMask(!1,!1,!1,!1);if(s){const{test:t,write:r}=s;r?(e.setDepthWriteEnabled(!0),e.setDepthRange(r.zNear,r.zFar)):e.setDepthWriteEnabled(!1),t?(e.setDepthTestEnabled(!0),e.setDepthFunction(t)):e.setDepthTestEnabled(!1)}else e.setDepthTestEnabled(!1),e.setDepthWriteEnabled(!1);if(r){const{test:t,write:s}=r;if(t){const{op:s}=t;e.setStencilTestEnabled(!0),e.setStencilOpSeparate(1032,s.fail,s.zFail,s.zPass)}else e.setStencilTestEnabled(!1);if(s){const{mask:t}=s;e.setStencilWriteMask(t)}else e.setStencilWriteMask(0)}else e.setStencilTestEnabled(!1),e.setStencilWriteMask(0)}}export{t as RenderingDevice};
2
+ import"../../../../core/has.js";import"../../../../core/Logger.js";import{TechniqueProgramCache as e}from"./shaderGraph/techniques/TechniqueProgramCache.js";class t{constructor(){this._currentPipelineStateNeedsUpdate=!1,this._programCache=new e}dispose(){this._programCache.destroy()}clearShaderCache(){this._programCache.destroy(),this._programCache=new e}setShader(e){return this._shaderState={shader:e.shader,uniforms:e.uniforms,textures:e.textures,defines:e.defines,optionalAttributes:e.optionalAttributes,useComputeBuffer:e.useComputeBuffer??!1},this._shaderState}setPipelineState(e){e!==this._currentPipelineState&&(this._currentPipelineState=e,this._currentPipelineStateNeedsUpdate=!0)}updatePipelineState(e){this._currentPipelineStateNeedsUpdate&&(this._currentPipelineStateNeedsUpdate=!1,this._updatePipelineState(e))}getPipelineState(){return this._currentPipelineState}setStencilRef(e,t){if(null==this._currentPipelineState)throw new Error("Pipeline state not defined. Call setPipelineState before calling submitDraw ");const{stencil:s}=this._currentPipelineState;if(s){const{test:r}=s;if(r){const{compare:s,mask:i}=r;if(null==t)throw new Error("InternalError: Stencil reference expected for target but not defined");e.setStencilFunctionSeparate(1032,s,t,i)}}}setPipelineStateNeedsUpdate(e){this._currentPipelineStateNeedsUpdate=e}getShaderState(){return this._shaderState}getProgramCache(){return this._programCache}submitDraw(e,t,s){let r=s?.stencilRef;if(!this._shaderState)return null;const{shader:i,uniforms:n,textures:a,defines:l,optionalAttributes:o}=this._shaderState,c=e.context,d=t.getAttributePrecisionPackFactors(),p=this._programCache.getProgram(i,d,n,a??{},l??{},o??{});if(p.setUniforms(n),p.setTextures(a),p.bind(c),this.updatePipelineState(c),null==r){const e=t.getStencilReference();null!=e&&(r=e)}return null!=r&&this.setStencilRef(c,r),t.draw(e,i.locationInfo),p.cleanupTemporaryTextures(),{vertexShader:p.vertexShader,fragmentShader:p.fragmentShader}}submitDrawMesh(e,t,s,r){this.submitDrawMeshUntyped(e,t,s,r)}submitDrawMeshUntyped(e,t,s,r){const i=r?.parts,n=r?.stencilRef,{precisionFactors:a,materialKey:l}=t,{shader:o,uniforms:c,textures:d,defines:p,optionalAttributes:h}=this.setShader(t),u=this._programCache.getProgram(o,a||{},c,d??{},p??{},h??{},l);if(u.setUniforms(c),u.setTextures(d),u.bind(e),this.updatePipelineState(e),this.setStencilRef(e,n),i)for(const S of i)s.bind(e,t.shader.locationInfo,S),s.draw(e);else for(let S=0;S<s.parts.length;S++)s.bind(e,t.shader.locationInfo,S),s.draw(e);s.unbind(e),u.cleanupTemporaryTextures()}_updatePipelineState(e){if(null==this._currentPipelineState)throw new Error("Pipeline state not defined. Call setPipelineState before calling submitDraw ");const{color:t,depth:s,stencil:r}=this._currentPipelineState;if(t){const{blendMode:s,write:r}=t;switch(e.setColorMask(...r),e.setBlendingEnabled("none"!==s),e.setBlendEquation(32774),s){case"composite":e.setBlendFunctionSeparate(1,771,1,771);break;case"additive":e.setBlendFunctionSeparate(1,1,1,1);break;case"custom":{const{blendParameters:s,blendEquation:r}=t,{dstAlpha:i,dstRGB:n,srcAlpha:a,srcRGB:l}=s;e.setBlendEquation(r),e.setBlendFunctionSeparate(l,n,a,i);break}case"delete":e.setBlendEquation(32779),e.setBlendFunctionSeparate(1,771,1,771);break;case"none":e.setBlendingEnabled(!1)}}else e.setColorMask(!1,!1,!1,!1);if(s){const{test:t,write:r}=s;r?(e.setDepthWriteEnabled(!0),e.setDepthRange(r.zNear,r.zFar)):e.setDepthWriteEnabled(!1),t?(e.setDepthTestEnabled(!0),e.setDepthFunction(t)):e.setDepthTestEnabled(!1)}else e.setDepthTestEnabled(!1),e.setDepthWriteEnabled(!1);if(r){const{test:t,write:s}=r;if(t){const{op:s}=t;e.setStencilTestEnabled(!0),e.setStencilOpSeparate(1032,s.fail,s.zFail,s.zPass)}else e.setStencilTestEnabled(!1);if(s){const{mask:t}=s;e.setStencilWriteMask(t)}else e.setStencilWriteMask(0)}else e.setStencilTestEnabled(!1),e.setStencilWriteMask(0)}}export{t as RenderingDevice};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as i}from"tslib";import{animationDebugFlags as t}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{generateVirtualMachineSource as e}from"../../../animations/instructions.js";import{location as o,uniform as a,texture as r,option as s}from"../../GraphShaderModule.js";import{Vec2 as l,Vec4 as n,Float as m,Sampler2D as p,step as u,negate as d,cond as c,equal as y,Mat2 as f,cos as v,sin as b,Mat3 as h,Vec3 as S,lessThanEqual as w,ifElse as g,texture2D as x,clamp as V,abs as z,block as T}from"../../graph/glsl.js";import{AnimationUniformInfo as P}from"./AnimationUniformInfo.js";import{MarkerConstants as j}from"../markers/markerConstants.js";import{FeatureVertexInput as _,AFeatureShader as O,FeatureFragmentInput as I}from"../shaders/AFeatureShader.js";import{softEdgeRatio as C}from"../shaders/constants.js";import{LocalTileOffset as M}from"../shaders/LocalTileOffset.js";import{MosaicInfo as D}from"../shaders/MosaicInfo.js";import{getBit as A,rgba2float as F}from"../shaders/utils.js";import{VisualVariableColor as L}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as R}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as k}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as U}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as E}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as B}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as G}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableSize as N,getVisualVariableAngle as q}from"../shaders/vvUtils.js";class W extends _{}i([o(3,l)],W.prototype,"offset",void 0),i([o(4,n)],W.prototype,"sizing",void 0),i([o(5,n)],W.prototype,"value1Position2Value2",void 0),i([o(6,n)],W.prototype,"animationPointerAndBaseSizeAndReferenceSize",void 0),i([o(7,l)],W.prototype,"zoomRange",void 0),i([o(8,m)],W.prototype,"lineLength",void 0);class H extends I{}class J extends O{_vertexPreamble(i,t,e){const{id:o,offset:a,animationPointerAndBaseSizeAndReferenceSize:r,sizing:s}=i,l=r.xy,n=r.z,p=r.w,h=s.xy,S=this._getEvalParams(i,h,e);let w,g;if(i.value1Position2Value2){let t;t=this.hittestRequest?new m(0):K(l,6,S).a;const e=i.pos,o=i.value1Position2Value2.yz,a=i.value1Position2Value2.x,r=i.value1Position2Value2.w,s=t.subtract(a).divide(r.subtract(a));g=e.add(o.subtract(e).multiply(s)),w=u(new m(1),s).add(u(new m(0),d(s)))}else g=i.pos,w=new m(0);const x=s.z,V=A(i.bitset,j.bitset.isStroke),z=s.w,T=A(i.bitset,j.bitset.scaleSymbolsProportionally),P=K(l,0,S),_=c([y(A(i.bitset,j.bitset.isMapAligned),new m(1)),this.view.rotation.divide(180).multiply(Math.PI)],[!0,new m(0)]),O=new f(v(_),b(_.multiply(-1)),b(_),v(_)).multiply(P.xy),I=P.z.subtract(_).subtract(t),C=P.w,M=A(i.bitset,j.bitset.isSDF),D=N(this,o,new m(p)).divide(new m(p));return{baseSize:n,animationPointer:l,strokeWidth:x,isOutline:V,unscaledDistanceToPx:z,scaleSymbolsProportionally:T,isSDF:M,position:this._getScreenPosition({id:o,pos:g,offset:a,referenceSize:p,translation:O,rotation:I,scale:C,vvScale:D}),evalParams:S,vvScale:D,scale:C,clip:w}}_getScreenPosition(i){const{pos:t,translation:e,rotation:o,scale:a,offset:r,id:s,vvScale:l}=i,n=q(this,s).multiply(Math.PI/180),p=e.x.multiply(4/3),u=e.y.multiply(-1).multiply(4/3),c=b(n),y=v(n),f=y.multiply(p).add(d(c).multiply(u)),w=c.multiply(p).add(y.multiply(u)),g=b(o.subtract(n)),x=v(o.subtract(n)),V=new m(0),z=new m(1),{pixelRatio:T}=this.animationInfo,P=new h(z,V,V,V,z,V,f.multiply(T),w.multiply(T),z),j=new h(x,g.multiply(-1),V,g,x,V,0,0,z),_=a.multiply(l).multiply(T).multiply(4/3),O=j.multiply(_),I=this.animationInfo.toScreen.multiply(new S(t,1)),C=P.multiply(I).xy,M=O.multiply(new S(r,0)).xy;return C.add(M)}_clip(i,e){let o=super.clip(i,e);const a=w(this._getLocalTimeOrigin(i),new m(0));return t.forceGlobalTimeOrigin||(o=o.add(c([a,()=>new m(2)],[!0,()=>new m(0)]))),o}_getLocalTimeOrigin(i){return this.getLocalTimeOrigin(i)}_toNdc(i){return this.animationInfo.toNdc.multiply(new S(i,1)).xy}_getEvalParams(i,t,e){const{globalTime:o,animationTextureSize:a}=this.animationInfo;return{globalTime:o,localTimeOrigin:this._getLocalTimeOrigin(i.id),animationTextureSize:a,animationTexture:this.animationTexture,pixelDimensions:t,lineLength:e}}_getColor(i,t){return g(y(t.isSDF,new m(1)),this._getSDFColor(i,t),this._getSpriteColor(i,t))}_getSpriteColor(i,t){return x(this.mosaicTexture,i).multiply(t.color)}_getSDFColor(i,t){const e=x(this.mosaicTexture,i),o=new m(.5).subtract(F(e)).multiply(t.distanceToPx).multiply(C),a=V(new m(.5).subtract(o),new m(0),new m(1)),r=t.color.multiply(a),s=t.outlineSize.multiply(.5),l=z(o).subtract(s),n=V(new m(.5).subtract(l),new m(0),new m(1)),p=t.outlineColor.multiply(n);return new m(1).subtract(p.a).multiply(r).add(p)}}function K(i,t,o){const a=i.add(new l(t,0)),r=x(o.animationTexture,a.add(.5).divide(o.animationTextureSize)).xy;return i=i.add(r),T({animationPointer:i,...o},n,null,i=>{const{out:t}=i;if(!t)throw new Error("out is null");return e({...i,out:t})})}i([a(D)],J.prototype,"mosaicInfo",void 0),i([a(P)],J.prototype,"animationInfo",void 0),i([a(M)],J.prototype,"localTileOffset",void 0),i([r(p)],J.prototype,"mosaicTexture",void 0),i([s(L)],J.prototype,"visualVariableColor",void 0),i([s(R)],J.prototype,"visualVariableOpacity",void 0),i([s(U)],J.prototype,"visualVariableSizeMinMaxValue",void 0),i([s(E)],J.prototype,"visualVariableSizeScaleStops",void 0),i([s(B)],J.prototype,"visualVariableSizeStops",void 0),i([s(G)],J.prototype,"visualVariableSizeUnitValue",void 0),i([s(k)],J.prototype,"visualVariableRotation",void 0),i([r(p)],J.prototype,"animationTexture",void 0);export{H as AAnimatedFragmentInput,J as AAnimatedShader,W as AAnimatedVertexInput,K as getValue};
2
+ import{__decorate as i}from"tslib";import{animationDebugFlags as t}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{generateVirtualMachineSource as e}from"../../../animations/instructions.js";import{location as o,uniform as a,texture as s,option as r}from"../../GraphShaderModule.js";import{Vec2 as l,Vec4 as n,Float as m,Sampler2D as p,step as u,negate as d,cond as c,equal as y,Mat2 as f,cos as v,sin as b,Mat3 as h,Vec3 as S,lessThanEqual as w,ifElse as g,texture2D as x,clamp as V,abs as z,block as T}from"../../graph/glsl.js";import{AnimationUniformInfo as P}from"./AnimationUniformInfo.js";import{MarkerConstants as j}from"../markers/markerConstants.js";import{FeatureVertexInput as _,AFeatureShader as I,FeatureFragmentInput as O}from"../shaders/AFeatureShader.js";import{softEdgeRatio as C}from"../shaders/constants.js";import{LocalTileOffset as M}from"../shaders/LocalTileOffset.js";import{MosaicInfo as A}from"../shaders/MosaicInfo.js";import{getBit as D,rgba2float as F}from"../shaders/utils.js";import{VisualVariableColor as L}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as R}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as k}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as U}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as E}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as B}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as G}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableSize as N,getVisualVariableAngle as q}from"../shaders/vvUtils.js";class W extends _{}i([o(3,l)],W.prototype,"offset",void 0),i([o(4,n)],W.prototype,"sizing",void 0),i([o(5,n)],W.prototype,"value1Position2Value2",void 0),i([o(6,n)],W.prototype,"animationPointerAndBaseSizeAndReferenceSize",void 0),i([o(7,l)],W.prototype,"zoomRange",void 0),i([o(8,m)],W.prototype,"lineLength",void 0);class H extends O{}class J extends I{_vertexPreamble(i,t,e){const{id:o,offset:a,animationPointerAndBaseSizeAndReferenceSize:s,sizing:r}=i,l=s.xy,n=s.z,p=s.w,h=r.xy,S=this._getEvalParams(i,h,e);let w,g;if(i.value1Position2Value2){let t;t=this.hittestRequest?new m(0):K(l,6,S).a.multiply(this.animationInfo.scaleAdjustment);const e=i.pos,o=i.value1Position2Value2.yz,a=i.value1Position2Value2.x,s=i.value1Position2Value2.w,r=t.subtract(a).divide(s.subtract(a));g=e.add(o.subtract(e).multiply(r)),w=u(new m(1),r).add(u(new m(0),d(r)))}else g=i.pos,w=new m(0);const x=r.z,V=D(i.bitset,j.bitset.isStroke),z=r.w,T=D(i.bitset,j.bitset.scaleSymbolsProportionally),P=K(l,0,S),_=c([y(D(i.bitset,j.bitset.isMapAligned),new m(1)),this.view.rotation.divide(180).multiply(Math.PI)],[!0,new m(0)]),I=new f(v(_),b(_.multiply(-1)),b(_),v(_)).multiply(P.xy),O=P.z.subtract(_).subtract(t),C=P.w,M=D(i.bitset,j.bitset.isSDF),A=N(this,o,new m(p)).divide(new m(p));return{baseSize:n,animationPointer:l,strokeWidth:x,isOutline:V,unscaledDistanceToPx:z,scaleSymbolsProportionally:T,isSDF:M,position:this._getScreenPosition({id:o,pos:g,offset:a,referenceSize:p,translation:I,rotation:O,scale:C,vvScale:A}),evalParams:S,vvScale:A,scale:C,clip:w}}_getScreenPosition(i){const{pos:t,translation:e,rotation:o,scale:a,offset:s,id:r,vvScale:l}=i,n=q(this,r).multiply(Math.PI/180),p=e.x.multiply(4/3),u=e.y.multiply(-1).multiply(4/3),c=b(n),y=v(n),f=y.multiply(p).add(d(c).multiply(u)),w=c.multiply(p).add(y.multiply(u)),g=b(o.subtract(n)),x=v(o.subtract(n)),V=new m(0),z=new m(1),{pixelRatio:T}=this.animationInfo,P=new h(z,V,V,V,z,V,f.multiply(T),w.multiply(T),z),j=new h(x,g.multiply(-1),V,g,x,V,0,0,z),_=a.multiply(l).multiply(T).multiply(4/3),I=j.multiply(_),O=this.animationInfo.toScreen.multiply(new S(t,1)),C=P.multiply(O).xy,M=I.multiply(new S(s,0)).xy;return C.add(M)}_clip(i,e){let o=super.clip(i,e);const a=w(this._getLocalTimeOrigin(i),new m(0));return t.forceGlobalTimeOrigin||(o=o.add(c([a,()=>new m(2)],[!0,()=>new m(0)]))),o}_getLocalTimeOrigin(i){return this.getLocalTimeOrigin(i)}_toNdc(i){return this.animationInfo.toNdc.multiply(new S(i,1)).xy}_getEvalParams(i,t,e){const{globalTime:o,animationTextureSize:a}=this.animationInfo;return{globalTime:o,localTimeOrigin:this._getLocalTimeOrigin(i.id),animationTextureSize:a,animationTexture:this.animationTexture,pixelDimensions:t,lineLength:e}}_getColor(i,t){return g(y(t.isSDF,new m(1)),this._getSDFColor(i,t),this._getSpriteColor(i,t))}_getSpriteColor(i,t){return x(this.mosaicTexture,i).multiply(t.color)}_getSDFColor(i,t){const e=x(this.mosaicTexture,i),o=new m(.5).subtract(F(e)).multiply(t.distanceToPx).multiply(C),a=V(new m(.5).subtract(o),new m(0),new m(1)),s=t.color.multiply(a),r=t.outlineSize.multiply(.5),l=z(o).subtract(r),n=V(new m(.5).subtract(l),new m(0),new m(1)),p=t.outlineColor.multiply(n);return new m(1).subtract(p.a).multiply(s).add(p)}}function K(i,t,o){const a=i.add(new l(t,0)),s=x(o.animationTexture,a.add(.5).divide(o.animationTextureSize)).xy;return i=i.add(s),T({animationPointer:i,...o},n,null,i=>{const{out:t}=i;if(!t)throw new Error("out is null");return e({...i,out:t})})}i([a(A)],J.prototype,"mosaicInfo",void 0),i([a(P)],J.prototype,"animationInfo",void 0),i([a(M)],J.prototype,"localTileOffset",void 0),i([s(p)],J.prototype,"mosaicTexture",void 0),i([r(L)],J.prototype,"visualVariableColor",void 0),i([r(R)],J.prototype,"visualVariableOpacity",void 0),i([r(U)],J.prototype,"visualVariableSizeMinMaxValue",void 0),i([r(E)],J.prototype,"visualVariableSizeScaleStops",void 0),i([r(B)],J.prototype,"visualVariableSizeStops",void 0),i([r(G)],J.prototype,"visualVariableSizeUnitValue",void 0),i([r(k)],J.prototype,"visualVariableRotation",void 0),i([s(p)],J.prototype,"animationTexture",void 0);export{H as AAnimatedFragmentInput,J as AAnimatedShader,W as AAnimatedVertexInput,K as getValue};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t,__param as i}from"tslib";import{location as e,uniform as s,input as o}from"../../GraphShaderModule.js";import{Float as l,Vec2 as r,dot as a,max as n,Vec4 as d,mix as m,length as p,clamp as u,step as c,min as h,ifElse as y,greaterThan as f}from"../../graph/glsl.js";import{PolyHittestVertexInput as v,PolyVertexInput as b,AAnimatedPolyShader as g,PolyFragmentInput as x}from"./AAnimatedPolyShader.js";import{getValue as S}from"./AAnimatedShader.js";import{noHit as w,trueHit as P}from"../shaders/constants.js";import{isRectHittest as j,distPointSegment as z,hittestScreenRect as A}from"../shaders/hittestUtils.js";import{AntialiasingControls as D,getLineAntialiasing as R,getLineThinFactor as C}from"../shaders/LineShader.js";class F extends b{}t([e(10,l)],F.prototype,"accumulatedDistance",void 0),t([e(11,r)],F.prototype,"normal",void 0),t([e(12,r)],F.prototype,"segmentDirection",void 0);class T extends x{}class W extends g{constructor(){super(...arguments),this.type="AnimatedLineShader"}vertex(t,i){const{animationPointerAndBaseSizeAndReferenceSize:e}=t,s=e.xy,{distanceToPx:o,ndc:p,z:u,color:c,isOutline:h,strokeWidth:y,isSDF:f,baseSize:v,scale:b,scaleSymbolsProportionally:g,evalParams:x}=this._vertexPoly(t),w=t.sizing.xy,P=w.x.multiply(v).divide(w.y),j=S(s,6,x).a,z=t.accumulatedDistance.subtract(j),{normal:A}=t,D=t.normal.y,R=z.divide(this.view.displayZoomFactor).add(a(t.segmentDirection,t.offset)).divide(P),C=D.add(1).divide(2),F=new r(R,C),T=t.tlbr.divide(this.mosaicInfo.size.xyxy),W=v.divide(2),q=new l(.5).multiply(this.antialiasingControls.antialiasing),O=n(W.add(q),new l(.45)).add(new l(.1).multiply(q));return{glPosition:new d(p,u,1),tlbr:T,uv:F,color:c.multiply(new l(1).subtract(h)),outlineColor:c.multiply(h),distanceToPx:o,strokeWidth:y.multiply(m(new l(1),b,g)),isOutline:h,isSDF:f,halfWidth:O,normal:A,...this.maybeRunHittest(t,i,O)}}fragment(t){const i=this._fragmentPoly(t),e=R(t,this.antialiasingControls.blur),{halfWidth:s,normal:o}=t,r=C(s),a=p(o).multiply(s),n=u(r.multiply(s.subtract(a)).divide(r.subtract(new l(1))),new l(0),new l(1));return this.getFragmentOutput(i.multiply(n).multiply(e),t)}hittest(t,i,e){const{pos0:s,pos1:o,pos2:r}=this.computeHittestTriangle(t,i,null),a=j(this.hittestRequest),{distance:n,smallSymbolDistance:d,smallSymbolSizeThreshold:m,tlbr:p}=this.hittestRequest,u=c(e,m.multiply(.5)).multiply(n.subtract(d)),v=this.hittestRequest.position,b=h(z(v,s,o),z(v,s,r)).subtract(e).add(u);return y(a,A(s,o,r,p),y(f(b,n),new l(w),new l(P)))}}t([s(D)],W.prototype,"antialiasingControls",void 0),t([i(0,o(F)),i(1,o(v))],W.prototype,"vertex",null),t([i(0,o(T))],W.prototype,"fragment",null);export{W as AnimatedLineShader};
2
+ import{__decorate as t,__param as i}from"tslib";import{location as e,uniform as s,input as o}from"../../GraphShaderModule.js";import{Float as l,Vec2 as n,dot as a,max as r,Vec4 as d,mix as m,length as p,clamp as u,step as c,min as h,ifElse as y,greaterThan as f}from"../../graph/glsl.js";import{PolyHittestVertexInput as v,PolyVertexInput as b,AAnimatedPolyShader as g,PolyFragmentInput as x}from"./AAnimatedPolyShader.js";import{getValue as S}from"./AAnimatedShader.js";import{noHit as w,trueHit as P}from"../shaders/constants.js";import{isRectHittest as j,distPointSegment as A,hittestScreenRect as z}from"../shaders/hittestUtils.js";import{AntialiasingControls as D,getLineAntialiasing as R,getLineThinFactor as C}from"../shaders/LineShader.js";class F extends b{}t([e(10,l)],F.prototype,"accumulatedDistance",void 0),t([e(11,n)],F.prototype,"normal",void 0),t([e(12,n)],F.prototype,"segmentDirection",void 0);class T extends x{}class W extends g{constructor(){super(...arguments),this.type="AnimatedLineShader"}vertex(t,i){const{animationPointerAndBaseSizeAndReferenceSize:e}=t,s=e.xy,{distanceToPx:o,ndc:p,z:u,color:c,isOutline:h,strokeWidth:y,isSDF:f,baseSize:v,scale:b,scaleSymbolsProportionally:g,evalParams:x}=this._vertexPoly(t),w=t.sizing.xy,P=w.x.multiply(v).divide(w.y),j=S(s,6,x).a.multiply(this.animationInfo.scaleAdjustment),A=t.accumulatedDistance.subtract(j),{normal:z}=t,D=t.normal.y,R=A.divide(this.view.displayZoomFactor).add(a(t.segmentDirection,t.offset)).divide(P),C=D.add(1).divide(2),F=new n(R,C),T=t.tlbr.divide(this.mosaicInfo.size.xyxy),W=v.divide(2),q=new l(.5).multiply(this.antialiasingControls.antialiasing),O=r(W.add(q),new l(.45)).add(new l(.1).multiply(q));return{glPosition:new d(p,u,1),tlbr:T,uv:F,color:c.multiply(new l(1).subtract(h)),outlineColor:c.multiply(h),distanceToPx:o,strokeWidth:y.multiply(m(new l(1),b,g)),isOutline:h,isSDF:f,halfWidth:O,normal:z,...this.maybeRunHittest(t,i,O)}}fragment(t){const i=this._fragmentPoly(t),e=R(t,this.antialiasingControls.blur),{halfWidth:s,normal:o}=t,n=C(s),a=p(o).multiply(s),r=u(n.multiply(s.subtract(a)).divide(n.subtract(new l(1))),new l(0),new l(1));return this.getFragmentOutput(i.multiply(r).multiply(e),t)}hittest(t,i,e){const{pos0:s,pos1:o,pos2:n}=this.computeHittestTriangle(t,i,null),a=j(this.hittestRequest),{distance:r,smallSymbolDistance:d,smallSymbolSizeThreshold:m,tlbr:p}=this.hittestRequest,u=c(e,m.multiply(.5)).multiply(r.subtract(d)),v=this.hittestRequest.position,b=h(A(v,s,o),A(v,s,n)).subtract(e).add(u);return y(a,z(s,o,n,p),y(f(b,r),new l(w),new l(P)))}}t([s(D)],W.prototype,"antialiasingControls",void 0),t([i(0,o(F)),i(1,o(v))],W.prototype,"vertex",null),t([i(0,o(T))],W.prototype,"fragment",null);export{W as AnimatedLineShader};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{invert as e,multiply as t}from"../../../../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{animationDebugFlags as a}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{FeatureTechnique as r}from"../FeatureTechnique.js";import{isHittest as o,getSelectionDefines as n,getFeatureTextures as s,getLocalTileOffset as m,getFeatureUniforms as u,resolveDynamicUniforms as l,getFeaturePipelineState as c}from"../featureTechniqueUtils.js";import{getAntialiasingControls as g}from"../line/utils.js";class f extends r{render(r,f){const{context:p,painter:x,pixelRatio:d}=r,{target:b}=f,{freezeGlobalTime:h}=a,T=0,D=x.textureManager.animationStore.getTexture(p,T),y=[2/r.state.size[0],0,0,0,-2/r.state.size[1],0,-1,1,1],R=Array.from(e(i(),y)),j=Array.from(t(i(),R,b.transforms.displayViewScreenMat3)),z=f.instance.getInput(),M=x.textureManager.getMosaicInfo(r,f.textureKey,!1),{optionalAttributes:S}=z,A=S.zoomRange,I=S.value1Position2Value2,q="accumulatedDistance"in S&&!!S.accumulatedDistance,w="segmentDirection"in S&&!!S.segmentDirection,P="normal"in S&&!!S.normal;x.setShader({shader:this.shaders.geometry,uniforms:{...l(r,f.target,z.uniforms),...u(r,f.target),antialiasingControls:g(d),mosaicInfo:M,animationInfo:{globalTime:r.animationsEnabled?!1===h?r.time/1e3:h:0,animationTextureSize:[D.descriptor.width,D.descriptor.height],toScreen:j,toNdc:y,mapRotation:r.state.rotation,pixelRatio:r.state.pixelRatio},localTileOffset:m(f.target)},textures:{...s(r),mosaicTexture:x.textureManager.getMosaicTexture(r,f.textureKey,!1),animationTexture:{unit:6,texture:D}},defines:{...n(r)},optionalAttributes:{zoomRange:A,value1Position2Value2:I,accumulatedDistance:q,segmentDirection:w,normal:P},useComputeBuffer:o(r)}),x.setPipelineState({...c(r)}),x.submitDraw(r,f),!1===h&&r.animationsEnabled&&b.requestRender()}}export{f as AnimatedTechnique};
2
+ import{invert as e,multiply as t}from"../../../../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as a}from"../../../../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{animationDebugFlags as i}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{FeatureTechnique as r}from"../FeatureTechnique.js";import{isHittest as o,getSelectionDefines as n,getFeatureTextures as s,getLocalTileOffset as m,getFeatureUniforms as l,resolveDynamicUniforms as u,getFeaturePipelineState as c}from"../featureTechniqueUtils.js";import{getAntialiasingControls as g}from"../line/utils.js";class f extends r{render(r,f){const{context:p,painter:x,pixelRatio:d}=r,{target:b}=f,{freezeGlobalTime:h}=i,T=0,y=x.textureManager.animationStore.getTexture(p,T),D=[2/r.state.size[0],0,0,0,-2/r.state.size[1],0,-1,1,1],j=Array.from(e(a(),D)),R=Array.from(t(a(),j,b.transforms.displayViewScreenMat3)),z=f.instance.getInput(),M=x.textureManager.getMosaicInfo(r,f.textureKey,!1),{optionalAttributes:S}=z,A=S.zoomRange,v=S.value1Position2Value2,I="accumulatedDistance"in S&&!!S.accumulatedDistance,q="segmentDirection"in S&&!!S.segmentDirection,w="normal"in S&&!!S.normal,P=2**(f.target.key.level-r.displayLevel);x.setShader({shader:this.shaders.geometry,uniforms:{...u(r,f.target,z.uniforms),...l(r,f.target),antialiasingControls:g(d),mosaicInfo:M,animationInfo:{globalTime:r.animationsEnabled?!1===h?r.time/1e3:h:0,scaleAdjustment:P,animationTextureSize:[y.descriptor.width,y.descriptor.height],toScreen:R,toNdc:D,mapRotation:r.state.rotation,pixelRatio:r.state.pixelRatio},localTileOffset:m(f.target)},textures:{...s(r),mosaicTexture:x.textureManager.getMosaicTexture(r,f.textureKey,!1),animationTexture:{unit:6,texture:y}},defines:{...n(r)},optionalAttributes:{zoomRange:A,value1Position2Value2:v,accumulatedDistance:I,segmentDirection:q,normal:w},useComputeBuffer:o(r)}),x.setPipelineState({...c(r)}),x.submitDraw(r,f),!1===h&&r.animationsEnabled&&b.requestRender()}}export{f as AnimatedTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as o}from"tslib";import{uniform as t,UniformGroup as p}from"../../GraphShaderModule.js";import{Float as e,Vec2 as r,Mat3 as i}from"../../graph/glsl.js";class a extends p{}o([t(e)],a.prototype,"globalTime",void 0),o([t(r)],a.prototype,"animationTextureSize",void 0),o([t(i)],a.prototype,"toScreen",void 0),o([t(i)],a.prototype,"toNdc",void 0),o([t(e)],a.prototype,"mapRotation",void 0),o([t(e)],a.prototype,"pixelRatio",void 0);export{a as AnimationUniformInfo};
2
+ import{__decorate as o}from"tslib";import{uniform as t,UniformGroup as p}from"../../GraphShaderModule.js";import{Float as e,Vec2 as r,Mat3 as i}from"../../graph/glsl.js";class d extends p{}o([t(e)],d.prototype,"globalTime",void 0),o([t(r)],d.prototype,"animationTextureSize",void 0),o([t(i)],d.prototype,"toScreen",void 0),o([t(i)],d.prototype,"toNdc",void 0),o([t(e)],d.prototype,"mapRotation",void 0),o([t(e)],d.prototype,"pixelRatio",void 0),o([t(e)],d.prototype,"scaleAdjustment",void 0);export{d as AnimationUniformInfo};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{simplePipelineState as e}from"../../utils.js";import{Technique as t}from"../Technique.js";import{BlendShader as r}from"../shaders/BlendShader.js";import{OpacityShader as s}from"../shaders/OpacityShader.js";import u from"../../../../../../webgl/Texture.js";import{TextureDescriptor as i}from"../../../../../../webgl/TextureDescriptor.js";class o extends t{constructor(){super(...arguments),this.type=5,this._backBufferTexture=null,this.shaders={blend:new r,opacity:new s}}shutdown(){super.shutdown(),null!==this._backBufferTexture&&(this._backBufferTexture.dispose(),this._backBufferTexture=null)}render(t,r){const{context:s,state:u,pixelRatio:i,inFadeTransition:o,painter:n}=t,{size:a}=u,c=s.boundFramebuffer;let f,l;null!=c?(f=c.width,l=c.height):(f=Math.round(i*a[0]),l=Math.round(i*a[1]));const{blendMode:h}=r;if("normal"===h){const t={shader:this.shaders.opacity,uniforms:{config:{opacity:r.config.opacity}},textures:{layerTexture:{texture:r.colorTexture,unit:0}},defines:null,optionalAttributes:null,useComputeBuffer:!1};return n.setPipelineState(e),void n.submitDrawMesh(s,t,n.quadMesh)}const d=this._createOrResizeTexture(t,f,l);c?.copyToTexture(0,0,f,l,0,0,d);const p={color:{write:[!0,!0,!0,!0],blendMode:"custom",blendParameters:{srcRGB:1,dstRGB:0,srcAlpha:1,dstAlpha:0}},depth:!1,stencil:!1};n.setPipelineState(p);const x={inFadeOpacity:o?1:0,...r.config},b={shader:this.shaders.blend,uniforms:{config:x},textures:{backbufferTexture:{texture:d,unit:0},layerTexture:{texture:r.colorTexture,unit:1}},defines:{blendMode:h},optionalAttributes:null,useComputeBuffer:!1};n.submitDrawMesh(s,b,n.quadMesh)}_createOrResizeTexture(e,t,r){const{context:s}=e;if(null!==this._backBufferTexture&&this._backBufferTexture.descriptor?.width===t&&this._backBufferTexture.descriptor?.height===r)return this._backBufferTexture;if(null===this._backBufferTexture){const e=new i(t,r);e.internalFormat=6408,e.wrapMode=33071,this._backBufferTexture=new u(s,e)}else this._backBufferTexture.resize(t,r);return this._backBufferTexture}}export{o as BlendTechnique};
2
+ import{simplePipelineState as e}from"../../utils.js";import{Technique as t}from"../Technique.js";import{BlendShader as r}from"../shaders/BlendShader.js";import{OpacityShader as s}from"../shaders/OpacityShader.js";import u from"../../../../../../webgl/Texture.js";import{TextureDescriptor as i}from"../../../../../../webgl/TextureDescriptor.js";class o extends t{constructor(){super(...arguments),this.type=5,this._backBufferTexture=null,this.shaders={blend:new r,opacity:new s}}shutdown(){super.shutdown(),null!==this._backBufferTexture&&(this._backBufferTexture.dispose(),this._backBufferTexture=null)}render(t,r){const{context:s,state:u,pixelRatio:i,inFadeTransition:o,painter:n}=t,{size:a}=u,c=s.boundFramebuffer;let f,l;null!=c?(f=c.width,l=c.height):(f=Math.round(i*a[0]),l=Math.round(i*a[1]));const{blendMode:h}=r;if("normal"===h){const t={shader:this.shaders.opacity,uniforms:{config:{opacity:r.config.opacity}},textures:{layerTexture:{texture:r.colorTexture,unit:0}},defines:null,optionalAttributes:null,useComputeBuffer:!1};return n.setPipelineState(e),void n.submitDrawMesh(s,t,n.quadMesh)}const d=this._createOrResizeTexture(t,f,l);c?.copyToTexture(0,0,f,l,0,0,d);const p={...e,color:{write:[!0,!0,!0,!0],blendMode:"custom",blendParameters:{srcRGB:1,dstRGB:0,srcAlpha:1,dstAlpha:0},blendEquation:32774},depth:!1,stencil:!1};n.setPipelineState(p);const x={inFadeOpacity:o?1:0,...r.config},b={shader:this.shaders.blend,uniforms:{config:x},textures:{backbufferTexture:{texture:d,unit:0},layerTexture:{texture:r.colorTexture,unit:1}},defines:{blendMode:h},optionalAttributes:null,useComputeBuffer:!1};n.submitDrawMesh(s,b,n.quadMesh)}_createOrResizeTexture(e,t,r){const{context:s}=e;if(null!==this._backBufferTexture&&this._backBufferTexture.descriptor?.width===t&&this._backBufferTexture.descriptor?.height===r)return this._backBufferTexture;if(null===this._backBufferTexture){const e=new i(t,r);e.internalFormat=6408,e.wrapMode=33071,this._backBufferTexture=new u(s,e)}else this._backBufferTexture.resize(t,r);return this._backBufferTexture}}export{o as BlendTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{simplePipelineState as t}from"../../utils.js";import{Technique as s}from"../Technique.js";import{BlitShader as i}from"../shaders/BlitShader.js";import{BloomCompositeShader as r,LuminosityHighPassShader as o}from"../shaders/BloomShader.js";import{GaussianBlurShader as n}from"../shaders/BlurShader.js";import{DisposableFramebufferObject as u}from"../../../../../../webgl/FramebufferObject.js";import{TextureDescriptor as h}from"../../../../../../webgl/TextureDescriptor.js";const a=5,l=[1,0],m=[0,1],d=[1,.8,.6,.4,.2],c=[1,1,1];class p extends s{constructor(){super(...arguments),this.type=6,this._intensityFBO=null,this._compositeFBO=null,this._mipsFBOs=new Array(a),this._nMips=a,this._kernelSizeArray=[3,5,7,9,11],this._size=[0,0],this.shaders={luminosityPass:new o,gaussianBlur:new n,composite:new r,blit:new i}}shutdown(){if(super.shutdown(),this._intensityFBO=e(this._intensityFBO),this._compositeFBO=e(this._compositeFBO),this._mipsFBOs){for(let e=0;e<this._nMips;e++)this._mipsFBOs[e]&&(this._mipsFBOs[e].horizontal.dispose(),this._mipsFBOs[e].vertical.dispose());this._mipsFBOs=null}}render(e,t){const{layerFBO:s}=t,{width:i,height:r}=s,{strength:o,radius:n,threshold:u}=t.effect;this._createOrResizeResources(e,i,r),this._renderLuminosityHighPass(e,s,u),this._renderGaussianBlur(e,s),this._renderComposite(e,s,o,n),this._renderBlit(e,s)}_renderLuminosityHighPass(e,s,i){const{context:r,painter:o}=e,{width:n,height:u}=s,h={...t,color:{write:[!0,!0,!0,!0],blendMode:"custom",blendParameters:{srcRGB:1,dstRGB:771,srcAlpha:1,dstAlpha:771}},stencil:{write:{mask:0},test:!1}};o.setPipelineState(h),r.bindFramebuffer(this._intensityFBO);const a=[Math.round(n/2),Math.round(u/2)];r.setViewport(0,0,a[0],a[1]),r.setClearColor(0,0,0,0),r.clear(16384),o.submitDrawMesh(r,{shader:this.shaders.luminosityPass,uniforms:{luminosityHighPassConfig:{defaultColor:[0,0,0],defaultOpacity:0,luminosityThreshold:i,smoothWidth:.01}},textures:{luminosityHighPassTexture:{texture:s.colorTexture,unit:0}},defines:null,optionalAttributes:null,useComputeBuffer:!1},o.quadMesh)}_renderGaussianBlur(e,s){const{context:i,painter:r}=e,{width:o,height:n}=s,u={...t,color:{write:[!0,!0,!0,!0],blendMode:"none"}};r.setPipelineState(u);let h=this._intensityFBO.colorTexture;const a=[Math.round(o/2),Math.round(n/2)];for(let t=0;t<this._nMips;t++){i.setViewport(0,0,a[0],a[1]);const e=this._mipsFBOs[t];i.bindFramebuffer(e.horizontal),r.submitDrawMesh(i,{shader:this.shaders.gaussianBlur,uniforms:{gaussianBlurConfig:{texSize:a,direction:l,sigma:this._kernelSizeArray[t]}},textures:{texture:{texture:h,unit:t+1}},defines:{kernelRadius:this._kernelSizeArray[t]},optionalAttributes:null,useComputeBuffer:!1},r.quadMesh),h=e.horizontal.colorTexture,i.bindFramebuffer(e.vertical),r.submitDrawMesh(i,{shader:this.shaders.gaussianBlur,uniforms:{gaussianBlurConfig:{texSize:a,direction:m,sigma:this._kernelSizeArray[t]}},textures:{texture:{texture:h,unit:t+1}},defines:{kernelRadius:this._kernelSizeArray[t]},optionalAttributes:null,useComputeBuffer:!1},r.quadMesh),h=e.vertical.colorTexture,a[0]=Math.round(a[0]/2),a[1]=Math.round(a[1]/2)}}_renderComposite(e,t,s,i){const{context:r,painter:o}=e,{width:n,height:u}=t;r.setViewport(0,0,n,u),r.bindFramebuffer(this._compositeFBO),o.submitDrawMesh(r,{shader:this.shaders.composite,uniforms:{compositeConfig:{bloomStrength:s,bloomRadius:i,bloomFactors:d,bloomTintColor:c}},textures:{compositeTextures:{blurTexture1:{texture:this._mipsFBOs[0].vertical.colorTexture,unit:1},blurTexture2:{texture:this._mipsFBOs[1].vertical.colorTexture,unit:2},blurTexture3:{texture:this._mipsFBOs[2].vertical.colorTexture,unit:3},blurTexture4:{texture:this._mipsFBOs[3].vertical.colorTexture,unit:4},blurTexture5:{texture:this._mipsFBOs[4].vertical.colorTexture,unit:5}}},defines:{numMips:this._nMips},optionalAttributes:null,useComputeBuffer:!1},o.quadMesh)}_renderBlit(e,s){const{context:i,painter:r}=e;i.bindFramebuffer(s);const o={...t,color:{write:[!0,!0,!0,!0],blendMode:"custom",blendParameters:{srcRGB:1,dstRGB:1,srcAlpha:1,dstAlpha:1}}};r.setPipelineState(o),r.submitDrawMesh(i,{shader:this.shaders.blit,uniforms:{},textures:{blitTexture:{texture:this._compositeFBO.colorTexture,unit:6}},defines:null,optionalAttributes:null,useComputeBuffer:!1},r.quadMesh)}_createOrResizeResources(e,t,s){const{context:i}=e;if(this._compositeFBO&&this._size[0]===t&&this._size[1]===s)return;this._size[0]=t,this._size[1]=s;const r=[Math.round(t/2),Math.round(s/2)];if(this._compositeFBO)this._compositeFBO.resize(t,s);else{const e=new h(t,s);e.internalFormat=6408,e.wrapMode=33071,this._compositeFBO=new u(i,e)}if(this._intensityFBO)this._intensityFBO.resize(r[0],r[1]);else{const e=new h(r[0],r[1]);e.internalFormat=6408,e.wrapMode=33071,this._intensityFBO=new u(i,e)}for(let o=0;o<this._nMips;o++){if(this._mipsFBOs[o])this._mipsFBOs[o].horizontal.resize(r[0],r[1]),this._mipsFBOs[o].vertical.resize(r[0],r[1]);else{const e=new h(r[0],r[1]);e.internalFormat=6408,e.wrapMode=33071,this._mipsFBOs[o]={horizontal:new u(i,e),vertical:new u(i,e)}}r[0]=Math.round(r[0]/2),r[1]=Math.round(r[1]/2)}}}export{p as BloomTechnique};
2
+ import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{simplePipelineState as t}from"../../utils.js";import{Technique as s}from"../Technique.js";import{BlitShader as i}from"../shaders/BlitShader.js";import{BloomCompositeShader as r,LuminosityHighPassShader as o}from"../shaders/BloomShader.js";import{GaussianBlurShader as n}from"../shaders/BlurShader.js";import{DisposableFramebufferObject as u}from"../../../../../../webgl/FramebufferObject.js";import{TextureDescriptor as h}from"../../../../../../webgl/TextureDescriptor.js";const a=5,l=[1,0],m=[0,1],d=[1,.8,.6,.4,.2],p=[1,1,1];class c extends s{constructor(){super(...arguments),this.type=6,this._intensityFBO=null,this._compositeFBO=null,this._mipsFBOs=new Array(a),this._nMips=a,this._kernelSizeArray=[3,5,7,9,11],this._size=[0,0],this.shaders={luminosityPass:new o,gaussianBlur:new n,composite:new r,blit:new i}}shutdown(){if(super.shutdown(),this._intensityFBO=e(this._intensityFBO),this._compositeFBO=e(this._compositeFBO),this._mipsFBOs){for(let e=0;e<this._nMips;e++)this._mipsFBOs[e]&&(this._mipsFBOs[e].horizontal.dispose(),this._mipsFBOs[e].vertical.dispose());this._mipsFBOs=null}}render(e,t){const{layerFBO:s}=t,{width:i,height:r}=s,{strength:o,radius:n,threshold:u}=t.effect;this._createOrResizeResources(e,i,r),this._renderLuminosityHighPass(e,s,u),this._renderGaussianBlur(e,s),this._renderComposite(e,s,o,n),this._renderBlit(e,s)}_renderLuminosityHighPass(e,s,i){const{context:r,painter:o}=e,{width:n,height:u}=s,h={...t,color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:{write:{mask:0},test:!1}};o.setPipelineState(h),r.bindFramebuffer(this._intensityFBO);const a=[Math.round(n/2),Math.round(u/2)];r.setViewport(0,0,a[0],a[1]),r.setClearColor(0,0,0,0),r.clear(16384),o.submitDrawMesh(r,{shader:this.shaders.luminosityPass,uniforms:{luminosityHighPassConfig:{defaultColor:[0,0,0],defaultOpacity:0,luminosityThreshold:i,smoothWidth:.01}},textures:{luminosityHighPassTexture:{texture:s.colorTexture,unit:0}},defines:null,optionalAttributes:null,useComputeBuffer:!1},o.quadMesh)}_renderGaussianBlur(e,s){const{context:i,painter:r}=e,{width:o,height:n}=s,u={...t,color:{write:[!0,!0,!0,!0],blendMode:"none"}};r.setPipelineState(u);let h=this._intensityFBO.colorTexture;const a=[Math.round(o/2),Math.round(n/2)];for(let t=0;t<this._nMips;t++){i.setViewport(0,0,a[0],a[1]);const e=this._mipsFBOs[t];i.bindFramebuffer(e.horizontal),r.submitDrawMesh(i,{shader:this.shaders.gaussianBlur,uniforms:{gaussianBlurConfig:{texSize:a,direction:l,sigma:this._kernelSizeArray[t]}},textures:{texture:{texture:h,unit:t+1}},defines:{kernelRadius:this._kernelSizeArray[t]},optionalAttributes:null,useComputeBuffer:!1},r.quadMesh),h=e.horizontal.colorTexture,i.bindFramebuffer(e.vertical),r.submitDrawMesh(i,{shader:this.shaders.gaussianBlur,uniforms:{gaussianBlurConfig:{texSize:a,direction:m,sigma:this._kernelSizeArray[t]}},textures:{texture:{texture:h,unit:t+1}},defines:{kernelRadius:this._kernelSizeArray[t]},optionalAttributes:null,useComputeBuffer:!1},r.quadMesh),h=e.vertical.colorTexture,a[0]=Math.round(a[0]/2),a[1]=Math.round(a[1]/2)}}_renderComposite(e,t,s,i){const{context:r,painter:o}=e,{width:n,height:u}=t;r.setViewport(0,0,n,u),r.bindFramebuffer(this._compositeFBO),o.submitDrawMesh(r,{shader:this.shaders.composite,uniforms:{compositeConfig:{bloomStrength:s,bloomRadius:i,bloomFactors:d,bloomTintColor:p}},textures:{compositeTextures:{blurTexture1:{texture:this._mipsFBOs[0].vertical.colorTexture,unit:1},blurTexture2:{texture:this._mipsFBOs[1].vertical.colorTexture,unit:2},blurTexture3:{texture:this._mipsFBOs[2].vertical.colorTexture,unit:3},blurTexture4:{texture:this._mipsFBOs[3].vertical.colorTexture,unit:4},blurTexture5:{texture:this._mipsFBOs[4].vertical.colorTexture,unit:5}}},defines:{numMips:this._nMips},optionalAttributes:null,useComputeBuffer:!1},o.quadMesh)}_renderBlit(e,s){const{context:i,painter:r}=e;i.bindFramebuffer(s);const o={...t,color:{write:[!0,!0,!0,!0],blendMode:"custom",blendParameters:{srcRGB:1,dstRGB:1,srcAlpha:1,dstAlpha:1},blendEquation:32774}};r.setPipelineState(o),r.submitDrawMesh(i,{shader:this.shaders.blit,uniforms:{},textures:{blitTexture:{texture:this._compositeFBO.colorTexture,unit:6}},defines:null,optionalAttributes:null,useComputeBuffer:!1},r.quadMesh)}_createOrResizeResources(e,t,s){const{context:i}=e;if(this._compositeFBO&&this._size[0]===t&&this._size[1]===s)return;this._size[0]=t,this._size[1]=s;const r=[Math.round(t/2),Math.round(s/2)];if(this._compositeFBO)this._compositeFBO.resize(t,s);else{const e=new h(t,s);e.internalFormat=6408,e.wrapMode=33071,this._compositeFBO=new u(i,e)}if(this._intensityFBO)this._intensityFBO.resize(r[0],r[1]);else{const e=new h(r[0],r[1]);e.internalFormat=6408,e.wrapMode=33071,this._intensityFBO=new u(i,e)}for(let o=0;o<this._nMips;o++){if(this._mipsFBOs[o])this._mipsFBOs[o].horizontal.resize(r[0],r[1]),this._mipsFBOs[o].vertical.resize(r[0],r[1]);else{const e=new h(r[0],r[1]);e.internalFormat=6408,e.wrapMode=33071,this._mipsFBOs[o]={horizontal:new u(i,e),vertical:new u(i,e)}}r[0]=Math.round(r[0]/2),r[1]=Math.round(r[1]/2)}}}export{c as BloomTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{simplePipelineState as t}from"../../utils.js";import{Technique as s}from"../Technique.js";import{BlitShader as r}from"../shaders/BlitShader.js";import{RadialBlurShader as i,GaussianBlurShader as u}from"../shaders/BlurShader.js";import{DisposableFramebufferObject as a}from"../../../../../../webgl/FramebufferObject.js";import{TextureDescriptor as n}from"../../../../../../webgl/TextureDescriptor.js";const o=[1,0],l=[0,1];class d extends s{constructor(){super(...arguments),this.type=7,this._blurFBO=null,this._size=[0,0],this.shaders={gaussianBlur:new u,radialBlur:new i,blit:new r}}shutdown(){super.shutdown(),this._blurFBO=e(this._blurFBO)}render(e,t){const{type:s,radius:r}=t.effect,{layerFBO:i}=t;0!==r&&(this._createOrResizeResources(e),"blur"===s?this._gaussianBlur(e,i,t.effect.radius):this._radialBlur(e,i))}_gaussianBlur(e,s,r){const{context:i,state:u,painter:a,pixelRatio:n}=e,{size:d}=u,h=[Math.round(n*d[0]),Math.round(n*d[1])],c=this._blurFBO,f={...t,color:{write:[!0,!0,!0,!0],blendMode:"none"}};a.setPipelineState(f),i.bindFramebuffer(c),a.submitDrawMesh(i,{shader:this.shaders.gaussianBlur,uniforms:{gaussianBlurConfig:{texSize:h,direction:o,sigma:r}},textures:{texture:{texture:s.colorTexture,unit:4}},defines:{kernelRadius:Math.ceil(r)},optionalAttributes:null,useComputeBuffer:!1},a.quadMesh),i.bindFramebuffer(s);const b={color:{write:[!0,!0,!0,!0],blendMode:"none"},depth:{write:!1,test:!1},stencil:{write:{mask:0},test:!1}};a.setPipelineState(b),a.submitDrawMesh(i,{shader:this.shaders.gaussianBlur,uniforms:{gaussianBlurConfig:{texSize:h,direction:l,sigma:r}},textures:{texture:{texture:c?.colorTexture,unit:5}},defines:{kernelRadius:Math.ceil(r)},optionalAttributes:null,useComputeBuffer:!1},a.quadMesh),a.setPipelineState({...t,stencil:{test:{mask:255,compare:514,op:{fail:7680,zFail:7680,zPass:7680}},write:!1},color:{write:[!0,!0,!0,!0],blendMode:"additive"}})}_radialBlur(e,s){const{context:r,painter:i}=e,u=this._blurFBO;r.bindFramebuffer(u);const a={...t,color:{write:[!0,!0,!0,!0],blendMode:"none"}};i.setPipelineState(a),i.submitDrawMeshUntyped(r,{shader:this.shaders.radialBlur,uniforms:{},textures:{texture:{texture:s.colorTexture,unit:4}},defines:null,optionalAttributes:null,useComputeBuffer:!1},i.quadMesh),r.bindFramebuffer(s),i.setPipelineState({...t,color:{write:[!0,!0,!0,!0],blendMode:"custom",blendParameters:{srcRGB:1,dstRGB:771,srcAlpha:1,dstAlpha:771}}}),i.submitDrawMeshUntyped(r,{shader:this.shaders.blit,uniforms:{},textures:{blitTexture:{texture:u?.colorTexture,unit:5}},defines:null,optionalAttributes:null,useComputeBuffer:!1},i.quadMesh)}_createOrResizeResources(e){const{context:t,state:s,pixelRatio:r}=e,{size:i}=s,u=Math.round(r*i[0]),o=Math.round(r*i[1]);if(!this._blurFBO||this._size[0]!==u||this._size[1]!==o)if(this._size[0]=u,this._size[1]=o,this._blurFBO)this._blurFBO.resize(u,o);else{const e=new n(u,o);e.internalFormat=6408,e.wrapMode=33071,this._blurFBO=new a(t,e)}}}export{d as BlurTechnique};
2
+ import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{simplePipelineState as t}from"../../utils.js";import{Technique as s}from"../Technique.js";import{BlitShader as r}from"../shaders/BlitShader.js";import{RadialBlurShader as i,GaussianBlurShader as u}from"../shaders/BlurShader.js";import{DisposableFramebufferObject as o}from"../../../../../../webgl/FramebufferObject.js";import{TextureDescriptor as a}from"../../../../../../webgl/TextureDescriptor.js";const n=[1,0],l=[0,1];class d extends s{constructor(){super(...arguments),this.type=7,this._blurFBO=null,this._size=[0,0],this.shaders={gaussianBlur:new u,radialBlur:new i,blit:new r}}shutdown(){super.shutdown(),this._blurFBO=e(this._blurFBO)}render(e,t){const{type:s,radius:r}=t.effect,{layerFBO:i}=t;0!==r&&(this._createOrResizeResources(e),"blur"===s?this._gaussianBlur(e,i,t.effect.radius):this._radialBlur(e,i))}_gaussianBlur(e,s,r){const{context:i,state:u,painter:o,pixelRatio:a}=e,{size:d}=u,h=[Math.round(a*d[0]),Math.round(a*d[1])],f=this._blurFBO,c={...t,color:{write:[!0,!0,!0,!0],blendMode:"none"}};o.setPipelineState(c),i.bindFramebuffer(f),o.submitDrawMesh(i,{shader:this.shaders.gaussianBlur,uniforms:{gaussianBlurConfig:{texSize:h,direction:n,sigma:r}},textures:{texture:{texture:s.colorTexture,unit:4}},defines:{kernelRadius:Math.ceil(r)},optionalAttributes:null,useComputeBuffer:!1},o.quadMesh),i.bindFramebuffer(s);const b={color:{write:[!0,!0,!0,!0],blendMode:"none"},depth:{write:!1,test:!1},stencil:{write:{mask:0},test:!1}};o.setPipelineState(b),o.submitDrawMesh(i,{shader:this.shaders.gaussianBlur,uniforms:{gaussianBlurConfig:{texSize:h,direction:l,sigma:r}},textures:{texture:{texture:f?.colorTexture,unit:5}},defines:{kernelRadius:Math.ceil(r)},optionalAttributes:null,useComputeBuffer:!1},o.quadMesh),o.setPipelineState({...t,stencil:{test:{mask:255,compare:514,op:{fail:7680,zFail:7680,zPass:7680}},write:!1},color:{write:[!0,!0,!0,!0],blendMode:"additive"}})}_radialBlur(e,s){const{context:r,painter:i}=e,u=this._blurFBO;r.bindFramebuffer(u);const o={...t,color:{write:[!0,!0,!0,!0],blendMode:"none"}};i.setPipelineState(o),i.submitDrawMeshUntyped(r,{shader:this.shaders.radialBlur,uniforms:{},textures:{texture:{texture:s.colorTexture,unit:4}},defines:null,optionalAttributes:null,useComputeBuffer:!1},i.quadMesh),r.bindFramebuffer(s),i.setPipelineState({...t,color:{write:[!0,!0,!0,!0],blendMode:"composite"}}),i.submitDrawMeshUntyped(r,{shader:this.shaders.blit,uniforms:{},textures:{blitTexture:{texture:u?.colorTexture,unit:5}},defines:null,optionalAttributes:null,useComputeBuffer:!1},i.quadMesh)}_createOrResizeResources(e){const{context:t,state:s,pixelRatio:r}=e,{size:i}=s,u=Math.round(r*i[0]),n=Math.round(r*i[1]);if(!this._blurFBO||this._size[0]!==u||this._size[1]!==n)if(this._size[0]=u,this._size[1]=n,this._blurFBO)this._blurFBO.resize(u,n);else{const e=new a(u,n);e.internalFormat=6408,e.wrapMode=33071,this._blurFBO=new o(t,e)}}}export{d as BlurTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{Technique as t}from"../Technique.js";import{OpacityShader as r}from"../shaders/OpacityShader.js";import s from"../../../../../../webgl/Texture.js";import{TextureDescriptor as i}from"../../../../../../webgl/TextureDescriptor.js";class o extends t{constructor(){super(...arguments),this.type=25,this._layerFBOTexture=null,this._size=[0,0],this.shaders={opacity:new r}}shutdown(){super.shutdown(),this._layerFBOTexture=e(this._layerFBOTexture)}render(e,t){const{layerFBO:r}=t,{width:s,height:i}=r;this._createOrResizeResources(e,s,i);const{context:o,painter:a}=e,{amount:u}=t.effect,l=this._layerFBOTexture;o.bindFramebuffer(r),t.layerFBO.copyToTexture(0,0,s,i,0,0,l);const n={color:{write:[!0,!0,!0,!0],blendMode:"custom",blendParameters:{srcRGB:1,dstRGB:771,srcAlpha:1,dstAlpha:771}},depth:!1,stencil:!1},h={opacity:u};l.setSamplingMode(9728),o.setClearColor(0,0,0,0),o.clear(16384),a.setPipelineState(n),a.submitDrawMesh(o,{shader:this.shaders.opacity,uniforms:{config:h},textures:{layerTexture:{texture:l,unit:0}},defines:null,optionalAttributes:null,useComputeBuffer:!1},a.quadMesh)}_createOrResizeResources(e,t,r){const{context:o}=e;if(!this._layerFBOTexture||this._size[0]!==t||this._size[1]!==r)if(this._size[0]=t,this._size[1]=r,this._layerFBOTexture)this._layerFBOTexture.resize(t,r);else{const e=new i(t,r);e.internalFormat=6408,e.wrapMode=33071,e.samplingMode=9728,this._layerFBOTexture=new s(o,e)}}}export{o as OpacityTechnique};
2
+ import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{Technique as t}from"../Technique.js";import{OpacityShader as r}from"../shaders/OpacityShader.js";import s from"../../../../../../webgl/Texture.js";import{TextureDescriptor as i}from"../../../../../../webgl/TextureDescriptor.js";class o extends t{constructor(){super(...arguments),this.type=25,this._layerFBOTexture=null,this._size=[0,0],this.shaders={opacity:new r}}shutdown(){super.shutdown(),this._layerFBOTexture=e(this._layerFBOTexture)}render(e,t){const{layerFBO:r}=t,{width:s,height:i}=r;this._createOrResizeResources(e,s,i);const{context:o,painter:a}=e,{amount:u}=t.effect,n=this._layerFBOTexture;o.bindFramebuffer(r),t.layerFBO.copyToTexture(0,0,s,i,0,0,n);const l={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:!1},h={opacity:u};n.setSamplingMode(9728),o.setClearColor(0,0,0,0),o.clear(16384),a.setPipelineState(l),a.submitDrawMesh(o,{shader:this.shaders.opacity,uniforms:{config:h},textures:{layerTexture:{texture:n,unit:0}},defines:null,optionalAttributes:null,useComputeBuffer:!1},a.quadMesh)}_createOrResizeResources(e,t,r){const{context:o}=e;if(!this._layerFBOTexture||this._size[0]!==t||this._size[1]!==r)if(this._size[0]=t,this._size[1]=r,this._layerFBOTexture)this._layerFBOTexture.resize(t,r);else{const e=new i(t,r);e.internalFormat=6408,e.wrapMode=33071,e.samplingMode=9728,this._layerFBOTexture=new s(o,e)}}}export{o as OpacityTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{tileSize as e}from"../../../definitions.js";import{Technique as t}from"../Technique.js";import{getInterpolationDefines as i}from"./processor/textureUtils.js";import{RasterRangeHighlightShader as r}from"../shaders/raster/RasterRangeHighlightShader.js";import{RasterXYBandHighlightShader as n}from"../shaders/raster/RasterXYBandHighlightShader.js";import{SizedPixelFormat as o,PixelType as s}from"../../../../../../webgl/enums.js";import{DisposableFramebufferObject as a}from"../../../../../../webgl/FramebufferObject.js";import g from"../../../../../../webgl/Texture.js";import{TextureDescriptor as h}from"../../../../../../webgl/TextureDescriptor.js";class u extends t{constructor(){super(...arguments),this.name="BrushRasterHighlight",this.type=2,this.shaders={range:new r,xyBand:new n}}shutdown(e){super.shutdown(e),this._fbo?.dispose(),this._fbo=void 0}_getBandIds(e,t){const{type:i}=e,r="xy-band"===i?e.bandIds:[e.bandId];return t?.length?r.map(e=>t.indexOf(e)):"xy-band"===i?[0,1]:[0]}_getSingleBandShaderOptions(e,t,r,n){const{config:o,projectionConfig:s,projectionTextures:a,textures:g,projectionDefines:h}=this._getCommonConfig(t),u=i(t,n),d={bandSwap:r,ranges:e.ranges,color:e.color};return{shader:this.shaders.range,uniforms:{projectionConfig:s,config:o,rangeHighlightConfig:d},textures:{...g,projectionTextures:a},defines:{...h,...u,applyPixelMask:!1,applyPixelHighlights:!1,hasExistingHighlights:!!g.highlightTexture},optionalAttributes:null,useComputeBuffer:!1}}_getXYBandShaderOptions(e,t,r,n,o){const{config:s,projectionConfig:a,projectionTextures:g,textures:h,projectionDefines:u}=this._getCommonConfig(t),d=i(t,n),p={bandSwap:r,xRange:e.xRange,yRange:e.yRange,color:e.color},c=o?{texture:o,unit:4}:void 0;return{shader:this.shaders.xyBand,uniforms:{projectionConfig:a,config:s,xyRangeHighlightConfig:p},textures:{...h,projectionTextures:g,xyMaskHighlightTexture:c},defines:{...u,...d,applyPixelMask:!1,applyPixelHighlights:!1,hasExistingHighlights:!!h.highlightTexture,useMask:!!c},optionalAttributes:null,useComputeBuffer:!1}}render(t,i){const{pixelHighlightOptions:r}=t;if(!r)return;const{context:n}=t;if(!this._fbo){const i=d(t.context,e,e);this._fbo=new a(n,i)}const{type:o}=r,s="xy-band"===o?p(t.context,r):void 0,g=n.boundFramebuffer,h=n.getViewport();for(const a of i.bitmaps){if(!a.source||a.highlighted||a.suspended||a.isRenderedSource)continue;const i=this._getBandIds(r,a.bandIds);if(i.some(e=>e<0||e>2))continue;t.timeline.begin(this.name);const{painter:g}=t;g.setPipelineState({depth:!1,stencil:{test:!1,write:!1},color:{write:[!0,!0,!0,!0],blendMode:"custom",blendParameters:{srcRGB:1,dstRGB:0,srcAlpha:1,dstAlpha:0}}}),a.updateTexture(t),a.updateProcessedTexture(!1);const h=new Float32Array(9);h[3*i[0]]=1,h[3*i[1]+1]="xy-band"===o?1:0;const u="single-band"===o?this._getSingleBandShaderOptions(r,a,h,n):this._getXYBandShaderOptions(r,a,h,n,s);n.bindFramebuffer(this._fbo),n.setViewport(0,0,e,e),g.submitDrawMesh(t.context,u,g.quadMesh);const p=d(t.context,e,e);this._fbo.copyToTexture(0,0,e,e,0,0,p),a.highlightTexture=p,t.timeline.end(this.name)}s?.dispose(),n.bindFramebuffer(g),n.setViewport(h.x,h.y,h.width,h.height)}_getCommonConfig(e){const{names:t,textures:i}=e.getTextures({forProcessing:!0,useProcessedTexture:e.processed}),r=i[t.indexOf("u_image")],n=e.getRasterTextureSize(),o={dvsMat3:new Float32Array([2,0,0,0,2,0,-1,-1,0]),coordScale:[1,1],srcImageSize:n,opacity:1},s={texture:{texture:r,unit:0},pixelMaskTexture:null,highlightTexture:null},a=i[t.indexOf("u_transformGrid")],{transformGrid:g}=e,h=!(!a||!g),u=h?{targetImageSize:[e.width,e.height],transformSpacing:g.spacing,transformGridSize:g.size}:void 0,d=h?{transformTexture:{texture:a,unit:1}}:void 0,{highlightTexture:p}=e;p&&(s.highlightTexture={texture:p,unit:2});return{config:o,projectionConfig:u,projectionTextures:d,textures:s,projectionDefines:{applyProjection:h,lookupProjection:h&&1===g.spacing[0]}}}}function d(e,t,i){const r=new h(t,i);return r.internalFormat=o.RGBA8,r.samplingMode=9728,r.dataType=s.UNSIGNED_BYTE,r.isImmutable=!0,r.wrapMode=33071,new g(e,r)}function p(e,t){const{mask:i,maskSize:r}=t;if(!i?.length||!r?.length)return;const n=new h(r[0],r[1]);return n.internalFormat=o.R8,n.samplingMode=9728,n.dataType=s.UNSIGNED_BYTE,n.isImmutable=!0,n.wrapMode=33071,new g(e,n,i)}export{u as RasterHighlightTechnique};
2
+ import{tileSize as e}from"../../../definitions.js";import{Technique as t}from"../Technique.js";import{getInterpolationDefines as i}from"./processor/textureUtils.js";import{RasterRangeHighlightShader as n}from"../shaders/raster/RasterRangeHighlightShader.js";import{RasterXYBandHighlightShader as r}from"../shaders/raster/RasterXYBandHighlightShader.js";import{SizedPixelFormat as o,PixelType as s}from"../../../../../../webgl/enums.js";import{DisposableFramebufferObject as a}from"../../../../../../webgl/FramebufferObject.js";import g from"../../../../../../webgl/Texture.js";import{TextureDescriptor as h}from"../../../../../../webgl/TextureDescriptor.js";class u extends t{constructor(){super(...arguments),this.name="BrushRasterHighlight",this.type=2,this.shaders={range:new n,xyBand:new r}}shutdown(e){super.shutdown(e),this._fbo?.dispose(),this._fbo=void 0}_getBandIds(e,t){const{type:i}=e,n="xy-band"===i?e.bandIds:[e.bandId];return t?.length?n.map(e=>t.indexOf(e)):"xy-band"===i?[0,1]:[0]}_getSingleBandShaderOptions(e,t,n,r){const{config:o,projectionConfig:s,projectionTextures:a,textures:g,projectionDefines:h}=this._getCommonConfig(t),u=i(t,r),d={bandSwap:n,ranges:e.ranges,color:e.color};return{shader:this.shaders.range,uniforms:{projectionConfig:s,config:o,rangeHighlightConfig:d},textures:{...g,projectionTextures:a},defines:{...h,...u,applyPixelMask:!1,applyPixelHighlights:!1,hasExistingHighlights:!!g.highlightTexture},optionalAttributes:null,useComputeBuffer:!1}}_getXYBandShaderOptions(e,t,n,r,o){const{config:s,projectionConfig:a,projectionTextures:g,textures:h,projectionDefines:u}=this._getCommonConfig(t),d=i(t,r),p={bandSwap:n,xRange:e.xRange,yRange:e.yRange,color:e.color},c=o?{texture:o,unit:4}:void 0;return{shader:this.shaders.xyBand,uniforms:{projectionConfig:a,config:s,xyRangeHighlightConfig:p},textures:{...h,projectionTextures:g,xyMaskHighlightTexture:c},defines:{...u,...d,applyPixelMask:!1,applyPixelHighlights:!1,hasExistingHighlights:!!h.highlightTexture,useMask:!!c},optionalAttributes:null,useComputeBuffer:!1}}render(t,i){const{pixelHighlightOptions:n}=t;if(!n)return;const{context:r}=t;if(!this._fbo){const i=d(t.context,e,e);this._fbo=new a(r,i)}const{type:o}=n,s="xy-band"===o?p(t.context,n):void 0,g=r.boundFramebuffer,h=r.getViewport();for(const a of i.bitmaps){if(!a.source||a.highlighted||a.suspended||a.isRenderedSource)continue;const i=this._getBandIds(n,a.bandIds);if(i.some(e=>e<0||e>2))continue;t.timeline.begin(this.name);const{painter:g}=t;g.setPipelineState({depth:!1,stencil:{test:!1,write:!1},color:{write:[!0,!0,!0,!0],blendMode:"custom",blendParameters:{srcRGB:1,dstRGB:0,srcAlpha:1,dstAlpha:0},blendEquation:32774}}),a.updateTexture(t),a.updateProcessedTexture(!1);const h=new Float32Array(9);h[3*i[0]]=1,h[3*i[1]+1]="xy-band"===o?1:0;const u="single-band"===o?this._getSingleBandShaderOptions(n,a,h,r):this._getXYBandShaderOptions(n,a,h,r,s);r.bindFramebuffer(this._fbo),r.setViewport(0,0,e,e),g.submitDrawMesh(t.context,u,g.quadMesh);const p=d(t.context,e,e);this._fbo.copyToTexture(0,0,e,e,0,0,p),a.highlightTexture=p,t.timeline.end(this.name)}s?.dispose(),r.bindFramebuffer(g),r.setViewport(h.x,h.y,h.width,h.height)}_getCommonConfig(e){const{names:t,textures:i}=e.getTextures({forProcessing:!0,useProcessedTexture:e.processed}),n=i[t.indexOf("u_image")],r=e.getRasterTextureSize(),o={dvsMat3:new Float32Array([2,0,0,0,2,0,-1,-1,0]),coordScale:[1,1],srcImageSize:r,opacity:1},s={texture:{texture:n,unit:0},pixelMaskTexture:null,highlightTexture:null},a=i[t.indexOf("u_transformGrid")],{transformGrid:g}=e,h=!(!a||!g),u=h?{targetImageSize:[e.width,e.height],transformSpacing:g.spacing,transformGridSize:g.size}:void 0,d=h?{transformTexture:{texture:a,unit:1}}:void 0,{highlightTexture:p}=e;p&&(s.highlightTexture={texture:p,unit:2});return{config:o,projectionConfig:u,projectionTextures:d,textures:s,projectionDefines:{applyProjection:h,lookupProjection:h&&1===g.spacing[0]}}}}function d(e,t,i){const n=new h(t,i);return n.internalFormat=o.RGBA8,n.samplingMode=9728,n.dataType=s.UNSIGNED_BYTE,n.isImmutable=!0,n.wrapMode=33071,new g(e,n)}function p(e,t){const{mask:i,maskSize:n}=t;if(!i?.length||!n?.length)return;const r=new h(n[0],n[1]);return r.internalFormat=o.R8,r.samplingMode=9728,r.dataType=s.UNSIGNED_BYTE,r.isImmutable=!0,r.wrapMode=33071,new g(e,r,i)}export{u as RasterHighlightTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{disposeMaybe as e}from"../../../../../../../../core/maybe.js";import{tileSize as t}from"../../../../definitions.js";import{Technique as r}from"../../Technique.js";import{createNewFBO as n,createProcessedTexture as s}from"./textureUtils.js";import{createColormapTexture as o}from"../../../../../../../webgl/rasterUtils.js";class i extends r{shutdown(e){super.shutdown(e),this._fbo?.dispose(),this._fbo=void 0}render(r,i){const{rasterFunction:a}=r;if(!a)return;const{context:u}=r,c="indexedColormap"in a.parameters?o(u,a.parameters.indexedColormap):void 0,m="Reproject"===a.name,d=u.boundFramebuffer,p=u.getViewport();for(const o of i.bitmaps){const d=m?!(o.rasterTexture&&o.projected):!o.processed;if(!o.source||!d||o.suspended)continue;r.timeline.begin(this.name);const{painter:p}=r;p.setPipelineState({depth:!1,stencil:{test:!1,write:!1},color:{write:[!0,!0,!0,!0],blendMode:"custom",blendParameters:{srcRGB:1,dstRGB:0,srcAlpha:1,dstAlpha:0}}}),m||(o.processedTexture=e(o.processedTexture)),o.updateTexture(r);const[f,g]=o.getRasterTextureSize(m),l=f===t&&g===t,x=l?i.processorFbo:n(u,f,g);u.bindFramebuffer(x),u.setViewport(0,0,x.width,x.height),this._process(r,o,c);const h=s(r.context,f,g);if(x.copyToTexture(0,0,f,g,0,0,h),m)o.rasterTexture=h;else{const e=r.hasBranches?a.id:0;o.functionTextures[e]?.dispose(),o.functionTextures[e]=h}l||x.dispose(),r.timeline.end(this.name)}c?.dispose(),u.bindFramebuffer(d),u.setViewport(p.x,p.y,p.width,p.height)}_getCommonConfig(e,t){const{rasterFunction:r,hasBranches:n}=e,{raster:s,rasters:o}=r.parameters,i=n?s?.id??o?.find(e=>"Constant"!==e.name)?.id??-1:0,a=t.functionTextures[i]??t.rasterTexture,u="Reproject"===r.name;return{config:{srcImageSize:t.getRasterTextureSize(u)},textures:{texture:{texture:a,unit:0}}}}_getMultipleInputConfig(e,t){if(!t?.length)return{};if(2===t.length){const{config:r,textures:n}=this._getTwoInputConfig(t,e);return{twoRasterConfig:r,twoRasterTextures:n}}if(3===t.length){const{config:r,textures:n}=this._getThreeInputConfig(t,e);return{threeRasterConfig:r,threeRasterTextures:n}}return{}}_getConstantCount(e){return e?.filter(e=>"Constant"===e.name).length??0}_getTextures(e,t){return e.filter(e=>"Constant"!==e.name).map(e=>null!=e.id&&"Identity"!==e.name?t.functionTextures[e.id]:t.rasterTexture)}_getTwoInputConfig(e,t){const r=this._getTextures(e,t),n=r[1]?{texture:r[1],unit:1}:void 0,s=e.findIndex(e=>"Constant"===e.name),o=0===s?new Float32Array([0,1,0,1,0,0,0,0,0]):new Float32Array([1,0,0,0,1,0,0,0,0]);return{config:{image1Const:s>-1?e[s].parameters.value:0,imageSwap:o},textures:n?{image1:n}:void 0}}_getThreeInputConfig(e,t){const r=this._getTextures(e,t);let n=0,s=0,o=new Float32Array([1,0,0,0,1,0,0,0,1]);const i=r[1]?{texture:r[1],unit:1}:void 0,a=r[2]?{texture:r[2],unit:2}:void 0,u=[];if(e.forEach((e,t)=>"Constant"===e.name&&u.push(t)),1===u.length)n=e[u[0]].parameters.value,o=0===u[0]?new Float32Array([0,1,0,0,0,1,1,0,0]):1===u[0]?new Float32Array([1,0,0,0,0,1,0,1,0]):new Float32Array([1,0,0,0,1,0,0,0,1]);else if(2===u.length){n=e[u[0]].parameters.value,s=e[u[1]].parameters.value;const t=e.findIndex(e=>"Constant"!==e.name);o=0===t?new Float32Array([1,0,0,0,1,0,0,0,1]):1===t?new Float32Array([0,1,0,1,0,0,0,0,1]):new Float32Array([0,0,1,1,0,0,0,1,0])}return{config:{image1Const:n,image2Const:s,imageSwap:o},textures:i?{image1:i,image2:a??null}:void 0}}}export{i as BaseRasterProcessorTechnique};
2
+ import{disposeMaybe as e}from"../../../../../../../../core/maybe.js";import{tileSize as t}from"../../../../definitions.js";import{Technique as r}from"../../Technique.js";import{createNewFBO as n,createProcessedTexture as s}from"./textureUtils.js";import{createColormapTexture as o}from"../../../../../../../webgl/rasterUtils.js";class i extends r{shutdown(e){super.shutdown(e),this._fbo?.dispose(),this._fbo=void 0}render(r,i){const{rasterFunction:a}=r;if(!a)return;const{context:u}=r,c="indexedColormap"in a.parameters?o(u,a.parameters.indexedColormap):void 0,d="Reproject"===a.name,m=u.boundFramebuffer,p=u.getViewport();for(const o of i.bitmaps){const m=d?!(o.rasterTexture&&o.projected):!o.processed;if(!o.source||!m||o.suspended)continue;r.timeline.begin(this.name);const{painter:p}=r;p.setPipelineState({depth:!1,stencil:{test:!1,write:!1},color:{write:[!0,!0,!0,!0],blendMode:"custom",blendParameters:{srcRGB:1,dstRGB:0,srcAlpha:1,dstAlpha:0},blendEquation:32774}}),d||(o.processedTexture=e(o.processedTexture)),o.updateTexture(r);const[f,l]=o.getRasterTextureSize(d),g=f===t&&l===t,x=g?i.processorFbo:n(u,f,l);u.bindFramebuffer(x),u.setViewport(0,0,x.width,x.height),this._process(r,o,c);const h=s(r.context,f,l);if(x.copyToTexture(0,0,f,l,0,0,h),d)o.rasterTexture=h;else{const e=r.hasBranches?a.id:0;o.functionTextures[e]?.dispose(),o.functionTextures[e]=h}g||x.dispose(),r.timeline.end(this.name)}c?.dispose(),u.bindFramebuffer(m),u.setViewport(p.x,p.y,p.width,p.height)}_getCommonConfig(e,t){const{rasterFunction:r,hasBranches:n}=e,{raster:s,rasters:o}=r.parameters,i=n?s?.id??o?.find(e=>"Constant"!==e.name)?.id??-1:0,a=t.functionTextures[i]??t.rasterTexture,u="Reproject"===r.name;return{config:{srcImageSize:t.getRasterTextureSize(u)},textures:{texture:{texture:a,unit:0}}}}_getMultipleInputConfig(e,t){if(!t?.length)return{};if(2===t.length){const{config:r,textures:n}=this._getTwoInputConfig(t,e);return{twoRasterConfig:r,twoRasterTextures:n}}if(3===t.length){const{config:r,textures:n}=this._getThreeInputConfig(t,e);return{threeRasterConfig:r,threeRasterTextures:n}}return{}}_getConstantCount(e){return e?.filter(e=>"Constant"===e.name).length??0}_getTextures(e,t){return e.filter(e=>"Constant"!==e.name).map(e=>null!=e.id&&"Identity"!==e.name?t.functionTextures[e.id]:t.rasterTexture)}_getTwoInputConfig(e,t){const r=this._getTextures(e,t),n=r[1]?{texture:r[1],unit:1}:void 0,s=e.findIndex(e=>"Constant"===e.name),o=0===s?new Float32Array([0,1,0,1,0,0,0,0,0]):new Float32Array([1,0,0,0,1,0,0,0,0]);return{config:{image1Const:s>-1?e[s].parameters.value:0,imageSwap:o},textures:n?{image1:n}:void 0}}_getThreeInputConfig(e,t){const r=this._getTextures(e,t);let n=0,s=0,o=new Float32Array([1,0,0,0,1,0,0,0,1]);const i=r[1]?{texture:r[1],unit:1}:void 0,a=r[2]?{texture:r[2],unit:2}:void 0,u=[];if(e.forEach((e,t)=>"Constant"===e.name&&u.push(t)),1===u.length)n=e[u[0]].parameters.value,o=0===u[0]?new Float32Array([0,1,0,0,0,1,1,0,0]):1===u[0]?new Float32Array([1,0,0,0,0,1,0,1,0]):new Float32Array([1,0,0,0,1,0,0,0,1]);else if(2===u.length){n=e[u[0]].parameters.value,s=e[u[1]].parameters.value;const t=e.findIndex(e=>"Constant"!==e.name);o=0===t?new Float32Array([1,0,0,0,1,0,0,0,1]):1===t?new Float32Array([0,1,0,1,0,0,0,0,1]):new Float32Array([0,0,1,1,0,0,0,1,0])}return{config:{image1Const:n,image2Const:s,imageSwap:o},textures:i?{image1:i,image2:a??null}:void 0}}}export{i as BaseRasterProcessorTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{destroyMaybe as e}from"../../../../../../../core/maybe.js";import{backbufferStencilVisible as t}from"../../../definitions.js";import{SimpleMesh as s}from"../../../meshing/SimpleMesh.js";import{Technique as i}from"../Technique.js";import{BitBlitShader as r}from"../shaders/BitBlitShader.js";import{DataType as o,PrimitiveType as n}from"../../../../../../webgl/enums.js";const m={write:!1,test:{compare:514,op:{fail:7680,zFail:7680,zPass:7680},mask:255}};class h extends i{constructor(){super(...arguments),this.type=5,this.shaders={bitBlit:new r},this._mesh=null}shutdown(){this._mesh=e(this._mesh)}render(e,s){const{context:i,painter:r}=e,o=s.opacity??1,n=!0===s.clipToVisibleRegion;s.texture.setSamplingMode(s.samplingMode);const h={color:{write:[!0,!0,!0,!0],blendMode:"custom",blendParameters:{srcRGB:1,dstRGB:771,srcAlpha:1,dstAlpha:771}},depth:!1,stencil:!!n&&m};r.setPipelineState(h);const a=n?{stencilRef:t}:void 0;r.submitDrawMesh(i,{shader:this.shaders.bitBlit,uniforms:{config:{opacity:o}},textures:{texture:{texture:s.texture,unit:0}},defines:null,optionalAttributes:null,useComputeBuffer:!1},this._getMesh(e),a)}_getMesh(e){return this._mesh??=s.createForShader(e.context,{primitive:n.TRIANGLE_STRIP,vertex:new Int8Array([-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,1,1,1]),layout:{pos:{type:o.BYTE,count:2},tex:{type:o.BYTE,count:2}}}),this._mesh}}export{h as BitBlitTechnique};
2
+ import{destroyMaybe as e}from"../../../../../../../core/maybe.js";import{backbufferStencilVisible as t}from"../../../definitions.js";import{SimpleMesh as s}from"../../../meshing/SimpleMesh.js";import{Technique as i}from"../Technique.js";import{BitBlitShader as o}from"../shaders/BitBlitShader.js";import{DataType as r,PrimitiveType as n}from"../../../../../../webgl/enums.js";const m={write:!1,test:{compare:514,op:{fail:7680,zFail:7680,zPass:7680},mask:255}};class h extends i{constructor(){super(...arguments),this.type=5,this.shaders={bitBlit:new o},this._mesh=null}shutdown(){this._mesh=e(this._mesh)}render(e,s){const{context:i,painter:o}=e,r=s.opacity??1,n=!0===s.clipToVisibleRegion;s.texture.setSamplingMode(s.samplingMode);const h={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:!!n&&m};o.setPipelineState(h);const p=n?{stencilRef:t}:void 0;o.submitDrawMesh(i,{shader:this.shaders.bitBlit,uniforms:{config:{opacity:r}},textures:{texture:{texture:s.texture,unit:0}},defines:null,optionalAttributes:null,useComputeBuffer:!1},this._getMesh(e),p)}_getMesh(e){return this._mesh??=s.createForShader(e.context,{primitive:n.TRIANGLE_STRIP,vertex:new Int8Array([-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,1,1,1]),layout:{pos:{type:r.BYTE,count:2},tex:{type:r.BYTE,count:2}}}),this._mesh}}export{h as BitBlitTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../../../../../../../core/has.js";import{textureBindingHighlight0 as e,textureBindingHighlight1 as t}from"../../../definitions.js";import{alphaToRgbaChannelSelectorMatrix as r,rgbaToRgbaChannelSelectorMatrix as i,sigma as s}from"../../../effects/highlight/parameters.js";import{Technique as o}from"../Technique.js";import{HighlightShadeShader as n,HighlightBlurShader as a}from"../shaders/HighlightShader.js";import{BitBlitTechnique as h}from"./BitBlitTechnique.js";const u=[!1,!1,!1,!0];class l extends o{constructor(){super(...arguments),this.type=7,this.shaders={blur:new a,shade:new n},this._bitBlitTechnique=new h}shutdown(){this._bitBlitTechnique.shutdown()}render(e,t){this._prepareTarget(e,{target:t.maskFbo,viewport:t.highlightViewport}),this._bitBlitTechnique.render(e,{texture:t.sourceTexture,samplingMode:9728}),this._preBlur(e,{texture:t.maskTexture,size:t.highlightWidth,target:t.partialMapFbo,viewport:t.highlightViewport}),this._finalBlur(e,{texture:t.partialMapTexture,size:t.highlightHeight,target:t.maskFbo,viewport:t.highlightViewport}),this._shade(e,{texture:t.maskTexture,gradient:t.gradient,target:t.outputTarget,viewport:t.outputViewport})}_preBlur(e,t){this._renderBlur(e,{...t,direction:[1,0,1/t.size,0],channelSelector:r,colorWrite:t.colorWrite??u})}_finalBlur(e,t){this._renderBlur(e,{...t,direction:[0,1,0,1/t.size],channelSelector:i,colorWrite:t.colorWrite??u})}_shade(e,t){this._renderShade(e,t)}_renderBlur(t,r){const{context:i,painter:o}=t,n={color:{write:r.colorWrite,blendMode:"none"},depth:!1,stencil:!1};o.setPipelineState(n),this._prepareTarget(t,r),o.submitDrawMesh(i,{shader:this.shaders.blur,uniforms:{config:{direction:r.direction,channelSelector:r.channelSelector,sigma:s}},textures:{texture:{unit:e,texture:r.texture}},defines:null,optionalAttributes:null,useComputeBuffer:!1},o.quadMesh)}_renderShade(r,i){const{context:o,painter:n}=r,a=i.gradient.getProgramState(o),h={color:{write:[!0,!0,!0,!0],blendMode:"custom",blendParameters:{srcRGB:1,dstRGB:771,srcAlpha:1,dstAlpha:771}},depth:!1,stencil:!1};n.setPipelineState(h),this._prepareTarget(r,i),n.submitDrawMesh(o,{shader:this.shaders.shade,uniforms:{config:{sigma:s,minMaxDistance:a.minMaxDistance}},textures:{texture:{unit:e,texture:i.texture},shade:{unit:t,texture:a.shadeTexture}},defines:null,optionalAttributes:null,useComputeBuffer:!1},n.quadMesh)}_prepareTarget(e,t){const{context:r}=e;null!=t.viewport&&r.setViewport(...t.viewport),r.bindFramebuffer(t.target)}}export{l as HighlightTechnique};
2
+ import"../../../../../../../core/has.js";import{textureBindingHighlight0 as e,textureBindingHighlight1 as t}from"../../../definitions.js";import{alphaToRgbaChannelSelectorMatrix as r,rgbaToRgbaChannelSelectorMatrix as i,sigma as s}from"../../../effects/highlight/parameters.js";import{Technique as o}from"../Technique.js";import{HighlightShadeShader as n,HighlightBlurShader as a}from"../shaders/HighlightShader.js";import{BitBlitTechnique as h}from"./BitBlitTechnique.js";const u=[!1,!1,!1,!0];class l extends o{constructor(){super(...arguments),this.type=7,this.shaders={blur:new a,shade:new n},this._bitBlitTechnique=new h}shutdown(){this._bitBlitTechnique.shutdown()}render(e,t){this._prepareTarget(e,{target:t.maskFbo,viewport:t.highlightViewport}),this._bitBlitTechnique.render(e,{texture:t.sourceTexture,samplingMode:9728}),this._preBlur(e,{texture:t.maskTexture,size:t.highlightWidth,target:t.partialMapFbo,viewport:t.highlightViewport}),this._finalBlur(e,{texture:t.partialMapTexture,size:t.highlightHeight,target:t.maskFbo,viewport:t.highlightViewport}),this._shade(e,{texture:t.maskTexture,gradient:t.gradient,target:t.outputTarget,viewport:t.outputViewport})}_preBlur(e,t){this._renderBlur(e,{...t,direction:[1,0,1/t.size,0],channelSelector:r,colorWrite:t.colorWrite??u})}_finalBlur(e,t){this._renderBlur(e,{...t,direction:[0,1,0,1/t.size],channelSelector:i,colorWrite:t.colorWrite??u})}_shade(e,t){this._renderShade(e,t)}_renderBlur(t,r){const{context:i,painter:o}=t,n={color:{write:r.colorWrite,blendMode:"none"},depth:!1,stencil:!1};o.setPipelineState(n),this._prepareTarget(t,r),o.submitDrawMesh(i,{shader:this.shaders.blur,uniforms:{config:{direction:r.direction,channelSelector:r.channelSelector,sigma:s}},textures:{texture:{unit:e,texture:r.texture}},defines:null,optionalAttributes:null,useComputeBuffer:!1},o.quadMesh)}_renderShade(r,i){const{context:o,painter:n}=r,a=i.gradient.getProgramState(o),h={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:!1};n.setPipelineState(h),this._prepareTarget(r,i),n.submitDrawMesh(o,{shader:this.shaders.shade,uniforms:{config:{sigma:s,minMaxDistance:a.minMaxDistance}},textures:{texture:{unit:e,texture:i.texture},shade:{unit:t,texture:a.shadeTexture}},defines:null,optionalAttributes:null,useComputeBuffer:!1},n.quadMesh)}_prepareTarget(e,t){const{context:r}=e;null!=t.viewport&&r.setViewport(...t.viewport),r.bindFramebuffer(t.target)}}export{l as HighlightTechnique};