@arcgis/core 5.2.0-next.47 → 5.2.0-next.49
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/applications/Components/OrientedImageryViewer/PanoramicViewer/utils.d.ts +33 -0
- package/applications/Components/OrientedImageryViewer/PanoramicViewer/utils.js +2 -0
- package/arcgisGlobal.d.ts +2 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/003a87b16f8a4b476e14.js +1 -0
- package/assets/esri/core/workers/chunks/031ccf2e1583beebdf24.js +1 -0
- package/assets/esri/core/workers/chunks/0474af7687466d8befd2.js +1 -0
- package/assets/esri/core/workers/chunks/{2a4868acd546312aa6d8.js → 05f6887805d92da03122.js} +1 -1
- package/assets/esri/core/workers/chunks/069b6d8bdb34ee88d437.js +1 -0
- package/assets/esri/core/workers/chunks/{f9b2727b41943d83d4ca.js → 0a413d917f3d19440fc1.js} +1 -1
- package/assets/esri/core/workers/chunks/0b2ca406761c63529a6a.js +1 -0
- package/assets/esri/core/workers/chunks/{68f7eaa3122de7c00adb.js → 0ea374f7b16745b9bbc7.js} +1 -1
- package/assets/esri/core/workers/chunks/{c369d4266f38e9ea6592.js → 1119a33245138e7b3914.js} +1 -1
- package/assets/esri/core/workers/chunks/12e0c5b7cc5c3f9e6f0f.js +1 -0
- package/assets/esri/core/workers/chunks/172571397c66f992d08c.js +1 -0
- package/assets/esri/core/workers/chunks/18edf2846d7546285e5e.js +1 -0
- package/assets/esri/core/workers/chunks/1b0557fcb058fc450230.js +1 -0
- package/assets/esri/core/workers/chunks/{98f575c038da74ced2a6.js → 1bc45872d22d61dbd7d1.js} +1 -1
- package/assets/esri/core/workers/chunks/{835643f716f7058a2722.js → 1cf8fb704c48ac3d3b15.js} +1 -1
- package/assets/esri/core/workers/chunks/25cb56c3b538d00e7693.js +1 -0
- package/assets/esri/core/workers/chunks/{4d4710d57c72ec75cccc.js → 26f1fd3f2be5102aae1d.js} +1 -1
- package/assets/esri/core/workers/chunks/285a5bd708f0fe1c620c.js +1 -0
- package/assets/esri/core/workers/chunks/{7777a79f26a06a6c5240.js → 304a22c580ce103480cb.js} +1 -1
- package/assets/esri/core/workers/chunks/{383392c63202ac044b6c.js → 33bd9785bd0b6ccef21b.js} +1 -1
- package/assets/esri/core/workers/chunks/{2c0d92c0e3511775401a.js → 35cbf00f0c37a86517af.js} +1 -1
- package/assets/esri/core/workers/chunks/{0f19bc532be24ca64755.js → 36fe6adf6517d8f80125.js} +1 -1
- package/assets/esri/core/workers/chunks/382d9491c2a56c1925fe.js +1 -0
- package/assets/esri/core/workers/chunks/3af2b9d6d5466cb2b957.js +256 -0
- package/assets/esri/core/workers/chunks/{b3cd17daf5a297b96705.js → 3bc2943035391b44d4cf.js} +1 -1
- package/assets/esri/core/workers/chunks/{d36f17d32c654b1ac7fa.js → 3f1a7f8a9ead64bf0b7b.js} +1 -1
- package/assets/esri/core/workers/chunks/40f7bb0ebd918d76f078.js +1 -0
- package/assets/esri/core/workers/chunks/43b39abd49c4a8ce891f.js +1 -0
- package/assets/esri/core/workers/chunks/{821176ee3be724621bb0.js → 461c2de938bf4c9b1442.js} +1 -1
- package/assets/esri/core/workers/chunks/{cc637aec16918052548e.js → 47af3525396f890f2a6b.js} +1 -1
- package/assets/esri/core/workers/chunks/4ee7232ea41fa41c5ed4.js +29 -0
- package/assets/esri/core/workers/chunks/4ee900e5dbb130fa0c7b.js +1 -0
- package/assets/esri/core/workers/chunks/50674ba5f24129d61d89.js +1 -0
- package/assets/esri/core/workers/chunks/547a2fe53139f705f95e.js +1 -0
- package/assets/esri/core/workers/chunks/5ce09c4d06e98b1e9251.js +1 -0
- package/assets/esri/core/workers/chunks/5dbd28fce73751d2d1aa.js +1 -0
- package/assets/esri/core/workers/chunks/5ec8b02e097cf6718462.js +1 -0
- package/assets/esri/core/workers/chunks/5f54d927dc77e92cf145.js +1 -0
- package/assets/esri/core/workers/chunks/63e3d338751240479335.js +1 -0
- package/assets/esri/core/workers/chunks/69b9a327f23e052fced7.js +1 -0
- package/assets/esri/core/workers/chunks/6c2b5087a9df65267f4e.js +1 -0
- package/assets/esri/core/workers/chunks/6ccd5fa5e35dc70fcd5d.js +1 -0
- package/assets/esri/core/workers/chunks/6e520ef645c5edcd499a.js +1 -0
- package/assets/esri/core/workers/chunks/7659391f952d134164cf.js +1 -0
- package/assets/esri/core/workers/chunks/78add8e6b54b51eaa299.js +1 -0
- package/assets/esri/core/workers/chunks/{2b669473aa2c7cfb63c7.js → 7b0ed52363704cfce129.js} +1 -1
- package/assets/esri/core/workers/chunks/7b61f56d0f766421eaef.js +1 -0
- package/assets/esri/core/workers/chunks/7f2f2a92dce3f68e579b.js +1 -0
- package/assets/esri/core/workers/chunks/801a664f21e0218bc705.js +1 -0
- package/assets/esri/core/workers/chunks/{8f9fb4e8a7d73db41664.js → 851bcc75acac4a2f199b.js} +1 -1
- package/assets/esri/core/workers/chunks/{6010b7be978698a642d0.js → 8977c85aecc7e08ab13c.js} +1 -1
- package/assets/esri/core/workers/chunks/8c5726c7ce40a92901e6.js +1 -0
- package/assets/esri/core/workers/chunks/8d21e2dabc5165f1c8ca.js +1 -0
- package/assets/esri/core/workers/chunks/9008090a5d8431ddfa22.js +1 -0
- package/assets/esri/core/workers/chunks/{f2adf1227a795604d3b8.js → 90ae80b797642bff0efa.js} +1 -1
- package/assets/esri/core/workers/chunks/{71ce1009dadcae8f8094.js → 95b3b8fe45ef4ac6b277.js} +1 -1
- package/assets/esri/core/workers/chunks/96cec8a02ca96175d602.js +1 -0
- package/assets/esri/core/workers/chunks/99eccf9ce53582cfa5b5.js +1 -0
- package/assets/esri/core/workers/chunks/9b7cb96acea388d86fa4.js +1 -0
- package/assets/esri/core/workers/chunks/{dee4019338a79c1ecd26.js → 9d0a9d465ec3a8ba1ed2.js} +1 -1
- package/assets/esri/core/workers/chunks/9e474465d069cb9e94f5.js +1 -0
- package/assets/esri/core/workers/chunks/aa3abc07de2921ef6ca1.js +1 -0
- package/assets/esri/core/workers/chunks/{ae9f9e975d7a9d442fa5.js → ab5aa4280ed0cb7fcbe9.js} +1 -1
- package/assets/esri/core/workers/chunks/b03f09ee2224f0cc526a.js +1 -0
- package/assets/esri/core/workers/chunks/{ee58f4bbc0a1f7d03df0.js → b32ede7805c7c6644e4c.js} +1 -1
- package/assets/esri/core/workers/chunks/b49952541d189b4b9f7e.js +1 -0
- package/assets/esri/core/workers/chunks/b8bdacebd4d24ba90f3f.js +1 -0
- package/assets/esri/core/workers/chunks/{85cd0cd721b27c497b18.js → baac90da0703891d59c4.js} +1 -1
- package/assets/esri/core/workers/chunks/bb552089b34d6811fb03.js +1 -0
- package/assets/esri/core/workers/chunks/cd1f1a72483b7c80bd9a.js +1 -0
- package/assets/esri/core/workers/chunks/{744f34e379484e63277c.js → cdb331b58e22f8c1c988.js} +2 -2
- package/assets/esri/core/workers/chunks/{b23d1e10fc4161d1f3eb.js → d021775cf747556660a5.js} +1 -1
- package/assets/esri/core/workers/chunks/{728ea88e7d4733230e1f.js → d1af0bd611a3dc549858.js} +85 -81
- package/assets/esri/core/workers/chunks/d2cb3d5ef0a9285afb78.js +1 -0
- package/assets/esri/core/workers/chunks/d49e42f36bc3dc256b9f.js +1 -0
- package/assets/esri/core/workers/chunks/d560ed96dde5ca3a5583.js +1 -0
- package/assets/esri/core/workers/chunks/dc1787d88b11ed985159.js +1 -0
- package/assets/esri/core/workers/chunks/{399e23d777a043efa9f1.js → dd95f50dac3f33cdb6d2.js} +1 -1
- package/assets/esri/core/workers/chunks/ddb92c815d17c67a45e6.js +1 -0
- package/assets/esri/core/workers/chunks/{7c2784ebbe17d79f669c.js → de50a19944617cd426b8.js} +1 -1
- package/assets/esri/core/workers/chunks/{52efa4ded11c1e71f04f.js → e2e2162adbfb9b46bede.js} +1 -1
- package/assets/esri/core/workers/chunks/e4353f0792f45aa6a62f.js +1 -0
- package/assets/esri/core/workers/chunks/eac8cae89da9ce2f4946.js +1 -0
- package/assets/esri/core/workers/chunks/edf87407dd20685c82ab.js +1 -0
- package/assets/esri/core/workers/chunks/ee7c8a7f384ea6393487.js +705 -0
- package/assets/esri/core/workers/chunks/f1299b4fc760ccca1518.js +1 -0
- package/assets/esri/core/workers/chunks/f244632f7934a4b72c91.js +1 -0
- package/assets/esri/core/workers/chunks/fc639c730115e07a4a1a.js +1 -0
- package/assets/esri/libs/basisu/basis_encoder.wasm +0 -0
- package/assets/esri/libs/basisu/basis_transcoder.wasm +0 -0
- package/assets/esri/libs/dxtEncoder/dxt_encoder.wasm +0 -0
- package/chunks/Component.glsl.js +104 -67
- package/chunks/DefaultMaterial.glsl.js +1 -1
- package/chunks/LineMarker.glsl.js +31 -31
- package/chunks/RibbonLine.glsl.js +60 -49
- package/chunks/basis_encoder.js +1 -1
- package/chunks/basis_transcoder.js +1 -1
- package/chunks/dxt_encoder.js +1 -1
- package/chunks/vec3.js +1 -1
- package/config.js +1 -1
- package/core/has.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/core/promiseUtils.js +1 -1
- package/core/workers/workerFactory.js +1 -1
- package/geometry/Mesh.d.ts +4 -4
- package/geometry/support/MeshMaterialMetallicRoughness.d.ts +13 -1
- package/geometry/support/MeshMaterialMetallicRoughness.js +1 -1
- package/geometry/support/aaBoundingBox.js +1 -1
- package/geometry/support/buffer/math/vec3.js +1 -1
- package/geometry/support/frustum.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
- package/geometry/support/meshUtils/extent.js +1 -1
- package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
- package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
- package/geometry/support/meshUtils.d.ts +33 -5
- package/geometry/support/plane.js +1 -1
- package/kernel.js +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/raster/formats/ImageCanvasDecoder.js +1 -1
- package/layers/raster/formats/JpgPlus.js +1 -1
- package/layers/raster/formats/RasterCodec.js +1 -1
- package/layers/raster/formats/TiffDecoder.js +1 -1
- package/layers/raster/formats/Zlib.js +2 -0
- package/package.json +2 -2
- package/rest/featureService/FeatureService.d.ts +74 -1
- package/rest/featureService/FeatureService.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/ObjectSymbol3DLayer.d.ts +10 -8
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/TextRasterizer.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/richTextUtils.js +2 -0
- package/symbols/support/ObjectSymbol3DLayerResource.d.ts +9 -4
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementAreaVisualization.js +1 -1
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
- package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementTool.js +1 -1
- package/views/2d/engine/webgl/TextureManager.js +1 -1
- package/views/2d/engine/webgl/definitions.js +1 -1
- package/views/2d/engine/webgl/mesh/MultiTileMeshData.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/engine/webgl/util/DimensionMatcher.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
- package/views/2d/layers/features/processor/AggregateStrategy.js +2 -0
- package/views/2d/layers/features/processor/bins/BinAdapter.js +2 -0
- package/views/2d/layers/features/processor/bins/BinLevelState.js +2 -0
- package/views/2d/layers/features/processor/bins/BinState.js +2 -0
- package/views/2d/layers/features/processor/bins/createBinningStrategy.js +2 -0
- package/views/2d/layers/features/processor/clusters/ClusterAdapter.js +2 -0
- package/views/2d/layers/features/processor/clusters/ClusterLevelState.js +2 -0
- package/views/2d/layers/features/processor/clusters/ClusterSendState.js +2 -0
- package/views/2d/layers/features/processor/clusters/createClusterStrategy.js +2 -0
- package/views/2d/layers/features/processor/createAggregateStrategy.js +2 -0
- package/views/2d/layers/features/processor/tracks/Track.js +2 -0
- package/views/2d/layers/features/processor/tracks/TrackAdapter.js +2 -0
- package/views/2d/layers/features/processor/tracks/TrackLevelState.js +2 -0
- package/views/2d/layers/features/processor/tracks/TrackSendState.js +2 -0
- package/views/2d/layers/features/processor/tracks/createTrackStrategy.js +2 -0
- package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderIndirect.js +1 -1
- package/views/2d/layers/support/annodime/DimensionInfo.js +1 -1
- package/views/2d/layers/support/annodime/dimensionUtils.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedConfiguration.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/focusAreaUtils.js +1 -1
- package/views/3d/glTF/LoaderResult.js +1 -1
- package/views/3d/glTF/internal/Resource.js +1 -1
- package/views/3d/glTF/loader.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/graphics/wosrLoader.js +1 -1
- package/views/3d/layers/i3s/meshUtils.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/webgl/RenderCamera.js +1 -1
- package/views/3d/webgl/RenderNode.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +36 -25
- package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js +19 -20
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +17 -10
- package/views/3d/webgl-engine/lib/BoundingInfo.js +1 -1
- package/views/3d/webgl-engine/lib/Intersector.js +1 -1
- package/views/3d/webgl-engine/lib/NavigationDepthCache.js +1 -1
- package/views/3d/webgl-engine/lib/NavigationDepthCacheStore.js +2 -0
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/PolygonIntersections2D.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/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodLevel.js +1 -1
- package/views/3d/webgl-engine/lib/screenPolygonOverlapUtils.js +1 -1
- package/views/3d/webgl-engine/lib/screenPolygonTriangleIntersections.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +8 -5
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineLayouts.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTextureBuffer.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
- package/views/PopupView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/interactive/snapping/RightAngleTriangleSnapper.js +1 -1
- package/views/interactive/snapping/SnappingAlgorithm.js +1 -1
- package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/views/selection/SelectionOperation.js +1 -1
- package/views/support/AnalysisViewManager.js +1 -1
- package/views/support/DefaultsFromMap.js +1 -1
- package/views/support/LayerViewManager.js +1 -1
- package/views/support/TextureCompressionWorker.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/services/SuperimposeService.js +1 -1
- package/widgets/OrientedImageryViewer/support/superimposeUtils.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicTileNode.d.ts +63 -0
- package/widgets/PanoramicViewer/support/PanoramicTileNode.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicTilePyramid.d.ts +66 -0
- package/widgets/PanoramicViewer/support/PanoramicTilePyramid.js +1 -1
- package/widgets/PanoramicViewer/utils.js +1 -1
- package/widgets/Sketch/VisibleElements.d.ts +0 -10
- package/widgets/Sketch.js +1 -1
- package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
- package/widgets/support/SelectionToolbar.js +1 -1
- package/widgets/support/Selector3D/selectorUtils.js +2 -0
- package/assets/esri/core/workers/chunks/0115681a3de6df0aebdf.js +0 -1
- package/assets/esri/core/workers/chunks/025caafc70ac26f0a4ed.js +0 -1
- package/assets/esri/core/workers/chunks/08e18fb12533fc76e49c.js +0 -1
- package/assets/esri/core/workers/chunks/0e64e20fedfe01a1985f.js +0 -1
- package/assets/esri/core/workers/chunks/0f674c625f24ac73e25a.js +0 -1
- package/assets/esri/core/workers/chunks/15351354afcbf840a23d.js +0 -29
- package/assets/esri/core/workers/chunks/176c5eaaa23a479c88e0.js +0 -1
- package/assets/esri/core/workers/chunks/1d1f5578c7d8619f7a46.js +0 -1
- package/assets/esri/core/workers/chunks/1f118d85d8271ad7690b.js +0 -1
- package/assets/esri/core/workers/chunks/2015f4def2ef201bdab8.js +0 -1
- package/assets/esri/core/workers/chunks/268637fd6c50264acfc3.js +0 -1
- package/assets/esri/core/workers/chunks/272c8ab189217240d05f.js +0 -1
- package/assets/esri/core/workers/chunks/296fa9fb80e521c30cb1.js +0 -1
- package/assets/esri/core/workers/chunks/354199a41de44902de84.js +0 -1
- package/assets/esri/core/workers/chunks/384b619854ef8a3f6e94.js +0 -1
- package/assets/esri/core/workers/chunks/3af923abeb6e65c4468f.js +0 -1
- package/assets/esri/core/workers/chunks/46d3ddf62fa7a76dd57d.js +0 -1
- package/assets/esri/core/workers/chunks/4b24f72b56edc28bb15e.js +0 -1
- package/assets/esri/core/workers/chunks/4f09f208ece2ec1db727.js +0 -1
- package/assets/esri/core/workers/chunks/57374213084bef59b776.js +0 -1
- package/assets/esri/core/workers/chunks/5f9c4dad6952c4c58ebf.js +0 -1
- package/assets/esri/core/workers/chunks/706230b70a36d2e038f7.js +0 -1
- package/assets/esri/core/workers/chunks/7cc729b57a6a52c8ac68.js +0 -1
- package/assets/esri/core/workers/chunks/8026cc0065f6520c4161.js +0 -1
- package/assets/esri/core/workers/chunks/804ab5f614efa12a131b.js +0 -1
- package/assets/esri/core/workers/chunks/81d55594cee124040565.js +0 -1
- package/assets/esri/core/workers/chunks/8d21f3d6edbcd7b335d0.js +0 -1
- package/assets/esri/core/workers/chunks/8d90bef1091204fba0f1.js +0 -1
- package/assets/esri/core/workers/chunks/8ec5e470583b75fceae1.js +0 -1
- package/assets/esri/core/workers/chunks/9114a575b78a7ea18d0f.js +0 -1
- package/assets/esri/core/workers/chunks/93e705c1147cc8ceca02.js +0 -1
- package/assets/esri/core/workers/chunks/9a97f6cda2f36941efae.js +0 -1
- package/assets/esri/core/workers/chunks/9ceeae787dc7c194d60e.js +0 -1
- package/assets/esri/core/workers/chunks/a8033e606b2db1ee332d.js +0 -1
- package/assets/esri/core/workers/chunks/a90f7b1c6c69b6033b4c.js +0 -1
- package/assets/esri/core/workers/chunks/a9c641bcdef161c754bf.js +0 -1
- package/assets/esri/core/workers/chunks/ad5c2b0de6713d0a93a4.js +0 -680
- package/assets/esri/core/workers/chunks/ae50b2d5e63f62c088d2.js +0 -1
- package/assets/esri/core/workers/chunks/aea247138617e12b699b.js +0 -1
- package/assets/esri/core/workers/chunks/b03dcf3d55266745f3d1.js +0 -1
- package/assets/esri/core/workers/chunks/b32bdf5730953c2fb16b.js +0 -1
- package/assets/esri/core/workers/chunks/bf287f0e2ecb4532dc00.js +0 -1
- package/assets/esri/core/workers/chunks/c01a121ebe571a848452.js +0 -1
- package/assets/esri/core/workers/chunks/c3cd38ca8690286d40d7.js +0 -1
- package/assets/esri/core/workers/chunks/c4b13124a9cfc78c42a6.js +0 -261
- package/assets/esri/core/workers/chunks/c5e36544b2d1792e4c5f.js +0 -1
- package/assets/esri/core/workers/chunks/c6042825f61cd70d54d8.js +0 -1
- package/assets/esri/core/workers/chunks/cba3316910ff088f4d77.js +0 -1
- package/assets/esri/core/workers/chunks/d8b67ca02cdc1e8191e3.js +0 -1
- package/assets/esri/core/workers/chunks/dadefe369f49e89a2610.js +0 -1
- package/assets/esri/core/workers/chunks/db416ba3132034e20642.js +0 -1
- package/assets/esri/core/workers/chunks/de9573871f64c01e9f01.js +0 -1
- package/assets/esri/core/workers/chunks/dfbdc72c7ea137e3841d.js +0 -1
- package/assets/esri/core/workers/chunks/e3e966777f18164afcd8.js +0 -1
- package/assets/esri/core/workers/chunks/e9c48630757bea465b7e.js +0 -1
- package/assets/esri/core/workers/chunks/f2c8122d31aedc2604ee.js +0 -1
- package/assets/esri/core/workers/chunks/f8f0de841be17cd05c8f.js +0 -1
- package/assets/esri/core/workers/chunks/ff089723a27859fe18d1.js +0 -1
- package/chunks/Zlib.js +0 -2
- package/views/2d/layers/features/processor/AAggregateStrategy.js +0 -2
- package/views/2d/layers/features/processor/BinningStrategy.js +0 -2
- package/views/2d/layers/features/processor/ClusterStrategy.js +0 -2
- package/views/2d/layers/features/processor/TrackStrategy.js +0 -2
- package/views/3d/analysis/Viewshed/ViewshedTool2.js +0 -2
- /package/assets/esri/core/workers/chunks/{744f34e379484e63277c.js.LICENSE.txt → cdb331b58e22f8c1c988.js.LICENSE.txt} +0 -0
package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{isColorHighlightOrOLID as t}from"../../../core/shaderLibrary/ShaderOutput.js";import{parameter as o}from"../../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{SphereDepthInterpolateConfiguration as i}from"../../../shaders/SphereDepthInterpolate.glsl.js";class s extends i{constructor(e){super(),this.output=0,this.textureCoordinateType=0,this.componentDataType=0,this.cullFace=2,this.vertexDiscardMode=0,this.doubleSidedMode=2,this.alphaDiscardMode=1,this.integratedMeshMode=0,this.pbrMode=0,this.normalType=0,this.emissionSource=0,this.shadeNormals=1,this.polygonOffset=0,this.vertexPositionRotationType=1,this.hasEmission=!1,this.hasVertexColors=!1,this.hasSlicePlane=!1,this.isGroundSlice=!1,this.hasColorTexture=!1,this.hasHighlightMixTexture=!1,this.emissionDimmingPass=!1,this.receiveAmbientOcclusion=!0,this.receiveGlobalIllumination=!1,this.receiveShadows=!0,this.hasShadowHighlights=!1,this.transparent=!0,this.screenSpaceReflections=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.hasNormalTextureTransform=!1,this.cloudReflections=!0,this.snowCover=!1,this.renderOccluded=!1,this.enableOITOffset=!1,this.sphereDepthInterpolate=!1,this.writeDepth=!0,this.oitPremultipliedAlpha=!1,this.occlusionPass=!1,this.bindType=2,this.useCustomDTRExponentForWater=!1,this.hasVertexTangents=!1,this.hasSliceTranslatedView=!1,this.rayMarchMaxReach=1,this.rayMarchMaxSteps=75,this.useProjectedRayLength=!1,this.clampRayToScreen=!0,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.useFillLights=!0,this.draped=!1,this.useTransformationTexture=!0,this.sphericalSR=e.sphericalSR,this.useFloatBlend=e.useFloatBlend}get spherical(){return 0!==this.sphericalSR}get overlayEnabled(){return(2===this.integratedMeshMode||3===this.integratedMeshMode)&&t(this.output)}get hasWater(){return 3===this.pbrMode||4===this.pbrMode||6===this.pbrMode}}e([o()],s.prototype,"useFloatBlend",void 0),e([o({count:12})],s.prototype,"output",void 0),e([o({count:3})],s.prototype,"textureCoordinateType",void 0),e([o({count:2})],s.prototype,"componentDataType",void 0),e([o({count:3})],s.prototype,"cullFace",void 0),e([o({count:3})],s.prototype,"vertexDiscardMode",void 0),e([o({count:3})],s.prototype,"doubleSidedMode",void 0),e([o({count:4})],s.prototype,"alphaDiscardMode",void 0),e([o({count:4})],s.prototype,"integratedMeshMode",void 0),e([o({count:
|
|
2
|
+
import{__decorate as e}from"tslib";import{isColorHighlightOrOLID as t}from"../../../core/shaderLibrary/ShaderOutput.js";import{parameter as o}from"../../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{SphereDepthInterpolateConfiguration as i}from"../../../shaders/SphereDepthInterpolate.glsl.js";class s extends i{constructor(e){super(),this.output=0,this.textureCoordinateType=0,this.componentDataType=0,this.cullFace=2,this.vertexDiscardMode=0,this.doubleSidedMode=2,this.alphaDiscardMode=1,this.integratedMeshMode=0,this.pbrMode=0,this.normalType=0,this.emissionSource=0,this.shadeNormals=1,this.polygonOffset=0,this.vertexPositionRotationType=1,this.hasEmission=!1,this.hasVertexColors=!1,this.hasSlicePlane=!1,this.isGroundSlice=!1,this.hasColorTexture=!1,this.hasHighlightMixTexture=!1,this.emissionDimmingPass=!1,this.receiveAmbientOcclusion=!0,this.receiveGlobalIllumination=!1,this.receiveShadows=!0,this.hasShadowHighlights=!1,this.transparent=!0,this.screenSpaceReflections=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.hasNormalTextureTransform=!1,this.cloudReflections=!0,this.snowCover=!1,this.renderOccluded=!1,this.enableOITOffset=!1,this.sphereDepthInterpolate=!1,this.writeDepth=!0,this.oitPremultipliedAlpha=!1,this.occlusionPass=!1,this.bindType=2,this.useCustomDTRExponentForWater=!1,this.hasVertexTangents=!1,this.hasSliceTranslatedView=!1,this.rayMarchMaxReach=1,this.rayMarchMaxSteps=75,this.useProjectedRayLength=!1,this.clampRayToScreen=!0,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.useFillLights=!0,this.draped=!1,this.useTransformationTexture=!0,this.sphericalSR=e.sphericalSR,this.useFloatBlend=e.useFloatBlend}get spherical(){return 0!==this.sphericalSR}get overlayEnabled(){return(2===this.integratedMeshMode||3===this.integratedMeshMode)&&t(this.output)}get hasWater(){return 3===this.pbrMode||4===this.pbrMode||6===this.pbrMode}}e([o()],s.prototype,"useFloatBlend",void 0),e([o({count:12})],s.prototype,"output",void 0),e([o({count:3})],s.prototype,"textureCoordinateType",void 0),e([o({count:2})],s.prototype,"componentDataType",void 0),e([o({count:3})],s.prototype,"cullFace",void 0),e([o({count:3})],s.prototype,"vertexDiscardMode",void 0),e([o({count:3})],s.prototype,"doubleSidedMode",void 0),e([o({count:4})],s.prototype,"alphaDiscardMode",void 0),e([o({count:4})],s.prototype,"integratedMeshMode",void 0),e([o({count:8})],s.prototype,"pbrMode",void 0),e([o({count:3})],s.prototype,"normalType",void 0),e([o({count:8})],s.prototype,"emissionSource",void 0),e([o({count:3})],s.prototype,"shadeNormals",void 0),e([o({count:5})],s.prototype,"polygonOffset",void 0),e([o({count:3})],s.prototype,"vertexPositionRotationType",void 0),e([o()],s.prototype,"hasEmission",void 0),e([o()],s.prototype,"hasVertexColors",void 0),e([o()],s.prototype,"hasSlicePlane",void 0),e([o()],s.prototype,"isGroundSlice",void 0),e([o()],s.prototype,"hasColorTexture",void 0),e([o()],s.prototype,"hasHighlightMixTexture",void 0),e([o()],s.prototype,"emissionDimmingPass",void 0),e([o()],s.prototype,"receiveAmbientOcclusion",void 0),e([o()],s.prototype,"receiveGlobalIllumination",void 0),e([o()],s.prototype,"receiveShadows",void 0),e([o()],s.prototype,"hasShadowHighlights",void 0),e([o()],s.prototype,"transparent",void 0),e([o()],s.prototype,"screenSpaceReflections",void 0),e([o()],s.prototype,"hasMetallicRoughnessTexture",void 0),e([o()],s.prototype,"hasOcclusionTexture",void 0),e([o()],s.prototype,"hasNormalTexture",void 0),e([o()],s.prototype,"hasOccludees",void 0),e([o()],s.prototype,"terrainDepthTest",void 0),e([o()],s.prototype,"cullAboveTerrain",void 0),e([o()],s.prototype,"hasNormalTextureTransform",void 0),e([o()],s.prototype,"cloudReflections",void 0),e([o()],s.prototype,"snowCover",void 0),e([o()],s.prototype,"renderOccluded",void 0),e([o()],s.prototype,"enableOITOffset",void 0),e([o()],s.prototype,"sphereDepthInterpolate",void 0);export{s as ComponentTechniqueConfiguration};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{generateUID as e}from"../../../../../core/uid.js";import{
|
|
2
|
+
import{generateUID as e}from"../../../../../core/uid.js";import{TextureBufferNaNSupportConfiguration as t,unpackFloat1x32 as r,unpackHalf as n,unpackInt1x16 as a,glslType as s,glslDecodeField as i}from"./TextureBackedBufferFields.glsl.js";import{glsl as d}from"../shaderModules/glsl.js";import{assert as o}from"../../lib/Util.js";import{Code as u}from"../../../../webgl/ShaderBuilder.js";const c=new t(!0),h=new t(!1);class l{constructor(e,t){this._shader=e,this._namespace=t,this._used=new Map}getItemSuffix(e){if(0===e)return"";return`${e<0?"Minus":"Plus"}${Math.abs(e)}`}getItemDataName(e=0){return`${this._namespace}ItemData${this.getItemSuffix(e)}`}getStructName(e=0){return`${this._namespace}TextureBackedBufferItemData${this.getItemSuffix(e)}`}getFetchName(e=0){return`${this._namespace}fetchTextureBackedBufferItemData${this.getItemSuffix(e)}`}getStrideName(){return`${this._namespace}tbbStride`}getTextureAttribute(e,t=0){const r=this._used,n=this.getItemDataName(t);let a=r.get(t);return null==a&&(a=new Set,r.set(t,a)),a.add(e),d`${n}.${e}`}generateVertexCode(e){const{_shader:t,_used:r}=this,n=new u(t.vertex);for(const a of r.keys())this._generateFetchFunction(a,n,e);return n.generateSource()}generateVertexMainCode(e){const{_shader:t,_used:r}=this,n=new u(t.vertex);for(const a of r.keys())this._generateFetchFunctionCall(a,n,e);return n.generateSource()}_generateFetchFunctionCall(e,t,r){const{itemIndexExpression:n}=r,a=this._used.get(e);if(null==a||0===a.size)return;const s=this.getItemDataName(e),i=this.getFetchName(e);t.add(d`${s} = ${i}(${n});`)}_getIndexOffset(e=0){if(0===e)return d``;return d`${e<0?"-":"+"}${d.uint(Math.abs(e))}`}_generateFetchFunction(e,t,r){const{bufferUniform:n,layout:a}=r,{texelFormatInfo:o}=a,u=this._used.get(e);if(null==u||0===u.size)return;const c=this.getStrideName(),h=this.getStructName(e),l=this.getItemDataName(e),m=this.getFetchName(e),x=this._getIndexOffset(e),$=new Array;for(const s of a.fields.values())u.has(s.name)&&$.push(s);if(0===$.length)return;const _=[];for(let s=0;s<a.texelStride;++s)_.push(!1);for(const s of $)for(let e=0;e<s.numTexels;++e)_[s.startTexel+e]=!0;t.add(d`
|
|
3
3
|
struct ${h} {`);for(const i of $)t.add(d`\t${s(i)} ${i.name};`);t.add(d`};`),t.add(d`\n${h} ${m}( highp uint baseIndex ) {
|
|
4
4
|
${h} itemData;
|
|
5
5
|
highp uint index = (baseIndex${x}) * ${c};
|
|
6
6
|
highp uint rowWidth = uint(textureSize(${n.name}, 0).x);
|
|
7
7
|
int coordX = int(index % rowWidth);
|
|
8
|
-
int coordY = int(index / rowWidth);\n`);const p=f[o.channels],I=g[o.channels];for(let s=0;s<_.length;++s)!1!==_[s]&&t.add(d`highp ${p} texel${d.int(s)} = texelFetch(${n.name}, ivec2(coordX + ${d.int(s)}, coordY), 0)${I};`);for(const s of $)t.add(d`itemData.${s.name} = ${i(s,o)};`);t.add(d`return itemData;\n}`),t.add(d`${h} ${l};`)}}class m{constructor(t){this._parameters=t,this.moduleId=e(),this.namespace=`_tbb_${this.moduleId}_`}createBuilder(e,t){let r=null;const n=e=>{r=this._buildTextureBackedBufferShaderCode(e)};return t?e.include(n,t):e.include(n),o(null!=r,"Valid builder expected."),r}_buildTextureBackedBufferShaderCode(e){const{namespace:
|
|
8
|
+
int coordY = int(index / rowWidth);\n`);const p=f[o.channels],I=g[o.channels];for(let s=0;s<_.length;++s)!1!==_[s]&&t.add(d`highp ${p} texel${d.int(s)} = texelFetch(${n.name}, ivec2(coordX + ${d.int(s)}, coordY), 0)${I};`);for(const s of $)t.add(d`itemData.${s.name} = ${i(s,o)};`);t.add(d`return itemData;\n}`),t.add(d`${h} ${l};`)}}class m{constructor(t){this._parameters=t,this.moduleId=e(),this.namespace=`_tbb_${this.moduleId}_`}createBuilder(e,t){let r=null;const n=e=>{r=this._buildTextureBackedBufferShaderCode(e)};return t?e.include(n,t):e.include(n),o(null!=r,"Valid builder expected."),r}_buildTextureBackedBufferShaderCode(e){const{namespace:t,_parameters:s}=this,{bufferUniform:i,layout:d}=s,u=s.enableNaNSupport?c:h,{vertex:m}=e,f=new l(e,t);m.include(r,u),m.include(n,u),m.include(a);const g=f.getStrideName(),x=f.getStructName(),$=f.getFetchName(),_=f.getItemDataName();for(const r of[g,x,$,_])o(r.length<1024,"Identifiers do not have a valid length");return m.constants.add(g,"uint",d.texelStride),m.uniforms.add(i),m.code.add(()=>f.generateVertexCode(s)),m.main.add(()=>f.generateVertexMainCode(s)),f}}const f={1:d`uint`,2:d`uvec2`,4:d`uvec4`},g={1:d`.x`,2:d`.xy`,4:""};export{m as TextureBackedBufferModule};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import{maxUint8 as n}from"../../../../../core/typedArrayUtil.js";import{hasNativeFloat16Array as e}from"../../../../../geometry/support/float16.js";import{FloatBindUniform as o}from"../shaderModules/FloatBindUniform.js";import{glsl as i,If as u}from"../shaderModules/glsl.js";import{
|
|
2
|
+
import{__decorate as t}from"tslib";import{maxUint8 as n}from"../../../../../core/typedArrayUtil.js";import{hasNativeFloat16Array as e}from"../../../../../geometry/support/float16.js";import{FloatBindUniform as o}from"../shaderModules/FloatBindUniform.js";import{glsl as i,If as u}from"../shaderModules/glsl.js";import{parameter as a,ShaderTechniqueConfiguration as r}from"../shaderTechnique/ShaderTechniqueConfiguration.js";function s(t){switch(t.elementType){case"float":switch(t.elementCount){case 1:return i`float`;case 2:return i`vec2`;case 3:return i`vec3`;case 4:return i`vec4`;case 9:return i`mat3`;default:t.elementCount}break;case"int":switch(t.elementCount){case 1:return i`int`;case 2:return i`ivec2`;case 3:return i`ivec3`;case 4:return i`ivec4`;case 9:throw new Error("Invalid element count 9 for type int");default:t.elementCount}break;case"uint":switch(t.elementCount){case 1:return i`uint`;case 2:return i`uvec2`;case 3:return i`uvec3`;case 4:return i`uvec4`;case 9:throw new Error("Invalid element count 9 for type uint");default:t.elementCount}break;default:t.elementType}throw new Error("unsupported field")}const c=new o("constNaN",()=>NaN,{supportsNaN:!0});class p extends r{constructor(t){super(),this.supportNaN=t}}function f(t,n){const e=n?.supportNaN;e&&(t.uniforms.add(c),t.code.add(i`bool bitsEncodeFloat16NaN(highp uint bits) {
|
|
3
3
|
const highp uint nanExponent = 0x00007c00u;
|
|
4
4
|
highp uint exponent = bits & nanExponent;
|
|
5
5
|
highp uint mantissa = bits & 0x000003ffu;
|
|
@@ -38,4 +38,4 @@ return exponent == nanExponent && mantissa != 0u;
|
|
|
38
38
|
}`)}function d(t){t.code.add(i`mediump int unpackInt1x16(highp uint bits) {
|
|
39
39
|
highp uint signExtendedBits = (bits & 0x8000u) != 0u ? (bits | 0xffff0000u) : bits;
|
|
40
40
|
return int(signExtendedBits);
|
|
41
|
-
}`)}function h(t,n){const{fieldType:e}=t;return`${(0,g[e])(y(t,n))}`}function m(t,n){const e=[];for(const o of t){const t=i`unpackFloat1x32(${o})`;e.push(t)}return e.join(n)}t([
|
|
41
|
+
}`)}function h(t,n){const{fieldType:e}=t;return`${(0,g[e])(y(t,n))}`}function m(t,n){const e=[];for(const o of t){const t=i`unpackFloat1x32(${o})`;e.push(t)}return e.join(n)}t([a()],p.prototype,"supportNaN",void 0);const x=t=>i`${t[0]}`,N=t=>{const n=t[0],e=i`uvec4(${i.uint(k[0])}, ${i.uint(k[1])}, ${i.uint(k[2])}, ${i.uint(k[3])})`,o=i`uvec4(${i.hexuint(w[1])})`;return i`((uvec4(${n}) >> ${e}) & ${o})`},$=t=>i`(float(${x(t)})/${i.float(n)})`,b=t=>i`unpackFloat1x32(${t[0]})`,v=t=>i`vec4(${m(t,", ")})`,g={u8:x,unorm8:$,vec4unorm8:t=>i`(vec4(${N(t)})/${i.float(n)})`,snorm16:t=>i`unpackSnorm2x16(${t[0]}).x`,vec2snorm16:t=>i`unpackSnorm2x16(${t[0]})`,f16:e?t=>i`unpackHalf1x16(${t[0]})`:b,vec4f16:e?t=>i`vec4(unpackHalf2x16NaNSupport(${t[0]}), unpackHalf2x16NaNSupport(${t[1]}))`:v,f32:b,vec4u8:N,vec2f32:t=>i`vec2(${m(t,", ")})`,vec3f32:t=>i`vec3(${m(t,", ")})`,vec4f32:v,mat3f32:t=>i`mat3(${m(t,",\n")})`};function y(t,n){const{byteOffset:e,byteSize:o}=t,u=n.channelByteStride,a=n.byteStride,r=Math.ceil(o/E),s=F[n.channels],c=new Array;for(let p=0;p<r;++p){const t=p*E,n=e+t,r=o-t,f=Math.min(r,E);let l=0;const d=new Array;for(;l<f;){const t=n+l,e=Math.floor(t/a),o=t%a,r=Math.floor(o/u),c=o%u,p=u-c,h=f-l,m=Math.min(p,h),x=i`texel${i.int(e)}${s[r]}`,N=4===m?"":i` & ${i.hexuint(w[m])}`,$=0===c?"":i` >> ${i.uint(k[c])}`,b=i`((${x}${$})${N})`,v=0===l?"":i` << ${i.uint(k[l])}`,g=i`(${b})${v}`;d.push(g),l+=m}c.push(i`(${d.join(" | ")})`)}return c}const E=4,k=[0,8,16,24],w=[0,255,65535,16777215,4294967295],F={1:[i``],2:[i`.x`,i`.y`],4:[i`.x`,i`.y`,i`.z`,i`.w`]};export{p as TextureBufferNaNSupportConfiguration,h as glslDecodeField,s as glslType,l as unpackFloat1x32,f as unpackHalf,d as unpackInt1x16};
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{invert as e,translate as i}from"../../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as a}from"../../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{VisualVariables as t}from"../shading/VisualVariables.glsl.js";import{ScreenSizePerspective as r,addScreenSizePerspective as o}from"../util/ScreenSizePerspective.glsl.js";import{addCameraPosition as
|
|
2
|
+
import{invert as e,translate as i}from"../../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as a}from"../../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{VisualVariables as t}from"../shading/VisualVariables.glsl.js";import{ScreenSizePerspective as r,addScreenSizePerspective as o}from"../util/ScreenSizePerspective.glsl.js";import{addCameraPosition as l}from"../util/View.glsl.js";import{Float3PassUniform as s}from"../../shaderModules/Float3PassUniform.js";import{FloatPassUniform as c}from"../../shaderModules/FloatPassUniform.js";import{FloatsPassUniform as v}from"../../shaderModules/FloatsPassUniform.js";import{glsl as n,If as p}from"../../shaderModules/glsl.js";import{Matrix4DrawUniform as u}from"../../shaderModules/Matrix4DrawUniform.js";const d=8;function f(a,f){const{vertex:m}=a;m.uniforms.add(new c("intrinsicWidth",e=>e.width));const{hasScreenSizePerspective:S,spherical:y}=f;S?(a.include(r,f),o(m),l(m,f),m.uniforms.add(new u("inverseViewMatrix",(a,t)=>e(z,i(z,t.camera.viewMatrix,a.origin)))),m.code.add(n`
|
|
3
3
|
float applyLineSizeScreenSizePerspective(float size, vec3 pos) {
|
|
4
4
|
vec3 worldPos = (inverseViewMatrix * vec4(pos, 1)).xyz;
|
|
5
|
-
vec3 groundUp = ${
|
|
5
|
+
vec3 groundUp = ${y?n`normalize(worldPos + localOrigin)`:n`vec3(0.0, 0.0, 1.0)`};
|
|
6
6
|
float absCosAngle = abs(dot(groundUp, normalize(worldPos - cameraPosition)));
|
|
7
7
|
|
|
8
8
|
return screenSizePerspectiveScaleFloat(size, absCosAngle, length(pos), screenSizePerspective);
|
|
9
9
|
}
|
|
10
|
-
`)):
|
|
10
|
+
`)):m.code.add(n`float applyLineSizeScreenSizePerspective(float size, vec3 pos) {
|
|
11
11
|
return size;
|
|
12
|
-
}`),f.hasVVSize?(m.
|
|
13
|
-
float getSize(${p(
|
|
14
|
-
float
|
|
12
|
+
}`),f.hasVVSize?(m.uniforms.add(new s("vvSizeMinSize",e=>e.vvSize.minSize),new s("vvSizeMaxSize",e=>e.vvSize.maxSize),new s("vvSizeOffset",e=>e.vvSize.offset),new s("vvSizeFactor",e=>e.vvSize.factor),new s("vvSizeFallback",e=>e.vvSize.fallback)),m.code.add(n`
|
|
13
|
+
float getSize(${p(S,"vec3 pos")}) {
|
|
14
|
+
float value = ${m.inputs.get("sizeFeatureAttribute")};
|
|
15
|
+
float size = isnan(value)
|
|
15
16
|
? vvSizeFallback.x
|
|
16
|
-
: intrinsicWidth * clamp(vvSizeOffset +
|
|
17
|
+
: intrinsicWidth * clamp(vvSizeOffset + value * vvSizeFactor, vvSizeMinSize, vvSizeMaxSize).x;
|
|
17
18
|
|
|
18
|
-
return ${p(
|
|
19
|
+
return ${p(S,"applyLineSizeScreenSizePerspective(size, pos)","size")};
|
|
19
20
|
}
|
|
20
|
-
`)):
|
|
21
|
-
float getSize(${p(
|
|
22
|
-
float fullSize = intrinsicWidth * size;
|
|
23
|
-
return ${p(
|
|
21
|
+
`)):m.code.add(n`
|
|
22
|
+
float getSize(${p(S,"vec3 pos")}) {
|
|
23
|
+
float fullSize = intrinsicWidth * ${m.inputs.get("size")};
|
|
24
|
+
return ${p(S,"applyLineSizeScreenSizePerspective(fullSize, pos)","fullSize")};
|
|
24
25
|
}
|
|
25
|
-
`)
|
|
26
|
+
`),f.hasVVOpacity?(m.constants.add("vvOpacityNumber","int",8),m.uniforms.add(new v("vvOpacityValues",d,e=>e.vvOpacity.values),new v("vvOpacityOpacities",d,e=>e.vvOpacity.opacityValues),new c("vvOpacityFallback",e=>e.vvOpacity.fallback,{supportsNaN:!0})),m.code.add(n`
|
|
26
27
|
float interpolateOpacity(float value) {
|
|
27
28
|
if (value <= vvOpacityValues[0]) {
|
|
28
29
|
return vvOpacityOpacities[0];
|
|
@@ -39,21 +40,31 @@ return size;
|
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
vec4 applyOpacity(vec4 color) {
|
|
42
|
-
|
|
43
|
+
float value = ${m.inputs.get("opacityFeatureAttribute")};
|
|
44
|
+
if (isnan(value)) {
|
|
43
45
|
// If there is a color vv then it will already have taken care of applying the fallback
|
|
44
46
|
return ${p(f.hasVVColor,"color","vec4(color.rgb, vvOpacityFallback)")};
|
|
45
47
|
}
|
|
46
48
|
|
|
47
|
-
return vec4(color.rgb, interpolateOpacity(
|
|
49
|
+
return vec4(color.rgb, interpolateOpacity(value));
|
|
48
50
|
}
|
|
49
|
-
`)):
|
|
51
|
+
`)):m.code.add(n`vec4 applyOpacity(vec4 color) {
|
|
50
52
|
return color;
|
|
51
|
-
}`),f.hasVVColor?(a.include(t,f),m.
|
|
52
|
-
vec4
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
return
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
}`),f.hasVVColor?(a.include(t,f),m.code.add(n`
|
|
54
|
+
vec4 getColor() {
|
|
55
|
+
vec4 color = interpolateVVColor(${m.inputs.get("colorFeatureAttribute")});
|
|
56
|
+
|
|
57
|
+
// if we encounter NaN in the color it means the color is in the fallback case where the symbol color
|
|
58
|
+
// is not defined and there is no valid color visual variable override. In this case just return a fully
|
|
59
|
+
// transparent color
|
|
60
|
+
if (isnan(color.r)) {
|
|
61
|
+
return vec4(0);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return applyOpacity(color);
|
|
65
|
+
}
|
|
66
|
+
`)):m.code.add(n`
|
|
67
|
+
vec4 getColor() {
|
|
68
|
+
return applyOpacity(${m.inputs.get("color")});
|
|
69
|
+
}
|
|
70
|
+
`)}const z=a();export{f as RibbonVertexPosition};
|
package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js
CHANGED
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{VertexTextureCoordinates as e}from"../attributes/VertexTextureCoordinates.glsl.js";import{Float3DrawUniform as o}from"../../shaderModules/Float3DrawUniform.js";import{Float3PassUniform as
|
|
3
|
-
float getBakedOcclusion() { return 1.0; }`);
|
|
2
|
+
import{VertexTextureCoordinates as e}from"../attributes/VertexTextureCoordinates.glsl.js";import{Float3DrawUniform as o}from"../../shaderModules/Float3DrawUniform.js";import{Float3PassUniform as s}from"../../shaderModules/Float3PassUniform.js";import{glsl as r,If as t}from"../../shaderModules/glsl.js";import{Texture2DDrawUniform as c}from"../../shaderModules/Texture2DDrawUniform.js";import{Texture2DPassUniform as a}from"../../shaderModules/Texture2DPassUniform.js";import{schematicMRRFactors as l}from"../../../materials/pbrUtils.js";import{NoParameters as u}from"../../../../../webgl/NoParameters.js";class i extends u{constructor(e,o){super(),this.textureOcclusion=e,this.textureMetallicRoughness=o,this.mrrFactors=l}}function n(l,u){const i=u.pbrMode,n=l.fragment;switch(i){case 5:case 3:case 4:case 6:return void n.code.add(r`void applyPBRFactors() {}`);case 0:case 7:return void n.code.add(r`void applyPBRFactors() {}
|
|
3
|
+
float getBakedOcclusion() { return 1.0; }`);case 2:return void n.code.add(r`vec3 mrr = vec3(0.0, 0.6, 0.2);
|
|
4
4
|
float occlusion = 1.0;
|
|
5
5
|
void applyPBRFactors() {}
|
|
6
|
-
float getBakedOcclusion() { return 1.0; }`);const{hasMetallicRoughnessTexture:
|
|
7
|
-
float occlusion;`),
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
float getBakedOcclusion() { return 1.0; }`);case 1:{const{hasMetallicRoughnessTexture:i,hasMetallicRoughnessTextureTransform:d,hasOcclusionTexture:m,hasOcclusionTextureTransform:p,bindType:h}=u;(i||m)&&l.include(e,u),n.code.add(r`vec3 mrr;
|
|
7
|
+
float occlusion;`),i&&n.uniforms.add(1===h?new a("texMetallicRoughness",e=>e.textureMetallicRoughness):new c("texMetallicRoughness",e=>e.textureMetallicRoughness)),m&&n.uniforms.add(1===h?new a("texOcclusion",e=>e.textureOcclusion):new c("texOcclusion",e=>e.textureOcclusion)),n.uniforms.add(1===h?new s("mrrFactors",e=>e.mrrFactors):new o("mrrFactors",e=>e.mrrFactors)),n.code.add(r`
|
|
8
|
+
${t(i,r`void applyMetallicRoughness(vec2 uv) {
|
|
9
|
+
vec3 metallicRoughness = textureLookup(texMetallicRoughness, uv).rgb;
|
|
10
|
+
mrr[0] *= metallicRoughness.b;
|
|
11
|
+
mrr[1] *= metallicRoughness.g;
|
|
12
|
+
}`)}
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
${t(m,"void applyOcclusion(vec2 uv) { occlusion *= textureLookup(texOcclusion, uv).r; }")}
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
float getBakedOcclusion() {
|
|
17
|
+
return ${m?"occlusion":"1.0"};
|
|
18
|
+
}
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
void applyPBRFactors() {
|
|
21
|
+
mrr = mrrFactors;
|
|
22
|
+
occlusion = 1.0;
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
`)}export{i as PBRRenderingParameters,n as PhysicallyBasedRenderingParameters};
|
|
24
|
+
${t(i,`applyMetallicRoughness(${d?"metallicRoughnessUV":"vuv0"});`)}
|
|
25
|
+
${t(m,`applyOcclusion(${p?"occlusionUV":"vuv0"});`)}
|
|
26
|
+
}`)}}}export{i as PBRRenderingParameters,n as PhysicallyBasedRenderingParameters};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{create as e}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{hasArea as o,width as r,height as t}from"../../../../../../geometry/support/aaBoundingRect.js";import{isColor as l}from"../ShaderOutput.js";import{addMainLightDirection as a,addMainLightIntensity as i}from"../shading/MainLighting.glsl.js";import{WaterColor as c}from"../shading/WaterColor.glsl.js";import{Float4DrawUniform as s}from"../../shaderModules/Float4DrawUniform.js";import{FloatPassUniform as
|
|
2
|
+
import{create as e}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{hasArea as o,width as r,height as t}from"../../../../../../geometry/support/aaBoundingRect.js";import{isColor as l}from"../ShaderOutput.js";import{addMainLightDirection as a,addMainLightIntensity as i}from"../shading/MainLighting.glsl.js";import{WaterColor as c}from"../shading/WaterColor.glsl.js";import{Float4DrawUniform as s}from"../../shaderModules/Float4DrawUniform.js";import{FloatPassUniform as v}from"../../shaderModules/FloatPassUniform.js";import{glsl as n}from"../../shaderModules/glsl.js";import{Texture2DPassUniform as d}from"../../shaderModules/Texture2DPassUniform.js";import{Texture2DUintPassUniform as u}from"../../shaderModules/Texture2DUintPassUniform.js";import{Uniform as x}from"../../../../../webgl/Uniform.js";function y(e,o){const{vertex:r,fragment:t}=e;r.uniforms.add(new s("overlayTexOffset",(e,r)=>h(o.spherical,e,r)),new s("overlayTexScale",(e,r)=>O(o.spherical,e,r))),t.uniforms.add(new s("overlayTexOffset",(e,r)=>h(o.spherical,e,r)),new s("overlayTexScale",(e,r)=>O(o.spherical,e,r))),t.constants.add("overlayOpacity","float",1),t.uniforms.add(new d("ovColorTex",(e,o)=>f(e,o))),p(e,o)}function f(e,o){return 0===e.identifier&&l(o.output)?e.occludedGround?o.overlay?.allSourcesOccluders?o.overlay?.getTexture(1):o.overlay?.getTexture(4):o.overlay?.getTexture(1):0===e.identifier&&11===o.output?o.overlay?.getTexture(5):2===e.identifier?o.overlay?.getTexture(2):null}function m(e,o){const{vertex:r,fragment:t}=e;r.uniforms.add(new V("overlayTexOffset"),new V("overlayTexScale")),t.uniforms.add(new v("overlayOpacity",e=>e.overlayOpacity)),10!==o.output&&t.uniforms.add(new d("ovColorTex",(e,o)=>o.overlay?.getTexture(e.overlayContent))),p(e,o)}function g(e,o){switch(e){case 0:case 1:case 2:return 9!==o.slot||o.overlay?.allSourcesOccluders?0:4;case 3:case 4:return 0;case 10:return 2;case 5:case 7:case 8:case 9:return null;case 11:return 5}return null}function p(e,o){const{hasWater:r,output:t}=o;r&&e.include(c,o);const{vertex:l,fragment:s,varyings:v}=e;v.add("vtcOverlay","vec4");const d=10===t;l.code.add(n`void setOverlayVTC(in vec2 uv) {
|
|
3
3
|
vtcOverlay = vec4(uv, uv) * overlayTexScale + overlayTexOffset;
|
|
4
|
-
}`),s.code.add(
|
|
4
|
+
}`),s.code.add(n`bool isValid(vec2 uv, vec2 dxdy) {
|
|
5
5
|
return (uv.x >= 0.0 + dxdy.x) && (uv.x <= 1.0 - dxdy.x) && (uv.y >= 0.0 + dxdy.y) && (uv.y <= 1.0 - dxdy.y);
|
|
6
6
|
}
|
|
7
7
|
vec4 getOverlayColor(sampler2D ov0Tex, vec4 texCoords) {
|
|
@@ -10,8 +10,7 @@ vec4 color1 = texture(ov0Tex, vec2(texCoords.z * 0.5 + 0.5, texCoords.w));
|
|
|
10
10
|
bool isValid0 = isValid(texCoords.xy, fwidth(texCoords.xy));
|
|
11
11
|
bool isValid1 = isValid(texCoords.zw, vec2(0.0, 0.0));
|
|
12
12
|
return mix(color1 * float(isValid1), color0, float(isValid0));
|
|
13
|
-
}`),d?s.uniforms.add(new u("overlayHighlightTexture",(e,o)=>o.overlay?.getTexture(2))).code.add(
|
|
14
|
-
vec4 texCoords = vtcOverlay;
|
|
13
|
+
}`),d?s.uniforms.add(new u("overlayHighlightTexture",(e,o)=>o.overlay?.getTexture(2))).code.add(n`uvec2 getAllOverlayHighlightValuesEncoded(vec4 texCoords) {
|
|
15
14
|
vec2 uvInner = texCoords.xy;
|
|
16
15
|
vec2 uvOuter = texCoords.zw;
|
|
17
16
|
bool isValidInner = isValid(uvInner, fwidth(uvInner));
|
|
@@ -25,20 +24,28 @@ return
|
|
|
25
24
|
isValidInner ? texelValueInner :
|
|
26
25
|
isValidOuter ? texelValueOuter :
|
|
27
26
|
uvec2(0);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
vec4 texCoords
|
|
27
|
+
}
|
|
28
|
+
uvec2 getAllOverlayHighlightValuesEncoded() {
|
|
29
|
+
return getAllOverlayHighlightValuesEncoded(vtcOverlay);
|
|
30
|
+
}`):(s.code.add(n`vec4 getCombinedOverlayColor(vec4 texCoords) {
|
|
31
|
+
return overlayOpacity * getOverlayColor(ovColorTex, texCoords);
|
|
32
|
+
}
|
|
33
|
+
vec4 getCombinedOverlayColor() {
|
|
34
|
+
return getCombinedOverlayColor(vtcOverlay);
|
|
35
|
+
}`),s.code.add(n`vec4 getOverlayColorTexel(vec4 texCoords) {
|
|
32
36
|
vec2 texDim = vec2(textureSize(ovColorTex, 0));
|
|
33
37
|
vec4 color0 = texelFetch(ovColorTex, ivec2(vec2(texCoords.x * 0.5, texCoords.y) * texDim), 0);
|
|
34
38
|
vec4 color1 = texelFetch(ovColorTex, ivec2(vec2(texCoords.z * 0.5 + 0.5, texCoords.w) * texDim), 0);
|
|
35
39
|
bool isValid0 = isValid(texCoords.xy, fwidth(texCoords.xy));
|
|
36
40
|
bool isValid1 = isValid(texCoords.zw, vec2(0.0, 0.0));
|
|
37
41
|
return mix(color1 * float(isValid1), color0, float(isValid0));
|
|
38
|
-
}
|
|
42
|
+
}
|
|
43
|
+
vec4 getOverlayColorTexel() {
|
|
44
|
+
return getOverlayColorTexel(vtcOverlay);
|
|
45
|
+
}`)),r&&(a(s),i(s),s.code.add(n`vec4 getOverlayWaterColor(vec4 maskInput, vec4 colorInput, vec3 vposEyeDir,
|
|
39
46
|
float shadow, vec3 localUp, mat3 tbn, vec3 position, vec3 positionWorld) {
|
|
40
47
|
vec3 n = normalize(tbn * (2.0 * maskInput.rgb - vec3(1.0)));
|
|
41
48
|
vec3 v = vposEyeDir;
|
|
42
49
|
vec3 final = getWaterColor(n, v, mainLightDirection, colorInput.rgb, mainLightIntensity, localUp, 1.0 - shadow, maskInput.w, position, positionWorld);
|
|
43
50
|
return vec4(final, colorInput.w);
|
|
44
|
-
}`))}function C(e,o){return e.overlay?.overlays[o]?.extent}function h(e,l,a){const i=T,c=e&&!l.useENUForGlobalOverlayUV,s=c?0:l.toMapSpace[0],
|
|
51
|
+
}`))}function C(e,o){return e.overlay?.overlays[o]?.extent}function h(e,l,a){const i=T,c=e&&!l.useENUForGlobalOverlayUV,s=c?0:l.toMapSpace[0],v=c?0:l.toMapSpace[1],n=(e,l)=>{const c=C(a,l);o(c)&&(i[e+0]=(s-c[0])/r(c),i[e+1]=(v-c[1])/t(c))};return n(0,0),n(2,1),i}function O(e,l,a){const i=T,c=e&&!l.useENUForGlobalOverlayUV,s=c?1:l.toMapSpace[2],v=c?1:l.toMapSpace[3],n=(e,l)=>{const c=C(a,l);o(c)&&(i[e+0]=s/r(c),i[e+1]=v/t(c))};return n(0,0),n(2,1),i}const T=e();class V extends x{constructor(e){super(e,"vec4")}}export{y as OverlayIM,m as OverlayTerrain,f as getIMColorTexture,g as getOverlayContentForOutputTerrain};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import t from"../../../../core/PooledArray.js";import{
|
|
2
|
+
import t from"../../../../core/PooledArray.js";import{create as e}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as i,fromValues as o,expandWithValues as r,center as n,width as s,height as c,depth as h,squareDiameter as l}from"../../../../geometry/support/aaBoundingBox.js";import{Sphere as d}from"../../../../geometry/support/sphere.js";import{assert as u}from"./Util.js";class a{get boundingSphere(){return this._sphere}get boundingBox(){return this._boundingBox}constructor(t,e,l){this.primitiveIndices=t,this._numIndexPerPrimitive=e,this.position=l,this._sphere=new d,this._boundingBox=i(),this._children=void 0,u(t.length>=1),u(3===l.size||4===l.size);const{data:a,size:p,indices:g}=l;u(g.length%e===0),u(g.length>=t.length*e);const m=t.length;let v=p*g[e*t[0]];f.clear(),f.push(v);const _=o(a[v],a[v+1],a[v+2],a[v],a[v+1],a[v+2],this._boundingBox);for(let i=0;i<m;++i){const o=e*t[i];for(let t=0;t<e;++t)v=p*g[o+t],f.push(v),r(_,a[v],a[v+1],a[v+2])}const x=n(_,this._sphere.center);let b=.5*Math.max(s(_),c(_),h(_)),B=b*b;for(let i=0;i<f.length;++i){v=f.at(i);const t=a[v]-x[0],e=a[v+1]-x[1],o=a[v+2]-x[2],r=t*t+e*e+o*o;if(r<=B)continue;const n=Math.sqrt(r),s=.5*(n-b);b+=s,B=b*b;const c=s/n;x[0]+=t*c,x[1]+=e*c,x[2]+=o*c}this._sphere.radius=b,f.clear()}get children(){if(this._children)return this._children;const t=this._boundingBox;if(l(t)<=1)return;const{position:e,_numIndexPerPrimitive:i,primitiveIndices:o}=this,r=n(t,p),s=o.length,c=new Uint8Array(s),h=[0,0,0,0,0,0,0,0],{data:d,size:u,indices:f}=e;for(let n=0;n<s;++n){let t=0;const e=i*o[n];let s=u*f[e],l=d[s],a=d[s+1],p=d[s+2];for(let o=1;o<i;++o){s=u*f[e+o];const t=d[s],i=d[s+1],r=d[s+2];t<l&&(l=t),i<a&&(a=i),r<p&&(p=r)}l<r[0]&&(t|=1),a<r[1]&&(t|=2),p<r[2]&&(t|=4),c[n]=t,++h[t]}let g=0;for(let n=0;n<8;++n)h[n]>0&&++g;if(g<2)return;const m=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0];for(let n=0;n<8;++n)h[n]>0&&(m[n]=new Uint32Array(h[n]));h.fill(0);for(let n=0;n<s;++n){const t=c[n];m[t][h[t]++]=o[n]}const v=new Array;for(let n=0;n<8;++n){const t=m[n];void 0!==t&&v.push(new a(t,i,e))}return this._children=v,this._children}static prune(){f.prune()}}const p=e(),f=new t({deallocator:null});export{a as BoundingInfo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{add as t,transformMat4 as e,copy as s}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{intersectsSphere as r}from"../../../../geometry/support/frustum.js";import{create as n,fromPoints as o,copy as a}from"../../../../geometry/support/ray.js";import l from"../../webgl/RenderCamera.js";import{HUDTarget as c,HUDIntersectorResult as h}from"./HUDIntersectorResult.js";import{IntersectorOptions as f}from"./IntersectorInterfaces.js";import{IntersectorResultRay as m,compareOrderedIntersectionHits as u}from"./IntersectorResult.js";import{ObjectTarget as d}from"./ObjectTarget.js";import{PolygonIntersectionResults as y}from"./PolygonIntersectionResults.js";import{IntersectorTransform as g,getVerticalOffsetObject3D as p}from"./verticalOffsetUtils.js";const _=1e-5;class v{constructor(t){this.options=new f,this._results=new b,this.polygonResults=new y,this.transform=new g,this.camera=new l,this.screenPolygonPrimitiveProcessor=j,this.tolerance=_,this.verticalOffset=null,this._ray=n(),this._rayEnd=i(),this._rayBeginTransformed=i(),this._rayEndTransformed=i(),this.viewingMode=t??1}get results(){return this._results}get ray(){return this._ray}get rayBegin(){return this._ray.origin}get rayEnd(){return this._rayEnd}reset(t,e,s){this.resetWithRay(o(t,e,this._ray),s)}resetWithRay(e,s){this.camera=s,e!==this._ray&&a(e,this._ray),0!==this.options.verticalOffset?2===this.viewingMode?this._ray.origin[2]-=this.options.verticalOffset:this.verticalOffset=this.options.verticalOffset:this.verticalOffset=null,t(this._rayEnd,this._ray.origin,this._ray.direction),this._results.init(this._ray),this.polygonResults.init()}intersect(t=null,e,s,i,r){this.point=e,this.filterPredicate=i,this.tolerance=s??_;const n=p(this.verticalOffset);if(t&&t.length>0){const e=r?t=>{r(t)&&this.intersectObject(t)}:t=>{this.intersectObject(t)};for(const s of t){const t=s.getSpatialQueryAccelerator?.();null!=t?(null!=n?t.forEachAlongRayWithVerticalOffset(this._ray.origin,this._ray.direction,e,n):t.forEachAlongRay(this._ray.origin,this._ray.direction,e),this.options.selectionMode&&this.options.hud&&t.forEachDegenerateObject(e)):s.objects.forEach(t=>e(t))}}this.sortResults()}*intersectScreenPolygon(t=null,e){if(this.verticalOffset=null,t?.length)for(const s of t){const t=s.getSpatialQueryAccelerator?.();if(null!=t)for(const s of t.intersectingFrustumValues(e.broadPhaseFrustum,t=>t.visible))yield*this._intersectScreenPolygonObject(s,e);else for(const i of s.objects.values())i.visible&&r(e.broadPhaseFrustum,i.boundingVolumeWorldSpace.bounds)&&(yield*this._intersectScreenPolygonObject(i,e))}}*intersectHUDScreenPolygon(t=null,e){if(this.verticalOffset=null,this.options.selectionMode&&this.options.hud&&t?.length)for(const s of t){const t=s.getSpatialQueryAccelerator?.(),i=t?.degenerateObjectValues()??s.objects.values();for(const s of i)yield*this._intersectScreenPolygonObject(s,e)}}*_intersectScreenPolygonObject(t,e){const s=t.geometries;if(!t.visible||!s)return;const i=t.effectiveTransformation;for(const r of s){if(!r.visible)continue;const{material:s,id:n}=r;if(!s.visible||!s.intersectScreenPolygon)continue;this.transform.setAndInvalidateLazyTransforms(i,r.transformation);const o=s.intersectScreenPolygon(r,this.transform.transform,this,e);o?.valid&&this._handleObjectScreenPolygonIntersection(o.type,new d(t,n,o.primitiveIndex),o.distance,o.point),yield}}intersectObject(t){const s=t.geometries;if(!s)return;const i=t.effectiveTransformation,r=p(this.verticalOffset);for(const n of s){if(!n.visible)continue;const{material:s,id:o}=n;if(!s.visible)continue;this.transform.setAndInvalidateLazyTransforms(i,n.transformation),e(this._rayBeginTransformed,this.rayBegin,this.transform.inverse),e(this._rayEndTransformed,this.rayEnd,this.transform.inverse);const a=this.transform.transform;null!=r&&(r.objectTransform=this.transform),s.intersectRay(n,this.transform.transform,this,this._rayBeginTransformed,this._rayEndTransformed,(e,s,i,r)=>this.handleObjectIntersection({object:t,geometryId:o,primitiveIndex:i},e,s,a,r))}}handleObjectIntersection(t,e,s,i,r){if(e<0||null!=this.filterPredicate&&!this.filterPredicate(this._ray.origin,this._rayEnd,e))return;const n=r?this._results.hud:this._results;t=r?new c(t,r):t;const o=r?i=>i.set(1,t,e,s):r=>r.set(4,t,e,s,i);if((null==n.min.distance||e<n.min.distance)&&o(n.min),0!==this.options.store&&(null==n.max.distance||e>n.max.distance)&&o(n.max),2===this.options.store)if(r){const t=new h(this._ray);o(t),this._results.hud.all.push(t)}else{const t=new m(this._ray);o(t),this._results.all.push(t)}}_handleObjectScreenPolygonIntersection(t,e,s,i){s<0||(null==this.filterPredicate||null!=i&&this.filterPredicate(this.camera.eye,i,1))&&this.polygonResults.add(t,1===t&&i?new c(e,i):e,s)}sortResults(t=this._results.all){t.sort(u)}}class b{constructor(){this.min=new m(n()),this.max=new m(n()),this.hud={min:new h(n()),max:new h(n()),all:new Array},this.ground=new m(n()),this.all=[]}init(t){this.min.init(t),this.max.init(t),this.ground.init(t),this.all.length=0,this.hud.min.init(t),this.hud.max.init(t),this.hud.all.length=0}}const j={*processTriangle(t
|
|
2
|
+
import{add as t,transformMat4 as e,copy as s}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{intersectsSphere as r}from"../../../../geometry/support/frustum.js";import{create as n,fromPoints as o,copy as a}from"../../../../geometry/support/ray.js";import l from"../../webgl/RenderCamera.js";import{HUDTarget as c,HUDIntersectorResult as h}from"./HUDIntersectorResult.js";import{IntersectorOptions as f}from"./IntersectorInterfaces.js";import{IntersectorResultRay as m,compareOrderedIntersectionHits as u}from"./IntersectorResult.js";import{ObjectTarget as d}from"./ObjectTarget.js";import{PolygonIntersectionResults as y}from"./PolygonIntersectionResults.js";import{IntersectorTransform as g,getVerticalOffsetObject3D as p}from"./verticalOffsetUtils.js";const _=1e-5;class v{constructor(t){this.options=new f,this._results=new b,this.polygonResults=new y,this.transform=new g,this.camera=new l,this.screenPolygonPrimitiveProcessor=j,this.tolerance=_,this.verticalOffset=null,this._ray=n(),this._rayEnd=i(),this._rayBeginTransformed=i(),this._rayEndTransformed=i(),this.viewingMode=t??1}get results(){return this._results}get ray(){return this._ray}get rayBegin(){return this._ray.origin}get rayEnd(){return this._rayEnd}reset(t,e,s){this.resetWithRay(o(t,e,this._ray),s)}resetWithRay(e,s){this.camera=s,e!==this._ray&&a(e,this._ray),0!==this.options.verticalOffset?2===this.viewingMode?this._ray.origin[2]-=this.options.verticalOffset:this.verticalOffset=this.options.verticalOffset:this.verticalOffset=null,t(this._rayEnd,this._ray.origin,this._ray.direction),this._results.init(this._ray),this.polygonResults.init()}intersect(t=null,e,s,i,r){this.point=e,this.filterPredicate=i,this.tolerance=s??_;const n=p(this.verticalOffset);if(t&&t.length>0){const e=r?t=>{r(t)&&this.intersectObject(t)}:t=>{this.intersectObject(t)};for(const s of t){const t=s.getSpatialQueryAccelerator?.();null!=t?(null!=n?t.forEachAlongRayWithVerticalOffset(this._ray.origin,this._ray.direction,e,n):t.forEachAlongRay(this._ray.origin,this._ray.direction,e),this.options.selectionMode&&this.options.hud&&t.forEachDegenerateObject(e)):s.objects.forEach(t=>e(t))}}this.sortResults()}*intersectScreenPolygon(t=null,e){if(this.verticalOffset=null,t?.length)for(const s of t){const t=s.getSpatialQueryAccelerator?.();if(null!=t)for(const s of t.intersectingFrustumValues(e.broadPhaseFrustum,t=>t.visible))yield*this._intersectScreenPolygonObject(s,e);else for(const i of s.objects.values())i.visible&&r(e.broadPhaseFrustum,i.boundingVolumeWorldSpace.bounds)&&(yield*this._intersectScreenPolygonObject(i,e))}}*intersectHUDScreenPolygon(t=null,e){if(this.verticalOffset=null,this.options.selectionMode&&this.options.hud&&t?.length)for(const s of t){const t=s.getSpatialQueryAccelerator?.(),i=t?.degenerateObjectValues()??s.objects.values();for(const s of i)yield*this._intersectScreenPolygonObject(s,e)}}*_intersectScreenPolygonObject(t,e){const s=t.geometries;if(!t.visible||!s)return;const i=t.effectiveTransformation;for(const r of s){if(!r.visible)continue;const{material:s,id:n}=r;if(!s.visible||!s.intersectScreenPolygon)continue;this.transform.setAndInvalidateLazyTransforms(i,r.transformation);const o=s.intersectScreenPolygon(r,this.transform.transform,this,e);o?.valid&&this._handleObjectScreenPolygonIntersection(o.type,new d(t,n,o.primitiveIndex),o.distance,o.point),yield}}intersectObject(t){const s=t.geometries;if(!s)return;const i=t.effectiveTransformation,r=p(this.verticalOffset);for(const n of s){if(!n.visible)continue;const{material:s,id:o}=n;if(!s.visible)continue;this.transform.setAndInvalidateLazyTransforms(i,n.transformation),e(this._rayBeginTransformed,this.rayBegin,this.transform.inverse),e(this._rayEndTransformed,this.rayEnd,this.transform.inverse);const a=this.transform.transform;null!=r&&(r.objectTransform=this.transform),s.intersectRay(n,this.transform.transform,this,this._rayBeginTransformed,this._rayEndTransformed,(e,s,i,r)=>this.handleObjectIntersection({object:t,geometryId:o,primitiveIndex:i},e,s,a,r))}}handleObjectIntersection(t,e,s,i,r){if(e<0||null!=this.filterPredicate&&!this.filterPredicate(this._ray.origin,this._rayEnd,e))return;const n=r?this._results.hud:this._results;t=r?new c(t,r):t;const o=r?i=>i.set(1,t,e,s):r=>r.set(4,t,e,s,i);if((null==n.min.distance||e<n.min.distance)&&o(n.min),0!==this.options.store&&(null==n.max.distance||e>n.max.distance)&&o(n.max),2===this.options.store)if(r){const t=new h(this._ray);o(t),this._results.hud.all.push(t)}else{const t=new m(this._ray);o(t),this._results.all.push(t)}}_handleObjectScreenPolygonIntersection(t,e,s,i){s<0||(null==this.filterPredicate||null!=i&&this.filterPredicate(this.camera.eye,i,1))&&this.polygonResults.add(t,1===t&&i?new c(e,i):e,s)}sortResults(t=this._results.all){t.sort(u)}}class b{constructor(){this.min=new m(n()),this.max=new m(n()),this.hud={min:new h(n()),max:new h(n()),all:new Array},this.ground=new m(n()),this.all=[]}init(t){this.min.init(t),this.max.init(t),this.ground.init(t),this.all.length=0,this.hud.min.init(t),this.hud.max.init(t),this.hud.all.length=0}}const j={*processTriangle(t){yield t},*processLineSegment(t,e,i){s(t[0],e),s(t[1],i),yield t},validatePoint:()=>!0};export{v as Intersector,j as defaultScreenPolygonPrimitiveProcessor,_ as defaultTolerance};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"../../../../core/has.js";import{abortMaybe as e}from"../../../../core/maybe.js";import{recordPerformance as t}from"../../../../core/performance.js";import{createAbortError as
|
|
2
|
+
import"../../../../core/has.js";import{abortMaybe as e}from"../../../../core/maybe.js";import{recordPerformance as t}from"../../../../core/performance.js";import{createAbortError as s}from"../../../../core/promiseUtils.js";import{Milliseconds as a}from"../../../../core/time.js";import r from"../../webgl/RenderCamera.js";import{NavigationDepthCacheStore as i,navigationDepthReductionFactor as h}from"./NavigationDepthCacheStore.js";import{N as d}from"../../../../chunks/NavigationDepth.glsl.js";import{NavigationDepthTechnique as o}from"../shaders/NavigationDepthTechnique.js";import{PixelType as n}from"../../../webgl/enums.js";const c=h,_=a(250);class l{constructor(e,t,s,h){this._rctx=e,this._fboCache=t,this._techniques=s,this._requestRender=h,this._store=new i,this._passParameters=new d,this._updateWaiters=new Array,this._readbackCamera=new r,this._destroyed=!1,this._readbackPending=!1,this._lastUpdateTime=a(-1/0),this._testImmediateUpdateId=0,this._abortController=new AbortController}destroy(){this._destroyed=!0,this._withUpdateWaiters(e=>e.reject(s())),this._abortController=e(this._abortController),this._releaseReadbackHandles()}update(e,s,r){const{camera:i}=e;if(this._destroyed||this._readbackPending||r-this._lastUpdateTime<_||i.fullWidth<=0||i.fullHeight<=0)return;const h=this._techniques.getCompiled(o);if(!h)return void this._requestRender();const d=performance.now();this._lastUpdateTime=r;const l=Math.ceil(i.fullWidth/c),m=Math.ceil(i.fullHeight/c),p=Math.ceil(l/c),u=Math.ceil(m/c),f=p*u,b=this._ensureReadbackBuffer(f);this._readbackCamera.copyFrom(i);const g=this._fboCache.acquire(l,m,"navigation depth",7);this._readbackImmediateHandle=g;const k=this._fboCache.acquire(p,u,"navigation depth",10);this._readbackHandle=k,this._passParameters.depthTexture=s,this._passParameters.depthTextureSize=[i.fullWidth,i.fullHeight],this._passParameters.cellSize=c,this._passParameters.reduced=!1,this._rctx.bindFramebuffer(g.fbo),this._rctx.setViewport(0,0,l,m),this._rctx.bindTechnique(h,e,this._passParameters),this._rctx.screen.draw(),this._passParameters.depthTexture=g.getTexture(),this._passParameters.depthTextureSize=[l,m],this._passParameters.reduced=!0,this._rctx.bindFramebuffer(k.fbo),this._rctx.setViewport(0,0,p,u),this._rctx.bindTechnique(h,e,this._passParameters),this._rctx.screen.draw(),this._readbackPending=!0;const w=this._testImmediateUpdateId;k.fbo.readPixelsAsync(0,0,p,u,6403,n.FLOAT,b,this._abortController?.signal).then(()=>{this._destroyed||(this._store.setDepthData(b.slice(0,f),p,u,this._readbackCamera),w===this._testImmediateUpdateId?this._withUpdateWaiters(e=>e.resolve()):(this._lastUpdateTime=a(-1/0),this._requestRender()))}).catch(()=>this._withUpdateWaiters(e=>e.reject())).finally(()=>{this._releaseReadbackHandles(),this._readbackPending=!1,t("NavigationDepthCache update",d,performance.now(),"Maps SDK","Scheduling")}),i.setGLViewport(this._rctx)}getMinimalDepthForArea(e,t,s,a,r=a){return this._store.getMinimalDepthForArea(e,t,s,a,r)}_ensureReadbackBuffer(e){return(null==this._readbackBuffer||this._readbackBuffer.length<e)&&(this._readbackBuffer=new Float32Array(e)),this._readbackBuffer}_withUpdateWaiters(e){const t=this._updateWaiters.slice();this._updateWaiters.length=0;for(const s of t)e(s)}_releaseReadbackHandles(){this._readbackHandle?.release(),this._readbackHandle=null,this._readbackImmediateHandle?.release(),this._readbackImmediateHandle=null}get test(){return null}}export{l as NavigationDepthCache};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{createRenderScreenPointArray3 as t}from"../../../../core/screenUtils.js";import{set as e,add as r,scale as i,subtract as a,transformMat4Z as l}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import n from"../../webgl/RenderCamera.js";const s=4,o=s*s,c=1,u=2*o,m=.5;class f{constructor(){this._camera=new n,this._width=0,this._height=0}setDepthData(t,e,r,i){this._data=t,this._width=e,this._height=r,this._camera.copyFrom(i),this._nearFar=[this._camera.nearFar[0],this._camera.nearFar[1]]}getMinimalDepthForArea(t,e,r,i,a=i){if(null==this._data||null==this._nearFar||!this._hasCompatibleCameraResolution(r))return null;const l=r.constrainWindowSize(t,e,i*r.pixelRatio,a*r.pixelRatio),h=this._camera.fullWidth/r.fullWidth,n=this._camera.fullHeight/r.fullHeight,s=Math.max(Math.floor(l[0]*h/o),0),u=Math.max(Math.floor(l[1]*n/o),0),f=Math.min(Math.ceil((l[0]+l[2])*h/o),this._width),_=Math.min(Math.ceil((l[1]+l[3])*n/o),this._height);let d=Number.MAX_VALUE,p=0,M=0;for(let o=u;o<_;++o)for(let t=s;t<f;++t){const e=this._data[t+o*this._width];if(e<=0||e>=c)continue;p++;const i=this._reprojectCachedDepth(e,t,o,r,l);null!=i&&(M++,i!==r.near&&i!==r.far&&i<d&&(d=i))}if(0===p)return null;return M<Math.min(p,2)||M/p<m||d===Number.MAX_VALUE?null:d}_reprojectCachedDepth(t,h,n,s,c){const m=h*o,f=n*o,x=.5*(m+Math.min(m+o,this._camera.fullWidth)),b=.5*(f+Math.min(f+o,this._camera.fullHeight));if(e(_,x,b,0),e(d,x,b,1),null==this._camera.unprojectFromRenderScreen(_,M)||null==this._camera.unprojectFromRenderScreen(d,g))return null;r(j,M,i(g,a(g,g,M),t));const w=-l(j,s.viewMatrix);if(w<=s.near||w>=s.far)return null;const F=p;return null==s.projectToRenderScreen(j,F)?null:F[0]>=c[0]-u&&F[0]<=c[0]+c[2]+u&&F[1]>=c[1]-u&&F[1]<=c[1]+c[3]+u?w:null}_hasCompatibleCameraResolution(t){const{fullWidth:e,fullHeight:r}=this._camera;if(e<=0||r<=0||t.fullWidth<=0||t.fullHeight<=0)return!1;return Math.abs(e*t.fullHeight-r*t.fullWidth)<=Math.max(e,r,t.fullWidth,t.fullHeight)}}const _=t(),d=t(),p=t(),M=h(),g=h(),j=h();export{f as NavigationDepthCacheStore,s as navigationDepthReductionFactor};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"../../../../core/has.js";import{generateUID as t}from"../../../../core/uid.js";import{multiply as i,copy as e,hasIdentityRotation as s}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as o,IDENTITY as r}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{lerp as a,transformMat4 as h,distance as n,set as m,add as d,exactEquals as l,copy as
|
|
2
|
+
import"../../../../core/has.js";import{generateUID as t}from"../../../../core/uid.js";import{multiply as i,copy as e,hasIdentityRotation as s}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as o,IDENTITY as r}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{lerp as a,transformMat4 as h,distance as n,set as m,add as d,exactEquals as l,copy as g}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as c,create as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getMin as _,getMax as f}from"../../../../geometry/support/aaBoundingBox.js";import{Sphere as b}from"../../../../geometry/support/sphere.js";import{maxScale as v}from"../../support/mathUtils.js";import{Object3DOccludeeStateID as p,Object3DHighlightStateID as y}from"./Object3DStateID.js";import{assert as j}from"./Util.js";import{affectsGeometry as S}from"./VertexAttribute.js";import{addObject3DStateID as x,removeObject3DStateID as V}from"../materials/renderers/utils.js";class W{constructor(i={}){this.id=t(),this._highlightIds=new Set,this._shaderTransformation=null,this._visible=!0,this.castShadow=i.castShadow??!0,this.usesVerticalDistanceToGround=i.usesVerticalDistanceToGround??!1,this.graphicUid=i.graphicUid,this.layerViewUid=i.layerViewUid,i.isElevationSource&&(this.lastValidElevationBB=new A),this._geometries=i.geometries?Array.from(i.geometries):[]}dispose(){this._geometries.length=0}get layer(){return this._layer}set layer(t){j(null==this._layer||null==t,"Object3D can only be added to a single Layer"),this._layer=t}addGeometry(t){t.visible=this._visible,this._geometries.push(t);for(const i of this._highlightIds)t.addHighlight(i);this._emit("geometryAdded",{object:this,geometry:t}),this._highlightIds.size&&this._emit("highlightChanged",this),this._invalidateBoundingVolume()}removeGeometry(t){const i=this._geometries.splice(t,1)[0];if(i){for(const t of this._highlightIds)i.removeHighlight(t);this._emit("geometryRemoved",{object:this,geometry:i}),this._highlightIds.size&&this._emit("highlightChanged",this),this._invalidateBoundingVolume()}}removeAllGeometries(){for(;this._geometries.length>0;)this.removeGeometry(0)}geometryVertexAttributeUpdated(t,i,e=!1){this._emit("attributesChanged",{object:this,geometry:t,attribute:i,sync:e}),S(i)&&this._invalidateBoundingVolume()}get visible(){return this._visible}set visible(t){if(this._visible!==t){this._visible=t;for(const t of this._geometries)t.visible=this._visible;this._emit("visibilityChanged",this)}}maskOccludee(){const t=new p;for(const i of this._geometries)i.occludees=x(i.occludees,t);return this._emit("occlusionChanged",this),t}removeOcclude(t){for(const i of this._geometries)i.occludees=V(i.occludees,t);this._emit("occlusionChanged",this)}highlight(t){const i=new y(t);for(const e of this._geometries)e.addHighlight(i);return this._emit("highlightChanged",this),this._highlightIds.add(i),i}removeHighlight(t){this._highlightIds.delete(t);for(const i of this._geometries)i.removeHighlight(t);this._emit("highlightChanged",this)}removeStateID(t){0===t.channel?this.removeHighlight(t):this.removeOcclude(t)}getCombinedStaticTransformation(t,e){return i(e,this.transformation,t.transformation)}getCombinedShaderTransformation(t,e=o()){return i(e,this.effectiveTransformation,t.transformation)}get boundingVolumeWorldSpace(){return this._bvWorldSpace||(this._bvWorldSpace=new B,this._validateBoundingVolume(this._bvWorldSpace,0)),this._bvWorldSpace}get boundingVolumeObjectSpace(){return this._bvObjectSpace||(this._bvObjectSpace=new B,this._validateBoundingVolume(this._bvObjectSpace,1)),this._bvObjectSpace}_validateBoundingVolume(t,i){const e=1===i;for(const s of this._geometries){const i=s.boundingInfo;i&&T(i,t,e?s.transformation:this.getCombinedShaderTransformation(s))}a(t.bounds.center,t.min,t.max,.5);for(const s of this._geometries){const i=s.boundingInfo;if(null==i)continue;const o=e?s.transformation:this.getCombinedShaderTransformation(s),r=v(o);h(O,i.boundingSphere.center,o);const a=n(O,t.bounds.center),m=i.boundingSphere.radius*r;t.bounds.radius=Math.max(t.bounds.radius,a+m)}}_invalidateBoundingVolume(){const t=this._bvWorldSpace?.bounds;this._bvObjectSpace=this._bvWorldSpace=void 0,this.layer&&t&&this.layer.notifyObjectBBChanged(this,t)}_emit(t,i){this.layer?.events.emit(t,i)}get geometries(){return this._geometries}get transformation(){return this._transformation??r}set transformation(t){this._transformation=e(this._transformation??o(),t),this._invalidateBoundingVolume(),this._emit("transformationChanged",this)}get shaderTransformation(){return this._shaderTransformation}set shaderTransformation(t){this._shaderTransformation=t?e(this._shaderTransformation??o(),t):null,this._invalidateBoundingVolume(),this._emit("shaderTransformationChanged",this)}get effectiveTransformation(){return this.shaderTransformation??this.transformation}get test(){}}class A{constructor(){this._data=[Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE]}get min(){return c(this._data[0],this._data[1],this._data[2])}get max(){return c(this._data[3],this._data[4],this._data[5])}minWith(t){const{_data:i}=this;i[0]=Math.min(i[0],t[0]),i[1]=Math.min(i[1],t[1]),i[2]=Math.min(i[2],t[2])}maxWith(t){const{_data:i}=this;i[3]=Math.max(i[3],t[0]),i[4]=Math.max(i[4],t[1]),i[5]=Math.max(i[5],t[2])}assignMinMax(t,i){for(let e=0;e<3;++e)this._data[0+e]=t[e],this._data[3+e]=i[e]}isEmpty(){return this._data[3]<this._data[0]&&this._data[4]<this._data[1]&&this._data[5]<this._data[2]}}class B extends A{constructor(){super(...arguments),this.bounds=new b}}function T(t,i,e){const o=t.boundingBox,r=_(o,w),a=f(o,I);if(s(e)){const t=m(C,e[12],e[13],e[14]);return d(M,r,t),d(U,a,t),i.minWith(M),void i.maxWith(U)}if(h(M,r,e),l(r,a))return i.minWith(M),void i.maxWith(M);h(U,a,e),i.minWith(M),i.minWith(U),i.maxWith(M),i.maxWith(U);for(let s=0;s<3;++s)g(M,r),g(U,a),M[s]=a[s],U[s]=r[s],h(M,M,e),h(U,U,e),i.minWith(M),i.minWith(U),i.maxWith(M),i.maxWith(U)}const C=u(),M=u(),U=u(),O=u(),w=u(),I=u();export{B as BoundingVolume,W as Object3D};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{fromValues as n,create as t}from"../../../../geometry/support/aaBoundingRect.js";import{screenPolygonIntersectsBounds as o,screenPolygonIntersectsTriangle as i}from"./screenPolygonOverlapUtils.js";function r(t,i,r){if(!r.visible)return null;const{boundingInfo:s}=r;if(s){const{
|
|
2
|
+
import{fromValues as n,create as t}from"../../../../geometry/support/aaBoundingRect.js";import{screenPolygonIntersectsBounds as o,screenPolygonIntersectsTriangle as i}from"./screenPolygonOverlapUtils.js";function r(t,i,r){if(!r.visible)return null;const{boundingInfo:s}=r;if(s){const{boundingBox:r}=s;if(n(r[0]+i[0],r[1]+i[1],r[3]+i[0],r[4]+i[1],u),!o(t,u))return null}const c=r.positionAttribute,l=r.primitivePositionIndices;return e(t,i,0,l.length/3,l,c)}function e(n,t,o,r,e,u){const{data:p,stride:d}=u;for(let g=o;g<r;++g){const o=3*g;if(s(c,t,p,d,e[o]),s(l,t,p,d,e[o+1]),s(f,t,p,d,e[o+2]),i(n,c,l,f))return g}return null}function s(n,t,o,i,r){const e=i*r;n[0]=o[e]+t[0],n[1]=o[e+1]+t[1]}const u=t(),c=[0,0],l=[0,0],f=[0,0];export{r as intersectTriangleGeometryPolygon2D};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{sub as
|
|
2
|
+
import{sub as n,set as t,cross as o,normalize as i}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{copy as e,create as s}from"../../../../geometry/support/aaBoundingBox.js";import{boundingInfoSubdivisionThreshold as r}from"./intersectionConstants.js";import{assert as u}from"./Util.js";class f{constructor(n=0,t=!1,o=!0){this.tolerance=n,this.isVerticalRay=t,this.normalRequired=o}}const l=s();function a(t,o,i,c,e,s){if(!t.visible)return;const r=n(D,c,i),{tolerance:l}=o,a=new f(l,!1,o.options.normalRequired);if(t.boundingInfo)u(0===t.type),p(t.boundingInfo,i,r,l,e,a,s);else{const n=t.positionAttribute,o=t.primitivePositionIndices;q(i,r,0,o.length/3,o,n.data,n.stride,e,a,s)}}const m=c();function p(n,t,o,i,c,s,u){if(null==n)return;const f=w(o,m);if(e(l,n.boundingBox),null!=c&&c.applyToAabb(l),C(l,t,f,i)){const{primitiveIndices:e,position:f}=n,l=e?e.length:f.indices.length/3;if(l>r){const e=n.children;if(void 0!==e){for(const n of e)p(n,t,o,i,c,s,u);return}}v(t,o,0,l,f.indices,f.data,f.stride,e,c,s,u)}}const h=c();function d(t,o,i,c,e,s,r,u,f){const{data:l,stride:a}=s;q(t,n(D,o,t),i,c,e,l,a,r,u,f)}function x(n,t,o,i){if(!o.visible)return;const{boundingInfo:c}=o;if(c){const{boundingBox:o}=c;if(n<o[0]||n>o[3]||t<o[1]||t>o[4])return}const e=o.positionAttribute,s=o.primitivePositionIndices;M(n,t,0,s.length/3,s,e,i)}function M(n,t,o,i,c,e,s){const{data:r,stride:u}=e;for(let f=o;f<i;++f){const o=3*f,i=u*c[o],e=u*c[o+1],l=u*c[o+2],a=r[i+0]-n,m=r[i+1]-t,p=r[e+0]-n,h=r[e+1]-t,d=r[l+0]-n,x=r[l+1]-t,M=d*h-x*p,b=a*x-m*d,g=p*m-h*a;(M<0||b<0||g<0)&&(M>0||b>0||g>0)||s(0,null,f)}}function b(n,t,o,i,c,e,s,r,u,f=null,l=0){const a=n[0],m=n[1],p=n[2],d=t[0],x=t[1],M=t[2];for(let b=o;b<i;++b){const n=l+(f?.[b]??b),t=3*n,o=s*c[t],i=e[o],g=e[o+1],y=e[o+2],v=s*c[t+1],q=e[v],T=e[v+1],V=e[v+2],I=s*c[t+2],R=q-i,B=T-g,A=V-y,P=e[I]-i,w=e[I+1]-g,C=e[I+2]-y,U=x*C-w*M,k=M*P-C*d,D=d*w-P*x,E=R*U+B*k+A*D,F=E*E;if(F<=z)continue;const G=a-i,H=m-g,J=p-y,K=(G*U+H*k+J*D)*E;if(K<0||K>F)continue;const L=H*A-B*J,N=J*R-A*G,O=G*B-R*H,Q=(d*L+x*N+M*O)*E;if(Q<0||K+Q>F)continue;const S=(P*L+w*N+C*O)/E;if(S>=0){u(S,r?j(R,B,A,P,w,C,h):null,n)}}}function g(n,t,o,i,c,e,s,r){const u=n[0],f=n[1],l=n[2],a=t[0],m=t[1],p=t[2];for(let d=o;d<i;++d){const n=3*d,t=n+1,o=n+2,i=e*n,x=c[i],M=c[i+1],b=c[i+2],g=e*t,y=e*o,v=c[g]-x,q=c[g+1]-M,T=c[g+2]-b,V=c[y]-x,I=c[y+1]-M,R=c[y+2]-b,B=m*R-I*p,A=p*V-R*a,P=a*I-V*m,w=v*B+q*A+T*P,C=w*w;if(C<=z)continue;const U=u-x,k=f-M,D=l-b,E=(U*B+k*A+D*P)*w;if(E<0||E>C)continue;const F=k*T-q*D,G=D*v-T*U,H=U*q-v*k,J=(a*F+m*G+p*H)*w;if(J<0||E+J>C)continue;const K=(V*F+I*G+R*H)/w;if(K>=0){r(K,s?j(v,q,T,V,I,R,h):null,d)}}}function y(n,t,o,i,c,e,s,r,u,f,l,a=null,m=0){const p=n[0],d=n[1],x=n[2],M=t[0],b=t[1],g=t[2];for(let y=o;y<i;++y){const n=m+(a?.[y]??y),t=3*n,o=s*c[t],i=e[o],v=e[o+1],q=e[o+2],T=s*c[t+1],V=e[T],I=e[T+1],R=e[T+2],B=s*c[t+2],A=e[B],P=e[B+1],w=e[B+2],C=q-u,U=r/Math.sqrt(i*i+v*v+C*C),k=i+i*U,D=v+v*U,E=q+C*U,F=R-u,G=r/Math.sqrt(V*V+I*I+F*F),H=V+V*G,J=I+I*G,K=R+F*G,L=w-u,N=r/Math.sqrt(A*A+P*P+L*L),O=H-k,Q=J-D,S=K-E,W=A+A*N-k,X=P+P*N-D,Y=w+L*N-E,Z=b*Y-X*g,$=g*W-Y*M,_=M*X-W*b,nn=O*Z+Q*$+S*_,tn=nn*nn;if(tn<=z)continue;const on=p-k,cn=d-D,en=x-E,sn=(on*Z+cn*$+en*_)*nn;if(sn<0||sn>tn)continue;const rn=cn*S-Q*en,un=en*O-S*on,fn=on*Q-O*cn,ln=(M*rn+b*un+g*fn)*nn;if(ln<0||sn+ln>tn)continue;const an=(W*rn+X*un+Y*fn)/nn;if(an>=0){l(an,f?j(O,Q,S,W,X,Y,h):null,n)}}}function v(n,t,o,i,c,e,s,r,u,f,l){const a=n[0],m=n[1],p=n[2],d=t[0],x=t[1],M=t[2],{normalRequired:b}=f;for(let g=o;g<i;++g){const n=r[g],t=3*n,o=s*c[t];let i=e[o],f=e[o+1],y=e[o+2];const v=s*c[t+1];let q=e[v],T=e[v+1],V=e[v+2];const I=s*c[t+2];let R=e[I],B=e[I+1],A=e[I+2];null!=u&&([i,f,y]=u.applyToVertex(F,i,f,y,g),[q,T,V]=u.applyToVertex(F,q,T,V,g),[R,B,A]=u.applyToVertex(F,R,B,A,g));const P=q-i,w=T-f,C=V-y,U=R-i,k=B-f,D=A-y,E=x*D-k*M,G=M*U-D*d,H=d*k-U*x,J=P*E+w*G+C*H,K=J*J;if(K<=z)continue;const L=a-i,N=m-f,O=p-y,Q=(L*E+N*G+O*H)*J;if(Q<0||Q>K)continue;const S=N*C-w*O,W=O*P-C*L,X=L*w-P*N,Y=(d*S+x*W+M*X)*J;if(Y<0||Q+Y>K)continue;const Z=(U*S+k*W+D*X)/J;if(Z>=0){l(Z,b?j(P,w,C,U,k,D,h):null,n)}}}function q(o,i,c,e,s,r,u,f,l,a){const m=i,p=E,h=Math.abs(m[0]),d=Math.abs(m[1]),x=Math.abs(m[2]),M=h>=d?h>=x?0:2:d>=x?1:2,b=M,g=m[b]<0?2:1,y=(M+g)%3,v=(M+(3-g))%3,q=m[y]/m[b],j=m[v]/m[b],B=1/m[b],A=T,P=V,w=I,{normalRequired:C}=l;for(let T=c;T<e;++T){const i=3*T,c=u*s[i];t(p[0],r[c+0],r[c+1],r[c+2]);const e=u*s[i+1];t(p[1],r[e+0],r[e+1],r[e+2]);const l=u*s[i+2];t(p[2],r[l+0],r[l+1],r[l+2]),f&&(f.applyToVertex(p[0],p[0][0],p[0][1],p[0][2],T),f.applyToVertex(p[1],p[1][0],p[1][1],p[1][2],T),f.applyToVertex(p[2],p[2][0],p[2][1],p[2][2],T)),n(A,p[0],o),n(P,p[1],o),n(w,p[2],o);const m=A[y]-q*A[b],h=A[v]-j*A[b],d=P[y]-q*P[b],x=P[v]-j*P[b],M=w[y]-q*w[b],g=w[v]-j*w[b],V=M*x-g*d,I=m*g-h*M,U=d*h-x*m;if((V<0||I<0||U<0)&&(V>0||I>0||U>0))continue;const k=V+I+U;if(0===k)continue;const z=V*(B*A[b])+I*(B*P[b])+U*(B*w[b]);if(z*Math.sign(k)<0)continue;const D=z/k;if(D>=0){a(D,C?R(p):null,T)}}}const T=c(),V=c(),I=c();function j(n,c,e,s,r,u,f){return t(B,n,c,e),t(A,s,r,u),o(f,B,A),i(f,f),f}function R(t){return n(B,t[1],t[0]),n(A,t[2],t[0]),o(h,B,A),i(h,h),h}const B=c(),A=c();function P(n,o,i){return t(i,1/(o[0]-n[0]),1/(o[1]-n[1]),1/(o[2]-n[2]))}function w(n,o){return t(o,1/n[0],1/n[1],1/n[2])}function C(n,t,o,i){return U(n,t,o,i,1/0)}function U(n,t,o,i,c){const e=(n[0]-i-t[0])*o[0],s=(n[3]+i-t[0])*o[0];let r=Math.min(e,s),u=Math.max(e,s);const f=(n[1]-i-t[1])*o[1],l=(n[4]+i-t[1])*o[1];if(u=Math.min(u,Math.max(f,l)),u<0)return!1;if(r=Math.max(r,Math.min(f,l)),r>u)return!1;const a=(n[2]-i-t[2])*o[2],m=(n[5]+i-t[2])*o[2];return u=Math.min(u,Math.max(a,m)),!(u<0)&&(r=Math.max(r,Math.min(a,m)),!(r>u)&&r<c)}const k=1e-7,z=k*k,D=c(),E=[c(),c(),c()],F=c();export{f as MeshIntersectionOptions,P as computeInvDir,w as computeInvDirFromDirection,j as computeNormalFromBarycentric,C as intersectAabbInvDir,U as intersectAabbInvDirBefore,b as intersectRayTriangles,q as intersectRayTrianglesWithDisplacementWatertight,y as intersectRayTrianglesWithVerticalOffsetENUGlobal,g as intersectRenderGeometryTriangles,a as intersectTriangleGeometry,x as intersectTriangleGeometry2D,d as intersectTriangles,M as intersectTriangles2d,k as triangleRayParallelTolerance};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{generateUID as t}from"../../../../core/uid.js";import{copy as r,multiply as i}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as e}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as o}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{NullSphere as s,Sphere as n}from"../../../../geometry/support/sphere.js";import{maxScale as
|
|
2
|
+
import{generateUID as t}from"../../../../core/uid.js";import{copy as r,multiply as i}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as e}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as o}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{NullSphere as s,Sphere as n}from"../../../../geometry/support/sphere.js";import{maxScale as h}from"../../support/mathUtils.js";class a{constructor(r,i={}){this.geometry=r,this.screenToWorldRatio=1,this._transformation=e(),this._shaderTransformation=null,this._boundingSphere=null,this.id=t(),this.layerViewUid=i.layerViewUid,this.graphicUid=i.graphicUid,this.castShadow=i.castShadow??!1,i.objectShaderTransformation&&this.objectShaderTransformationChanged(i.objectShaderTransformation)}get transformation(){return this._transformation}set transformation(t){r(this._transformation,t),this._boundingSphere=null}get boundingInfo(){return this.geometry.boundingInfo}objectShaderTransformationChanged(t){null==t?this._shaderTransformation=null:(this._shaderTransformation??=e(),i(this._shaderTransformation,t,this.geometry.transformation)),this._boundingSphere=null}get boundingSphere(){return this.boundingInfo?(null==this._boundingSphere&&(this._boundingSphere??=new n,o(this._boundingSphere.center,this.boundingInfo.boundingSphere.center,this.shaderTransformation),this._boundingSphere.radius=this.boundingInfo.boundingSphere.radius*h(this.shaderTransformation)),this._boundingSphere):s}get material(){return this.geometry.material}get type(){return this.geometry.type}get shaderTransformation(){return this._shaderTransformation??this.transformation}get attributes(){return this.geometry.attributes}get positionAttribute(){return this.geometry.positionAttribute}get primitivePositionIndices(){return this.geometry.primitivePositionIndices}foreachHighlightOptions(t){this.geometry.foreachHighlightOptions(t)}get hasHighlights(){return this.geometry.hasHighlights}get occludees(){return this.geometry.occludees}get visible(){return this.geometry.visible}set visible(t){this.geometry.visible=t}}class g extends a{}export{a as RenderGeometry,g as ValidatedRenderGeometry};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{addMany as r,filterInPlace as t}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{someMap as s,everyMap as i}from"../../../../core/MapUtils.js";import n from"../../../../core/PooledArray.js";import{property as o,subclass as a}from"../../../../core/accessorSupport/decorators.js";import{set as d}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{OverlayTarget as c}from"../../terrain/Intersector.js";import{ChangeSet as l,RenderGeometryUpdate as m}from"./ChangeSet.js";import{IntersectorResultRay as g}from"./IntersectorResult.js";import{RendererBase as p}from"./RendererBase.js";import{noBudget as u}from"../../../support/Scheduler.js";let y=class extends p{constructor(e){super(e),this._pending=new
|
|
2
|
+
import{__decorate as e}from"tslib";import{addMany as r,filterInPlace as t}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{someMap as s,everyMap as i}from"../../../../core/MapUtils.js";import n from"../../../../core/PooledArray.js";import{property as o,subclass as a}from"../../../../core/accessorSupport/decorators.js";import{set as d}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{OverlayTarget as c}from"../../terrain/Intersector.js";import{ChangeSet as l,RenderGeometryUpdate as m}from"./ChangeSet.js";import{IntersectorResultRay as g}from"./IntersectorResult.js";import{RendererBase as p}from"./RendererBase.js";import{noBudget as u}from"../../../support/Scheduler.js";let y=class extends p{constructor(e){super(e),this._pending=new f,this._changes=new l,this._sortedRenderers=new n,this._geometries=new Map,this._hasHighlights=!1,this._hasWater=!1}destroy(){this.destroyed||(this._changes.prune(),this._sortedRenderers.prune(),this._geometries.clear(),this._pending.clear())}get updating(){return!this._pending.empty||this._changes.updates.length>0}get rctx(){return this.rendererContext.rctx}get _localOriginFactory(){return this.rendererContext.localOriginFactory}get hasHighlights(){return this._hasHighlights}hasHighlight(e){return s(this.renderers,r=>r.hasHighlight(e))}get hasWater(){return this._hasWater}get hasOccluders(){return this.renderers&&s(this.renderers,e=>e.hasOnlyOccluders)}get hasOnlyOccluders(){return i(this.renderers,e=>e.hasOnlyOccluders)}get isEmpty(){return!this.updating&&0===this.renderers.size&&0===this._geometries.size}get sortedRenderers(){return this._sortedRenderers}commitChanges(){return!!this.updating&&(this._processAddsRemoves(),this.commit(this._changes,u,this.rendererContext.pluginContext)&&(this._updateSortedMaterialRenderers(),this._hasHighlights=s(this.renderers,e=>{const r=e.produces.get(18);return!!r&&r(10)}),this._hasWater=s(this.renderers,e=>{const r=e.produces.get(19);return!!r&&r(4)})),this.notifyChange("updating"),!0)}addRenderer(){this._sortedRenderers.clear()}removeRenderer(){this._sortedRenderers.clear()}addGeometries(e,r){if(0===e.length)return;const t=this._validateRenderGeometries(e);for(const i of t)this._geometries.set(i.id,i);const s=this._pending.empty;for(const i of t)this._pending.adds.add(i);switch(s&&this.notifyChange("updating"),r){case 0:this._notifyGraphicVisibilityChanged(e);break;case 1:this._notifyGraphicGeometryChanged(e)}}removeGeometries(e,r){if(this.destroyed)return;const t=this._pending.empty,s=this._pending.adds;for(const i of e)s.has(i)?(this._pending.removed.add(i),s.delete(i)):this._pending.removed.has(i)||this._pending.removes.add(i),this._geometries.delete(i.id);t&&!this._pending.empty&&this.notifyChange("updating"),1===r&&this._notifyGraphicGeometryChanged(e)}modifyGeometries(e,r){const t=0===this._changes.updates.length;for(const s of e){const e=new m;this._changes.updates.push(e),e.renderGeometry=this._ensureValidRenderGeometry(s),e.updateType=r}switch(t&&this._changes.updates.length>0&&this.notifyChange("updating"),r){case 4:case 2:return this._notifyGraphicGeometryChanged(e);case 1:return this._notifyGraphicVisibilityChanged(e)}}updateAnimation(e){let r=!1;return this._sortedRenderers.forAll(t=>r=!!t.updateAnimation&&t.updateAnimation(e)||r),r}precompile(e){return this._sortedRenderers.reduce((r,t)=>t.precompile(e)||r,!1)}render(e){this._sortedRenderers.forAll(r=>{const t=r.acquireTechniques(e);t&&r.render(e,t)})}intersectRay(e,r,t,s,i){for(const n of this._geometries.values()){if(!s(n))continue;this._intersectRenderGeometry(n,t,r,0,e,i);const o=this.rendererContext.longitudeCyclical;if(o){const s=n.boundingSphere.center,a=this._effectiveGeometryRadius(n);s[0]-a<o.min&&this._intersectRenderGeometry(n,t,r,o.range,e,i),s[0]+a>o.max&&this._intersectRenderGeometry(n,t,r,-o.range,e,i)}i++}return i}*intersectScreenPolygon(e,r,t,s){for(const i of this._geometries.values()){if(!t(i))continue;this._intersectScreenPolygonRenderGeometry(i,r,0,e,s);const n=this.rendererContext.longitudeCyclical;if(n){const t=i.boundingSphere.center,o=this._effectiveGeometryRadius(i);t[0]-o<n.min&&this._intersectScreenPolygonRenderGeometry(i,r,n.range,e,s),t[0]+o>n.max&&this._intersectScreenPolygonRenderGeometry(i,r,-n.range,e,s)}s++,yield}return s}_effectiveGeometryRadius(e){const r=e.boundingSphere.radius;return r||e.screenToWorldRatio*C}_updateSortedMaterialRenderers(){if(!(this._sortedRenderers.length>0)){for(const e of this.renderers.values())this._sortedRenderers.push(e);this._sortedRenderers.sort((e,r)=>r.material?.renderPriority===e.material?.renderPriority?e.drapedPriority-r.drapedPriority:(r.material?.renderPriority||0)-(e.material?.renderPriority||0))}}_processAddsRemoves(){this._changes.adds.length=0,this._changes.removes.length=0,r(this._changes.adds,Array.from(this._pending.adds)),r(this._changes.removes,Array.from(this._pending.removes)),t(this._changes.updates,({renderGeometry:e})=>!this._pending.has(e)),this._pending.clear()}_intersectRenderGeometry(e,r,t,s,i,n){if(!e.visible||!e.material.visible||!e.material.intersectRayDraped)return;let o=0;s+=e.transformation[12],o=e.transformation[13],G[0]=t[0]-s,G[1]=t[1]-o,e.screenToWorldRatio=this.rendererContext.screenToWorldRatio,e.material.intersectRayDraped(e,i,G,(t,s,o)=>{_(r,o,n,e.material.renderPriority,i,e.layerViewUid,e.graphicUid)},r)}_intersectScreenPolygonRenderGeometry(e,r,t,s,i){if(e.visible&&e.material.visible&&e.material.intersectScreenPolygonDraped){d(v,t+e.transformation[12],e.transformation[13]),e.screenToWorldRatio=this.rendererContext.screenToWorldRatio;for(const t of r){const r=e.material.intersectScreenPolygonDraped(e,v,s,t);if(r)return void R(t.distance,r.primitiveIndex,i,e.material.renderPriority,s,e.layerViewUid,e.graphicUid)}}}_notifyGraphicGeometryChanged(e){if(null==this.drapeSource.notifyGraphicGeometryChanged)return;let r;for(const{graphicUid:t}of e)null!=t&&t!==r&&(this.drapeSource.notifyGraphicGeometryChanged(t),r=t)}_notifyGraphicVisibilityChanged(e){if(null==this.drapeSource.notifyGraphicVisibilityChanged)return;let r;for(const{graphicUid:t}of e)null!=t&&t!==r&&(this.drapeSource.notifyGraphicVisibilityChanged(t),r=t)}_validateRenderGeometries(e){for(const r of e)this._ensureValidRenderGeometry(r);return e}_ensureValidRenderGeometry(e){return null==e.localOrigin&&(e.localOrigin=this._localOriginFactory.getOrigin(e.boundingSphere.center)),e}get test(){}};e([o({constructOnly:!0})],y.prototype,"drapeSource",void 0),e([o({constructOnly:!0})],y.prototype,"rendererContext",void 0),e([o()],y.prototype,"updating",null),e([o()],y.prototype,"rctx",null),e([o()],y.prototype,"_localOriginFactory",null),e([o({readOnly:!0})],y.prototype,"isEmpty",null),e([o()],y.prototype,"_geometries",void 0),y=e([a("esri.views.3d.webgl-engine.lib.SortedRenderGeometryRenderer")],y);class f{constructor(){this.adds=new Set,this.removes=new Set,this.removed=new Set}get empty(){return 0===this.adds.size&&0===this.removes.size&&0===this.removed.size}has(e){return this.adds.has(e)||this.removes.has(e)||this.removed.has(e)}clear(){this.adds.clear(),this.removes.clear(),this.removed.clear()}}function _(e,r,t,s,i,n,o){const a=new c(n,o,r),d=r=>{r.set(5,a,e.distance,e.normal,e.transformation,t,s)};if((null==i.results.min.drapedLayerOrder||t>=i.results.min.drapedLayerOrder)&&(null==i.results.min.distance||i.results.ground.distance<=i.results.min.distance)&&d(i.results.min),0!==i.options.store&&(null==i.results.max.drapedLayerOrder||t<i.results.max.drapedLayerOrder)&&(null==i.results.max.distance||i.results.ground.distance>i.results.max.distance)&&d(i.results.max),2===i.options.store){const e=new g(i.ray);d(e),i.results.all.push(e)}}function R(e,r,t,s,i,n,o){i.polygonResults.add(5,new c(n,o,r),e,t,s)}const G=h(),v=h(),C=128;export{y as SortedRenderGeometryRenderer};
|