@arcgis/core 4.33.0-next.20250326 → 4.33.0-next.20250328
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/viewUtils.d.ts +3 -0
- package/applications/Components/viewUtils.js +5 -0
- package/applications/KnowledgeStudio/layerInternalAccessUtils.d.ts +1 -0
- package/applications/KnowledgeStudio/layerInternalAccessUtils.js +1 -1
- package/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/arcadeRuntime.js +1 -1
- package/arcade/functions/date.js +1 -1
- package/arcade/functions/feature.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade/functions/featuresetgeom.js +1 -1
- package/arcade/functions/featuresetstats.js +1 -1
- package/arcade/functions/featuresetstring.js +1 -1
- package/arcade/functions/geomasync.js +1 -1
- package/arcade/functions/geometry.js +1 -1
- package/arcade/functions/geomsync.js +1 -1
- package/arcade/functions/knowledgegraph.js +1 -1
- package/arcade/functions/maths.js +1 -1
- package/arcade/functions/stats.js +1 -1
- package/arcade/functions/string.js +1 -1
- package/arcade/geometry/functions.js +1 -1
- package/arcade/languageUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/08ea652b7896c1da022d.js +1 -0
- package/assets/esri/core/workers/chunks/{66cae76da0582cfa8656.js → 0943695a1dcd21c45e83.js} +1 -1
- package/assets/esri/core/workers/chunks/09ca64184bed6abafcd9.js +1 -0
- package/assets/esri/core/workers/chunks/{c6bcfa99fb222894fa0e.js → 0a0e5d699ddb7052c5c0.js} +1 -1
- package/assets/esri/core/workers/chunks/0a675f9f69b8b13b7443.js +1 -0
- package/assets/esri/core/workers/chunks/0eed612e82a279ac8d1e.js +1 -0
- package/assets/esri/core/workers/chunks/{cbe22c58b3230b12b31a.js → 13ad4ee2e064d13ca34d.js} +1 -1
- package/assets/esri/core/workers/chunks/176e7c7c2a871bcb512e.js +1 -0
- package/assets/esri/core/workers/chunks/18d0fe269531b951e309.js +1 -0
- package/assets/esri/core/workers/chunks/201db423e3c6f947b77c.js +1 -0
- package/assets/esri/core/workers/chunks/213e82a7e3fa5b253ec1.js +1 -0
- package/assets/esri/core/workers/chunks/{22618753349eb9d8b3df.js → 222446da9cb58c3c3b7e.js} +1 -1
- package/assets/esri/core/workers/chunks/277b61af8982092a4c81.js +1 -0
- package/assets/esri/core/workers/chunks/2b07bdb6c4c4a5b2f968.js +1 -0
- package/assets/esri/core/workers/chunks/2bda2cfc6e81818d7d33.js +1 -0
- package/assets/esri/core/workers/chunks/2cbab0c078d0b844934c.js +1 -0
- package/assets/esri/core/workers/chunks/{a68b48fd1a529f69705e.js → 2fcfc21ba38d9919730a.js} +1 -1
- package/assets/esri/core/workers/chunks/{193b4fecdfee927d6200.js → 37e4f588a6896f98bce3.js} +1 -1
- package/assets/esri/core/workers/chunks/392e64a573f67817db02.js +1 -0
- package/assets/esri/core/workers/chunks/3a743653b786b010a57f.js +1 -0
- package/assets/esri/core/workers/chunks/3be007f32ea1e18b8b3b.js +1 -0
- package/assets/esri/core/workers/chunks/451555af283b32a10fef.js +1 -0
- package/assets/esri/core/workers/chunks/{835fa4484c58d9b31c78.js → 460afde071df9f35182d.js} +1 -1
- package/assets/esri/core/workers/chunks/{26bedec014488e1fc5e4.js → 4816cf647eca2f4cecc2.js} +1 -1
- package/assets/esri/core/workers/chunks/{09c9e4e94f09ba9f4c22.js → 4aa0a58ded4465ea28bd.js} +1 -1
- package/assets/esri/core/workers/chunks/4d02e211967384994e5e.js +1 -0
- package/assets/esri/core/workers/chunks/4d798da25a726f179089.js +319 -0
- package/assets/esri/core/workers/chunks/51339193abddfe37745d.js +1 -0
- package/assets/esri/core/workers/chunks/{0a98dc3ea67ce97a6e7b.js → 5269793822e41dd07fe1.js} +1 -1
- package/assets/esri/core/workers/chunks/52d160cb7921ae7a4f57.js +1 -0
- package/assets/esri/core/workers/chunks/{630a9afdf0523c27ddb6.js → 555c95b149e3a82a4460.js} +1 -1
- package/assets/esri/core/workers/chunks/{eab1e3c101158675abba.js → 5660f479c005149bce8d.js} +1 -1
- package/assets/esri/core/workers/chunks/5a51c75a2932d9da001a.js +1 -0
- package/assets/esri/core/workers/chunks/{37a3533f004bf2e888da.js → 5d01f0b86566d08ba29d.js} +1 -1
- package/assets/esri/core/workers/chunks/{0576b035c1654a43ad5c.js → 5de3aee547113bfd59df.js} +1 -1
- package/assets/esri/core/workers/chunks/{45eee326f7a649c5a15b.js → 626db8488f9d931cf55c.js} +2 -2
- package/assets/esri/core/workers/chunks/{5a6f7360183693f8490d.js → 6339a24874c698594101.js} +1 -1
- package/assets/esri/core/workers/chunks/63dade3e1cc7f5b76846.js +1 -0
- package/assets/esri/core/workers/chunks/6c378e7a6ca29d530880.js +1 -0
- package/assets/esri/core/workers/chunks/71e46e866c23372b0b58.js +1 -0
- package/assets/esri/core/workers/chunks/{c591527543fd75a917d4.js → 72c7126dbd27fa48fcdb.js} +1 -1
- package/assets/esri/core/workers/chunks/{d459c790a3b89ac53d2d.js → 759c12b0715279e3c0f6.js} +1 -1
- package/assets/esri/core/workers/chunks/75a04b073231da70c18d.js +1 -0
- package/assets/esri/core/workers/chunks/75fa861b5757551f8fdc.js +1 -0
- package/assets/esri/core/workers/chunks/7655be1470ce39f0e494.js +1 -0
- package/assets/esri/core/workers/chunks/796cf1c2ca9955595836.js +1 -0
- package/assets/esri/core/workers/chunks/79c4f10da8360ee60cd2.js +1 -0
- package/assets/esri/core/workers/chunks/{49c346d2fb8538990f45.js → 7d1c39c2a80e20a0595f.js} +1 -1
- package/assets/esri/core/workers/chunks/7f36cffc6ed984b7e467.js +1 -0
- package/assets/esri/core/workers/chunks/{fa3eeb40e2d732c184d8.js → 7f8c7e3e41e51ab4d612.js} +1 -1
- package/assets/esri/core/workers/chunks/80aaf31c8eec3cff2add.js +1 -0
- package/assets/esri/core/workers/chunks/82353e59ac6d909dcf41.js +1 -0
- package/assets/esri/core/workers/chunks/84d301e1b6b0d0b48f51.js +1 -0
- package/assets/esri/core/workers/chunks/86931186095c23e47c0c.js +1 -0
- package/assets/esri/core/workers/chunks/86ee278919038260696e.js +39 -0
- package/assets/esri/core/workers/chunks/{4496ef270c700078df0c.js → 8752f807c05d1ec215e8.js} +1 -1
- package/assets/esri/core/workers/chunks/{59e4e780dcdfed555ca5.js → 8ef5e6f1c606e5e41002.js} +1 -1
- package/assets/esri/core/workers/chunks/{55c7c51e56d72f507c22.js → 90afead317186b31b2f9.js} +1 -1
- package/assets/esri/core/workers/chunks/90c893959145827961ac.js +1 -0
- package/assets/esri/core/workers/chunks/931275cfa2c55eb0f504.js +1 -0
- package/assets/esri/core/workers/chunks/{7e0e9ca84490a0c67197.js → 98da74243df03e0cc70d.js} +1 -1
- package/assets/esri/core/workers/chunks/{354117429b3a0a0794c9.js → 999e8dbe6f4d0665b3ab.js} +1 -1
- package/assets/esri/core/workers/chunks/9c59fc2df8081e65a128.js +1 -0
- package/assets/esri/core/workers/chunks/a348ff2dd936c6bf9399.js +1 -0
- package/assets/esri/core/workers/chunks/a53e9f5092de715da025.js +1 -0
- package/assets/esri/core/workers/chunks/a9b6377f1fef5826f28d.js +1 -0
- package/assets/esri/core/workers/chunks/{8063e35dacf8f99471d8.js → aa404aaec843a4f46ab6.js} +1 -1
- package/assets/esri/core/workers/chunks/{21016d58428b15f7427c.js → aa712f850fd129ca5ed8.js} +1 -1
- package/assets/esri/core/workers/chunks/ab0113d1269675dcd520.js +1 -0
- package/assets/esri/core/workers/chunks/aff7c4477e1f0c31fffa.js +1 -0
- package/assets/esri/core/workers/chunks/{726e3f413824f02fe689.js → bd2dcc55ac3418421ee5.js} +1 -1
- package/assets/esri/core/workers/chunks/bf453744067267e84d1b.js +1 -0
- package/assets/esri/core/workers/chunks/c2f38c66fae2cdb57445.js +1 -0
- package/assets/esri/core/workers/chunks/c7aa4a8263e21f631004.js +1 -0
- package/assets/esri/core/workers/chunks/{b8a4352f83502449ff95.js → cbbbaccc0d3683e1c0fe.js} +1 -1
- package/assets/esri/core/workers/chunks/{e4290719c8afc2a4ee8c.js → cc441051a52bfbda9caf.js} +1 -1
- package/assets/esri/core/workers/chunks/{3be465c653236d6d8c1f.js → d2c7067bb6654c0e2793.js} +1 -1
- package/assets/esri/core/workers/chunks/{bc3f42401131a12fce9b.js → d2eb3802fa003c2d497e.js} +1 -1
- package/assets/esri/core/workers/chunks/d3912886ac2910290f43.js +1 -0
- package/assets/esri/core/workers/chunks/da7c14ae1a25fc7163ce.js +1 -0
- package/assets/esri/core/workers/chunks/daa54c8a317c27881763.js +1 -0
- package/assets/esri/core/workers/chunks/e08bff9f8247909776a4.js +1 -0
- package/assets/esri/core/workers/chunks/e15c612caadf7bac4ab9.js +1 -0
- package/assets/esri/core/workers/chunks/{d5d2a4e8e19898d86c6d.js → e2029267cddb8e2effab.js} +1 -1
- package/assets/esri/core/workers/chunks/e3ef0451dcdc2e966628.js +1 -0
- package/assets/esri/core/workers/chunks/e7e987558cf017c62458.js +1 -0
- package/assets/esri/core/workers/chunks/{042771b4e56355924140.js → e9993d4f2bfdc434fbcc.js} +1 -1
- package/assets/esri/core/workers/chunks/eabfab23246d4a052ea3.js +1 -0
- package/assets/esri/core/workers/chunks/ed3d1d0465f4a4d8df4a.js +1 -0
- package/assets/esri/core/workers/chunks/{4dc1e7d7ac2a4b0144c4.js → f128d3431da86e484117.js} +28 -29
- package/assets/esri/core/workers/chunks/{ed4afafbcb31491c2049.js → f452ca61842dbe8de9af.js} +1 -1
- package/assets/esri/core/workers/chunks/f54546c155fba2fd3a7e.js +1 -0
- package/assets/esri/core/workers/chunks/{4c8164955f8d844c09ee.js → f8d1c7df671733c3325c.js} +1 -1
- package/assets/esri/core/workers/chunks/{e45404a982e173459990.js → f92d521ed3df3c9f737b.js} +1 -1
- package/assets/esri/core/workers/chunks/{b2289c18c02c868a2939.js → f9bedb421d4e115a888f.js} +1 -1
- package/assets/esri/core/workers/chunks/{55f7b1de8882569861c0.js → faed301a25252c619cff.js} +1 -1
- package/assets/esri/core/workers/chunks/fb22b2e4988ecf4d6376.js +1 -0
- package/assets/esri/core/workers/chunks/fb455fd89b74b70a6a2b.js +1 -0
- package/assets/esri/core/workers/chunks/{6d77c7e9dec323fc4145.js → fb603edd374e24f366ff.js} +1 -1
- package/chunks/ComponentShader.glsl.js +25 -25
- package/chunks/HUDMaterial.glsl.js +2 -2
- package/chunks/LineMarker.glsl.js +26 -26
- package/chunks/Point2D.js +1 -1
- package/chunks/ProjectionTransformation.js +1 -1
- package/chunks/QuadraticBezier.js +1 -1
- package/chunks/RibbonLine.glsl.js +35 -33
- package/chunks/Terrain.glsl.js +33 -33
- package/chunks/aiServices.js +1 -1
- package/chunks/array.js +1 -1
- package/chunks/languageUtils.js +1 -1
- package/core/Accessor.js +1 -1
- package/core/accessorSupport/utils.js +1 -1
- package/core/workers/registry.js +1 -1
- package/geometry/operators/projectOperator.js +1 -1
- package/geometry/operators/shapePreservingProjectOperator.js +1 -1
- package/geometry/support/meshUtils/elevation.js +1 -1
- package/geometry/support/meshUtils.js +1 -1
- package/interfaces.d.ts +284 -10
- package/intl/locale.js +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/MapImageLayer.js +1 -1
- package/layers/TileLayer.js +1 -1
- package/layers/support/RasterWorker.js +1 -1
- package/layers/support/VideoElement.js +1 -1
- package/layers/support/rasterDatasets/FunctionRaster.js +1 -1
- package/layers/support/rasterFunctions/clipUtils.js +1 -1
- package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
- package/package.json +2 -2
- package/rest/networks/queryAssociations.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/WebStyleSymbol.js +1 -1
- package/symbols/support/symbolUtils.js +1 -1
- package/views/2d/LabelManager.js +1 -1
- package/views/2d/engine/webgl/Overlay.js +1 -1
- package/views/2d/layers/MapImageLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/layers/support/util.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/Slice/RotateManipulator.js +1 -1
- package/views/3d/layers/DrapedSubView3D.js +1 -1
- package/views/3d/layers/GraphicsView3D.js +1 -1
- package/views/3d/layers/ImageryLayerView3D.js +1 -1
- package/views/3d/layers/MapImageLayerView3D.js +1 -1
- package/views/3d/layers/MediaLayerView3D.js +1 -1
- package/views/3d/layers/TileLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
- package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
- package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
- package/views/3d/layers/support/ImageHighlightHelper3D.js +5 -0
- package/views/3d/layers/support/SublayerPopupHighlightHelper3D.js +5 -0
- package/views/3d/terrain/Overlay.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/RasterTile.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +9 -10
- package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlightOverlay.js +11 -0
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js +3 -6
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/BlendLayersOutput.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/Material.js +1 -1
- package/views/3d/webgl-engine/lib/Program.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/webgl-engine/lib/VertexAttribute.js +1 -1
- package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.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/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/PointRendererTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
- package/views/DOMContainer.js +1 -1
- package/views/FocusArea.js +1 -1
- package/views/GroundView.js +1 -1
- package/views/PopupView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/VideoView.d.ts +4 -0
- package/views/VideoView.js +1 -1
- package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
- package/views/layers/support/highlightUtils.js +5 -0
- package/views/support/GroundViewElevationSampler.js +1 -1
- package/views/support/TextureCompressionHandle.js +5 -0
- package/views/support/TextureCompressionHelper.js +1 -1
- package/views/support/TextureCompressionWorker.js +5 -0
- package/views/support/TextureCompressionWorkerHandle.js +5 -0
- package/views/support/imageReprojection.js +1 -1
- package/views/webgl/ShaderBuilder.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/TextureDescriptor.js +1 -1
- package/webscene/Slide.js +1 -1
- package/widgets/CatalogLayerList/CatalogLayerListViewModel.js +1 -1
- package/widgets/CatalogLayerList.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/LayerList/ListItem.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Legend.js +1 -1
- package/widgets/TableList/ListItem.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/widgets/ValuePicker.js +1 -1
- package/widgets/support/uriUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0059295780fa4a090f30.js +0 -319
- package/assets/esri/core/workers/chunks/07910d16d1efae41d4bc.js +0 -1
- package/assets/esri/core/workers/chunks/0a3c1642cfabf9acd5c5.js +0 -1
- package/assets/esri/core/workers/chunks/0b7331613f91a3258352.js +0 -1
- package/assets/esri/core/workers/chunks/1a09dfb2c9fd7cd84cd4.js +0 -1
- package/assets/esri/core/workers/chunks/1dd6d68d23ba07587ae4.js +0 -1
- package/assets/esri/core/workers/chunks/2079f9d28e4199714f22.js +0 -1
- package/assets/esri/core/workers/chunks/29ba2022c2978e9bd53e.js +0 -1
- package/assets/esri/core/workers/chunks/29fe3e9a0ecab74bb729.js +0 -1
- package/assets/esri/core/workers/chunks/35f3eef81fac7924a487.js +0 -1
- package/assets/esri/core/workers/chunks/3fc18638f8799b85001d.js +0 -1
- package/assets/esri/core/workers/chunks/4539a802cba77a7a7cc7.js +0 -1
- package/assets/esri/core/workers/chunks/4d7bd2bbe9045a2fee7a.js +0 -1
- package/assets/esri/core/workers/chunks/50b6be13c270d7ac80d3.js +0 -1
- package/assets/esri/core/workers/chunks/54ace3e4802934f3f9f2.js +0 -1
- package/assets/esri/core/workers/chunks/5656cc44e3d4547668db.js +0 -1
- package/assets/esri/core/workers/chunks/597f450a57750637cb4d.js +0 -1
- package/assets/esri/core/workers/chunks/6e7577cb6378ff34e722.js +0 -1
- package/assets/esri/core/workers/chunks/6eb8d7edafeafeb10cae.js +0 -1
- package/assets/esri/core/workers/chunks/6ff981ec0c725efe5525.js +0 -1
- package/assets/esri/core/workers/chunks/71bd94cc789a55910f92.js +0 -1
- package/assets/esri/core/workers/chunks/762567124623f6d11e67.js +0 -1
- package/assets/esri/core/workers/chunks/77845cd5d824c1004bfa.js +0 -1
- package/assets/esri/core/workers/chunks/78683f1aadc1377be5fd.js +0 -1
- package/assets/esri/core/workers/chunks/7a4413a188a8f1affb2f.js +0 -1
- package/assets/esri/core/workers/chunks/7d3b2bdc75525d47389c.js +0 -1
- package/assets/esri/core/workers/chunks/81bf362ec0d23ffdc90c.js +0 -39
- package/assets/esri/core/workers/chunks/81f2f1614ea27f4c2e65.js +0 -1
- package/assets/esri/core/workers/chunks/901c957c049f53318e87.js +0 -1
- package/assets/esri/core/workers/chunks/94f41ef15f6c61562e5e.js +0 -1
- package/assets/esri/core/workers/chunks/95f23bd17ce9e07fc8ef.js +0 -1
- package/assets/esri/core/workers/chunks/96d7f47ea8fbf345101c.js +0 -1
- package/assets/esri/core/workers/chunks/9f312f7284e506a84ed7.js +0 -1
- package/assets/esri/core/workers/chunks/a59ad50d932da1e28c8f.js +0 -1
- package/assets/esri/core/workers/chunks/ac86d0b31f6368bd1fb1.js +0 -1
- package/assets/esri/core/workers/chunks/ad9b3b83aa96db7b79ea.js +0 -1
- package/assets/esri/core/workers/chunks/afe94e351b4a50d7bc53.js +0 -1
- package/assets/esri/core/workers/chunks/b02ac03503bfff1ff922.js +0 -1
- package/assets/esri/core/workers/chunks/b8416f2560710258c239.js +0 -1
- package/assets/esri/core/workers/chunks/b948fe33b4d650eea796.js +0 -1
- package/assets/esri/core/workers/chunks/ba47e43ef039fe4b8c5c.js +0 -1
- package/assets/esri/core/workers/chunks/be002f24beb832a369ce.js +0 -1
- package/assets/esri/core/workers/chunks/bf3c4c1bff8b71bc0b13.js +0 -1
- package/assets/esri/core/workers/chunks/d45ff061bf71b73e9f26.js +0 -1
- package/assets/esri/core/workers/chunks/d8ddff920725acb99200.js +0 -1
- package/assets/esri/core/workers/chunks/db4c110ab4c26c4b768c.js +0 -1
- package/assets/esri/core/workers/chunks/dfa4be2e07cc4c0938b0.js +0 -1
- package/assets/esri/core/workers/chunks/e088edb9ffbaa1ed12eb.js +0 -1
- package/assets/esri/core/workers/chunks/e0ac90b4ad8c36fb7d70.js +0 -1
- package/assets/esri/core/workers/chunks/e491daf73ab1264aa1b9.js +0 -1
- package/assets/esri/core/workers/chunks/f2a6287c8d28be24f71e.js +0 -1
- package/assets/esri/core/workers/chunks/f454e773505c0eef2f9d.js +0 -1
- package/assets/esri/core/workers/chunks/f4861d73c62096f73e48.js +0 -1
- package/assets/esri/core/workers/chunks/f70dd16f14279bb7e60d.js +0 -1
- package/assets/esri/core/workers/chunks/fa011ad649c05201e92a.js +0 -1
- package/views/3d/webgl-engine/lib/TextureCompressionWorker.js +0 -5
- package/views/3d/webgl-engine/lib/TextureCompressionWorkerHandle.js +0 -5
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{Float16Array as e}from"@petamoriken/float16";import{i as t,H as r,t as i}from"../../../../chunks/vec32.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{newLayout as s}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as n,isColor as o,isDepth as h,isColorHighlightOrDepth as c,isColorOrColorEmission as p}from"../core/shaderLibrary/ShaderOutput.js";import m from"../lib/GLMaterial.js";import{Material as l,RenderOccludedFlag as u}from"../lib/Material.js";import{RenderSlot as T}from"../lib/RenderSlot.js";import{VertexAttribute as f}from"../lib/VertexAttribute.js";import{VisualVariablePassParameters as d}from"./VisualVariablePassParameters.js";import{vertexAttributeLocations as
|
|
5
|
+
import{Float16Array as e}from"@petamoriken/float16";import{i as t,H as r,t as i}from"../../../../chunks/vec32.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{newLayout as s}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as n,isColor as o,isDepth as h,isColorHighlightOrDepth as c,isColorOrColorEmission as p}from"../core/shaderLibrary/ShaderOutput.js";import m from"../lib/GLMaterial.js";import{Material as l,RenderOccludedFlag as u}from"../lib/Material.js";import{RenderSlot as T}from"../lib/RenderSlot.js";import{VertexAttribute as f}from"../lib/VertexAttribute.js";import{VisualVariablePassParameters as d}from"./VisualVariablePassParameters.js";import{writeDeltaF16Vector as A}from"./internal/bufferWriterUtils.js";import{vertexAttributeLocations as v,LineMarkerTechnique as _}from"../shaders/LineMarkerTechnique.js";import{LineMarkerTechniqueConfiguration as E,LineMarkerSpace as g,LineMarkerAnchor as O}from"../shaders/LineMarkerTechniqueConfiguration.js";import{CapType as S}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as R}from"../../../../webscene/support/AlphaCutoff.js";class I extends l{constructor(e){super(e,C),this._configuration=new E,this.vertexAttributeLocations=v,this.produces=new Map([[T.OPAQUE_MATERIAL,e=>e===n.Highlight||o(e)&&this.parameters.renderOccluded===u.OccludeAndTransparentStencil],[T.OPAQUE_MATERIAL_WITHOUT_NORMALS,e=>h(e)],[T.OCCLUDER_MATERIAL,e=>c(e)&&this.parameters.renderOccluded===u.OccludeAndTransparentStencil],[T.TRANSPARENT_OCCLUDER_MATERIAL,e=>c(e)&&this.parameters.renderOccluded===u.OccludeAndTransparentStencil],[T.TRANSPARENT_MATERIAL,e=>o(e)&&this.parameters.writeDepth],[T.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>o(e)&&!this.parameters.writeDepth],[T.DRAPED_MATERIAL,e=>p(e)||e===n.Highlight]]),this._layout=this.createLayout()}getConfiguration(e,t){return super.getConfiguration(e,t,this._configuration),this._configuration.space=t.slot===T.DRAPED_MATERIAL?g.Draped:this.parameters.worldSpace?g.World:g.Screen,this._configuration.hideOnShortSegments=this.parameters.hideOnShortSegments,this._configuration.hasCap=this.parameters.cap!==S.BUTT,this._configuration.anchor=this.parameters.anchor,this._configuration.hasTip=this.parameters.hasTip,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasOccludees=t.hasOccludees,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.occluder=this.parameters.renderOccluded===u.OccludeAndTransparentStencil,this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest&&p(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}get visible(){return this.parameters.color[3]>=R}intersect(){}createLayout(){const e=s().vec3f(f.POSITION).vec4f16(f.PREVIOUSDELTA).vec2f16(f.UV0);return this.parameters.worldSpace&&e.vec3f16(f.NORMAL),this.parameters.vvSize?e.f16(f.SIZEFEATUREATTRIBUTE):e.f16(f.SIZE),this.parameters.vvColor?e.f16(f.COLORFEATUREATTRIBUTE):e.vec4u8(f.COLOR),this.parameters.vvOpacity&&e.f16(f.OPACITYFEATUREATTRIBUTE),e}createBufferWriter(){return new P(this._layout,this.parameters)}createGLMaterial(e){return new L(e)}}class L extends m{constructor(){super(...arguments),this._markerPrimitive=null}dispose(){super.dispose(),this._markerTextures.release(this._markerPrimitive),this._markerPrimitive=null}beginSlot(e){const t=this._material.parameters.markerPrimitive;return t!==this._markerPrimitive&&(this._material.setParameters({markerTexture:this._markerTextures.swap(t,this._markerPrimitive)}),this._markerPrimitive=t),this.getTechnique(_,e)}}class C extends d{constructor(){super(...arguments),this.width=0,this.color=[1,1,1,1],this.markerPrimitive="arrow",this.placement="end",this.cap=S.BUTT,this.anchor=O.Center,this.hasTip=!1,this.worldSpace=!1,this.hideOnShortSegments=!1,this.writeDepth=!0,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.markerTexture=null}}class P{constructor(e,t){this.vertexBufferLayout=e,this._parameters=t}elementCount(){return"begin-end"===this._parameters.placement?12:6}write(a,s,n,o,h,c){const p=n.get(f.POSITION).data,m=p.length/3;let l=[1,0,0];const u=n.get(f.NORMAL);this._parameters.worldSpace&&null!=u&&(l=u.data);let T=1,d=0;this._parameters.vvSize?d=n.get(f.SIZEFEATUREATTRIBUTE).data[0]:n.has(f.SIZE)&&(T=n.get(f.SIZE).data[0]);let v=[1,1,1,1],_=0;this._parameters.vvColor?_=n.get(f.COLORFEATUREATTRIBUTE).data[0]:n.has(f.COLOR)&&(v=n.get(f.COLOR).data);let E=0;this._parameters.vvOpacity&&(E=n.get(f.OPACITYFEATUREATTRIBUTE).data[0]);const g=new Float32Array(h.buffer),O=new e(h.buffer),S=new Uint8Array(h.buffer);let R=c*(this.vertexBufferLayout.stride/4);const I=(e,t,r,i)=>{g[R++]=e[0],g[R++]=e[1],g[R++]=e[2],A(t,e,O,2*R),R+=2;let a=2*R;if(O[a++]=r[0],O[a++]=r[1],this._parameters.worldSpace&&(O[a++]=l[0],O[a++]=l[1],O[a++]=l[2]),this._parameters.vvSize?O[a++]=d:O[a++]=T,this._parameters.vvColor)O[a++]=_;else{const e=Math.min(4*i,v.length-4),t=2*a;a+=2,S[t]=v[e],S[t+1]=v[e+1],S[t+2]=v[e+2],S[t+3]=v[e+3]}this._parameters.vvOpacity&&(O[a++]=E),R=Math.ceil(.5*a)};let L;!function(e){e[e.ASCENDING=1]="ASCENDING",e[e.DESCENDING=-1]="DESCENDING"}(L||(L={}));const C=(e,s)=>{const n=t(b,p[3*e],p[3*e+1],p[3*e+2]),o=D;let h=e+s;do{t(o,p[3*h],p[3*h+1],p[3*h+2]),h+=s}while(r(n,o)&&h>=0&&h<m);a&&(i(n,n,a),i(o,o,a)),I(n,o,[-1,-1],e),I(n,o,[1,-1],e),I(n,o,[1,1],e),I(n,o,[-1,-1],e),I(n,o,[1,1],e),I(n,o,[-1,1],e)},P=this._parameters.placement;return"begin"!==P&&"begin-end"!==P||C(0,L.ASCENDING),"end"!==P&&"begin-end"!==P||C(m-1,L.DESCENDING),null}}const b=a(),D=a();export{I as LineMarkerMaterial,C as Parameters};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{i as t,n as e,d as r,e as s,j as o,t as i}from"../../../../chunks/vec32.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{newLayout as c}from"../../support/buffer/InterleavedLayout.js";import{isColorOrColorEmission as
|
|
5
|
+
import{i as t,n as e,d as r,e as s,j as o,t as i}from"../../../../chunks/vec32.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{newLayout as c}from"../../support/buffer/InterleavedLayout.js";import{isColorOrColorEmission as u}from"../core/shaderLibrary/ShaderOutput.js";import l from"../lib/GLMaterial.js";import{Material as f,MaterialParameters as p}from"../lib/Material.js";import{RenderSlot as h}from"../lib/RenderSlot.js";import{VertexAttribute as m}from"../lib/VertexAttribute.js";import{vertexAttributeLocations as g,MeasurementArrowTechnique as d}from"../shaders/MeasurementArrowTechnique.js";import{MeasurementArrowTechniqueConfiguration as O}from"../shaders/MeasurementArrowTechniqueConfiguration.js";import{alphaCutoff as A}from"../../../../webscene/support/AlphaCutoff.js";class b extends f{constructor(t){super(t,C),this._configuration=new O,this.vertexAttributeLocations=g,this.produces=new Map([[h.OPAQUE_MATERIAL,t=>!this._transparent&&u(t)],[h.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,t=>this._transparent&&u(t)]])}getConfiguration(t,e){return super.getConfiguration(t,e,this._configuration),this._configuration.polygonOffsetEnabled=this.parameters.polygonOffset,this._configuration.transparent=this._transparent,this._configuration.oitPass=e.oitPass,this._configuration}get visible(){const{outlineColor:t,stripeEvenColor:e,stripeOddColor:r}=this.parameters;return t[3]>=A||e[3]>=A||r[3]>=A}intersect(){}createGLMaterial(t){return new v(t)}createBufferWriter(){return new E}get _transparent(){const{parameters:t}=this;return t.outlineColor[3]<1||t.stripeEvenColor[3]<1||t.stripeOddColor[3]<1}}class v extends l{beginSlot(t){return this.getTechnique(d,t)}}class C extends p{constructor(){super(...arguments),this.width=32,this.outlineSize=.2,this.outlineColor=a(1,.5,0,1),this.stripeEvenColor=a(1,1,1,1),this.stripeOddColor=a(1,.5,0,1),this.stripeLength=1,this.polygonOffset=!1}}const T=c().vec3f(m.POSITION).vec3f(m.NORMAL).vec2f(m.UV0).f32(m.LENGTH),_=n(),j=n(),L=n(),M=n(),w=n();class E{constructor(){this.vertexBufferLayout=T}elementCount(t){return 2*(t.get(m.POSITION).indices.length/2+1)}write(n,a,c,u,l,f){const{data:p,indices:h}=c.get(m.POSITION),g=c.get(m.NORMAL).data,d=p.length/3;h&&h.length!==2*(d-1)&&console.warn("MeasurementArrowMaterial does not support indices");const O=_,A=j,b=L,v=M,C=w,T=l.position,E=l.normal,I=l.uv0;let x=0;for(let m=0;m<d;++m){const c=3*m;if(t(O,p[c],p[c+1],p[c+2]),m<d-1){const o=3*(m+1);t(A,p[o],p[o+1],p[o+2]),t(C,g[o],g[o+1],g[o+2]),e(C,C),r(b,A,O),e(b,b),s(v,C,b),e(v,v)}const u=o(O,A);n&&a&&(i(O,O,n),i(A,A,n),i(v,v,a));const l=f+2*m,h=l+1;T.setVec(l,O),T.setVec(h,O),E.setVec(l,v),E.setVec(h,v),I.set(l,0,x),I.set(l,1,-1),I.set(h,0,x),I.set(h,1,1),m<d-1&&(x+=u)}const N=l.length;for(let t=0;t<2*d;++t)N.set(f+t,x);return null}}export{b as MeasurementArrowMaterial,C as Parameters};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../../core/Logger.js";import{clamp as r}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as t}from"../../../../core/screenUtils.js";import{copy as o}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{i as s,d as i,f as a,h as n,g as c,c as m,l,j as f}from"../../../../chunks/vec32.js";import{create as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as p}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{PlaneIndex as h}from"../../../../geometry/support/frustum.js";import{create as g,distance2 as d,fromPoints as j,closestLineSegmentPoint as b}from"../../../../geometry/support/lineSegment.js";import{create as A,fromPoints as S,signedDistance as x,getNormal as L}from"../../../../geometry/support/plane.js";import{isColorHighlightOrOID as y}from"../core/shaderLibrary/ShaderOutput.js";import N from"../lib/GLMaterial.js";import{Material as R,MaterialParameters as v}from"../lib/Material.js";import{RenderSlot as E}from"../lib/RenderSlot.js";import{isTranslationMatrix as M}from"../lib/Util.js";import{VertexAttribute as T}from"../lib/VertexAttribute.js";import{DefaultBufferWriter as _}from"./DefaultBufferWriter.js";import{PositionColorLayout as w,PositionLayout as
|
|
5
|
+
import e from"../../../../core/Logger.js";import{clamp as r}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as t}from"../../../../core/screenUtils.js";import{copy as o}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{i as s,d as i,f as a,h as n,g as c,c as m,l,j as f}from"../../../../chunks/vec32.js";import{create as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as p}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{PlaneIndex as h}from"../../../../geometry/support/frustum.js";import{create as g,distance2 as d,fromPoints as j,closestLineSegmentPoint as b}from"../../../../geometry/support/lineSegment.js";import{create as A,fromPoints as S,signedDistance as x,getNormal as L}from"../../../../geometry/support/plane.js";import{isColorHighlightOrOID as y}from"../core/shaderLibrary/ShaderOutput.js";import N from"../lib/GLMaterial.js";import{Material as R,MaterialParameters as v}from"../lib/Material.js";import{RenderSlot as E}from"../lib/RenderSlot.js";import{isTranslationMatrix as M}from"../lib/Util.js";import{VertexAttribute as T}from"../lib/VertexAttribute.js";import{DefaultBufferWriter as _}from"./DefaultBufferWriter.js";import{PositionColorLayout as w,PositionLayout as C}from"./DefaultLayouts.js";import{NativeLineTechnique as O}from"../shaders/NativeLineTechnique.js";import{NativeLineTechniqueConfiguration as V}from"../shaders/NativeLineTechniqueConfiguration.js";import{alphaCutoff as P}from"../../../../webscene/support/AlphaCutoff.js";class U extends R{constructor(e){super(e,q),this._configuration=new V,this.produces=new Map([[E.OPAQUE_MATERIAL,e=>y(e)]])}getConfiguration(e,r){return super.getConfiguration(e,r,this._configuration),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasVertexColors=this.parameters.hasVertexColors,this._configuration.transparent=this.parameters.color[3]<1||this.parameters.width<1,this._configuration.hasOccludees=r.hasOccludees,this._configuration}get visible(){return this.parameters.color[3]>=P}intersect(r,t,u,p,g,A){if(!u.options.selectionMode||!r.visible)return;if(!M(t))return void e.getLogger("esri.views.3d.webgl-engine.materials.NativeLineMaterial").error("intersection assumes a translation-only matrix");const y=r.attributes.get(T.POSITION).data,N=u.camera,R=H;o(R,u.point);const v=2;s(J[0],R[0]-v,R[1]+v,0),s(J[1],R[0]+v,R[1]+v,0),s(J[2],R[0]+v,R[1]-v,0),s(J[3],R[0]-v,R[1]-v,0);for(let e=0;e<4;e++)if(!N.unprojectFromRenderScreen(J[e],K[e]))return;S(N.eye,K[0],K[1],Y),S(N.eye,K[1],K[2],$),S(N.eye,K[2],K[3],ee),S(N.eye,K[3],K[0],re);let E=Number.MAX_VALUE,_=0;for(let e=0;e<y.length-5;e+=3){if(B[0]=y[e]+t[12],B[1]=y[e+1]+t[13],B[2]=y[e+2]+t[14],D[0]=y[e+3]+t[12],D[1]=y[e+4]+t[13],D[2]=y[e+5]+t[14],x(Y,B)<0&&x(Y,D)<0||x($,B)<0&&x($,D)<0||x(ee,B)<0&&x(ee,D)<0||x(re,B)<0&&x(re,D)<0)continue;if(N.projectToRenderScreen(B,G),N.projectToRenderScreen(D,k),G[2]<0&&k[2]>0){i(W,B,D);const e=N.frustum,r=-x(e[h.NEAR],B)/a(W,L(e[h.NEAR]));n(W,W,r),c(B,B,W),N.projectToRenderScreen(B,G)}else if(G[2]>0&&k[2]<0){i(W,D,B);const e=N.frustum,r=-x(e[h.NEAR],D)/a(W,L(e[h.NEAR]));n(W,W,r),c(D,D,W),N.projectToRenderScreen(D,k)}else if(G[2]<0&&k[2]<0)continue;G[2]=0,k[2]=0;const r=d(j(G,k,Z),R);r<E&&(E=r,m(F,B),m(Q,D),_=e/3)}const w=u.rayBegin,C=u.rayEnd;if(E<v*v){let e=Number.MAX_VALUE;if(b(j(F,Q,Z),j(w,C,z),X)){i(X,X,w);const r=l(X);n(X,X,1/r),e=r/f(w,C)}A(e,X,_,!1)}}intersectDraped(e,t,o,s,i,a){if(!o.options.selectionMode)return;const n=e.attributes.get(T.POSITION).data,c=e.attributes.get(T.SIZE),m=c?c.data[0]:0,l=s[0],f=s[1],u=((m+1)/2+4)*e.screenToWorldRatio;let p=Number.MAX_VALUE,h=0;for(let g=0;g<n.length-5;g+=3){const e=n[g],t=n[g+1],o=l-e,s=f-t,i=n[g+3]-e,a=n[g+4]-t,c=r((i*o+a*s)/(i*i+a*a),0,1),m=i*c-o,u=a*c-s,d=m*m+u*u;d<p&&(p=d,h=g/3)}p<u*u&&i(a.dist,a.normal,h,!1)}createGLMaterial(e){return new I(e)}createBufferWriter(){const e=this.parameters.hasVertexColors?w:C;return new _(e)}}class I extends N{beginSlot(e){return this.getTechnique(O,e)}}class q extends v{constructor(){super(...arguments),this.color=p,this.hasVertexColors=!1,this.hasSlicePlane=!1,this.width=1}}const B=u(),D=u(),W=u(),X=u(),G=t(),k=t(),F=u(),Q=u(),Z=g(),z=g(),H=u(),J=[t(),t(),t(),t()],K=[u(),u(),u(),u()],Y=A(),$=A(),ee=A(),re=A();export{U as NativeLineMaterial,q as Parameters};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{clamp as e}from"../../../../core/mathUtils.js";import{clone as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{p as i}from"../../../../chunks/vec32.js";import{ZEROS as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as s}from"../../../../geometry/support/aaBoundingBox.js";import{newLayout as a}from"../../support/buffer/InterleavedLayout.js";import{isShadowRelatedOutput as o,is3DGeometryOutputMRT as n,isColorOrColorEmission as c,ShaderOutput as h}from"../core/shaderLibrary/ShaderOutput.js";import{EmissionSource as u}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as m}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as l}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{olidEnabled as p}from"../effects/geometry/olidUtils.js";import f from"../lib/GLMaterial.js";import{Material as d}from"../lib/Material.js";import{isPathGeometry as b}from"../lib/PathGeometry.js";import{MeshIntersectionOptions as g,intersectAabbInvDir as v}from"../lib/RayIntersections.js";import{RenderSlot as S}from"../lib/RenderSlot.js";import{VertexAttribute as _}from"../lib/VertexAttribute.js";import{DefaultBufferWriter as y}from"./DefaultBufferWriter.js";import{vertexAttributeLocations as A,PathTechnique as O,PathPassParameters as j}from"./PathTechnique.js";import{PathTechniqueConfiguration as P}from"./PathTechniqueConfiguration.js";import{alphaCutoff as L}from"../../../../webscene/support/AlphaCutoff.js";class R extends d{constructor(e,t){super(e,x),this._vertexBufferLayout=T(),this.vertexAttributeLocations=A,this.supportsEdges=!0,this.produces=new Map([[S.OPAQUE_MATERIAL,e=>(this.parameters.castShadows&&o(e)||n(e))&&!this.transparent],[S.TRANSPARENT_MATERIAL,e=>(this.parameters.castShadows&&o(e)||n(e))&&this.transparent]]),this._configuration=new P(t.spherical)}get hasEmissions(){return!i(this.parameters.emissiveFactor,r)}getConfiguration(e,t){return this._configuration
|
|
5
|
+
import{clamp as e}from"../../../../core/mathUtils.js";import{clone as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{p as i}from"../../../../chunks/vec32.js";import{ZEROS as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as s}from"../../../../geometry/support/aaBoundingBox.js";import{newLayout as a}from"../../support/buffer/InterleavedLayout.js";import{isShadowRelatedOutput as o,is3DGeometryOutputMRT as n,isColorOrColorEmission as c,ShaderOutput as h}from"../core/shaderLibrary/ShaderOutput.js";import{EmissionSource as u}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as m}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as l}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{olidEnabled as p}from"../effects/geometry/olidUtils.js";import f from"../lib/GLMaterial.js";import{Material as d}from"../lib/Material.js";import{isPathGeometry as b}from"../lib/PathGeometry.js";import{MeshIntersectionOptions as g,intersectAabbInvDir as v}from"../lib/RayIntersections.js";import{RenderSlot as S}from"../lib/RenderSlot.js";import{VertexAttribute as _}from"../lib/VertexAttribute.js";import{DefaultBufferWriter as y}from"./DefaultBufferWriter.js";import{vertexAttributeLocations as A,PathTechnique as O,PathPassParameters as j}from"./PathTechnique.js";import{PathTechniqueConfiguration as P}from"./PathTechniqueConfiguration.js";import{alphaCutoff as L}from"../../../../webscene/support/AlphaCutoff.js";class R extends d{constructor(e,t){super(e,x),this._vertexBufferLayout=T(),this.vertexAttributeLocations=A,this.supportsEdges=!0,this.produces=new Map([[S.OPAQUE_MATERIAL,e=>(this.parameters.castShadows&&o(e)||n(e))&&!this.transparent],[S.TRANSPARENT_MATERIAL,e=>(this.parameters.castShadows&&o(e)||n(e))&&this.transparent]]),this._configuration=new P(t.spherical)}get hasEmissions(){return!i(this.parameters.emissiveFactor,r)}getConfiguration(e,t){return super.getConfiguration(e,t,this._configuration),this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.transparent,this._configuration.hasOccludees=t.hasOccludees,c(e)?(this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?m.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?m.WindingOrder:m.None,this._configuration.receiveShadows=t.shadowMap.enabled,this._configuration.receiveAmbientOcclusion=null!=t.ssao):this._configuration.receiveShadows=this._configuration.receiveAmbientOcclusion=!1,this._configuration.pbrMode=this.parameters.usePBR?l.Schematic:l.Disabled,this._configuration.emissionSource=this.parameters.usePBR?u.Value:u.None,this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}isVisibleForOutput(e){return e!==h.Shadow&&e!==h.ShadowExcludeHighlight&&e!==h.ShadowHighlight||this.parameters.castShadows}get visible(){return this.parameters.opacity>=L}intersect(i,r,a,o,n,c){const h=i;if(!b(h))return;const u=h.path,m=t(this.parameters.size);if(this.parameters.vvSize){const{offset:t,factor:i,minSize:r,maxSize:s,fallback:a}=this.parameters.vvSize,o=u.sizeAttributeValue;Number.isNaN(o)?(m[0]*=a[0],m[1]*=a[2]):(m[0]*=e(t[0]+o*i[0],r[0],s[0]),m[1]*=e(t[2]+o*i[2],r[2],s[2]))}const l=new g(!1,a.options.normalRequired),p=Math.max(m[0],m[1]),f=i.boundingInfo;if(null==f)return void M(u,m,o,n,l,c);const d=s(f.bbMin[0]-p,f.bbMin[1]-p,f.bbMin[2]-p,f.bbMax[0]+p,f.bbMax[1]+p,f.bbMax[2]+p),S=[n[0]-o[0],n[1]-o[1],n[2]-o[2]],_=Math.sqrt(S[0]*S[0]+S[1]*S[1]+S[2]*S[2]),y=[_/S[0],_/S[1],_/S[2]];v(d,o,y,a.tolerance)&&M(u,m,o,n,l,c)}createBufferWriter(){return new y(this._vertexBufferLayout)}createGLMaterial(e){return new w(e)}get transparent(){const{parameters:e}=this;return e.drivenOpacity||e.opacity<1}}function T(){const e=a().vec3f(_.POSITION).vec4f16(_.PROFILEVERTEXANDNORMAL).vec4f16(_.FEATUREVALUE).vec2f16(_.PROFILEAUXDATA).vec2i16(_.PROFILERIGHT,{glNormalized:!0}).vec2i16(_.PROFILEUP,{glNormalized:!0});return p()&&e.vec4u8(_.OLIDCOLOR),e}class w extends f{beginSlot(e){return this.getTechnique(O,e)}}function M(e,t,i,r,s,a){e.baked.size&&e.baked.size[0]===t[0]&&e.baked.size[1]===t[1]||e.baked.bake(t),e.baked.intersect(i,r,s,a)}class x extends j{constructor(){super(...arguments),this.doubleSided=!1,this.doubleSidedType="normal",this.castShadows=!0,this.hasSlicePlane=!1,this.drivenOpacity=!1,this.usePBR=!1}}export{x as Parameters,R as PathMaterial};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import{TextureCoordinateType as t}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{EmissionSource as o}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as r}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as i}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{parameter as s}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as a}from"./DefaultTechniqueConfiguration.js";class n extends a{constructor(e){super(),this.spherical=e,this.pbrMode=i.Disabled,this.doubleSidedMode=r.None,this.emissionSource=o.None,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.vvSize=!1,this.vvColor=!1,this.vvOpacity=!1,this.transparent=!1,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.textureCoordinateType=t.None,this.occlusionPass=!1,this.hasVvInstancing=!0,this.useCustomDTRExponentForWater=!1,this.useFillLights=!1,this.hasColorTexture=!1,this.objectAndLayerIdColorInstanced=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1}get discardInvisibleFragments(){return this.transparent}}e([s({count:i.COUNT})],n.prototype,"pbrMode",void 0),e([s({count:r.COUNT})],n.prototype,"doubleSidedMode",void 0),e([s({count:o.COUNT})],n.prototype,"emissionSource",void 0),e([s()],n.prototype,"receiveShadows",void 0),e([s()],n.prototype,"receiveAmbientOcclusion",void 0),e([s()],n.prototype,"vvSize",void 0),e([s()],n.prototype,"vvColor",void 0),e([s()],n.prototype,"vvOpacity",void 0),e([s()],n.prototype,"transparent",void 0),e([s()],n.prototype,"hasOccludees",void 0),e([s()],n.prototype,"terrainDepthTest",void 0),e([s()],n.prototype,"cullAboveTerrain",void 0);export{n as PathTechniqueConfiguration};
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import{TextureCoordinateType as t}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{EmissionSource as o}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as r}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as i}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{parameter as s}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as a}from"./DefaultTechniqueConfiguration.js";class n extends a{constructor(e){super(),this.spherical=e,this.pbrMode=i.Disabled,this.doubleSidedMode=r.None,this.emissionSource=o.None,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.vvSize=!1,this.vvColor=!1,this.vvOpacity=!1,this.transparent=!1,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.textureCoordinateType=t.None,this.occlusionPass=!1,this.hasVvInstancing=!0,this.useCustomDTRExponentForWater=!1,this.useFillLights=!1,this.hasColorTexture=!1,this.objectAndLayerIdColorInstanced=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.draped=!1,this.overlayEnabled=!1}get discardInvisibleFragments(){return this.transparent}}e([s({count:i.COUNT})],n.prototype,"pbrMode",void 0),e([s({count:r.COUNT})],n.prototype,"doubleSidedMode",void 0),e([s({count:o.COUNT})],n.prototype,"emissionSource",void 0),e([s()],n.prototype,"receiveShadows",void 0),e([s()],n.prototype,"receiveAmbientOcclusion",void 0),e([s()],n.prototype,"vvSize",void 0),e([s()],n.prototype,"vvColor",void 0),e([s()],n.prototype,"vvOpacity",void 0),e([s()],n.prototype,"transparent",void 0),e([s()],n.prototype,"hasOccludees",void 0),e([s()],n.prototype,"terrainDepthTest",void 0),e([s()],n.prototype,"cullAboveTerrain",void 0);export{n as PathTechniqueConfiguration};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{fromValues as
|
|
5
|
+
import{fromValues as e}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{BufferViewMat3f as t,BufferViewVec4f as r}from"../../../../geometry/support/buffer/BufferView.js";import{newLayout as s}from"../../support/buffer/InterleavedLayout.js";import{isHighlightOrOID as i,isColorOrColorEmission as o,isDepth as a,isColorEmissionHighlightOrOID as n}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as f}from"../effects/geometry/olidUtils.js";import{CullFaceOptions as c}from"../lib/basicInterfaces.js";import l from"../lib/GLMaterial.js";import{OITPolygonOffsetLimit as u}from"../lib/OrderIndependentTransparency.js";import{RenderSlot as p}from"../lib/RenderSlot.js";import{assert as h}from"../lib/Util.js";import{VertexAttribute as m}from"../lib/VertexAttribute.js";import{DefaultBufferWriter as d}from"./DefaultBufferWriter.js";import{Style as g}from"./PatternStyle.js";import{TriangleMaterial as A}from"./TriangleMaterial.js";import{VisualVariablePassParameters as T}from"./VisualVariablePassParameters.js";import{writeDefaultAttributes as b,writeBufferVec4 as v}from"./internal/bufferWriterUtils.js";import{vertexAttributeLocationsOID as O,vertexAttributeLocations as _,PatternTechnique as j}from"../shaders/PatternTechnique.js";import{PatternTechniqueConfiguration as C}from"../shaders/PatternTechniqueConfiguration.js";import{alphaCutoff as P}from"../../../../webscene/support/AlphaCutoff.js";class R extends A{constructor(e){super(e,I),this._configuration=new C,this.vertexAttributeLocations=f()?O:_,this.supportsEdges=!0,this.produces=new Map([[p.OPAQUE_MATERIAL,e=>i(e)],[p.TRANSPARENT_MATERIAL,e=>o(e)],[p.TRANSPARENT_MATERIAL_WITHOUT_NORMALS,e=>a(e)],[p.DRAPED_MATERIAL,e=>this.parameters.draped&&n(e)]])}getConfiguration(e,t){return super.getConfiguration(e,t,this._configuration),this._configuration.cullFace=this.parameters.cullFace,this._configuration.hasVertexColors=this.parameters.hasVertexColors&&!this.parameters.vvColor,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.polygonOffset=this.parameters.polygonOffset,this._configuration.style=this.parameters.style,this._configuration.draped=this.parameters.draped,this._configuration.oitPass=t.oitPass,this._configuration.enableOffset=t.camera.relativeElevation<u,this._configuration.terrainDepthTest=t.terrainDepthTest&&o(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration}get visible(){return this.parameters.color[3]>=P}createGLMaterial(e){return new y(e)}createBufferWriter(){const e=s().vec3f(m.POSITION).vec4f(m.UVMAPSPACE);return this.parameters.draped||e.mat3f(m.BOUNDINGRECT),this.parameters.vvColor?e.f32(m.COLORFEATUREATTRIBUTE):e.vec4u8(m.COLOR),f()&&e.vec4u8(m.OLIDCOLOR),new E(e)}}class y extends l{beginSlot(e){return this.getTechnique(j,e)}}class E extends d{write(e,s,i,o,a,n){const f=b(i,o,this.vertexBufferLayout,e,s,a,n);for(const c of this.vertexBufferLayout.fields.keys()){const s=i.get(c),o=s?.indices;if(s&&o)switch(c){case m.UVMAPSPACE:{h(4===s.size);const e=a.getField(c,r);e&&v(s,e,n);break}case m.BOUNDINGRECT:{h(9===s.size);const r=a.getField(c,t);r&&L(s,e,r,n);break}}}return f}}function L(e,t,r,s){const{data:i,indices:o}=e,a=t,n=r.typedBuffer,f=r.typedBufferStride,c=o.length;s*=f;for(let l=0;l<c;++l){const e=9*o[l],t=i[e],r=i[e+1],c=i[e+2];n[s]=a[0]*t+a[4]*r+a[8]*c+a[12],n[s+1]=a[1]*t+a[5]*r+a[9]*c+a[13],n[s+2]=a[2]*t+a[6]*r+a[10]*c+a[14];for(let o=3;o<9;++o)n[s+o]=i[e+o];s+=f}}class I extends T{constructor(){super(...arguments),this.color=e(1,1,1,1),this.hasVertexColors=!1,this.polygonOffset=!1,this.hasSlicePlane=!1,this.cullFace=c.None,this.hasOccludees=!1,this.style=g.Cross,this.draped=!0}}export{I as Parameters,R as PatternMaterial};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{Float16Array as e}from"@petamoriken/float16";import t from"../../../../core/Logger.js";import{clamp as r}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as i}from"../../../../core/screenUtils.js";import{copy as s}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{i as a,d as n,f as o,h as l,g as c,c as p,l as h,j as m,t as u}from"../../../../chunks/vec32.js";import{create as f}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as T}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{PlaneIndex as d}from"../../../../geometry/support/frustum.js";import{create as _,distance2 as E,fromPoints as A,closestLineSegmentPoint as R}from"../../../../geometry/support/lineSegment.js";import{create as g,fromPoints as O,signedDistance as S,getNormal as I}from"../../../../geometry/support/plane.js";import{newLayout as v}from"../../support/buffer/InterleavedLayout.js";import{isHighlightOrOID as P,isColorOrColorEmission as N,isDepth as L,isColorEmissionHighlightOIDOrDepth as b,is2DGeometryOutput as C,ShaderOutput as U}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as y}from"../effects/geometry/olidUtils.js";import j from"../lib/GLMaterial.js";import{Material as D,RenderOccludedFlag as w}from"../lib/Material.js";import{RenderSlot as F}from"../lib/RenderSlot.js";import{isTranslationMatrix as M}from"../lib/Util.js";import{VertexAttribute as x}from"../lib/VertexAttribute.js";import{VisualVariablePassParameters as J}from"./VisualVariablePassParameters.js";import{LineMarkerAnchor as B}from"../shaders/LineMarkerTechniqueConfiguration.js";import{r as z}from"../../../../chunks/RibbonLine.glsl.js";import{vertexAttributeLocations as H,RibbonLineTechnique as G}from"../shaders/RibbonLineTechnique.js";import{RibbonLineTechniqueConfiguration as k,CapType as V}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as Z}from"../../../../webscene/support/AlphaCutoff.js";var W;!function(e){e[e.LEFT_JOIN_START=-2]="LEFT_JOIN_START",e[e.LEFT_JOIN_END=-1]="LEFT_JOIN_END",e[e.LEFT_CAP_START=-4]="LEFT_CAP_START",e[e.LEFT_CAP_END=-5]="LEFT_CAP_END",e[e.RIGHT_JOIN_START=2]="RIGHT_JOIN_START",e[e.RIGHT_JOIN_END=1]="RIGHT_JOIN_END",e[e.RIGHT_CAP_START=4]="RIGHT_CAP_START",e[e.RIGHT_CAP_END=5]="RIGHT_CAP_END"}(W||(W={}));class Y extends D{constructor(e){super(e,X),this._configuration=new k,this.vertexAttributeLocations=H,this.produces=new Map([[F.OPAQUE_MATERIAL,e=>P(e)||N(e)&&this.parameters.renderOccluded===w.OccludeAndTransparentStencil],[F.OPAQUE_MATERIAL_WITHOUT_NORMALS,e=>L(e)],[F.OCCLUDER_MATERIAL,e=>b(e)&&this.parameters.renderOccluded===w.OccludeAndTransparentStencil],[F.TRANSPARENT_OCCLUDER_MATERIAL,e=>b(e)&&this.parameters.renderOccluded===w.OccludeAndTransparentStencil],[F.TRANSPARENT_MATERIAL,e=>N(e)&&this.parameters.writeDepth&&this.parameters.renderOccluded!==w.OccludeAndTransparentStencil],[F.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>N(e)&&!this.parameters.writeDepth&&this.parameters.renderOccluded!==w.OccludeAndTransparentStencil],[F.DRAPED_MATERIAL,e=>C(e)]])}getConfiguration(e,t){this._configuration.output=e,this._configuration.oitPass=t.oitPass,this._configuration.draped=t.slot===F.DRAPED_MATERIAL;const r=null!=this.parameters.stipplePattern&&e!==U.Highlight;return this._configuration.stippleEnabled=r,this._configuration.stippleOffColorEnabled=r&&null!=this.parameters.stippleOffColor,this._configuration.stipplePreferContinuous=r&&this.parameters.stipplePreferContinuous,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.roundJoins="round"===this.parameters.join,this._configuration.capType=this.parameters.cap,this._configuration.applyMarkerOffset=null!=this.parameters.markerParameters&&ee(this.parameters.markerParameters),this._configuration.hasPolygonOffset=this.parameters.hasPolygonOffset,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.innerColorEnabled=this.parameters.innerWidth>0&&null!=this.parameters.innerColor,this._configuration.falloffEnabled=this.parameters.falloff>0,this._configuration.hasOccludees=t.hasOccludees,this._configuration.occluder=this.parameters.renderOccluded===w.OccludeAndTransparentStencil,this._configuration.terrainDepthTest=t.terrainDepthTest&&N(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration.wireframe=this.parameters.wireframe,this._configuration}get visible(){return this.parameters.color[3]>=Z||null!=this.parameters.stipplePattern&&(this.parameters.stippleOffColor?.[3]??0)>Z}intersectDraped({attributes:e,screenToWorldRatio:t},i,s,a,n,o){if(!s.options.selectionMode)return;const l=e.get(x.SIZE);let c=this.parameters.width;if(this.parameters.vvSize){const t=e.get(x.SIZEFEATUREATTRIBUTE).data[0];Number.isNaN(t)?c*=this.parameters.vvSize.fallback[0]:c*=r(this.parameters.vvSize.offset[0]+t*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else l&&(c*=l.data[0]);const p=a[0],h=a[1],m=(c/2+4)*t;let u=Number.MAX_VALUE,f=0;const T=e.get(x.POSITION).data,d=$(this.parameters,e)?T.length-2:T.length-5;for(let _=0;_<d;_+=3){const e=T[_],t=T[_+1],i=(_+3)%T.length,s=p-e,a=h-t,n=T[i]-e,o=T[i+1]-t,l=r((n*s+o*a)/(n*n+o*o),0,1),c=n*l-s,m=o*l-a,d=c*c+m*m;d<u&&(u=d,f=_/3)}u<m*m&&n(o.dist,o.normal,f,!1)}intersect(e,i,u,f,T,_){if(!u.options.selectionMode||!e.visible)return;if(!M(i))return void t.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial").error("intersection assumes a translation-only matrix");const g=e.attributes,v=g.get(x.POSITION).data;let P=this.parameters.width;if(this.parameters.vvSize){const e=g.get(x.SIZEFEATUREATTRIBUTE).data[0];Number.isNaN(e)||(P*=r(this.parameters.vvSize.offset[0]+e*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0]))}else g.has(x.SIZE)&&(P*=g.get(x.SIZE).data[0]);const N=u.camera,L=ae;s(L,u.point);const b=P*N.pixelRatio/2+4*N.pixelRatio;a(Te[0],L[0]-b,L[1]+b,0),a(Te[1],L[0]+b,L[1]+b,0),a(Te[2],L[0]+b,L[1]-b,0),a(Te[3],L[0]-b,L[1]-b,0);for(let t=0;t<4;t++)if(!N.unprojectFromRenderScreen(Te[t],de[t]))return;O(N.eye,de[0],de[1],_e),O(N.eye,de[1],de[2],Ee),O(N.eye,de[2],de[3],Ae),O(N.eye,de[3],de[0],Re);let C=Number.MAX_VALUE,U=0;const y=$(this.parameters,g)?v.length-2:v.length-5;for(let t=0;t<y;t+=3){te[0]=v[t]+i[12],te[1]=v[t+1]+i[13],te[2]=v[t+2]+i[14];const e=(t+3)%v.length;if(re[0]=v[e]+i[12],re[1]=v[e+1]+i[13],re[2]=v[e+2]+i[14],S(_e,te)<0&&S(_e,re)<0||S(Ee,te)<0&&S(Ee,re)<0||S(Ae,te)<0&&S(Ae,re)<0||S(Re,te)<0&&S(Re,re)<0)continue;if(N.projectToRenderScreen(te,ne),N.projectToRenderScreen(re,oe),ne[2]<0&&oe[2]>0){n(ie,te,re);const e=N.frustum,t=-S(e[d.NEAR],te)/o(ie,I(e[d.NEAR]));l(ie,ie,t),c(te,te,ie),N.projectToRenderScreen(te,ne)}else if(ne[2]>0&&oe[2]<0){n(ie,re,te);const e=N.frustum,t=-S(e[d.NEAR],re)/o(ie,I(e[d.NEAR]));l(ie,ie,t),c(re,re,ie),N.projectToRenderScreen(re,oe)}else if(ne[2]<0&&oe[2]<0)continue;ne[2]=0,oe[2]=0;const r=E(A(ne,oe,pe),L);r<C&&(C=r,p(le,te),p(ce,re),U=t/3)}const j=u.rayBegin,D=u.rayEnd;if(C<b*b){let e=Number.MAX_VALUE;if(R(A(le,ce,pe),A(j,D,he),se)){n(se,se,j);const t=h(se);l(se,se,1/t),e=t/m(j,D)}_(e,se,U,!1)}}get _layout(){const e=v().vec3f(x.POSITION).vec3f(x.PREVPOSITION).vec3f(x.NEXTPOSITION).f32(x.U0).vec2f16(x.LINEPARAMETERS);return this.parameters.vvColor?e.f16(x.COLORFEATUREATTRIBUTE):e.vec4u8(x.COLOR),this.parameters.vvSize?e.f16(x.SIZEFEATUREATTRIBUTE):e.f16(x.SIZE),this.parameters.vvOpacity&&e.f16(x.OPACITYFEATUREATTRIBUTE),y()&&e.vec4u8(x.OLIDCOLOR),e}createBufferWriter(){return new Q(this._layout,this.parameters)}createGLMaterial(e){return new q(e)}validateParameters(e){"miter"!==e.join&&(e.miterLimit=0),null!=e.markerParameters&&(e.markerScale=e.markerParameters.width/e.width)}}class q extends j{constructor(){super(...arguments),this._stipplePattern=null}dispose(){super.dispose(),this._stippleTextures.release(this._stipplePattern),this._stipplePattern=null}beginSlot(e){const t=this._material.parameters.stipplePattern;return this._stipplePattern!==t&&(this._material.setParameters({stippleTexture:this._stippleTextures.swap(t,this._stipplePattern)}),this._stipplePattern=t),this.getTechnique(G,e)}}class X extends J{constructor(){super(...arguments),this.width=0,this.color=T,this.join="miter",this.cap=V.BUTT,this.miterLimit=5,this.writeDepth=!0,this.hasPolygonOffset=!1,this.stippleTexture=null,this.stipplePreferContinuous=!0,this.markerParameters=null,this.markerScale=1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.isClosed=!1,this.falloff=0,this.innerWidth=0,this.wireframe=!1}get transparent(){return this.color[3]<1||null!=this.stipplePattern&&(this.stippleOffColor?.[3]??0)<1}}class Q{constructor(e,t){this.vertexBufferLayout=e,this._parameters=t,this.numJoinSubdivisions=0;const r=t.stipplePattern?1:0;switch(this._parameters.join){case"miter":case"bevel":this.numJoinSubdivisions=r;break;case"round":this.numJoinSubdivisions=z+r}}_isClosed(e){return $(this._parameters,e)}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){const t=2,r=e.get(x.POSITION).indices.length/2+1,i=this._isClosed(e);let s=i?2:2*t;return s+=((i?r:r-1)-(i?0:1))*(2*this.numJoinSubdivisions+4),s+=2,this._parameters.wireframe&&(s=2+4*(s-2)),s}write(t,r,i,s,n,o){const l=i.get(x.POSITION),c=l.indices,h=l.data.length/3,f=i.get(x.DISTANCETOSTART)?.data;c&&c.length!==2*(h-1)&&console.warn("RibbonLineMaterial does not support indices");const T=i.get(x.SIZEFEATUREATTRIBUTE)?.data[0]??i.get(x.SIZE)?.data[0]??1;let d=[1,1,1,1],_=0;const E=this.vertexBufferLayout.fields.has(x.COLORFEATUREATTRIBUTE);E?_=i.get(x.COLORFEATUREATTRIBUTE).data[0]:i.has(x.COLOR)&&(d=i.get(x.COLOR).data);const A=this.vertexBufferLayout.fields.has(x.OPACITYFEATUREATTRIBUTE),R=A?i.get(x.OPACITYFEATUREATTRIBUTE).data[0]:0,g=new Float32Array(n.buffer),O=new e(n.buffer),S=new Uint8Array(n.buffer),I=this.vertexBufferLayout.stride/4;let v=o*I;const P=v;let N=0;const L=f?(e,t,r)=>N=f[r]:(e,t,r)=>N+=m(e,t),b=(e,t,r,i,a,n,o)=>{g[v++]=t[0],g[v++]=t[1],g[v++]=t[2],g[v++]=e[0],g[v++]=e[1],g[v++]=e[2],g[v++]=r[0],g[v++]=r[1],g[v++]=r[2],g[v++]=o;let l=2*v;if(O[l++]=i,O[l++]=a,E)O[l++]=_;else{const e=Math.min(4*n,d.length-4),t=2*l;l+=2,S[t]=d[e],S[t+1]=d[e+1],S[t+2]=d[e+2],S[t+3]=d[e+3]}O[l++]=T,A&&(O[l++]=R);let c=2*l;y()&&s&&(S[c++]=s[0],S[c++]=s[1],S[c++]=s[2],S[c++]=s[3]),v=Math.ceil(.25*c)};v+=I;const C=a(ue,l.data[0],l.data[1],l.data[2]);t&&u(C,C,t);const U=this._isClosed(i),j=me,D=fe;if(U){const e=l.data.length-3;a(j,l.data[e],l.data[e+1],l.data[e+2]),t&&u(j,j,t)}else a(D,l.data[3],l.data[4],l.data[5]),t&&u(D,D,t),b(C,C,D,1,W.LEFT_CAP_START,0,0),b(C,C,D,1,W.RIGHT_CAP_START,0,0),p(j,C),p(C,D);const w=U?0:1,F=U?h:h-1;for(let e=w;e<F;e++){const r=(e+1)%h*3;a(D,l.data[r],l.data[r+1],l.data[r+2]),t&&u(D,D,t),L(j,C,e),b(j,C,D,0,W.LEFT_JOIN_END,e,N),b(j,C,D,0,W.RIGHT_JOIN_END,e,N);const i=this.numJoinSubdivisions;for(let t=0;t<i;++t){const r=(t+1)/(i+1);b(j,C,D,r,W.LEFT_JOIN_END,e,N),b(j,C,D,r,W.RIGHT_JOIN_END,e,N)}b(j,C,D,1,W.LEFT_JOIN_START,e,N),b(j,C,D,1,W.RIGHT_JOIN_START,e,N),p(j,C),p(C,D)}U?(a(D,l.data[3],l.data[4],l.data[5]),t&&u(D,D,t),N=L(j,C,F),b(j,C,D,0,W.LEFT_JOIN_END,w,N),b(j,C,D,0,W.RIGHT_JOIN_END,w,N)):(N=L(j,C,F),b(j,C,C,0,W.LEFT_CAP_END,F,N),b(j,C,C,0,W.RIGHT_CAP_END,F,N)),K(g,P+I,g,P,I);return v=K(g,v-I,g,v,I),this._parameters.wireframe&&this._addWireframeVertices(n,P,v,I),null}_addWireframeVertices(e,t,r,i){const s=new Float32Array(e.buffer,r*Float32Array.BYTES_PER_ELEMENT),a=new Float32Array(e.buffer,t*Float32Array.BYTES_PER_ELEMENT,r-t);let n=0;const o=e=>n=K(a,e,s,n,i);for(let l=0;l<a.length-1;l+=2*i)o(l),o(l+2*i),o(l+1*i),o(l+2*i),o(l+1*i),o(l+3*i)}}function K(e,t,r,i,s){for(let a=0;a<s;a++)r[i++]=e[t++];return i}function $(e,t){if(!e.isClosed)return!1;return t.get(x.POSITION).indices.length>2}function ee(e){return e.anchor===B.Tip&&e.hideOnShortSegments&&"begin-end"===e.placement&&e.worldSpace}const te=f(),re=f(),ie=f(),se=f(),ae=f(),ne=i(),oe=i(),le=f(),ce=f(),pe=_(),he=_(),me=f(),ue=f(),fe=f(),Te=[i(),i(),i(),i()],de=[f(),f(),f(),f()],_e=g(),Ee=g(),Ae=g(),Re=g();export{X as Parameters,Y as RibbonLineMaterial};
|
|
5
|
+
import{Float16Array as e}from"@petamoriken/float16";import t from"../../../../core/Logger.js";import{clamp as r}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as i}from"../../../../core/screenUtils.js";import{copy as s}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{i as a,d as n,f as o,h as l,g as c,c as p,l as h,j as f,t as m}from"../../../../chunks/vec32.js";import{create as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as T}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{PlaneIndex as d}from"../../../../geometry/support/frustum.js";import{create as _,distance2 as E,fromPoints as A,closestLineSegmentPoint as R}from"../../../../geometry/support/lineSegment.js";import{create as g,fromPoints as S,signedDistance as O,getNormal as I}from"../../../../geometry/support/plane.js";import{newLayout as v}from"../../support/buffer/InterleavedLayout.js";import{isHighlightOrOID as P,isColorOrColorEmission as N,isDepth as L,isColorEmissionHighlightOIDOrDepth as b,is2DGeometryOutput as C,ShaderOutput as U}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as j}from"../effects/geometry/olidUtils.js";import y from"../lib/GLMaterial.js";import{Material as D,RenderOccludedFlag as w}from"../lib/Material.js";import{RenderSlot as F}from"../lib/RenderSlot.js";import{isTranslationMatrix as M}from"../lib/Util.js";import{VertexAttribute as x}from"../lib/VertexAttribute.js";import{VisualVariablePassParameters as J}from"./VisualVariablePassParameters.js";import{writeDeltaF16Vector as B}from"./internal/bufferWriterUtils.js";import{LineMarkerAnchor as z}from"../shaders/LineMarkerTechniqueConfiguration.js";import{r as H}from"../../../../chunks/RibbonLine.glsl.js";import{vertexAttributeLocations as G,RibbonLineTechnique as k}from"../shaders/RibbonLineTechnique.js";import{RibbonLineTechniqueConfiguration as V,CapType as W}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as Z}from"../../../../webscene/support/AlphaCutoff.js";var Y;!function(e){e[e.LEFT_JOIN_START=-2]="LEFT_JOIN_START",e[e.LEFT_JOIN_END=-1]="LEFT_JOIN_END",e[e.LEFT_CAP_START=-4]="LEFT_CAP_START",e[e.LEFT_CAP_END=-5]="LEFT_CAP_END",e[e.RIGHT_JOIN_START=2]="RIGHT_JOIN_START",e[e.RIGHT_JOIN_END=1]="RIGHT_JOIN_END",e[e.RIGHT_CAP_START=4]="RIGHT_CAP_START",e[e.RIGHT_CAP_END=5]="RIGHT_CAP_END"}(Y||(Y={}));class q extends D{constructor(e){super(e,Q),this._configuration=new V,this.vertexAttributeLocations=G,this.produces=new Map([[F.OPAQUE_MATERIAL,e=>P(e)||N(e)&&this.parameters.renderOccluded===w.OccludeAndTransparentStencil],[F.OPAQUE_MATERIAL_WITHOUT_NORMALS,e=>L(e)],[F.OCCLUDER_MATERIAL,e=>b(e)&&this.parameters.renderOccluded===w.OccludeAndTransparentStencil],[F.TRANSPARENT_OCCLUDER_MATERIAL,e=>b(e)&&this.parameters.renderOccluded===w.OccludeAndTransparentStencil],[F.TRANSPARENT_MATERIAL,e=>N(e)&&this.parameters.writeDepth&&this.parameters.renderOccluded!==w.OccludeAndTransparentStencil],[F.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>N(e)&&!this.parameters.writeDepth&&this.parameters.renderOccluded!==w.OccludeAndTransparentStencil],[F.DRAPED_MATERIAL,e=>C(e)]])}getConfiguration(e,t){super.getConfiguration(e,t,this._configuration),this._configuration.oitPass=t.oitPass,this._configuration.draped=t.slot===F.DRAPED_MATERIAL;const r=null!=this.parameters.stipplePattern&&e!==U.Highlight;return this._configuration.stippleEnabled=r,this._configuration.stippleOffColorEnabled=r&&null!=this.parameters.stippleOffColor,this._configuration.stipplePreferContinuous=r&&this.parameters.stipplePreferContinuous,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.roundJoins="round"===this.parameters.join,this._configuration.capType=this.parameters.cap,this._configuration.applyMarkerOffset=null!=this.parameters.markerParameters&&te(this.parameters.markerParameters),this._configuration.hasPolygonOffset=this.parameters.hasPolygonOffset,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.innerColorEnabled=this.parameters.innerWidth>0&&null!=this.parameters.innerColor,this._configuration.falloffEnabled=this.parameters.falloff>0,this._configuration.hasOccludees=t.hasOccludees,this._configuration.occluder=this.parameters.renderOccluded===w.OccludeAndTransparentStencil,this._configuration.terrainDepthTest=t.terrainDepthTest&&N(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration.wireframe=this.parameters.wireframe,this._configuration}get visible(){return this.parameters.color[3]>=Z||null!=this.parameters.stipplePattern&&(this.parameters.stippleOffColor?.[3]??0)>Z}intersectDraped({attributes:e,screenToWorldRatio:t},i,s,a,n,o){if(!s.options.selectionMode)return;const l=e.get(x.SIZE);let c=this.parameters.width;if(this.parameters.vvSize){const t=e.get(x.SIZEFEATUREATTRIBUTE).data[0];Number.isNaN(t)?c*=this.parameters.vvSize.fallback[0]:c*=r(this.parameters.vvSize.offset[0]+t*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else l&&(c*=l.data[0]);const p=a[0],h=a[1],f=(c/2+4)*t;let m=Number.MAX_VALUE,u=0;const T=e.get(x.POSITION).data,d=ee(this.parameters,e)?T.length-2:T.length-5;for(let _=0;_<d;_+=3){const e=T[_],t=T[_+1],i=(_+3)%T.length,s=p-e,a=h-t,n=T[i]-e,o=T[i+1]-t,l=r((n*s+o*a)/(n*n+o*o),0,1),c=n*l-s,f=o*l-a,d=c*c+f*f;d<m&&(m=d,u=_/3)}m<f*f&&n(o.dist,o.normal,u,!1)}intersect(e,i,m,u,T,_){if(!m.options.selectionMode||!e.visible)return;if(!M(i))return void t.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial").error("intersection assumes a translation-only matrix");const g=e.attributes,v=g.get(x.POSITION).data;let P=this.parameters.width;if(this.parameters.vvSize){const e=g.get(x.SIZEFEATUREATTRIBUTE).data[0];Number.isNaN(e)||(P*=r(this.parameters.vvSize.offset[0]+e*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0]))}else g.has(x.SIZE)&&(P*=g.get(x.SIZE).data[0]);const N=m.camera,L=ne;s(L,m.point);const b=P*N.pixelRatio/2+4*N.pixelRatio;a(de[0],L[0]-b,L[1]+b,0),a(de[1],L[0]+b,L[1]+b,0),a(de[2],L[0]+b,L[1]-b,0),a(de[3],L[0]-b,L[1]-b,0);for(let t=0;t<4;t++)if(!N.unprojectFromRenderScreen(de[t],_e[t]))return;S(N.eye,_e[0],_e[1],Ee),S(N.eye,_e[1],_e[2],Ae),S(N.eye,_e[2],_e[3],Re),S(N.eye,_e[3],_e[0],ge);let C=Number.MAX_VALUE,U=0;const j=ee(this.parameters,g)?v.length-2:v.length-5;for(let t=0;t<j;t+=3){re[0]=v[t]+i[12],re[1]=v[t+1]+i[13],re[2]=v[t+2]+i[14];const e=(t+3)%v.length;if(ie[0]=v[e]+i[12],ie[1]=v[e+1]+i[13],ie[2]=v[e+2]+i[14],O(Ee,re)<0&&O(Ee,ie)<0||O(Ae,re)<0&&O(Ae,ie)<0||O(Re,re)<0&&O(Re,ie)<0||O(ge,re)<0&&O(ge,ie)<0)continue;if(N.projectToRenderScreen(re,oe),N.projectToRenderScreen(ie,le),oe[2]<0&&le[2]>0){n(se,re,ie);const e=N.frustum,t=-O(e[d.NEAR],re)/o(se,I(e[d.NEAR]));l(se,se,t),c(re,re,se),N.projectToRenderScreen(re,oe)}else if(oe[2]>0&&le[2]<0){n(se,ie,re);const e=N.frustum,t=-O(e[d.NEAR],ie)/o(se,I(e[d.NEAR]));l(se,se,t),c(ie,ie,se),N.projectToRenderScreen(ie,le)}else if(oe[2]<0&&le[2]<0)continue;oe[2]=0,le[2]=0;const r=E(A(oe,le,he),L);r<C&&(C=r,p(ce,re),p(pe,ie),U=t/3)}const y=m.rayBegin,D=m.rayEnd;if(C<b*b){let e=Number.MAX_VALUE;if(R(A(ce,pe,he),A(y,D,fe),ae)){n(ae,ae,y);const t=h(ae);l(ae,ae,1/t),e=t/f(y,D)}_(e,ae,U,!1)}}get _layout(){const e=v().vec3f(x.POSITION).vec4f16(x.PREVIOUSDELTA).vec4f16(x.NEXTDELTA).f32(x.U0).vec2f16(x.LINEPARAMETERS);return this.parameters.vvColor?e.f16(x.COLORFEATUREATTRIBUTE):e.vec4u8(x.COLOR),this.parameters.vvSize?e.f16(x.SIZEFEATUREATTRIBUTE):e.f16(x.SIZE),this.parameters.vvOpacity&&e.f16(x.OPACITYFEATUREATTRIBUTE),j()&&e.vec4u8(x.OLIDCOLOR),e}createBufferWriter(){return new K(this._layout,this.parameters)}createGLMaterial(e){return new X(e)}validateParameters(e){"miter"!==e.join&&(e.miterLimit=0),null!=e.markerParameters&&(e.markerScale=e.markerParameters.width/e.width)}}class X extends y{constructor(){super(...arguments),this._stipplePattern=null}dispose(){super.dispose(),this._stippleTextures.release(this._stipplePattern),this._stipplePattern=null}beginSlot(e){const t=this._material.parameters.stipplePattern;return this._stipplePattern!==t&&(this._material.setParameters({stippleTexture:this._stippleTextures.swap(t,this._stipplePattern)}),this._stipplePattern=t),this.getTechnique(k,e)}}class Q extends J{constructor(){super(...arguments),this.width=0,this.color=T,this.join="miter",this.cap=W.BUTT,this.miterLimit=5,this.writeDepth=!0,this.hasPolygonOffset=!1,this.stippleTexture=null,this.stipplePreferContinuous=!0,this.markerParameters=null,this.markerScale=1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.isClosed=!1,this.falloff=0,this.innerWidth=0,this.wireframe=!1}get transparent(){return this.color[3]<1||null!=this.stipplePattern&&(this.stippleOffColor?.[3]??0)<1}}class K{constructor(e,t){this.vertexBufferLayout=e,this._parameters=t,this.numJoinSubdivisions=0;const r=t.stipplePattern?1:0;switch(this._parameters.join){case"miter":case"bevel":this.numJoinSubdivisions=r;break;case"round":this.numJoinSubdivisions=H+r}}_isClosed(e){return ee(this._parameters,e)}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){const t=2,r=e.get(x.POSITION).indices.length/2+1,i=this._isClosed(e);let s=i?2:2*t;return s+=((i?r:r-1)-(i?0:1))*(2*this.numJoinSubdivisions+4),s+=2,this._parameters.wireframe&&(s=2+4*(s-2)),s}write(t,r,i,s,n,o){const l=i.get(x.POSITION),c=l.indices,h=l.data.length/3,u=i.get(x.DISTANCETOSTART)?.data;c&&c.length!==2*(h-1)&&console.warn("RibbonLineMaterial does not support indices");const T=i.get(x.SIZEFEATUREATTRIBUTE)?.data[0]??i.get(x.SIZE)?.data[0]??1;let d=[1,1,1,1],_=0;const E=this.vertexBufferLayout.fields.has(x.COLORFEATUREATTRIBUTE);E?_=i.get(x.COLORFEATUREATTRIBUTE).data[0]:i.has(x.COLOR)&&(d=i.get(x.COLOR).data);const A=this.vertexBufferLayout.fields.has(x.OPACITYFEATUREATTRIBUTE),R=A?i.get(x.OPACITYFEATUREATTRIBUTE).data[0]:0,g=new Float32Array(n.buffer),S=new e(n.buffer),O=new Uint8Array(n.buffer),I=this.vertexBufferLayout.stride/4;let v=o*I;const P=v;let N=0;const L=u?(e,t,r)=>N=u[r]:(e,t,r)=>N+=f(e,t),b=(e,t,r,i,a,n,o)=>{g[v++]=t[0],g[v++]=t[1],g[v++]=t[2],B(e,t,S,2*v),v+=2,B(r,t,S,2*v),v+=2,g[v++]=o;let l=2*v;if(S[l++]=i,S[l++]=a,E)S[l++]=_;else{const e=Math.min(4*n,d.length-4),t=2*l;l+=2,O[t]=d[e],O[t+1]=d[e+1],O[t+2]=d[e+2],O[t+3]=d[e+3]}S[l++]=T,A&&(S[l++]=R);let c=2*l;j()&&s&&(O[c++]=s[0],O[c++]=s[1],O[c++]=s[2],O[c++]=s[3]),v=Math.ceil(.25*c)};v+=I,a(ue,l.data[0],l.data[1],l.data[2]),t&&m(ue,ue,t);const C=this._isClosed(i);if(C){const e=l.data.length-3;a(me,l.data[e],l.data[e+1],l.data[e+2]),t&&m(me,me,t)}else a(Te,l.data[3],l.data[4],l.data[5]),t&&m(Te,Te,t),b(ue,ue,Te,1,Y.LEFT_CAP_START,0,0),b(ue,ue,Te,1,Y.RIGHT_CAP_START,0,0),p(me,ue),p(ue,Te);const U=C?0:1,y=C?h:h-1;for(let e=U;e<y;e++){const r=(e+1)%h*3;a(Te,l.data[r],l.data[r+1],l.data[r+2]),t&&m(Te,Te,t),L(me,ue,e),b(me,ue,Te,0,Y.LEFT_JOIN_END,e,N),b(me,ue,Te,0,Y.RIGHT_JOIN_END,e,N);const i=this.numJoinSubdivisions;for(let t=0;t<i;++t){const r=(t+1)/(i+1);b(me,ue,Te,r,Y.LEFT_JOIN_END,e,N),b(me,ue,Te,r,Y.RIGHT_JOIN_END,e,N)}b(me,ue,Te,1,Y.LEFT_JOIN_START,e,N),b(me,ue,Te,1,Y.RIGHT_JOIN_START,e,N),p(me,ue),p(ue,Te)}C?(a(Te,l.data[3],l.data[4],l.data[5]),t&&m(Te,Te,t),N=L(me,ue,y),b(me,ue,Te,0,Y.LEFT_JOIN_END,U,N),b(me,ue,Te,0,Y.RIGHT_JOIN_END,U,N)):(N=L(me,ue,y),b(me,ue,ue,0,Y.LEFT_CAP_END,y,N),b(me,ue,ue,0,Y.RIGHT_CAP_END,y,N)),$(g,P+I,g,P,I);return v=$(g,v-I,g,v,I),this._parameters.wireframe&&this._addWireframeVertices(n,P,v,I),null}_addWireframeVertices(e,t,r,i){const s=new Float32Array(e.buffer,r*Float32Array.BYTES_PER_ELEMENT),a=new Float32Array(e.buffer,t*Float32Array.BYTES_PER_ELEMENT,r-t);let n=0;const o=e=>n=$(a,e,s,n,i);for(let l=0;l<a.length-1;l+=2*i)o(l),o(l+2*i),o(l+1*i),o(l+2*i),o(l+1*i),o(l+3*i)}}function $(e,t,r,i,s){for(let a=0;a<s;a++)r[i++]=e[t++];return i}function ee(e,t){if(!e.isClosed)return!1;return t.get(x.POSITION).indices.length>2}function te(e){return e.anchor===z.Tip&&e.hideOnShortSegments&&"begin-end"===e.placement&&e.worldSpace}const re=u(),ie=u(),se=u(),ae=u(),ne=u(),oe=i(),le=i(),ce=u(),pe=u(),he=_(),fe=_(),me=u(),ue=u(),Te=u(),de=[i(),i(),i(),i()],_e=[u(),u(),u(),u()],Ee=g(),Ae=g(),Re=g(),ge=g();export{Q as Parameters,q as RibbonLineMaterial};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{n as e,i as t,h as r,g as i}from"../../../../chunks/vec32.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{center as
|
|
5
|
+
import{n as e,i as t,h as r,g as i}from"../../../../chunks/vec32.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{center as n,scale as o}from"../../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f as c}from"../../../../geometry/support/buffer/BufferView.js";import{newLayout as h}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as l,isColorOrOID as p,isColorOrColorEmission as u}from"../core/shaderLibrary/ShaderOutput.js";import{CullFaceOptions as f}from"../lib/basicInterfaces.js";import m from"../lib/GLMaterial.js";import{Material as d,MaterialParameters as g}from"../lib/Material.js";import{intersectTriangleGeometry as S}from"../lib/RayIntersections.js";import{RenderSlot as b}from"../lib/RenderSlot.js";import{assert as T}from"../lib/Util.js";import{VertexAttribute as E}from"../lib/VertexAttribute.js";import{writeDefaultAttributes as A,writePosition as j}from"./internal/bufferWriterUtils.js";import{vertexAttributeLocations as F,ShadedColorMaterialTechnique as w}from"../shaders/ShadedColorMaterialTechnique.js";import{ShadedColorMaterialTechniqueConfiguration as _}from"../shaders/ShadedColorMaterialTechniqueConfiguration.js";import{alphaCutoff as v}from"../../../../webscene/support/AlphaCutoff.js";class x extends d{constructor(e){super(e,O),this._configuration=new _,this.vertexAttributeLocations=F,this.supportsEdges=!0,this.produces=new Map([[b.OPAQUE_MATERIAL,e=>e===l.Highlight||p(e)&&!this.parameters.transparent],[b.TRANSPARENT_MATERIAL,e=>p(e)&&this.parameters.transparent&&this.parameters.writeDepth],[b.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>p(e)&&this.parameters.transparent&&!this.parameters.writeDepth]])}getConfiguration(e,t){return super.getConfiguration(e,t,this._configuration),this._configuration.cullFace=this.parameters.cullFace,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.parameters.transparent,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.screenSizeEnabled=this.parameters.screenSizeEnabled,this._configuration.shadingEnabled=this.parameters.shadingEnabled,this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest&&u(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}get visible(){return this.parameters.color[3]>=v}intersect(e,s,a,c,h,l){if(this.parameters.screenSizeEnabled){const s=e.attributes.get(E.OFFSET),p={applyToVertex:(e,n,o,c)=>{const h=t(P,s.data[3*c],s.data[3*c+1],s.data[3*c+2]),l=t(I,e,n,o);return r(h,h,this.parameters.screenSizeScale*a.camera.computeScreenPixelSizeAt(h)),i(l,l,h),[l[0],l[1],l[2]]},applyToAabb:e=>{const t=n(e,P);return o(e,this.parameters.screenSizeScale*a.camera.computeScreenPixelSizeAt(t))}};S(e,a,c,h,p,l)}else S(e,a,c,h,void 0,l)}createGLMaterial(e){return new z(e)}createBufferWriter(){return new M(this.parameters.screenSizeEnabled)}}class z extends m{beginSlot(e){return this.getTechnique(w,e)}}class O extends g{constructor(){super(...arguments),this.color=a(1,1,1,1),this.shadingTint=a(0,0,0,.25),this.shadingDirection=e(s(),[.5,-.5,-.5]),this.screenSizeScale=14,this.forceTransparentMode=!1,this.writeDepth=!0,this.hasSlicePlane=!1,this.cullFace=f.None,this.screenSizeEnabled=!1,this.shadingEnabled=!0}get transparent(){return this.color[3]<1||this.forceTransparentMode}}class M{constructor(e){this.screenSizeEnabled=e;const t=h().vec3f(E.POSITION).vec3f(E.NORMAL);this.screenSizeEnabled&&t.vec3f(E.OFFSET),this.vertexBufferLayout=t}elementCount(e){return e.get(E.POSITION).indices.length}write(e,t,r,i,s,a){const n=A(r,i,this.vertexBufferLayout,e,t,s,a);if(this.screenSizeEnabled){if(!r.has(E.OFFSET))throw new Error(`${E.OFFSET} vertex attribute required for screenSizeEnabled ShadedColorMaterial`);{const e=r.get(E.OFFSET);T(3===e.size);const i=s.getField(E.OFFSET,c);if(!i)throw new Error("unable to acquire view for "+E.OFFSET);j(e,t,i,a)}}return n}}const P=s(),I=s();export{O as Parameters,x as ShadedColorMaterial};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../../core/has.js";import{secondsFromMilliseconds as t}from"../../../../core/time.js";import{fromValues as e}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as i}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isColorOrColorEmission as a,isHighlightOrOID as s,ShaderOutput as o}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as n}from"../effects/geometry/olidUtils.js";import{MaterialParameters as l}from"../lib/Material.js";import{OITPolygonOffsetLimit as
|
|
5
|
+
import"../../../../core/has.js";import{secondsFromMilliseconds as t}from"../../../../core/time.js";import{fromValues as e}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as i}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isColorOrColorEmission as a,isHighlightOrOID as s,ShaderOutput as o}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as n}from"../effects/geometry/olidUtils.js";import{MaterialParameters as l}from"../lib/Material.js";import{OITPolygonOffsetLimit as m}from"../lib/OrderIndependentTransparency.js";import{RenderSlot as c}from"../lib/RenderSlot.js";import{DefaultBufferWriter as h}from"./DefaultBufferWriter.js";import{PositionUvOlidLayout as f,PositionUvLayout as p}from"./DefaultLayouts.js";import{TriangleMaterial as u}from"./TriangleMaterial.js";import{WaterGLMaterial as d}from"./WaterGLMaterial.js";import{WaterTechniqueConfiguration as g}from"./WaterTechniqueConfiguration.js";class _ extends u{constructor(t,e){super(t,v),this.produces=new Map([[c.OPAQUE_MATERIAL,t=>a(t)&&!this.parameters.transparent||s(t)],[c.TRANSPARENT_MATERIAL,t=>a(t)&&this.parameters.transparent||s(t)],[c.DRAPED_MATERIAL,t=>this.parameters.draped&&a(t)||t===o.Normal||s(t)],[c.DRAPED_WATER,t=>t===o.Normal]]),this._configuration=new g(e.spherical)}getConfiguration(t,e){return super.getConfiguration(t,e,this._configuration),this._configuration.writeDepth=!0,this._configuration.receiveShadows=e.shadowMap.enabled,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.parameters.transparent,this._configuration.screenSpaceReflections=null!=e.ssr.lastFrameColor,this._configuration.cloudReflections=null!=e.clouds.data,this._configuration.draped=this.parameters.draped,this._configuration.oitPass=e.oitPass,this._configuration.enableOffset=e.camera.relativeElevation<m,this._configuration.terrainDepthTest=e.terrainDepthTest&&a(t),this._configuration.cullAboveTerrain=e.cullAboveTerrain,this._configuration}get visible(){return!0}update(e){return this.setParameters({timeElapsed:t(e.time)*this.parameters.animationSpeed},!1),this._animationEnabled(e.camera)&&e.dt>0}_animationEnabled(t){const e=Math.min(t.relativeElevation,t.distance);return Math.sqrt(this.parameters.waveTextureRepeat/this.parameters.waveStrength)*e<T}createGLMaterial(t){return new d(t)}createBufferWriter(){return new h(n()?f:p)}get test(){}}class v extends l{constructor(){super(...arguments),this.waveStrength=.06,this.waveTextureRepeat=32,this.waveDirection=e(1,0),this.waveVelocity=.05,this.flowStrength=.015,this.flowOffset=-.5,this.animationSpeed=.35,this.timeElapsed=0,this.color=i(0,0,0,0),this.transparent=!0,this.hasSlicePlane=!1,this.draped=!1,this.origin=r(),this.modelTransformation=null}}const T=35e3;export{v as Parameters,_ as WaterMaterial};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import{TextureCoordinateType as t}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{EmissionSource as r}from"../core/shaderLibrary/output/Emissions.glsl.js";import{PBRMode as o}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{parameter as s}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as i}from"./DefaultTechniqueConfiguration.js";class
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import{TextureCoordinateType as t}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{EmissionSource as r}from"../core/shaderLibrary/output/Emissions.glsl.js";import{PBRMode as o}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{parameter as s}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as i}from"./DefaultTechniqueConfiguration.js";class a extends i{constructor(e){super(),this.spherical=e,this.receiveShadows=!1,this.transparent=!1,this.enableOffset=!0,this.writeDepth=!1,this.screenSpaceReflections=!1,this.cloudReflections=!1,this.objectAndLayerIdColorInstanced=!1,this.draped=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.textureCoordinateType=t.None,this.emissionSource=r.None,this.pbrMode=o.Water,this.occlusionPass=!1,this.useCustomDTRExponentForWater=!0,this.highStepCount=!0,this.useFillLights=!1,this.overlayEnabled=!1}get discardInvisibleFragments(){return this.transparent&&this.writeDepth}}e([s()],a.prototype,"receiveShadows",void 0),e([s()],a.prototype,"transparent",void 0),e([s()],a.prototype,"enableOffset",void 0),e([s()],a.prototype,"writeDepth",void 0),e([s()],a.prototype,"screenSpaceReflections",void 0),e([s()],a.prototype,"cloudReflections",void 0),e([s()],a.prototype,"objectAndLayerIdColorInstanced",void 0),e([s()],a.prototype,"draped",void 0),e([s()],a.prototype,"terrainDepthTest",void 0),e([s()],a.prototype,"cullAboveTerrain",void 0);export{a as WaterTechniqueConfiguration};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{
|
|
5
|
+
import{d as e,l as t,h as f}from"../../../../../chunks/vec32.js";import{create as r}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{hasIdentityRotation as o,isOrthoNormal as i}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{BufferViewVec4u8 as s,BufferViewVec4f16 as n,BufferViewVec4f as c,BufferViewFloat as l,BufferViewVec2i16 as d,BufferViewVec2f16 as u,BufferViewVec3f as a}from"../../../../../geometry/support/buffer/BufferView.js";import{assert as p}from"../../lib/Util.js";import{VertexAttribute as y}from"../../lib/VertexAttribute.js";function B(e,t,f,r=1){const{data:o,indices:i}=e,s=t.typedBuffer,n=t.typedBufferStride,c=i.length;if(f*=n,1===r)for(let l=0;l<c;++l)s[f]=o[i[l]],f+=n;else for(let l=0;l<c;++l){const e=o[i[l]];for(let t=0;t<r;t++)s[f]=e,f+=n}}function g(e,t,f){const{data:r,indices:o}=e,i=t.typedBuffer,s=t.typedBufferStride,n=o.length;f*=s;for(let c=0;c<n;++c){const e=2*o[c];i[f]=r[e],i[f+1]=r[e+1],f+=s}}function m(e,t,f,r=1){const{data:o,indices:i}=e,s=t.typedBuffer,n=t.typedBufferStride,c=i.length;if(f*=n,1===r)for(let l=0;l<c;++l){const e=3*i[l];s[f]=o[e],s[f+1]=o[e+1],s[f+2]=o[e+2],f+=n}else for(let l=0;l<c;++l){const e=3*i[l];for(let t=0;t<r;++t)s[f]=o[e],s[f+1]=o[e+1],s[f+2]=o[e+2],f+=n}}function b(e,t,f,r=1){const{data:o,indices:i}=e,s=t.typedBuffer,n=t.typedBufferStride,c=i.length;if(f*=n,1===r)for(let l=0;l<c;++l){const e=4*i[l];s[f]=o[e],s[f+1]=o[e+1],s[f+2]=o[e+2],s[f+3]=o[e+3],f+=n}else for(let l=0;l<c;++l){const e=4*i[l];for(let t=0;t<r;++t)s[f]=o[e],s[f+1]=o[e+1],s[f+2]=o[e+2],s[f+3]=o[e+3],f+=n}}function O(e,t,f){const r=e.typedBuffer,o=e.typedBufferStride;t*=o;for(let i=0;i<f;++i)r[t]=0,r[t+1]=0,r[t+2]=0,r[t+3]=0,t+=o}function h(e,t,f){const{data:r,indices:o}=e,i=t.typedBuffer,s=t.typedBufferStride,n=o.length;f*=s;for(let c=0;c<n;++c){const e=9*o[c];for(let t=0;t<9;++t)i[f+t]=r[e+t];f+=s}}function S(e,t,f){const{data:r,indices:o}=e,i=t.typedBuffer,s=t.typedBufferStride,n=o.length;f*=s;for(let c=0;c<n;++c){const e=16*o[c];for(let t=0;t<16;++t)i[f+t]=r[e+t];f+=s}}function I(e,t,f,r,i=1){if(!t)return void m(e,f,r,i);const{data:s,indices:n}=e,c=f.typedBuffer,l=f.typedBufferStride,d=n.length,u=t[0],a=t[1],p=t[2],y=t[4],B=t[5],g=t[6],b=t[8],O=t[9],h=t[10],S=t[12],I=t[13],N=t[14];r*=l;let R=0,F=0,E=0;const v=o(t)?e=>{R=s[e]+S,F=s[e+1]+I,E=s[e+2]+N}:e=>{const t=s[e],f=s[e+1],r=s[e+2];R=u*t+y*f+b*r+S,F=a*t+B*f+O*r+I,E=p*t+g*f+h*r+N};if(1===i)for(let o=0;o<d;++o)v(3*n[o]),c[r]=R,c[r+1]=F,c[r+2]=E,r+=l;else for(let o=0;o<d;++o){v(3*n[o]);for(let e=0;e<i;++e)c[r]=R,c[r+1]=F,c[r+2]=E,r+=l}}function N(e,t,f,r,s=1){if(!t)return void m(e,f,r,s);const{data:n,indices:c}=e,l=t,d=f.typedBuffer,u=f.typedBufferStride,a=c.length,p=l[0],y=l[1],B=l[2],g=l[4],b=l[5],O=l[6],h=l[8],S=l[9],I=l[10],N=!i(l),R=1e-6,F=1-R;r*=u;let E=0,v=0,z=0;const A=o(l)?e=>{E=n[e],v=n[e+1],z=n[e+2]}:e=>{const t=n[e],f=n[e+1],r=n[e+2];E=p*t+g*f+h*r,v=y*t+b*f+S*r,z=B*t+O*f+I*r};if(1===s)if(N)for(let o=0;o<a;++o){A(3*c[o]);const e=E*E+v*v+z*z;if(e<F&&e>R){const t=1/Math.sqrt(e);d[r]=E*t,d[r+1]=v*t,d[r+2]=z*t}else d[r]=E,d[r+1]=v,d[r+2]=z;r+=u}else for(let o=0;o<a;++o)A(3*c[o]),d[r]=E,d[r+1]=v,d[r+2]=z,r+=u;else for(let o=0;o<a;++o){if(A(3*c[o]),N){const e=E*E+v*v+z*z;if(e<F&&e>R){const t=1/Math.sqrt(e);E*=t,v*=t,z*=t}}for(let e=0;e<s;++e)d[r]=E,d[r+1]=v,d[r+2]=z,r+=u}}function R(e,t,f,r,o=1){if(!t)return void b(e,f,r,o);const{data:s,indices:n}=e,c=t,l=f.typedBuffer,d=f.typedBufferStride,u=n.length,a=c[0],p=c[1],y=c[2],B=c[4],g=c[5],m=c[6],O=c[8],h=c[9],S=c[10],I=!i(c),N=1e-6,R=1-N;if(r*=d,1===o)for(let i=0;i<u;++i){const e=4*n[i],t=s[e],f=s[e+1],o=s[e+2],c=s[e+3];let u=a*t+B*f+O*o,b=p*t+g*f+h*o,F=y*t+m*f+S*o;if(I){const e=u*u+b*b+F*F;if(e<R&&e>N){const t=1/Math.sqrt(e);u*=t,b*=t,F*=t}}l[r]=u,l[r+1]=b,l[r+2]=F,l[r+3]=c,r+=d}else for(let i=0;i<u;++i){const e=4*n[i],t=s[e],f=s[e+1],c=s[e+2],u=s[e+3];let b=a*t+B*f+O*c,F=p*t+g*f+h*c,E=y*t+m*f+S*c;if(I){const e=b*b+F*F+E*E;if(e<R&&e>N){const t=1/Math.sqrt(e);b*=t,F*=t,E*=t}}for(let i=0;i<o;++i)l[r]=b,l[r+1]=F,l[r+2]=E,l[r+3]=u,r+=d}}function F(e,t,f,r,o=1){const{data:i,indices:s}=e,n=f.typedBuffer,c=f.typedBufferStride,l=s.length;if(r*=c,t!==i.length||4!==t)if(1!==o)if(4!==t)for(let d=0;d<l;++d){const e=3*s[d];for(let t=0;t<o;++t)n[r]=i[e],n[r+1]=i[e+1],n[r+2]=i[e+2],n[r+3]=255,r+=c}else for(let d=0;d<l;++d){const e=4*s[d];for(let t=0;t<o;++t)n[r]=i[e],n[r+1]=i[e+1],n[r+2]=i[e+2],n[r+3]=i[e+3],r+=c}else{if(4===t){for(let e=0;e<l;++e){const t=4*s[e];n[r]=i[t],n[r+1]=i[t+1],n[r+2]=i[t+2],n[r+3]=i[t+3],r+=c}return}for(let e=0;e<l;++e){const t=3*s[e];n[r]=i[t],n[r+1]=i[t+1],n[r+2]=i[t+2],n[r+3]=255,r+=c}}else{n[r]=i[0],n[r+1]=i[1],n[r+2]=i[2],n[r+3]=i[3];const e=new Uint32Array(f.typedBuffer.buffer,f.start),t=c/4,s=e[r/=4];r+=t;const d=l*o;for(let f=1;f<d;++f)e[r]=s,r+=t}}function E(e,t,f){const{data:r,indices:o}=e,i=t.typedBuffer,s=t.typedBufferStride,n=o.length,c=r[0];f*=s;for(let l=0;l<n;++l)i[f]=c,f+=s}function v(r,o,i,s){e(z,r,o);const n=Math.sqrt(t(z));n>0&&f(z,z,1/n),i[s++]=z[0],i[s++]=z[1],i[s++]=z[2],i[s++]=n}const z=r();function A(e,t,f,r,o=1){const i=t.typedBuffer,s=t.typedBufferStride;if(r*=s,1===o)for(let n=0;n<f;++n)i[r]=e[0],i[r+1]=e[1],i[r+2]=e[2],i[r+3]=e[3],r+=s;else for(let n=0;n<f;++n)for(let t=0;t<o;++t)i[r]=e[0],i[r+1]=e[1],i[r+2]=e[2],i[r+3]=e[3],r+=s}function L(e,t,f,r,o,i,n){let c={numItems:0,numVerticesPerItem:0};for(const l of f.fields.keys()){const f=e.get(l),d=f?.indices;if(f&&d)l===y.POSITION&&(c={numItems:1,numVerticesPerItem:d.length}),T(l,f,r,o,i,n);else if(l===y.OLIDCOLOR&&null!=t){const f=e.get(y.POSITION)?.indices;if(f){const e=f.length;A(t,i.getField(l,s),e,n)}}}return c}function T(e,t,f,r,o,i){switch(e){case y.POSITION:{p(3===t.size);const r=o.getField(e,a);p(!!r,`No buffer view for ${e}`),r&&I(t,f,r,i);break}case y.NORMAL:{p(3===t.size);const f=o.getField(e,a);p(!!f,`No buffer view for ${e}`),f&&N(t,r,f,i);break}case y.NORMALCOMPRESSED:case y.PROFILERIGHT:case y.PROFILEUP:{p(2===t.size);const f=o.getField(e,d);p(!!f,`No buffer view for ${e}`),f&&g(t,f,i);break}case y.UV0:case y.PROFILEAUXDATA:{p(2===t.size);const f=o.getField(e,u);p(!!f,`No buffer view for ${e}`),f&&g(t,f,i);break}case y.UVI:{p(2===t.size);const f=o.getField(e,d);p(!!f,`No buffer view for ${e}`),f&&g(t,f,i);break}case y.COLOR:case y.SYMBOLCOLOR:{const f=o.getField(e,s);p(!!f,`No buffer view for ${e}`),p(3===t.size||4===t.size),!f||3!==t.size&&4!==t.size||F(t,t.size,f,i);break}case y.COLORFEATUREATTRIBUTE:{const f=o.getField(e,l);p(!!f,`No buffer view for ${e}`),p(1===t.size),f&&1===t.size&&E(t,f,i);break}case y.TANGENT:{p(4===t.size);const r=o.getField(e,c);p(!!r,`No buffer view for ${e}`),r&&R(t,f,r,i);break}case y.PROFILEVERTEXANDNORMAL:case y.FEATUREVALUE:{p(4===t.size);const f=o.getField(e,n);p(!!f,`No buffer view for ${e}`),f&&b(t,f,i)}}}export{B as writeBufferFloat,h as writeBufferMat3f,S as writeBufferMat4f,g as writeBufferVec2,m as writeBufferVec3,b as writeBufferVec4,O as writeBufferVec4Zeros,F as writeColor,E as writeColorFeatureAttribute,T as writeDefaultAttribute,L as writeDefaultAttributes,v as writeDeltaF16Vector,N as writeNormal,A as writeOlidColor,I as writePosition,R as writeTangent};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import r from"../../../../core/Evented.js";import{unpackFloatRGBA as s}from"../../../../core/floatRGBA.js";import has from"../../../../core/has.js";import i from"../../../../core/Logger.js";import{removeMaybe as n,destroyMaybe as o}from"../../../../core/maybe.js";import{watch as a,initial as h,syncAndInitial as p}from"../../../../core/reactiveUtils.js";import{addFrameTask as d}from"../../../../core/scheduling.js";import{Milliseconds as c}from"../../../../core/time.js";import{property as l}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/RandomLCG.js";import{subclass as m}from"../../../../core/accessorSupport/decorators/subclass.js";import{isMoon as u,isMars as f}from"../../../../geometry/support/spatialReferenceUtils.js";import{ViewingMode as _}from"../../../ViewingMode.js";import{ChapmanAtmosphere as g}from"../../environment/ChapmanAtmosphere.js";import{CloudsComposition as w}from"../../environment/CloudsComposition.js";import{Fog as x}from"../../environment/Fog.js";import{LocalAtmosphere as v}from"../../environment/LocalAtmosphere.js";import j from"../../environment/MarsAtmosphere.js";import{ComponentObjectCollection as y}from"../collections/Component/ComponentObjectCollection.js";import{ShaderTechniqueConstructionContext as R}from"../core/shaderTechnique/ShaderTechniqueConstructionContext.js";import{ShaderTechniqueRepository as b}from"../core/shaderTechnique/ShaderTechniqueRepository.js";import{BloomRenderNode as A}from"../effects/bloom/BloomRenderNode.js";import{ObjectAndLayerIDRenderNode as S}from"../effects/geometry/ObjectAndLayerIDRenderNode.js";import{olidEnabled as C}from"../effects/geometry/olidUtils.js";import{RenderOccludedRenderNode as T}from"../effects/geometry/RenderOccludedRenderNode.js";import{Haze as O}from"../effects/haze/Haze.js";import{Highlight as U}from"../effects/highlight/Highlight.js";import{ShadowHighlight as q}from"../effects/highlight/ShadowHighlight.js";import{Magnifier as D}from"../effects/magnifier/Magnifier.js";import{SMAA as L}from"../effects/smaa/SMAA.js";import{SSAO as M}from"../effects/ssao/SSAO.js";import{Stars as k}from"../effects/stars/Stars.js";import{RenderRequestType as E}from"../lib/basicInterfaces.js";import B from"../lib/CompositingHelper.js";import{GLMaterialRepository as F}from"../lib/GLMaterialRepository.js";import{ObjectAndLayerIdRenderHelper as H}from"../lib/ObjectAndLayerIdRenderHelper.js";import{Renderer as W}from"../lib/Renderer.js";import{RenderingContext as G}from"../lib/RenderingContext.js";import{TextureRepository as N}from"../lib/TextureRepository.js";import{createMarkerTextureRepository as z}from"../materials/markerTextureRepository.js";import{createStippleTextureRepository as I}from"../materials/stippleTextureRepository.js";import{WaterTextureRepository as P}from"../materials/internal/WaterTextureRepository.js";import{getContextCache as K}from"./contextCache.js";import{removeLoadedShaderModules as V}from"./renderUtils.js";import{ScreenshotManager as X,ScreenshotContext as Q}from"./ScreenshotManager.js";import{contextCache as J}from"./testUtils.js";import{RenderState as Y}from"../../../support/RenderState.js";let Z=class extends t{constructor(e){super(e),this.events=new r,this.waterTextures=new P,this.olidRenderHelper=C()?new H:null,this._needsUpdate=!0,this._needsRender=!0,this._idleSuspend=!0,this._needsWaterReflectionUpdate=!1,this._lastAnimationUpdate=0,this.test=null;const t=e.stage;try{this._initializeContext(t)}catch(n){return void console.error("Failed to initialize context",n)}const{memoryController:s}=t.view.resourceController;this.stippleTextures=I(this._rctx,s),this.markerTextures=z(this._rctx,s),this._techniques=new b(new R(this._rctx,t.viewingMode,this.stippleTextures,this.waterTextures,this.markerTextures)),this._textures=new N(t),this.addHandles(this._textures.events.on("changed",(e=>this.requestRender(e)))),this._materials=new F(this._textures,this._techniques,(()=>this.requestRender()),(()=>this.requestRender())),this._compositingHelper=new B(this._rctx,this._techniques),this.renderer=new W(t,this._materials,this._techniques,this._rctx,this._compositingHelper,(e=>this.requestRender(e))),this.addHandles([a((()=>t.view.ready),(e=>{e&&this._createRenderNodes()}),h),a((()=>this.waterTextures?.updating),(()=>this.requestRender()),h),a((()=>t.view.qualityProfile),(e=>this.renderer?.updateRenderFeatures(e)),p)]);const i={renderScene:(e,t,r,s)=>this.renderer.render(e,t,r,s),requestRenderScene:e=>this.requestRender(e),prepareOverlay:()=>t.options.screenshot.prepareOverlay(),renderOverlay:(e,r,s)=>t.options.screenshot.renderOverlay(e,r,s)};this._screenshotManager=new X(this._rctx,i,(e=>this.events.emit("force-camera-for-screenshot",e))),this._registerFrameTask(t)}destroy(){const e=this.stage?.container;e?.contains(this._canvas)&&e.removeChild(this._canvas),this._frameTask=n(this._frameTask),this._techniques=o(this._techniques),this._componentObjects=o(this._componentObjects),this._screenshotManager=o(this._screenshotManager),o(this.renderer),this._textures=o(this._textures),o(this.waterTextures),o(this.markerTextures),o(this.stippleTextures),this._canvas=null,this._rctx=o(this._rctx)}_createRenderNodes(){const{view:e,viewingMode:t}=this.stage;new k({view:e}),u(e.spatialReference)||(t===_.Local?(new v({view:e}),new A({view:e})):f(e.spatialReference)?(new j({view:e}),new A({view:e})):(new g({view:e}),new w({view:e}),new A({view:e}),new O({view:e}),new x({view:e}))),new M({view:e,isEnabled:()=>this.renderer.hasSSAO}),new L({view:e,isEnabled:()=>this.renderer.hasSMAA}),new D({view:e}),new U({view:e}),new q({view:e,viewingMode:t}),new T({view:e}),C()&&new S({view:e})}requestRender(e=E.UPDATE){this._needsRender=!0,e===E.UPDATE&&(this._needsUpdate=!0)}get updating(){return this._needsUpdate||this._needsWaterReflectionUpdate||this.renderer.updating||this._textures.updating||this.waterTextures.updating}get textures(){return this._textures}get techniques(){return this._techniques}get compositingHelper(){return this._compositingHelper}setIdleSuspend(e){this._idleSuspend!==e&&(this._idleSuspend=e,this.requestRender())}get renderingContext(){return this._rctx}get capabilities(){return this._rctx.capabilities}get canvas(){return this._canvas}takeScreenshot(e){return this._screenshotManager.takeScreenshot(e).then((e=>e[0]))}takeScreenshotWithOID(e){return e.objectAndLayerIdColor=!0,this._screenshotManager.takeScreenshot(e)}getAlpha(){return!!this._rctx.contextAttributes.alpha}getMinimalDepthForArea(e,t,r,i,n,o=n){const a=i.constrainWindowSize(t,r,n*i.pixelRatio,o*i.pixelRatio),h=this._ensureLinearDepthArrayBuffer(a);this.renderer.readMainDepth(a,h);const p=(e,t,r)=>s(t,e)*(r[1]-r[0])+r[0];let d=Number.MAX_VALUE;for(let s=0;s<a[2]*a[3];s++){const e=p(4*s,h,i.nearFar);d>e&&e!==i.nearFar[0]&&e!==i.nearFar[1]&&(d=e)}if(e){const s=e.pickDepth(t*i.pixelRatio,r*i.pixelRatio,i);null!=s&&d>s&&s!==i.nearFar[0]&&s!==i.nearFar[1]&&(d=s)}return d===Number.MAX_VALUE?void 0:d}_ensureLinearDepthArrayBuffer(e){const t=4*e[2]*e[3];return(null==this._tmpDepthBuffer||this._tmpDepthBuffer.byteLength<t)&&(this._tmpDepthBuffer=new Uint8Array(t)),this._tmpDepthBuffer}async reloadShaders(){V(),await this._techniques.reloadAll(),this.renderer.overlay?.reloadShaders(),this.requestRender()}_registerFrameTask(e){const t=e.view.state;let r=!1,s=E.BACKGROUND,i=!1;const n={preRender:({time:i})=>{r=this.updating,s=this._needsUpdate?E.UPDATE:E.BACKGROUND,e.commitSyncLayers(),i=this.test?.time??i;(c(i-this._lastAnimationUpdate)>this.renderer.animationTimestep||r||this._needsRender)&&(this.renderer.updateAnimation(t,i)&&this.requestRender(E.BACKGROUND),this._lastAnimationUpdate=i)},render:({time:e})=>{if((this._needsRender||!this._idleSuspend||!this.renderer.isCameraFinal||this._needsWaterReflectionUpdate)&&t.camera.fullWidth>0&&t.camera.fullHeight>0){const r=this._needsUpdate&&this._idleSuspend&&this.renderer.isCameraFinal;this._needsRender=!1,this._needsUpdate=!1,this._needsWaterReflectionUpdate=!1,e=this.test?.time??e,this.renderer.render(t,e),i=!0,r&&this.renderer.hasReflections&&(this.requestRender(E.BACKGROUND),this._needsWaterReflectionUpdate=!0)}},update:({time:e})=>{this._textures.update();const r=new Q(t,this.renderer.fboCache);e=this.test?.time??e,this._screenshotManager.update(r,e)},finish:()=>{i&&(this.renderer.finish(t.mode===Y.IDLE?s:E.UPDATE),i=!1)}};this._frameTask=d(n)}_initializeContext(e){const{options:t}=e,r=t.canvas??document.createElement("canvas");r.setAttribute("style","width: 100%; height:100%; display:block;"),this._canvas=r;const s={alpha:t.alpha||!1,premultipliedAlpha:!0,antialias:!1,depth:!0,stencil:t.stencil??!0,powerPreference:"high-performance",preserveDrawingBuffer:t.preserveDrawingBuffer??!1},n=r.getContext("webgl2",s);if(null==n)return void i.getLogger(this).error("A WebGL2 context could not be created.");this._rctx=$(n,e),this._loadShaderOnlyExtensions(),!t.alpha&&this._rctx.contextAttributes.alpha&&i.getLogger(this).error("WebGL context has alpha channel even though no alpha channel was requested");const{container:o}=e;!this._rctx.contextAttributes.alpha&&has("safari")>=11&&(o.style.backgroundColor="black"),o.contains(r)||o.appendChild(r)}_loadShaderOnlyExtensions(){this._rctx.capabilities.enable("textureFloatLinear")}get _viewingMode(){return this.stage.viewingMode}getObjectAndLayerIdColor(e){return this.olidRenderHelper?.getObjectAndLayerIdColor(e)}get componentObjectCollection(){return null==this._componentObjects&&(this._componentObjects=new y(this.renderer.renderPassManager,this._viewingMode)),this._componentObjects}set componentObjectCollection(e){this._componentObjects=e}updateQualitySettings(e){this.test&&null!=this.test.time&&(this.test.savedFadeDuration=e.fadeDuration,e.fadeDuration=c(0)),this._rctx.updateOptions({maxPreferredTextureSize:this.stage.view.qualitySettings.maxTextureSize})}};function $(e,t){const r=(e,r)=>t.view.resourceController.memoryController.newCache(e,r),s={disabledExtensions:t.options.deactivatedWebGLExtensions||{},debugWebGLExtensions:t.options.debugWebGLExtensions||{},maxAnisotropy:8,maxPreferredTextureSize:t.view.qualitySettings.maxTextureSize,newCache:r};if(J.enabled){let t=ee.get(e);return t?(t.configure(s),t.ref(),t):(t=new G(e,s),ee.set(e,t),t.ref(),t)}return new G(e,s)}e([l({type:Boolean,readOnly:!0})],Z.prototype,"updating",null),e([l({constructOnly:!0})],Z.prototype,"stage",void 0),e([l()],Z.prototype,"_rctx",void 0),e([l()],Z.prototype,"_canvas",void 0),e([l()],Z.prototype,"stippleTextures",void 0),e([l()],Z.prototype,"markerTextures",void 0),e([l()],Z.prototype,"waterTextures",void 0),e([l({readOnly:!0})],Z.prototype,"olidRenderHelper",void 0),e([l()],Z.prototype,"_textures",void 0),e([l({readOnly:!0})],Z.prototype,"renderer",void 0),e([l()],Z.prototype,"_screenshotManager",void 0),e([l()],Z.prototype,"componentObjectCollection",null),e([l()],Z.prototype,"_componentObjects",void 0),e([l()],Z.prototype,"_needsUpdate",void 0),e([l()],Z.prototype,"_needsWaterReflectionUpdate",void 0),Z=e([m("esri.views.3d.webgl-engine.parts.RenderView")],Z);const ee=K();export{Z as RenderView};
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import r from"../../../../core/Evented.js";import{unpackFloatRGBA as s}from"../../../../core/floatRGBA.js";import has from"../../../../core/has.js";import i from"../../../../core/Logger.js";import{removeMaybe as n,destroyMaybe as o}from"../../../../core/maybe.js";import{watch as a,initial as h,syncAndInitial as p}from"../../../../core/reactiveUtils.js";import{addFrameTask as d}from"../../../../core/scheduling.js";import{Milliseconds as c}from"../../../../core/time.js";import{property as l}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/RandomLCG.js";import{subclass as m}from"../../../../core/accessorSupport/decorators/subclass.js";import{isMoon as u,isMars as f}from"../../../../geometry/support/spatialReferenceUtils.js";import{ViewingMode as _}from"../../../ViewingMode.js";import{ChapmanAtmosphere as g}from"../../environment/ChapmanAtmosphere.js";import{CloudsComposition as w}from"../../environment/CloudsComposition.js";import{Fog as x}from"../../environment/Fog.js";import{LocalAtmosphere as v}from"../../environment/LocalAtmosphere.js";import j from"../../environment/MarsAtmosphere.js";import{ComponentObjectCollection as y}from"../collections/Component/ComponentObjectCollection.js";import{ShaderTechniqueConstructionContext as b}from"../core/shaderTechnique/ShaderTechniqueConstructionContext.js";import{ShaderTechniqueRepository as R}from"../core/shaderTechnique/ShaderTechniqueRepository.js";import{BloomRenderNode as A}from"../effects/bloom/BloomRenderNode.js";import{ObjectAndLayerIDRenderNode as S}from"../effects/geometry/ObjectAndLayerIDRenderNode.js";import{olidEnabled as C}from"../effects/geometry/olidUtils.js";import{RenderOccludedRenderNode as T}from"../effects/geometry/RenderOccludedRenderNode.js";import{Haze as O}from"../effects/haze/Haze.js";import{Highlight as U}from"../effects/highlight/Highlight.js";import{ShadowHighlight as q}from"../effects/highlight/ShadowHighlight.js";import{Magnifier as D}from"../effects/magnifier/Magnifier.js";import{SMAA as L}from"../effects/smaa/SMAA.js";import{SSAO as M}from"../effects/ssao/SSAO.js";import{Stars as k}from"../effects/stars/Stars.js";import{RenderRequestType as E}from"../lib/basicInterfaces.js";import B from"../lib/CompositingHelper.js";import{GLMaterialRepository as F}from"../lib/GLMaterialRepository.js";import{ObjectAndLayerIdRenderHelper as H}from"../lib/ObjectAndLayerIdRenderHelper.js";import{Renderer as W}from"../lib/Renderer.js";import{RenderingContext as G}from"../lib/RenderingContext.js";import{TextureRepository as N}from"../lib/TextureRepository.js";import{createMarkerTextureRepository as z}from"../materials/markerTextureRepository.js";import{createStippleTextureRepository as I}from"../materials/stippleTextureRepository.js";import{WaterTextureRepository as P}from"../materials/internal/WaterTextureRepository.js";import{getContextCache as K}from"./contextCache.js";import{removeLoadedShaderModules as V}from"./renderUtils.js";import{ScreenshotManager as X,ScreenshotContext as Q}from"./ScreenshotManager.js";import{contextCache as J}from"./testUtils.js";import{RenderState as Y}from"../../../support/RenderState.js";let Z=class extends t{constructor(e){super(e),this.events=new r,this.waterTextures=new P,this.olidRenderHelper=C()?new H:null,this._needsUpdate=!0,this._needsRender=!0,this._idleSuspend=!0,this._needsWaterReflectionUpdate=!1,this._lastAnimationUpdate=0,this.bloom=null,this.test=null;const t=e.stage;try{this._initializeContext(t)}catch(n){return void console.error("Failed to initialize context",n)}const{memoryController:s}=t.view.resourceController;this.stippleTextures=I(this._rctx,s),this.markerTextures=z(this._rctx,s),this._techniques=new R(new b(this._rctx,t.viewingMode,this.stippleTextures,this.waterTextures,this.markerTextures)),this._textures=new N(t),this.addHandles(this._textures.events.on("changed",(e=>this.requestRender(e)))),this._materials=new F(this._textures,this._techniques,(()=>this.requestRender()),(()=>this.requestRender())),this._compositingHelper=new B(this._rctx,this._techniques),this.renderer=new W(t,this._materials,this._techniques,this._rctx,this._compositingHelper,(e=>this.requestRender(e))),this.addHandles([a((()=>t.view.ready),(e=>{e&&this._createRenderNodes()}),h),a((()=>this.waterTextures?.updating),(()=>this.requestRender()),h),a((()=>t.view.qualityProfile),(e=>this.renderer?.updateRenderFeatures(e)),p)]);const i={renderScene:(e,t,r,s)=>this.renderer.render(e,t,r,s),requestRenderScene:e=>this.requestRender(e),prepareOverlay:()=>t.options.screenshot.prepareOverlay(),renderOverlay:(e,r,s)=>t.options.screenshot.renderOverlay(e,r,s)};this._screenshotManager=new X(this._rctx,i,(e=>this.events.emit("force-camera-for-screenshot",e))),this._registerFrameTask(t)}destroy(){const e=this.stage?.container;e?.contains(this._canvas)&&e.removeChild(this._canvas),this._frameTask=n(this._frameTask),this._techniques=o(this._techniques),this._componentObjects=o(this._componentObjects),this._screenshotManager=o(this._screenshotManager),o(this.renderer),this._textures=o(this._textures),o(this.waterTextures),o(this.markerTextures),o(this.stippleTextures),this._canvas=null,this._rctx=o(this._rctx)}_createRenderNodes(){const{view:e,viewingMode:t}=this.stage;new k({view:e}),u(e.spatialReference)||(t===_.Local?(new v({view:e}),this.bloom=new A({view:e})):f(e.spatialReference)?(new j({view:e}),this.bloom=new A({view:e})):(new g({view:e}),new w({view:e}),this.bloom=new A({view:e}),new O({view:e}),new x({view:e}))),new M({view:e,isEnabled:()=>this.renderer.hasSSAO}),new L({view:e,isEnabled:()=>this.renderer.hasSMAA}),new D({view:e}),new U({view:e}),new q({view:e,viewingMode:t}),new T({view:e}),C()&&new S({view:e})}requestRender(e=E.UPDATE){this._needsRender=!0,e===E.UPDATE&&(this._needsUpdate=!0)}get updating(){return this._needsUpdate||this._needsWaterReflectionUpdate||this.renderer.updating||this._textures.updating||this.waterTextures.updating}get textures(){return this._textures}get techniques(){return this._techniques}get compositingHelper(){return this._compositingHelper}setIdleSuspend(e){this._idleSuspend!==e&&(this._idleSuspend=e,this.requestRender())}get renderingContext(){return this._rctx}get capabilities(){return this._rctx.capabilities}get canvas(){return this._canvas}takeScreenshot(e){return this._screenshotManager.takeScreenshot(e).then((e=>e[0]))}takeScreenshotWithOID(e){return e.objectAndLayerIdColor=!0,this._screenshotManager.takeScreenshot(e)}getAlpha(){return!!this._rctx.contextAttributes.alpha}getMinimalDepthForArea(e,t,r,i,n,o=n){const a=i.constrainWindowSize(t,r,n*i.pixelRatio,o*i.pixelRatio),h=this._ensureLinearDepthArrayBuffer(a);this.renderer.readMainDepth(a,h);const p=(e,t,r)=>s(t,e)*(r[1]-r[0])+r[0];let d=Number.MAX_VALUE;for(let s=0;s<a[2]*a[3];s++){const e=p(4*s,h,i.nearFar);d>e&&e!==i.nearFar[0]&&e!==i.nearFar[1]&&(d=e)}if(e){const s=e.pickDepth(t*i.pixelRatio,r*i.pixelRatio,i);null!=s&&d>s&&s!==i.nearFar[0]&&s!==i.nearFar[1]&&(d=s)}return d===Number.MAX_VALUE?void 0:d}_ensureLinearDepthArrayBuffer(e){const t=4*e[2]*e[3];return(null==this._tmpDepthBuffer||this._tmpDepthBuffer.byteLength<t)&&(this._tmpDepthBuffer=new Uint8Array(t)),this._tmpDepthBuffer}async reloadShaders(){V(),await this._techniques.reloadAll(),this.renderer.overlay?.reloadShaders(),this.requestRender()}_registerFrameTask(e){const t=e.view.state;let r=!1,s=E.BACKGROUND,i=!1;const n={preRender:({time:i})=>{r=this.updating,s=this._needsUpdate?E.UPDATE:E.BACKGROUND,e.commitSyncLayers(),i=this.test?.time??i;(c(i-this._lastAnimationUpdate)>this.renderer.animationTimestep||r||this._needsRender)&&(this.renderer.updateAnimation(t,i)&&this.requestRender(E.BACKGROUND),this._lastAnimationUpdate=i)},render:({time:e})=>{if((this._needsRender||!this._idleSuspend||!this.renderer.isCameraFinal||this._needsWaterReflectionUpdate)&&t.camera.fullWidth>0&&t.camera.fullHeight>0){const r=this._needsUpdate&&this._idleSuspend&&this.renderer.isCameraFinal;this._needsRender=!1,this._needsUpdate=!1,this._needsWaterReflectionUpdate=!1,e=this.test?.time??e,this.renderer.render(t,e),i=!0,r&&this.renderer.hasReflections&&(this.requestRender(E.BACKGROUND),this._needsWaterReflectionUpdate=!0)}},update:({time:e})=>{this._textures.update();const r=new Q(t,this.renderer.fboCache);e=this.test?.time??e,this._screenshotManager.update(r,e)},finish:()=>{i&&(this.renderer.finish(t.mode===Y.IDLE?s:E.UPDATE),i=!1)}};this._frameTask=d(n)}_initializeContext(e){const{options:t}=e,r=t.canvas??document.createElement("canvas");r.setAttribute("style","width: 100%; height:100%; display:block;"),this._canvas=r;const s={alpha:t.alpha||!1,premultipliedAlpha:!0,antialias:!1,depth:!0,stencil:t.stencil??!0,powerPreference:"high-performance",preserveDrawingBuffer:t.preserveDrawingBuffer??!1},n=r.getContext("webgl2",s);if(null==n)return void i.getLogger(this).error("A WebGL2 context could not be created.");this._rctx=$(n,e),this._loadShaderOnlyExtensions(),!t.alpha&&this._rctx.contextAttributes.alpha&&i.getLogger(this).error("WebGL context has alpha channel even though no alpha channel was requested");const{container:o}=e;!this._rctx.contextAttributes.alpha&&has("safari")>=11&&(o.style.backgroundColor="black"),o.contains(r)||o.appendChild(r)}_loadShaderOnlyExtensions(){this._rctx.capabilities.enable("textureFloatLinear")}get _viewingMode(){return this.stage.viewingMode}getObjectAndLayerIdColor(e){return this.olidRenderHelper?.getObjectAndLayerIdColor(e)}get componentObjectCollection(){return null==this._componentObjects&&(this._componentObjects=new y(this.renderer.renderPassManager,this._viewingMode)),this._componentObjects}set componentObjectCollection(e){this._componentObjects=e}updateQualitySettings(e){this.test&&null!=this.test.time&&(this.test.savedFadeDuration=e.fadeDuration,e.fadeDuration=c(0)),this._rctx.updateOptions({maxPreferredTextureSize:this.stage.view.qualitySettings.maxTextureSize})}};function $(e,t){const r=(e,r)=>t.view.resourceController.memoryController.newCache(e,r),s={disabledExtensions:t.options.deactivatedWebGLExtensions||{},debugWebGLExtensions:t.options.debugWebGLExtensions||{},maxAnisotropy:8,maxPreferredTextureSize:t.view.qualitySettings.maxTextureSize,newCache:r};if(J.enabled){let t=ee.get(e);return t?(t.configure(s),t.ref(),t):(t=new G(e,s),ee.set(e,t),t.ref(),t)}return new G(e,s)}e([l({type:Boolean,readOnly:!0})],Z.prototype,"updating",null),e([l({constructOnly:!0})],Z.prototype,"stage",void 0),e([l()],Z.prototype,"_rctx",void 0),e([l()],Z.prototype,"_canvas",void 0),e([l()],Z.prototype,"stippleTextures",void 0),e([l()],Z.prototype,"markerTextures",void 0),e([l()],Z.prototype,"waterTextures",void 0),e([l({readOnly:!0})],Z.prototype,"olidRenderHelper",void 0),e([l()],Z.prototype,"_textures",void 0),e([l({readOnly:!0})],Z.prototype,"renderer",void 0),e([l()],Z.prototype,"_screenshotManager",void 0),e([l()],Z.prototype,"componentObjectCollection",null),e([l()],Z.prototype,"_componentObjects",void 0),e([l()],Z.prototype,"_needsUpdate",void 0),e([l()],Z.prototype,"_needsWaterReflectionUpdate",void 0),Z=e([m("esri.views.3d.webgl-engine.parts.RenderView")],Z);const ee=K();export{Z as RenderView};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../chunks/tslib.es6.js";import{ShaderOutput as r}from"../core/shaderLibrary/ShaderOutput.js";import{TextureCoordinateType as e}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{EmissionSource as o}from"../core/shaderLibrary/output/Emissions.glsl.js";import{parameter as i}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as s}from"../materials/DefaultTechniqueConfiguration.js";class
|
|
5
|
+
import{_ as t}from"../../../../chunks/tslib.es6.js";import{ShaderOutput as r}from"../core/shaderLibrary/ShaderOutput.js";import{TextureCoordinateType as e}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{EmissionSource as o}from"../core/shaderLibrary/output/Emissions.glsl.js";import{parameter as i}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as s}from"../materials/DefaultTechniqueConfiguration.js";class a extends s{constructor(){super(...arguments),this.transparent=!1,this.writeDepth=!0,this.polygonOffset=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.textureCoordinateType=e.None,this.emissionSource=o.None,this.output=r.Color,this.occlusionPass=!1,this.objectAndLayerIdColorInstanced=!1,this.overlayEnabled=!1,this.draped=!1}get discardInvisibleFragments(){return this.transparent&&this.writeDepth}}t([i()],a.prototype,"transparent",void 0),t([i()],a.prototype,"writeDepth",void 0),t([i()],a.prototype,"polygonOffset",void 0),t([i()],a.prototype,"terrainDepthTest",void 0),t([i()],a.prototype,"cullAboveTerrain",void 0);export{a as CheckerBoardTechniqueConfiguration};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import{NormalType as t}from"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateType as o}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{EmissionSource as s}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as r}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as i}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{parameter as a}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{AlphaDiscardMode as h,CullFaceOptions as n,DepthTestFunction as p}from"../lib/basicInterfaces.js";import{DefaultTechniqueConfiguration as l}from"../materials/DefaultTechniqueConfiguration.js";class c extends l{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=h.Opaque,this.doubleSidedMode=r.None,this.pbrMode=i.Disabled,this.cullFace=n.None,this.normalType=t.Attribute,this.customDepthTest=p.Less,this.emissionSource=s.None,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.vvSize=!1,this.vvColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instanced=!1,this.instancedColor=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.occlusionPass=!1,this.hasVvInstancing=!0,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0}get textureCoordinateType(){return this.hasColorTexture||this.hasMetallicRoughnessTexture||this.emissionSource===s.Texture||this.hasOcclusionTexture||this.hasNormalTexture?o.Default:o.None}get objectAndLayerIdColorInstanced(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}e([a({count:h.COUNT})],c.prototype,"alphaDiscardMode",void 0),e([a({count:r.COUNT})],c.prototype,"doubleSidedMode",void 0),e([a({count:i.COUNT})],c.prototype,"pbrMode",void 0),e([a({count:n.COUNT})],c.prototype,"cullFace",void 0),e([a({count:t.COUNT})],c.prototype,"normalType",void 0),e([a({count:p.COUNT})],c.prototype,"customDepthTest",void 0),e([a({count:s.COUNT})],c.prototype,"emissionSource",void 0),e([a()],c.prototype,"hasVertexColors",void 0),e([a()],c.prototype,"hasSymbolColors",void 0),e([a()],c.prototype,"hasVerticalOffset",void 0),e([a()],c.prototype,"hasColorTexture",void 0),e([a()],c.prototype,"hasMetallicRoughnessTexture",void 0),e([a()],c.prototype,"hasOcclusionTexture",void 0),e([a()],c.prototype,"hasNormalTexture",void 0),e([a()],c.prototype,"hasScreenSizePerspective",void 0),e([a()],c.prototype,"hasVertexTangents",void 0),e([a()],c.prototype,"hasOccludees",void 0),e([a()],c.prototype,"instancedDoublePrecision",void 0),e([a()],c.prototype,"hasModelTransformation",void 0),e([a()],c.prototype,"offsetBackfaces",void 0),e([a()],c.prototype,"vvSize",void 0),e([a()],c.prototype,"vvColor",void 0),e([a()],c.prototype,"receiveShadows",void 0),e([a()],c.prototype,"receiveAmbientOcclusion",void 0),e([a()],c.prototype,"textureAlphaPremultiplied",void 0),e([a()],c.prototype,"instanced",void 0),e([a()],c.prototype,"instancedColor",void 0),e([a()],c.prototype,"writeDepth",void 0),e([a()],c.prototype,"transparent",void 0),e([a()],c.prototype,"enableOffset",void 0),e([a()],c.prototype,"terrainDepthTest",void 0),e([a()],c.prototype,"cullAboveTerrain",void 0),e([a()],c.prototype,"snowCover",void 0),e([a()],c.prototype,"hasColorTextureTransform",void 0),e([a()],c.prototype,"hasEmissionTextureTransform",void 0),e([a()],c.prototype,"hasNormalTextureTransform",void 0),e([a()],c.prototype,"hasOcclusionTextureTransform",void 0),e([a()],c.prototype,"hasMetallicRoughnessTextureTransform",void 0);export{c as DefaultMaterialTechniqueConfiguration};
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import{NormalType as t}from"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateType as o}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{EmissionSource as s}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as r}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as i}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{parameter as a}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{AlphaDiscardMode as h,CullFaceOptions as n,DepthTestFunction as p}from"../lib/basicInterfaces.js";import{DefaultTechniqueConfiguration as l}from"../materials/DefaultTechniqueConfiguration.js";class c extends l{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=h.Opaque,this.doubleSidedMode=r.None,this.pbrMode=i.Disabled,this.cullFace=n.None,this.normalType=t.Attribute,this.customDepthTest=p.Less,this.emissionSource=s.None,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.vvSize=!1,this.vvColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instanced=!1,this.instancedColor=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.occlusionPass=!1,this.hasVvInstancing=!0,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1}get textureCoordinateType(){return this.hasColorTexture||this.hasMetallicRoughnessTexture||this.emissionSource===s.Texture||this.hasOcclusionTexture||this.hasNormalTexture?o.Default:o.None}get objectAndLayerIdColorInstanced(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}e([a({count:h.COUNT})],c.prototype,"alphaDiscardMode",void 0),e([a({count:r.COUNT})],c.prototype,"doubleSidedMode",void 0),e([a({count:i.COUNT})],c.prototype,"pbrMode",void 0),e([a({count:n.COUNT})],c.prototype,"cullFace",void 0),e([a({count:t.COUNT})],c.prototype,"normalType",void 0),e([a({count:p.COUNT})],c.prototype,"customDepthTest",void 0),e([a({count:s.COUNT})],c.prototype,"emissionSource",void 0),e([a()],c.prototype,"hasVertexColors",void 0),e([a()],c.prototype,"hasSymbolColors",void 0),e([a()],c.prototype,"hasVerticalOffset",void 0),e([a()],c.prototype,"hasColorTexture",void 0),e([a()],c.prototype,"hasMetallicRoughnessTexture",void 0),e([a()],c.prototype,"hasOcclusionTexture",void 0),e([a()],c.prototype,"hasNormalTexture",void 0),e([a()],c.prototype,"hasScreenSizePerspective",void 0),e([a()],c.prototype,"hasVertexTangents",void 0),e([a()],c.prototype,"hasOccludees",void 0),e([a()],c.prototype,"instancedDoublePrecision",void 0),e([a()],c.prototype,"hasModelTransformation",void 0),e([a()],c.prototype,"offsetBackfaces",void 0),e([a()],c.prototype,"vvSize",void 0),e([a()],c.prototype,"vvColor",void 0),e([a()],c.prototype,"receiveShadows",void 0),e([a()],c.prototype,"receiveAmbientOcclusion",void 0),e([a()],c.prototype,"textureAlphaPremultiplied",void 0),e([a()],c.prototype,"instanced",void 0),e([a()],c.prototype,"instancedColor",void 0),e([a()],c.prototype,"writeDepth",void 0),e([a()],c.prototype,"transparent",void 0),e([a()],c.prototype,"enableOffset",void 0),e([a()],c.prototype,"terrainDepthTest",void 0),e([a()],c.prototype,"cullAboveTerrain",void 0),e([a()],c.prototype,"snowCover",void 0),e([a()],c.prototype,"hasColorTextureTransform",void 0),e([a()],c.prototype,"hasEmissionTextureTransform",void 0),e([a()],c.prototype,"hasNormalTextureTransform",void 0),e([a()],c.prototype,"hasOcclusionTextureTransform",void 0),e([a()],c.prototype,"hasMetallicRoughnessTextureTransform",void 0);export{c as DefaultMaterialTechniqueConfiguration};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import{TextureCoordinateType as t}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{EmissionSource as o}from"../core/shaderLibrary/output/Emissions.glsl.js";import{parameter as r}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{CullFaceOptions as i}from"../lib/basicInterfaces.js";import{DefaultTechniqueConfiguration as s}from"../materials/DefaultTechniqueConfiguration.js";class a extends s{constructor(){super(
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import{TextureCoordinateType as t}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{EmissionSource as o}from"../core/shaderLibrary/output/Emissions.glsl.js";import{parameter as r}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{CullFaceOptions as i}from"../lib/basicInterfaces.js";import{DefaultTechniqueConfiguration as s}from"../materials/DefaultTechniqueConfiguration.js";class a extends s{constructor(e){super(),this.draped=e,this.cullFace=i.None,this.enableOffset=!0,this.writeDepth=!0,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.perspectiveInterpolation=!0,this.textureCoordinateType=t.None,this.emissionSource=o.None,this.discardInvisibleFragments=!0,this.occlusionPass=!1,this.objectAndLayerIdColorInstanced=!1}}e([r({count:i.COUNT})],a.prototype,"cullFace",void 0),e([r()],a.prototype,"enableOffset",void 0),e([r()],a.prototype,"writeDepth",void 0),e([r()],a.prototype,"hasOccludees",void 0),e([r()],a.prototype,"terrainDepthTest",void 0),e([r()],a.prototype,"cullAboveTerrain",void 0),e([r()],a.prototype,"perspectiveInterpolation",void 0);export{a as ImageMaterialTechniqueConfiguration};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isColorOrColorEmission as e,ShaderOutput as i}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShaderModule as t}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as r}from"../core/shaderTechnique/ShaderTechnique.js";import{blending as l,oitDepthTest as n,depthWrite as s,getDrawBuffers as o}from"../lib/OrderIndependentTransparency.js";import{RenderSlot as p}from"../lib/RenderSlot.js";import{stencilWriteMaskOn as c,stencilToolMaskBaseParams as u,stencilBaseAllZerosParams as a,depthCompareAlways as d,stencilToolTransparentOccluderParams as T,stencilWriteMaskOff as h,stencilToolMaskOccluderParams as m,depthCompareLess as P}from"../lib/StencilUtils.js";import{VertexAttribute as f}from"../lib/VertexAttribute.js";import{L as
|
|
5
|
+
import{isColorOrColorEmission as e,ShaderOutput as i}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShaderModule as t}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as r}from"../core/shaderTechnique/ShaderTechnique.js";import{blending as l,oitDepthTest as n,depthWrite as s,getDrawBuffers as o}from"../lib/OrderIndependentTransparency.js";import{RenderSlot as p}from"../lib/RenderSlot.js";import{stencilWriteMaskOn as c,stencilToolMaskBaseParams as u,stencilBaseAllZerosParams as a,depthCompareAlways as d,stencilToolTransparentOccluderParams as T,stencilWriteMaskOff as h,stencilToolMaskOccluderParams as m,depthCompareLess as P}from"../lib/StencilUtils.js";import{VertexAttribute as f}from"../lib/VertexAttribute.js";import{L as E}from"../../../../chunks/LineMarker.glsl.js";import{LineMarkerSpace as O}from"./LineMarkerTechniqueConfiguration.js";import{SpecialDrawBuffers as R}from"../../../webgl/enums.js";import{makePipelineState as _,defaultColorWrite as A,premultipliedAlphaToPremultipliedAlpha as S}from"../../../webgl/renderState.js";class W extends r{constructor(e,i){super(e,i,new t(E,(()=>import("./LineMarker.glsl.js"))),b)}_makePipelineState(t,r){const{output:p,oitPass:d,space:T,hasOccludees:h}=t;return _({blending:e(p)?l(d):null,depthTest:T===O.Draped?null:{func:n(d)},depthWrite:s(t),drawBuffers:p===i.Depth?{buffers:[R.NONE]}:o(d,p),colorWrite:A,stencilWrite:h?c:null,stencilTest:h?r?u:a:null,polygonOffset:{factor:0,units:-10}})}initializePipeline(e){return e.occluder?(this._occluderPipelineTransparent=_({blending:S,depthTest:d,depthWrite:null,colorWrite:A,stencilWrite:null,stencilTest:T}),this._occluderPipelineOpaque=_({blending:S,depthTest:d,depthWrite:null,colorWrite:A,stencilWrite:h,stencilTest:m}),this._occluderPipelineMaskWrite=_({blending:null,depthTest:P,depthWrite:null,colorWrite:null,stencilWrite:c,stencilTest:u})):this._occluderPipelineTransparent=this._occluderPipelineOpaque=this._occluderPipelineMaskWrite=null,this._occludeePipelineState=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,i){return e?this._occludeePipelineState:i===p.TRANSPARENT_OCCLUDER_MATERIAL?this._occluderPipelineTransparent??super.getPipeline():i===p.OCCLUDER_MATERIAL?this._occluderPipelineOpaque??super.getPipeline():this._occluderPipelineMaskWrite??super.getPipeline()}}const b=new Map([[f.POSITION,0],[f.PREVIOUSDELTA,1],[f.UV0,2],[f.NORMAL,3],[f.COLOR,4],[f.COLORFEATUREATTRIBUTE,4],[f.SIZE,5],[f.SIZEFEATUREATTRIBUTE,5],[f.OPACITYFEATUREATTRIBUTE,6]]);export{W as LineMarkerTechnique,b as vertexAttributeLocations};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import{TextureCoordinateType as t}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{EmissionSource as o}from"../core/shaderLibrary/output/Emissions.glsl.js";import{parameter as r}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as i}from"../materials/DefaultTechniqueConfiguration.js";var s,p;!function(e){e[e.Draped=0]="Draped",e[e.Screen=1]="Screen",e[e.World=2]="World",e[e.COUNT=3]="COUNT"}(s||(s={})),function(e){e[e.Center=0]="Center",e[e.Tip=1]="Tip",e[e.COUNT=2]="COUNT"}(p||(p={}));class a extends i{constructor(){super(...arguments),this.space=s.Screen,this.anchor=p.Center,this.occluder=!1,this.writeDepth=!1,this.hideOnShortSegments=!1,this.hasCap=!1,this.hasTip=!1,this.vvSize=!1,this.vvColor=!1,this.vvOpacity=!1,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.textureCoordinateType=t.None,this.emissionSource=o.None,this.discardInvisibleFragments=!0,this.occlusionPass=!1,this.hasVvInstancing=!0,this.hasSliceTranslatedView=!0,this.objectAndLayerIdColorInstanced=!1,this.overlayEnabled=!1}get draped(){return this.space===s.Draped}}e([r({count:s.COUNT})],a.prototype,"space",void 0),e([r({count:p.COUNT})],a.prototype,"anchor",void 0),e([r()],a.prototype,"occluder",void 0),e([r()],a.prototype,"writeDepth",void 0),e([r()],a.prototype,"hideOnShortSegments",void 0),e([r()],a.prototype,"hasCap",void 0),e([r()],a.prototype,"hasTip",void 0),e([r()],a.prototype,"vvSize",void 0),e([r()],a.prototype,"vvColor",void 0),e([r()],a.prototype,"vvOpacity",void 0),e([r()],a.prototype,"hasOccludees",void 0),e([r()],a.prototype,"terrainDepthTest",void 0),e([r()],a.prototype,"cullAboveTerrain",void 0);export{p as LineMarkerAnchor,s as LineMarkerSpace,a as LineMarkerTechniqueConfiguration};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import{parameter as
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import{parameter as r}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as s}from"../materials/DefaultTechniqueConfiguration.js";class t extends s{constructor(){super(...arguments),this.hasVertexColors=!1,this.transparent=!1,this.hasOccludees=!1,this.draped=!1}}e([r()],t.prototype,"hasVertexColors",void 0),e([r()],t.prototype,"transparent",void 0),e([r()],t.prototype,"hasOccludees",void 0);export{t as NativeLineTechniqueConfiguration};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../chunks/tslib.es6.js";import{TextureCoordinateType as e}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{EmissionSource as o}from"../core/shaderLibrary/output/Emissions.glsl.js";import{parameter as s}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{CullFaceOptions as r}from"../lib/basicInterfaces.js";import{DefaultTechniqueConfiguration as i}from"../materials/DefaultTechniqueConfiguration.js";import{Style as a}from"../materials/PatternStyle.js";class n extends i{constructor(){super(...arguments),this.cullFace=r.None,this.style=a.Horizontal,this.hasVertexColors=!1,this.polygonOffset=!1,this.hasOccludees=!1,this.enableOffset=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.vvColor=!1,this.draped=!1,this.textureCoordinateType=e.None,this.emissionSource=o.None,this.discardInvisibleFragments=!0,this.writeDepth=!0,this.occlusionPass=!1,this.hasVvInstancing=!1,this.vvSize=!1,this.vvOpacity=!1,this.objectAndLayerIdColorInstanced=!1}}t([s({count:r.COUNT})],n.prototype,"cullFace",void 0),t([s({count:a.COUNT})],n.prototype,"style",void 0),t([s()],n.prototype,"hasVertexColors",void 0),t([s()],n.prototype,"polygonOffset",void 0),t([s()],n.prototype,"hasOccludees",void 0),t([s()],n.prototype,"enableOffset",void 0),t([s()],n.prototype,"terrainDepthTest",void 0),t([s()],n.prototype,"cullAboveTerrain",void 0),t([s()],n.prototype,"vvColor",void 0),t([s()],n.prototype,"draped",void 0);export{n as PatternTechniqueConfiguration};
|
|
5
|
+
import{_ as t}from"../../../../chunks/tslib.es6.js";import{TextureCoordinateType as e}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{EmissionSource as o}from"../core/shaderLibrary/output/Emissions.glsl.js";import{parameter as s}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{CullFaceOptions as r}from"../lib/basicInterfaces.js";import{DefaultTechniqueConfiguration as i}from"../materials/DefaultTechniqueConfiguration.js";import{Style as a}from"../materials/PatternStyle.js";class n extends i{constructor(){super(...arguments),this.cullFace=r.None,this.style=a.Horizontal,this.hasVertexColors=!1,this.polygonOffset=!1,this.hasOccludees=!1,this.enableOffset=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.vvColor=!1,this.draped=!1,this.textureCoordinateType=e.None,this.emissionSource=o.None,this.discardInvisibleFragments=!0,this.writeDepth=!0,this.occlusionPass=!1,this.hasVvInstancing=!1,this.vvSize=!1,this.vvOpacity=!1,this.objectAndLayerIdColorInstanced=!1,this.overlayEnabled=!1}}t([s({count:r.COUNT})],n.prototype,"cullFace",void 0),t([s({count:a.COUNT})],n.prototype,"style",void 0),t([s()],n.prototype,"hasVertexColors",void 0),t([s()],n.prototype,"polygonOffset",void 0),t([s()],n.prototype,"hasOccludees",void 0),t([s()],n.prototype,"enableOffset",void 0),t([s()],n.prototype,"terrainDepthTest",void 0),t([s()],n.prototype,"cullAboveTerrain",void 0),t([s()],n.prototype,"vvColor",void 0),t([s()],n.prototype,"draped",void 0);export{n as PatternTechniqueConfiguration};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import{parameter as i}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import{parameter as i}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as s}from"../materials/DefaultTechniqueConfiguration.js";class o extends s{constructor(){super(...arguments),this.drawScreenSize=!1,this.useFixedSizes=!1,this.hasOccludees=!1,this.clippingEnabled=!1,this.draped=!1}}e([i()],o.prototype,"drawScreenSize",void 0),e([i()],o.prototype,"useFixedSizes",void 0),e([i()],o.prototype,"hasOccludees",void 0),e([i()],o.prototype,"clippingEnabled",void 0);export{o as PointRendererTechniqueConfiguration};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../../core/has.js";import{isColorOrColorEmission as e,ShaderOutput as t}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShaderModule as i}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as r}from"../core/shaderTechnique/ShaderTechnique.js";import{OITPass as l}from"../lib/OITPass.js";import{blending as s,oitDepthTest as n,depthWrite as o,getDrawBuffers as u,OITPolygonOffset as p}from"../lib/OrderIndependentTransparency.js";import{RenderSlot as c}from"../lib/RenderSlot.js";import{stencilWriteMaskOn as a,stencilToolMaskBaseParams as f,stencilBaseAllZerosParams as d,depthCompareAlways as T,stencilToolTransparentOccluderParams as h,stencilWriteMaskOff as
|
|
5
|
+
import"../../../../core/has.js";import{isColorOrColorEmission as e,ShaderOutput as t}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShaderModule as i}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as r}from"../core/shaderTechnique/ShaderTechnique.js";import{OITPass as l}from"../lib/OITPass.js";import{blending as s,oitDepthTest as n,depthWrite as o,getDrawBuffers as u,OITPolygonOffset as p}from"../lib/OrderIndependentTransparency.js";import{RenderSlot as c}from"../lib/RenderSlot.js";import{stencilWriteMaskOn as a,stencilToolMaskBaseParams as f,stencilBaseAllZerosParams as d,depthCompareAlways as T,stencilToolTransparentOccluderParams as h,stencilWriteMaskOff as m,stencilToolMaskOccluderParams as E,depthCompareLess as O}from"../lib/StencilUtils.js";import{VertexAttribute as P}from"../lib/VertexAttribute.js";import{R}from"../../../../chunks/RibbonLine.glsl.js";import{PrimitiveType as b,SpecialDrawBuffers as A}from"../../../webgl/enums.js";import{makePipelineState as g,defaultColorWrite as I,premultipliedAlphaToPremultipliedAlpha as N}from"../../../webgl/renderState.js";class S extends r{constructor(e,t){super(e,t,new i(R,(()=>import("./RibbonLine.glsl.js"))),_),this.primitiveType=t.wireframe?b.LINES:b.TRIANGLE_STRIP}_makePipelineState(i,r){const{oitPass:c,output:T,hasOccludees:h,hasPolygonOffset:m}=i,E=c===l.NONE,O=c===l.FrontFace;return g({blending:e(T)?s(c):null,depthTest:{func:n(c)},depthWrite:o(i),drawBuffers:T===t.Depth?{buffers:[A.NONE]}:u(c,T),colorWrite:I,stencilWrite:h?a:null,stencilTest:h?r?f:d:null,polygonOffset:E||O?m?L:null:p})}initializePipeline(e){if(e.occluder){const i=e.hasPolygonOffset?L:null;this._occluderPipelineTransparent=g({blending:N,polygonOffset:i,depthTest:T,depthWrite:null,colorWrite:I,stencilWrite:null,stencilTest:h,drawBuffers:e.output===t.Depth?{buffers:[A.NONE]}:null}),this._occluderPipelineOpaque=g({blending:N,polygonOffset:i,depthTest:T,depthWrite:null,colorWrite:I,stencilWrite:m,stencilTest:E,drawBuffers:e.output===t.Depth?{buffers:[A.NONE]}:null}),this._occluderPipelineMaskWrite=g({blending:null,polygonOffset:i,depthTest:O,depthWrite:null,colorWrite:null,stencilWrite:a,stencilTest:f,drawBuffers:e.output===t.Depth?{buffers:[A.NONE]}:null})}return this._occludeePipeline=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,t){if(e)return this._occludeePipeline;switch(t){case c.TRANSPARENT_OCCLUDER_MATERIAL:return this._occluderPipelineTransparent??super.getPipeline();case c.OCCLUDER_MATERIAL:return this._occluderPipelineOpaque??super.getPipeline();default:return this._occluderPipelineMaskWrite??super.getPipeline()}}}const L={factor:0,units:-4},_=new Map([[P.POSITION,0],[P.PREVIOUSDELTA,1],[P.NEXTDELTA,2],[P.U0,3],[P.LINEPARAMETERS,4],[P.COLOR,5],[P.COLORFEATUREATTRIBUTE,5],[P.SIZE,6],[P.SIZEFEATUREATTRIBUTE,6],[P.OPACITYFEATUREATTRIBUTE,7],[P.OLIDCOLOR,8]]);export{S as RibbonLineTechnique,_ as vertexAttributeLocations};
|