@arcgis/core 5.2.0-next.43 → 5.2.0-next.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0115681a3de6df0aebdf.js +1 -0
- package/assets/esri/core/workers/chunks/025caafc70ac26f0a4ed.js +1 -0
- package/assets/esri/core/workers/chunks/{9de18cea5780319302cb.js → 04a167c110fb7811169d.js} +1 -1
- package/assets/esri/core/workers/chunks/{72fe7fb03c156f26a589.js → 08e18fb12533fc76e49c.js} +1 -1
- package/assets/esri/core/workers/chunks/{60e8524d324fd14444d7.js → 0a0732ba8271d7dc985c.js} +1 -1
- package/assets/esri/core/workers/chunks/0e64e20fedfe01a1985f.js +1 -0
- package/assets/esri/core/workers/chunks/{e6b5c015205d38abe037.js → 127b111ee53e4b9184f8.js} +1 -1
- package/assets/esri/core/workers/chunks/15351354afcbf840a23d.js +29 -0
- package/assets/esri/core/workers/chunks/{2d7cfc68a38dabd8898a.js → 176c5eaaa23a479c88e0.js} +1 -1
- package/assets/esri/core/workers/chunks/1d1f5578c7d8619f7a46.js +1 -0
- package/assets/esri/core/workers/chunks/268637fd6c50264acfc3.js +1 -0
- package/assets/esri/core/workers/chunks/296fa9fb80e521c30cb1.js +1 -0
- package/assets/esri/core/workers/chunks/{d7775ed1402946e414ef.js → 2974cddb0b0f67df7d2d.js} +1 -1
- package/assets/esri/core/workers/chunks/2c0d92c0e3511775401a.js +29 -0
- package/assets/esri/core/workers/chunks/{ce2320e7b9c4ca96ff27.js → 3252da57b800356116af.js} +1 -1
- package/assets/esri/core/workers/chunks/{fd47ee8598e37fea03fe.js → 384b619854ef8a3f6e94.js} +1 -1
- package/assets/esri/core/workers/chunks/3af923abeb6e65c4468f.js +1 -0
- package/assets/esri/core/workers/chunks/{20fefb9278501781de14.js → 3f4f1595c8a77d072b04.js} +1 -1
- package/assets/esri/core/workers/chunks/4f09f208ece2ec1db727.js +1 -0
- package/assets/esri/core/workers/chunks/{f1f3fe9d2d96578f4f6b.js → 52efa4ded11c1e71f04f.js} +1 -1
- package/assets/esri/core/workers/chunks/{57a1e2b716b74f0124f7.js → 549295a5db9bf1536491.js} +1 -1
- package/assets/esri/core/workers/chunks/{284e88805184334396fe.js → 57374213084bef59b776.js} +1 -1
- package/assets/esri/core/workers/chunks/{2a8d791aef3123e6a3c4.js → 57970d43cdcc5cf57a30.js} +1 -1
- package/assets/esri/core/workers/chunks/5f9c4dad6952c4c58ebf.js +1 -0
- package/assets/esri/core/workers/chunks/706230b70a36d2e038f7.js +1 -0
- package/assets/esri/core/workers/chunks/{4063ea53cba3dd897e53.js → 728ea88e7d4733230e1f.js} +71 -72
- package/assets/esri/core/workers/chunks/{e2f45990d8459d14cb90.js → 76713b700e053f8bad29.js} +1 -1
- package/assets/esri/core/workers/chunks/{d082de5dd83bd73d209b.js → 8026cc0065f6520c4161.js} +1 -1
- package/assets/esri/core/workers/chunks/93e705c1147cc8ceca02.js +1 -0
- package/assets/esri/core/workers/chunks/a8033e606b2db1ee332d.js +1 -0
- package/assets/esri/core/workers/chunks/{7684f0c771d312e05bb4.js → ad5c2b0de6713d0a93a4.js} +58 -58
- package/assets/esri/core/workers/chunks/{9b1199104a6822ab7340.js → ae9f9e975d7a9d442fa5.js} +1 -1
- package/assets/esri/core/workers/chunks/{6f408397e2c8a2ea9805.js → aea247138617e12b699b.js} +1 -1
- package/assets/esri/core/workers/chunks/{26e7884d8639df4d994b.js → b03dcf3d55266745f3d1.js} +1 -1
- package/assets/esri/core/workers/chunks/b3cd17daf5a297b96705.js +29 -0
- package/assets/esri/core/workers/chunks/{c0637d1c9337a6ba46b0.js → b3cefc1895bfd62fc440.js} +1 -1
- package/assets/esri/core/workers/chunks/{89682d9d4f606f82056b.js → bac4d4a9f3a9b7f6864d.js} +2 -2
- package/assets/esri/core/workers/chunks/{2f29f08cddd5add9388e.js → c01a121ebe571a848452.js} +1 -1
- package/assets/esri/core/workers/chunks/c3cd38ca8690286d40d7.js +1 -0
- package/assets/esri/core/workers/chunks/{c1845682cc9a5aac8703.js → c4b13124a9cfc78c42a6.js} +6 -6
- package/assets/esri/core/workers/chunks/c5e36544b2d1792e4c5f.js +1 -0
- package/assets/esri/core/workers/chunks/c6042825f61cd70d54d8.js +1 -0
- package/assets/esri/core/workers/chunks/{0646524250bb9fe82935.js → d8b67ca02cdc1e8191e3.js} +1 -1
- package/assets/esri/core/workers/chunks/db416ba3132034e20642.js +1 -0
- package/assets/esri/core/workers/chunks/{96d5fed0235558c0e348.js → e9c48630757bea465b7e.js} +1 -1
- package/assets/esri/core/workers/chunks/{e9511627418c6864148a.js → ed988360264574cd8f6b.js} +1 -1
- package/assets/esri/core/workers/chunks/f9b2727b41943d83d4ca.js +1 -0
- package/assets/esri/core/workers/chunks/{d45e30f15142b5861111.js → fc880b275f5eaf42171e.js} +1 -1
- package/assets/esri/libs/basisu/basis_encoder.wasm +0 -0
- package/assets/esri/libs/dxtEncoder/dxt_encoder.wasm +0 -0
- package/chunks/CutFillComposition.glsl.js +2 -2
- package/chunks/CutFillReduction.glsl.js +1 -1
- package/chunks/EmissionComposite.glsl.js +2 -0
- package/chunks/FocusAreaColor.glsl.js +1 -1
- package/chunks/Fog.glsl.js +20 -20
- package/chunks/GlobalIllumination.glsl.js +25 -25
- package/chunks/GlobalIlluminationBlur.glsl.js +1 -1
- package/chunks/GlowBlur.glsl.js +16 -18
- package/chunks/GlowComposite.glsl.js +35 -0
- package/chunks/Laserline.glsl.js +13 -13
- package/chunks/LaserlinePath.glsl.js +11 -10
- package/chunks/OITAddEmission.glsl.js +1 -1
- package/chunks/Precipitation.glsl.js +6 -6
- package/chunks/ShadowCastVisualize.glsl.js +2 -2
- package/chunks/ShadowHighlight.glsl.js +3 -3
- package/chunks/Viewshed.glsl.js +3 -3
- package/chunks/basis_encoder.js +1 -1
- package/chunks/dxt_encoder.js +1 -1
- package/config.js +1 -1
- package/core/screenUtils.js +1 -1
- package/core/types.d.ts +7 -0
- package/geometry/support/aaBoundingBox.js +1 -1
- package/geometry/support/frustum.js +1 -1
- package/kernel.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/package.json +2 -2
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/Painter.js +1 -1
- package/views/2d/webglDeps.js +1 -1
- package/views/3d/environment/CloudyWeather.js +1 -1
- package/views/3d/environment/FoggyWeather.js +1 -1
- package/views/3d/environment/RainyWeather.js +1 -1
- package/views/3d/environment/SnowyWeather.js +1 -1
- package/views/3d/environment/SunnyWeather.js +1 -1
- package/views/3d/input/SceneInputManager.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/i3s/I3SGeometryUtil.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
- package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
- package/views/3d/layers/i3s/I3SUtil.js +1 -1
- package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
- package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
- package/views/3d/support/debugFlags.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
- package/views/3d/support/hitTest.js +1 -1
- package/views/3d/support/intersectionHitUtils.js +2 -0
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl-engine/Stage.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticBVH.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticComponentGeometryBVH.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectFixedBVH.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ElevationAgnosticBVH.js +1 -1
- package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +12 -12
- package/views/3d/webgl-engine/collections/Component/Transform.js +1 -1
- package/views/3d/webgl-engine/collections/Component/UniformComponentParameters.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/output/getEmissions.glsl.js +8 -0
- package/views/3d/webgl-engine/core/shaderLibrary/util/blendEmission.glsl.js +2 -0
- package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaVisualization.js +1 -1
- package/views/3d/webgl-engine/effects/fog/Fog.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
- 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/glow/Glow.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowBlur.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowComposite.glsl.js +2 -0
- package/views/3d/webgl-engine/effects/glow/GlowCompositeTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/Laserline.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserlinePath.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/precipitation/Precipitation.js +1 -1
- package/views/3d/webgl-engine/effects/precipitation/PrecipitationTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITAddEmission.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlendFragmentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/oitBlendFragment.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillComputation.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillVisualization.js +1 -1
- package/views/3d/webgl-engine/lib/EmissionComposite.glsl.js +2 -0
- package/views/3d/webgl-engine/lib/EmissionComposite.js +2 -0
- package/views/3d/webgl-engine/lib/EmissionCompositeTechnique.js +2 -0
- package/views/3d/webgl-engine/lib/HUDIntersectorResult.js +1 -1
- package/views/3d/webgl-engine/lib/Intersector.js +1 -1
- package/views/3d/webgl-engine/lib/IntersectorResult.js +1 -1
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/views/3d/webgl-engine/lib/PolygonIntersectionResults.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
- package/views/3d/webgl-engine/lib/screenPolygonOverlapUtils.js +1 -1
- package/views/3d/webgl-engine/lib/screenPolygonTriangleIntersections.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillComposition.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/EmissiveTechniqueConfiguration.js +2 -0
- package/views/3d/webgl-engine/shaders/GaussianSplatCompositionTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +2 -2
- package/views/3d/webgl-engine/shaders/ViewshedTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/{oitResolution.glsl.js → floatBlendScale.glsl.js} +1 -1
- package/views/SceneView.d.ts +4 -3
- package/views/SceneView.js +1 -1
- package/views/input/BrowserEventSource.js +1 -1
- package/views/input/InputManager.js +1 -1
- package/views/support/TextureCompressionWorker.js +1 -1
- package/views/support/TextureCompressionWorkerHandle.js +1 -1
- package/views/support/imageReprojection.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/0d6afba80d2f8dcb5cf7.js +0 -1
- package/assets/esri/core/workers/chunks/1276df03201c1b855fee.js +0 -1
- package/assets/esri/core/workers/chunks/23570397304969f724b3.js +0 -1
- package/assets/esri/core/workers/chunks/34fcb776e4de1d870bbd.js +0 -30
- package/assets/esri/core/workers/chunks/474ea8c97d101e41b3f5.js +0 -1
- package/assets/esri/core/workers/chunks/7cb0681cc6a5e956cb15.js +0 -1
- package/assets/esri/core/workers/chunks/8b73694d5a97638a3a61.js +0 -1
- package/assets/esri/core/workers/chunks/8dee03779b569f233daf.js +0 -1
- package/assets/esri/core/workers/chunks/9ebc98746b1f085b82b7.js +0 -1
- package/assets/esri/core/workers/chunks/9ee3741eef73f3edb18b.js +0 -1
- package/assets/esri/core/workers/chunks/af97e19516dbbcfb5286.js +0 -1
- package/assets/esri/core/workers/chunks/b4047333265a2665aef9.js +0 -1
- package/assets/esri/core/workers/chunks/ca419858910af5505d3d.js +0 -1
- package/assets/esri/core/workers/chunks/cce83896093279c70449.js +0 -1
- package/assets/esri/core/workers/chunks/d5561dff043789494845.js +0 -1
- package/assets/esri/core/workers/chunks/dedf678490572c500a19.js +0 -30
- package/assets/esri/core/workers/chunks/e2c9393bec747f7876bb.js +0 -1
- package/assets/esri/core/workers/chunks/e94f2d6037fba042dc6e.js +0 -1
- package/assets/esri/core/workers/chunks/ec1a2e68957fae48e60b.js +0 -30
- package/assets/esri/core/workers/chunks/f5d7f69047e1b1116202.js +0 -1
- package/chunks/GlowComposition.glsl.js +0 -39
- package/views/2d/engine/webgl/MaterialManager.js +0 -2
- package/views/2d/engine/webgl/shaders/MaterialPrograms.js +0 -2
- package/views/2d/engine/webgl/shaders/sources/resolver.js +0 -2
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +0 -2
- package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +0 -9
- package/views/3d/webgl-engine/effects/fog/FogTechniqueConfiguration.js +0 -2
- package/views/3d/webgl-engine/effects/glow/GlowBlurTechniqueConfiguration.js +0 -2
- package/views/3d/webgl-engine/effects/glow/GlowComposition.glsl.js +0 -2
- package/views/3d/webgl-engine/effects/glow/GlowCompositionTechnique.js +0 -2
- package/views/3d/webgl-engine/effects/glow/GlowCompositionTechniqueConfiguration.js +0 -2
- package/views/webgl/ShaderCompiler.js +0 -2
- /package/assets/esri/core/workers/chunks/{89682d9d4f606f82056b.js.LICENSE.txt → bac4d4a9f3a9b7f6864d.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{lerp as t,smoothstep as i}from"../../../../../core/mathUtils.js";import{disposeMaybe as r}from"../../../../../core/maybe.js";import{watch as s,syncAndInitial as o}from"../../../../../core/reactiveUtils.js";import{subclass as a}from"../../../../../core/accessorSupport/decorators.js";import{set as n}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{length as h}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{earth as m}from"../../../../../geometry/support/Ellipsoid.js";import{TransparentEnvironment as u}from"../TransparentEnvironment.js";import{H as d}from"../../../../../chunks/HazeCompositing.glsl.js";import{HazeCompositingTechnique as p}from"./HazeCompositingTechnique.js";import{HazePassParameters as c,HazeTechnique as f}from"./HazeTechnique.js";import{HazeTechniqueConfiguration as l}from"./HazeTechniqueConfiguration.js";import{createQuadVAO as _}from"../../lib/glUtil3D.js";import{applyTextureResizeModulo as b}from"../../lib/textureUtils.js";import{DepthStencilAttachment as g,ColorAttachment0 as w,PrimitiveType as P}from"../../../../webgl/enums.js";let v=class extends u{constructor(e){super(e),this._compositingPassParameters=new d,this._passParameters=new c,this._hazeConfiguration=new l,this._oldAmount=1,this._newAmount=1,this._amount=this._newAmount}initialize(){this.addHandles([s(()=>this.view.environment.atmosphereEnabled,e=>e?this._enable():this._disable(),o),s(()=>this.view.stage?.renderer.renderContext.bind.clouds.fadeFactor??1,e=>this._fade(e),o),s(()=>this.view.environment.weather.type,e=>this._newAmount="rainy"===e?0:1,o),s(()=>this.view.stage.renderer?.highResolutionAtmosphere,e=>this._hazeConfiguration.reduced=!e,o)])}_fade(e){e>=1?(this._amount=this._newAmount,this._oldAmount=this._newAmount):this._amount=e<=0?this._oldAmount:t(this._oldAmount,this._newAmount,e)}destroy(){this._vao=r(this._vao)}render(){const e=this.input;if(!this.bindParameters.mainDepth)return e;const i=this.techniques.getCompiled(f,this._hazeConfiguration),r=!!this._hazeConfiguration.reduced&&this.techniques.getCompiled(p);if(null==i||null==r)return e;const s=this.renderingContext,o=e.getAttachment(g);if(this._update(),!r)return e.detachDepth(),s.bindFramebuffer(e.fbo),s.bindTechnique(i,this.bindParameters,this._passParameters),s.setDrawBuffers([w]),this._renderCommon(s),e.attachDepth(o),e;const a=s.getViewport(),n=this.camera,u=h(n.eye)-m.radius;let d;const c=m.atmosphereHeight;if(u<c){const e=Math.min(1,Math.max(0,u/c));d=t(.4,.5,e)}else{const e=Math.min(1,Math.max(0,(u-c)/(15*c)));d=t(.5,1,e)}const l=this.renderingContext.parameters.maxTextureSize,_=b(Math.round(d*n.fullViewport[2]),l),P=b(Math.round(d*n.fullViewport[3]),l);s.setViewport(0,0,_,P);const v=this.fboCache.acquire(_,P,"haze"
|
|
2
|
+
import{__decorate as e}from"tslib";import{lerp as t,smoothstep as i}from"../../../../../core/mathUtils.js";import{disposeMaybe as r}from"../../../../../core/maybe.js";import{watch as s,syncAndInitial as o}from"../../../../../core/reactiveUtils.js";import{subclass as a}from"../../../../../core/accessorSupport/decorators.js";import{set as n}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{length as h}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{earth as m}from"../../../../../geometry/support/Ellipsoid.js";import{TransparentEnvironment as u}from"../TransparentEnvironment.js";import{H as d}from"../../../../../chunks/HazeCompositing.glsl.js";import{HazeCompositingTechnique as p}from"./HazeCompositingTechnique.js";import{HazePassParameters as c,HazeTechnique as f}from"./HazeTechnique.js";import{HazeTechniqueConfiguration as l}from"./HazeTechniqueConfiguration.js";import{createQuadVAO as _}from"../../lib/glUtil3D.js";import{applyTextureResizeModulo as b}from"../../lib/textureUtils.js";import{DepthStencilAttachment as g,ColorAttachment0 as w,PrimitiveType as P}from"../../../../webgl/enums.js";let v=class extends u{constructor(e){super(e),this._compositingPassParameters=new d,this._passParameters=new c,this._hazeConfiguration=new l,this._oldAmount=1,this._newAmount=1,this._amount=this._newAmount}initialize(){this.addHandles([s(()=>this.view.environment.atmosphereEnabled,e=>e?this._enable():this._disable(),o),s(()=>this.view.stage?.renderer.renderContext.bind.clouds.fadeFactor??1,e=>this._fade(e),o),s(()=>this.view.environment.weather.type,e=>this._newAmount="rainy"===e?0:1,o),s(()=>this.view.stage.renderer?.highResolutionAtmosphere,e=>this._hazeConfiguration.reduced=!e,o)])}_fade(e){e>=1?(this._amount=this._newAmount,this._oldAmount=this._newAmount):this._amount=e<=0?this._oldAmount:t(this._oldAmount,this._newAmount,e)}destroy(){this._vao=r(this._vao)}render(){const e=this.input;if(!this.bindParameters.mainDepth)return e;const i=this.techniques.getCompiled(f,this._hazeConfiguration),r=!!this._hazeConfiguration.reduced&&this.techniques.getCompiled(p);if(null==i||null==r)return e;const s=this.renderingContext,o=e.getAttachment(g);if(this._update(),!r)return e.detachDepth(),s.bindFramebuffer(e.fbo),s.bindTechnique(i,this.bindParameters,this._passParameters),s.setDrawBuffers([w]),this._renderCommon(s),e.attachDepth(o),e;const a=s.getViewport(),n=this.camera,u=h(n.eye)-m.radius;let d;const c=m.atmosphereHeight;if(u<c){const e=Math.min(1,Math.max(0,u/c));d=t(.4,.5,e)}else{const e=Math.min(1,Math.max(0,(u-c)/(15*c)));d=t(.5,1,e)}const l=this.renderingContext.parameters.maxTextureSize,_=b(Math.round(d*n.fullViewport[2]),l),P=b(Math.round(d*n.fullViewport[3]),l);s.setViewport(0,0,_,P);const v=this.fboCache.acquire(_,P,"haze");return s.bindFramebuffer(v.fbo),s.clearFramebuffer([0,0,0,1],!0,!0),s.bindTechnique(i,this.bindParameters,this._passParameters),this._renderCommon(s),s.setViewport(a.x,a.y,a.width,a.height),this._compositingPassParameters.color=v.getTexture(),e.detachDepth(),s.bindFramebuffer(e.fbo),s.bindTechnique(r,this.bindParameters,this._compositingPassParameters),s.setDrawBuffers([w]),s.screen.draw(),e.attachDepth(o),v.release(),e}_renderCommon(e){this._vao??=_(e,1),e.bindVAO(this._vao),e.drawArrays(P.TRIANGLE_STRIP,0,4)}_update(){const e=this.view.basemapTerrain?.getLowerBoundRadius()??0;n(this._passParameters.radii,e,e+m.atmosphereHeight);const r=h(this.bindParameters.camera.eye);this._passParameters.hazeStrength=t(t(.6,1,i(9500,10500,r-m.radius)),1,this._amount)}};v=e([a("esri.views.3d.webgl-engine.effects.haze.Haze")],v);export{v as Haze};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"../../../../../core/libs/gl-matrix-2/math/vec3.js";import"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../../core/shaderLibrary/NormalFromDepth.glsl.js";import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/shading/calculateUVZShadowFromDepth.glsl.js";import"../../core/shaderLibrary/shading/ShadowmapFiltering.glsl.js";import"../../core/shaderModules/Float3BindUniform.js";import"../../core/shaderModules/Float4PassUniform.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DBindUniform.js";import"../../core/shaderModules/Texture2DShadowBindUniform.js";import"../../core/shaderModules/Texture2DUintPassUniform.js";import"../../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../../chunks/ShadowHighlight.glsl.js";
|
|
2
|
+
import"../../../../../core/libs/gl-matrix-2/math/vec3.js";import"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../../core/shaderLibrary/NormalFromDepth.glsl.js";import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/shading/calculateUVZShadowFromDepth.glsl.js";import"../../core/shaderLibrary/shading/ShadowmapFiltering.glsl.js";import"../../core/shaderLibrary/util/blendEmission.glsl.js";import"../../core/shaderModules/Float3BindUniform.js";import"../../core/shaderModules/Float4PassUniform.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DBindUniform.js";import"../../core/shaderModules/Texture2DShadowBindUniform.js";import"../../core/shaderModules/Texture2DUintPassUniform.js";import"../../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../../chunks/ShadowHighlight.glsl.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{smoothstep as t,clamp as
|
|
2
|
+
import{__decorate as e}from"tslib";import{smoothstep as t,clamp as i}from"../../../../../core/mathUtils.js";import{watch as s,syncAndInitial as a}from"../../../../../core/reactiveUtils.js";import{property as r,subclass as o}from"../../../../../core/accessorSupport/decorators.js";import{normalize as h,set as n,dot as c}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as p}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{RenderNodeOutput as d}from"../../../webgl.js";import m from"../../../webgl/RenderNode.js";import{ShadowHighlightPassParameters as l,ShadowHighlightTechnique as u}from"./ShadowHighlightTechnique.js";import{EmissiveTechniqueConfiguration as g}from"../../shaders/EmissiveTechniqueConfiguration.js";import{defaultShadowOpacity as f,defaultShadowDifference as _,defaultShadowColor as w}from"../../../../support/HighlightDefaults.js";const y=1/512,O=4e4,P=5e4;let v=class extends m{constructor(e){super(e),this.consumes={required:[d.COMPOSITE,"highlights"]},this.produces=d.COMPOSITE,this._configuration=new g,this._passParameters=new l,this._maxOpacity=1,this._shadowDifference=.2}initialize(){this.addHandles([s(()=>this.view.defaultHighlight?.shadowOpacity,e=>{this._passParameters.shadowOpacity=e??f,this._updateOccludedShadowOpacity(),this._ensureMaxOpacity()},a),s(()=>this.view.defaultHighlight?.shadowDifference,e=>{this._shadowDifference=e??_,this._updateOccludedShadowOpacity(),this._ensureMaxOpacity()},a),s(()=>this.view.defaultHighlight?.shadowColor,e=>{this._passParameters.shadowColor=(e??w).toUnitRGBA(),this._ensureMaxOpacity()},a)])}_updateOccludedShadowOpacity(){this._passParameters.occludedShadowOpacity=this._passParameters.shadowOpacity*(1-this._shadowDifference)}_ensureMaxOpacity(){const e=Math.max(this._passParameters.shadowOpacity,this._passParameters.occludedShadowOpacity);this._maxOpacity=e*this._passParameters.shadowColor[3],this.requestRender(1)}precompile(){this._ensureIfVisible()&&(this._configuration.hasEmissive=0!==this.bindParameters.emissions,this.techniques.precompile(u,this._configuration))}render(e){const t=this.input;if(!this._ensureIfVisible())return t;const i=this.bindParameters;this._passParameters.highlightTexture=e.find(({name:e})=>"highlights"===e)?.getTexture(),this._passParameters.origin=i.camera.center;const s=this.renderingContext,a=this.techniques.get(u,this._configuration),r=t.obtainDepthTexture();return s.bindFramebuffer(t.fbo),s.bindTechnique(a,i,this._passParameters),s.screen.draw(),t.attachDepth(r),r?.release(),t}_ensureIfVisible(){const e=this.bindParameters;if(!e.hasShadowHighlights||!e.mainDepth||!e.shadowHighlight?.getTexture())return!1;const{camera:s,lighting:a}=e;this._passParameters.opacityElevation=1-t(O,P,s.relativeElevation);const r=1===this.viewingMode?h(b,s.center):n(b,0,0,1),o=c(r,a.mainLight.direction);return this._passParameters.dayNightTerminator=t(0,1,i(30*o,0,1)),this._maxOpacity*this._passParameters.opacityElevation*this._passParameters.dayNightTerminator>=y}};e([r()],v.prototype,"consumes",void 0),e([r()],v.prototype,"produces",void 0),e([r({constructOnly:!0})],v.prototype,"viewingMode",void 0),v=e([o("esri.views.3d.webgl-engine.effects.highlight.ShadowHighlight")],v);const b=p();export{v as ShadowHighlight};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import"../../../../../core/has.js";import{disposeMaybe as t}from"../../../../../core/maybe.js";import{property as i,subclass as
|
|
2
|
+
import{__decorate as e}from"tslib";import"../../../../../core/has.js";import{disposeMaybe as t}from"../../../../../core/maybe.js";import{property as i,subclass as n}from"../../../../../core/accessorSupport/decorators.js";import{copy as r,add as s}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromRay as a,getStart as o,getEnd as l,create as h}from"../../../../../geometry/support/clipRay.js";import{intersectClipRay as c}from"../../../../../geometry/support/frustum.js";import{copy as d}from"../../../../../geometry/support/lineSegment.js";import{wrap as p}from"../../../../../geometry/support/ray.js";import{InternalRenderCategory as m}from"../../../webgl.js";import u from"../../../webgl/RenderNode.js";import{Blit as g}from"../blit/Blit.js";import{LaserlinePathData as f}from"./LaserlinePathData.js";import{LaserlinePathPassParameters as _,LaserlinePathTechnique as b}from"./LaserlinePathTechnique.js";import{LaserlinePathTechniqueConfiguration as P}from"./LaserlinePathTechniqueConfiguration.js";import{LaserlineTechnique as E}from"./LaserlineTechnique.js";import{LaserlineTechniqueConfiguration as L}from"./LaserlineTechniqueConfiguration.js";import{updateParameters as V}from"../../materials/internal/MaterialUtil.js";let D=class extends u{get requireGeometryDepth(){return!0}constructor(e){super(e),this.isDecoration=!0,this.consumes={required:[m.LASERLINES,"normals"]},this.produces=m.LASERLINES,this._configuration=new L,this._pathConfiguration=new P,this._intersectsLineInfinite=!1,this._pathVerticalPlaneEnabled=!1,this._passParameters=new _,this._blit=new g(e.view.stage.renderView.techniques,2)}initialize(){this._passParameters.renderCoordsHelper=this.view.renderCoordsHelper,this._configuration.spherical=1===this.view.state.viewingMode,this._configuration.contrastControlEnabled=this.contrastControlEnabled,this._pathConfiguration.spherical=1===this.view.state.viewingMode,this._pathConfiguration.contrastControlEnabled=this.contrastControlEnabled}destroy(){this._pathVerticalPlaneData=t(this._pathVerticalPlaneData)}get heightManifoldEnabled(){return this._configuration.heightManifoldEnabled}set heightManifoldEnabled(e){this._configuration.heightManifoldEnabled!==e&&(this._configuration.heightManifoldEnabled=e,this.requestRender(1))}get heightManifoldTarget(){return this._passParameters.heightManifoldTarget}set heightManifoldTarget(e){r(this._passParameters.heightManifoldTarget,e),this.requestRender(1)}get pointDistanceEnabled(){return this._configuration.pointDistanceEnabled}set pointDistanceEnabled(e){e!==this._configuration.pointDistanceEnabled&&(this._configuration.pointDistanceEnabled=e,this.requestRender(1))}get pointDistanceTarget(){return this._passParameters.pointDistanceTarget}set pointDistanceTarget(e){r(this._passParameters.pointDistanceTarget,e),this.requestRender(1)}get pointDistanceOrigin(){return this._passParameters.pointDistanceOrigin}set pointDistanceOrigin(e){r(this._passParameters.pointDistanceOrigin,e),this.requestRender(1)}get lineVerticalPlaneEnabled(){return this._configuration.lineVerticalPlaneEnabled}set lineVerticalPlaneEnabled(e){e!==this._configuration.lineVerticalPlaneEnabled&&(this._configuration.lineVerticalPlaneEnabled=e,this.requestRender(1))}get lineVerticalPlaneSegment(){return this._passParameters.lineVerticalPlaneSegment}set lineVerticalPlaneSegment(e){d(e,this._passParameters.lineVerticalPlaneSegment),this.requestRender(1)}get intersectsLineEnabled(){return this._configuration.intersectsLineEnabled}set intersectsLineEnabled(e){e!==this._configuration.intersectsLineEnabled&&(this._configuration.intersectsLineEnabled=e,this.requestRender(1))}get intersectsLineSegment(){return this._passParameters.intersectsLineSegment}set intersectsLineSegment(e){d(e,this._passParameters.intersectsLineSegment),this.requestRender(1)}get intersectsLineInfinite(){return this._intersectsLineInfinite}set intersectsLineInfinite(e){e!==this._intersectsLineInfinite&&(this._intersectsLineInfinite=e,this.requestRender(1))}get pathVerticalPlaneEnabled(){return this._pathVerticalPlaneEnabled}set pathVerticalPlaneEnabled(e){e!==this._pathVerticalPlaneEnabled&&(this._pathVerticalPlaneEnabled=e,null!=this._pathVerticalPlaneData&&this.requestRender(1))}set pathVerticalPlaneVertices(e){null==this._pathVerticalPlaneData&&(this._pathVerticalPlaneData=new f(this._passParameters.renderCoordsHelper)),this._pathVerticalPlaneData.vertices=e,this.pathVerticalPlaneEnabled&&this.requestRender(1)}set pathVerticalPlaneBuffers(e){null==this._pathVerticalPlaneData&&(this._pathVerticalPlaneData=new f(this._passParameters.renderCoordsHelper)),this._pathVerticalPlaneData.buffers=e,this.pathVerticalPlaneEnabled&&this.requestRender(1)}setParameters(e){V(this._passParameters,e)&&this.requestRender(1)}render(e){const t=this.input;if(this.isDecoration&&!this.bindParameters.decorations)return t;const i=this.renderingContext,n=e.find(({name:e})=>"normals"===e);if(this._passParameters.normals=n?.getTexture(),!this.contrastControlEnabled)return i.bindFramebuffer(t.fbo),this._renderLaserLines(),t;this._passParameters.colors=t.getTexture();const r=this.fboCache.acquire(t.fbo.width,t.fbo.height,"laser lines");return i.bindFramebuffer(r.fbo),i.setClearColor(0,0,0,0),i.clear(16384),this._renderLaserLines(),this._blit.blend(r,t,this.bindParameters)||this.requestRender(1),r.release(),t}_renderLaserLines(){(this.heightManifoldEnabled||this.pointDistanceEnabled||this.lineVerticalPlaneSegment||this.intersectsLineEnabled)&&this._renderUnified(),this.pathVerticalPlaneEnabled&&this._renderPath()}_renderUnified(){if(!this._update())return;const e=this.techniques.getCompiled(E,this._configuration);if(e){const t=this.renderingContext;t.bindTechnique(e,this.bindParameters,this._passParameters),t.screen.draw()}else this.requestRender(1)}_renderPath(){if(null==this._pathVerticalPlaneData)return;const e=this.techniques.getCompiled(b,this._pathConfiguration);if(e){const t=this.renderingContext;this._passParameters.origin=this._pathVerticalPlaneData.origin,t.bindTechnique(e,this.bindParameters,this._passParameters),this._pathVerticalPlaneData.draw(t)}else this.requestRender(1)}_update(){if(this._configuration.hasEmissive=this._pathConfiguration.hasEmissive=0!==this.bindParameters.emissions,!this.intersectsLineEnabled)return!0;const e=this.bindParameters.camera,t=this._passParameters;if(this._intersectsLineInfinite){if(a(p(t.intersectsLineSegment.origin,t.intersectsLineSegment.vector),q),q.c0=-Number.MAX_VALUE,!c(e.frustum,q))return!1;o(q,t.lineStartWorld),l(q,t.lineEndWorld)}else r(t.lineStartWorld,t.intersectsLineSegment.origin),s(t.lineEndWorld,t.intersectsLineSegment.origin,t.intersectsLineSegment.vector);return!0}get test(){}};e([i({constructOnly:!0})],D.prototype,"contrastControlEnabled",void 0),e([i()],D.prototype,"isDecoration",void 0),e([i()],D.prototype,"consumes",void 0),e([i()],D.prototype,"produces",void 0),D=e([n("esri.views.3d.webgl-engine.effects.laserlines.LaserLineRenderer")],D);const q=h();export{D as LaserLineRenderer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"../../../../../core/mathUtils.js";import"../../../../../core/libs/gl-matrix-2/math/vec2.js";import"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../../../../core/libs/gl-matrix-2/math/vec3.js";import"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../../../../../core/libs/gl-matrix-2/math/vec4.js";import"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import"../../../../../geometry/support/lineSegment.js";import"../../../../../geometry/support/plane.js";import"../../core/shaderLibrary/Laserline.glsl.js";import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderModules/Float2PassUniform.js";import"../../core/shaderModules/Float3BindUniform.js";import"../../core/shaderModules/Float3PassUniform.js";import"../../core/shaderModules/Float4PassUniform.js";import"../../core/shaderModules/FloatBindUniform.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../../../webgl/ShaderBuilder.js";export{b as build,d as defaultAngleCutoff}from"../../../../../chunks/Laserline.glsl.js";
|
|
2
|
+
import"../../../../../core/mathUtils.js";import"../../../../../core/libs/gl-matrix-2/math/vec2.js";import"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../../../../core/libs/gl-matrix-2/math/vec3.js";import"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../../../../../core/libs/gl-matrix-2/math/vec4.js";import"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import"../../../../../geometry/support/lineSegment.js";import"../../../../../geometry/support/plane.js";import"../../core/shaderLibrary/Laserline.glsl.js";import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/util/blendEmission.glsl.js";import"../../core/shaderModules/Float2PassUniform.js";import"../../core/shaderModules/Float3BindUniform.js";import"../../core/shaderModules/Float3PassUniform.js";import"../../core/shaderModules/Float4PassUniform.js";import"../../core/shaderModules/FloatBindUniform.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../../../webgl/ShaderBuilder.js";export{b as build,d as defaultAngleCutoff}from"../../../../../chunks/Laserline.glsl.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"../../../../../core/libs/gl-matrix-2/math/mat4.js";import"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import"../../../../../core/libs/gl-matrix-2/math/vec2.js";import"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../core/shaderLibrary/Laserline.glsl.js";import"../../core/shaderModules/Float2BindUniform.js";import"../../core/shaderModules/FloatBindUniform.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Matrix4BindUniform.js";import"../../core/shaderModules/Matrix4PassUniform.js";import"../../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../../chunks/LaserlinePath.glsl.js";
|
|
2
|
+
import"../../../../../core/libs/gl-matrix-2/math/mat4.js";import"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import"../../../../../core/libs/gl-matrix-2/math/vec2.js";import"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../core/shaderLibrary/Laserline.glsl.js";import"../../core/shaderLibrary/util/blendEmission.glsl.js";import"../../core/shaderModules/Float2BindUniform.js";import"../../core/shaderModules/FloatBindUniform.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Matrix4BindUniform.js";import"../../core/shaderModules/Matrix4PassUniform.js";import"../../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../../chunks/LaserlinePath.glsl.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as o}from"tslib";import{
|
|
2
|
+
import{__decorate as o}from"tslib";import{parameter as r}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{EmissiveTechniqueConfiguration as t}from"../../shaders/EmissiveTechniqueConfiguration.js";class e extends t{constructor(){super(...arguments),this.contrastControlEnabled=!1,this.spherical=!1}}o([r()],e.prototype,"contrastControlEnabled",void 0),o([r()],e.prototype,"spherical",void 0);export{e as LaserlinePathTechniqueConfiguration};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import"../../../../../core/has.js";import{lerp as t}from"../../../../../core/mathUtils.js";import{disposeMaybe as
|
|
2
|
+
import{__decorate as e}from"tslib";import"../../../../../core/has.js";import{lerp as t}from"../../../../../core/mathUtils.js";import{disposeMaybe as i}from"../../../../../core/maybe.js";import{watch as s,syncAndInitial as r,sync as n}from"../../../../../core/reactiveUtils.js";import{secondsFromMilliseconds as o}from"../../../../../core/time.js";import{property as a,subclass as d}from"../../../../../core/accessorSupport/decorators.js";import{getReferenceEllipsoid as c}from"../../../../../geometry/ellipsoidUtils.js";import{getContinuousIndexArray as m}from"../../../../../geometry/support/Indices.js";import{InternalRenderCategory as p}from"../../../webgl.js";import{glLayout as h}from"../../../support/buffer/glUtil.js";import{newLayout as f}from"../../../support/buffer/InterleavedLayout.js";import{TransparentEnvironment as u}from"../TransparentEnvironment.js";import{PrecipitationPassParameters as l,PrecipitationTechnique as _}from"./PrecipitationTechnique.js";import{PrecipitationTechniqueConfiguration as b}from"./PrecipitationTechniqueConfiguration.js";import{VertexArrayObject as y}from"../../lib/VertexArrayObject.js";import{PrimitiveType as P}from"../../../../webgl/enums.js";import{bindVertexBufferLayout as w}from"../../../../webgl/Util.js";import{fromLayout as v}from"../../../../webgl/VertexAttributeLocations.js";import{VertexBuffer as g}from"../../../../webgl/VertexBuffer.js";let j=class extends u{constructor(e){super(e),this._hasSnowCover=!1,this._rainSpeed=.1,this._snowSpeed=.01,this._numParticles=0,this._passParameters=new l,this._configuration=new b,this._forcedTime=null;const{view:t,type:i}=e;this._configuration.type="rainy"===i?0:1,this._passParameters.time=0,this._passParameters.radius=c(t.spatialReference).radius,this.addHandles([s(()=>t.environment.weather,e=>{e.type===i&&this.addHandles([s(()=>e.precipitation,e=>this._adjustParticles(e),r),s(()=>"snowy"===e.type&&"enabled"===e.snowCover,e=>this._hasSnowCover=e,r)])},r)]),this.addHandles(s(()=>t.stage?.renderer.renderContext.bind.clouds.fadeFactor??1,e=>{this._passParameters.opacity=e,1===e&&(this.removeHandles("opacity"),this.addHandles(s(()=>t.stage?.renderer.renderContext.bind.clouds.opacity??1,e=>this._passParameters.opacity=e,r),"opacity"))},n),"opacity")}initialize(){this.addHandles([s(()=>this.view.environment.atmosphereEnabled,e=>e?this._enable():this._disable(),r)])}_adjustParticles(e){const i=.35,s=e<.5?t(0,i,2*e):t(i,1,2*(e-.5));this._numParticles=A*s}destroy(){this._numParticles=0,this._vao=i(this._vao),this._instanceIdBuffer=i(this._instanceIdBuffer)}fadeOut(e){this.removeAllHandles(),this.addHandles(s(()=>this.renderContext?.bind.clouds.fadeFactor??1,t=>{this._passParameters.opacity=1-t,1===t&&(this.removeAllHandles(),e())}),"opacity")}get snowCover(){return this._hasSnowCover?this._passParameters.opacity:null}updateAnimation(e){const t=("rainy"===this.type?this._rainSpeed:this._snowSpeed)*o(this._forcedTime??e.time)%1e5;return this._passParameters.time!==t&&(this._passParameters.time=t,!0)}precompile(){this._numParticlesRendered>0&&(this._configuration.hasEmissive=0!==this.bindParameters.emissions,this.techniques.precompile(_,this._configuration))}render(e){const t=e.find(({name:e})=>e===p.TRANSPARENT_ENVIRONMENT);if(this._numParticlesRendered<1)return t;const i=this.renderingContext,s=this.techniques.get(_,this._configuration),r=i.bindTechnique(s,this.bindParameters,this._passParameters);return this._vao??=I(i),i.bindVAO(this._vao),this._bindInstanceIdBuffer(r.locations),r.assertCompatibleVertexAttributeLocations(this._vao,v(x)),i.drawArraysInstanced(P.TRIANGLES,0,3,this._numParticlesRendered),i.unbindBuffer(34962),t}get _numParticlesRendered(){return Math.round(this._numParticles*this._passParameters.opacity)}_bindInstanceIdBuffer(e){const t=this.renderingContext;if(this._instanceIdBuffer)return void t.bindBuffer(this._instanceIdBuffer);const i=m(A);this._instanceIdBuffer=new g(t,x,new Float32Array(i)),w(t,e,this._instanceIdBuffer,0)}get test(){}};function I(e){const t=new Float32Array([-1,0,1,1,0,-1,1,0,1]);return new y(e,new g(e,h(C),t))}e([a({constructOnly:!0})],j.prototype,"type",void 0),j=e([d("esri.views.3d.webgl-engine.effects.precipitation.Precipitation")],j);const A=25e4,C=f().vec3f("position").freeze(),x=h(f().f32("instanceFeatureAttribute"),1);export{j as Precipitation};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{parameter as o
|
|
2
|
+
import{__decorate as e}from"tslib";import{parameter as o}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{EmissiveTechniqueConfiguration as r}from"../../shaders/EmissiveTechniqueConfiguration.js";class t extends r{constructor(){super(...arguments),this.type=0}}e([o({count:2})],t.prototype,"type",void 0);export{t as PrecipitationTechniqueConfiguration};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/util/ColorConversion.glsl.js";import"../../core/shaderLibrary/util/emissionFilter.glsl.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"./oitBlendFragment.glsl.js";import"../../shaders/
|
|
2
|
+
import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/util/ColorConversion.glsl.js";import"../../core/shaderLibrary/util/emissionFilter.glsl.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"./oitBlendFragment.glsl.js";import"../../shaders/floatBlendScale.glsl.js";import"../../shaders/ToneMapping.glsl.js";import"../../../../webgl/ShaderBuilder.js";export{O as OITAddEmissionPassParameters,b as build}from"../../../../../chunks/OITAddEmission.glsl.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{O as e}from"../../../../../chunks/OITAddEmission.glsl.js";import{OITAddEmissionTechnique as i}from"./OITAddEmissionTechnique.js";import{OITBlendFragmentTechniqueConfiguration as s}from"./OITBlendFragmentTechniqueConfiguration.js";import{OITBlendTechnique as t}from"./OITBlendTechnique.js";import{OITBlendTechniqueConfiguration as n}from"./OITBlendTechniqueConfiguration.js";import{OITFilterOpaqueTechnique as r}from"./OITFilterOpaqueTechnique.js";import{
|
|
2
|
+
import{O as e}from"../../../../../chunks/OITAddEmission.glsl.js";import{OITAddEmissionTechnique as i}from"./OITAddEmissionTechnique.js";import{OITBlendFragmentTechniqueConfiguration as s}from"./OITBlendFragmentTechniqueConfiguration.js";import{OITBlendTechnique as t}from"./OITBlendTechnique.js";import{OITBlendTechniqueConfiguration as n}from"./OITBlendTechniqueConfiguration.js";import{OITFilterOpaqueTechnique as r}from"./OITFilterOpaqueTechnique.js";import{FloatBlendScaleConfiguration as o}from"../../shaders/floatBlendScale.glsl.js";import{ColorAttachment1 as a,ColorAttachment2 as u,DrawBufferNone as h}from"../../../../webgl/enums.js";class f{constructor(i){this._techniques=i,this._parameters=new e,this._blendConfiguration=new n,this._filterOpaqueConfiguration=new s,this._addEmissionConfiguration=new o}precompile(e,s,n){this._updateConfigurations(e,s,n);const{hasTransparentEmission:o,hasOpaqueEmission:a}=e;a&&1!==n&&this._techniques.precompile(r,this._filterOpaqueConfiguration),this._techniques.precompile(t,this._blendConfiguration),o&&0===n&&this._techniques.precompile(i,this._addEmissionConfiguration)}blend(e,s,n,o,f,m,d){this._updateConfigurations(o,f,m),this._parameters.colorTexture=s.getTexture(),this._parameters.alphaTexture=s.getTexture(a),this._parameters.emissionTexture=s.getTexture(u),this._parameters.frontFaceTexture=n.getTexture(),this._parameters.frontFaceEmissionTexture=n.getTexture(a);const l=e.drawBuffers,{hasOpaqueEmission:p,hasTransparentEmission:c}=o;if(p&&1!==m){const i=this._techniques.get(r,this._filterOpaqueConfiguration);e.bindTechnique(i,o,this._parameters),e.setDrawBuffers([h,a]),e.screen.draw(),d?.("oit opaque emission filter",e.boundFramebuffer)}const _=this._techniques.get(t,this._blendConfiguration);if(e.bindTechnique(_,o,this._parameters),!p&&c){const i=l.slice();i[1]=h,e.setDrawBuffers(i),e.screen.draw()}else e.setDrawBuffers(l),e.screen.draw();if(d?.("oit composited",e.boundFramebuffer),c&&0===m){const s=this._techniques.get(i,this._addEmissionConfiguration);e.bindTechnique(s,o,this._parameters),e.setDrawBuffers([h,a]),e.screen.draw(),d?.("oit transparent emission",e.boundFramebuffer)}e.setDrawBuffers(l)}_updateConfigurations(e,i,s){this._blendConfiguration.useFloatBlend=this._filterOpaqueConfiguration.useFloatBlend=this._addEmissionConfiguration.useFloatBlend=e.useFloatBlend.value,this._blendConfiguration.computeHudOcclusion=i,this._blendConfiguration.hasOpaqueEmission=0===s&&e.hasOpaqueEmission,this._blendConfiguration.hasEmissionAttachment=0===s&&0!==e.emissions,this._blendConfiguration.frontFaceMask=1===s}}export{f as OITBlend};
|
package/views/3d/webgl-engine/effects/transparency/OITBlendFragmentTechniqueConfiguration.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as o}from"tslib";import{parameter as r}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{
|
|
2
|
+
import{__decorate as o}from"tslib";import{parameter as r}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{FloatBlendScaleConfiguration as e}from"../../shaders/floatBlendScale.glsl.js";class s extends e{constructor(){super(...arguments),this.frontFaceMask=!1}}o([r()],s.prototype,"frontFaceMask",void 0);export{s as OITBlendFragmentTechniqueConfiguration};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{If as e}from"../../core/shaderModules/glsl.js";import{Texture2DPassUniform as r}from"../../core/shaderModules/Texture2DPassUniform.js";import{alphaCutoff as t}from"../../shaders/alphaCutoff.glsl.js";import{
|
|
2
|
+
import{If as e}from"../../core/shaderModules/glsl.js";import{Texture2DPassUniform as r}from"../../core/shaderModules/Texture2DPassUniform.js";import{alphaCutoff as t}from"../../shaders/alphaCutoff.glsl.js";import{floatBlendScale as o}from"../../shaders/floatBlendScale.glsl.js";import{NoParameters as n}from"../../../../webgl/NoParameters.js";class a extends n{}function l(n,a){const{frontFaceMask:l,useFloatBlend:c}=a;n.include(o,a),n.include(t),n.uniforms.add(new r("colorTexture",e=>e.colorTexture),new r("alphaTexture",e=>e.alphaTexture),new r("frontFaceTexture",e=>e.frontFaceTexture)).code.add(`\n vec4 oitBlendFragment(sampler2D colorTex, sampler2D frontFaceTex, float frontFaceScale) {\n float srcAlpha = texture(alphaTexture, uv).r * floatBlendInputScale;\n if(srcAlpha < alphaCutoff) {\n return vec4(0.0);\n }\n vec4 frontFace = texture(frontFaceTex, uv);\n ${e(l,"if (frontFace.a == 0.0) return vec4(0.0);")}\n\n vec4 srcColor = texture(colorTex, uv);\n srcColor.rgb *= floatBlendInputScale / srcAlpha;\n\n ${e(!c,"float frontWeight = srcAlpha * floatBlendOutputScale;\n frontWeight = clamp((frontWeight - 0.9) * 10.0, 0.0, 1.0);\n\n float toAlpha = (1.0 + frontFace.a) * 0.5;\n frontFace.a = mix(frontFace.a, toAlpha, frontWeight);")}\n return vec4(mix(srcColor.rgb, frontFace.rgb * frontFaceScale, frontFace.a), 1.0 - srcColor.a);\n }\n\n vec4 oitBlendFragment() {\n return oitBlendFragment(colorTexture, frontFaceTexture, 1.0);\n }\n `)}export{a as OITBlendFragmentPassParameters,l as oitBlendFragment};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{nextPowerOfTwo as t}from"../../../../core/mathUtils.js";import{disposeMaybe as i,destroyMaybe as r}from"../../../../core/maybe.js";import{property as s,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{ortho as o}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{set as n}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{create as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UNIT_X as d,ZEROS as c}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{InternalRenderCategory as
|
|
2
|
+
import{__decorate as e}from"tslib";import{nextPowerOfTwo as t}from"../../../../core/mathUtils.js";import{disposeMaybe as i,destroyMaybe as r}from"../../../../core/maybe.js";import{property as s,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{ortho as o}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{set as n}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{create as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UNIT_X as d,ZEROS as c}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{InternalRenderCategory as l}from"../../webgl.js";import{Frustum as m}from"../../state/Frustum.js";import{glLayout as p}from"../../support/buffer/glUtil.js";import{newLayout as _}from"../../support/buffer/InterleavedLayout.js";import f from"../../webgl/RenderCamera.js";import g from"../../webgl/RenderNode.js";import{VertexArrayObject as C}from"./VertexArrayObject.js";import{CutFillMinMaxDepthTechnique as w}from"../shaders/CutFillMinMaxDepthTechnique.js";import{C as x}from"../../../../chunks/CutFillReduction.glsl.js";import{CutFillReductionTechnique as T}from"../shaders/CutFillReductionTechnique.js";import{CutFillReductionTechniqueConfiguration as P}from"../shaders/CutFillReductionTechniqueConfiguration.js";import{C as R}from"../../../../chunks/CutFillTargetDepth.glsl.js";import{CutFillTargetDepthTechnique as b}from"../shaders/CutFillTargetDepthTechnique.js";import{C as y}from"../../../../chunks/CutFillTotalDepth.glsl.js";import{CutFillTotalDepthTechnique as F}from"../shaders/CutFillTotalDepthTechnique.js";import{ImmediateTask as B,TaskPriority as j}from"../../../support/Scheduler.js";import{Yield as E}from"../../../support/Yield.js";import{PrimitiveType as O,DataType as S}from"../../../webgl/enums.js";import{Sync as q}from"../../../webgl/Sync.js";import{VertexBuffer as D}from"../../../webgl/VertexBuffer.js";let v=class extends g{constructor(e){super(e),this.consumes={required:[l.CUTFILL_COMPUTATION,l.TRANSPARENT_NO_DEPTH]},this.produces=l.CUTFILL_COMPUTATION,this.needsRender=!1,this.readyToRun=!1,this.done=!0,this._frameTask=B,this._result=new L,this._localOrigin=u(),this._maxTextureSize=512,this._width=0,this._height=0,this._reducedWidth=0,this._reducedHeight=0,this._depthFormat=14,this._colorFormat=11,this._numChannels=2,this._reductionConfiguration=new P,this._targetDepthParameters=new R,this._depthParameters=new y,this._reductionParameters=new x,this._numReductions=3,this._reductionPasses=0,this._pixelBufferSize=0,this._pixelBufferOffset=0,this._perReductionPixelBufferSize=0}initialize(){this._frameTask=this.view.resourceController.scheduler.registerTask(j.VOLUME_MEASUREMENT,this),this.addHandles(this._frameTask),this._maxTextureSize=Math.min(this._maxTextureSize,this.fboCache.rctx.parameters.maxTextureSize),this._frustum=new m(this.view.renderCoordsHelper)}destroy(){this._targetGeometryVao=i(this._targetGeometryVao),this._sync=r(this._sync),this._pixelBuffer&&(this.gl.deleteBuffer(this._pixelBuffer),this._pixelBuffer=null,this._pixelBufferSize=0)}precompile(){this.view.stage.renderer.precompileCutFillOrthographicReferenceDepth()}render(){const e=this.input;if(!this._orthographicCamera||!this._targetGeometryVao||!this.needsRender||this._sync)return e;const t=this.techniques.getCompiled(b),i=this.techniques.getCompiled(F),r=this.techniques.getCompiled(w);this._reductionConfiguration.reductionPass=0;const s=this.techniques.getCompiled(T,this._reductionConfiguration);this._reductionConfiguration.reductionPass=1;const h=this.techniques.getCompiled(T,this._reductionConfiguration);this._reductionConfiguration.reductionPass=2;const o=this.techniques.getCompiled(T,this._reductionConfiguration);if(!(t&&i&&r&&s&&h&&o))return this.requestRender(1),e;this.needsRender=!1;const n=this.renderingContext,a=this.fboCache,u=this.gl,c=n.getViewport(),l=a.acquire(this._width,this._height,"cutfill reference depth",this._depthFormat);n.bindFramebuffer(l.fbo),n.setViewport(0,0,this._width,this._height),n.clear(1280),this.view.stage.renderer.renderCutFillOrthographicReferenceDepth(this._orthographicCamera);const m=a.acquire(this._width,this._height,"cutfill target depth",this._depthFormat);n.bindFramebuffer(m.fbo),n.setViewport(0,0,this._width,this._height),n.setClearDepth(1),n.clear(256),this._targetDepthParameters.origin=this._localOrigin,this._targetDepthParameters.cutFillCamera=this._orthographicCamera,n.bindTechnique(t,this.bindParameters,this._targetDepthParameters),n.bindVAO(this._targetGeometryVao),n.drawArrays(O.TRIANGLES,0,this._targetGeometryVao.vertexCount("geometry"));const p=a.acquire(this._width,this._height,"cutfill reduction even",this._colorFormat),_=a.acquire(Math.ceil(this._width/2),Math.ceil(this._height/2),"cutfill reduction odd",this._colorFormat);return this._depthParameters.referenceDepth=l.depthTexture,this._depthParameters.targetDepth=m.depthTexture,this._pixelBuffer||(this._pixelBuffer=u.createBuffer()),u.bindBuffer(u.PIXEL_PACK_BUFFER,this._pixelBuffer),u.bufferData(u.PIXEL_PACK_BUFFER,this._pixelBufferSize,u.STREAM_READ),this._prepareFBO(p,this.width,this.height),n.bindTechnique(i,this.bindParameters,this._depthParameters),n.screen.draw(),this._runPyramidReduction(p,_,s),this._prepareFBO(p,this.width,this.height,d),n.bindTechnique(r,this.bindParameters,this._depthParameters),n.screen.draw(),this._runPyramidReduction(p,_,h),this._prepareFBO(p,this.width,this.height),n.bindTechnique(r,this.bindParameters,this._depthParameters),n.screen.draw(),this._runPyramidReduction(p,_,o),l.release(),m.release(),p.release(),_.release(),u.bindBuffer(u.PIXEL_PACK_BUFFER,null),n.setViewport(c.x,c.y,c.width,c.height),this._sync=new q(u),setTimeout(()=>this.readyToRun=!0,0),e}update(e,i){if(!this.done)return;this.done=!1;const r=this.renderingContext,{cameraDimensions:{width:s,height:h},localOriginRenderSpace:o}=e,n=this._maxTextureSize,a=h/s,u=s>h?n:n/a,d=s>h?n*a:n;this._width=t(u),this._height=t(d);const c=[this._width,this._height];this._orthographicCamera=this._createCamera(e,c),this._frustum?.update(this._orthographicCamera),this._updateTargetVao(r,i),this._localOrigin=o,this._reductionPasses=Math.ceil(Math.log2(Math.min(this._width,this._height))),this._reducedWidth=Math.ceil(this._width/2**this._reductionPasses),this._reducedHeight=Math.ceil(this._height/2**this._reductionPasses),this._perReductionPixelBufferSize=this._reducedWidth*this._reducedHeight*this._numChannels*4,this._pixelBufferSize=this._perReductionPixelBufferSize*this._numReductions,this._pixelBufferOffset=0,this.needsRender=!0,this.requestRender(1)}runTask(){if(!this._sync)return void(this.readyToRun=!1);try{if(!this._sync.poll())return E}catch(t){return this.readyToRun=!1,void(this._sync=r(this._sync))}this.readyToRun=!1,this._sync=r(this._sync);const e=this.gl;this._cpuBuffer=new Float32Array(this._pixelBufferSize/4),e.bindBuffer(e.PIXEL_PACK_BUFFER,this._pixelBuffer),e.getBufferSubData(e.PIXEL_PACK_BUFFER,0,this._cpuBuffer),e.bindBuffer(e.PIXEL_PACK_BUFFER,null),this._updateResults(this._cpuBuffer),this.done=!0}getResult(){return this._result}get frustum(){return this._frustum}get width(){return this._width}get height(){return this._height}get updating(){return this.readyToRun||!this.done||this._frameTask.updating}_runPyramidReduction(e,t,i){const r=this.renderingContext,s=this.gl;let h=this._width,o=this._height;for(let n=0;n<this._reductionPasses;n++)h=Math.ceil(h/2),o=Math.ceil(o/2),this._reductionParameters.depthTexture=e.getTexture(),this._prepareFBO(t,h,o),r.bindTechnique(i,this.bindParameters,this._reductionParameters),r.screen.draw(),[e,t]=[t,e];s.readPixels(0,0,h,o,33319,S.FLOAT,this._pixelBufferOffset),this._pixelBufferOffset+=this._perReductionPixelBufferSize}_updateResults(e){const t=new z(0,1,a()),i=new z(0,0,a());for(let r=0;r<this._reducedWidth;r++)for(let s=0;s<this._reducedHeight;s++){let h=(r+s*this._reducedWidth)*this._numChannels;const o=this._reducedWidth*this._reducedHeight*this._numChannels;t.totalDepth+=e[h],i.totalDepth+=e[h+1],h+=o;const n=e[h];n<t.depthExtremum&&(t.depthExtremum=n,V(t.depthExtremumCoords,e[h+1],this._width)),h+=o;const a=e[h];a>i.depthExtremum&&(i.depthExtremum=a,V(i.depthExtremumCoords,e[h+1],this._width))}this._result=new L(this._width,this._height,t,i)}_prepareFBO(e,t,i,r=c){const s=this.renderingContext;s.bindFramebuffer(e.fbo),s.setViewport(0,0,t,i),s.setClearColor(r[0],r[1],r[2],r[3]),s.clear(16384)}_createCamera(e,t){const{cameraPositionRenderSpace:i,localOriginRenderSpace:r,northVector:s,cameraDimensions:{width:h,height:n},cameraNearFar:{near:a,far:u}}=e,d=new f({eye:i,center:r,up:s,near:a,far:u});return d.viewport=[0,0,t[0],t[1]],o(d.projectionMatrix,-h/2,h/2,-n/2,n/2,a,u),d}_updateTargetVao(e,t){this._targetGeometryVao=i(this._targetGeometryVao);const r=t.indices.length,s=M.createBuffer(r),h=s.position,{positions:o,indices:n}=t;for(let i=0;i<n.length;++i){const e=3*n[i];h.set(i,0,o[e]),h.set(i,1,o[e+1]),h.set(i,2,o[e+2])}const a=new D(e,p(M),s.buffer);this._targetGeometryVao=new C(e,a)}};e([s()],v.prototype,"consumes",void 0),e([s()],v.prototype,"produces",void 0),e([s()],v.prototype,"needsRender",void 0),e([s()],v.prototype,"readyToRun",void 0),e([s()],v.prototype,"done",void 0),e([s()],v.prototype,"updating",null),e([s()],v.prototype,"_frameTask",void 0),v=e([h("esri.views.3d.webgl-engine.lib.CutFillComputation")],v);const M=_().vec3f("position").freeze();function V(e,t,i){const r=t%i,s=Math.floor(t/i);n(e,r,s)}class A{constructor(e,t){this.positions=e,this.indices=t}}class z{constructor(e,t,i){this.totalDepth=e,this.depthExtremum=t,this.depthExtremumCoords=i}}class L{constructor(e=0,t=0,i=new z(0,1,a()),r=new z(0,0,a())){this.width=e,this.height=t,this.cut=i,this.fill=r}}export{v as CutFillComputation,L as CutFillComputationResult,z as CutFillDepthResult,A as TargetGeometryRenderInfo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{disposeMaybe as t}from"../../../../core/maybe.js";import{watch as
|
|
2
|
+
import{__decorate as e}from"tslib";import{disposeMaybe as t}from"../../../../core/maybe.js";import{watch as i,syncAndInitial as s}from"../../../../core/reactiveUtils.js";import{property as o,subclass as r}from"../../../../core/accessorSupport/decorators.js";import{copy as a}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{InternalRenderCategory as l}from"../../webgl.js";import{glLayout as n}from"../../support/buffer/glUtil.js";import{newLayout as u}from"../../support/buffer/InterleavedLayout.js";import h from"../../webgl/RenderNode.js";import{VertexArrayObject as c}from"./VertexArrayObject.js";import{C as m}from"../../../../chunks/CutFillComposition.glsl.js";import{CutFillCompositionTechnique as f}from"../shaders/CutFillCompositionTechnique.js";import{C as p}from"../../../../chunks/CutFillMask.glsl.js";import{CutFillMaskTechnique as d}from"../shaders/CutFillMaskTechnique.js";import{DefaultMaterialPassParameters as C,DefaultMaterialDrawParameters as _,DefaultMaterialTechnique as b}from"../shaders/DefaultMaterialTechnique.js";import{DefaultMaterialTechniqueConfiguration as g}from"../shaders/DefaultMaterialTechniqueConfiguration.js";import{EmissiveTechniqueConfiguration as V}from"../shaders/EmissiveTechniqueConfiguration.js";import{DepthStencilAttachment as v,PrimitiveType as T}from"../../../webgl/enums.js";import{noParameters as w}from"../../../webgl/NoParameters.js";import{VertexBuffer as F}from"../../../webgl/VertexBuffer.js";let P=class extends h{constructor(e){super(e),this.consumes={required:[l.CUTFILL_COLOR,l.GROUND_DEPTH]},this.produces=l.CUTFILL_COLOR,this.measureType="cut-fill",this._vaoCut=null,this._vaoFill=null,this._compositeConfiguration=new V,this._maskParameters=new p,this._cutVolumeParameters=new C,this._fillVolumeParameters=new C,this._compositeParameters=new m,this._drawParameters=new _;const t=1===e.view.state.viewingMode;this._cutVolumeConfiguration=new g(t),this._cutVolumeConfiguration.customDepthTest=2,this._cutVolumeConfiguration.writeDepth=!1,this._cutVolumeConfiguration.cullFace=1,this._cutVolumeConfiguration.doubleSidedMode=2,this._fillVolumeConfiguration=new g(t),this._fillVolumeConfiguration.customDepthTest=1,this._fillVolumeConfiguration.cullFace=2}initialize(){this.addHandles([i(()=>[this.cutColor,this.fillColor],()=>this._updateColors(),s),i(()=>this.measureType,()=>this.requestRender(1),s)])}destroy(){this._disposeVaos()}precompile(){this._vaoCut&&this._vaoFill&&("cut-fill"===this.measureType?(this._cutVolumeConfiguration.cullFace=1,this._cutVolumeConfiguration.doubleSidedMode=2):(this._cutVolumeConfiguration.cullFace=0,this._cutVolumeConfiguration.doubleSidedMode=0),this._compositeConfiguration.hasEmissive=0!==this.bindParameters.emissions,this.techniques.precompile(d),this.techniques.precompile(b,this._cutVolumeConfiguration),this.techniques.precompile(b,this._fillVolumeConfiguration),this.techniques.precompile(f,this._compositeConfiguration))}render(e){const t=this.input;if(!this._vaoCut||!this._vaoFill)return t;const i=this._vaoCut.vertexCount("geometry"),s=this._vaoFill.vertexCount("geometry"),o=this.bindParameters,r=o.camera,a=r.fullViewport[2],n=r.fullViewport[3],u=this.renderingContext,h=this.fboCache,c=e.find(({name:e})=>e===l.GROUND_DEPTH),m=h.acquire(a,n,"cutfill color mask",2).attachDepth(c.getAttachment(v));u.bindFramebuffer(m.fbo),u.setClearColor(0,0,0,1),u.clear(17408),u.setViewport(0,0,a,n);const p=this.techniques.get(d);u.bindTechnique(p,o,w,this._maskParameters),u.setFaceCullingEnabled(!1),u.setStencilTestEnabled(!0),u.setStencilOpSeparate(1028,7680,34055,7680),u.setStencilOpSeparate(1029,7680,34056,7680),u.setDepthWriteEnabled(!1),u.bindVAO(this._vaoCut),u.setDepthTestEnabled(!0),u.setStencilWriteMask(255),u.setStencilFunction(519,0,255),u.setColorMask(!1,!1,!1,!1),u.drawArrays(T.TRIANGLES,0,i),u.setDepthTestEnabled(!1),u.setStencilWriteMask(0),u.setStencilFunction(517,0,255),u.setColorMask(!0,!1,!1,!1),u.drawArrays(T.TRIANGLES,0,i),u.bindVAO(this._vaoFill),u.setDepthTestEnabled(!0),u.setStencilWriteMask(255),u.setStencilFunction(519,0,255),u.setColorMask(!1,!0,!1,!1),u.drawArrays(T.TRIANGLES,0,s);const C=h.acquire(a,n,"cutfill color cut volume",5).acquireDepth(14);u.blitFramebuffer(t.fbo,C.fbo,256),u.bindFramebuffer(C.fbo),u.setClearColor(0,0,0,0),u.clear(16384),u.setColorMask(!0,!0,!0,!0);const _=this.techniques.get(b,this._cutVolumeConfiguration);u.bindTechnique(_,this.bindParameters,this._cutVolumeParameters,this._drawParameters),u.bindVAO(this._vaoCut),u.drawArrays(T.TRIANGLES,0,i),C.detachDepth();const g=h.acquire(a,n,"cutfill color fill volume",5).acquireDepth(14);u.blitFramebuffer(t.fbo,g.fbo,256),u.bindFramebuffer(g.fbo),u.clear(16384),u.setColorMask(!0,!0,!0,!0);const V=this.techniques.get(b,this._fillVolumeConfiguration);u.bindTechnique(V,this.bindParameters,this._fillVolumeParameters,this._drawParameters),u.bindVAO(this._vaoFill),u.drawArrays(T.TRIANGLES,0,s),g.detachDepth();const F=t.obtainDepthTexture();u.bindFramebuffer(t.fbo),this._compositeParameters.cutVolume=C.getTexture(),this._compositeParameters.fillVolume=g.getTexture(),this._compositeParameters.mask=m.getTexture(),this._compositeParameters.sceneDepth=F?.attachment,this._compositeParameters.groundDepth=c.getTexture(v),this.borderColor.toUnitRGBA(this._compositeParameters.borderColor);const P=this.techniques.get(f,this._compositeConfiguration);return u.bindTechnique(P,o,this._compositeParameters),u.screen.draw(),t.attachDepth(F),F?.release(),m.release(),C.release(),g.release(),t}enable(){this.produces=l.CUTFILL_COLOR,this.requestRender(1)}disable(){this.produces="disabled",this.requestRender(1)}updateGeometries(e,t,i){this._disposeVaos(),this._vaoCut=this._createVao(e),this._vaoFill=this._createVao(t),this._maskParameters.origin=i,a(this._drawParameters.origin,i),this.requestRender(1)}_updateColors(){this._cutVolumeParameters.diffuse=this.cutColor.toUnitRGB(),this._cutVolumeParameters.opacity=this.cutColor.a,this._fillVolumeParameters.diffuse=this.fillColor.toUnitRGB(),this._fillVolumeParameters.opacity=this.fillColor.a,this.requestRender(1)}_createVao(e){const{vertices:t,normals:i,indicesBottom:s,indicesExtruded:o}=e,r=s.length+o.length,a=this.renderingContext,l=q.createBuffer(r),{position:u,normal:h}=l;let m=0;for(let n=0;n<s.length;n++){const e=3*s[n];u.set(m,0,t[e]),u.set(m,1,t[e+1]),u.set(m,2,t[e+2]),h.set(m,0,i[e]),h.set(m,1,i[e+1]),h.set(m,2,i[e+2]),m++}for(let n=0;n<o.length;n++){const e=3*o[n];u.set(m,0,t[e]),u.set(m,1,t[e+1]),u.set(m,2,t[e+2]),h.set(m,0,i[e]),h.set(m,1,i[e+1]),h.set(m,2,i[e+2]),m++}const f=new F(a,n(q),l.buffer);return new c(a,f)}_disposeVaos(){this._vaoCut=t(this._vaoCut),this._vaoFill=t(this._vaoFill)}};e([o()],P.prototype,"consumes",void 0),e([o()],P.prototype,"produces",void 0),e([o()],P.prototype,"cutColor",void 0),e([o()],P.prototype,"fillColor",void 0),e([o()],P.prototype,"borderColor",void 0),e([o()],P.prototype,"measureType",void 0),P=e([r("esri.views.3d.webgl-engine.lib.CutFillVisualization")],P);const q=u().vec3f("position").vec3f("normal").freeze();class y{constructor(e,t,i,s){this.vertices=e,this.indicesBottom=t,this.indicesExtruded=i,this.normals=s}}export{P as CutFillVisualization,y as VolumeGeometry};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import"../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../shaders/ToneMapping.glsl.js";import"../../../webgl/NoParameters.js";import"../../../webgl/ShaderBuilder.js";export{E as EmissionCompositePassParameters,b as build}from"../../../../chunks/EmissionComposite.glsl.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{__decorate as s}from"tslib";import{watch as e,syncAndInitial as r}from"../../../../core/reactiveUtils.js";import{property as t}from"../../../../core/accessorSupport/decorators/property.js";import{subclass as i}from"../../../../core/accessorSupport/decorators/subclass.js";import{RenderNodeOutput as o}from"../../webgl.js";import a from"../../webgl/RenderNode.js";import{E as m}from"../../../../chunks/EmissionComposite.glsl.js";import{EmissionCompositeTechnique as n}from"./EmissionCompositeTechnique.js";import{floatBlendReductionFactor as p}from"../shaders/floatBlendScale.glsl.js";import{ColorAttachment1 as c,SizedPixelFormat as d}from"../../../webgl/enums.js";let h=class extends a{constructor(){super(...arguments),this.produces=o.COMPOSITE,this.consumes={required:[o.COMPOSITE,"emissive"]},this._passParameters=new m}initialize(){this.addHandles([e(()=>0!==this.bindParameters.emissions,s=>this.produces=s?o.COMPOSITE:"disabled",r)])}precompile(){this.techniques.precompile(n)}render(){const s=this.input,e=s.obtainAttachment(c);if(!e?.attachment)return s;this._passParameters.emission=e.attachment,this._passParameters.inputScale=this._passParameters.emission?.descriptor.internalFormat===d.RGBA8?p:1;const r=this.renderingContext,t=this.techniques.get(n);return this.bindRenderTarget(),r.bindTechnique(t,this.bindParameters,this._passParameters),r.screen.draw(),s.attachColor(e,c),e?.release(),s}};s([t()],h.prototype,"produces",void 0),s([t()],h.prototype,"consumes",void 0),h=s([i("esri.views.3d.webgl-engine.lib.EmissionComposite")],h);export{h as EmissionComposite};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{ReloadableShader as r}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o}from"../core/shaderTechnique/ShaderTechnique.js";import{a as i}from"../../../../chunks/EmissionComposite.glsl.js";import{makePipelineState as t,add as m,defaultColorWrite as n}from"../../../webgl/renderState.js";let l=class extends o{constructor(){super(...arguments),this.shader=new r(i,()=>import("./EmissionComposite.glsl.js"))}initializePipeline(){return t({colorWrite:n,blending:m})}};l=e([s("esri.views.3d.webgl-engine.lib.EmissionCompositeTechnique")],l);export{l as EmissionCompositeTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{clone as t}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{
|
|
2
|
+
import{clone as t}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{IntersectorResultRay as e,isValidIntersectorResult as r}from"./IntersectorResult.js";import{ObjectTarget as s}from"./ObjectTarget.js";class o extends e{constructor(){super(...arguments),this.intersector=1}}class c extends s{constructor(e,r){super(e.object,e.geometryId,e.primitiveIndex),this.center=t(r)}}function i(t){return r(t)&&1===t.intersector&&!!t.target&&"center"in t.target}export{o as HUDIntersectorResult,c as HUDTarget,i as isHUDIntersectorResult};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{add as t,transformMat4 as e,copy as s}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{intersectsSphere as r}from"../../../../geometry/support/frustum.js";import{create as n,fromPoints as o,copy as a}from"../../../../geometry/support/ray.js";import l from"../../webgl/RenderCamera.js";import{HUDTarget as c,HUDIntersectorResult as h}from"./HUDIntersectorResult.js";import{IntersectorOptions as f}from"./IntersectorInterfaces.js";import{
|
|
2
|
+
import{add as t,transformMat4 as e,copy as s}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{intersectsSphere as r}from"../../../../geometry/support/frustum.js";import{create as n,fromPoints as o,copy as a}from"../../../../geometry/support/ray.js";import l from"../../webgl/RenderCamera.js";import{HUDTarget as c,HUDIntersectorResult as h}from"./HUDIntersectorResult.js";import{IntersectorOptions as f}from"./IntersectorInterfaces.js";import{IntersectorResultRay as m,compareOrderedIntersectionHits as u}from"./IntersectorResult.js";import{ObjectTarget as d}from"./ObjectTarget.js";import{PolygonIntersectionResults as y}from"./PolygonIntersectionResults.js";import{IntersectorTransform as g,getVerticalOffsetObject3D as p}from"./verticalOffsetUtils.js";const _=1e-5;class v{constructor(t){this.options=new f,this._results=new b,this.polygonResults=new y,this.transform=new g,this.camera=new l,this.screenPolygonPrimitiveProcessor=j,this.tolerance=_,this.verticalOffset=null,this._ray=n(),this._rayEnd=i(),this._rayBeginTransformed=i(),this._rayEndTransformed=i(),this.viewingMode=t??1}get results(){return this._results}get ray(){return this._ray}get rayBegin(){return this._ray.origin}get rayEnd(){return this._rayEnd}reset(t,e,s){this.resetWithRay(o(t,e,this._ray),s)}resetWithRay(e,s){this.camera=s,e!==this._ray&&a(e,this._ray),0!==this.options.verticalOffset?2===this.viewingMode?this._ray.origin[2]-=this.options.verticalOffset:this.verticalOffset=this.options.verticalOffset:this.verticalOffset=null,t(this._rayEnd,this._ray.origin,this._ray.direction),this._results.init(this._ray),this.polygonResults.init()}intersect(t=null,e,s,i,r){this.point=e,this.filterPredicate=i,this.tolerance=s??_;const n=p(this.verticalOffset);if(t&&t.length>0){const e=r?t=>{r(t)&&this.intersectObject(t)}:t=>{this.intersectObject(t)};for(const s of t){const t=s.getSpatialQueryAccelerator?.();null!=t?(null!=n?t.forEachAlongRayWithVerticalOffset(this._ray.origin,this._ray.direction,e,n):t.forEachAlongRay(this._ray.origin,this._ray.direction,e),this.options.selectionMode&&this.options.hud&&t.forEachDegenerateObject(e)):s.objects.forEach(t=>e(t))}}this.sortResults()}*intersectScreenPolygon(t=null,e){if(this.verticalOffset=null,t?.length)for(const s of t){const t=s.getSpatialQueryAccelerator?.();if(null!=t)for(const s of t.intersectingFrustumValues(e.broadPhaseFrustum,t=>t.visible))yield*this._intersectScreenPolygonObject(s,e);else for(const i of s.objects.values())i.visible&&r(e.broadPhaseFrustum,i.boundingVolumeWorldSpace.bounds)&&(yield*this._intersectScreenPolygonObject(i,e))}}*intersectHUDScreenPolygon(t=null,e){if(this.verticalOffset=null,this.options.selectionMode&&this.options.hud&&t?.length)for(const s of t){const t=s.getSpatialQueryAccelerator?.(),i=t?.degenerateObjectValues()??s.objects.values();for(const s of i)yield*this._intersectScreenPolygonObject(s,e)}}*_intersectScreenPolygonObject(t,e){const s=t.geometries;if(!t.visible||!s)return;const i=t.effectiveTransformation;for(const r of s){if(!r.visible)continue;const{material:s,id:n}=r;if(!s.visible||!s.intersectScreenPolygon)continue;this.transform.setAndInvalidateLazyTransforms(i,r.transformation);const o=s.intersectScreenPolygon(r,this.transform.transform,this,e);o?.valid&&this._handleObjectScreenPolygonIntersection(o.type,new d(t,n,o.primitiveIndex),o.distance,o.point),yield}}intersectObject(t){const s=t.geometries;if(!s)return;const i=t.effectiveTransformation,r=p(this.verticalOffset);for(const n of s){if(!n.visible)continue;const{material:s,id:o}=n;if(!s.visible)continue;this.transform.setAndInvalidateLazyTransforms(i,n.transformation),e(this._rayBeginTransformed,this.rayBegin,this.transform.inverse),e(this._rayEndTransformed,this.rayEnd,this.transform.inverse);const a=this.transform.transform;null!=r&&(r.objectTransform=this.transform),s.intersectRay(n,this.transform.transform,this,this._rayBeginTransformed,this._rayEndTransformed,(e,s,i,r)=>this.handleObjectIntersection({object:t,geometryId:o,primitiveIndex:i},e,s,a,r))}}handleObjectIntersection(t,e,s,i,r){if(e<0||null!=this.filterPredicate&&!this.filterPredicate(this._ray.origin,this._rayEnd,e))return;const n=r?this._results.hud:this._results;t=r?new c(t,r):t;const o=r?i=>i.set(1,t,e,s):r=>r.set(4,t,e,s,i);if((null==n.min.distance||e<n.min.distance)&&o(n.min),0!==this.options.store&&(null==n.max.distance||e>n.max.distance)&&o(n.max),2===this.options.store)if(r){const t=new h(this._ray);o(t),this._results.hud.all.push(t)}else{const t=new m(this._ray);o(t),this._results.all.push(t)}}_handleObjectScreenPolygonIntersection(t,e,s,i){s<0||(null==this.filterPredicate||null!=i&&this.filterPredicate(this.camera.eye,i,1))&&this.polygonResults.add(t,1===t&&i?new c(e,i):e,s)}sortResults(t=this._results.all){t.sort(u)}}class b{constructor(){this.min=new m(n()),this.max=new m(n()),this.hud={min:new h(n()),max:new h(n()),all:new Array},this.ground=new m(n()),this.all=[]}init(t){this.min.init(t),this.max.init(t),this.ground.init(t),this.all.length=0,this.hud.min.init(t),this.hud.max.init(t),this.hud.all.length=0}}const j={*processTriangle(t,e){t.list=e,t.count=e.length,yield t},*processLineSegment(t,e,i){s(t[0],e),s(t[1],i),yield t},validatePoint:()=>!0};export{v as Intersector,j as defaultScreenPolygonPrimitiveProcessor,_ as defaultTolerance};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{copy as r}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as t,IDENTITY as
|
|
2
|
+
import{copy as r}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as t,IDENTITY as e}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{scale as i,length as s,add as a,copy as n,normalize as o}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as c,UNIT_Z as d}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{transformMat4 as h}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{create as m}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as l,copy as u}from"../../../../geometry/support/ray.js";class y{constructor(){this.intersector=4}_init(){this.distance=this.target=this.drapedLayerOrder=this.renderPriority=null,this.intersector=4}_setBase(r,t,e,i,s){this.intersector=r,this.distance=e,this.target=t,this.drapedLayerOrder=i,this.renderPriority=s}}class p extends y{get ray(){return this._ray}get distanceInRenderSpace(){return null==this.distance?null:(i(b,this.ray.direction,this.distance),s(b))}withinDistance(r){return!!g(this)&&(null!=this.distanceInRenderSpace&&this.distanceInRenderSpace<=r)}getIntersectionPoint(r){return!!g(this)&&(i(b,this.ray.direction,this.distance),a(r,this.ray.origin,b),!0)}getTransformedNormal(r){return n(O,this.normal),O[3]=0,h(O,O,this.transformation),n(r,O),o(r,r)}constructor(r){super(),this.normal=c(),this.transformation=t(),this._ray=l(),this.init(r)}init(r){super._init(),r&&u(r,this._ray)}set(t,i,s,a,o,c,h){this._setBase(t,i,s,c,h),n(this.normal,a??d),r(this.transformation,o??e)}copy(t){this._setBase(t.intersector,t.target,t.distance,t.drapedLayerOrder,t.renderPriority),u(t.ray,this._ray),n(this.normal,t.normal),r(this.transformation,t.transformation)}}class f extends y{constructor(r,t,e,i=null,s=null){super(),this.distance=e,this._setBase(r,t,e,i,s)}copy(r){this._setBase(r.intersector,r.target,r.distance,r.drapedLayerOrder,r.renderPriority)}}function g(r){return null!=r?.distance}function _(r){return r instanceof p&&g(r)}function L(r,t){return r.distance!==t.distance?(r.distance??0)-(t.distance??0):r.drapedLayerOrder!==t.drapedLayerOrder?x(r.drapedLayerOrder,t.drapedLayerOrder):x(r.renderPriority,t.renderPriority)}function x(r,t){return(t??-Number.MAX_VALUE)-(r??-Number.MAX_VALUE)}const b=c(),O=m();export{y as IntersectorResult,p as IntersectorResultRay,f as IntersectorResultScreenPolygon,x as compareDrapedOrder,L as compareOrderedIntersectionHits,g as isValidIntersectorResult,_ as isValidIntersectorResultRay};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{releaseMaybe as t}from"../../../../core/maybe.js";import{copy as e}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{create as i,ZEROS as s}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{ViewportSize as r}from"./BindParameters.js";import{ColorAttachment1 as o}from"../../../webgl/enums.js";import{ensureAttachmentMaxSize as h}from"../../../webgl/FramebufferObject.js";class l{constructor(t,e){this._fbos=t,this._bind=e,this._size=new r(0,0),this._clearColor=i()}dispose(){this._color=t(this._color),this.releaseDepth()}initialize(t,i,s){const r=this._color;return this._color=null,this.releaseDepth(),this._size.width=t,this._size.height=i,h(this._size,this._fbos.rctx.parameters.maxTextureSize),e(this._clearColor,s),r}releaseDepth(){this._color?.detachDepth(),this._depth=t(this._depth)}update(t){return this.bind(),this._color=t(this.color),this._color}bind(){const{rctx:t}=this._fbos,e=null==this._color;this.color.attachDepth(this.depth),t.bindFramebuffer(this.color.fbo),e&&(t.setClearStencil(0),t.setClearColor(this._clearColor[0],this._clearColor[1],this._clearColor[2],this._clearColor[3]),t.clear(17664),this.color.getTexture(o)&&t.clearBuffer(1,s))}ensureEmissionAttachment(){this.color.getTexture(o)||(this.color.acquireColor(o,this._bind.useFloatBlend.value?8:5,"emissive"),this._fbos.rctx.bindFramebuffer(this.color.fbo),this._fbos.rctx.resetDrawBuffers(this._bind.output),this._fbos.rctx.clearBuffer(1,s))}get size(){return this._size}get color(){return this.
|
|
2
|
+
import{releaseMaybe as t}from"../../../../core/maybe.js";import{copy as e}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{create as i,ZEROS as s}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{ViewportSize as r}from"./BindParameters.js";import{ColorAttachment1 as o}from"../../../webgl/enums.js";import{ensureAttachmentMaxSize as h}from"../../../webgl/FramebufferObject.js";class l{constructor(t,e){this._fbos=t,this._bind=e,this._size=new r(0,0),this._clearColor=i()}dispose(){this._color=t(this._color),this.releaseDepth()}initialize(t,i,s){const r=this._color;return this._color=null,this.releaseDepth(),this._size.width=t,this._size.height=i,h(this._size,this._fbos.rctx.parameters.maxTextureSize),e(this._clearColor,s),r}releaseDepth(){this._color?.detachDepth(),this._depth=t(this._depth)}update(t){return this.bind(),this._color=t(this.color),this._color}bind(){const{rctx:t}=this._fbos,e=null==this._color;this.color.attachDepth(this.depth),t.bindFramebuffer(this.color.fbo),e&&(t.setClearStencil(0),t.setClearColor(this._clearColor[0],this._clearColor[1],this._clearColor[2],this._clearColor[3]),t.clear(17664),this.color.getTexture(o)&&t.clearBuffer(1,s))}ensureEmissionAttachment(){this.color.getTexture(o)||(this.color.acquireColor(o,this._bind.useFloatBlend.value?8:5,"emissive"),this._fbos.rctx.bindFramebuffer(this.color.fbo),this._fbos.rctx.resetDrawBuffers(this._bind.output),this._fbos.rctx.clearBuffer(1,s))}get size(){return this._size}get color(){return this._color??=this._bind.hasOpaqueEmission?this._fbos.acquire(this._size.width,this._size.height,"main").acquireColor(o,this._bind.useFloatBlend.value?8:5,"emissive"):this._fbos.acquire(this._size.width,this._size.height,"main"),this._color}get depth(){return this._depth??=this._fbos.acquireDepth(14,this._size.width,this._size.height,"main depth"),this._depth}}export{l as MainFramebuffer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{compareOrderedIntersectionHits as t}from"./IntersectorResult.js";class
|
|
2
|
+
import{IntersectorResultScreenPolygon as l,compareOrderedIntersectionHits as t}from"./IntersectorResult.js";class s{constructor(){this.all=[]}init(){this.all.length=0}add(t,s,r,o=null,e=null){this.all.push(new l(t,s,r,o,e))}sortResults(l=this.all){l.sort(t)}}export{s as PolygonIntersectionResults};
|