@arcgis/core 5.1.0-next.20 → 5.1.0-next.22
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/analysis/VolumeMeasurement/VolumeMeasurementCutFillOptions.d.ts +1 -0
- package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.d.ts +1 -0
- package/analysis/VolumeMeasurement/VolumeMeasurementInputUnits.d.ts +1 -0
- package/analysis/VolumeMeasurementAnalysis.d.ts +3 -2
- package/applications/Components/OrientedImageryViewer/galleryUtils.d.ts +45 -15
- package/applications/Components/QuantityFormatter.d.ts +11 -11
- package/applications/Components/SelectionOperation.d.ts +11 -11
- package/applications/Components/SketchTooltipControls.d.ts +9 -9
- package/applications/Components/actionUtils.d.ts +2 -1
- package/applications/Components/analysisUtils.d.ts +27 -26
- package/applications/Components/applySetUtils.d.ts +40 -40
- package/applications/Components/arcadeEditorUtils.d.ts +3 -3
- package/applications/Components/arcadeFeatureUtils.d.ts +12 -12
- package/applications/Components/baUtils.d.ts +8 -8
- package/applications/Components/basemapUtils.d.ts +2 -2
- package/applications/Components/clipboard.d.ts +14 -14
- package/applications/Components/drawUtils.d.ts +3 -3
- package/applications/Components/editUtils.d.ts +14 -14
- package/applications/Components/featureUtils.d.ts +10 -10
- package/applications/Components/fieldFormatUtils.d.ts +2 -2
- package/applications/Components/fontUtils.d.ts +2 -2
- package/applications/Components/formatUtils.d.ts +2 -2
- package/applications/Components/getDefaultUnits.d.ts +2 -2
- package/applications/Components/gfxUtils.d.ts +5 -1
- package/applications/Components/imageryUtils.d.ts +35 -35
- package/applications/Components/layerOriginUtils.d.ts +5 -5
- package/applications/Components/layersEffectsJsonUtils.d.ts +2 -2
- package/applications/Components/previewSymbol2D.d.ts +2 -2
- package/applications/Components/rasterFunctionEditorUtils.d.ts +40 -40
- package/applications/Components/reactiveUtils.d.ts +14 -13
- package/applications/Components/sanitizerUtils.d.ts +2 -2
- package/applications/Components/stringUtils.d.ts +5 -5
- package/applications/Components/styleUtils.d.ts +2 -2
- package/applications/Components/svgUtils.d.ts +4 -4
- package/applications/Components/symbolUtils.d.ts +47 -11
- package/applications/Components/templateUtils.d.ts +73 -17
- package/applications/Components/templateUtils.js +1 -1
- package/applications/Components/testUtils.d.ts +3 -3
- package/applications/Components/unitUtils.d.ts +1 -1
- package/applications/Components/viewUtils.d.ts +2 -2
- package/applications/Components/webStyleSymbolUtils.d.ts +2 -2
- package/applications/Excalibur/imageryLayerUtils.d.ts +3 -3
- package/applications/Excalibur/videoViewUtils.d.ts +8 -8
- package/applications/Excalibur/widgetUtils.d.ts +2 -2
- package/applications/ExperienceBuilder/sketchUtils.d.ts +7 -7
- package/applications/KnowledgeStudio/dataModelVisualization.d.ts +20 -8
- package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +21 -21
- package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +35 -35
- package/applications/KnowledgeStudio/layerInternalAccessUtils.d.ts +9 -9
- package/applications/KnowledgeStudio/reshape.d.ts +40 -40
- package/applications/KnowledgeStudio/resourceSerializationUtils.d.ts +11 -11
- package/applications/MapViewer/layerUtils.d.ts +2 -2
- package/applications/MapViewer/mediaUtils.d.ts +13 -13
- package/applications/MapViewer/templateUtils.d.ts +20 -20
- package/applications/PortalApp/layerUtils.d.ts +2 -2
- package/applications/SceneViewer/colorUtils.d.ts +2 -2
- package/applications/SceneViewer/devEnvironmentUtils.d.ts +4 -3
- package/applications/SceneViewer/layerUtils.d.ts +3 -3
- package/applications/SceneViewer/sceneViewerUtils.d.ts +34 -34
- package/applications/SceneViewer/symbolUtils.d.ts +2 -2
- package/applications/Urban/LineImagePattern3D.d.ts +3 -2
- package/applications/Urban/imagePatternUtils.d.ts +4 -4
- package/applications/Urban/meshUtils.d.ts +2 -2
- package/applications/WebEditor/sketchUtils.d.ts +8 -8
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/03d11c7056fea763cbac.js +1 -0
- package/assets/esri/core/workers/chunks/05e5b9082c0a396df7e5.js +1 -0
- package/assets/esri/core/workers/chunks/08445fcba84ed7c23b3f.js +1 -0
- package/assets/esri/core/workers/chunks/0c706cdff6eac940eaab.js +1 -0
- package/assets/esri/core/workers/chunks/10a8612e7b2c74a8ce9a.js +1 -0
- package/assets/esri/core/workers/chunks/{df321c37b61099f6e4c2.js → 11058e660139c427c3e7.js} +1 -1
- package/assets/esri/core/workers/chunks/{2ddb8bb00b3af83ebd7c.js → 14792047c5519dd89828.js} +1 -1
- package/assets/esri/core/workers/chunks/1a1e57267306c07e5bdb.js +1 -0
- package/assets/esri/core/workers/chunks/1bb5aa1e3693e0c68b18.js +1 -0
- package/assets/esri/core/workers/chunks/1cd091fa567fc4026356.js +1 -0
- package/assets/esri/core/workers/chunks/1dcd057695f8db79eca2.js +1 -0
- package/assets/esri/core/workers/chunks/{3ed7f19f77a11fa4d047.js → 2063b49607a03f7718ee.js} +1 -1
- package/assets/esri/core/workers/chunks/{74a6d840813ac29b0bda.js → 209acb3ad16c99bb506c.js} +1 -1
- package/assets/esri/core/workers/chunks/21decfc1e477fb769204.js +1 -0
- package/assets/esri/core/workers/chunks/21e04705cad9fef1b01b.js +1 -0
- package/assets/esri/core/workers/chunks/23cb0611abe1031c513c.js +1 -0
- package/assets/esri/core/workers/chunks/285f3b07de852bfc1604.js +1 -0
- package/assets/esri/core/workers/chunks/2c61a53962093a331225.js +1 -0
- package/assets/esri/core/workers/chunks/2ecfd6edab796194bf88.js +1 -0
- package/assets/esri/core/workers/chunks/2f23af31b1190754ce13.js +1 -0
- package/assets/esri/core/workers/chunks/31eb59eae4c89b76e302.js +1 -0
- package/assets/esri/core/workers/chunks/3e61e7805dc6ff284831.js +1 -0
- package/assets/esri/core/workers/chunks/4150774059d67a8def74.js +1 -0
- package/assets/esri/core/workers/chunks/416c57df61fbd193078b.js +1 -0
- package/assets/esri/core/workers/chunks/46d28a0c20263012faff.js +1 -0
- package/assets/esri/core/workers/chunks/{43c8b1473695574c663e.js → 4754610760f3f634adf9.js} +2 -2
- package/assets/esri/core/workers/chunks/{f5cebeaad3e7d87d7997.js → 4fc6dd1423075e145b29.js} +1 -1
- package/assets/esri/core/workers/chunks/{3861644c06cfebe8f40c.js → 527547fa10d52cb3a7b1.js} +2 -2
- package/assets/esri/core/workers/chunks/5480d4cc342a2669a8ab.js +1 -0
- package/assets/esri/core/workers/chunks/{e8495c655a0a4f534636.js → 551fee27bf3abf0c41fd.js} +1 -1
- package/assets/esri/core/workers/chunks/568d32ceee1409809e5a.js +1 -0
- package/assets/esri/core/workers/chunks/576995021660e8b34705.js +1 -0
- package/assets/esri/core/workers/chunks/57e375d8a8db9fa57193.js +1 -0
- package/assets/esri/core/workers/chunks/5cbc12545f42a32fb960.js +1 -0
- package/assets/esri/core/workers/chunks/61ebbae0773fccc1f2bf.js +1 -0
- package/assets/esri/core/workers/chunks/63c297b6b7438f49e7ee.js +1 -0
- package/assets/esri/core/workers/chunks/6b56c8ba978ec6edd6b8.js +1 -0
- package/assets/esri/core/workers/chunks/{53f8c1d56ef3b24d2226.js → 6c853fd89f0e9f102c6e.js} +1 -1
- package/assets/esri/core/workers/chunks/{946698d9cefffdb63082.js → 6e32e7b2ea2ea1a1fc04.js} +1 -1
- package/assets/esri/core/workers/chunks/6f12854c5846edfe3239.js +1 -0
- package/assets/esri/core/workers/chunks/{b586f1021a27c5e1551a.js → 7189e03cc24f5c10865a.js} +2 -2
- package/assets/esri/core/workers/chunks/7b59ddad3c73f5f44b4d.js +1 -0
- package/assets/esri/core/workers/chunks/7c417d2bf432e4055b3d.js +30 -0
- package/assets/esri/core/workers/chunks/8021cb732f8136d87048.js +1 -0
- package/assets/esri/core/workers/chunks/84124c1a41a96192f81c.js +1 -0
- package/assets/esri/core/workers/chunks/845bbd82ddacbb62ad28.js +1 -0
- package/assets/esri/core/workers/chunks/868c8a152cb1452b9a94.js +1 -0
- package/assets/esri/core/workers/chunks/879ce85c50b0348056b2.js +1 -0
- package/assets/esri/core/workers/chunks/87a7d405a0b9a541d7f2.js +1 -0
- package/assets/esri/core/workers/chunks/9522430d34d29c1ffb1a.js +1 -0
- package/assets/esri/core/workers/chunks/9647f3983f955da21093.js +1 -0
- package/assets/esri/core/workers/chunks/9694b4b85168a38ca24b.js +1 -0
- package/assets/esri/core/workers/chunks/{83d913dab3c2b0d6a7cc.js → 9736299a4ac0e21f08a7.js} +1 -1
- package/assets/esri/core/workers/chunks/{e7bee85f28d7ec03825a.js → 973e3743cb7fdaa27f80.js} +1 -1
- package/assets/esri/core/workers/chunks/9b2d0d36ee6c04c347df.js +1 -0
- package/assets/esri/core/workers/chunks/{2662750d5761ed2d0eb7.js → 9e7eea56e96f012f9ff4.js} +1 -1
- package/assets/esri/core/workers/chunks/{3f812b0a28afb47aaaf0.js → a35d1be700ebd3109397.js} +2 -2
- package/assets/esri/core/workers/chunks/a4919dd9963f853a0077.js +1 -0
- package/assets/esri/core/workers/chunks/a4a4ce33de6432ba4dc3.js +1 -0
- package/assets/esri/core/workers/chunks/{aece665144aed2065ffc.js → a78ac951c00f090d9024.js} +1 -1
- package/assets/esri/core/workers/chunks/a7dbd38bc216713044fc.js +1 -0
- package/assets/esri/core/workers/chunks/{0debabe324c873066885.js → aa3bdfd00f666c6cc521.js} +1 -1
- package/assets/esri/core/workers/chunks/{db5bbc240a1b8cd5af52.js → abc2471cfa9430ca5645.js} +1 -1
- package/assets/esri/core/workers/chunks/b2a67fe89f6505498bc3.js +1 -0
- package/assets/esri/core/workers/chunks/{b8b2f160518e3a225d99.js → b364ec104dd59faa41b6.js} +1 -1
- package/assets/esri/core/workers/chunks/b4254fcb2051c873f2ba.js +1 -0
- package/assets/esri/core/workers/chunks/{a53fa34681efff8fc024.js → b859d98fa1c39f8e4099.js} +1 -1
- package/assets/esri/core/workers/chunks/c09bc36347e8eb9fff00.js +1 -0
- package/assets/esri/core/workers/chunks/c2cda93905f0a49a6931.js +1 -0
- package/assets/esri/core/workers/chunks/c3e4f8664988e50bda55.js +1 -0
- package/assets/esri/core/workers/chunks/{3d0aa5f2db79c022243e.js → c794f7be868e53ca4a8c.js} +1 -1
- package/assets/esri/core/workers/chunks/cada79c174027f7a0df8.js +1 -0
- package/assets/esri/core/workers/chunks/cf100c80b75ba74b479c.js +1 -0
- package/assets/esri/core/workers/chunks/d10c65cde3565d399275.js +1 -0
- package/assets/esri/core/workers/chunks/d44217de4c73475f9c66.js +1 -0
- package/assets/esri/core/workers/chunks/d587b7842091affdaac3.js +1 -0
- package/assets/esri/core/workers/chunks/d70678598f4080adfb39.js +1 -0
- package/assets/esri/core/workers/chunks/dad9c25f1b7cacf7b052.js +1 -0
- package/assets/esri/core/workers/chunks/{0facd2c143a04cc7c4ff.js → deee88e3f1641c6ef5db.js} +1 -1
- package/assets/esri/core/workers/chunks/e063cce778944fe97dd3.js +1 -0
- package/assets/esri/core/workers/chunks/e37e7ae2de974cef9a90.js +1 -0
- package/assets/esri/core/workers/chunks/e44ed205f74df34adb8b.js +1 -0
- package/assets/esri/core/workers/chunks/e6220c1fa887e21ffbbd.js +1 -0
- package/assets/esri/core/workers/chunks/{13d1cb50232ae761425b.js → eaeb95be8d4032513247.js} +2 -2
- package/assets/esri/core/workers/chunks/{93515f52d9b5fa12bd04.js → eb4934d3a3b82316c7c6.js} +1 -1
- package/assets/esri/core/workers/chunks/{23c856265dd24ce54fdb.js → f1c1f7583fa13dff9b5c.js} +1 -1
- package/assets/esri/core/workers/chunks/f27bbb4e26297d3c68de.js +1 -0
- package/assets/esri/core/workers/chunks/f4480636a910eaa4c531.js +1 -0
- package/assets/esri/core/workers/chunks/{5b991b0d4ca257291cb0.js → f5c5a9e771074f780fc8.js} +1 -1
- package/assets/esri/core/workers/chunks/f82a95c46f0d579d5bf5.js +1 -0
- package/assets/esri/core/workers/chunks/fb3a42cdd0d3105ec551.js +1 -0
- package/chunks/Clouds.glsl.js +1 -1
- package/config.js +1 -1
- package/core/MultiOriginJSONSupport.d.ts +1 -1
- package/core/ReadOnlyMultiOriginJSONSupport.d.ts +5 -4
- package/geometry/FlatGeometry.js +1 -1
- package/geometry/support/curves/curveUtils.js +1 -1
- package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
- package/graphic/graphicOriginUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/FeatureLayer.d.ts +7 -9
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/WMTSLayer.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/editingSupport.js +1 -1
- package/layers/raster/datasets/MRFRaster.js +1 -1
- package/layers/support/SceneModification.js +1 -1
- package/layers/support/Sublayer.d.ts +3 -0
- package/package.json +2 -2
- package/renderers/VectorFieldRenderer.js +1 -1
- package/renderers/support/DictionaryControlString.js +1 -1
- package/renderers/support/DictionaryLoader.js +1 -1
- package/rest/featureService/FeatureService.js +1 -1
- package/smartMapping/support/utils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/GeometryWalker.js +1 -1
- package/symbols/cim/SDFHelper.js +1 -1
- package/symbols/cim/animationUtils.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/effects/EffectDashes.js +1 -1
- package/symbols/cim/effects/EffectDonut.js +1 -1
- package/symbols/cim/effects/EffectOffset.js +1 -1
- package/symbols/cim/effects/EffectWave.js +1 -1
- package/symbols/cim/placements/PlacementAlongLineSameSize.js +1 -1
- package/symbols/cim/placements/PlacementAtExtremities.js +1 -1
- package/symbols/cim/placements/PlacementAtRatioPositions.js +1 -1
- package/symbols/cim/placements/PlacementOnLine.js +1 -1
- package/symbols/cim/rasterizingUtils.js +1 -1
- package/symbols/cim/types.d.ts +220 -117
- package/views/2d/layers/features/schema/processor/symbols/utils.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementError.d.ts +1 -0
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementResult.d.ts +1 -0
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.d.ts +1 -0
- package/views/3d/environment/CloudsRenderer.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/FogTechnique.js +1 -1
- package/views/3d/environment/NoiseTextureAtlas.js +1 -1
- package/views/3d/environment/NoiseTextureAtlasTechnique.js +1 -1
- package/views/3d/layers/Lyr3DWorker.js +1 -1
- package/views/3d/layers/SceneLayerWorkerHandle.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/polygonUtils.js +1 -1
- package/views/3d/layers/support/patternUtils.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillDepth.js +1 -1
- package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
- package/views/3d/webgl-engine/lib/Geometry.js +1 -1
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/views/3d/webgl-engine/lib/Material.js +1 -1
- package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
- package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/IndexBufferCache.js +2 -0
- package/views/3d/webgl-engine/materials/renderers/IndexLayout.js +2 -0
- package/views/3d/webgl-engine/materials/renderers/Instance.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
- package/views/SelectionManager.d.ts +9 -9
- package/views/SelectionManager.js +1 -1
- package/views/View.d.ts +13 -2
- package/views/draw/support/Reshape.js +1 -1
- package/views/draw/support/reshapeUtils.js +1 -1
- package/views/draw/support/types.d.ts +8 -1
- package/views/interactive/support/utils.js +1 -1
- package/views/layers/FeatureLikeLayerView.d.ts +24 -24
- package/views/webgl/BufferObject.js +1 -1
- package/widgets/Attribution/AttributionViewModel.d.ts +3 -1
- package/widgets/Attribution/AttributionViewModel.js +1 -1
- package/widgets/Attribution.d.ts +1 -1
- package/widgets/Attribution.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +2 -22
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/Workflow.js +1 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.d.ts +10 -15
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +0 -15
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/support/types.d.ts +0 -1
- package/widgets/FeatureTable.d.ts +1 -19
- package/widgets/FeatureTable.js +1 -1
- package/widgets/FeatureTemplates.d.ts +1 -1
- package/widgets/FeatureTemplates.js +1 -1
- package/widgets/HistogramRangeSlider.d.ts +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
- package/widgets/PanoramicVideoViewer.js +1 -1
- package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicMedia.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicTileNode.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicTilePyramid.js +1 -1
- package/widgets/PanoramicViewer/utils.js +1 -1
- package/widgets/Sketch/SketchViewModel.d.ts +4 -22
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch/support/PluginManager.js +1 -1
- package/widgets/Sketch/support/sketchUtils.js +1 -1
- package/widgets/Sketch.d.ts +10 -17
- package/widgets/Sketch.js +1 -1
- package/assets/esri/core/workers/chunks/026c00ee272c64e53daf.js +0 -1
- package/assets/esri/core/workers/chunks/0883c4e63424d6746ada.js +0 -1
- package/assets/esri/core/workers/chunks/0987cb20148f65222b44.js +0 -1
- package/assets/esri/core/workers/chunks/0a1f88cf16bcbb53b371.js +0 -1
- package/assets/esri/core/workers/chunks/0bb3beedae1b73beb1fc.js +0 -1
- package/assets/esri/core/workers/chunks/0ca405ca26676137a4be.js +0 -1
- package/assets/esri/core/workers/chunks/0ce968c89c35535da63e.js +0 -1
- package/assets/esri/core/workers/chunks/0d56e3b3265a4470aaa6.js +0 -1
- package/assets/esri/core/workers/chunks/144c719d5ba9e3a30961.js +0 -1
- package/assets/esri/core/workers/chunks/1503ca177e2466ec0e87.js +0 -1
- package/assets/esri/core/workers/chunks/1597d7b380d510ff5252.js +0 -1
- package/assets/esri/core/workers/chunks/1880c3b293cdfa804625.js +0 -1
- package/assets/esri/core/workers/chunks/1bea32b02d35ddb9b118.js +0 -1
- package/assets/esri/core/workers/chunks/1d78ec98eef7fef08f86.js +0 -1
- package/assets/esri/core/workers/chunks/1e6271524602e159dbad.js +0 -1
- package/assets/esri/core/workers/chunks/1f96d597ba736e088168.js +0 -1
- package/assets/esri/core/workers/chunks/26e41b08efe77d247409.js +0 -1
- package/assets/esri/core/workers/chunks/297b58f29c496923e1f3.js +0 -1
- package/assets/esri/core/workers/chunks/2a2a9fa62969644ea200.js +0 -1
- package/assets/esri/core/workers/chunks/2b296378d21e4e3c11d4.js +0 -1
- package/assets/esri/core/workers/chunks/2cbcf34cf896a438999b.js +0 -1
- package/assets/esri/core/workers/chunks/394b645d51e7bf799382.js +0 -1
- package/assets/esri/core/workers/chunks/50ab9a3f8bbb268fae59.js +0 -1
- package/assets/esri/core/workers/chunks/5a8b3e5977c233d5c9d0.js +0 -1
- package/assets/esri/core/workers/chunks/5b2dd164dd84fd1ca4f7.js +0 -1
- package/assets/esri/core/workers/chunks/62c228ca16fdc7a2c695.js +0 -1
- package/assets/esri/core/workers/chunks/639202a461b17840a13f.js +0 -1
- package/assets/esri/core/workers/chunks/693d269637135047a0c4.js +0 -1
- package/assets/esri/core/workers/chunks/6a14ec2d2de6778a4e7a.js +0 -1
- package/assets/esri/core/workers/chunks/6d3467997b5d01630b08.js +0 -1
- package/assets/esri/core/workers/chunks/6dfcb0c804e63e87e311.js +0 -1
- package/assets/esri/core/workers/chunks/778ab9e4c3928b0d7d74.js +0 -1
- package/assets/esri/core/workers/chunks/8012fdc49a7a10982f78.js +0 -1
- package/assets/esri/core/workers/chunks/85e0fd618625a639387f.js +0 -1
- package/assets/esri/core/workers/chunks/86465d4bb185d7460087.js +0 -1
- package/assets/esri/core/workers/chunks/87e7378b242debbfd575.js +0 -1
- package/assets/esri/core/workers/chunks/90b19e60c056f32623e7.js +0 -1
- package/assets/esri/core/workers/chunks/9461f7225c42cf15a114.js +0 -1
- package/assets/esri/core/workers/chunks/978649cb6df99ee728be.js +0 -1
- package/assets/esri/core/workers/chunks/9f5f4da954228d876219.js +0 -1
- package/assets/esri/core/workers/chunks/a2323c957c8b2fe225b4.js +0 -1
- package/assets/esri/core/workers/chunks/a36a33f43610c3cd985b.js +0 -1
- package/assets/esri/core/workers/chunks/a381932eef77f4d80292.js +0 -1
- package/assets/esri/core/workers/chunks/b089947c9a492c96ca27.js +0 -1
- package/assets/esri/core/workers/chunks/b6e4c35b76379088035c.js +0 -1
- package/assets/esri/core/workers/chunks/bbf2afa05314e267893f.js +0 -1
- package/assets/esri/core/workers/chunks/bd2f577cae61facdde4a.js +0 -1
- package/assets/esri/core/workers/chunks/bf2bfc0d78be8c185d58.js +0 -1
- package/assets/esri/core/workers/chunks/c4a78ab84186c7be599a.js +0 -1
- package/assets/esri/core/workers/chunks/c6e0ada6f2ad74fddfec.js +0 -1
- package/assets/esri/core/workers/chunks/c9d600dc6b6b5aafff1c.js +0 -1
- package/assets/esri/core/workers/chunks/ca33847a997ccfe8ddc2.js +0 -1
- package/assets/esri/core/workers/chunks/cca19c9564be2d02a277.js +0 -1
- package/assets/esri/core/workers/chunks/ccc2f2b3db008d8a495f.js +0 -1
- package/assets/esri/core/workers/chunks/d9f900975ac915a0f24f.js +0 -1
- package/assets/esri/core/workers/chunks/dcc8363faa22e6211351.js +0 -1
- package/assets/esri/core/workers/chunks/dd5d66f067e2386e0514.js +0 -1
- package/assets/esri/core/workers/chunks/e081d6f21a2c01ccaf61.js +0 -1
- package/assets/esri/core/workers/chunks/eb4ffb72c9360062141c.js +0 -1
- package/assets/esri/core/workers/chunks/ebae903845643d60b44a.js +0 -1
- package/assets/esri/core/workers/chunks/ebb0372e8da0f75c09dd.js +0 -1
- package/assets/esri/core/workers/chunks/f349f64f683620bdf9b5.js +0 -30
- package/assets/esri/core/workers/chunks/f6fb87092bdf6bbf0769.js +0 -1
- package/assets/esri/core/workers/chunks/f76c2b09e6ba9d107898.js +0 -1
- package/assets/esri/core/workers/chunks/fcf962f3dec6b5440983.js +0 -1
- /package/assets/esri/core/workers/chunks/{43c8b1473695574c663e.js.LICENSE.txt → 4754610760f3f634adf9.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{3861644c06cfebe8f40c.js.LICENSE.txt → 527547fa10d52cb3a7b1.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{b586f1021a27c5e1551a.js.LICENSE.txt → 7189e03cc24f5c10865a.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{3f812b0a28afb47aaaf0.js.LICENSE.txt → a35d1be700ebd3109397.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{13d1cb50232ae761425b.js.LICENSE.txt → eaeb95be8d4032513247.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
function A(A){return!!(A.visualVariableSizeMinMaxValue||A.visualVariableSizeScaleStops||A.visualVariableSizeStops||A.visualVariableSizeUnitValue||A.visualVariableSizeOutlineScaleStops)}function e(A){return!!A.visualVariableRotation}function a(A){return A.spriteRasterizationParam?A.spriteRasterizationParam:{type:"sprite-rasterization-param",resource:{type:"CIMPictureMarker",url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAJOgAACToAYJjBRwAAAAsSURBVEhL7c0xAQAwDASh+jf9lcCU7TDA27ECKqACKqACKqACKqACKqDjYPuLVfSmMPfafQAAAABJRU5ErkJggg==",size:16,invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture"},overrides:[]}}export{a as getAnimatedTechniqueSprite,e as hasRotationVVUniform,A as hasSizeVVUniform};
|
|
2
|
+
function A(A){return!!(A.visualVariableSizeMinMaxValue||A.visualVariableSizeScaleStops||A.visualVariableSizeStops||A.visualVariableSizeUnitValue||A.visualVariableSizeOutlineScaleStops)}function e(A){return!!A.visualVariableRotation}function a(A){return A.spriteRasterizationParam?A.spriteRasterizationParam:{type:"sprite-rasterization-param",resource:{type:"CIMPictureMarker",enable:!0,url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAJOgAACToAYJjBRwAAAAsSURBVEhL7c0xAQAwDASh+jf9lcCU7TDA27ECKqACKqACKqACKqACKqDjYPuLVfSmMPfafQAAAABJRU5ErkJggg==",size:16,invertBackfaceTexture:!1,scaleX:1,textureFilter:"Picture"},overrides:[]}}export{a as getAnimatedTechniqueSprite,e as hasRotationVVUniform,A as hasSizeVVUniform};
|
|
@@ -14,6 +14,7 @@ export type VolumeMeasurementErrorName = "insufficient-data" | "perimeter-too-la
|
|
|
14
14
|
* - "unsupported-layer-transparency": The volume measurement analysis does not support transparent layers.
|
|
15
15
|
* - "unknown": An unknown error occurred.
|
|
16
16
|
*
|
|
17
|
+
* @beta
|
|
17
18
|
* @since 4.34
|
|
18
19
|
* @see [VolumeMeasurementAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/VolumeMeasurementAnalysis/)
|
|
19
20
|
* @see [VolumeMeasurementAnalysisView3D](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/VolumeMeasurementAnalysisView3D/)
|
|
@@ -12,6 +12,7 @@ export interface VolumeMeasurementResultProperties {
|
|
|
12
12
|
*
|
|
13
13
|
* If the result is unavailable, the [VolumeMeasurementAnalysisView3D.error](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/VolumeMeasurementAnalysisView3D/#error) property provides the details on the cause.
|
|
14
14
|
*
|
|
15
|
+
* @beta
|
|
15
16
|
* @since 4.34
|
|
16
17
|
* @see [VolumeMeasurementAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/VolumeMeasurementAnalysis/)
|
|
17
18
|
* @see [VolumeMeasurementAnalysisView3D](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/VolumeMeasurementAnalysisView3D/)
|
|
@@ -33,6 +33,7 @@ import type { VolumeMeasurementPlacementResult } from "./VolumeMeasurement/types
|
|
|
33
33
|
* > [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/), [WFSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/WFSLayer/), [CSVLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/CSVLayer/),
|
|
34
34
|
* > [3D Object SceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/), and [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/BuildingSceneLayer/).
|
|
35
35
|
*
|
|
36
|
+
* @beta
|
|
36
37
|
* @since 4.34
|
|
37
38
|
* @see [VolumeMeasurementAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/VolumeMeasurementAnalysis/)
|
|
38
39
|
* @see [VolumeMeasurementResult](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/VolumeMeasurement/VolumeMeasurementResult/)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import e from"../../../core/Accessor.js";import{lerp as s}from"../../../core/mathUtils.js";import{destroyMaybe as i,disposeMaybe as r}from"../../../core/maybe.js";import{watch as o,initial as a}from"../../../core/reactiveUtils.js";import{signal as h}from"../../../core/signal.js";import{property as n,subclass as l}from"../../../core/accessorSupport/decorators.js";import{fromMat4 as c}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{targetTo as u}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as d}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{equals as p,copy as m,set as _}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{clone as f,ZEROS as g,zeros as x}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{fromValues as y}from"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import{zeros as b}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as T}from"../../../geometry/ellipsoidUtils.js";import{C as v,c as S}from"../../../chunks/Clouds.glsl.js";import{cloudPresets as
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../../core/Accessor.js";import{lerp as s}from"../../../core/mathUtils.js";import{destroyMaybe as i,disposeMaybe as r}from"../../../core/maybe.js";import{watch as o,initial as a}from"../../../core/reactiveUtils.js";import{signal as h}from"../../../core/signal.js";import{property as n,subclass as l}from"../../../core/accessorSupport/decorators.js";import{fromMat4 as c}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{targetTo as u}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as d}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{equals as p,copy as m,set as _}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{clone as f,ZEROS as g,zeros as x}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{fromValues as y}from"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import{zeros as b}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as T}from"../../../geometry/ellipsoidUtils.js";import{C as v,c as S}from"../../../chunks/Clouds.glsl.js";import{cloudPresets as C}from"./CloudsPresets.js";import{CloudsTechnique as w}from"./CloudsTechnique.js";import{CloudsTechniqueConfiguration as P}from"./CloudsTechniqueConfiguration.js";import{NoiseTextureAtlas as j}from"./NoiseTextureAtlas.js";import{TaskPriority as z}from"../../support/Scheduler.js";import{Yield as I}from"../../support/Yield.js";import{ColorAttachment0 as M}from"../../webgl/enums.js";import{FramebufferObject as H}from"../../webgl/FramebufferObject.js";import{TextureDescriptor as q}from"../../webgl/TextureDescriptor.js";let R=class extends e{constructor(t){super(t),this._state=h(0),this._passParameters=new v,this._weatherTileCount=128,this._sliceIndex=0,this._tileIndex=0,this._tilesPerSlice=1,this.coverage=s(C.default.coverage[0],C.default.coverage[1],.5),this.density=s(C.default.density[0],C.default.density[1],.5),this.absorption=s(C.default.absorption[0],C.default.absorption[1],.5),this.cloudSize=s(C.default.cloudSize[0],C.default.cloudSize[1],.5),this.detailSize=s(C.default.detailSize[0],C.default.detailSize[1],.5),this.smoothness=s(C.default.smoothness[0],C.default.smoothness[1],.5),this.cloudHeight=s(C.default.cloudHeight[0],C.default.cloudHeight[1],.5),this.raymarchingSteps=C.default.raymarchingSteps,this._viewMatrix=d(),this._dirty=!0,this.readyToRun=!0,this._configuration=new P}initialize(){const t=T(this.view.spatialReference);this._passParameters.cloudRadius=.5*t.radius;const e=()=>this.setDirty();this.addHandles([this.view.resourceController.scheduler.registerTask(z.CLOUDS_GENERATOR,this),o(()=>this.coverage,e,a),o(()=>this.density,e,a),o(()=>this.absorption,e,a),o(()=>this.cloudSize,e,a),o(()=>this.detailSize,e,a),o(()=>this.smoothness,e,a),o(()=>this.cloudHeight,e,a),o(()=>this.raymarchingSteps,e,a)]);const s=f(this._computeWeatherTile());let i=0;this.addHandles(o(()=>{const t=this._computeWeatherTile();return p(s,t)||(++i,m(s,t)),i},e))}destroy(){this.destroyCubeMap(),this._passParameters.noiseTexture=i(this._passParameters.noiseTexture)}_precompile(){this._configuration.steps=this.raymarchingSteps,this._configuration.writeTextureChannels=1-this.parameters.readChannels,this.context.techniques.precompile(w,this._configuration)}_acquireTechnique(){switch(this.raymarchingSteps){case 0:this._tilesPerSlice=1;break;case 1:this._tilesPerSlice=4;break;case 3:case 2:this._tilesPerSlice=8;break;default:this.raymarchingSteps}return this._configuration.steps=this.raymarchingSteps,this._configuration.writeTextureChannels=1-this.parameters.readChannels,this.context.techniques.get(w,this._configuration)}_computeWeatherTile(){const{camera:t,environment:e}=this.view,{latitude:s,longitude:i}=t.position;if(null==s||null==i)return g;_(D,(s+90)/180,(i+180)/360);const r=Math.floor(this._weatherTileCount*Math.abs(2*D[0]-1));D[0]=Math.floor(2*this._weatherTileCount*D[0]),D[1]=Math.floor(4*(this._weatherTileCount-r)*D[1]);let o=0,a=0;if("virtual"!==e?.lighting?.type&&null!=e?.lighting?.date){const t=new Date(e.lighting.date);t.setUTCHours(e.lighting.date.getUTCHours()+(e.lighting.displayUTCOffset??0)),o=31*t.getUTCMonth()+t.getUTCDate(),a=t.getUTCFullYear()}return D[0]=(D[0]+o)%(2*this._weatherTileCount),D[1]=(D[1]+a%100)%(4*this._weatherTileCount),D}get state(){return this._state.value}set state(t){this._state.value=t}get usedMemory(){return(this._fbo?.usedMemory??0)+(this._passParameters.noiseTexture?.textureAtlas?.usedMemory??0)}_ensureNoiseTexture(){return this._passParameters.noiseTexture??=new j({context:this.context}),this._passParameters.noiseTexture}_ensureFrameBufferCube(t){const e=this.context.renderContext.rctx;if(null==this._fbo){const s=new q(t,t/2);s.target=35866,s.depth=6,s.wrapMode=33071,this._fbo=new H(e,s),this.parameters.data=this,this.parameters.absorption=this.absorption,this.parameters.coverage=this.coverage}return e.unbindTexture(this._fbo.colorTexture),this._fbo}get cubeMap(){return this._fbo}get parameters(){return this.context.renderContext.bind.clouds}destroyCubeMap(){this._fbo=r(this._fbo),this.parameters.data=null}applyPreset(t,e){const i=t.median,r=t=>{const r=s(t[0],t[1],i);return e<.5?s(t[0],r,2*e):s(r,t[1],2*(e-.5))};this.coverage=r(t.coverage),this.density=r(t.density),this.absorption=r(t.absorption),this.cloudSize=r(t.cloudSize),this.detailSize=r(t.detailSize),this.smoothness=r(t.smoothness),this.cloudHeight=r(t.cloudHeight),this.raymarchingSteps=t.raymarchingSteps}setDirty(){this._dirty=this.readyToRun=!0,this._precompile()}runTask(t){if(3===this.state)return I;this._dirty&&(this._sliceIndex=this._tileIndex=0,this.state=1,this._passParameters.absorption=this.absorption,this._passParameters.density=this.density,this._passParameters.cloudSize=this.cloudSize,this._passParameters.detailSize=this.detailSize,this._passParameters.smoothness=this.smoothness,this._passParameters.cloudHeight=this.cloudHeight,this._passParameters.coverage=this.coverage,this._ensureNoiseTexture().updateWeatherMap(this._computeWeatherTile()),this._dirty=!1);const e=this._acquireTechnique();if(!this._ensureNoiseTexture().textureAtlas||!e.compiled)return I;const s=U[this._sliceIndex],i=O[this._sliceIndex];u(this._viewMatrix,k,s,i),c(this._passParameters.viewMatrix,this._viewMatrix);const r=this.context.renderContext.rctx,o=r.getViewport(),a=S/this._tilesPerSlice,h=this._tileIndex*a;r.setViewport(0,h,S,a);const n=this._ensureFrameBufferCube(S);r.bindFramebuffer(n),this._passParameters.lastSlice=5===this._sliceIndex,r.bindTechnique(e,this.context.renderContext.bind,this._passParameters);const l=35866;return n.setColorTextureTarget(l,M,this._sliceIndex),r.screen.draw(),r.gl.flush(),r.setViewport(o.x,o.y,o.width,o.height),this.requestRender(),++this._tileIndex,5===this._sliceIndex&&this._tileIndex===this._tilesPerSlice?(this._sliceIndex=this._tileIndex=0,this.state=2,this.readyToRun=!1):this._tileIndex===this._tilesPerSlice&&(++this._sliceIndex,this._tileIndex=0),t.madeProgress(),I}};t([n({constructOnly:!0})],R.prototype,"context",void 0),t([n({constructOnly:!0})],R.prototype,"view",void 0),t([n({constructOnly:!0})],R.prototype,"requestRender",void 0),t([n()],R.prototype,"coverage",void 0),t([n()],R.prototype,"density",void 0),t([n()],R.prototype,"absorption",void 0),t([n()],R.prototype,"cloudSize",void 0),t([n()],R.prototype,"detailSize",void 0),t([n()],R.prototype,"smoothness",void 0),t([n()],R.prototype,"cloudHeight",void 0),t([n()],R.prototype,"raymarchingSteps",void 0),t([n()],R.prototype,"readyToRun",void 0),R=t([l("esri.views.3d.environment.CloudsRenderer")],R);const U=[y(1,0,0),y(-1,0,0),y(0,1,0),y(0,-1,0),y(0,0,1),y(0,0,1)],O=[y(0,0,-1),y(0,0,-1),y(0,0,-1),y(0,0,-1),y(0,1,0),y(0,1,0)],k=b(),D=x();export{R as CloudsRenderer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{lerp as t,smoothstep as s}from"../../../core/mathUtils.js";import{releaseMaybe as r}from"../../../core/maybe.js";import{watch as
|
|
2
|
+
import{__decorate as e}from"tslib";import{lerp as t,smoothstep as s}from"../../../core/mathUtils.js";import{releaseMaybe as r}from"../../../core/maybe.js";import{watch as a,syncAndInitial as i}from"../../../core/reactiveUtils.js";import{subclass as o}from"../../../core/accessorSupport/decorators.js";import{copy as n,normalize as h,dot as m,scale as p,lerp as c,length as l}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{create as d,fromValues as _}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as u}from"../../../geometry/ellipsoidUtils.js";import{InternalRenderCategory as f}from"../webgl.js";import{F as g}from"../../../chunks/Fog.glsl.js";import{FogTechnique as P}from"./FogTechnique.js";import{FogTechniqueConfiguration as w}from"./FogTechniqueConfiguration.js";import{heightLimit as b}from"./weather.js";import{TransparentEnvironment as y}from"../webgl-engine/effects/TransparentEnvironment.js";import{Blit as v}from"../webgl-engine/effects/blit/Blit.js";import{ColorAttachment1 as j,DepthStencilAttachment as F}from"../../webgl/enums.js";const E=.95,R=1;let q=class extends y{constructor(e){super(e),this._configuration=new w,this._newParameters=new x,this._oldParameters=new x,this._fadedParameters=new x,this._parameters=this._newParameters,this._passParameters=new g,this._blit=null;const t=u(e.view.spatialReference);this._planetRadius=t.radius,this._atmosphereRadius=t.radius+t.atmosphereHeight}initialize(){this.addHandles([a(()=>this.view.environment.atmosphereEnabled,()=>this._updateEnabled(),i),a(()=>this.view.environment.weather,()=>this._updateEnabled(),i),a(()=>this._updateFogParameters(),()=>{},i)]),this.addHandles(a(()=>this._fadeFactor,e=>this._fade(e),i))}_updateEnabled(){this.view.environment.atmosphereEnabled&&this.view.environment.weather?this._enable():this._disable()}get _fadeFactor(){return this.view.stage?.renderer.renderContext.bind.clouds.fadeFactor??1}_fade(e){const{_newParameters:t,_oldParameters:s}=this;e>=1?(this._parameters=t,this._oldParameters.copyFrom(this._newParameters)):e<=0?this._parameters=s:(this._fadedParameters.lerp(s,t,e),this._parameters=this._fadedParameters)}_updateFogParameters(){const e=this.view.environment.weather,s="foggy"===e.type||"snowy"===e.type||"rainy"===e.type;this._newParameters.strength="foggy"===e.type?t(3e-5,.005,e.fogStrength**3):"snowy"===e.type||"rainy"===e.type?t(4e-6,2e-4,(e.precipitation??0)**3):0,this._newParameters.amount=s?1:0,"foggy"!==e.type&&"snowy"!==e.type||n(this._newParameters.color,A),"rainy"===e.type&&n(this._newParameters.color,N),this._fadeFactor>=1&&this._oldParameters.copyFrom(this._newParameters),this.requestRender(2)}precompile(){this._parameters.amount>0&&(this._configuration.hasEmissive=this.bindParameters.hasEmission,this.techniques.precompile(P,this._configuration))}render(e){const t=e.find(({name:e})=>e===f.TRANSPARENT_ENVIRONMENT);if(0===this._parameters.amount)return t;if(this._update(),this._passParameters.amount<=0)return t;const s=t.getAttachment(j);this._configuration.hasEmissive=null!=s;const a=this.techniques.get(P,this._configuration);if(!a.compiled)return this.requestRender(1),t;const i=t.getAttachment(F),o=this.renderingContext,{fullWidth:n,fullHeight:h}=this.bindParameters.camera,m=n,p=h;return s&&(this._passParameters.emission=this.fboCache.acquire(m,p,"glow horizontal",8),this._blit??=new v(this.techniques),this._blit.blitTexture(o,s?.attachment,this.bindParameters,this._passParameters.emission)),t.attachDepth(null),o.bindFramebuffer(t.fbo),o.bindTechnique(a,this.bindParameters,this._passParameters),o.screen.draw(),t.attachDepth(i),this._passParameters.emission=r(this._passParameters.emission),t}_update(){const e=this.bindParameters.camera;h(T,e.eye);const t=Math.max(0,m(T,this.bindParameters.lighting.mainLight.direction)),r=this._parameters.color;p(C,r,.1),c(this._passParameters.color,C,r,t);const a=l(e.eye);this._passParameters.atmosphereC=a**2-this._atmosphereRadius**2,this._passParameters.amount=(1-s(E*b,R*b,Math.abs(a-this._planetRadius)))*this._parameters.amount,this._passParameters.strength=this._parameters.strength}get test(){return{parameters:this._passParameters}}};q=e([o("esri.views.3d.environment.Fog")],q);class x{constructor(){this.color=d(),this.strength=0,this.amount=0}copyFrom(e){this.amount=e.amount,this.strength=e.strength,n(this.color,e.color)}lerp(e,s,r){this.amount=t(e.amount,s.amount,r),this.strength=t(e.strength,s.strength,r),c(this.color,e.color,s.color,r)}}const T=d(),C=d(),N=_(.5,.5,.5),A=_(1.5,1.5,1.5);export{q as Fog,x as FogParameters};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{subclass as r}from"../../../core/accessorSupport/decorators.js";import{a as o}from"../../../chunks/Fog.glsl.js";import{ReloadableShader as i}from"../webgl-engine/core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{makePipelineState as
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as r}from"../../../core/accessorSupport/decorators.js";import{a as o}from"../../../chunks/Fog.glsl.js";import{ReloadableShader as i}from"../webgl-engine/core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{makePipelineState as t,defaultColorWrite as n,separateBlendingParams as l}from"../../webgl/renderState.js";let c=class extends s{constructor(){super(...arguments),this.shader=new i(o,()=>import("./Fog.glsl.js"))}initializePipeline(){return t({blending:l(770,0,771,1),colorWrite:n})}};c=e([r("esri.views.3d.environment.FogTechnique")],c);export{c as FogTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../../core/Accessor.js";import{disposeMaybe as r}from"../../../core/maybe.js";import{subclass as o}from"../../../core/accessorSupport/decorators.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import{equals as i,copy as n}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{N as c}from"../../../chunks/NoiseTextureAtlas.glsl.js";import{NoiseTextureAtlasTechniqueConfiguration as a}from"./NoiseTextureAtlasConfiguration.js";import{atlasSize as u}from"./NoiseTextureAtlasDimensions.js";import{NoiseTextureAtlasTechnique as h}from"./NoiseTextureAtlasTechnique.js";import{FramebufferObject as m}from"../../webgl/FramebufferObject.js";import{TextureDescriptor as p}from"../../webgl/TextureDescriptor.js";let f=class extends e{constructor(t){super(t),this._passParameters=new c,this._configuration=new a,this._fbo=new m(t.context.renderContext.rctx,new p(u)),t.context.techniques.precompile(h,this._configuration)}get textureAtlas(){if(this._texture)return this._texture;const t=this.context.techniques.get(h,this._configuration);return t.compiled&&(this._texture=this._render(t)),this._texture}updateWeatherMap(t){i(this._passParameters.weatherTile,t)||(n(this._passParameters.weatherTile,t),this._configuration.mode=this._texture?1:0,this._texture=null,this.context.techniques.precompile(h,this._configuration))}destroy(){this._fbo=r(this._fbo)}_render(t){if(!this._fbo)return null;const e=this.context.renderContext.rctx,r=e.getViewport();return e.setViewport(0,0,u,u),e.bindFramebuffer(this._fbo),e.bindTechnique(t,this.context.renderContext.bind,this._passParameters),e.screen.draw(),e.setViewport(r.x,r.y,r.width,r.height),this._fbo.colorTexture}};t([s({constructOnly:!0})],f.prototype,"context",void 0),f=t([o("esri.views.3d.environment.NoiseTextureAtlas")],f);export{f as NoiseTextureAtlas};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{subclass as r}from"../../../core/accessorSupport/decorators.js";import{a as s}from"../../../chunks/NoiseTextureAtlas.glsl.js";import{ReloadableShader as o}from"../webgl-engine/core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as r}from"../../../core/accessorSupport/decorators.js";import{a as s}from"../../../chunks/NoiseTextureAtlas.glsl.js";import{ReloadableShader as o}from"../webgl-engine/core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as t}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{makePipelineState as i,defaultColorWrite as n,copySource as l,separateBlendingParams as a}from"../../webgl/renderState.js";let c=class extends t{constructor(){super(...arguments),this.shader=new o(s,()=>import("./NoiseTextureAtlas.glsl.js"))}initializePipeline(e){return i({blending:0===e.mode?l:a(0,1,1,0),depthTest:{func:519},colorWrite:n})}};c=e([r("esri.views.3d.environment.NoiseTextureAtlasTechnique")],c);export{c as NoiseTextureAtlasTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{loadLyr3DWorkerWASM as s}from"../../../libs/lyr3d/Lyr3DModule.js";let t,n;async function e(s){await
|
|
2
|
+
import{loadLyr3DWorkerWASM as s}from"../../../libs/lyr3d/Lyr3DModule.js";let t,n;async function e(s){await l();const t={status:1,error:"",jobDescJson:"",data:new Uint8Array(0),missingInputUrls:[]};if(s.inputs.length<1)return{result:t,transferList:[]};const e={ptrs:[],sizes:[]};for(const l of s.inputs){const s=n._malloc(l.byteLength);new Uint8Array(n.HEAPU8.buffer,s,l.byteLength).set(new Uint8Array(l)),e.ptrs.push(s),e.sizes.push(l.byteLength)}const i=n.process(s.jobDescJson,s.id,e,s.isMissingResourceCase);t.status=i.status,t.missingInputUrls=i.missingInputUrls.slice();const r=0===i.status&&i.data,o=2===t.status&&t.missingInputUrls.length>0;t.jobDescJson=i.jobDescJson.slice(),t.error=i.error.slice(),r?t.data=i.data.slice():o&&(t.originalInputs=s.inputs.slice());for(let l=0;l<e.ptrs.length;++l)n._free(e.ptrs[l]);const a=[];if(r)a.push(t.data.buffer);else if(o)for(const n of s.inputs)a.push(n);return{result:t,transferList:a}}async function i(s){await l(),n.add_spatial_reference_info(s.sr,s.isGCS,s.toMetersXY,s.toMetersZ)}function r(s){if(!n)return{success:!1,modifications:null};const t=n._malloc(8*s.modifications.length),e=new Float64Array(n.HEAPF64.buffer,t,s.modifications.length);e.set(s.modifications);const i=n.switch_mesh_modification_polygon_vcs(t,s.modifications.length,s.inVCS);let r=null;return i&&(r=e.slice()),n._free(t),{success:i,modifications:r}}function o(){n&&(n.uninitialize_lyr3d_worker_wasm(),n=null)}function l(){return n?Promise.resolve():(t||(t=s().then(s=>{n=s,n.initialize_lyr3d_worker_wasm(),t=null})),t)}function a(){return null!==n}export{i as addSpatialReferenceInfo,o as destroyWasm,l as initialize,a as isInitialized,e as process,r as switchMeshModificationPolygonVCSSync};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import s from"../../../core/Logger.js";import t from"../../../core/PooledArray.js";import{create as
|
|
2
|
+
import s from"../../../core/Logger.js";import t from"../../../core/PooledArray.js";import{create as e}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{WorkerHandle as o}from"../../../core/workers/WorkerHandle.js";import{canProjectWithoutEngine as r}from"../../../geometry/projectionUtils.js";import n from"../../../geometry/SpatialReference.js";import{projectVectorToVector as i}from"../../../geometry/projection/projectVectorToVector.js";class h{constructor(s,t,e,o,r,n){this.layout=s,this.interleavedVertexData=t,this.indices=e,this.hasColors=o,this.hasModifications=r,this.positionData=n}}class a{constructor(s,t,e,o,r,n,i){this.componentOffsets=s,this.featureIds=t,this.anchorIds=e,this.anchors=o,this.transformedGeometry=r,this.globalTrafo=n,this.obb=i}}class c extends o{constructor(s){super("SceneLayerWorker","process",{process:s=>[s.geometryBuffer],project:s=>[s.positions.buffer],transformNormals:s=>[s.normals.buffer]},s,{hasInitialize:!0})}setModifications(s,t,e){const o={context:s,modifications:t,isGeodetic:e};return this.broadcast(o,"setModifications")}setLegacySchema(s,t){const e=JSON.stringify(t);return this.broadcast({context:s,jsonSchema:e},"setLegacySchema")}destroyContext(s){return this.broadcast(s,"destroyContext")}async destroyContextAndSelf(s){await this.destroyContext(s),this.destroy()}project(s,t){return this.invokeMethod("project",s,t)}transformNormals(s,t){return this.invokeMethod("transformNormals",s,t)}}const p=new t({deallocator:null}),l=e();function u(t,e,o){p.clear();let n=1/0,h=1/0,a=-1/0,c=-1/0,u=!1;for(const g of e){const t="clip"===g.type?2:"mask"===g.type?1:0,e=g.geometry;let f=s=>s;if(e.spatialReference){if(!r(e.spatialReference,o)){s.getLogger("esri.views.3d.layers.SceneLayerWorkerHandle").warn("im-modification-projection-failed","Can't project modification polygon into layer spatial reference, ignoring modification",{polygon:e});continue}f=s=>(i(s,e.spatialReference,l,o),l)}u=u||1===t;const m=e.rings.length,d=e.rings.some(s=>s.length<3);if(0===m||d)s.getLogger("esri.views.3d.layers.SceneLayerWorkerHandle").warn("im-modification-invalid-polygon","Ignoring invalid modification polygon (no rings or rings with less than 3 vertices).",{polygon:e});else{p.push(t),p.push(m);for(const s of e.rings){p.push(s.length);for(const t of s){const s=f(t);p.push(s[0]),p.push(s[1]),p.push(s[2]??0),n=Math.min(n,s[0]),h=Math.min(h,s[1]),a=Math.max(a,s[0]),c=Math.max(c,s[1])}}}}if(null!=t)if(u){const s=1e-4;p.push(2),p.push(2),p.push(4),p.push(n-s),p.push(h-s),p.push(0),p.push(a+s),p.push(h-s),p.push(0),p.push(a+s),p.push(c+s),p.push(0),p.push(n-s),p.push(c+s),p.push(0),p.push(4),p.push(t[0]),p.push(t[1]),p.push(0),p.push(t[2]),p.push(t[1]),p.push(0),p.push(t[2]),p.push(t[3]),p.push(0),p.push(t[0]),p.push(t[3]),p.push(0)}else p.push(1),p.push(1),p.push(4),p.push(t[0]),p.push(t[1]),p.push(0),p.push(t[2]),p.push(t[1]),p.push(0),p.push(t[2]),p.push(t[3]),p.push(0),p.push(t[0]),p.push(t[3]),p.push(0);p.push(3);const f=new Float64Array(p.length);for(let s=0;s<p.length;++s)f[s]=p.at(s);return f}function f(s,t){let e=0;for(const o of t){const t=o.geometry,r=t.rings.length,n=t.rings.some(s=>s.length<3);if(0!==r&&!n){e+=1,e+=1;for(let o=0;o<t.rings.length;++o){const r=t.rings[o];e+=1;for(let n=0;n<r.length;++n){const r=[s[e+0],s[e+1],s[e+2]];e+=3,t.setPoint(o,n,r)}}}}}function g(s,t){let e=0,o=t.geometry;const r=o.rings.length,i=o.rings.some(s=>s.length<3);if(0===r||i)return null;o=o.clone(),o.spatialReference=n.WGS84,e+=1,e+=1;for(let n=0;n<o.rings.length;++n){const t=o.rings[n];e+=1;for(let r=0;r<t.length;++r){const t=[s[e+0],s[e+1],s[e+2]];e+=3,o.setPoint(n,r,t)}}return o}export{c as SceneLayerWorkerHandle,a as TransformedData,h as TransformedGeometry,f as fromWasmModificationInLoad,g as fromWasmModificationInSave,u as toWasmModification};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{clone as t}from"../../../../core/lang.js";import{getMetersPerVerticalUnitForSR as e}from"../../../../core/units.js";import{e as r}from"../../../../chunks/earcut.js";import{normalFromMat4 as s}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{invert as o,invertOrIdentity as n}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as l,sub as c,cross as m,add as p,normalize as h,transformMat4 as d}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{ONES as u,create as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{computeTranslationToOriginAndRotation as y}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{create as f,fromBuffer as b,intersectsClippingArea as _}from"../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as x}from"../../../../geometry/support/DoubleArray.js";import{newIndexArray as j,getZeroIndexArray as S}from"../../../../geometry/support/Indices.js";import{t as w}from"../../../../chunks/vec3.js";import{SnappingCandidateVertex as P,SnappingCandidateEdge as v}from"../../../../layers/graphics/data/SnappingCandidate.js";import{getDriverAxisSizeValue as C}from"../../../../renderers/support/renderingInfoUtils.js";import{needsElevationUpdates3D as E,SampleElevationInfo as A}from"./elevationAlignmentUtils.js";import{extrudePolygon as D}from"./extrudeUtils.js";import{Object3DEdgeState as I,Graphics3DObject3DGraphicLayer as U}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as z}from"./Graphics3DSymbolLayer.js";import{computeCentroid as M}from"./graphicUtils.js";import{geometryAsPolygon as O}from"./polygonUtils.js";import{createMaterial as L}from"../support/edgeUtils.js";import{encodeNaNUInt8 as G}from"../support/symbolColorUtils.js";import{debugFlags as V}from"../../support/debugFlags.js";import{SamplePosition as T}from"../../support/ElevationProvider.js";import{polygonToRenderInfo as B}from"../../support/renderInfoUtils/polygon.js";import{Attribute as F}from"../../webgl-engine/lib/Attribute.js";import{Geometry as R}from"../../webgl-engine/lib/Geometry.js";import{isGeometryWithMapPositions as H}from"../../webgl-engine/lib/GeometryWithMapPositions.js";import{compressNormals as N,compressNormal as W}from"../../webgl-engine/lib/Normals.js";import{Object3D as k}from"../../webgl-engine/lib/Object3D.js";import{DefaultMaterial as q}from"../../webgl-engine/materials/DefaultMaterial.js";const Z=["polygon","extent"];class J extends z{constructor(t,e,r,s){super(t,e,r,s,$(e)),this.ensureDrapedStatus(!1)}async doLoad(){const t=this.symbolLayer,e=t?.material,r=this.symbolLayer.material?.color?.a,s=this.needsDrivenTransparentPass||null!=r&&1!==r,i=e?.emissive,o=("color"===i?.source?i?.strength:void 0)??0,n=!this._hasDrivenColorOrOpacity&&(null==r||0===r),a={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0,ambient:u,diffuse:u,opacity:n?0:1,layerOpacity:this._getLayerOpacity(),drivenOpacity:s,hasSymbolColors:!0,hasSlicePlane:this._context.slicePlaneEnabled,castShadows:t.castShadows,emissiveStrengthFromSymbol:o,emissiveSource:1,offsetTransparentBackfaces:!0,normalType:1},l=new q(a,this._context),c=new q({...a,cullFace:2},this._context);this._materials[0]=l,this._materials[1]=c,this._updateTransparentDepedentMaterialParameters()}destroy(){super.destroy(),this._materials.length=0}createGraphics3DGraphic(t){const e=t.graphic;if(!this._validateGeometry(e.geometry,Z,this.symbolLayer.type))return null;const r=this._getDrivenUInt8ColorWithNaNSupport(t.renderingInfo,this._materialColor,!1);G(r,r);const s=this.createElevationContextForGraphic(e);return this._createAs3DShape(e,t.renderingInfo,r,s,e.uid)}layerOpacityChanged(t,e){const r=this._getLayerOpacity();this._materials[0]?.setParameters({layerOpacity:r}),this._materials[1]?.setParameters({layerOpacity:r}),this._updateTransparentDepedentMaterialParameters(),t?.forEach(t=>e(t)?.layerOpacityChanged(r,this._context.isAsync))}layerScreenSizePerspectiveChanged(){}layerElevationInfoChanged(t,e){return this.updateGraphics3DGraphicElevationInfo(t,e,E)}slicePlaneEnabledChanged(t,e){return this._materials[0]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),this._materials[1]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),t?.forEach(t=>{const r=e(t);null!=r&&r.slicePlaneEnabledChanged(this._context.slicePlaneEnabled,this._context.isAsync)}),!0}physicalBasedRenderingChanged(){const t={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0};return this._materials[0]?.setParameters(t),this._materials[1]?.setParameters(t),!0}_getExtrusionSize(t){let e;return e=t.size&&this._drivenProperties.size?C(t.size.output,2)??0:this._getSymbolSize(),e/=this._context.renderCoordsHelper.unitInMeters,e}applyRendererDiff(t,e){return this._drivenPropertiesChanged(e)?0:1}async queryForSnapping(r,s,i,o){const n=this._getExtrusionSize(i)*this._context.renderCoordsHelper.unitInMeters/e(s),{objectId:a,target:l}=r,c=t(l);switch(c.z=(c.z??0)+n,r.type){case"edge":{const{start:e,end:s}=r,i=t(e),o=t(s);return i.z=(i.z??0)+n,o.z=(o.z??0)+n,[new v(a,c,1/0,i,o)]}case"vertex":return[new P(a,c,1/0),new v(a,l,1/0,l,c)];default:return[]}}_getSymbolSize(){return this.symbolLayer.size??1}_createAs3DShape(t,e,n,l,c){const m=O(t.geometry);if(null==m)return null;if(0===m.rings.length||!m.rings.some(t=>t.length>0))return this._logGeometryValidationWarnings(m.rings,"rings","ExtrudeSymbol3DLayer"),null;const p=B(m,this._context.elevationProvider,this._context.renderCoordsHelper,l);this._logGeometryCreationWarnings(p,m.rings,"rings","ExtrudeSymbol3DLayer");const h=M(m);if(null==h)return null;const d=new Array,u=new Array,S=f(),P=a(),v=g(),C=1===this._context.renderCoordsHelper.viewingMode;C||this._context.renderCoordsHelper.worldUpAtPosition(null,v),y(m.spatialReference,[h.x,h.y,0],P,this._context.renderCoordsHelper.spatialReference);const A=a();o(A,P);const z=i();s(z,A);const{polygons:G,mapPositions:V,position:T}=p,F=new Map,R=this._materials[0];for(const s of G){const t=s.count;if(this._context.clippingExtent&&(b(s.mapPositions,S),!_(S,this._context.clippingExtent)))continue;const i=r(s.mapPositions,s.holeIndices,3);if(0===i.length)continue;const o=i.length,a=6*t,l=j(a+o),m=j(o),p=x(3*a),h=x(3*a),g=x(3*a),y=x(a),f=this._getExtrusionSize(e);D(T,V,i,s,p,g,h,y,l,m,f,v,C),w(p,p,A);const E=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:c,layerViewUid:this._context.layerViewUid}),I=new at(p,g,N(h),y),U=K(R,l,l.length-m.length,I,n,E),z=t,M=t,O=2*s.count,L=new lt(z,M,O,o/3);Y(U,L,P),F.set(U,L),d.push(U,K(this._materials[1],m,0,I,n,E)),u.push(I.heights)}if(0===d.length)return null;const H=new k({geometries:d,layerViewUid:this._context.layerViewUid,graphicUid:c,isElevationSource:!0});H.transformation=P;const W=L(this.symbolLayer,{opacity:this._getLayerOpacity()}),q=W?new I(this._materials[0],W,this._context.slicePlaneEnabled):null,Z=new U(this,H,null,(t,e,r,s,i)=>X(t,e,r,s,i,u,F),l,q);return Z.alignedSampledElevation=p.sampledElevation,Z.needsElevationUpdates=E(l.mode),Z}get _materialColor(){return this.symbolLayer.material?.color}_updateTransparentDepedentMaterialParameters(){const t=this._materials[0];t&&t.setParameters({cullFace:t.transparent?0:2})}}function K(t,e,r,s,i,o){const n=S(e.length),a=[["position",new F(s.positions,e,3,!0)],["normalCompressed",new F(s.normals,e,2,!0)],["symbolColor",new F(i,n,4,!0)]];return new R(t,a,s.elevation,0,o,r)}const Q=g();function X(t,e,r,s,i,o,c){const m=t.stageObject,p=m.geometries,h=p.length,u="absolute-height"!==e.mode;let g=0;const y=m.transformation,f=n(a(),y);for(let n=0;n<h;n+=2){const t=p[n];if(!H(t))continue;const e=t.getMutableAttribute("position").data,a=o[n/2],h=new T(t.mapPositions),b=e.length/3;let _=!1,x=0;{let t=0;for(let o=0;o<b;o++){Q[0]=e[t],Q[1]=e[t+1],Q[2]=e[t+2],s(h,rt),u&&(x+=rt.sampledElevation),V.TESTS_DISABLE_OPTIMIZATIONS?(l(tt,h.array[h.offset],h.array[h.offset+1],rt.z+a[t/3]),null!=r&&i.toRenderCoords(tt,r,tt),d(tt,tt,f)):(l(tt,e[t],e[t+1],e[t+2]),d(tt,tt,y),i.setAltitude(tt,rt.z+a[t/3]),d(tt,tt,f)),e[t]=tt[0],e[t+1]=tt[1],e[t+2]=tt[2];const o=st/i.unitInMeters;(Math.abs(Q[0]-e[t])>=o||Math.abs(Q[1]-e[t+1])>=o||Math.abs(Q[2]-e[t+2])>=o)&&(_=!0),h.offset+=3,t+=3}}if(_){const e=c.get(t);e&&Y(t,e,y),m.geometryVertexAttributeUpdated(p[n],"normalCompressed"),t.invalidateBoundingInfo(),m.geometryVertexAttributeUpdated(p[n],"position"),p[n+1].invalidateBoundingInfo(),m.geometryVertexAttributeUpdated(p[n+1],"position")}g+=x/b}return g/h}function Y(t,e,r){const s=t.getMutableAttribute("position"),i=t.getMutableAttribute("normalCompressed").data,o=s.data,n=t.attributes.get("position").indices,{topVertexStart:a,topVertexCount:u,topFaceStart:g,topFaceCount:y}=e,f=g+y,b=a+u,_=it,x=ot,j=nt,S=et,w=tt;l(w,0,0,0);const P=(t,e)=>{const s=3*t;l(e,o[s+0],o[s+1],o[s+2]),d(e,e,r)};for(let l=g;l<f;++l){const t=3*l;P(n[t+0],_[0]),P(n[t+1],_[1]),P(n[t+2],_[2]),c(x,_[1],_[0]),c(j,_[2],_[0]),m(S,x,j),p(w,w,S)}h(w,w);for(let l=a;l<b;++l){const t=w[0],e=w[1],r=w[2];W(i,l,t,e,r)}}function $(t){return 1===(t.material?.color?.a??0)}const tt=g(),et=g(),rt=new A,st=.01,it=[g(),g(),g()],ot=g(),nt=g();class at{constructor(t,e,r,s){this.positions=t,this.elevation=e,this.normals=r,this.heights=s}}class lt{constructor(t,e,r,s){this.topVertexStart=t,this.topVertexCount=e,this.topFaceStart=r,this.topFaceCount=s}}export{J as Graphics3DExtrudeSymbolLayer};
|
|
2
|
+
import{clone as t}from"../../../../core/lang.js";import{getMetersPerVerticalUnitForSR as e}from"../../../../core/units.js";import{e as r}from"../../../../chunks/earcut.js";import{normalFromMat4 as s}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{invert as o,invertOrIdentity as n}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as l,sub as c,cross as m,add as p,normalize as h,transformMat4 as d}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{ONES as u,create as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as f,ZEROS as y}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{computeTranslationToOriginAndRotation as b}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{create as _,fromBuffer as x,intersectsClippingArea as S}from"../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as j}from"../../../../geometry/support/DoubleArray.js";import{newIndexArray as w,getZeroIndexArray as v}from"../../../../geometry/support/Indices.js";import{t as C}from"../../../../chunks/vec3.js";import{SnappingCandidateVertex as P,SnappingCandidateEdge as E}from"../../../../layers/graphics/data/SnappingCandidate.js";import{getDriverAxisSizeValue as I}from"../../../../renderers/support/renderingInfoUtils.js";import{needsElevationUpdates3D as A,SampleElevationInfo as D}from"./elevationAlignmentUtils.js";import{extrudePolygon as U}from"./extrudeUtils.js";import{Object3DEdgeState as M,Graphics3DObject3DGraphicLayer as O}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as z}from"./Graphics3DSymbolLayer.js";import{computeCentroid as L}from"./graphicUtils.js";import{geometryAsPolygon as G}from"./polygonUtils.js";import{createMaterial as V}from"../support/edgeUtils.js";import{encodeNaNUInt8 as B}from"../support/symbolColorUtils.js";import{debugFlags as T}from"../../support/debugFlags.js";import{SamplePosition as R}from"../../support/ElevationProvider.js";import{polygonToRenderInfo as F}from"../../support/renderInfoUtils/polygon.js";import{Attribute as H}from"../../webgl-engine/lib/Attribute.js";import{Geometry as N}from"../../webgl-engine/lib/Geometry.js";import{isGeometryWithMapPositions as W}from"../../webgl-engine/lib/GeometryWithMapPositions.js";import{compressNormals as k,compressNormal as q}from"../../webgl-engine/lib/Normals.js";import{Object3D as Z}from"../../webgl-engine/lib/Object3D.js";import{DefaultMaterial as J}from"../../webgl-engine/materials/DefaultMaterial.js";const K=["polygon","extent"];class Q extends z{constructor(t,e,r,s){super(t,e,r,s,rt(e)),this.ensureDrapedStatus(!1)}async doLoad(){const t=this.symbolLayer,e=t?.material,r=this.symbolLayer.material?.color?.a,s=this._hasDrivenColorOrOpacity,i=this.needsDrivenTransparentPass||s&&null!=r&&r<1,o=e?.emissive,n=("color"===o?.source?o?.strength:void 0)??0,a=!s&&(null==r||0===r),l=s?f:this._materialColor?.toUnitRGBA()??y,c={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0,useIndexing:!0,ambient:u,diffuse:u,externalColor:l,opacity:a?0:1,layerOpacity:this._getLayerOpacity(),drivenOpacity:i,hasSymbolColors:s,hasSlicePlane:this._context.slicePlaneEnabled,castShadows:t.castShadows,emissiveStrengthFromSymbol:n,emissiveSource:1,offsetTransparentBackfaces:!0,normalType:1},m=new J(c,this._context),p=new J({...c,cullFace:2},this._context);this._materials[0]=m,this._materials[1]=p,this._updateTransparentDepedentMaterialParameters()}destroy(){super.destroy(),this._materials.length=0}createGraphics3DGraphic(t){const e=t.graphic;if(!this._validateGeometry(e.geometry,K,this.symbolLayer.type))return null;const r=this._getDrivenUInt8ColorWithNaNSupport(t.renderingInfo,this._materialColor,!1);B(r,r);const s=this.createElevationContextForGraphic(e);return this._createAs3DShape(e,t.renderingInfo,r,s,e.uid)}layerOpacityChanged(t,e){const r=this._getLayerOpacity();this._materials[0]?.setParameters({layerOpacity:r}),this._materials[1]?.setParameters({layerOpacity:r}),this._updateTransparentDepedentMaterialParameters(),t?.forEach(t=>e(t)?.layerOpacityChanged(r,this._context.isAsync))}layerScreenSizePerspectiveChanged(){}layerElevationInfoChanged(t,e){return this.updateGraphics3DGraphicElevationInfo(t,e,A)}slicePlaneEnabledChanged(t,e){return this._materials[0]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),this._materials[1]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),t?.forEach(t=>{const r=e(t);null!=r&&r.slicePlaneEnabledChanged(this._context.slicePlaneEnabled,this._context.isAsync)}),!0}physicalBasedRenderingChanged(){const t={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0};return this._materials[0]?.setParameters(t),this._materials[1]?.setParameters(t),!0}_getExtrusionSize(t){let e;return e=t.size&&this._drivenProperties.size?I(t.size.output,2)??0:this._getSymbolSize(),e/=this._context.renderCoordsHelper.unitInMeters,e}applyRendererDiff(t,e){return this._drivenPropertiesChanged(e)?0:1}async queryForSnapping(r,s,i,o){const n=this._getExtrusionSize(i)*this._context.renderCoordsHelper.unitInMeters/e(s),{objectId:a,target:l}=r,c=t(l);switch(c.z=(c.z??0)+n,r.type){case"edge":{const{start:e,end:s}=r,i=t(e),o=t(s);return i.z=(i.z??0)+n,o.z=(o.z??0)+n,[new E(a,c,1/0,i,o)]}case"vertex":return[new P(a,c,1/0),new E(a,l,1/0,l,c)];default:return[]}}_getSymbolSize(){return this.symbolLayer.size??1}_createAs3DShape(t,e,n,l,c){const m=G(t.geometry);if(null==m)return null;if(0===m.rings.length||!m.rings.some(t=>t.length>0))return this._logGeometryValidationWarnings(m.rings,"rings","ExtrudeSymbol3DLayer"),null;const p=F(m,this._context.elevationProvider,this._context.renderCoordsHelper,l);this._logGeometryCreationWarnings(p,m.rings,"rings","ExtrudeSymbol3DLayer");const h=L(m);if(null==h)return null;const d=new Array,u=new Array,f=_(),y=a(),v=g(),P=1===this._context.renderCoordsHelper.viewingMode;P||this._context.renderCoordsHelper.worldUpAtPosition(null,v),b(m.spatialReference,[h.x,h.y,0],y,this._context.renderCoordsHelper.spatialReference);const E=a();o(E,y);const I=i();s(I,E);const{polygons:D,mapPositions:z,position:B}=p,T=new Map,R=this._materials[0];for(const s of D){const t=s.count;if(this._context.clippingExtent&&(x(s.mapPositions,f),!S(f,this._context.clippingExtent)))continue;const i=r(s.mapPositions,s.holeIndices,3);if(0===i.length)continue;const o=i.length,a=6*t,l=w(a+o),m=w(o),p=j(3*a),h=j(3*a),g=j(3*a),b=j(a),_=this._getExtrusionSize(e);U(B,z,i,s,p,g,h,b,l,m,_,v,P),C(p,p,E);const I=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:c,layerViewUid:this._context.layerViewUid}),A=new mt(p,g,k(h),b),D=X(R,l,l.length-m.length,A,n,I),M=t,O=t,L=2*s.count,G=new pt(M,O,L,o/3);et(D,G,y),T.set(D,G),d.push(D,X(this._materials[1],m,0,A,n,I)),u.push(A.heights)}if(0===d.length)return null;const H=new Z({geometries:d,layerViewUid:this._context.layerViewUid,graphicUid:c,isElevationSource:!0});H.transformation=y;const N=V(this.symbolLayer,{opacity:this._getLayerOpacity()}),W=N?new M(this._materials[0],N,this._context.slicePlaneEnabled):null,q=new O(this,H,null,(t,e,r,s,i)=>tt(t,e,r,s,i,u,T),l,W);return q.alignedSampledElevation=p.sampledElevation,q.needsElevationUpdates=A(l.mode),q}get _materialColor(){return this.symbolLayer.material?.color}_updateTransparentDepedentMaterialParameters(){const t=this._materials[0];t&&t.setParameters({cullFace:t.transparent?0:2})}}function X(t,e,r,s,i,o){const{attributeIndices:n,drawIndices:a}=Y(e),l=[["position",new H(s.positions,n,3,!0)],["normalCompressed",new H(s.normals,n,2,!0)]];if(t.parameters.hasSymbolColors){const t=v(n.length);l.push(["symbolColor",new H(i,t,4,!0)])}return new N(t,l,s.elevation,0,o,r,null,a)}function Y(t){const e=new Array,r=new Map,s=new Array;for(let i=0;i<t.length;++i){const o=t[i];let n=r.get(o);null==n&&(n=e.length,e.push(o),r.set(o,n)),s.push(n)}return{attributeIndices:e,drawIndices:s}}const $=g();function tt(t,e,r,s,i,o,c){const m=t.stageObject,p=m.geometries,h=p.length,u="absolute-height"!==e.mode;let g=0;const f=m.transformation,y=n(a(),f);for(let n=0;n<h;n+=2){const t=p[n];if(!W(t))continue;const e=t.getMutableAttribute("position").data,a=o[n/2],h=new R(t.mapPositions),b=e.length/3;let _=!1,x=0;{let t=0;for(let o=0;o<b;o++){$[0]=e[t],$[1]=e[t+1],$[2]=e[t+2],s(h,ot),u&&(x+=ot.sampledElevation),T.TESTS_DISABLE_OPTIMIZATIONS?(l(st,h.array[h.offset],h.array[h.offset+1],ot.z+a[t/3]),null!=r&&i.toRenderCoords(st,r,st),d(st,st,y)):(l(st,e[t],e[t+1],e[t+2]),d(st,st,f),i.setAltitude(st,ot.z+a[t/3]),d(st,st,y)),e[t]=st[0],e[t+1]=st[1],e[t+2]=st[2];const o=nt/i.unitInMeters;(Math.abs($[0]-e[t])>=o||Math.abs($[1]-e[t+1])>=o||Math.abs($[2]-e[t+2])>=o)&&(_=!0),h.offset+=3,t+=3}}if(_){const e=c.get(t);e&&et(t,e,f),m.geometryVertexAttributeUpdated(p[n],"normalCompressed"),t.invalidateBoundingInfo(),m.geometryVertexAttributeUpdated(p[n],"position"),p[n+1].invalidateBoundingInfo(),m.geometryVertexAttributeUpdated(p[n+1],"position")}g+=x/b}return g/h}function et(t,e,r){const s=t.getMutableAttribute("position"),i=t.getMutableAttribute("normalCompressed").data,o=s.data,n=t.primitivePositionIndices,{topVertexStart:a,topVertexCount:u,topFaceStart:g,topFaceCount:f}=e,y=g+f,b=a+u,_=at,x=lt,S=ct,j=it,w=st;l(w,0,0,0);const v=(t,e)=>{const s=3*t;l(e,o[s+0],o[s+1],o[s+2]),d(e,e,r)};for(let l=g;l<y;++l){const t=3*l;v(n[t+0],_[0]),v(n[t+1],_[1]),v(n[t+2],_[2]),c(x,_[1],_[0]),c(S,_[2],_[0]),m(j,x,S),p(w,w,j)}h(w,w);for(let l=a;l<b;++l){const t=w[0],e=w[1],r=w[2];q(i,l,t,e,r)}}function rt(t){return 1===(t.material?.color?.a??0)}const st=g(),it=g(),ot=new D,nt=.01,at=[g(),g(),g()],lt=g(),ct=g();class mt{constructor(t,e,r,s){this.positions=t,this.elevation=e,this.normals=r,this.heights=s}}class pt{constructor(t,e,r,s){this.topVertexStart=t,this.topVertexCount=e,this.topFaceStart=r,this.topFaceCount=s}}export{Q as Graphics3DExtrudeSymbolLayer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{getMetersPerUnitForSR as e}from"../../../../core/units.js";import{e as t}from"../../../../chunks/earcut.js";import{set as r}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as i,create as o}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{scale as n}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{toRadian as s}from"../../../../core/libs/gl-matrix-2/math/common.js";import{fromBuffer as a,intersectsClippingArea as l,empty as c,expandWithAABB as h,create as p}from"../../../../geometry/support/aaBoundingBox.js";import{empty as m,expandPointInPlace as u,create as d}from"../../../../geometry/support/aaBoundingRect.js";import{newFloatArray as g,floatSubArray as y}from"../../../../geometry/support/FloatArray.js";import{perVertexElevationAligner as f}from"./ElevationAligners.js";import{elevationModeChangeUpdateType as
|
|
2
|
+
import{getMetersPerUnitForSR as e}from"../../../../core/units.js";import{e as t}from"../../../../chunks/earcut.js";import{set as r}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as i,create as o}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{scale as n}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{toRadian as s}from"../../../../core/libs/gl-matrix-2/math/common.js";import{fromBuffer as a,intersectsClippingArea as l,empty as c,expandWithAABB as h,create as p}from"../../../../geometry/support/aaBoundingBox.js";import{empty as m,expandPointInPlace as u,create as d}from"../../../../geometry/support/aaBoundingRect.js";import{newFloatArray as g,floatSubArray as y}from"../../../../geometry/support/FloatArray.js";import{perVertexElevationAligner as f}from"./ElevationAligners.js";import{elevationModeChangeUpdateType as x,needsElevationUpdates2D as v}from"./elevationAlignmentUtils.js";import{Graphics3DDrapedGraphicLayer as _}from"./Graphics3DDrapedGraphicLayer.js";import{Graphics3DObject3DGraphicLayer as b}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as w}from"./Graphics3DSymbolLayer.js";import{geometryAsPolygon as D,createWaterGeometry as S,PolygonCreationDataBase as C}from"./polygonUtils.js";import{polygonToRenderInfo as G,polygonToRenderInfoDraped as j}from"../../support/renderInfoUtils/polygon.js";import{Object3D as P}from"../../webgl-engine/lib/Object3D.js";import{RenderGeometry as L}from"../../webgl-engine/lib/RenderGeometry.js";import{Parameters as O,WaterMaterial as A}from"../../webgl-engine/materials/WaterMaterial.js";import{wavePresets as E}from"../../webgl-engine/materials/internal/waterMaterialUtils.js";const T=["polyline","polygon","extent"];class U extends w{static{this.unitSizeOfTexture=100}static{this.elevationModeChangeTypes={definedChanged:2,staysOnTheGround:0,onTheGroundChanged:2}}constructor(e,t,r,i){super(e,t,r,i)}async doLoad(){}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry,T,this.symbolLayer.type))return null;const r=this.createElevationContextForGraphic(t);return this.ensureDrapedStatus("on-the-ground"===r.mode),this.ensureMaterial(),this.draped?this._createAsOverlay(t):this._createAs3DShape(t,r,t.uid)}ensureMaterial(){if(this._materials[0])return;const e=new O,t=this.symbolLayer.color.toUnitRGBA();t[3]*=this._getLayerOpacity(),e.color=t,e.transparent=t[3]<1||this.needsDrivenTransparentPass,e.waveDirection=null!=this.symbolLayer.waveDirection?B(this.symbolLayer.waveDirection):i(0,0);const r=this.symbolLayer.waveStrength+"-"+this.symbolLayer.waterbodySize,o=E[r];e.waveStrength=o.waveStrength,e.waveTextureRepeat=o.textureRepeat,e.waveVelocity=o.waveVelocity,e.flowStrength=o.perturbationStrength,e.hasSlicePlane=this._context.slicePlaneEnabled,e.draped=this.draped,e.useIndexing=!0,this._materials[0]=new A(e,this._context)}layerOpacityChanged(){if(null==this._materials[0])return;const e=this._materials[0].parameters.color,t=this.symbolLayer.color.a*this._getLayerOpacity(),r=t<1||this.needsDrivenTransparentPass;this._materials[0].setParameters({color:[e[0],e[1],e[2],t],transparent:r})}layerScreenSizePerspectiveChanged(){}layerElevationInfoChanged(e,t,r){const i=this._elevationContext.mode,o=x(U.elevationModeChangeTypes,r,i);if(1!==o)return o;const n=v(i);return this.updateGraphics3DGraphicElevationInfo(e,t,()=>n)}slicePlaneEnabledChanged(){return this._materials[0]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),!0}physicalBasedRenderingChanged(){return!0}get needsDrivenTransparentPass(){return!1}_createAs3DShape(e,t,r){const i=D(e.geometry);if(null==i)return null;const o=G(i,this._context.elevationProvider,this._context.renderCoordsHelper,t),n=o.position.length/3,s=g(2*n);M(s,o.mapPositions,n,this._context.elevationProvider.spatialReference);const a=new W(o,s,this._context.layerViewUid,e.uid);if(a.olidColor=this._context.stage.renderView?.getObjectAndLayerIdColor(a),this._create3DShapeGeometries(a),this._logGeometryCreationWarnings(a.renderData,i.rings,"rings","WaterSymbol3DLayer"),0===a.outGeometries.length)return null;const l=new P({geometries:a.outGeometries,castShadow:!1,layerViewUid:this._context.layerViewUid,graphicUid:r}),c=new b(this,l,null,f,t);return c.alignedSampledElevation=a.renderData.sampledElevation,c.needsElevationUpdates=v(t.mode),c}_create3DShapeGeometries(e){const r=e.renderData.polygons,i=e.uvCoords;for(const{count:o,index:n,position:s,mapPositions:c,holeIndices:h}of r){if(null!=this._context.clippingExtent&&(a(c,z),!l(z,this._context.clippingExtent)))continue;const r=t(c,h,3);if(0===r.length)continue;const p=y(i,2*n,2*o),m=S({material:this._materials[0],indices:r,mapPositions:c,attributeData:{position:s,uv0:p}},e.olidColor);e.outGeometries.push(m)}}_createAsOverlay(e){const t=D(e.geometry);if(null==t)return null;this._materials[0].renderPriority=this._renderPriority;const r=j(t,this._context.overlaySR),i=r.position.length/3,o=g(2*i);M(o,r.position,i,this._context.overlaySR);const n=new F(r,o,this._context.layerViewUid,e.uid);return n.olidColor=this._context.stage.renderView?.getObjectAndLayerIdColor(n),n.outBoundingBox=c(),this._createAsOverlayWater(n),this._logGeometryCreationWarnings(n.renderData,t.rings,"rings","WaterSymbol3DLayer"),0===n.outGeometries.length?null:new _(this,n.outGeometries,n.outBoundingBox,this._context.drapeSourceRenderer)}_createAsOverlayWater(e){const r=e.uvCoords,i=e.renderData.polygons;for(const{position:o,holeIndices:n,index:s,count:c}of i){if(a(o,z),!l(z,this._context.clippingExtent))continue;h(e.outBoundingBox,z);const i=t(o,n,3);if(0===i.length)continue;const p=y(r,2*s,2*c),m=S({material:this._materials[0],indices:i,attributeData:{position:o,uv0:p}},e.olidColor);e.outGeometries.push(new L(m,e))}}test(){return{...super.test(),create3DShape:e=>this._createAs3DShape(e.graphic,e.elevationContext,e.graphicUid),ensureMaterial:()=>this.ensureMaterial()}}}function B(e){const t=o(),r=s(e);return t[0]=Math.sin(r),t[1]=Math.cos(r),t}function M(t,i,o,s){const a=e(s);m(I);for(let e=0;e<o;e++)r(V,i[3*e],i[3*e+1]),u(I,V);n(I,I,a);const l=I[0]%U.unitSizeOfTexture,c=I[1]%U.unitSizeOfTexture;R[0]=I[0]-l,R[1]=I[1]-c;for(let e=0;e<o;e++)t[2*e]=(i[3*e]*a-R[0])/U.unitSizeOfTexture,t[2*e+1]=(i[3*e+1]*a-R[1])/U.unitSizeOfTexture}const R=o(),I=d(),V=o(),z=p();class W extends C{constructor(e,t,r,i){super(e,r,i),this.uvCoords=t}}class F extends C{constructor(e,t,r,i){super(e,r,i),this.uvCoords=t}}export{U as Graphics3DWaterSymbolLayer,B as headingVectorFromAngle};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{e as t}from"../../../../chunks/earcut.js";import e from"../../../../geometry/Extent.js";import
|
|
2
|
+
import{e as t}from"../../../../chunks/earcut.js";import e from"../../../../geometry/Extent.js";import o from"../../../../geometry/Polygon.js";import{getContinuousIndexArray as i,getZeroIndexArray as r}from"../../../../geometry/support/Indices.js";import{leastSignificantAxis as a}from"../../../../geometry/support/polygonUtils.js";import{Attribute as n}from"../../webgl-engine/lib/Attribute.js";import{Geometry as u}from"../../webgl-engine/lib/Geometry.js";function s(e,o,i){const r=(o.length>0?o[0]:e.length/3)-1,n=a(e,r,i);if(2!==n){e=e.slice();for(let t=0;t<e.length;t+=3)e[t+n]=e[t+2]}return t(e,o,3)}function l(t){const e=t.attributeData.position.length/3,o=i(e),a=[["position",new n(t.attributeData.position,o,3,!0)]],{boundingRect:s}=t.attributeData,l=null!=s,p=l?[0]:r(e);return null!=t.attributeData.colorFeature?a.push(["colorFeatureAttribute",new n([t.attributeData.colorFeature],p,1,!0)]):t.attributeData.color&&a.push(["color",new n(t.attributeData.color,p,4,!0)]),t.attributeData.uvMapSpace&&a.push(["uvMapSpace",new n(t.attributeData.uvMapSpace,o,4,!0)]),l&&a.push(["boundingRect",new n(s,p,9,!0)]),new u(t.material,a,t.mapPositions,0,t.attributeData.olidColor,void 0,void 0,t.indices)}function p(t,e=null){const o=t.attributeData.position.length/3,r=i(o),a=[["position",new n(t.attributeData.position,r,3,!0)],["uv0",new n(t.attributeData.uv0,r,2,!0)]];return new u(t.material,a,t.mapPositions,0,e,void 0,void 0,t.indices)}function c(t){switch(t.type){case"extent":if(t instanceof e)return o.fromExtent(t);break;case"polygon":return t}return null}class m{constructor(t,e,o){this.renderData=t,this.layerViewUid=e,this.graphicUid=o,this.outGeometries=new Array}}export{m as PolygonCreationDataBase,l as createColorGeometry,s as createIndices3D,p as createWaterGeometry,c as geometryAsPolygon};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{perVertexElevationAligner as e}from"../graphics/ElevationAligners.js";import{createMapSpaceUVCoords as r}from"./uvUtils.js";import{ColorMaterial as a}from"../../webgl-engine/materials/ColorMaterial.js";import{PatternMaterial as n}from"../../webgl-engine/materials/PatternMaterial.js";function o(e,r){const o=e?.pattern;return null==o?new a(r):"none"===o.style||"solid"===o.style?("none"===o.style&&(r.color=t(0,0,0,0),r.forceTransparentMode=!0),new a(r)):(r.style=i(o.style),new n(r))}function i(t){switch(t){case"horizontal":return 0;case"vertical":return 1;case"cross":return 2;case"forward-diagonal":return 3;case"backward-diagonal":return 4;case"diagonal-cross":return 5;default:return}}function s(t){return t.material instanceof n&&!t.material.parameters.draped}function l(t,e){if(s(t)){const a=t.attributes.get("position").data,n=t.getMutableAttribute("uvMapSpace").data,o=t.getMutableAttribute("boundingRect").data;r(n,o,a,e)}}function c(t,r,a,n,o){const i=e(t,r,a,n,o),s=t.stageObject.geometries;for(const e of s)l(e,o);return i}export{o as createMaterial,i as parsePatternStyle,s as requiresUVUpdates,l as updateMapSpaceUVCoords,c as uvElevationAligner};
|
|
2
|
+
import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{perVertexElevationAligner as e}from"../graphics/ElevationAligners.js";import{createMapSpaceUVCoords as r}from"./uvUtils.js";import{ColorMaterial as a}from"../../webgl-engine/materials/ColorMaterial.js";import{PatternMaterial as n}from"../../webgl-engine/materials/PatternMaterial.js";function o(e,r){r.useIndexing=!0;const o=e?.pattern;return null==o?new a(r):"none"===o.style||"solid"===o.style?("none"===o.style&&(r.color=t(0,0,0,0),r.forceTransparentMode=!0),new a(r)):(r.style=i(o.style),new n(r))}function i(t){switch(t){case"horizontal":return 0;case"vertical":return 1;case"cross":return 2;case"forward-diagonal":return 3;case"backward-diagonal":return 4;case"diagonal-cross":return 5;default:return}}function s(t){return t.material instanceof n&&!t.material.parameters.draped}function l(t,e){if(s(t)){const a=t.attributes.get("position").data,n=t.getMutableAttribute("uvMapSpace").data,o=t.getMutableAttribute("boundingRect").data;r(n,o,a,e)}}function c(t,r,a,n,o){const i=e(t,r,a,n,o),s=t.stageObject.geometries;for(const e of s)l(e,o);return i}export{o as createMaterial,i as parsePatternStyle,s as requiresUVUpdates,l as updateMapSpaceUVCoords,c as uvElevationAligner};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{reallocGrowthFactor as t}from"../../../../core/arrayUtils.js";import"../../../webgl/BufferObject.js";import{FramebufferObject as e}from"../../../webgl/FramebufferObject.js";import"../../../webgl/Program.js";import"../../../../core/has.js";import"../../../webgl/Renderbuffer.js";import r from"../../../webgl/Texture.js";import"../../../../core/Logger.js";import{PixelType as s,SizedPixelFormat as a}from"../../../webgl/enums.js";import"../../../webgl/Util.js";import{initialSplatAtlasTextureHeight as i,GaussianSplatAtlasPages as o,splatAtlasTextureWidth as l,elementsPerSplatPage as h}from"./GaussianSplatAtlasPages.js";import{TextureDescriptor as u}from"../../../webgl/TextureDescriptor.js";class p{constructor(t,e,r){this._splatAtlasTextureHeight=i,this.texture=null,this._rctx=t,this._fboCache=r,this.pageAllocator=new o,this._cache=e.newCache("gaussian texture cache",t=>t.dispose())}ensureTextureAtlas(){if(this.texture)return;const t=this._cache.pop("splatTextureAtlas");if(t)return void(this.texture=t);const e=new u;e.height=this._splatAtlasTextureHeight,e.width=l,e.pixelFormat=36249,e.dataType=s.UNSIGNED_INT,e.internalFormat=a.RGBA32UI,e.samplingMode=9728,e.wrapMode=33071,e.isImmutable=!0,this.texture=new r(this._rctx,e),this._updatePageAllocator()}grow(){if(!this.texture)return this.ensureTextureAtlas(),!1;const r=Math.floor(this._splatAtlasTextureHeight*t);if(r*l>this._rctx.parameters.maxPreferredTexturePixels)return!1;const s=new e(this._rctx,this.texture),a=this._fboCache.acquire(l,r,"gaussian splat atlas resize",
|
|
2
|
+
import{reallocGrowthFactor as t}from"../../../../core/arrayUtils.js";import"../../../webgl/BufferObject.js";import{FramebufferObject as e}from"../../../webgl/FramebufferObject.js";import"../../../webgl/Program.js";import"../../../../core/has.js";import"../../../webgl/Renderbuffer.js";import r from"../../../webgl/Texture.js";import"../../../../core/Logger.js";import{PixelType as s,SizedPixelFormat as a}from"../../../webgl/enums.js";import"../../../webgl/Util.js";import{initialSplatAtlasTextureHeight as i,GaussianSplatAtlasPages as o,splatAtlasTextureWidth as l,elementsPerSplatPage as h}from"./GaussianSplatAtlasPages.js";import{TextureDescriptor as u}from"../../../webgl/TextureDescriptor.js";class p{constructor(t,e,r){this._splatAtlasTextureHeight=i,this.texture=null,this._rctx=t,this._fboCache=r,this.pageAllocator=new o,this._cache=e.newCache("gaussian texture cache",t=>t.dispose())}ensureTextureAtlas(){if(this.texture)return;const t=this._cache.pop("splatTextureAtlas");if(t)return void(this.texture=t);const e=new u;e.height=this._splatAtlasTextureHeight,e.width=l,e.pixelFormat=36249,e.dataType=s.UNSIGNED_INT,e.internalFormat=a.RGBA32UI,e.samplingMode=9728,e.wrapMode=33071,e.isImmutable=!0,this.texture=new r(this._rctx,e),this._updatePageAllocator()}grow(){if(!this.texture)return this.ensureTextureAtlas(),!1;const r=Math.floor(this._splatAtlasTextureHeight*t);if(r*l>this._rctx.parameters.maxPreferredTexturePixels)return!1;const s=new e(this._rctx,this.texture),a=this._fboCache.acquire(l,r,"gaussian splat atlas resize",11);return this._rctx.blitFramebuffer(s,a.fbo,16384,9728,0,0,l,this._splatAtlasTextureHeight,0,0,l,this._splatAtlasTextureHeight),this.texture?.dispose(),this.texture=a.fbo?.detachColorTexture(),s.dispose(),a.dispose(),this._splatAtlasTextureHeight=r,this._updatePageAllocator(),!0}requestPage(){let t=this.pageAllocator.findFirstFreePage();return null===t&&this.grow()&&(t=this.pageAllocator.findFirstFreePage()),null!==t&&this.pageAllocator.allocate(t),t}freePage(t){this.pageAllocator.free(t)}update(t,e,r){this.ensureTextureAtlas(),this.texture.updateData(0,t,e,h,1,r)}_updatePageAllocator(){const t=l*this._splatAtlasTextureHeight/h;this.pageAllocator.pageCount!==t&&this.pageAllocator.resize(t)}clear(){this.texture&&(this._cache.put("splatTextureAtlas",this.texture),this.texture=null)}destroy(){this._cache.destroy(),this.texture?.dispose()}}export{p as GaussianSplatTextureAtlas};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import"../../../../core/has.js";import e from"../../../../core/Logger.js";import t from"../../webgl/ManagedColorAttachment.js";import{ManagedDepthTexture as a}from"../../webgl/ManagedDepthTexture.js";import r from"../../webgl/ManagedFBO.js";import{isDepthFormat as c,formatString as h,DepthTextureFormats as s,ColorFormats as i}from"./FBOCacheFormats.js";import{FBOPool as o}from"./FBOPool.js";import{DepthStencilAttachment as n,ColorAttachment0 as l}from"../../../webgl/enums.js";import{FramebufferObject as u}from"../../../webgl/FramebufferObject.js";import m from"../../../webgl/Texture.js";class d{constructor(e){this.rctx=e,this._interactive=!1,this._usage=new Map,this._acquired=new Set,this._cache=new o(e.newCache,"FBOCache"),this._depthCache=new o(e.newCache,"DepthAttachmentCache"),this._colorCache=new o(e.newCache,"ColorAttachmentCache")}destroy(){this._cache.destroy(),this._depthCache.destroy(),this._colorCache.destroy()}clean(){this._cache.clean(),this._colorCache.clean(),this._depthCache.clean()}frameStart(){this._cache.frame(),this._colorCache.frame(),this._depthCache.frame(),this.debugCallback?.(),this._usage.clear()}frameEnd(){const{debugCallback:e}=this;e&&this._acquired.forEach(t=>e(t.name,t.fbo,this._usage))}get usedMemory(){return Array.from(this._acquired.values()).reduce((e,t)=>e+t.usedMemory,this._cache.usedMemory+this._colorCache.usedMemory+this._depthCache.usedMemory)}set interactive(e){this._cache.interactive=this._colorCache.interactive=this._depthCache.interactive=e,this._interactive=e}get interactive(){return this._interactive}acquire(t,a,s,i=5){const o=p(i,t,a);let m=this._cache.pop(o);const{rctx:d}=this;if(m){m.retain(),m.setName(s);const t=m.getAttachment(n);t&&(t.name=g);const a=m.getAttachment(l);a&&(a.name=_(0));const r=m.fbo;r?d.temporaryBindFramebufferObject(r,()=>{d.setDrawBuffers([l]),d.unbindTexture(r.colorTexture)}):e.getLogger("esri.views.3d.webgl-engine.core.FBOCache").errorOnce("Encountered an invalid cached framebuffer")}else{const e=new u(d),h=(e,r,c)=>{r??=5;const h=this._acquireColor(r,t,a,c??_(e-l));return this.rctx.unbindTexture(h.attachment),m.attachColor(h,e),h.release(),m},p=e=>{e??=
|
|
2
|
+
import"../../../../core/has.js";import e from"../../../../core/Logger.js";import t from"../../webgl/ManagedColorAttachment.js";import{ManagedDepthTexture as a}from"../../webgl/ManagedDepthTexture.js";import r from"../../webgl/ManagedFBO.js";import{isDepthFormat as c,formatString as h,DepthTextureFormats as s,ColorFormats as i}from"./FBOCacheFormats.js";import{FBOPool as o}from"./FBOPool.js";import{DepthStencilAttachment as n,ColorAttachment0 as l}from"../../../webgl/enums.js";import{FramebufferObject as u}from"../../../webgl/FramebufferObject.js";import m from"../../../webgl/Texture.js";class d{constructor(e){this.rctx=e,this._interactive=!1,this._usage=new Map,this._acquired=new Set,this._cache=new o(e.newCache,"FBOCache"),this._depthCache=new o(e.newCache,"DepthAttachmentCache"),this._colorCache=new o(e.newCache,"ColorAttachmentCache")}destroy(){this._cache.destroy(),this._depthCache.destroy(),this._colorCache.destroy()}clean(){this._cache.clean(),this._colorCache.clean(),this._depthCache.clean()}frameStart(){this._cache.frame(),this._colorCache.frame(),this._depthCache.frame(),this.debugCallback?.(),this._usage.clear()}frameEnd(){const{debugCallback:e}=this;e&&this._acquired.forEach(t=>e(t.name,t.fbo,this._usage))}get usedMemory(){return Array.from(this._acquired.values()).reduce((e,t)=>e+t.usedMemory,this._cache.usedMemory+this._colorCache.usedMemory+this._depthCache.usedMemory)}set interactive(e){this._cache.interactive=this._colorCache.interactive=this._depthCache.interactive=e,this._interactive=e}get interactive(){return this._interactive}acquire(t,a,s,i=5){const o=p(i,t,a);let m=this._cache.pop(o);const{rctx:d}=this;if(m){m.retain(),m.setName(s);const t=m.getAttachment(n);t&&(t.name=g);const a=m.getAttachment(l);a&&(a.name=_(0));const r=m.fbo;r?d.temporaryBindFramebufferObject(r,()=>{d.setDrawBuffers([l]),d.unbindTexture(r.colorTexture)}):e.getLogger("esri.views.3d.webgl-engine.core.FBOCache").errorOnce("Encountered an invalid cached framebuffer")}else{const e=new u(d),h=(e,r,c)=>{r??=5;const h=this._acquireColor(r,t,a,c??_(e-l));return this.rctx.unbindTexture(h.attachment),m.attachColor(h,e),h.release(),m},p=e=>{e??=13;const r=this.acquireDepth(e,t,a,g);return m.attachDepth(r),r.release(),m},f=()=>{if(!m)return;this.debugCallback?.(m.name,m.fbo),this._acquired.delete(m);const e=c(i);e&&null!=m.getAttachment(n)||!e&&null!=m.getAttachment(l)?(e?(m.fbo?.invalidateAttachments([n]),m.detachAllColors()):(m.fbo?.invalidateAttachments([l]),m.detachAllButColor0()),this._cache.put(m)):m.dispose()};m=new r(o,s,e,h,p,f),c(i)?m.acquireDepth(i):m.acquireColor(l,i)}return this._trackUsage(m,"fbo "+h(i),t,a),this._trackHandle(m)}acquireDepth(e,t,r,c){const i=p(e,t,r);let o=this._depthCache.pop(i);if(o)o.retain(),o.attachment.setShadowFiltering(!1);else{const c=new m(this.rctx,{...s[e],width:t,height:r});o=new a(i,c,()=>this._depthCache.put(o))}return o.name=c,this._trackUsage(o,"depth "+h(e),t,r),o}_acquireColor(e,a,r,c){const s=p(e,a,r);let o=this._colorCache.pop(s);if(o)o.retain();else{const c=new m(this.rctx,{...i[e],width:a,height:r,isImmutable:!0});o=new t(s,c,()=>this._colorCache.put(o))}return o.name=c,this._trackUsage(o,"color "+h(e),a,r),o}_trackHandle(e){return this._acquired.add(e),e}_trackUsage(e,t,a,r){this.debugCallback&&(this._usage.has(e)?this._usage.get(e)[2].push(e.name):this._usage.set(e,[t,`${a}x${r}`,[e.name]]))}get test(){return null}}function _(e=0){return`color${e}`}const g="depth";function p(e,t,a){return`${t}x${a}:${e}`}export{d as FBOCache};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{SizedPixelFormat as e,PixelType as r,SizedDepthStencilFormat as n,SizedDepthFormat as t}from"../../../webgl/enums.js";import{TextureDescriptor as a}from"../../../webgl/TextureDescriptor.js";import{isSizedDepthFormat as o}from"../../../webgl/textureUtils.js";function s(e){switch(e){case 0:return"R8UNORM";case 1:return"R8UINT";case 2:return"RG8UNORM";case 3:return"RG8UINT";case 4:return"RGBA4UNORM";case 5:return"RGBA8UNORM";case 6:return"RGBA8UNORM_MIPMAP";case 7:return"R16FLOAT";case 8:return"RGBA16FLOAT";case 9:return"
|
|
2
|
+
import{SizedPixelFormat as e,PixelType as r,SizedDepthStencilFormat as n,SizedDepthFormat as t}from"../../../webgl/enums.js";import{TextureDescriptor as a}from"../../../webgl/TextureDescriptor.js";import{isSizedDepthFormat as o}from"../../../webgl/textureUtils.js";function s(e){switch(e){case 0:return"R8UNORM";case 1:return"R8UINT";case 2:return"RG8UNORM";case 3:return"RG8UINT";case 4:return"RGBA4UNORM";case 5:return"RGBA8UNORM";case 6:return"RGBA8UNORM_MIPMAP";case 7:return"R16FLOAT";case 8:return"RGBA16FLOAT";case 9:return"R32FLOAT";case 10:return"RG32FLOAT";case 11:return"RGBA32UINT";case 12:return"COUNT"}}function T(e){switch(e){case 12:return"DEPTH16";case 13:return"DEPTH24_STENCIL8"}}function i(e){return p(e)?T(e):s(e)}function p(e){return e>=12}const m=new a;m.pixelFormat=6403,m.internalFormat=e.R8,m.wrapMode=33071;const F=new a;F.pixelFormat=36244,F.internalFormat=e.R8UI,F.wrapMode=33071,F.samplingMode=9728;const c=new a;c.pixelFormat=33319,c.internalFormat=e.RG8,c.wrapMode=33071;const N=new a;N.pixelFormat=33320,N.internalFormat=e.RG8UI,N.wrapMode=33071,N.samplingMode=9728;const l=new a;l.internalFormat=e.RGBA4,l.dataType=r.UNSIGNED_SHORT_4_4_4_4,l.wrapMode=33071;const M=new a;M.wrapMode=33071;const R=new a;R.wrapMode=33071,R.samplingMode=9987,R.hasMipmap=!0,R.maxAnisotropy=8;const u=new a;u.pixelFormat=6403,u.dataType=r.HALF_FLOAT,u.internalFormat=e.R16F,u.samplingMode=9728;const w=new a;w.dataType=r.HALF_FLOAT,w.internalFormat=e.RGBA16F,w.wrapMode=33071;const _=new a;_.pixelFormat=6403,_.dataType=r.FLOAT,_.internalFormat=e.R32F,_.samplingMode=9728;const O=new a;O.pixelFormat=33319,O.dataType=r.FLOAT,O.internalFormat=e.RG32F,O.samplingMode=9728;const d=new a;d.pixelFormat=36249,d.dataType=r.UNSIGNED_INT,d.internalFormat=e.RGBA32UI,d.samplingMode=9728,d.wrapMode=33071;const E={0:m,1:F,2:c,3:N,4:l,5:M,6:R,7:u,8:w,9:_,10:O,11:d,12:null},A={[t.DEPTH_COMPONENT16]:r.UNSIGNED_SHORT,[t.DEPTH_COMPONENT24]:r.UNSIGNED_INT,[t.DEPTH_COMPONENT32F]:r.FLOAT,[n.DEPTH24_STENCIL8]:r.UNSIGNED_INT_24_8,[n.DEPTH32F_STENCIL8]:r.FLOAT_32_UNSIGNED_INT_24_8_REV},I={13:G(n.DEPTH24_STENCIL8),12:G(t.DEPTH_COMPONENT16)};function G(e){const r=new a;return r.pixelFormat=o(e)?6402:34041,r.dataType=A[e],r.samplingMode=9728,r.wrapMode=33071,r.internalFormat=e,r.hasMipmap=!1,r.isImmutable=!0,r}export{E as ColorFormats,I as DepthTextureFormats,i as formatString,p as isDepthFormat};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as o}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../../core/shaderTechnique/ShaderTechnique.js";import{a as i}from"../../../../../chunks/FocusAreaColor.glsl.js";import{makePipelineState as t,defaultColorWrite as c}from"../../../../webgl/renderState.js";let a=class extends s{constructor(){super(...arguments),this.shader=new o(i,()=>import("./FocusAreaColor.glsl.js"))}initializePipeline(){return t({colorWrite:c})}};a=e([r("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaColorTechnique")],a);export{a as FocusAreaColorTechnique};
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as o}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../../core/shaderTechnique/ShaderTechnique.js";import{a as i}from"../../../../../chunks/FocusAreaColor.glsl.js";import{makePipelineState as t,defaultColorWrite as c}from"../../../../webgl/renderState.js";let a=class extends s{constructor(){super(...arguments),this.shader=new o(i,()=>import("./FocusAreaColor.glsl.js")),this.ignoreUnused=!0}initializePipeline(){return t({colorWrite:c})}};a=e([r("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaColorTechnique")],a);export{a as FocusAreaColorTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{property as t,subclass as s}from"../../../../../core/accessorSupport/decorators.js";import{RenderNodeOutput as r,InternalRenderCategory as i}from"../../../webgl.js";import o from"../../../webgl/RenderNode.js";import{F as n}from"../../../../../chunks/FocusAreaMask.glsl.js";import{FocusAreaMaskTechnique as a}from"./FocusAreaMaskTechnique.js";import{Pos3 as h}from"../../lib/DefaultVertexBufferLayouts.js";import{VertexArrayObject as c}from"../../lib/VertexArrayObject.js";import{DepthStencilAttachment as l,PrimitiveType as u}from"../../../../webgl/enums.js";import{noParameters as p}from"../../../../webgl/NoParameters.js";import{VertexBuffer as m}from"../../../../webgl/VertexBuffer.js";let d=class extends o{constructor(e){super({...e,view:e.focusAreasView.view}),this.consumes={required:[r.TRANSPARENT]},this.produces=i.FOCUSAREA,this._vaos=new Array,this._counts=new Array,this._origins=new Array,this._maskParameters=new n}initialize(){this.updateGeometries()}destroy(){this._vaos.forEach(e=>e.dispose()),this._vaos.length=this._counts.length=this._origins.length=0}precompile(){this.techniques.precompile(a)}render(e){const t=this.techniques.get(a),s=this.bindParameters,o=s.camera,n=o.fullViewport[2],h=o.fullViewport[3];if(!t.compiled||!this._vaos)return void this.requestRender(1);const c=e.find(({name:e})=>e===r.TRANSPARENT),m=this.renderingContext,d=this.fboCache.acquire(n,h,i.FOCUSAREA,2);this.view.stage.renderer.occludedRequiresStencil?(d.acquireDepth(
|
|
2
|
+
import{__decorate as e}from"tslib";import{property as t,subclass as s}from"../../../../../core/accessorSupport/decorators.js";import{RenderNodeOutput as r,InternalRenderCategory as i}from"../../../webgl.js";import o from"../../../webgl/RenderNode.js";import{F as n}from"../../../../../chunks/FocusAreaMask.glsl.js";import{FocusAreaMaskTechnique as a}from"./FocusAreaMaskTechnique.js";import{Pos3 as h}from"../../lib/DefaultVertexBufferLayouts.js";import{VertexArrayObject as c}from"../../lib/VertexArrayObject.js";import{DepthStencilAttachment as l,PrimitiveType as u}from"../../../../webgl/enums.js";import{noParameters as p}from"../../../../webgl/NoParameters.js";import{VertexBuffer as m}from"../../../../webgl/VertexBuffer.js";let d=class extends o{constructor(e){super({...e,view:e.focusAreasView.view}),this.consumes={required:[r.TRANSPARENT]},this.produces=i.FOCUSAREA,this._vaos=new Array,this._counts=new Array,this._origins=new Array,this._maskParameters=new n}initialize(){this.updateGeometries()}destroy(){this._vaos.forEach(e=>e.dispose()),this._vaos.length=this._counts.length=this._origins.length=0}precompile(){this.techniques.precompile(a)}render(e){const t=this.techniques.get(a),s=this.bindParameters,o=s.camera,n=o.fullViewport[2],h=o.fullViewport[3];if(!t.compiled||!this._vaos)return void this.requestRender(1);const c=e.find(({name:e})=>e===r.TRANSPARENT),m=this.renderingContext,d=this.fboCache.acquire(n,h,i.FOCUSAREA,2);this.view.stage.renderer.occludedRequiresStencil?(d.acquireDepth(13),m.blitFramebuffer(c.fbo,d.fbo,256)):d.attachDepth(c.getAttachment(l)),m.bindFramebuffer(d.fbo),m.setClearColor(0,0,0,1),m.clear(17408),m.setViewport(0,0,n,h);const f=m.bindTechnique(t,s);m.setFaceCullingEnabled(!1),m.setStencilTestEnabled(!0),m.setStencilOpSeparate(1028,7680,34055,7680),m.setStencilOpSeparate(1029,7680,34056,7680),m.setDepthWriteEnabled(!1);for(let r=0;r<this._vaos.length;r++){const e=this._vaos[r],t=this._counts[r];this._maskParameters.origin=this._origins[r],f.bindDraw(s,p,this._maskParameters),m.bindVAO(e),m.setDepthTestEnabled(!0),m.setStencilWriteMask(255),m.setStencilFunction(519,0,255),m.setColorMask(!1,!1,!1,!1),m.drawArrays(u.TRIANGLES,0,t),m.setDepthTestEnabled(!1),m.setStencilWriteMask(0),m.setStencilFunction(517,0,255),m.setColorMask(!0,!0,!0,!0),m.drawArrays(u.TRIANGLES,0,t)}return d}updateGeometries(){if(!this.view.stage)return;this._vaos.forEach(e=>e.dispose()),this._vaos.length=this._counts.length=this._origins.length=0;this.focusAreasView.volumes.forEach(e=>{const t=new Array;let s=0,r=0;e.geometryVolumes.forEach(e=>{const i=e.indicesBottom;s+=i.length;for(let s=0;s<i.length;s++)t.push(e.positions[3*(i[s]-1)]),t.push(e.positions[3*(i[s]-1)+1]),t.push(e.positions[3*(i[s]-1)+2]);const o=e.indicesExtruded;r+=o.length;for(let s=0;s<o.length;s++)t.push(e.positions[3*o[s]]),t.push(e.positions[3*o[s]+1]),t.push(e.positions[3*o[s]+2])});const i=new c(this.renderingContext,new m(this.renderingContext,h,new Float32Array(t)));this._vaos.push(i),this._counts.push(s+r),this._origins.push(e.origin)}),this.requestRender(1)}};e([t()],d.prototype,"consumes",void 0),e([t()],d.prototype,"produces",void 0),e([t({constructOnly:!0})],d.prototype,"focusAreasView",void 0),d=e([s("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaMaskNode")],d);export{d as FocusAreaMaskNode};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import r from"../../../../../core/PooledArray.js";import{property as t,subclass as s}from"../../../../../core/accessorSupport/decorators.js";import{ZEROS as n}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{InternalRenderCategory as i}from"../../../webgl.js";import o from"../../../webgl/RenderNode.js";import{Blit as c}from"../blit/Blit.js";import{DepthStencilAttachment as d}from"../../../../webgl/enums.js";let l=class extends o{constructor(e){super(e),this.consumes={required:[i.OCCLUDED]},this.produces=i.OCCLUDED,this._blit=new c(e.view.stage.renderView.techniques,2)}precompile(){const e=this.view.stage.renderer;e.plugins.plugins.forEach(r=>{e.precompileSlots(r,10,12),r.material&&e.precompileOccludedSlots(r,p)})}render(e){const r=e.find(({name:e})=>e===this.produces);return this._renderOccludedAndTransparentStencil(r),this._renderOccludedComposite(r),r}_renderOccludedAndTransparentStencil(e){const r=this.view.stage.renderer,t=a;this._acquirePlugins(t,8),0!==t.length&&(r.renderSlots(t,11),this._renderAndComposite(e,e.getAttachment(d),.5,()=>r.renderSlots(t,12),!1,!1),t.clear())}_renderOccludedComposite(e){const r=this.view.stage.renderer,t=a,s=this._acquirePlugins(t,u);if(0===t.length)return;const n=this._getDepthStencilAttachment(e);let i=n.clearStencil;for(const o of p)s&o&&(this._renderAndComposite(e,n.depth,16===o?1:.5,()=>r.renderOccludedSlots(t,o),!0,i),i=!1);n.release(),t.clear()}_acquirePlugins(e,r){const t=this.view.stage.renderer;e.clear();let s=0,n=!1;for(const i of t.plugins.plugins){const t=i.renderOccludedFlags&r;s|=t,t&&(e.push(i),n||=0!==i.testsTransparentRenderOrder)}return n&&e.sort((e,r)=>e.testsTransparentRenderOrder-r.testsTransparentRenderOrder),s}_renderAndComposite(e,r,t,s,i,o){const c=this.renderingContext,{width:d,height:l}=e.fbo,a=this.fboCache.acquire(d,l,"tmp color");a.attachDepth(r),c.bindFramebuffer(a.fbo),c.clearFramebuffer(n,i,o),s(),a.detachDepth(),this._blit.blend(c,a,e,this.bindParameters,t),a.release()}_getDepthStencilAttachment(e){const{width:r,height:t}=e.fbo;if(!this.view.stage.renderer.occludedRequiresIntegratedMeshStencil){const e=this.fboCache.acquireDepth(
|
|
2
|
+
import{__decorate as e}from"tslib";import r from"../../../../../core/PooledArray.js";import{property as t,subclass as s}from"../../../../../core/accessorSupport/decorators.js";import{ZEROS as n}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{InternalRenderCategory as i}from"../../../webgl.js";import o from"../../../webgl/RenderNode.js";import{Blit as c}from"../blit/Blit.js";import{DepthStencilAttachment as d}from"../../../../webgl/enums.js";let l=class extends o{constructor(e){super(e),this.consumes={required:[i.OCCLUDED]},this.produces=i.OCCLUDED,this._blit=new c(e.view.stage.renderView.techniques,2)}precompile(){const e=this.view.stage.renderer;e.plugins.plugins.forEach(r=>{e.precompileSlots(r,10,12),r.material&&e.precompileOccludedSlots(r,p)})}render(e){const r=e.find(({name:e})=>e===this.produces);return this._renderOccludedAndTransparentStencil(r),this._renderOccludedComposite(r),r}_renderOccludedAndTransparentStencil(e){const r=this.view.stage.renderer,t=a;this._acquirePlugins(t,8),0!==t.length&&(r.renderSlots(t,11),this._renderAndComposite(e,e.getAttachment(d),.5,()=>r.renderSlots(t,12),!1,!1),t.clear())}_renderOccludedComposite(e){const r=this.view.stage.renderer,t=a,s=this._acquirePlugins(t,u);if(0===t.length)return;const n=this._getDepthStencilAttachment(e);let i=n.clearStencil;for(const o of p)s&o&&(this._renderAndComposite(e,n.depth,16===o?1:.5,()=>r.renderOccludedSlots(t,o),!0,i),i=!1);n.release(),t.clear()}_acquirePlugins(e,r){const t=this.view.stage.renderer;e.clear();let s=0,n=!1;for(const i of t.plugins.plugins){const t=i.renderOccludedFlags&r;s|=t,t&&(e.push(i),n||=0!==i.testsTransparentRenderOrder)}return n&&e.sort((e,r)=>e.testsTransparentRenderOrder-r.testsTransparentRenderOrder),s}_renderAndComposite(e,r,t,s,i,o){const c=this.renderingContext,{width:d,height:l}=e.fbo,a=this.fboCache.acquire(d,l,"tmp color");a.attachDepth(r),c.bindFramebuffer(a.fbo),c.clearFramebuffer(n,i,o),s(),a.detachDepth(),this._blit.blend(c,a,e,this.bindParameters,t),a.release()}_getDepthStencilAttachment(e){const{width:r,height:t}=e.fbo;if(!this.view.stage.renderer.occludedRequiresIntegratedMeshStencil){const e=this.fboCache.acquireDepth(13,r,t,"retained stencil");return{depth:e,release:()=>e.release(),clearStencil:!0}}const s=this.fboCache.acquire(r,t,"retained stencil",13);return this.renderingContext.blitFramebuffer(e.fbo,s.fbo,1024),{depth:s.getAttachment(d),release:()=>s.release(),clearStencil:!1}}};e([t()],l.prototype,"consumes",void 0),e([t()],l.prototype,"produces",void 0),l=e([s("esri.views.3d.webgl-engine.effects.geometry.RenderOccludedRenderNode")],l);const a=new r;function h(){a.prune()}const p=[4,2,16],u=p.reduce((e,r)=>e|r,0);export{l as RenderOccludedRenderNode,h as cleanupRenderOccluded};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import{nextPowerOfTwo as e}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 c,ZEROS as l}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{RenderNodeOutput as d,InternalRenderCategory as p}from"../../webgl.js";import{Frustum as _}from"../../state/Frustum.js";import{glLayout as f}from"../../support/buffer/glUtil.js";import{newLayout as m}from"../../support/buffer/InterleavedLayout.js";import g from"../../webgl/RenderCamera.js";import F from"../../webgl/RenderNode.js";import{ShaderOutputConfiguration as C}from"../core/shaderLibrary/ShaderOutputConfiguration.js";import{VertexArrayObject as w}from"./VertexArrayObject.js";import{C as R}from"../../../../chunks/CutFillDepth.glsl.js";import{CutFillDepthTechnique as P}from"../shaders/CutFillDepthTechnique.js";import{CutFillDepthTechniqueConfiguration as T}from"../shaders/CutFillDepthTechniqueConfiguration.js";import{C as b}from"../../../../chunks/CutFillReduction.glsl.js";import{CutFillReductionTechnique as x}from"../shaders/CutFillReductionTechnique.js";import{CutFillReductionTechniqueConfiguration as D}from"../shaders/CutFillReductionTechniqueConfiguration.js";import{C as B}from"../../../../chunks/CutFillTargetDepth.glsl.js";import{CutFillTargetDepthTechnique as y}from"../shaders/CutFillTargetDepthTechnique.js";import{ImmediateTask as j,TaskPriority as q}from"../../../support/Scheduler.js";import{Yield as S}from"../../../support/Yield.js";import{PrimitiveType as v,DataType as E}from"../../../webgl/enums.js";import{Sync as V}from"../../../webgl/Sync.js";import{VertexBuffer as O}from"../../../webgl/VertexBuffer.js";let A=class extends F{constructor(t){super(t),this.consumes={required:[d.TRANSPARENT]},this.produces=p.CUTFILL_DEPTH,this._cutFillTargetDepthConfiguration=new C,this._cutFillDepthConfiguration=new T,this._cutFillReductionConfiguration=new D,this._cutFillTargetDepthParameters=new B,this._cutFillDepthParameters=new R,this._cutFillReductionParameters=new b,this.needsRender=!1,this.readyToRun=!1,this.done=!0,this._frameTask=j,this._results=new k,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._targetVao=null,this._numReductions=3,this._reductionPasses=0,this._pixelBufferSize=0,this._pixelBufferOffset=0,this._perReductionPixelBufferSize=0}initialize(){this._frameTask=this.view.resourceController.scheduler.registerTask(q.VOLUME_MEASUREMENT,this),this.addHandles(this._frameTask),this._maxTextureSize=Math.min(this._maxTextureSize,this.fboCache.rctx.parameters.maxTextureSize),this._cutFillTargetDepthConfiguration.output=7,this._frustum=new _(this.view.renderCoordsHelper)}destroy(){this._targetVao=i(this._targetVao);const t=this.gl;this._sync=r(this._sync),this._pixelBuffer&&(t.deleteBuffer(this._pixelBuffer),this._pixelBuffer=null,this._pixelBufferSize=0)}precompile(){this.techniques.precompile(y,this._cutFillTargetDepthConfiguration),this._cutFillDepthConfiguration.preparePass=0,this.techniques.precompile(P,this._cutFillDepthConfiguration),this._cutFillDepthConfiguration.preparePass=1,this.techniques.precompile(P,this._cutFillDepthConfiguration),this._cutFillReductionConfiguration.reductionPass=0,this.techniques.precompile(x,this._cutFillReductionConfiguration),this._cutFillReductionConfiguration.reductionPass=1,this.techniques.precompile(x,this._cutFillReductionConfiguration),this._cutFillReductionConfiguration.reductionPass=2,this.techniques.precompile(x,this._cutFillReductionConfiguration),this.view.stage.renderer.precompileCutFill()}render(t){const e=t.find(({name:t})=>t===p.CUTFILL_DEPTH);if(!this._orthographicCamera||!this._targetVao||!this.needsRender||this._sync)return e;const i=this.techniques.get(y,this._cutFillTargetDepthConfiguration);this._cutFillDepthConfiguration.preparePass=0;const r=this.techniques.get(P,this._cutFillDepthConfiguration);this._cutFillDepthConfiguration.preparePass=1;const s=this.techniques.get(P,this._cutFillDepthConfiguration);this._cutFillReductionConfiguration.reductionPass=0;const h=this.techniques.get(x,this._cutFillReductionConfiguration);this._cutFillReductionConfiguration.reductionPass=1;const o=this.techniques.get(x,this._cutFillReductionConfiguration);this._cutFillReductionConfiguration.reductionPass=2;const n=this.techniques.get(x,this._cutFillReductionConfiguration);if(!(i.compiled&&r.compiled&&s.compiled&&h.compiled&&o.compiled&&n.compiled))return this.requestRender(1),e;this.needsRender=!1;const a=this.renderingContext,u=this.fboCache,d=this.gl,_=a.getViewport(),f=u.acquire(this._width,this._height,"cutfill reference depth",this._depthFormat);a.bindFramebuffer(f.fbo),a.setViewport(0,0,this._width,this._height),a.clear(1280),this.view.stage.renderer.renderCutFillReferenceDepth(this._orthographicCamera);const m=u.acquire(this._width,this._height,"cutfill target depth",this._depthFormat);a.bindFramebuffer(m.fbo),a.setViewport(0,0,this._width,this._height),a.setClearDepth(1),a.clear(256),this._cutFillTargetDepthParameters.origin=this._localOrigin,this._cutFillTargetDepthParameters.cutFillCamera=this._orthographicCamera,a.bindTechnique(i,this.bindParameters,this._cutFillTargetDepthParameters),a.bindVAO(this._targetVao),a.drawArrays(v.TRIANGLES,0,this._targetVao.vertexCount("geometry"));const g=u.acquire(this._width,this._height,"cutfill reduction even",this._colorFormat),F=u.acquire(this._width,this._height,"cutfill reduction odd",this._colorFormat);return this._cutFillDepthParameters.referenceDepthTexture=f.depthTexture,this._cutFillDepthParameters.targetDepthTexture=m.depthTexture,this._pixelBuffer||(this._pixelBuffer=d.createBuffer()),d.bindBuffer(d.PIXEL_PACK_BUFFER,this._pixelBuffer),d.bufferData(d.PIXEL_PACK_BUFFER,this._pixelBufferSize,d.STREAM_READ),this._prepareFBO(g,this.width,this.height),a.bindTechnique(r,this.bindParameters,this._cutFillDepthParameters),a.screen.draw(),this._runPyramidReduction(g,F,h),this._prepareFBO(g,this.width,this.height,c),a.bindTechnique(s,this.bindParameters,this._cutFillDepthParameters),a.screen.draw(),this._runPyramidReduction(g,F,o),this._prepareFBO(g,this.width,this.height,l),a.bindTechnique(s,this.bindParameters,this._cutFillDepthParameters),a.screen.draw(),this._runPyramidReduction(g,F,n),f.release(),m.release(),g.release(),F.release(),d.bindBuffer(d.PIXEL_PACK_BUFFER,null),a.setViewport(_.x,_.y,_.width,_.height),this._sync=new V(d),setTimeout(()=>this.readyToRun=!0,0),e}update(t,i){if(!this.done)return;this.done=!1;const r=this.renderingContext,{cameraDimensions:{width:s,height:h},localOriginRenderSpace:o}=t,n=this._maxTextureSize,a=h/s,u=s>h?n:n/a,c=s>h?n*a:n;this._width=e(u),this._height=e(c);const l=[this._width,this._height];this._orthographicCamera=this._createCamera(t,l),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 S}catch(e){return this.readyToRun=!1,void(this._sync=r(this._sync))}this.readyToRun=!1,this._sync=r(this._sync);const t=this.gl;this._cpuBuffer=new Float32Array(this._pixelBufferSize/4),t.bindBuffer(t.PIXEL_PACK_BUFFER,this._pixelBuffer),t.getBufferSubData(t.PIXEL_PACK_BUFFER,0,this._cpuBuffer),t.bindBuffer(t.PIXEL_PACK_BUFFER,null),this._updateResults(this._cpuBuffer),this.done=!0}getResults(){return this._results}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(t,e,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._cutFillReductionParameters.depthTexture=t.getTexture(),this._prepareFBO(e,h,o),r.bindTechnique(i,this.bindParameters,this._cutFillReductionParameters),r.screen.draw(),[t,e]=[e,t];s.readPixels(0,0,h,o,33319,E.FLOAT,this._pixelBufferOffset),this._pixelBufferOffset+=this._perReductionPixelBufferSize}_updateResults(t){const e=new U(0,1,a()),i=new U(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;e.totalDepth+=t[h],i.totalDepth+=t[h+1],h+=o;const n=t[h];n<e.labelDepth&&(e.labelDepth=n,L(e.labelCoords,t[h+1],this._width)),h+=o;const a=t[h];a>i.labelDepth&&(i.labelDepth=a,L(i.labelCoords,t[h+1],this._width))}this._results=new k(this._width,this._height,e,i)}_prepareFBO(t,e,i,r=l){const s=this.renderingContext;s.bindFramebuffer(t.fbo),s.setViewport(0,0,e,i),s.setClearColor(r[0],r[1],r[2],r[3]),s.clear(16384)}_createCamera(t,e){const{cameraPositionRenderSpace:i,localOriginRenderSpace:r,northVector:s,cameraDimensions:{width:h,height:n},cameraNearFar:{near:a,far:u}}=t,c=new g({eye:i,center:r,up:s,near:a,far:u});return c.viewport=[0,0,e[0],e[1]],o(c.projectionMatrix,-h/2,h/2,-n/2,n/2,a,u),c}_updateTargetVao(t,e){this._targetVao=i(this._targetVao);const r=e.reduce((t,e)=>t+e.indices.length,0),s=z.createBuffer(r),h=s.position;let o=0;for(const i of e){const{positions:t,indices:e}=i;for(let i=0;i<e.length;++i){const r=3*e[i];h.set(o,0,t[r]),h.set(o,1,t[r+1]),h.set(o,2,t[r+2]),o++}}const n=new O(t,f(z),s.buffer);this._targetVao=new w(t,n)}};t([s()],A.prototype,"consumes",void 0),t([s()],A.prototype,"produces",void 0),t([s()],A.prototype,"needsRender",void 0),t([s()],A.prototype,"readyToRun",void 0),t([s()],A.prototype,"done",void 0),t([s()],A.prototype,"updating",null),t([s()],A.prototype,"_frameTask",void 0),A=t([h("esri.views.3d.webgl-engine.lib.CutFillDepth")],A);const z=m().vec3f("position").freeze();function L(t,e,i){const r=e%i,s=Math.floor(e/i);n(t,r,s)}class M{constructor(t,e){this.positions=t,this.indices=e}}class U{constructor(t,e,i){this.totalDepth=t,this.labelDepth=e,this.labelCoords=i}}class k{constructor(t=0,e=0,i=new U(0,1,a()),r=new U(0,0,a())){this.width=t,this.height=e,this.cut=i,this.fill=r}}export{A as CutFillDepth,U as DepthResult,k as RenderResult,M as TargetGeometryRenderInfo};
|
|
2
|
+
import{__decorate as t}from"tslib";import{nextPowerOfTwo as e}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 c,ZEROS as l}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{RenderNodeOutput as d,InternalRenderCategory as p}from"../../webgl.js";import{Frustum as _}from"../../state/Frustum.js";import{glLayout as f}from"../../support/buffer/glUtil.js";import{newLayout as m}from"../../support/buffer/InterleavedLayout.js";import g from"../../webgl/RenderCamera.js";import F from"../../webgl/RenderNode.js";import{ShaderOutputConfiguration as C}from"../core/shaderLibrary/ShaderOutputConfiguration.js";import{VertexArrayObject as w}from"./VertexArrayObject.js";import{C as R}from"../../../../chunks/CutFillDepth.glsl.js";import{CutFillDepthTechnique as P}from"../shaders/CutFillDepthTechnique.js";import{CutFillDepthTechniqueConfiguration as T}from"../shaders/CutFillDepthTechniqueConfiguration.js";import{C as b}from"../../../../chunks/CutFillReduction.glsl.js";import{CutFillReductionTechnique as x}from"../shaders/CutFillReductionTechnique.js";import{CutFillReductionTechniqueConfiguration as D}from"../shaders/CutFillReductionTechniqueConfiguration.js";import{C as B}from"../../../../chunks/CutFillTargetDepth.glsl.js";import{CutFillTargetDepthTechnique as y}from"../shaders/CutFillTargetDepthTechnique.js";import{ImmediateTask as j,TaskPriority as q}from"../../../support/Scheduler.js";import{Yield as S}from"../../../support/Yield.js";import{PrimitiveType as v,DataType as E}from"../../../webgl/enums.js";import{Sync as V}from"../../../webgl/Sync.js";import{VertexBuffer as O}from"../../../webgl/VertexBuffer.js";let A=class extends F{constructor(t){super(t),this.consumes={required:[d.TRANSPARENT]},this.produces=p.CUTFILL_DEPTH,this._cutFillTargetDepthConfiguration=new C,this._cutFillDepthConfiguration=new T,this._cutFillReductionConfiguration=new D,this._cutFillTargetDepthParameters=new B,this._cutFillDepthParameters=new R,this._cutFillReductionParameters=new b,this.needsRender=!1,this.readyToRun=!1,this.done=!0,this._frameTask=j,this._results=new k,this._localOrigin=u(),this._maxTextureSize=512,this._width=0,this._height=0,this._reducedWidth=0,this._reducedHeight=0,this._depthFormat=13,this._colorFormat=10,this._numChannels=2,this._targetVao=null,this._numReductions=3,this._reductionPasses=0,this._pixelBufferSize=0,this._pixelBufferOffset=0,this._perReductionPixelBufferSize=0}initialize(){this._frameTask=this.view.resourceController.scheduler.registerTask(q.VOLUME_MEASUREMENT,this),this.addHandles(this._frameTask),this._maxTextureSize=Math.min(this._maxTextureSize,this.fboCache.rctx.parameters.maxTextureSize),this._cutFillTargetDepthConfiguration.output=7,this._frustum=new _(this.view.renderCoordsHelper)}destroy(){this._targetVao=i(this._targetVao);const t=this.gl;this._sync=r(this._sync),this._pixelBuffer&&(t.deleteBuffer(this._pixelBuffer),this._pixelBuffer=null,this._pixelBufferSize=0)}precompile(){this.techniques.precompile(y,this._cutFillTargetDepthConfiguration),this._cutFillDepthConfiguration.preparePass=0,this.techniques.precompile(P,this._cutFillDepthConfiguration),this._cutFillDepthConfiguration.preparePass=1,this.techniques.precompile(P,this._cutFillDepthConfiguration),this._cutFillReductionConfiguration.reductionPass=0,this.techniques.precompile(x,this._cutFillReductionConfiguration),this._cutFillReductionConfiguration.reductionPass=1,this.techniques.precompile(x,this._cutFillReductionConfiguration),this._cutFillReductionConfiguration.reductionPass=2,this.techniques.precompile(x,this._cutFillReductionConfiguration),this.view.stage.renderer.precompileCutFill()}render(t){const e=t.find(({name:t})=>t===p.CUTFILL_DEPTH);if(!this._orthographicCamera||!this._targetVao||!this.needsRender||this._sync)return e;const i=this.techniques.get(y,this._cutFillTargetDepthConfiguration);this._cutFillDepthConfiguration.preparePass=0;const r=this.techniques.get(P,this._cutFillDepthConfiguration);this._cutFillDepthConfiguration.preparePass=1;const s=this.techniques.get(P,this._cutFillDepthConfiguration);this._cutFillReductionConfiguration.reductionPass=0;const h=this.techniques.get(x,this._cutFillReductionConfiguration);this._cutFillReductionConfiguration.reductionPass=1;const o=this.techniques.get(x,this._cutFillReductionConfiguration);this._cutFillReductionConfiguration.reductionPass=2;const n=this.techniques.get(x,this._cutFillReductionConfiguration);if(!(i.compiled&&r.compiled&&s.compiled&&h.compiled&&o.compiled&&n.compiled))return this.requestRender(1),e;this.needsRender=!1;const a=this.renderingContext,u=this.fboCache,d=this.gl,_=a.getViewport(),f=u.acquire(this._width,this._height,"cutfill reference depth",this._depthFormat);a.bindFramebuffer(f.fbo),a.setViewport(0,0,this._width,this._height),a.clear(1280),this.view.stage.renderer.renderCutFillReferenceDepth(this._orthographicCamera);const m=u.acquire(this._width,this._height,"cutfill target depth",this._depthFormat);a.bindFramebuffer(m.fbo),a.setViewport(0,0,this._width,this._height),a.setClearDepth(1),a.clear(256),this._cutFillTargetDepthParameters.origin=this._localOrigin,this._cutFillTargetDepthParameters.cutFillCamera=this._orthographicCamera,a.bindTechnique(i,this.bindParameters,this._cutFillTargetDepthParameters),a.bindVAO(this._targetVao),a.drawArrays(v.TRIANGLES,0,this._targetVao.vertexCount("geometry"));const g=u.acquire(this._width,this._height,"cutfill reduction even",this._colorFormat),F=u.acquire(this._width,this._height,"cutfill reduction odd",this._colorFormat);return this._cutFillDepthParameters.referenceDepthTexture=f.depthTexture,this._cutFillDepthParameters.targetDepthTexture=m.depthTexture,this._pixelBuffer||(this._pixelBuffer=d.createBuffer()),d.bindBuffer(d.PIXEL_PACK_BUFFER,this._pixelBuffer),d.bufferData(d.PIXEL_PACK_BUFFER,this._pixelBufferSize,d.STREAM_READ),this._prepareFBO(g,this.width,this.height),a.bindTechnique(r,this.bindParameters,this._cutFillDepthParameters),a.screen.draw(),this._runPyramidReduction(g,F,h),this._prepareFBO(g,this.width,this.height,c),a.bindTechnique(s,this.bindParameters,this._cutFillDepthParameters),a.screen.draw(),this._runPyramidReduction(g,F,o),this._prepareFBO(g,this.width,this.height,l),a.bindTechnique(s,this.bindParameters,this._cutFillDepthParameters),a.screen.draw(),this._runPyramidReduction(g,F,n),f.release(),m.release(),g.release(),F.release(),d.bindBuffer(d.PIXEL_PACK_BUFFER,null),a.setViewport(_.x,_.y,_.width,_.height),this._sync=new V(d),setTimeout(()=>this.readyToRun=!0,0),e}update(t,i){if(!this.done)return;this.done=!1;const r=this.renderingContext,{cameraDimensions:{width:s,height:h},localOriginRenderSpace:o}=t,n=this._maxTextureSize,a=h/s,u=s>h?n:n/a,c=s>h?n*a:n;this._width=e(u),this._height=e(c);const l=[this._width,this._height];this._orthographicCamera=this._createCamera(t,l),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 S}catch(e){return this.readyToRun=!1,void(this._sync=r(this._sync))}this.readyToRun=!1,this._sync=r(this._sync);const t=this.gl;this._cpuBuffer=new Float32Array(this._pixelBufferSize/4),t.bindBuffer(t.PIXEL_PACK_BUFFER,this._pixelBuffer),t.getBufferSubData(t.PIXEL_PACK_BUFFER,0,this._cpuBuffer),t.bindBuffer(t.PIXEL_PACK_BUFFER,null),this._updateResults(this._cpuBuffer),this.done=!0}getResults(){return this._results}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(t,e,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._cutFillReductionParameters.depthTexture=t.getTexture(),this._prepareFBO(e,h,o),r.bindTechnique(i,this.bindParameters,this._cutFillReductionParameters),r.screen.draw(),[t,e]=[e,t];s.readPixels(0,0,h,o,33319,E.FLOAT,this._pixelBufferOffset),this._pixelBufferOffset+=this._perReductionPixelBufferSize}_updateResults(t){const e=new U(0,1,a()),i=new U(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;e.totalDepth+=t[h],i.totalDepth+=t[h+1],h+=o;const n=t[h];n<e.labelDepth&&(e.labelDepth=n,L(e.labelCoords,t[h+1],this._width)),h+=o;const a=t[h];a>i.labelDepth&&(i.labelDepth=a,L(i.labelCoords,t[h+1],this._width))}this._results=new k(this._width,this._height,e,i)}_prepareFBO(t,e,i,r=l){const s=this.renderingContext;s.bindFramebuffer(t.fbo),s.setViewport(0,0,e,i),s.setClearColor(r[0],r[1],r[2],r[3]),s.clear(16384)}_createCamera(t,e){const{cameraPositionRenderSpace:i,localOriginRenderSpace:r,northVector:s,cameraDimensions:{width:h,height:n},cameraNearFar:{near:a,far:u}}=t,c=new g({eye:i,center:r,up:s,near:a,far:u});return c.viewport=[0,0,e[0],e[1]],o(c.projectionMatrix,-h/2,h/2,-n/2,n/2,a,u),c}_updateTargetVao(t,e){this._targetVao=i(this._targetVao);const r=e.reduce((t,e)=>t+e.indices.length,0),s=z.createBuffer(r),h=s.position;let o=0;for(const i of e){const{positions:t,indices:e}=i;for(let i=0;i<e.length;++i){const r=3*e[i];h.set(o,0,t[r]),h.set(o,1,t[r+1]),h.set(o,2,t[r+2]),o++}}const n=new O(t,f(z),s.buffer);this._targetVao=new w(t,n)}};t([s()],A.prototype,"consumes",void 0),t([s()],A.prototype,"produces",void 0),t([s()],A.prototype,"needsRender",void 0),t([s()],A.prototype,"readyToRun",void 0),t([s()],A.prototype,"done",void 0),t([s()],A.prototype,"updating",null),t([s()],A.prototype,"_frameTask",void 0),A=t([h("esri.views.3d.webgl-engine.lib.CutFillDepth")],A);const z=m().vec3f("position").freeze();function L(t,e,i){const r=e%i,s=Math.floor(e/i);n(t,r,s)}class M{constructor(t,e){this.positions=t,this.indices=e}}class U{constructor(t,e,i){this.totalDepth=t,this.labelDepth=e,this.labelCoords=i}}class k{constructor(t=0,e=0,i=new U(0,1,a()),r=new U(0,0,a())){this.width=t,this.height=e,this.cut=i,this.fill=r}}export{A as CutFillDepth,U as DepthResult,k as RenderResult,M as TargetGeometryRenderInfo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import"../../../../core/has.js";import{disposeMaybe as e,destroyMaybe as i}from"../../../../core/maybe.js";import{property as r,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{multiply as s,fromTranslation as n}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as u,sub as a}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 c}from"../../webgl.js";import{debugFlags as f}from"../../support/debugFlags.js";import{glLayout as d}from"../../support/buffer/glUtil.js";import{newLayout as l}from"../../support/buffer/InterleavedLayout.js";import m from"../../webgl/RenderNode.js";import{Pos2Locations as _}from"./DefaultVertexBufferLayouts.js";import{VertexArrayObject as g}from"./VertexArrayObject.js";import{TaskPriority as x}from"../../../support/Scheduler.js";import{Yield as b}from"../../../support/Yield.js";import{BufferObject as v}from"../../../webgl/BufferObject.js";import{PrimitiveType as w,DataType as y,PixelType as T}from"../../../webgl/enums.js";import{makePipelineState as j,defaultColorWrite as P}from"../../../webgl/renderState.js";import{Sync as C}from"../../../webgl/Sync.js";import D from"../../../webgl/Texture.js";import{TextureDescriptor as B}from"../../../webgl/TextureDescriptor.js";import{getFormatComponents as O}from"../../../webgl/Util.js";import{fromLayout as F}from"../../../webgl/VertexAttributeLocations.js";import{VertexBuffer as M}from"../../../webgl/VertexBuffer.js";let V=class extends m{constructor(t){super(t),this.category=c.COMPOSITE,this._debugVao=null,this._debugVaoLength=0,this.readyToRun=!1,this.done=!0,this._start=!1,this._origin=p(),this._textureWidth=256,this._uploadBuffer=new Float32Array(3*this._textureWidth),this._counter=0,this._width=0,this._height=0,this._pipeline=j({colorWrite:P})}initialize(){this.addHandles(this.view.resourceController.scheduler.registerTask(x.OCCLUSION_QUERY,this)),this.produces="disabled",this.consumes.required=[this.category]}destroy(){this._debugVao=e(this._debugVao),this._sync=i(this._sync),this._pixelBuffer=e(this._pixelBuffer),this._texture=e(this._texture)}precompile(){this._ensureProgram(this.renderingContext),this._debug&&this._ensureDebugProgram(this.renderingContext)}render(t){const e=t.find(({name:t})=>t===this.category),i=this.renderingContext;if(this._debug){const t=this._ensureDebugProgram(i);i.useProgram(t),I(t,this.camera,this._origin),i.bindTexture(this._texture,1),t.setUniform1i("positionTex",1),i.bindFramebuffer(e.fbo),i.bindVAO(this._ensureDebugVao(i,this._width*this._height)),i.setDepthWriteEnabled(!1),i.setDepthTestEnabled(!1),t.setUniform4f("color",1,0,0,1),i.drawArrays(w.POINTS,0,this._counter),i.setDepthTestEnabled(!0),t.setUniform4f("color",0,1,0,1),i.drawArrays(w.POINTS,0,this._counter)}const r=this.gl,o=e.getTexture(r.DEPTH_STENCIL_ATTACHMENT),s=this.view.stage?.renderer.fboCache;if(!o||!s||this._sync||!this._start)return e;this._start=!1,this.produces=f.OCCLUSION_QUERY_DEBUG_PIXEL?this.category:"disabled";const n=s.acquire(this._width,this._height,"hud visibility",
|
|
2
|
+
import{__decorate as t}from"tslib";import"../../../../core/has.js";import{disposeMaybe as e,destroyMaybe as i}from"../../../../core/maybe.js";import{property as r,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{multiply as s,fromTranslation as n}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as u,sub as a}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 c}from"../../webgl.js";import{debugFlags as f}from"../../support/debugFlags.js";import{glLayout as d}from"../../support/buffer/glUtil.js";import{newLayout as l}from"../../support/buffer/InterleavedLayout.js";import m from"../../webgl/RenderNode.js";import{Pos2Locations as _}from"./DefaultVertexBufferLayouts.js";import{VertexArrayObject as g}from"./VertexArrayObject.js";import{TaskPriority as x}from"../../../support/Scheduler.js";import{Yield as b}from"../../../support/Yield.js";import{BufferObject as v}from"../../../webgl/BufferObject.js";import{PrimitiveType as w,DataType as y,PixelType as T}from"../../../webgl/enums.js";import{makePipelineState as j,defaultColorWrite as P}from"../../../webgl/renderState.js";import{Sync as C}from"../../../webgl/Sync.js";import D from"../../../webgl/Texture.js";import{TextureDescriptor as B}from"../../../webgl/TextureDescriptor.js";import{getFormatComponents as O}from"../../../webgl/Util.js";import{fromLayout as F}from"../../../webgl/VertexAttributeLocations.js";import{VertexBuffer as M}from"../../../webgl/VertexBuffer.js";let V=class extends m{constructor(t){super(t),this.category=c.COMPOSITE,this._debugVao=null,this._debugVaoLength=0,this.readyToRun=!1,this.done=!0,this._start=!1,this._origin=p(),this._textureWidth=256,this._uploadBuffer=new Float32Array(3*this._textureWidth),this._counter=0,this._width=0,this._height=0,this._pipeline=j({colorWrite:P})}initialize(){this.addHandles(this.view.resourceController.scheduler.registerTask(x.OCCLUSION_QUERY,this)),this.produces="disabled",this.consumes.required=[this.category]}destroy(){this._debugVao=e(this._debugVao),this._sync=i(this._sync),this._pixelBuffer=e(this._pixelBuffer),this._texture=e(this._texture)}precompile(){this._ensureProgram(this.renderingContext),this._debug&&this._ensureDebugProgram(this.renderingContext)}render(t){const e=t.find(({name:t})=>t===this.category),i=this.renderingContext;if(this._debug){const t=this._ensureDebugProgram(i);i.useProgram(t),I(t,this.camera,this._origin),i.bindTexture(this._texture,1),t.setUniform1i("positionTex",1),i.bindFramebuffer(e.fbo),i.bindVAO(this._ensureDebugVao(i,this._width*this._height)),i.setDepthWriteEnabled(!1),i.setDepthTestEnabled(!1),t.setUniform4f("color",1,0,0,1),i.drawArrays(w.POINTS,0,this._counter),i.setDepthTestEnabled(!0),t.setUniform4f("color",0,1,0,1),i.drawArrays(w.POINTS,0,this._counter)}const r=this.gl,o=e.getTexture(r.DEPTH_STENCIL_ATTACHMENT),s=this.view.stage?.renderer.fboCache;if(!o||!s||this._sync||!this._start)return e;this._start=!1,this.produces=f.OCCLUSION_QUERY_DEBUG_PIXEL?this.category:"disabled";const n=s.acquire(this._width,this._height,"hud visibility",9);i.bindFramebuffer(n.fbo),i.setPipelineState(this._pipeline);const h=this._ensureProgram(i);return i.useProgram(h),I(h,this.camera,this._origin),i.bindTexture(o,0),h.setUniform1i("depthTex",0),i.bindTexture(this._texture,1),h.setUniform1i("positionTex",1),h.setUniform1i("count",this._counter),i.screen.draw(),this.pixelFormat??=6403===r.getParameter(r.IMPLEMENTATION_COLOR_READ_FORMAT)&&r.getParameter(r.IMPLEMENTATION_COLOR_READ_TYPE)===y.FLOAT?6403:6408,this._pixelBuffer??=v.createPixelPack(i,r.STREAM_READ),this._pixelBuffer.setSize(this._width*this._height*this._formatComponents*4),i.bindBuffer(this._pixelBuffer),r.readPixels(0,0,this._width,this._height,this.pixelFormat,y.FLOAT,0),i.unbindBuffer(35051),i.bindFramebuffer(null),n.release(),this._sync=new C(r),setTimeout(()=>this.readyToRun=!0,0),e}get _debug(){return!1}get _formatComponents(){return this.pixelFormat?O(this.pixelFormat):1}runTask(){if(this._sync&&this._pixelBuffer){try{if(!this._sync.poll())return b}catch(t){return this.readyToRun=!1,void(this._sync=i(this._sync))}this.readyToRun=!1,this._sync=i(this._sync),this._cpuBuffer=new Float32Array(this._width*this._height*this._formatComponents),this._pixelBuffer.getSubData(this._cpuBuffer),this.done=!0}else this.readyToRun=!1}cancel(){this._start=!1,this._sync=i(this._sync)}init(t,e){this.cancel();const i=this._textureWidth;if(this._width=i,this._height=Math.ceil(t/i),this._counter=0,this._texture?.dispose(),0===this._height)return;const r=new B(this._width,this._height);r.pixelFormat=6407,r.dataType=T.FLOAT,r.samplingMode=9728,this._texture=new D(this.renderingContext,r),this.done=!1,u(this._origin,Math.fround(e[0]),Math.fround(e[1]),Math.fround(e[2]))}addPosition(t){const e=this._width;if(this._counter>=e*this._height)return-1;const i=this._counter%e;return a(L,t,this._origin),this._uploadBuffer[3*i+0]=L[0],this._uploadBuffer[3*i+1]=L[1],this._uploadBuffer[3*i+2]=L[2],i===e-1&&this._flush(),this._counter++}start(){if(0===this._width||0===this._height)return void(this.done=!0);const t=this._width;this._counter%t>0&&this._flush(),this.produces=this.category,this._start=!0,this.requestRender(1)}getOcclusion(t){return this._cpuBuffer?.[t*this._formatComponents]??-1}get usedMemory(){return(this._texture?.usedMemory??0)+(this._pixelBuffer?.usedMemory??0)+4*(this._uploadBuffer?.length??0)+4*(this._cpuBuffer?.length??0)}_flush(){const t=this._width,e=Math.floor(this._counter/t);this._texture?.updateData(0,0,e,t,1,this._uploadBuffer)}_ensureProgram(t){return this._program??=t.programCache.get(R,S,_),this._program}_ensureDebugProgram(t){return this._debugProgram??=t.programCache.get(A,E,z),this._debugProgram}_ensureDebugVao(t,i){if(!this._debugVao||this._debugVaoLength<i){const r=new Float32Array(i);for(let t=0;t<i;t++)r[t]=t;this._debugVao=e(this._debugVao),this._debugVao=new g(t,new M(t,N,r))}return this._debugVao}};t([r()],V.prototype,"category",void 0),t([r()],V.prototype,"pixelFormat",void 0),t([r()],V.prototype,"_formatComponents",null),t([r()],V.prototype,"readyToRun",void 0),t([r()],V.prototype,"done",void 0),V=t([o("esri.views.3d.webgl-engine.lib.GPUPointOcclusionQuery")],V);const A="#version 300 es\nprecision highp float;\nprecision highp int;\n\nin highp float componentIndex;\n\nuniform highp mat4 proj;\nuniform highp mat4 view;\n\nuniform highp sampler2D positionTex;\n\nvoid main() {\n int width = textureSize(positionTex, 0).x;\n int u = int(componentIndex) % width;\n int v = int(componentIndex) / width;\n\n vec4 posWorld = vec4(texelFetch(positionTex, ivec2(u, v), 0).rgb, 1.0);\n vec4 posView = view * posWorld;\n vec4 projected = proj * posView;\n\n gl_Position = projected;\n gl_PointSize = 1.0;\n}",E="#version 300 es\nout highp vec4 fragColor;\nuniform lowp vec4 color;\nvoid main() {\n fragColor = color;\n}\n",R="#version 300 es\nprecision highp float;\nin vec2 position;\n\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n}",S="#version 300 es\nprecision highp float;\nout highp vec4 fragColor;\n\nuniform highp mat4 proj;\nuniform highp mat4 view;\n\nuniform highp int count;\n\nuniform highp sampler2D depthTex;\nuniform highp sampler2D positionTex;\n\nfloat linearizeDepth(float depth) {\n float depthNdc = depth * 2.0 - 1.0;\n float c1 = proj[3][2];\n float c2 = proj[2][2];\n return -c1 / (depthNdc + c2 + 1e-7);\n}\n\nvoid main() {\n int u = int(floor(gl_FragCoord.x));\n int v = int(floor(gl_FragCoord.y));\n if (u + v * textureSize(positionTex, 0).x >= count) {\n fragColor = vec4(-1);\n return;\n }\n vec4 posWorld = vec4(texelFetch(positionTex, ivec2(u, v), 0).rgb, 1.0);\n vec4 posView = view * posWorld;\n vec4 projected = proj * posView;\n\n vec3 clipPos = projected.xyz / projected.w;\n\n if (clipPos.x < -1.0 || clipPos.x > 1.0 || clipPos.y < -1.0 || clipPos.y > 1.0) {\n fragColor = vec4(-1);\n return;\n }\n\n vec3 uvDepth = 0.5 * clipPos + vec3(0.5);\n\n float depth = texture(depthTex, uvDepth.xy).r;\n\n if (uvDepth.z <= depth) {\n fragColor = vec4(0);\n return;\n }\n\n fragColor = vec4(linearizeDepth(depth) - linearizeDepth(uvDepth.z));\n}\n";function I(t,e,i){s(U,e.viewMatrix,n(U,i)),t.setUniformMatrix4fv("view",U),t.setUniformMatrix4fv("proj",e.projectionMatrix)}const L=p(),U=h(),N=d(l().f32("componentIndex")),z=F(N);export{V as GPUPointOcclusionQuery};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{IDENTITY as t,clone as i}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as e}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{getContinuousIndexArray as s}from"../../../../geometry/support/Indices.js";import{
|
|
2
|
+
import{IDENTITY as t,clone as i}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as e}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{getContinuousIndexArray as s}from"../../../../geometry/support/Indices.js";import{Attribute as n}from"./Attribute.js";import{cloneAttributeData as o}from"./AttributeArray.js";import{BoundingInfo as h}from"./BoundingInfo.js";import{GeometryBaseInstance as r}from"./GeometryBaseInstance.js";import{computeAttachmentOriginTriangles as a,computeAttachmentOriginLines as g,computeAttachmentOriginPoints as u}from"./geometryDataUtils.js";import{Object3DHighlightStateID as l}from"./Object3DStateID.js";import{assert as c}from"./Util.js";import{webglDebugEnabled as d}from"../../../webgl/checkWebGLError.js";class m extends r{constructor(t,i,e=null,s=0,n=null,o=-1,h,r){super(i),this.material=t,this.mapPositions=e,this.type=s,this.olidColor=n,this.edgeIndicesLength=o,this.baseGeometry=h,this.drawIndices=r,this._vertexPositionIndicesCache=void 0,this._highlights=null,this._highlightOptionsCounts=null,this.visible=!0,this._boundingInfo=null,c((t?.useIndexing??!1)===(null!=r),"Material index requirement and Geometry must match");const a=this.positionAttribute;null!=a&&this.edgeIndicesLength<0&&(this.edgeIndicesLength=a.indices.length)}instantiate(t={}){const i=new m(t.material||this.material,[],this.mapPositions,this.type,this.olidColor,this.edgeIndicesLength,this.baseGeometry,this.drawIndices);return this._attributes.forEach((t,e)=>{t.exclusive=!1,i._attributes.set(e,t)}),i._boundingInfo=this._boundingInfo,i.transformation=t.transformation||this.transformation,i}getMutableAttribute(t){let i=this._attributes.get(t);return i&&!i.exclusive&&(i={...i,exclusive:!0,data:o(i.data)},this._attributes.set(t,i)),i}setAttributeData(t,i){const e=this._attributes.get(t);e?this._attributes.set(t,{...e,exclusive:!0,data:i}):d()&&console.warn(`Setting undefined attribute ${t} data`)}get primitivePositionIndices(){if(void 0!==this._vertexPositionIndicesCache)return this._vertexPositionIndicesCache;const{drawIndices:t}=this,i=this.positionAttribute;if(null!=t&&null!=i){const e=new Array;for(const s of t)e.push(i.indices[s]);this._vertexPositionIndicesCache=e}else this._vertexPositionIndicesCache=i?.indices??null;return this._vertexPositionIndicesCache}get positionAttribute(){return this.attributes.get("position")??this.baseGeometry?.attributes.get("position")}get indexCount(){const t=this.drawIndices??this.positionAttribute?.indices;return t?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}computeAttachmentOrigin(t){return!!(0===this.type?this._computeAttachmentOriginTriangles(t):2===this.type?this._computeAttachmentOriginLines(t):this._computeAttachmentOriginPoints(t))&&(null!=this._transformation&&e(t,t,this._transformation),!0)}_computeAttachmentOriginTriangles(t){const i=this.positionAttribute,e=this.primitivePositionIndices;return a(t,i,e)}_computeAttachmentOriginLines(t){const i=this.positionAttribute,e=this.primitivePositionIndices;return g(t,i,p(this.material.parameters,i),e)}_computeAttachmentOriginPoints(t){const i=this.positionAttribute,e=this.primitivePositionIndices;return u(t,i,e)}invalidateBoundingInfo(){this._boundingInfo=null,this._vertexPositionIndicesCache=void 0}_calculateBoundingInfo(){const t=this.positionAttribute,i=this.primitivePositionIndices;if(!t||!i||0===i.length)return null;const e=i===t.indices?t:new n(t.data,i,t.size,!1,t.stride),o=0===this.type?3:1;c(i.length%o===0,"Indexing error: "+i.length+" not divisible by "+o);const r=s(i.length/o);return new h(r,o,e)}get transformation(){return this._transformation??t}set transformation(e){this._transformation=e&&e!==t?i(e):null}get highlights(){return this._highlights||_}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}foreachHighlightOptions(t){this._highlightOptionsCounts?.forEach((i,e)=>t(e))}allocateIdAndHighlight(t){const i=new l(t);return this.addHighlight(i)}addHighlight(t){this._ensureHighlights().add(t);const{highlightName:i}=t,e=(this._highlightOptionsCounts?.get(i)??0)+1;return this._ensureHighlightOptionsCounts().set(i,e),t}_ensureHighlights(){let t=this._highlights;return t||(t=new Set,this._highlights=t),t}_ensureHighlightOptionsCounts(){let t=this._highlightOptionsCounts;return t||(t=new Map,this._highlightOptionsCounts=t),t}removeHighlight(t){if(this._highlights?.delete(t)){const{highlightName:i}=t,e=this._highlightOptionsCounts?.get(i)??0;e<=1?this._highlightOptionsCounts?.delete(i):this._ensureHighlightOptionsCounts().set(i,e-1)}}}function p(t,i){return!(!("isClosed"in t)||!t.isClosed)&&i.indices.length>2}const _=new Set;export{m as Geometry};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{releaseMaybe as t}from"../../../../core/maybe.js";import{copy as s}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{create as i,ZEROS as e}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){this._fbos=t,this._hasEmission=!1,this._size=new r(0,0),this._clearColor=i()}dispose(){this._color=t(this._color),this.releaseDepth()}initialize(t,i,e,r){const o=this._color;return this._color=null,this.releaseDepth(),this._hasEmission=r,this._size.width=t,this._size.height=i,h(this._size,this._fbos.rctx.parameters.maxTextureSize),s(this._clearColor,e),o}releaseDepth(){this._color?.detachDepth(),this._depth=t(this._depth)}update(t){const s=this._ensureColor();return s.attachDepth(this.depth),this._color=t(s),this._color}bind(){const{rctx:t}=this._fbos,s=null==this._color;this.color.attachDepth(this.depth),t.bindFramebuffer(this.color.fbo),s&&(t.setClearStencil(0),t.setClearColor(this._clearColor[0],this._clearColor[1],this._clearColor[2],this._clearColor[3]),t.clear(17664),this._hasEmission&&t.clearBuffer(1,e))}get size(){return this._size}get color(){return this._ensureColor()}get depth(){return this._depth??=this._fbos.acquireDepth(
|
|
2
|
+
import{releaseMaybe as t}from"../../../../core/maybe.js";import{copy as s}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{create as i,ZEROS as e}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){this._fbos=t,this._hasEmission=!1,this._size=new r(0,0),this._clearColor=i()}dispose(){this._color=t(this._color),this.releaseDepth()}initialize(t,i,e,r){const o=this._color;return this._color=null,this.releaseDepth(),this._hasEmission=r,this._size.width=t,this._size.height=i,h(this._size,this._fbos.rctx.parameters.maxTextureSize),s(this._clearColor,e),o}releaseDepth(){this._color?.detachDepth(),this._depth=t(this._depth)}update(t){const s=this._ensureColor();return s.attachDepth(this.depth),this._color=t(s),this._color}bind(){const{rctx:t}=this._fbos,s=null==this._color;this.color.attachDepth(this.depth),t.bindFramebuffer(this.color.fbo),s&&(t.setClearStencil(0),t.setClearColor(this._clearColor[0],this._clearColor[1],this._clearColor[2],this._clearColor[3]),t.clear(17664),this._hasEmission&&t.clearBuffer(1,e))}get size(){return this._size}get color(){return this._ensureColor()}get depth(){return this._depth??=this._fbos.acquireDepth(13,this._size.width,this._size.height,"main depth"),this._depth}_ensureColor(){return this._color??=this._hasEmission?this._fbos.acquire(this._size.width,this._size.height,"main color").acquireColor(o,8,"emissive"):this._fbos.acquire(this._size.width,this._size.height,"main color"),this._color}}export{l as MainFramebuffer};
|