@arcgis/core 4.34.0-next.57 → 4.34.0-next.59
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/Basemap.js +1 -1
- package/LICENSE.md +19 -0
- package/README.md +2 -18
- package/applications/KnowledgeStudio/reshape.d.ts +5 -0
- package/applications/KnowledgeStudio/reshape.js +5 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/03fe4164abd12abc7921.js +1 -0
- package/assets/esri/core/workers/chunks/{893e5eb5c028c4704317.js → 0427f66b56ec6601deb0.js} +1 -1
- package/assets/esri/core/workers/chunks/06b65105b15abf4d0fbf.js +1 -0
- package/assets/esri/core/workers/chunks/{02902303e5585a16ebea.js → 0b53bc76d38e85902748.js} +1 -1
- package/assets/esri/core/workers/chunks/0cb2f7172190babb4139.js +1 -0
- package/assets/esri/core/workers/chunks/0e28cb5d8d89ae29cdd0.js +1 -0
- package/assets/esri/core/workers/chunks/{1776ef96c9f4636f8838.js → 138c11b5eca621e51396.js} +1 -1
- package/assets/esri/core/workers/chunks/14c6461ffd36319e1d74.js +1 -0
- package/assets/esri/core/workers/chunks/1612d1c1d78c122dfef6.js +1 -0
- package/assets/esri/core/workers/chunks/17abab49db1813d3e192.js +1 -0
- package/assets/esri/core/workers/chunks/182383fd00008606bfaa.js +1 -0
- package/assets/esri/core/workers/chunks/18f878ec695617650a96.js +1 -0
- package/assets/esri/core/workers/chunks/{d578c3880eaf2dd62324.js → 19e5e011f929b6b940fe.js} +1 -1
- package/assets/esri/core/workers/chunks/{57c438bb0da6410df525.js → 1bf17c6548ac4cd5a166.js} +1 -1
- package/assets/esri/core/workers/chunks/1c61cf137a989bc52bb8.js +1 -0
- package/assets/esri/core/workers/chunks/{043bb97e38e3a54aa2ab.js → 1ed7a8f4a0058d3b69ef.js} +1 -1
- package/assets/esri/core/workers/chunks/{dd2b5f115d156b5b212e.js → 22ec2b0a853911692dc8.js} +1 -1
- package/assets/esri/core/workers/chunks/232c76f122b1f519e099.js +1 -0
- package/assets/esri/core/workers/chunks/{827bebb4bcdde23adc91.js → 251b7f2e295ce191eb62.js} +1 -1
- package/assets/esri/core/workers/chunks/27334cda1b877abcba1b.js +1 -0
- package/assets/esri/core/workers/chunks/{02a31483e09652a1a1a2.js → 2b7f9a57a2cfbc108673.js} +1 -1
- package/assets/esri/core/workers/chunks/{9fef330b241f958b55df.js → 2cd27b06226e30aec5da.js} +1 -1
- package/assets/esri/core/workers/chunks/{7c86af4f60cea383ed96.js → 39a1f361bb69073af765.js} +1 -1
- package/assets/esri/core/workers/chunks/3a7ac10a6614fe5745f7.js +1 -0
- package/assets/esri/core/workers/chunks/{70cf81ec5a901782d2db.js → 3e7c9a43e52ed6a1b018.js} +1 -1
- package/assets/esri/core/workers/chunks/{8257352421f453a669e9.js → 3f634580055b30dbfc8e.js} +1 -1
- package/assets/esri/core/workers/chunks/{0e8d3d38e9b1f6abf6f2.js → 3fd09a7c05583a57a317.js} +1 -1
- package/assets/esri/core/workers/chunks/{52917b753c5ceab0c1f7.js → 4050ddb580d364d9e205.js} +7 -7
- package/assets/esri/core/workers/chunks/{8c79945909069733558f.js → 4094cebc4b92c52f4e27.js} +1 -1
- package/assets/esri/core/workers/chunks/{82de1b50ae286f1e6c44.js → 451761c7bd2da530e1d0.js} +1 -1
- package/assets/esri/core/workers/chunks/{cc748d4f4adb9c584aa4.js → 45aeff2f751f124f8e53.js} +1 -1
- package/assets/esri/core/workers/chunks/462b30fc40a5f337ba10.js +1 -0
- package/assets/esri/core/workers/chunks/{d20af70b23f175fb5442.js → 48b9ba825856a0c843ff.js} +1 -1
- package/assets/esri/core/workers/chunks/497214e9e82b936fc94e.js +1 -0
- package/assets/esri/core/workers/chunks/4ac127cefa3aa5e93e78.js +1 -0
- package/assets/esri/core/workers/chunks/4b1daffa97fd90a554a0.js +1 -0
- package/assets/esri/core/workers/chunks/4d7fcec769369c576847.js +1 -0
- package/assets/esri/core/workers/chunks/4dee2f05508e90410f13.js +1 -0
- package/assets/esri/core/workers/chunks/516864fb68025acc7db6.js +1 -0
- package/assets/esri/core/workers/chunks/{d630fc3acd2552c98dc0.js → 547af4ffbeeccba9d187.js} +1 -1
- package/assets/esri/core/workers/chunks/54b43876ae6fb078eb38.js +1 -0
- package/assets/esri/core/workers/chunks/{cf699b9bb530b87be14c.js → 58422c616a824ab49218.js} +1 -1
- package/assets/esri/core/workers/chunks/589a0e244ef5f1b84ab6.js +1 -0
- package/assets/esri/core/workers/chunks/5b7e5ec6aea1f7f9b005.js +1 -0
- package/assets/esri/core/workers/chunks/{fe55833c80cf59df9c2b.js → 5cb238318a24b70d5ac3.js} +1 -1
- package/assets/esri/core/workers/chunks/{2c7e7895c4dda176220e.js → 5d4b24c864ebb68ae61e.js} +1 -1
- package/assets/esri/core/workers/chunks/{88a5e7415f8858c454f7.js → 5de7c2a80bd9c81cefe2.js} +1 -1
- package/assets/esri/core/workers/chunks/5e1afea05b624b315d9f.js +1 -0
- package/assets/esri/core/workers/chunks/5ed7e139c72cd2b3ddba.js +1 -0
- package/assets/esri/core/workers/chunks/6531f33d6710960079e9.js +1 -0
- package/assets/esri/core/workers/chunks/{a1ff4c252012d5026133.js → 65eb183b5d001dfc42c8.js} +1 -1
- package/assets/esri/core/workers/chunks/{f1b6d6ee03635d985c3e.js → 6688efc71d9d8f4d2559.js} +1 -1
- package/assets/esri/core/workers/chunks/{d5faf3ddf9a39de826be.js → 672c04d48aa51f16e9b7.js} +1 -1
- package/assets/esri/core/workers/chunks/{1cbd59918c60a1a21494.js → 700b5a536f97233bc4af.js} +1 -1
- package/assets/esri/core/workers/chunks/7597ef10d1699e7088e5.js +1 -0
- package/assets/esri/core/workers/chunks/781e424a383c71ca904d.js +1 -0
- package/assets/esri/core/workers/chunks/79933271a76a1756584f.js +1 -0
- package/assets/esri/core/workers/chunks/{17e203e4680c07bd02f1.js → 7aa7aff6d42be7c2d1d2.js} +1 -1
- package/assets/esri/core/workers/chunks/{c2f184e9f579152aa29a.js → 7b17f52019762aa21af8.js} +1 -1
- package/assets/esri/core/workers/chunks/{549e073fe276363a9896.js → 7db105f6b688b6da8106.js} +1 -1
- package/assets/esri/core/workers/chunks/{945c5a477940ebd23a4c.js → 7f0c78bcba0aed3c4eff.js} +1 -1
- package/assets/esri/core/workers/chunks/{a249e56a0be8cef33ba8.js → 81eb7785d626aa975033.js} +1 -1
- package/assets/esri/core/workers/chunks/{3eb792863a789b97ec58.js → 831a69e5a87e92830fbe.js} +1 -1
- package/assets/esri/core/workers/chunks/8374d87176486c1fc90e.js +1 -0
- package/assets/esri/core/workers/chunks/83dfaa6e3bd58d544f35.js +1 -0
- package/assets/esri/core/workers/chunks/{5691d504ffe5592bc40f.js → 897f9775f06ddbf6486f.js} +1 -1
- package/assets/esri/core/workers/chunks/8bbae8ac586e5c0819d2.js +1 -0
- package/assets/esri/core/workers/chunks/8c0e11f781607239749d.js +1 -0
- package/assets/esri/core/workers/chunks/90540fdfb0c5f68aa959.js +1 -0
- package/assets/esri/core/workers/chunks/9280edff80fd87860a5e.js +1 -0
- package/assets/esri/core/workers/chunks/{9275313e0f1f521b2658.js → 9325000c87295c473291.js} +1 -1
- package/assets/esri/core/workers/chunks/94b9948ec628187c19fc.js +1 -0
- package/assets/esri/core/workers/chunks/94f1005222bff1870ef1.js +1 -0
- package/assets/esri/core/workers/chunks/{aab349d4624b78ef429f.js → 96102a9296afd1bfe1a9.js} +1 -1
- package/assets/esri/core/workers/chunks/981275b6f008431c983a.js +1 -0
- package/assets/esri/core/workers/chunks/{4d2473e680324dc17cfa.js → 997a2a1a51039ce7e4e3.js} +1 -1
- package/assets/esri/core/workers/chunks/{07d5e0633cc2f765037f.js → 9f4e23bae621ff3ecea3.js} +1 -1
- package/assets/esri/core/workers/chunks/{4e2b125e6e3945985a54.js → 9f93513037a6e87433c4.js} +1 -1
- package/assets/esri/core/workers/chunks/a16b471c3706ee37f9b6.js +1 -0
- package/assets/esri/core/workers/chunks/{989251f5e0d6a08b1afa.js → a17ed7ce97e69466d730.js} +1 -1
- package/assets/esri/core/workers/chunks/a2150baf0661e2f28011.js +1 -0
- package/assets/esri/core/workers/chunks/a244afea77127e54dd3a.js +1 -0
- package/assets/esri/core/workers/chunks/{ab3c018c406dcd81ef9e.js → a2f4b6d8da93f106852c.js} +1 -1
- package/assets/esri/core/workers/chunks/a532614aa65fb52dee7b.js +1 -0
- package/assets/esri/core/workers/chunks/{3b51b61a7b8a1ef87c9b.js → a700f57af6856cb5313c.js} +1 -1
- package/assets/esri/core/workers/chunks/{319fe6a02ec630a827ea.js → a7ea2e3895046e566bc6.js} +1 -1
- package/assets/esri/core/workers/chunks/abe60d92e0219ee97036.js +1 -0
- package/assets/esri/core/workers/chunks/{a7530dcb08b43e37bbb2.js → ae1cb4c65d72217ae4d4.js} +1 -1
- package/assets/esri/core/workers/chunks/af5ae7c36e1178077cbc.js +1 -0
- package/assets/esri/core/workers/chunks/{7f80bbbd0897082c1af3.js → b29144ee58b43f769d9a.js} +1 -1
- package/assets/esri/core/workers/chunks/b30de4936caa654d7817.js +1 -0
- package/assets/esri/core/workers/chunks/{4193691ca076948f4f90.js → b53008c1461dd6bacc63.js} +1 -1
- package/assets/esri/core/workers/chunks/{1d234c057a6671acc59f.js → b605dfdfed8ff8eda4f3.js} +1 -1
- package/assets/esri/core/workers/chunks/{76ff7ccfe583927918f3.js → b68b54be3d67595a9446.js} +18 -18
- package/assets/esri/core/workers/chunks/b6c6f82df3b60c2f831f.js +1 -0
- package/assets/esri/core/workers/chunks/{7eda1c400658b6a99be8.js → ba0c7339fa19cc7cbde7.js} +1 -1
- package/assets/esri/core/workers/chunks/{fae6030a81cb91a91b69.js → bafd9b0f6e817252cb31.js} +1 -1
- package/assets/esri/core/workers/chunks/{c80c032c5b7a11db177a.js → bb2ab663e3e5597f2104.js} +1 -1
- package/assets/esri/core/workers/chunks/{724de82d101eb59c2834.js → bd451668c4ce9f7d7128.js} +1 -1
- package/assets/esri/core/workers/chunks/{91ede8c62a7b1e8b8023.js → be06c8a58c217a17451b.js} +1 -1
- package/assets/esri/core/workers/chunks/bf6b76027c60b4ffa507.js +1 -0
- package/assets/esri/core/workers/chunks/{08c0c016787caa169492.js → c24214666d10cb648428.js} +1 -1
- package/assets/esri/core/workers/chunks/c34a164a8ece4cb33e81.js +1 -0
- package/assets/esri/core/workers/chunks/{a3a23a56df4e5ee86bb2.js → c5fe356fc5b8b7be0d31.js} +1 -1
- package/assets/esri/core/workers/chunks/c696615cae5daefa2d98.js +1 -0
- package/assets/esri/core/workers/chunks/{e982cf44906eb26164f2.js → c75b0243e5bb84738419.js} +1 -1
- package/assets/esri/core/workers/chunks/{64fab4e1e28c06c83403.js → c779c8b98e07fa881c1d.js} +1 -1
- package/assets/esri/core/workers/chunks/{4a0257c449f31bdadf26.js → cef9ff811221a7c3812c.js} +1 -1
- package/assets/esri/core/workers/chunks/{b1982490762972ae023d.js → d0296368ae143de4d5ce.js} +1 -1
- package/assets/esri/core/workers/chunks/{3d5954478864a975e65e.js → d07d3b0e06f12aee4a8b.js} +1 -1
- package/assets/esri/core/workers/chunks/{e1472dbf0795d737d6f8.js → d2371f5034b2a32e2523.js} +1 -1
- package/assets/esri/core/workers/chunks/{2f65081bfedeab44d6cb.js → d35cadfb78ac9803069b.js} +1 -1
- package/assets/esri/core/workers/chunks/{80a69897fa3ce1eaa6e7.js → d707538b150d79050336.js} +1 -1
- package/assets/esri/core/workers/chunks/d7ce68667bb355ef8e5d.js +1 -0
- package/assets/esri/core/workers/chunks/d823277612f971a9c2f0.js +1 -0
- package/assets/esri/core/workers/chunks/d83bdc13c3cad3eee7be.js +1 -0
- package/assets/esri/core/workers/chunks/d91b80aa4f847c2e2a33.js +1 -0
- package/assets/esri/core/workers/chunks/{a96ac5c68d84122e7751.js → db7678104b18534482e3.js} +1 -1
- package/assets/esri/core/workers/chunks/dbcef57073075e9cfdfe.js +1 -0
- package/assets/esri/core/workers/chunks/{c4ceb267d4004d8da8cc.js → e0bbfbe1ed39c82f1bd4.js} +1 -1
- package/assets/esri/core/workers/chunks/e36d538915261ee0373f.js +1 -0
- package/assets/esri/core/workers/chunks/e58c5c8639aa837c84d1.js +1 -0
- package/assets/esri/core/workers/chunks/{a24762e976c1459b12de.js → e689a4849f5af3f2f641.js} +1 -1
- package/assets/esri/core/workers/chunks/e97250ae8da4bd0d6bc9.js +1 -0
- package/assets/esri/core/workers/chunks/{ef85cd0e82d59db8a26f.js → eacc7fccdc3fb670ac8f.js} +2 -2
- package/assets/esri/core/workers/chunks/{0df1f56df6d47dfbb6ea.js → eada3483116a5ea8baed.js} +1 -1
- package/assets/esri/core/workers/chunks/ed8863c3d334f438b625.js +1 -0
- package/assets/esri/core/workers/chunks/{47682247910271077333.js → ee78a38a0cacb19b2fd4.js} +1 -1
- package/assets/esri/core/workers/chunks/{f4061587ff5789fa4e1f.js → f594df2f5ce6ca41a254.js} +1 -1
- package/assets/esri/core/workers/chunks/{d7b3e81cc313fd0a33b0.js → f5c821ca2911a5103c9a.js} +1 -1
- package/assets/esri/core/workers/chunks/f636ca5c811c3a2a962f.js +1 -0
- package/assets/esri/core/workers/chunks/{a3ee76b7e46d3fba7cf7.js → f6d91256c4e5f8a0d5c0.js} +1 -1
- package/assets/esri/core/workers/chunks/f711aeba1a2c184ddb43.js +1 -0
- package/assets/esri/core/workers/chunks/f718f630a8b81496c646.js +1 -0
- package/assets/esri/core/workers/chunks/{cac060a187f3a27a19ba.js → fa0f94318173db2034de.js} +1 -1
- package/assets/esri/core/workers/chunks/fdae43a97537093e4b97.js +1 -0
- package/assets/esri/core/workers/chunks/{b6a201e86f9caef45ff0.js → ff2614d96ca5228e9685.js} +1 -1
- package/assets/esri/themes/base/widgets/_Editor.scss +5 -3
- package/assets/esri/themes/base/widgets/_SelectionToolbar.scss +6 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_en.json +1 -1
- package/chunks/BloomComposition.glsl.js +36 -18
- package/chunks/ColorMaterial.glsl.js +1 -1
- package/chunks/ComponentShader.glsl.js +3 -3
- package/chunks/CompositeGeographicTransformation.js +1 -1
- package/chunks/CutFillDepth.glsl.js +15 -0
- package/chunks/CutFillReduction.glsl.js +12 -0
- package/chunks/CutFillTargetDepth.glsl.js +6 -0
- package/chunks/DefaultMaterial.glsl.js +2 -2
- package/chunks/GeodeticDistanceCalculator-Ce-woMPw.js +1 -1
- package/chunks/GeographicTransformation.js +1 -1
- package/chunks/HUDMaterial.glsl.js +4 -4
- package/chunks/ImageMaterial.glsl.js +2 -2
- package/chunks/MultiPathImpl.js +1 -1
- package/chunks/NativeLine.glsl.js +1 -1
- package/chunks/OperatorGeodesicBuffer.js +1 -1
- package/chunks/OperatorGeodeticArea.js +1 -1
- package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
- package/chunks/OperatorGeodeticLength.js +1 -1
- package/chunks/OperatorProximityGeodesic.js +1 -1
- package/chunks/OperatorShapePreservingLength.js +1 -1
- package/chunks/OperatorShapePreservingProject.js +1 -1
- package/chunks/Path.glsl.js +7 -7
- package/chunks/Pattern.glsl.js +1 -1
- package/chunks/Point2D.js +1 -1
- package/chunks/ProjectionTransformation.js +1 -1
- package/chunks/RealisticTree.glsl.js +2 -2
- package/chunks/RibbonLine.glsl.js +2 -2
- package/chunks/ShadedColorMaterial.glsl.js +1 -1
- package/chunks/SimpleAtmosphere.glsl.js +1 -1
- package/chunks/SpatialReference.js +1 -1
- package/chunks/Terrain.glsl.js +4 -4
- package/chunks/UnitFactory.js +1 -1
- package/chunks/WaterSurface.glsl.js +3 -3
- package/chunks/offsetOperator.js +1 -1
- package/chunks/sphere.js +1 -1
- package/chunks/vec42.js +1 -1
- package/config.js +1 -1
- package/copyright.txt +2 -20
- package/core/Clonable.js +1 -1
- package/core/accessorSupport/layerContainerType.js +1 -1
- package/core/libs/gl-matrix-2/math/quat.js +1 -1
- package/core/libs/gl-matrix-2/math/vec4.js +1 -1
- package/core/quantityFormatUtils.js +1 -1
- package/core/unitFormatUtils.js +1 -1
- package/editing/geometry/coordUtils.js +5 -0
- package/editing/geometry/lineUtils.js +5 -0
- package/editing/sharedTemplates/executor/builders/equallySpaced.js +1 -1
- package/editing/sharedTemplates/executor/builders/pointAtIntersectionVerticesOfLine.js +1 -1
- package/editing/sharedTemplates/executor/builders/support/builderUtils.js +1 -1
- package/editing/sharedTemplates/executor/builders/support/offsetUtils.js +1 -1
- package/editing/sharedTemplates/executor/builders/support/shapeUtils.js +1 -1
- package/effects/FocusArea.js +1 -1
- package/geometry/coordinateFormatter.js +1 -1
- package/geometry/operators/gx/operatorAlphaShape.js +1 -1
- package/geometry/operators/gx/operatorIntegrate.js +1 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
- package/geometry/operators/offsetOperator.js +1 -1
- package/geometry/operators/support/apiConverter.js +1 -1
- package/geometry/operators/support/initNoPeFactory.js +1 -1
- package/geometry/operators/support/jsonConverter.js +1 -1
- package/geometry/support/sphere.js +1 -1
- package/graphic/KnowledgeGraphGraphicOrigin.js +1 -1
- package/graphic/LinkChartGraphicOrigin.js +5 -0
- package/graphic/isLinkChartGraphicOrigin.js +5 -0
- package/interfaces.d.ts +131 -12
- package/kernel.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/GroundLayer.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/ParquetLayer.js +1 -1
- package/layers/PointCloudLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
- package/layers/catalog/catalogUtils.js +1 -1
- package/layers/graphics/hydratedFeatures.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/knowledgeGraph/nodeMovementUtils.js +5 -0
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/mixins/operationalLayers.js +1 -1
- package/layers/support/RasterStorageInfo.js +1 -1
- package/layers/support/SceneFilter.js +1 -1
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/layersCreator.js +1 -1
- package/layers/support/rasterDatasets/BaseRaster.js +1 -1
- package/layers/support/rasterFunctions/BandArithmeticFunction.js +1 -1
- package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
- package/layers/support/rasterFunctions/ExtractBandFunction.js +1 -1
- package/layers/support/rasterFunctions/NDVIFunction.js +1 -1
- package/package.json +2 -2
- package/portal/schemas/definitions.js +1 -1
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/support/basemapUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/Stage.js +1 -1
- package/views/2d/engine/webgl/Profiler.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
- package/views/3d/camera/constraintUtils/distance.js +1 -1
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
- package/views/3d/layers/CSVLayerView3D.js +1 -1
- package/views/3d/layers/FeatureLayerView3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/GeoJSONLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
- package/views/3d/layers/OGCFeatureLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/RouteLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/SceneLayerView3D.js +1 -1
- package/views/3d/layers/StreamLayerView3D.js +1 -1
- package/views/3d/layers/WFSLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/ElevationAligners.js +1 -1
- package/views/3d/layers/graphics/ElevationContext.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
- package/views/3d/layers/graphics/Labeler.js +1 -1
- package/views/3d/layers/graphics/QueryEngine.js +1 -1
- package/views/3d/layers/graphics/StreamController.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
- package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
- package/views/3d/layers/graphics/pointUtils.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
- package/views/3d/layers/support/FlowTileTree3DDebugger.js +1 -1
- package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
- package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/support/CombinedElevationProvider.js +1 -1
- package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderTargets.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/SphericalPatch.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.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/ComponentData.glsl.js +2 -2
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutputConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js +2 -0
- package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlightOverlay.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +2 -4
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/effects/bloom/BloomComposition.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/bloom/BloomCompositionTechniqueConfiguration.js +5 -0
- package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/effects/geometry/ObjectAndLayerIDRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillDepth.js +5 -0
- package/views/3d/webgl-engine/lib/DefaultVertexBufferLayouts.js +1 -1
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/views/3d/webgl-engine/lib/Material.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/Octree.js +1 -1
- package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/InstanceOctree.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/octreeUtils.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.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/WaterTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillDepth.glsl.js +5 -0
- package/views/3d/webgl-engine/shaders/CutFillDepthTechnique.js +5 -0
- package/views/3d/webgl-engine/shaders/CutFillReduction.glsl.js +5 -0
- package/views/3d/webgl-engine/shaders/CutFillReductionTechnique.js +5 -0
- package/views/3d/webgl-engine/shaders/CutFillTargetDepth.glsl.js +5 -0
- package/views/3d/webgl-engine/shaders/CutFillTargetDepthTechnique.js +5 -0
- package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js +1 -1
- package/views/3d/webgl.js +1 -1
- package/views/LinkChartView.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/draw/support/GraphicMover.js +1 -1
- package/views/draw/support/HighlightHelper.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/draw/support/drawUtils.js +1 -1
- package/views/interactive/Tooltip.js +1 -1
- package/views/interactive/editGeometry/EditGeometry.js +1 -1
- package/views/interactive/sketch/SketchLabelOptions.js +1 -1
- package/views/interactive/sketch/SketchOptions.js +1 -1
- package/views/interactive/sketch/SketchTooltipOptions.js +1 -1
- package/views/interactive/sketch/SketchTooltipVisibleElements.js +1 -1
- package/views/interactive/sketch/SketchValueOptions.js +1 -1
- package/views/interactive/sketch/Units.js +1 -1
- package/views/interactive/sketch/constraints.js +1 -1
- package/views/interactive/snapping/featureSources/FeatureCollectionSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
- package/views/interactive/tooltip/fields/fields.js +1 -1
- package/views/interactive/tooltip/fields/parsingAndFormattingUtils.js +1 -1
- package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
- package/views/support/angularMeasurementUtils.js +1 -1
- package/webdoc/support/writeUtils.js +1 -1
- package/webscene/spec-certification/api.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/support/splitFeatureUtils.js +5 -0
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
- package/widgets/support/SelectionToolbar/VisibleElements.js +1 -1
- package/widgets/support/SelectionToolbar.js +1 -1
- package/widgets/support/Selector2D/SelectionOperation.js +1 -1
- package/EULA.pdf +0 -0
- package/assets/esri/core/workers/chunks/0390f3aa624e3f380ce2.js +0 -1
- package/assets/esri/core/workers/chunks/0569698a3e4eaf2bac8e.js +0 -1
- package/assets/esri/core/workers/chunks/06d2251d6f6b3e44800a.js +0 -1
- package/assets/esri/core/workers/chunks/07eea90733834313e9fa.js +0 -1
- package/assets/esri/core/workers/chunks/08393d9cc2ed846dd5b4.js +0 -1
- package/assets/esri/core/workers/chunks/094c741fa8139c3f40cf.js +0 -1
- package/assets/esri/core/workers/chunks/0f51e51db83f303ce5a6.js +0 -1
- package/assets/esri/core/workers/chunks/171ce8c64f322cd5d6d1.js +0 -1
- package/assets/esri/core/workers/chunks/184d3c88ac2fc1d7e2c3.js +0 -1
- package/assets/esri/core/workers/chunks/1ae15163af8875148fb8.js +0 -1
- package/assets/esri/core/workers/chunks/1eee7cf11df01a52c1bf.js +0 -1
- package/assets/esri/core/workers/chunks/27197b0a2ffb2b6104ea.js +0 -1
- package/assets/esri/core/workers/chunks/2c0241a5958aef9cda61.js +0 -1
- package/assets/esri/core/workers/chunks/2ded2446700f89155ccd.js +0 -1
- package/assets/esri/core/workers/chunks/3264d58aeef8cf074b86.js +0 -1
- package/assets/esri/core/workers/chunks/3445ffd752262673fb13.js +0 -1
- package/assets/esri/core/workers/chunks/38f09e36e174792646bd.js +0 -1
- package/assets/esri/core/workers/chunks/3c57b2e13628b5c1f6de.js +0 -1
- package/assets/esri/core/workers/chunks/4162c633efefc63c5506.js +0 -1
- package/assets/esri/core/workers/chunks/435169b455fd2846799b.js +0 -1
- package/assets/esri/core/workers/chunks/44dc7ec52c4abb700783.js +0 -1
- package/assets/esri/core/workers/chunks/4558f2e3e77831758fdc.js +0 -1
- package/assets/esri/core/workers/chunks/4fc267552939583a81a0.js +0 -1
- package/assets/esri/core/workers/chunks/527557b603400189d49a.js +0 -1
- package/assets/esri/core/workers/chunks/53873f26a2c24cd75e4a.js +0 -1
- package/assets/esri/core/workers/chunks/554c789f4e875d7e6fd5.js +0 -1
- package/assets/esri/core/workers/chunks/561a2078458bc0339f83.js +0 -1
- package/assets/esri/core/workers/chunks/5f28470304b57e24d94c.js +0 -1
- package/assets/esri/core/workers/chunks/61a294f9411bf884f2ab.js +0 -1
- package/assets/esri/core/workers/chunks/6acffacbb4a03af52e3b.js +0 -1
- package/assets/esri/core/workers/chunks/719450ccd455f503d81a.js +0 -1
- package/assets/esri/core/workers/chunks/71cac356874b36f9a383.js +0 -1
- package/assets/esri/core/workers/chunks/7388e8c905d93dea1c05.js +0 -1
- package/assets/esri/core/workers/chunks/749c7159e0902388e828.js +0 -1
- package/assets/esri/core/workers/chunks/7714228825fb44d506df.js +0 -1
- package/assets/esri/core/workers/chunks/77ee4afaa4a1c7047940.js +0 -1
- package/assets/esri/core/workers/chunks/790e97ddbe318bc75415.js +0 -1
- package/assets/esri/core/workers/chunks/8762928d10c3821738ad.js +0 -1
- package/assets/esri/core/workers/chunks/8ead467a5af0d9bba804.js +0 -1
- package/assets/esri/core/workers/chunks/91e04d03b0013bcaad82.js +0 -1
- package/assets/esri/core/workers/chunks/92b60d4fb09711919601.js +0 -1
- package/assets/esri/core/workers/chunks/9940e59033a8a1eff2a9.js +0 -1
- package/assets/esri/core/workers/chunks/998c38974372720b1c52.js +0 -1
- package/assets/esri/core/workers/chunks/9b10e70f28873cff44f5.js +0 -1
- package/assets/esri/core/workers/chunks/9b5e04d87116ce2b68b2.js +0 -1
- package/assets/esri/core/workers/chunks/9d920f3488d59e7f276c.js +0 -1
- package/assets/esri/core/workers/chunks/a999f804fc2f00b2e7ae.js +0 -1
- package/assets/esri/core/workers/chunks/acf13a64df2991a4cb6b.js +0 -1
- package/assets/esri/core/workers/chunks/b457b7dd907f06278bee.js +0 -1
- package/assets/esri/core/workers/chunks/b5640f9623a9c9ded92a.js +0 -1
- package/assets/esri/core/workers/chunks/b8158c681456d4cf2395.js +0 -1
- package/assets/esri/core/workers/chunks/bbdbb618a18542f7a4a2.js +0 -1
- package/assets/esri/core/workers/chunks/bead38898c3f4d4d3569.js +0 -1
- package/assets/esri/core/workers/chunks/c51e2a048df152abd901.js +0 -1
- package/assets/esri/core/workers/chunks/c86e339e45900c54c9f5.js +0 -1
- package/assets/esri/core/workers/chunks/ca7c9756802214e41c56.js +0 -1
- package/assets/esri/core/workers/chunks/cb8f2ce22274990b359c.js +0 -1
- package/assets/esri/core/workers/chunks/d6ab4d55f1023ee6ec6a.js +0 -1
- package/assets/esri/core/workers/chunks/db2b8d8cf7131554cf7e.js +0 -1
- package/assets/esri/core/workers/chunks/e7ccf067bea8f4766424.js +0 -1
- package/assets/esri/core/workers/chunks/f1c50f37a81c672263a1.js +0 -1
- package/assets/esri/core/workers/chunks/ff323db554c9e09749e8.js +0 -1
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as s}from"tslib";import"../../../../../core/Logger.js";import"../../../../../core/has.js";import"../../../../../core/RandomLCG.js";import"../../../../../core/Error.js";import{subclass as e}from"../../../../../core/accessorSupport/decorators/subclass.js";import{fromMat4 as t,transpose as r,invert as a}from"../../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{copy as o}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{i as h,c as n}from"../../../../../chunks/vec32.js";import{create as c}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{MaterialPassParameters as m,ShadowMapPassParameters as u,HighlightPassParameters as l,ViewshedShadowMapPassParameters as p,AllRenderPasses as _}from"./AllRenderPasses.js";import{TwoVectorPosition as d}from"../util/TwoVectorPosition.js";import{SyncRenderPlugin as P}from"../../effects/RenderPlugin.js";import{DepthRange as f}from"../../lib/DepthRange.js";let w=class extends P{constructor(){super({}),this.produces=new Map([[2,s=>this._produces(s,2)],[4,s=>this._produces(s,4)],[0,s=>this._produces(s,0)],[7,s=>this._produces(s,7)],[9,s=>this._produces(s,9)]]),this._materialPassParameters=new m,this._shadowPassParameters=new u,this._highlightPassParameters=new l,this._viewshedPassParameters=new p,this._systems=new Set}initializeRenderContext(s){this._context=s,this._passes=new _(s)}get rctx(){return this._context.renderContext.rctx}uninitializeRenderContext(){}dispose(){this._context=null,this._systems.clear(),this._passes=null}register(s){this._systems.add(s)}_produces(s,e){return!!this._invoke(s,e,s=>s.count>0)}prepareRender(s){const{_systems:e,_passes:t}=this;if(0!==e.size&&null!=t){for(const s of Object.values(t))s.prepareSubmit();e.forEach(e=>e.submit(t,s.bind));for(const s of Object.values(t))s.finishSubmit()}}acquireTechniques(s){if(0===this._systems.size)return null;const e=4===s.output||5===s.output||6===s.output?this._shadowPassParameters:7===s.output?this._viewshedPassParameters:
|
|
5
|
+
import{__decorate as s}from"tslib";import"../../../../../core/Logger.js";import"../../../../../core/has.js";import"../../../../../core/RandomLCG.js";import"../../../../../core/Error.js";import{subclass as e}from"../../../../../core/accessorSupport/decorators/subclass.js";import{fromMat4 as t,transpose as r,invert as a}from"../../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{copy as o}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{i as h,c as n}from"../../../../../chunks/vec32.js";import{create as c}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{MaterialPassParameters as m,ShadowMapPassParameters as u,HighlightPassParameters as l,ViewshedShadowMapPassParameters as p,AllRenderPasses as _}from"./AllRenderPasses.js";import{TwoVectorPosition as d}from"../util/TwoVectorPosition.js";import{SyncRenderPlugin as P}from"../../effects/RenderPlugin.js";import{DepthRange as f}from"../../lib/DepthRange.js";let w=class extends P{constructor(){super({}),this.produces=new Map([[2,s=>this._produces(s,2)],[4,s=>this._produces(s,4)],[0,s=>this._produces(s,0)],[7,s=>this._produces(s,7)],[9,s=>this._produces(s,9)]]),this._materialPassParameters=new m,this._shadowPassParameters=new u,this._highlightPassParameters=new l,this._viewshedPassParameters=new p,this._systems=new Set}initializeRenderContext(s){this._context=s,this._passes=new _(s)}get rctx(){return this._context.renderContext.rctx}uninitializeRenderContext(){}dispose(){this._context=null,this._systems.clear(),this._passes=null}register(s){this._systems.add(s)}_produces(s,e){return!!this._invoke(s,e,s=>s.count>0)}prepareRender(s){const{_systems:e,_passes:t}=this;if(0!==e.size&&null!=t){for(const s of Object.values(t))s.prepareSubmit();e.forEach(e=>e.submit(t,s.bind));for(const s of Object.values(t))s.finishSubmit()}}acquireTechniques(s){if(0===this._systems.size)return null;const e=4===s.output||5===s.output||6===s.output?this._shadowPassParameters:7===s.output?this._viewshedPassParameters:9===s.output?this._highlightPassParameters:this._materialPassParameters,t=s.bind;return this._updateParameters(t.camera,e,t.slot),this._materialPassParameters.output=s.output,this._invoke(s.output,s.bind.slot,(e,t)=>e.acquire(t,s.bind))}render(s,e){this._invoke(s.output,s.bind.slot,(t,r)=>t.dispatch(r,s.bind,e))}_invoke(s,e,t){if(null==this._passes)return null;switch(e){case 2:switch(s){case 0:case 1:case 2:case 3:case 10:return t(this._passes.opaque,this._materialPassParameters);case 9:return t(this._passes.highlight,this._highlightPassParameters);case 4:return t(this._passes.shadowMap,this._shadowPassParameters);case 5:return t(this._passes.highlightShadowMap,this._shadowPassParameters);case 6:return t(this._passes.defaultShadowMap,this._shadowPassParameters);case 7:return t(this._passes.viewshedShadowMap,this._viewshedPassParameters)}break;case 4:switch(s){case 0:case 1:case 2:case 3:case 10:return t(this._passes.transparent,this._materialPassParameters)}break;case 0:switch(s){case 0:case 1:case 2:case 3:case 10:case 8:return t(this._passes.integratedMesh,this._materialPassParameters);case 9:return t(this._passes.highlightIntegratedMesh,this._highlightPassParameters)}break;case 7:switch(s){case 0:case 1:return t(this._passes.transparentIntegratedMesh,this._materialPassParameters)}break;case 9:switch(s){case 0:case 1:case 2:case 3:case 10:return t(this._passes.occludedGround,this._materialPassParameters)}}return null}notifyDirty(){this._context.requestRender()}queryDepthRange(s){const e=new f;return this._systems.forEach(t=>e.union(t.queryDepthRange(s))),e}get hasEmitters(){let s=!1;return this._systems.forEach(e=>s=e.hasEmissions||s),s}_updateParameters(s,e,i){const c=s.viewInverseTransposeMatrix,m=4===i,u=9===i;h(g,c[3],c[7],c[11]),j.set(g),n(e.transformWorldFromViewTH,j.high),n(e.transformWorldFromViewTL,j.low),n(e.slicePlaneLocalOrigin,g),t(e.transformViewFromCameraRelativeRS,s.viewMatrix),o(e.transformProjFromView,s.projectionMatrix),0===e.identifier&&(this._materialPassParameters.transparent=m,this._materialPassParameters.occludedGround=u,r(b,e.transformViewFromCameraRelativeRS),a(e.transformNormalViewFromGlobal,b))}hasHighlight(s){for(const e of this._systems)if(e.hasHighlight(s))return!0;return!1}};w=s([e("esri.views.3d.webgl-engine.core.renderPasses.RenderPassManager")],w);const g=c(),b=i(),j=new d;export{w as RenderPassManager};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
function n(n){return 4===n||5===n||6===n||7===n}function r(n){return h(n)||3===n}function t(n){return
|
|
5
|
+
function n(n){return 4===n||5===n||6===n||7===n||8===n}function r(n){return h(n)||3===n}function t(n){return 9===n||10===n}function u(n){return e(n)||t(n)}function e(n){return 0===n}function c(n){return e(n)||w(n)}function i(n){return e(n)||10===n}function o(n){return c(n)||10===n}function f(n){return e(n)||9===n}function s(n){return f(n)||p(n)}function a(n){return c(n)||t(n)}function h(n){return a(n)||p(n)}function p(n){return 2===n}function w(n){return 1===n}function x(n){switch(n){case 2:case 4:case 5:case 6:case 7:case 8:return!0}return!1}export{u as is2DGeometryOutput,r as is3DGeometryOutputMRT,e as isColor,w as isColorEmission,h as isColorEmissionHighlightOIDOrDepth,a as isColorEmissionHighlightOrOID,s as isColorHighlightOrDepth,c as isColorOrColorEmission,o as isColorOrColorEmissionOrOID,f as isColorOrHighlight,i as isColorOrOID,p as isDepth,x as isDepthOnlyOutput,t as isHighlightOrOID,n as isShadowRelatedOutput};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{parameter as o,ShaderTechniqueConfiguration as r}from"../shaderTechnique/ShaderTechniqueConfiguration.js";class e extends r{constructor(){super(...arguments),this.output=0}}t([o({count:
|
|
5
|
+
import{__decorate as t}from"tslib";import{parameter as o,ShaderTechniqueConfiguration as r}from"../shaderTechnique/ShaderTechniqueConfiguration.js";class e extends r{constructor(){super(...arguments),this.output=0}}t([o({count:11})],e.prototype,"output",void 0);export{e as ShaderOutputConfiguration};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{glsl as o}from"../../shaderModules/glsl.js";function d(d,r){if(
|
|
5
|
+
import{glsl as o}from"../../shaderModules/glsl.js";function d(d,r){if(10!==r.output)return d.vertex.code.add(o`void forwardObjectAndLayerIdColor() {}`),void d.fragment.code.add(o`void outputObjectAndLayerIdColor() {}`);const e=r.instanced;d.varyings.add("objectAndLayerIdColorVarying","vec4");const t=e?"instanceOlidColor":"olidColor";d.attributes.add(t,"vec4"),d.vertex.code.add(o`
|
|
6
6
|
void forwardObjectAndLayerIdColor() {
|
|
7
7
|
objectAndLayerIdColorVarying = ${t} * 0.003921568627451;
|
|
8
8
|
}`),d.fragment.code.add(o`void outputObjectAndLayerIdColor() {
|
package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{addNearFar as o}from"../ForwardLinearDepthToWriteShadowMap.glsl.js";import{SliceDraw as r}from"../Slice.glsl.js";import{Transform as e}from"../Transform.glsl.js";import{NormalAttribute as t}from"../attributes/NormalAttribute.glsl.js";import{ObjectAndLayerIdColor as i}from"../attributes/ObjectAndLayerIdColor.glsl.js";import{TextureCoordinateAttribute as a}from"../attributes/TextureCoordinateAttribute.glsl.js";import{VertexNormal as s}from"../attributes/VertexNormal.glsl.js";import{OutputDepth as l}from"../output/OutputDepth.glsl.js";import{OutputHighlight as d}from"../output/OutputHighlight.glsl.js";import{VisualVariables as n}from"../shading/VisualVariables.glsl.js";import{DiscardOrAdjustAlphaPass as c}from"../util/DiscardOrAdjustAlpha.glsl.js";import{addProjViewLocalOrigin as u}from"../util/View.glsl.js";import{glsl as p,If as v}from"../../shaderModules/glsl.js";import{Texture2DPassUniform as m}from"../../shaderModules/Texture2DPassUniform.js";function f(f,g){const{vertex:x,fragment:O,varyings:j}=f,{hasColorTexture:h,alphaDiscardMode:w}=g,V=h&&1!==w,{output:C,normalType:b,hasColorTextureTransform:A}=g;switch(C){case 2:u(x,g),f.include(e
|
|
5
|
+
import{addNearFar as o}from"../ForwardLinearDepthToWriteShadowMap.glsl.js";import{SliceDraw as r}from"../Slice.glsl.js";import{Transform as e}from"../Transform.glsl.js";import{NormalAttribute as t}from"../attributes/NormalAttribute.glsl.js";import{ObjectAndLayerIdColor as i}from"../attributes/ObjectAndLayerIdColor.glsl.js";import{TextureCoordinateAttribute as a}from"../attributes/TextureCoordinateAttribute.glsl.js";import{VertexNormal as s}from"../attributes/VertexNormal.glsl.js";import{OutputDepth as l}from"../output/OutputDepth.glsl.js";import{OutputHighlight as d}from"../output/OutputHighlight.glsl.js";import{VisualVariables as n}from"../shading/VisualVariables.glsl.js";import{DiscardOrAdjustAlphaPass as c}from"../util/DiscardOrAdjustAlpha.glsl.js";import{addProjViewLocalOrigin as u}from"../util/View.glsl.js";import{glsl as p,If as v}from"../../shaderModules/glsl.js";import{Texture2DPassUniform as m}from"../../shaderModules/Texture2DPassUniform.js";function f(f,g){const{vertex:x,fragment:O,varyings:j}=f,{hasColorTexture:h,alphaDiscardMode:w}=g,V=h&&1!==w,{output:C,normalType:b,hasColorTextureTransform:A}=g;switch(C){case 2:u(x,g),f.include(e),O.include(r,g),f.include(a,g),V&&O.uniforms.add(new m("tex",o=>o.texture)),x.main.add(p`vpos = getVertexInLocalOriginSpace();
|
|
6
6
|
vpos = subtractOrigin(vpos);
|
|
7
7
|
vpos = addVerticalOffset(vpos, localOrigin);
|
|
8
8
|
gl_Position = transformPosition(proj, view, vpos);
|
|
9
9
|
forwardTextureCoordinates();`),f.include(c,g),O.main.add(p`
|
|
10
10
|
discardBySlice(vpos);
|
|
11
11
|
${v(V,p`vec4 texColor = texture(tex, ${A?"colorUV":"vuv0"});
|
|
12
|
-
discardOrAdjustAlpha(texColor);`)}`);break;case 4:case 5:case 6:case 7:case
|
|
12
|
+
discardOrAdjustAlpha(texColor);`)}`);break;case 4:case 5:case 6:case 7:case 10:u(x,g),f.include(e),f.include(a,g),f.include(n,g),f.include(l,g),O.include(r,g),f.include(i,g),o(f),j.add("depth","float",{invariant:!0}),V&&O.uniforms.add(new m("tex",o=>o.texture)),x.main.add(p`vpos = getVertexInLocalOriginSpace();
|
|
13
13
|
vpos = subtractOrigin(vpos);
|
|
14
14
|
vpos = addVerticalOffset(vpos, localOrigin);
|
|
15
15
|
gl_Position = transformPositionWithDepth(proj, view, vpos, nearFar, depth);
|
|
@@ -18,7 +18,7 @@ forwardObjectAndLayerIdColor();`),f.include(c,g),O.main.add(p`
|
|
|
18
18
|
discardBySlice(vpos);
|
|
19
19
|
${v(V,p`vec4 texColor = texture(tex, ${A?"colorUV":"vuv0"});
|
|
20
20
|
discardOrAdjustAlpha(texColor);`)}
|
|
21
|
-
${
|
|
21
|
+
${10===C?p`outputObjectAndLayerIdColor();`:p`outputDepth(depth);`}`);break;case 3:{u(x,g),f.include(e),f.include(t,g),f.include(s,g),f.include(a,g),f.include(n,g),V&&O.uniforms.add(new m("tex",o=>o.texture)),2===b&&j.add("vPositionView","vec3",{invariant:!0});const o=0===b||1===b;x.main.add(p`
|
|
22
22
|
vpos = getVertexInLocalOriginSpace();
|
|
23
23
|
${o?p`vNormalWorld = dpNormalView(vvLocalNormal(normalModel()));`:p`vPositionView = (view * vec4(vpos, 1.0)).xyz;`}
|
|
24
24
|
vpos = subtractOrigin(vpos);
|
|
@@ -33,7 +33,7 @@ forwardObjectAndLayerIdColor();`),f.include(c,g),O.main.add(p`
|
|
|
33
33
|
if (gl_FrontFacing == false){
|
|
34
34
|
normal = -normal;
|
|
35
35
|
}`}
|
|
36
|
-
fragColor = vec4(0.5 + 0.5 * normal, 1.0);`);break}case
|
|
36
|
+
fragColor = vec4(0.5 + 0.5 * normal, 1.0);`);break}case 9:u(x,g),f.include(e),f.include(a,g),f.include(n,g),V&&O.uniforms.add(new m("tex",o=>o.texture)),x.main.add(p`vpos = getVertexInLocalOriginSpace();
|
|
37
37
|
vpos = subtractOrigin(vpos);
|
|
38
38
|
vpos = addVerticalOffset(vpos, localOrigin);
|
|
39
39
|
gl_Position = transformPosition(proj, view, vpos);
|
|
@@ -11,4 +11,6 @@ return depth + SLOPE_SCALE * m + BIAS;
|
|
|
11
11
|
void outputDepth(float _linearDepth){
|
|
12
12
|
float fragDepth = _calculateFragDepth(_linearDepth);
|
|
13
13
|
gl_FragDepth = fragDepth;
|
|
14
|
+
}`);break;case 8:a.fragment.code.add(t`void outputDepth(float _linearDepth){
|
|
15
|
+
gl_FragDepth = _linearDepth;
|
|
14
16
|
}`)}}export{a as OutputDepth};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{HighlightReadBitmap as i}from"../HighlightReadBitmap.glsl.js";import{glsl as e}from"../../shaderModules/glsl.js";import{Integer2BindUniform as t}from"../../shaderModules/Integer2BindUniform.js";import{IntegerBindUniform as h}from"../../shaderModules/IntegerBindUniform.js";import{Texture2DBindUniform as l}from"../../shaderModules/Texture2DBindUniform.js";import{Texture2DUintBindUniform as g}from"../../shaderModules/Texture2DUintBindUniform.js";function d(d,o){const{fragment:u}=d,{output:r,draped:c,hasHighlightMixTexture:n}=o;
|
|
5
|
+
import{HighlightReadBitmap as i}from"../HighlightReadBitmap.glsl.js";import{glsl as e}from"../../shaderModules/glsl.js";import{Integer2BindUniform as t}from"../../shaderModules/Integer2BindUniform.js";import{IntegerBindUniform as h}from"../../shaderModules/IntegerBindUniform.js";import{Texture2DBindUniform as l}from"../../shaderModules/Texture2DBindUniform.js";import{Texture2DUintBindUniform as g}from"../../shaderModules/Texture2DUintBindUniform.js";function d(d,o){const{fragment:u}=d,{output:r,draped:c,hasHighlightMixTexture:n}=o;9===r?(u.uniforms.add(new h("highlightLevel",i=>i.highlightLevel??0),new t("highlightMixOrigin",i=>i.highlightMixOrigin)),d.outputs.add("fragHighlight","uvec2",0),d.include(i),n?u.uniforms.add(new g("highlightMixTexture",i=>i.highlightMixTexture)).code.add(e`uvec2 getAccumulatedHighlight() {
|
|
6
6
|
return texelFetch(highlightMixTexture, ivec2(gl_FragCoord.xy) - highlightMixOrigin, 0).rg;
|
|
7
7
|
}
|
|
8
8
|
void outputHighlight(bool occluded) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{OutputHighlight as i}from"./OutputHighlight.glsl.js";import{glsl as t}from"../../shaderModules/glsl.js";function l(l,e){
|
|
5
|
+
import{OutputHighlight as i}from"./OutputHighlight.glsl.js";import{glsl as t}from"../../shaderModules/glsl.js";function l(l,e){9===e.output&&(l.include(i,e),l.fragment.code.add(t`
|
|
6
6
|
void calculateOcclusionAndOutputHighlight(uvec2 highlightToAdd) {
|
|
7
7
|
uint levelBits = readLevelBits(highlightToAdd, highlightLevel);
|
|
8
8
|
if ((levelBits & 1u) == 0u) discard;
|
|
@@ -26,8 +26,7 @@ return pow(outColor, vec3(INV_GAMMA_SRGB));
|
|
|
26
26
|
const float horizonLightDiffusion = 0.4;
|
|
27
27
|
const float additionalAmbientIrradianceFactor = 0.02;
|
|
28
28
|
vec3 evaluateSceneLightingPBR(vec3 normal, vec3 albedo, float shadow, float ssao, vec3 additionalLight,
|
|
29
|
-
vec3 viewDir, vec3 groundNormal, vec3 mrr,
|
|
30
|
-
float additionalAmbientIrradiance) {
|
|
29
|
+
vec3 viewDir, vec3 groundNormal, vec3 mrr, float additionalAmbientIrradiance) {
|
|
31
30
|
vec3 viewDirection = -viewDir;
|
|
32
31
|
vec3 h = normalize(viewDirection + mainLightDirection);
|
|
33
32
|
PBRShadingInfo inputs;
|
|
@@ -61,8 +60,7 @@ inputs.groundRadianceToSurface = 0.5 * GROUND_REFLECTANCE * (ambientLightRadianc
|
|
|
61
60
|
inputs.averageAmbientRadiance = ambientLightIrradianceComponent[1] * (1.0 + GROUND_REFLECTANCE);`),L.code.add(s`
|
|
62
61
|
vec3 reflectedColorComponent = evaluateEnvironmentIllumination(inputs);
|
|
63
62
|
vec3 additionalMaterialReflectanceComponent = inputs.albedoLinear * additionalAmbientIrradiance;
|
|
64
|
-
vec3
|
|
65
|
-
vec3 outColorLinear = reflectedColorComponent + additionalMaterialReflectanceComponent + emissionComponent;
|
|
63
|
+
vec3 outColorLinear = reflectedColorComponent + additionalMaterialReflectanceComponent;
|
|
66
64
|
${R?s`vec3 outColor = pow(blackLevelSoftCompression(outColorLinear, inputs.averageAmbientRadiance), vec3(INV_GAMMA_SRGB));`:s`vec3 outColor = pow(max(vec3(0.0), outColorLinear - 0.005 * inputs.averageAmbientRadiance), vec3(INV_GAMMA_SRGB));`}
|
|
67
65
|
return outColor;
|
|
68
66
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{create as e}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{hasArea as o,width as r,height as t}from"../../../../../../geometry/support/aaBoundingRect.js";import{isColorOrColorEmission as l}from"../ShaderOutput.js";import{addMainLightDirection as a,addMainLightIntensity as c}from"../shading/MainLighting.glsl.js";import{Water as i}from"../shading/Water.glsl.js";import{Float4DrawUniform as v}from"../../shaderModules/Float4DrawUniform.js";import{FloatPassUniform as s}from"../../shaderModules/FloatPassUniform.js";import{glsl as n}from"../../shaderModules/glsl.js";import{Texture2DPassUniform as d}from"../../shaderModules/Texture2DPassUniform.js";import{Texture2DUintPassUniform as u}from"../../shaderModules/Texture2DUintPassUniform.js";import{Uniform as x}from"../../../../../webgl/Uniform.js";function y(e,o){const{vertex:r,fragment:t}=e;r.uniforms.add(new v("overlayTexOffset",(e,o)=>C(e,o)),new v("overlayTexScale",(e,o)=>h(e,o))),t.constants.add("overlayOpacity","float",1),t.uniforms.add(new d("ovColorTex",(e,o)=>p(e,o))),g(e,o)}function p(e,o){return 0===e.identifier&&l(e.output)?e.occludedGround?o.overlay?.allSourcesOccluders?o.overlay?.getTexture(1):o.overlay?.getTexture(4):o.overlay?.getTexture(1):0===e.identifier&&
|
|
5
|
+
import{create as e}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{hasArea as o,width as r,height as t}from"../../../../../../geometry/support/aaBoundingRect.js";import{isColorOrColorEmission as l}from"../ShaderOutput.js";import{addMainLightDirection as a,addMainLightIntensity as c}from"../shading/MainLighting.glsl.js";import{Water as i}from"../shading/Water.glsl.js";import{Float4DrawUniform as v}from"../../shaderModules/Float4DrawUniform.js";import{FloatPassUniform as s}from"../../shaderModules/FloatPassUniform.js";import{glsl as n}from"../../shaderModules/glsl.js";import{Texture2DPassUniform as d}from"../../shaderModules/Texture2DPassUniform.js";import{Texture2DUintPassUniform as u}from"../../shaderModules/Texture2DUintPassUniform.js";import{Uniform as x}from"../../../../../webgl/Uniform.js";function y(e,o){const{vertex:r,fragment:t}=e;r.uniforms.add(new v("overlayTexOffset",(e,o)=>C(e,o)),new v("overlayTexScale",(e,o)=>h(e,o))),t.constants.add("overlayOpacity","float",1),t.uniforms.add(new d("ovColorTex",(e,o)=>p(e,o))),g(e,o)}function p(e,o){return 0===e.identifier&&l(e.output)?e.occludedGround?o.overlay?.allSourcesOccluders?o.overlay?.getTexture(1):o.overlay?.getTexture(4):o.overlay?.getTexture(1):0===e.identifier&&10===e.output?o.overlay?.getTexture(5):2===e.identifier?o.overlay?.getTexture(2):null}function m(e,o){const{vertex:r,fragment:t}=e,{output:l}=o;r.uniforms.add(new T("overlayTexOffset"),new T("overlayTexScale")),t.uniforms.add(new s("overlayOpacity",e=>e.overlayOpacity)),9!==l&&t.uniforms.add(new d("ovColorTex",(e,o)=>o.overlay?.getTexture(e.overlayContent))),g(e,o)}function f(e,o){switch(e){case 0:case 1:return 9!==o.slot||o.overlay?.allSourcesOccluders?0:4;case 2:case 3:return 0;case 9:return 2;case 4:case 6:case 7:case 8:return null;case 10:return 5}return null}function g(e,o){const r=3===o.pbrMode||4===o.pbrMode||6===o.pbrMode;r&&e.include(i,o);const{vertex:t,fragment:l,varyings:v}=e;v.add("vtcOverlay","vec4");const{output:s}=o,d=9===s;t.code.add(n`void setOverlayVTC(in vec2 uv) {
|
|
6
6
|
vtcOverlay = vec4(uv, uv) * overlayTexScale + overlayTexOffset;
|
|
7
7
|
}`),l.code.add(n`bool isValid(vec2 uv, vec2 dxdy) {
|
|
8
8
|
return (uv.x >= 0.0 + dxdy.x) && (uv.x <= 1.0 - dxdy.x) && (uv.y >= 0.0 + dxdy.y) && (uv.y <= 1.0 - dxdy.y);
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../../core/Accessor.js";const r={required:[]},
|
|
5
|
+
import e from"../../../../core/Accessor.js";const r={required:[]},t={required:[2]};class s extends e{precompile(e){return!!this.acquireTechniques(e)}consumes(){return r}get usedMemory(){return 0}get renderOccludedFlags(){return 1}get isDecoration(){return!1}get readyToRun(){return!1}get numGeometries(){return 0}get hasOccludees(){return!1}get hasEmitters(){return!1}forEachGeometry(e){}}class n extends s{}class u extends s{}export{u as AsyncRenderPlugin,t as ConsumesDepth,r as ConsumesNone,n as SyncRenderPlugin};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{removeUnordered as e}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{isPromiseLike as t,createAbortError as r}from"../../../../core/promiseUtils.js";import{signal as s}from"../../../../core/signal.js";import{DepthRange as n}from"../lib/DepthRange.js";class i{constructor(e){this.context=e,this._renderPlugins=new Array,this._slots=new Array,this._version=s(0);for(let t=0;t<21;++t)this._slots[t]=[]}destroy(){this._renderPlugins.forEach(e=>e.destroy()),this._renderPlugins.length=0}get plugins(){return this._renderPlugins}add(e,s){const n=()=>{if(s?.aborted)throw e.uninitializeRenderContext(),r();this._renderPlugins.push(e),e.produces.forEach((t,r)=>this._slots[r].push(e)),this.context.requestRender(),this._version.value++},i=e.initializeRenderContext(this.context,s);if(t(i))return i.then(n);n()}remove(t){e(this._renderPlugins,t),t.uninitializeRenderContext();for(let e=0;e<this._slots.length;++e)this._slots[e]=this._slots[e].filter(e=>e!==t);this.context.requestRender(),this._version.value++}prepareRender(){this._renderPlugins.forEach(e=>{e.prepareRender&&e.prepareRender(this.context.renderContext)})}updateAnimation(e){let t=!1;return this._renderPlugins.forEach(r=>t=r.updateAnimation?.(e)||t),t}precompile(...e){++this.context.techniques.precompiling;const t=this.context.renderContext.bind.slot;for(const r of e)this.context.renderContext.bind.slot=r,this._forEachRender(()=>{});this.context.renderContext.bind.slot=t,--this.context.techniques.precompiling}render(...e){for(const t of e)this.context.renderContext.bind.slot=t,this._forEachRender((e,t)=>e.render(this.context.renderContext,t))}_forEachRender(e){const t=this.context.renderContext.bind.slot,r=this.context.renderContext.output;this._slots[t].forEach(s=>{const n=s.produces.get(t);if(!n?.(r)||s.isDecoration&&!this.context.renderContext.bind.decorations)return;const i=s.acquireTechniques(this.context.renderContext);i&&e(s,i)})}queryDepthRange(e){const t=new n;return this._renderPlugins.forEach(r=>{const s=r.queryDepthRange?.(e);t.union(s)}),t}get updating(){return this._version.value>=0&&this._renderPlugins.some(e=>e.readyToRun)}produces(e,...t){return t.some(t=>this._slots[t].some(r=>{const s=r.produces.get(t);return!!s&&s(e)}))}consumes(e){return this._renderPlugins.some(t=>t.consumes().required.includes(e))}hasHighlight(e){return o.some(t=>this._slots[t].some(t=>t.hasHighlight(e)))}get hasDecorations(){return this._renderPlugins.some(e=>e.isDecoration)}get hasOccludees(){return this._renderPlugins.some(e=>e.hasOccludees)}get
|
|
5
|
+
import{removeUnordered as e}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{isPromiseLike as t,createAbortError as r}from"../../../../core/promiseUtils.js";import{signal as s}from"../../../../core/signal.js";import{DepthRange as n}from"../lib/DepthRange.js";class i{constructor(e){this.context=e,this._renderPlugins=new Array,this._slots=new Array,this._version=s(0);for(let t=0;t<21;++t)this._slots[t]=[]}destroy(){this._renderPlugins.forEach(e=>e.destroy()),this._renderPlugins.length=0}get plugins(){return this._renderPlugins}add(e,s){const n=()=>{if(s?.aborted)throw e.uninitializeRenderContext(),r();this._renderPlugins.push(e),e.produces.forEach((t,r)=>this._slots[r].push(e)),this.context.requestRender(),this._version.value++},i=e.initializeRenderContext(this.context,s);if(t(i))return i.then(n);n()}remove(t){e(this._renderPlugins,t),t.uninitializeRenderContext();for(let e=0;e<this._slots.length;++e)this._slots[e]=this._slots[e].filter(e=>e!==t);this.context.requestRender(),this._version.value++}prepareRender(){this._renderPlugins.forEach(e=>{e.prepareRender&&e.prepareRender(this.context.renderContext)})}updateAnimation(e){let t=!1;return this._renderPlugins.forEach(r=>t=r.updateAnimation?.(e)||t),t}precompile(...e){++this.context.techniques.precompiling;const t=this.context.renderContext.bind.slot;for(const r of e)this.context.renderContext.bind.slot=r,this._forEachRender(()=>{});this.context.renderContext.bind.slot=t,--this.context.techniques.precompiling}render(...e){for(const t of e)this.context.renderContext.bind.slot=t,this._forEachRender((e,t)=>e.render(this.context.renderContext,t))}_forEachRender(e){const t=this.context.renderContext.bind.slot,r=this.context.renderContext.output;this._slots[t].forEach(s=>{const n=s.produces.get(t);if(!n?.(r)||s.isDecoration&&!this.context.renderContext.bind.decorations)return;const i=s.acquireTechniques(this.context.renderContext);i&&e(s,i)})}queryDepthRange(e){const t=new n;return this._renderPlugins.forEach(r=>{const s=r.queryDepthRange?.(e);t.union(s)}),t}get updating(){return this._version.value>=0&&this._renderPlugins.some(e=>e.readyToRun)}produces(e,...t){return t.some(t=>this._slots[t].some(r=>{const s=r.produces.get(t);return!!s&&s(e)}))}consumes(e){return this._renderPlugins.some(t=>t.consumes().required.includes(e))}hasHighlight(e){return o.some(t=>this._slots[t].some(t=>t.hasHighlight(e)))}get hasDecorations(){return this._renderPlugins.some(e=>e.isDecoration)}get hasOccludees(){return this._renderPlugins.some(e=>e.hasOccludees)}get hasEmitters(){return this._renderPlugins.some(e=>e.hasEmitters)}get renderOccludedFlags(){return this._renderPlugins.reduce((e,t)=>e|(t.renderOccludedFlags??0),0)}get usedMemory(){return this._renderPlugins.reduce((e,t)=>t.material?e:e+(t.usedMemory??0),0)}get test(){}}const o=[2,4,18,13,14];export{i as RenderPluginManager};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/
|
|
5
|
+
import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/FloatsPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/IntegerPassUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"./BloomPresets.glsl.js";import"../../shaders/ToneMapping.glsl.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{B as BloomCompositionPassParameters,b as build,d as defaultCompositionParameters}from"../../../../../chunks/BloomComposition.glsl.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as e}from"tslib";import{parameter as o,ShaderTechniqueConfiguration as r}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";class t extends r{constructor(){super(...arguments),this.blurEnabled=!1,this.tonemappingEnabled=!0}}e([o()],t.prototype,"blurEnabled",void 0),e([o()],t.prototype,"tonemappingEnabled",void 0);export{t as BloomCompositionTechniqueConfiguration};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{lerp as t}from"../../../../../core/mathUtils.js";import{watch as
|
|
5
|
+
import{__decorate as e}from"tslib";import{lerp as t}from"../../../../../core/mathUtils.js";import{watch as o,syncAndInitial as r}from"../../../../../core/reactiveUtils.js";import{property as i}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{InternalRenderCategory as a}from"../../../webgl.js";import{TransparentEnvironment as n}from"../TransparentEnvironment.js";import{B as m}from"../../../../../chunks/BloomBlur.glsl.js";import{BloomBlurTechnique as l}from"./BloomBlurTechnique.js";import{BloomBlurTechniqueConfiguration as h}from"./BloomBlurTechniqueConfiguration.js";import{B as c}from"../../../../../chunks/BloomComposition.glsl.js";import{BloomCompositionTechnique as u}from"./BloomCompositionTechnique.js";import{BloomCompositionTechniqueConfiguration as p}from"./BloomCompositionTechniqueConfiguration.js";import{blurRadiusPresets as d,lodFactorsPresets as b,normalizePreset as g}from"./BloomPresets.glsl.js";import{ColorAttachment1 as _,DepthStencilAttachment as f}from"../../../../webgl/enums.js";let P=class extends n{constructor(e){super(e),this.consumes={required:[a.TRANSPARENT_ENVIRONMENT,"emissive"]},this.produces=a.TRANSPARENT_ENVIRONMENT,this._blurHorizontalConfiguration=new h,this._blurVerticalConfiguration=new h,this._compositionConfiguration=new p,this._compositionParameters=new c,this._blurParameters=new m,this._blurScale=3.06,this._glowEnabled=!1,this._bloomResults=new Array;e.view.stage.renderView.techniques.precompile(u,this._compositionConfiguration)}initialize(){this.addHandles([o(()=>this._updateFogParameters(),()=>{},r),o(()=>this.view.qualitySettings.bloom,e=>{this._glowEnabled=e,this.precompile(),this.requestRender(1)},r)])}_updateFogParameters(){const e=this.view.environment.weather;if("sunny"===e.type||"cloudy"===e.type)this._blurParameters.blurRadius=d[e.type];else{const o="foggy"===e.type?e.fogStrength:e.precipitation;this._blurParameters.blurRadius=t(d.cloudy,d[e.type],o)}this._compositionParameters.lodFactors=b[e.type].far,this._compositionParameters.lodFactorsFront=b[e.type].near,this.requestRender(1)}precompile(){this._glowEnabled&&(this.techniques.precompile(l,this._blurHorizontalConfiguration),this._blurVerticalConfiguration.bloomStage=1,this.techniques.precompile(l,this._blurVerticalConfiguration)),this._compositionConfiguration.blurEnabled=this._glowEnabled,this.techniques.precompile(u,this._compositionConfiguration)}render(e){const t=e.find(({name:e})=>e===a.TRANSPARENT_ENVIRONMENT),o=t.getAttachment(_)?.attachment;if(!o)return t;if(!this._glowEnabled){const e=this.techniques.get(u,this._compositionConfiguration);if(!e.compiled)return this.requestRender(1),t;const r=t.getTexture(),i=this.fboCache,{fullWidth:s,fullHeight:a}=this.bindParameters.camera,n=this.renderingContext,m=i.acquire(r.descriptor.width,r.descriptor.height,this.produces);return this._prepareFBO(m,s,a),this._compositionParameters.color=r,this._compositionParameters.emission=o,n.bindTechnique(e,this.bindParameters,this._compositionParameters),n.screen.draw(),m.attachDepth(t.getAttachment(f)),m.attachColor(t.getAttachment(_),_),m}const r=this.techniques.get(l,this._blurHorizontalConfiguration),i=this.techniques.get(l,this._blurVerticalConfiguration),s=this.techniques.get(u,this._compositionConfiguration);if(!r.compiled||!i.compiled||!s.compiled)return this.requestRender(1),t;const n=t.getTexture(),m=this.fboCache,{fullWidth:h,fullHeight:c}=this.bindParameters.camera,p=this.renderingContext;let d=o,b=Math.ceil(h/2),g=Math.ceil(c/2);const P=5,T=this._blurParameters.blurRadius;for(let a=0;a<P;a++){const e=m.acquire(b,g,"bloomHorizontal",8);this._blurParameters.color=d,this._prepareFBO(e,b,g),p.bindTechnique(r,this.bindParameters,this._blurParameters),p.screen.draw();const t=m.acquire(b,g,"bloomVertical",8);this._blurParameters.color=e.getTexture(),this._prepareFBO(t,b,g),p.bindTechnique(i,this.bindParameters,this._blurParameters),p.screen.draw(),e.release(),this._bloomResults[a]=t,b=Math.ceil(b/2),g=Math.ceil(g/2),d=this._bloomResults[a].getTexture(),this._blurParameters.blurRadius*=this._blurScale}this._blurParameters.blurRadius=T,this._compositionParameters.color=n,this._compositionParameters.emission=o,this._compositionParameters.bloomTexture0=this._bloomResults[0].getTexture(),this._compositionParameters.bloomTexture1=this._bloomResults[1].getTexture(),this._compositionParameters.bloomTexture2=this._bloomResults[2].getTexture(),this._compositionParameters.bloomTexture3=this._bloomResults[3].getTexture(),this._compositionParameters.bloomTexture4=this._bloomResults[4].getTexture();const R=m.acquire(n.descriptor.width,n.descriptor.height,this.produces);return this._prepareFBO(R,h,c),p.bindTechnique(s,this.bindParameters,this._compositionParameters),p.screen.draw(),this._bloomResults.forEach(e=>e.release()),R.attachDepth(t.getAttachment(f)),R.attachColor(t.getAttachment(_),_),R}_prepareFBO(e,t,o){const r=this.renderingContext;r.bindFramebuffer(e.fbo),r.setViewport(0,0,t,o),r.setClearColor(0,0,0,0),r.clear(16384)}get test(){return{compositionParameters:this._compositionParameters,blurParameters:this._blurParameters,setLodFactors:e=>{this._compositionParameters.lodFactors=g(e)},toggleTonemapping:e=>{this._compositionConfiguration.tonemappingEnabled=e,this.requestRender(1)}}}};e([i()],P.prototype,"consumes",void 0),e([i()],P.prototype,"produces",void 0),P=e([s("esri.views.3d.webgl-engine.effects.bloom.BloomRenderNode")],P);export{P as BloomRenderNode};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{property as s}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as t}from"../../../../../core/accessorSupport/decorators/subclass.js";import{RenderCategory as r,InternalRenderCategory as o}from"../../../webgl.js";import i from"../../../webgl/RenderNode.js";import{FocusAreaMaskTechnique as n}from"./FocusAreaMaskTechnique.js";import{Pos3 as a}from"../../lib/DefaultVertexBufferLayouts.js";import{VertexArrayObject as c}from"../../lib/VertexArrayObject.js";import{F as h}from"../../../../../chunks/FocusAreaMask.glsl.js";import{DepthStencilAttachment as p,PrimitiveType as l}from"../../../../webgl/enums.js";import{noParameters as u}from"../../../../webgl/NoParameters.js";import{VertexBuffer as m}from"../../../../webgl/VertexBuffer.js";let d=class extends i{constructor(e){super({...e,view:e.focusAreasView.view}),this.consumes={required:[r.TRANSPARENT]},this.produces=o.FOCUSAREA,this._vaos=new Array,this._counts=new Array,this._origins=new Array,this._maskParameters=new h}initialize(){this.updateGeometries()}destroy(){this._vaos.forEach(e=>e.dispose()),this._vaos.length=this._counts.length=this._origins.length=0}precompile(){this.techniques.precompile(n)}render(e){const s=this.techniques.get(n),t=this.bindParameters,i=t.camera,a=i.fullViewport[2],c=i.fullViewport[3];if(!s.compiled||!this._vaos)return void this.requestRender();const h=e.find(({name:e})=>e===r.TRANSPARENT),m=this.renderingContext,d=this.fboCache.acquire(a,c,o.FOCUSAREA,2);this.view.stage.renderer.occludedRequiresStencil?(d.acquireDepth(
|
|
5
|
+
import{__decorate as e}from"tslib";import{property as s}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as t}from"../../../../../core/accessorSupport/decorators/subclass.js";import{RenderCategory as r,InternalRenderCategory as o}from"../../../webgl.js";import i from"../../../webgl/RenderNode.js";import{FocusAreaMaskTechnique as n}from"./FocusAreaMaskTechnique.js";import{Pos3 as a}from"../../lib/DefaultVertexBufferLayouts.js";import{VertexArrayObject as c}from"../../lib/VertexArrayObject.js";import{F as h}from"../../../../../chunks/FocusAreaMask.glsl.js";import{DepthStencilAttachment as p,PrimitiveType as l}from"../../../../webgl/enums.js";import{noParameters as u}from"../../../../webgl/NoParameters.js";import{VertexBuffer as m}from"../../../../webgl/VertexBuffer.js";let d=class extends i{constructor(e){super({...e,view:e.focusAreasView.view}),this.consumes={required:[r.TRANSPARENT]},this.produces=o.FOCUSAREA,this._vaos=new Array,this._counts=new Array,this._origins=new Array,this._maskParameters=new h}initialize(){this.updateGeometries()}destroy(){this._vaos.forEach(e=>e.dispose()),this._vaos.length=this._counts.length=this._origins.length=0}precompile(){this.techniques.precompile(n)}render(e){const s=this.techniques.get(n),t=this.bindParameters,i=t.camera,a=i.fullViewport[2],c=i.fullViewport[3];if(!s.compiled||!this._vaos)return void this.requestRender();const h=e.find(({name:e})=>e===r.TRANSPARENT),m=this.renderingContext,d=this.fboCache.acquire(a,c,o.FOCUSAREA,2);this.view.stage.renderer.occludedRequiresStencil?(d.acquireDepth(12),m.blitFramebuffer(h.fbo,d.fbo,256)):d.attachDepth(h.getAttachment(p)),m.bindFramebuffer(d.fbo),m.setClearColor(0,0,0,1),m.clear(17408),m.setViewport(0,0,a,c);const f=m.bindTechnique(s,t);m.setFaceCullingEnabled(!1),m.setStencilTestEnabled(!0),m.setStencilOpSeparate(1028,7680,34055,7680),m.setStencilOpSeparate(1029,7680,34056,7680),m.setDepthWriteEnabled(!1);for(let r=0;r<this._vaos.length;r++){const e=this._vaos[r],s=this._counts[r];this._maskParameters.origin=this._origins[r],f.bindDraw(t,u,this._maskParameters),m.bindVAO(e),m.setDepthTestEnabled(!0),m.setStencilWriteMask(255),m.setStencilFunction(519,0,255),m.setColorMask(!1,!1,!1,!1),m.drawArrays(l.TRIANGLES,0,s),m.setDepthTestEnabled(!1),m.setStencilWriteMask(0),m.setStencilFunction(517,0,255),m.setColorMask(!0,!0,!0,!0),m.drawArrays(l.TRIANGLES,0,s)}return d}updateGeometries(){if(!this.view.stage)return;this._vaos.forEach(e=>e.dispose()),this._vaos.length=this._counts.length=this._origins.length=0;this.focusAreasView.volumes.forEach(e=>{const s=new Array;let t=0,r=0;e.geometryVolumes.forEach(e=>{const o=e.indicesBottom;t+=o.length;for(let t=0;t<o.length;t++)s.push(e.positions[3*(o[t]-1)]),s.push(e.positions[3*(o[t]-1)+1]),s.push(e.positions[3*(o[t]-1)+2]);const i=e.indicesExtruded;r+=i.length;for(let t=0;t<i.length;t++)s.push(e.positions[3*i[t]]),s.push(e.positions[3*i[t]+1]),s.push(e.positions[3*i[t]+2])});const o=new c(this.renderingContext,new m(this.renderingContext,a,new Float32Array(s)));this._vaos.push(o),this._counts.push(t+r),this._origins.push(e.origin)}),this.requestRender()}};e([s()],d.prototype,"consumes",void 0),e([s()],d.prototype,"produces",void 0),e([s({constructOnly:!0})],d.prototype,"focusAreasView",void 0),d=e([t("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaMaskNode")],d);export{d as FocusAreaMaskNode};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{property as r}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as o}from"../../../../../core/accessorSupport/decorators/subclass.js";import{ZEROS as s}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import t from"../../../webgl/RenderNode.js";let i=class extends t{constructor(e){super(e),this.consumes={required:["olid"]},this.produces="olid"}destroy(){}render(e){const r=e.find(({name:e})=>"olid"===e),o=this.renderingContext;return o.bindFramebuffer(r.fbo),o.clearFramebuffer(s,!0,!0),this.view.stage.renderer.renderAllGeometry(
|
|
5
|
+
import{__decorate as e}from"tslib";import{property as r}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as o}from"../../../../../core/accessorSupport/decorators/subclass.js";import{ZEROS as s}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import t from"../../../webgl/RenderNode.js";let i=class extends t{constructor(e){super(e),this.consumes={required:["olid"]},this.produces="olid"}destroy(){}render(e){const r=e.find(({name:e})=>"olid"===e),o=this.renderingContext;return o.bindFramebuffer(r.fbo),o.clearFramebuffer(s,!0,!0),this.view.stage.renderer.renderAllGeometry(10),o.clear(1280),this.view.stage.renderer.renderHUD(1),r}};e([r()],i.prototype,"consumes",void 0),e([r()],i.prototype,"produces",void 0),i=e([o("esri.views.3d.webgl-engine.effects.geometry.ObjectAndLayerIDRenderNode")],i);export{i as ObjectAndLayerIDRenderNode};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import r from"../../../../../core/PooledArray.js";import{property as t}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as o}from"../../../../../core/accessorSupport/decorators/subclass.js";import{ZEROS as s}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{InternalRenderCategory as c}from"../../../webgl.js";import i from"../../../webgl/RenderNode.js";import{Blit as n}from"../blit/Blit.js";import{DepthStencilAttachment as d}from"../../../../webgl/enums.js";let l=class extends i{constructor(e){super(e),this.consumes={required:[c.OCCLUDED]},this.produces=c.OCCLUDED,this._blit=new n(e.view.stage.renderView.techniques,2)}precompile(){const e=this.view.stage.renderer;e.plugins.plugins.forEach(r=>{e.precompileSlots(r,9,11),r.material&&e.precompileOccludedSlots(r,h)})}render(e){const r=e.find(({name:e})=>e===this.produces);return this._renderOccludedAndTransparentStencil(r),this._renderOccludedComposite(r),r}_renderOccludedAndTransparentStencil(e){const r=this.view.stage.renderer,t=a;t.clear();for(const o of r.plugins.plugins)8&o.renderOccludedFlags&&t.push(o);0!==t.length&&(r.renderSlots(t,10),this._renderAndComposite(e,e.getAttachment(d),.5,()=>r.renderSlots(t,11),!1,!1),t.clear())}_renderOccludedComposite(e){const r=this.view.stage.renderer,t=a;t.clear();let o=0;for(const i of r.plugins.plugins){const e=i.renderOccludedFlags&m;o|=e,e&&t.push(i)}if(!o)return void t.clear();const s=this._getDepthStencilAttachment(e);let c=s.clearStencil;for(const i of h)o&i&&(this._renderAndComposite(e,s.depth,16===i?1:.5,()=>r.renderOccludedSlots(t,i),!0,c),c=!1);s.release(),t.clear()}_renderAndComposite(e,r,t,o,c,i){const n=this.renderingContext,{width:d,height:l}=e.fbo,a=this.fboCache.acquire(d,l,"tmp color");a.attachDepth(r),n.bindFramebuffer(a.fbo),n.clearFramebuffer(s,c,i),o(),a.detachDepth(),this._blit.blend(n,a,e,this.bindParameters,t),a.release()}_getDepthStencilAttachment(e){const{width:r,height:t}=e.fbo;if(!this.view.stage.renderer.occludedRequiresIntegratedMeshStencil){const e=this.fboCache.acquireDepth(
|
|
5
|
+
import{__decorate as e}from"tslib";import r from"../../../../../core/PooledArray.js";import{property as t}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as o}from"../../../../../core/accessorSupport/decorators/subclass.js";import{ZEROS as s}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{InternalRenderCategory as c}from"../../../webgl.js";import i from"../../../webgl/RenderNode.js";import{Blit as n}from"../blit/Blit.js";import{DepthStencilAttachment as d}from"../../../../webgl/enums.js";let l=class extends i{constructor(e){super(e),this.consumes={required:[c.OCCLUDED]},this.produces=c.OCCLUDED,this._blit=new n(e.view.stage.renderView.techniques,2)}precompile(){const e=this.view.stage.renderer;e.plugins.plugins.forEach(r=>{e.precompileSlots(r,9,11),r.material&&e.precompileOccludedSlots(r,h)})}render(e){const r=e.find(({name:e})=>e===this.produces);return this._renderOccludedAndTransparentStencil(r),this._renderOccludedComposite(r),r}_renderOccludedAndTransparentStencil(e){const r=this.view.stage.renderer,t=a;t.clear();for(const o of r.plugins.plugins)8&o.renderOccludedFlags&&t.push(o);0!==t.length&&(r.renderSlots(t,10),this._renderAndComposite(e,e.getAttachment(d),.5,()=>r.renderSlots(t,11),!1,!1),t.clear())}_renderOccludedComposite(e){const r=this.view.stage.renderer,t=a;t.clear();let o=0;for(const i of r.plugins.plugins){const e=i.renderOccludedFlags&m;o|=e,e&&t.push(i)}if(!o)return void t.clear();const s=this._getDepthStencilAttachment(e);let c=s.clearStencil;for(const i of h)o&i&&(this._renderAndComposite(e,s.depth,16===i?1:.5,()=>r.renderOccludedSlots(t,i),!0,c),c=!1);s.release(),t.clear()}_renderAndComposite(e,r,t,o,c,i){const n=this.renderingContext,{width:d,height:l}=e.fbo,a=this.fboCache.acquire(d,l,"tmp color");a.attachDepth(r),n.bindFramebuffer(a.fbo),n.clearFramebuffer(s,c,i),o(),a.detachDepth(),this._blit.blend(n,a,e,this.bindParameters,t),a.release()}_getDepthStencilAttachment(e){const{width:r,height:t}=e.fbo;if(!this.view.stage.renderer.occludedRequiresIntegratedMeshStencil){const e=this.fboCache.acquireDepth(12,r,t,"retained stencil");return{depth:e,release:()=>e.release(),clearStencil:!0}}const o=this.fboCache.acquire(r,t,"retained stencil",12);return this.renderingContext.blitFramebuffer(e.fbo,o.fbo,1024),{depth:o.getAttachment(d),release:()=>o.release(),clearStencil:!1}}};e([t()],l.prototype,"consumes",void 0),e([t()],l.prototype,"produces",void 0),l=e([o("esri.views.3d.webgl-engine.effects.geometry.RenderOccludedRenderNode")],l);const a=new r;function p(){a.prune()}const h=[4,2,16],m=h.reduce((e,r)=>e|r,0);export{l as RenderOccludedRenderNode,p as cleanupRenderOccluded};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{create as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{CloudsParameters as h}from"../../environment/CloudsParameters.js";import e from"../../webgl/RenderCamera.js";import{SceneLighting as s}from"../lighting/SceneLighting.js";class n{constructor(i,t){this.width=i,this.height=t}}class r{constructor(i){this.shadowMap=i,this.slot=2,this.slicePlane=null,this.hasOccludees=!1,this.enableFillLights=!0,this.oitPass=0,this.alignPixelEnabled=!1,this.decorations=!0,this.overlayStretch=1,this.viewshedEnabled=!1,this._camera=new e,this._inverseViewport=t(),this._oldLighting=new s,this._newLighting=new s,this._fadedLighting=new s,this._lighting=this._newLighting,this.ssr=new g,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.highlights=new Array,this.highlightOrderMap=new Map,this.highlightMixOrigin=t(),this.highlightMixTexture=null,this.hudRenderStyle=0,this.hudOccludedFragmentOpacity=1,this.snowCover=!1,this.clouds=new h,this.shadowHighlightsVisible=!1}destroy(){this._camera=null,this.contentCamera=null,this.depth=null,this.geometryDepth=null,this.mainDepth=null,this.overlay=null,this.ssao=null,this.terrainDepth=null}get camera(){return this._camera}set camera(i){this._camera=i,this._inverseViewport[0]=1/i.fullViewport[2],this._inverseViewport[1]=1/i.fullViewport[3]}get inverseViewport(){return this._inverseViewport}get lighting(){return this._lighting}fadeLighting(){switch(this.clouds.fadeFactor){case 0:this._lighting=this._oldLighting;break;default:this._fadedLighting.lerpLighting(this._oldLighting,this._newLighting,this.clouds.fadeFactor),this._lighting=this._fadedLighting;break;case 1:this._lighting=this._newLighting,this._oldLighting.copyFrom(this._newLighting)}}updateLighting(i,t,h,e){this._oldLighting.copyFrom(this.lighting),this._newLighting.noonFactor=t,this._newLighting.globalFactor=h,this._newLighting.set(i),1===e&&this.clouds.requestFade(),this.fadeLighting()}get highlight(){return null==this.highlightLevel?null:this.highlights[this.highlightLevel]}}class g{constructor(){this.fadeFactor=1,this.reprojectionMatrix=i()}}export{r as BindParameters,n as ViewportSize};
|
|
5
|
+
import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{create as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{CloudsParameters as h}from"../../environment/CloudsParameters.js";import e from"../../webgl/RenderCamera.js";import{SceneLighting as s}from"../lighting/SceneLighting.js";class n{constructor(i,t){this.width=i,this.height=t}}class r{constructor(i){this.shadowMap=i,this.slot=2,this.slicePlane=null,this.hasOccludees=!1,this.enableFillLights=!0,this.oitPass=0,this.alignPixelEnabled=!1,this.decorations=!0,this.overlayStretch=1,this.viewshedEnabled=!1,this.cutFillEnabled=!1,this._camera=new e,this._inverseViewport=t(),this._oldLighting=new s,this._newLighting=new s,this._fadedLighting=new s,this._lighting=this._newLighting,this.ssr=new g,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.highlights=new Array,this.highlightOrderMap=new Map,this.highlightMixOrigin=t(),this.highlightMixTexture=null,this.hudRenderStyle=0,this.hudOccludedFragmentOpacity=1,this.snowCover=!1,this.clouds=new h,this.shadowHighlightsVisible=!1}destroy(){this._camera=null,this.contentCamera=null,this.depth=null,this.geometryDepth=null,this.mainDepth=null,this.overlay=null,this.ssao=null,this.terrainDepth=null}get camera(){return this._camera}set camera(i){this._camera=i,this._inverseViewport[0]=1/i.fullViewport[2],this._inverseViewport[1]=1/i.fullViewport[3]}get inverseViewport(){return this._inverseViewport}get lighting(){return this._lighting}fadeLighting(){switch(this.clouds.fadeFactor){case 0:this._lighting=this._oldLighting;break;default:this._fadedLighting.lerpLighting(this._oldLighting,this._newLighting,this.clouds.fadeFactor),this._lighting=this._fadedLighting;break;case 1:this._lighting=this._newLighting,this._oldLighting.copyFrom(this._newLighting)}}updateLighting(i,t,h,e){this._oldLighting.copyFrom(this.lighting),this._newLighting.noonFactor=t,this._newLighting.globalFactor=h,this._newLighting.set(i),1===e&&this.clouds.requestFade(),this.fadeLighting()}get highlight(){return null==this.highlightLevel?null:this.highlights[this.highlightLevel]}}class g{constructor(){this.fadeFactor=1,this.reprojectionMatrix=i()}}export{r as BindParameters,n as ViewportSize};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as e}from"tslib";import has from"../../../../core/has.js";import{nextPowerOfTwo as t}from"../../../../core/mathUtils.js";import{disposeMaybe as r}from"../../../../core/maybe.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{ortho as h}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{RenderCategory as a,InternalRenderCategory as n}from"../../webgl.js";import{glLayout as c}from"../../support/buffer/glUtil.js";import{newLayout as l}from"../../support/buffer/InterleavedLayout.js";import u from"../../webgl/RenderCamera.js";import d from"../../webgl/RenderNode.js";import{ShaderOutputConfiguration as m}from"../core/shaderLibrary/ShaderOutputConfiguration.js";import{VertexArrayObject as p}from"./VertexArrayObject.js";import{C as g}from"../../../../chunks/CutFillDepth.glsl.js";import{CutFillDepthTechnique as f}from"../shaders/CutFillDepthTechnique.js";import{C as _}from"../../../../chunks/CutFillReduction.glsl.js";import{CutFillReductionTechnique as b}from"../shaders/CutFillReductionTechnique.js";import{C as F}from"../../../../chunks/CutFillTargetDepth.glsl.js";import{CutFillTargetDepthTechnique as w}from"../shaders/CutFillTargetDepthTechnique.js";import{PrimitiveType as C,DataType as T}from"../../../webgl/enums.js";import{VertexBuffer as x}from"../../../webgl/VertexBuffer.js";let j=class extends d{constructor(e){super(e),this.consumes={required:[a.TRANSPARENT]},this.produces=n.CUTFILL_DEPTH,this._cutFillTargetDepthConfiguration=new m,this._cutFillTargetDepthParameters=new F,this._cutFillDepthParameters=new g,this._cutFillReductionParameters=new _,this.needsRender=!1,this.done=!0,this._localOrigin=o(),this._maxTextureSize=4096,this._width=0,this._height=0,this._reducedWidth=0,this._reducedHeight=0,this._depthFormat=12,this._colorFormat=10,this._targetVao=null}initialize(){this._maxTextureSize=Math.min(has("esri-mobile")?1024:this._maxTextureSize,this.fboCache.rctx.parameters.maxTextureSize),this._cutFillTargetDepthConfiguration.output=8}destroy(){this._targetVao=r(this._targetVao)}precompile(){this.techniques.precompile(w,this._cutFillTargetDepthConfiguration),this.techniques.precompile(f),this.techniques.precompile(b),this.view.stage.renderer.precompileCutFill()}render(e){const t=e.find(({name:e})=>e===n.CUTFILL_DEPTH);if(!this._orthographicCamera||!this._targetVao||!this.needsRender)return t;const r=this.techniques.get(w,this._cutFillTargetDepthConfiguration),i=this.techniques.get(f),s=this.techniques.get(b);if(!r.compiled||!i.compiled||!s.compiled)return this.requestRender(1),t;this.needsRender=!1;const h=this.renderingContext,o=this.fboCache,a=h.getViewport(),c=o.acquire(this._width,this._height,"cutfill reference depth",this._depthFormat);h.bindFramebuffer(c.fbo),h.clear(256),this.view.stage.renderer.renderCutFillReferenceDepth(this._orthographicCamera);const l=o.acquire(this._width,this._height,"cutfill target depth",this._depthFormat);h.bindFramebuffer(l.fbo),h.setViewport(0,0,this._width,this._height),h.setClearDepth(1),h.clear(256),this._cutFillTargetDepthParameters.origin=this._localOrigin,this._cutFillTargetDepthParameters.cutFillCamera=this._orthographicCamera,h.bindTechnique(r,this.bindParameters,this._cutFillTargetDepthParameters),h.bindVAO(this._targetVao),h.drawArrays(C.TRIANGLES,0,this._targetVao.vertexCount("geometry"));let u=o.acquire(this._width,this._height,"cutfill reduction even",this._colorFormat),d=o.acquire(this._width,this._height,"cutfill reduction odd",this._colorFormat);this._cutFillDepthParameters.referenceDepthTexture=c.depthTexture,this._cutFillDepthParameters.targetDepthTexture=l.depthTexture,h.bindFramebuffer(u.fbo),h.bindTechnique(i,this.bindParameters,this._cutFillDepthParameters),h.clear(16384),h.screen.draw(),c.release(),l.release();let m=this._width,p=this._height;const g=Math.ceil(Math.log2(Math.min(m,p)));for(let n=0;n<g;n++)m=Math.ceil(m/2),p=Math.ceil(p/2),this._cutFillReductionParameters.depthTexture=u.getTexture(),this._prepareFBO(d,m,p),h.bindTechnique(s,this.bindParameters,this._cutFillReductionParameters),h.screen.draw(),[u,d]=[d,u];return this._buffer=new Float32Array(m*p*2),u.fbo?.readPixels(0,0,m,p,33319,T.FLOAT,this._buffer),this._reducedWidth=m,this._reducedHeight=p,u.release(),d.release(),h.setViewport(a.x,a.y,a.width,a.height),this.done=!0,t}init(e,i){const s=this.renderingContext,{cameraDimensions:{width:h,height:o},localOriginRenderSpace:a}=e,n=this._maxTextureSize,c=o/h,l=h>o?n:n/c,u=h>o?n*c:n;this._width=t(l),this._height=t(u);const d=[l,u];this._orthographicCamera=this._createCamera(e,d),this._targetVao=r(this._targetVao),this._targetVao=R(s,i),this._localOrigin=a,this.done=!1}start(){0!==this._width&&0!==this._height&&(this.needsRender=!0)}getDepth(){let e=0,t=0;for(let r=0;r<this._reducedWidth;r++)for(let i=0;i<this._reducedHeight;i++){const s=r+i*this._reducedHeight;e+=this._buffer?.[2*s]??0,t+=this._buffer?.[2*s+1]??0}return{cut:e,fill:t}}get width(){return this._width}get height(){return this._height}_prepareFBO(e,t,r){const i=this.renderingContext;i.bindFramebuffer(e.fbo),i.setViewport(0,0,t,r),i.setClearColor(0,0,0,0),i.clear(16384)}_createCamera(e,t){const{cameraPositionRenderSpace:r,localOriginRenderSpace:i,northVector:s,cameraDimensions:{width:o,height:a},cameraNearFar:{near:n,far:c}}=e,l=new u({eye:r,center:i,up:s,near:n,far:c});return l.viewport=[0,0,t[0],t[1]],h(l.projectionMatrix,-o/2,o/2,-a/2,a/2,n,c),l}};e([i()],j.prototype,"consumes",void 0),e([i()],j.prototype,"produces",void 0),e([i()],j.prototype,"needsRender",void 0),e([i()],j.prototype,"done",void 0),j=e([s("esri.views.3d.webgl-engine.lib.CutFillDepth")],j);const D=l().vec3f("position").freeze();function R(e,t){const{positions:r,indices:i}=t,s=D.createBuffer(i.length),h=s.position;for(let a=0;a<i.length;++a){const e=3*i[a];h.set(a,0,r[e]),h.set(a,1,r[e+1]),h.set(a,2,r[e+2])}const o=new x(e,c(D),s.buffer);return new p(e,o)}class P{constructor(e,t){this.positions=e,this.indices=t}}export{j as CutFillDepth,P as TargetGeometry};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{DataType as e}from"../../../webgl/enums.js";import{fromLayout as o}from"../../../webgl/VertexAttributeLocations.js";import{VertexElementDescriptor as t}from"../../../webgl/VertexElementDescriptor.js";const i=[],n=[new t("position",3,e.FLOAT,0,12)],r=[new t("position",2,e.FLOAT,0,8)],s=o(r),p=[new t("position",2,e.FLOAT,0,12),new t("uv0",2,e.HALF_FLOAT,8,12)],
|
|
5
|
+
import{DataType as e}from"../../../webgl/enums.js";import{fromLayout as o}from"../../../webgl/VertexAttributeLocations.js";import{VertexElementDescriptor as t}from"../../../webgl/VertexElementDescriptor.js";const i=[],n=[new t("position",3,e.FLOAT,0,12)],r=[new t("position",2,e.FLOAT,0,8)],s=o(r),p=o(n),w=[new t("position",2,e.FLOAT,0,12),new t("uv0",2,e.HALF_FLOAT,8,12)],m=[new t("position",2,e.FLOAT,0,16),new t("uv0",2,e.FLOAT,8,16)];export{i as NoVertex,r as Pos2,s as Pos2Locations,w as Pos2TexF16,m as Pos2TexF32,n as Pos3,p as Pos3Locations};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{releaseMaybe as e}from"../../../../core/maybe.js";import{d as t}from"../../../../chunks/vec42.js";import{ZEROS as i}from"../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{ViewportSize as r}from"./BindParameters.js";import{ColorAttachment1 as o}from"../../../webgl/enums.js";import{ensureAttachmentMaxSize as h}from"../../../webgl/FramebufferObject.js";class c{constructor(e){this._fbos=e,this._requiresEmission=!1,this._size=new r(0,0),this._clearColor=s()}dispose(){this._color=e(this._color),this.releaseDepth()}initialize(e,i,s,r){this._size.width=e,this._size.height=i,h(this._size,this._fbos.rctx.parameters.maxTextureSize);const o=this._color;return this._color=null,this.releaseDepth(),this._requiresEmission=r,t(this._clearColor,s),o}releaseDepth(){this._color?.detachDepth(),this._depth=e(this._depth)}update(e){const t=this._ensureColor();t.attachDepth(this.depth),this._color=e(t)}bind(){const{rctx:e}=this._fbos,t=null==this._color;this.color.attachDepth(this.depth),e.bindFramebuffer(this.color.fbo),t&&(e.setClearStencil(0),e.setClearColor(this._clearColor[0],this._clearColor[1],this._clearColor[2],this._clearColor[3]),e.clear(17664),this._requiresEmission&&e.clearBuffer(1,i))}_acquireColor(){return this._requiresEmission?this._fbos.acquire(this._size.width,this._size.height,"acquired-color").acquireColor(o,8,"emissive"):this._fbos.acquire(this._size.width,this._size.height,"acquired-color")}_acquireDepth(){return this._fbos.acquireDepth(
|
|
5
|
+
import{releaseMaybe as e}from"../../../../core/maybe.js";import{d as t}from"../../../../chunks/vec42.js";import{ZEROS as i}from"../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{ViewportSize as r}from"./BindParameters.js";import{ColorAttachment1 as o}from"../../../webgl/enums.js";import{ensureAttachmentMaxSize as h}from"../../../webgl/FramebufferObject.js";class c{constructor(e){this._fbos=e,this._requiresEmission=!1,this._size=new r(0,0),this._clearColor=s()}dispose(){this._color=e(this._color),this.releaseDepth()}initialize(e,i,s,r){this._size.width=e,this._size.height=i,h(this._size,this._fbos.rctx.parameters.maxTextureSize);const o=this._color;return this._color=null,this.releaseDepth(),this._requiresEmission=r,t(this._clearColor,s),o}releaseDepth(){this._color?.detachDepth(),this._depth=e(this._depth)}update(e){const t=this._ensureColor();t.attachDepth(this.depth),this._color=e(t)}bind(){const{rctx:e}=this._fbos,t=null==this._color;this.color.attachDepth(this.depth),e.bindFramebuffer(this.color.fbo),t&&(e.setClearStencil(0),e.setClearColor(this._clearColor[0],this._clearColor[1],this._clearColor[2],this._clearColor[3]),e.clear(17664),this._requiresEmission&&e.clearBuffer(1,i))}_acquireColor(){return this._requiresEmission?this._fbos.acquire(this._size.width,this._size.height,"acquired-color").acquireColor(o,8,"emissive"):this._fbos.acquire(this._size.width,this._size.height,"acquired-color")}_acquireDepth(){return this._fbos.acquireDepth(12,this._size.width,this._size.height,"depth")}get size(){return this._size}get color(){return this._ensureColor()}get depth(){return this._depth??=this._acquireDepth(),this._depth}_ensureColor(){return this._color??=this._acquireColor(),this._color}}export{c as MainFramebuffer};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{generateUID as r}from"../../../../core/uid.js";import{DefaultTechniqueConfiguration as e}from"../materials/DefaultTechniqueConfiguration.js";import{updateParameters as t}from"../materials/internal/MaterialUtil.js";import{NoParameters as i}from"../../../webgl/NoParameters.js";class s{constructor(e,i){this.id=r(),this.supportsEdges=!1,this._renderPriority=0,this._parameters=new i,t(this._parameters,e),this.validateParameters(this._parameters)}get parameters(){return this._parameters}update(r){return!1}setParameters(r,e=!0){t(this._parameters,r)&&(this.validateParameters(this._parameters),e&&this._parametersChanged())}validateParameters(r){}shouldRender(r){return this.visible&&this.isVisibleForOutput(r.output)&&(!this.parameters.isDecoration||r.bind.decorations)&&0!==(this.parameters.renderOccluded&r.renderOccludedMask)}isVisibleForOutput(r){return!0}get renderPriority(){return this._renderPriority}set renderPriority(r){r!==this._renderPriority&&(this._renderPriority=r,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}get renderOccludedFlags(){return this.visible?this.parameters.renderOccluded:0}get hasEmissions(){return!1}getConfiguration(r,t,i=new e){return i.output=r,i.hasHighlightMixTexture=
|
|
5
|
+
import{generateUID as r}from"../../../../core/uid.js";import{DefaultTechniqueConfiguration as e}from"../materials/DefaultTechniqueConfiguration.js";import{updateParameters as t}from"../materials/internal/MaterialUtil.js";import{NoParameters as i}from"../../../webgl/NoParameters.js";class s{constructor(e,i){this.id=r(),this.supportsEdges=!1,this._renderPriority=0,this._parameters=new i,t(this._parameters,e),this.validateParameters(this._parameters)}get parameters(){return this._parameters}update(r){return!1}setParameters(r,e=!0){t(this._parameters,r)&&(this.validateParameters(this._parameters),e&&this._parametersChanged())}validateParameters(r){}shouldRender(r){return this.visible&&this.isVisibleForOutput(r.output)&&(!this.parameters.isDecoration||r.bind.decorations)&&0!==(this.parameters.renderOccluded&r.renderOccludedMask)}isVisibleForOutput(r){return!0}get renderPriority(){return this._renderPriority}set renderPriority(r){r!==this._renderPriority&&(this._renderPriority=r,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}get renderOccludedFlags(){return this.visible?this.parameters.renderOccluded:0}get hasEmissions(){return!1}getConfiguration(r,t,i=new e){return i.output=r,i.hasHighlightMixTexture=9===r&&null!=t.highlightMixTexture,i}}class a extends i{constructor(){super(...arguments),this.renderOccluded=1,this.isDecoration=!1}}export{s as Material,a as MaterialParameters};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../../core/has.js";import{generateUID as t}from"../../../../core/uid.js";import{multiply as i,copy as e,hasIdentityRotation as s}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as o,IDENTITY as r}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{m as a,t as h,j as n,i as m,f as d,q as l,c}from"../../../../chunks/vec32.js";import{create as g,fromValues as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{
|
|
5
|
+
import"../../../../core/has.js";import{generateUID as t}from"../../../../core/uid.js";import{multiply as i,copy as e,hasIdentityRotation as s}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as o,IDENTITY as r}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{m as a,t as h,j as n,i as m,f as d,q as l,c}from"../../../../chunks/vec32.js";import{create as g,fromValues as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{o as u,a as f,c as b}from"../../../../chunks/sphere.js";import{maxScale as v}from"../../support/mathUtils.js";import{Object3DOccludeeStateID as p,Object3DHighlightStateID as y}from"./Object3DStateID.js";import{assert as j}from"./Util.js";import{affectsGeometry as S}from"./VertexAttribute.js";import{addObject3DStateID as V,removeObject3DStateID as x}from"../materials/renderers/utils.js";class W{constructor(i={}){this.id=t(),this._highlightIds=new Set,this._shaderTransformation=null,this._visible=!0,this.castShadow=i.castShadow??!0,this.usesVerticalDistanceToGround=i.usesVerticalDistanceToGround??!1,this.graphicUid=i.graphicUid,this.layerViewUid=i.layerViewUid,i.isElevationSource&&(this.lastValidElevationBB=new A),this._geometries=i.geometries?Array.from(i.geometries):new Array}dispose(){this._geometries.length=0}get layer(){return this._layer}set layer(t){j(null==this._layer||null==t,"Object3D can only be added to a single Layer"),this._layer=t}addGeometry(t){t.visible=this._visible,this._geometries.push(t);for(const i of this._highlightIds)t.addHighlight(i);this._emit("geometryAdded",{object:this,geometry:t}),this._highlightIds.size&&this._emit("highlightChanged",this),this._invalidateBoundingVolume()}removeGeometry(t){const i=this._geometries.splice(t,1)[0];if(i){for(const t of this._highlightIds)i.removeHighlight(t);this._emit("geometryRemoved",{object:this,geometry:i}),this._highlightIds.size&&this._emit("highlightChanged",this),this._invalidateBoundingVolume()}}removeAllGeometries(){for(;this._geometries.length>0;)this.removeGeometry(0)}geometryVertexAttributeUpdated(t,i,e=!1){this._emit("attributesChanged",{object:this,geometry:t,attribute:i,sync:e}),S(i)&&this._invalidateBoundingVolume()}get visible(){return this._visible}set visible(t){if(this._visible!==t){this._visible=t;for(const t of this._geometries)t.visible=this._visible;this._emit("visibilityChanged",this)}}maskOccludee(){const t=new p;for(const i of this._geometries)i.occludees=V(i.occludees,t);return this._emit("occlusionChanged",this),t}removeOcclude(t){for(const i of this._geometries)i.occludees=x(i.occludees,t);this._emit("occlusionChanged",this)}highlight(t){const i=new y(t);for(const e of this._geometries)e.addHighlight(i);return this._emit("highlightChanged",this),this._highlightIds.add(i),i}removeHighlight(t){this._highlightIds.delete(t);for(const i of this._geometries)i.removeHighlight(t);this._emit("highlightChanged",this)}removeStateID(t){0===t.channel?this.removeHighlight(t):this.removeOcclude(t)}getCombinedStaticTransformation(t,e){return i(e,this.transformation,t.transformation)}getCombinedShaderTransformation(t,e=o()){return i(e,this.effectiveTransformation,t.transformation)}get boundingVolumeWorldSpace(){return this._bvWorldSpace||(this._bvWorldSpace=this._bvWorldSpace||new M,this._validateBoundingVolume(this._bvWorldSpace,0)),this._bvWorldSpace}get boundingVolumeObjectSpace(){return this._bvObjectSpace||(this._bvObjectSpace=this._bvObjectSpace||new M,this._validateBoundingVolume(this._bvObjectSpace,1)),this._bvObjectSpace}_validateBoundingVolume(t,i){const e=1===i;for(const s of this._geometries){const i=s.boundingInfo;i&&T(i,t,e?s.transformation:this.getCombinedShaderTransformation(s))}u(t.bounds,a(U,t.min,t.max,.5));for(const s of this._geometries){const i=s.boundingInfo;if(null==i)continue;const o=e?s.transformation:this.getCombinedShaderTransformation(s),r=v(o);h(U,i.center,o);const a=n(U,f(t.bounds)),m=i.radius*r;t.bounds[3]=Math.max(t.bounds[3],a+m)}}_invalidateBoundingVolume(){const t=this._bvWorldSpace?.bounds;this._bvObjectSpace=this._bvWorldSpace=void 0,this.layer&&t&&this.layer.notifyObjectBBChanged(this,t)}_emit(t,i){this.layer?.events.emit(t,i)}get geometries(){return this._geometries}get transformation(){return this._transformation??r}set transformation(t){this._transformation=e(this._transformation??o(),t),this._invalidateBoundingVolume(),this._emit("transformationChanged",this)}get shaderTransformation(){return this._shaderTransformation}set shaderTransformation(t){this._shaderTransformation=t?e(this._shaderTransformation??o(),t):null,this._invalidateBoundingVolume(),this._emit("shaderTransformationChanged",this)}get effectiveTransformation(){return this.shaderTransformation??this.transformation}get test(){}}class A{constructor(){this._data=[Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE]}get min(){return _(this._data[0],this._data[1],this._data[2])}get max(){return _(this._data[3],this._data[4],this._data[5])}minWith(t){const{_data:i}=this;i[0]=Math.min(i[0],t[0]),i[1]=Math.min(i[1],t[1]),i[2]=Math.min(i[2],t[2])}maxWith(t){const{_data:i}=this;i[3]=Math.max(i[3],t[0]),i[4]=Math.max(i[4],t[1]),i[5]=Math.max(i[5],t[2])}assignMinMax(t,i){for(let e=0;e<3;++e)this._data[0+e]=t[e],this._data[3+e]=i[e]}isEmpty(){return this._data[3]<this._data[0]&&this._data[4]<this._data[1]&&this._data[5]<this._data[2]}}class M extends A{constructor(){super(...arguments),this.bounds=b()}}function T(t,i,e){const o=t.bbMin,r=t.bbMax;if(s(e)){const t=m(C,e[12],e[13],e[14]);return d(B,o,t),d(O,r,t),i.minWith(B),void i.maxWith(O)}if(h(B,o,e),l(o,r))return i.minWith(B),void i.maxWith(B);h(O,r,e),i.minWith(B),i.minWith(O),i.maxWith(B),i.maxWith(O);for(let s=0;s<3;++s)c(B,o),c(O,r),B[s]=r[s],O[s]=o[s],h(B,B,e),h(O,O,e),i.minWith(B),i.minWith(O),i.maxWith(B),i.maxWith(O)}const C=g(),B=g(),O=g(),U=g();export{M as BoundingVolume,W as Object3D};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../../../core/ObjectPool.js";import e from"../../../../core/PooledArray.js";import{m as n,s as o,g as i,f as s}from"../../../../chunks/vec32.js";import{create as r,fromValues as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{intersectsSphere as a}from"../../../../geometry/support/frustum.js";import{wrap as l}from"../../../../geometry/support/ray.js";import{j as d,g as u,k as c,q as f,c as m,r as _,l as p,a as b}from"../../../../chunks/sphere.js";import{rayBoxTest as g}from"./Util.js";class S{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(t,e){this.objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new j,this._objectCount=0,e&&(void 0!==e.maximumObjectsPerNode&&(this._maximumObjectsPerNode=e.maximumObjectsPerNode),void 0!==e.maximumDepth&&(this._maximumDepth=e.maximumDepth))}destroy(){this._degenerateObjects.clear(),j.clearPool(),C[0]=null,V.prune(),Y.prune()}add(t){const e=Array.from(t);this._grow(e);const n=j.acquire();for(const o of e)++this._objectCount,this._isDegenerate(o)?this._degenerateObjects.add(o):(n.init(this._root),this._add(o,n));j.release(n)}remove(t,e=null){this._objectCount-=t.length;const n=j.acquire();for(const o of t){const t=e??d(this.objectToBoundingSphere(o),G);F(t[3])?(n.init(this._root),z(o,t,n)):this._degenerateObjects.delete(o)}j.release(n),this._shrink()}update(t,e){if(!F(e[3])&&this._isDegenerate(t))return;const n=I(t);this.remove(n,e),this.add(n)}forEachAlongRay(t,e,n){const o=l(t,e);x(this._root,t=>{if(!N(o,t))return!1;const e=t.node;return e.terminals.forAll(t=>{this._intersectsObject(o,t)&&n(t)}),null!==e.residents&&e.residents.forAll(t=>{this._intersectsObject(o,t)&&n(t)}),!0})}forEachAlongRayWithVerticalOffset(t,e,n,o){const i=l(t,e);x(this._root,t=>{if(!T(i,t,o))return!1;const e=t.node;return e.terminals.forAll(t=>{this._intersectsObjectWithOffset(i,t,o)&&n(t)}),null!==e.residents&&e.residents.forAll(t=>{this._intersectsObjectWithOffset(i,t,o)&&n(t)}),!0})}forEach(t){x(this._root,e=>{const n=e.node;return n.terminals.forAll(t),null!==n.residents&&n.residents.forAll(t),!0}),this._degenerateObjects.forEach(t)}forEachDegenerateObject(t){this._degenerateObjects.forEach(t)}findClosest(t,e,n,o=()=>!0,r=1/0){let h=1/0,l=1/0,d=null;const u=R(t,e),c=i=>{if(--r,!o(i))return;const s=this.objectToBoundingSphere(i);if(!a(n,s))return;const u=w(t,e,b(s)),c=u-s[3],f=u+s[3];c<h&&(h=c,l=f,d=i)};return O(this._root,o=>{if(r<=0||!a(n,o.bounds))return!1;i(H,u,o.halfSize),s(H,H,b(o.bounds));if(w(t,e,H)>l)return!1;const h=o.node;return h.terminals.forAll(t=>c(t)),null!==h.residents&&h.residents.forAll(t=>c(t)),!0},t,e),d}forEachInDepthRange(t,e,n,o,r,h,l){let d=-1/0,u=1/0;const c={setRange:t=>{1===n?(d=Math.max(d,t.near),u=Math.min(u,t.far)):(d=Math.max(d,-t.far),u=Math.min(u,-t.near))}};c.setRange(o);const f=w(e,n,t),m=R(e,n),_=R(e,-n),p=t=>{if(!l(t))return;const o=this.objectToBoundingSphere(t),i=w(e,n,b(o))-f,s=i-o[3],m=i+o[3];s>u||m<d||!a(h,o)||r(t,c)};O(this._root,t=>{if(!a(h,t.bounds))return!1;i(H,m,t.halfSize),s(H,H,b(t.bounds));if(w(e,n,H)-f>u)return!1;i(H,_,t.halfSize),s(H,H,b(t.bounds));if(w(e,n,H)-f<d)return!1;const o=t.node;return o.terminals.forAll(t=>p(t)),null!==o.residents&&o.residents.forAll(t=>p(t)),!0},e,n)}forEachNode(t){x(this._root,e=>t(e.node,e.bounds,e.halfSize,e.depth))}forEachNeighbor(t,e){const n=u(e),i=c(e,r()),s=e=>{const s=this.objectToBoundingSphere(e),r=u(s),h=n+r;return!(o(b(s),i)-h*h<=0)||t(e)};let h=!0;const a=t=>{h&&(h=s(t))};x(this._root,t=>{const e=u(t.bounds),s=n+e;if(o(b(t.bounds),i)-s*s>0)return!1;const r=t.node;return r.terminals.forAll(a),h&&null!==r.residents&&r.residents.forAll(a),h}),h&&this.forEachDegenerateObject(a)}_intersectsObject(t,e){const n=this.objectToBoundingSphere(e);return!(n[3]>0)||f(n,t)}_intersectsObjectWithOffset(t,e,n){const o=this.objectToBoundingSphere(e);return!(o[3]>0)||f(n.applyToBoundingSphere(o),t)}_add(t,e){e.advanceTo(this.objectToBoundingSphere(t))?e.node.terminals.push(t):(e.node.residents.push(t),e.node.residents.length>this._maximumObjectsPerNode&&e.depth<this._maximumDepth&&this._split(e))}_split(t){const e=t.node.residents;t.node.residents=null;for(let n=0;n<e.length;n++){const o=j.acquire().init(t);this._add(e.at(n),o),j.release(o)}}_grow(t){if(E(t,t=>this.objectToBoundingSphere(t),U),F(U[3])&&!this._fitsInsideTree(U))if(D(this._root.node))d(U,this._root.bounds),this._root.halfSize=1.25*this._root.bounds[3],this._root.updateBoundsRadiusFromHalfSize();else{const t=this._rootBoundsForRootAsSubNode(U);this._placingRootViolatesMaxDepth(t)?this._rebuildTree(U,t):this._growRootAsSubNode(t),j.release(t)}}_rebuildTree(t,e){_(K,e.bounds),K[3]=e.halfSize,E([t,K],t=>t,Q);const n=j.acquire().init(this._root);this._root.initFrom(null,Q,Q[3]),this._root.increaseHalfSize(1.25),x(n,t=>(this.add(t.node.terminals.data),null!==t.node.residents&&this.add(t.node.residents.data),!0)),j.release(n)}_placingRootViolatesMaxDepth(t){const e=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E;let n=0;return x(this._root,t=>(n=Math.max(n,t.depth),n+e<=this._maximumDepth)),n+e>this._maximumDepth}_rootBoundsForRootAsSubNode(t){const e=t[3],n=t;let o=-1/0;const i=this._root.bounds,s=this._root.halfSize;for(let h=0;h<3;h++){const t=i[h]-s-(n[h]-e),r=n[h]+e-(i[h]+s),a=Math.max(0,Math.ceil(t/(2*s))),l=Math.max(0,Math.ceil(r/(2*s)))+1,d=2**Math.ceil(Math.log(a+l)*Math.LOG2E);o=Math.max(o,d),X[h].min=a,X[h].max=l}for(let h=0;h<3;h++){let t=X[h].min,e=X[h].max;const n=(o-(t+e))/2;t+=Math.ceil(n),e+=Math.floor(n);const r=i[h]-s-t*s*2;L[h]=r+(e+t)*s}const r=o*s;return L[3]=r*k,j.acquire().initFrom(null,L,r,0)}_growRootAsSubNode(t){const e=this._root.node;_(U,this._root.bounds),U[3]=this._root.halfSize,this._root.init(t),t.advanceTo(U,null,!0),t.node.children=e.children,t.node.residents=e.residents,t.node.terminals=e.terminals}_shrink(){for(;;){const t=this._findShrinkIndex();if(-1===t)break;this._root.advance(t),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let t=null;const e=this._root.node.children;let n=0,o=0;for(;o<e.length&&null==t;)n=o++,t=e[n];for(;o<e.length;)if(e[o++])return-1;return n}_isDegenerate(t){return!F(this.objectToBoundingSphere(t)[3])}_fitsInsideTree(t){const e=this._root.bounds,n=this._root.halfSize;return t[3]<=n&&t[0]>=e[0]-n&&t[0]<=e[0]+n&&t[1]>=e[1]-n&&t[1]<=e[1]+n&&t[2]>=e[2]-n&&t[2]<=e[2]+n}toJSON(){const{maximumDepth:t,maximumObjectsPerNode:e,_objectCount:n}=this,o=this._nodeToJSON(this._root.node);return{maximumDepth:t,maximumObjectsPerNode:e,objectCount:n,root:{bounds:this._root.bounds,halfSize:this._root.halfSize,depth:this._root.depth,node:o}}}_nodeToJSON(t){const e=t.children.map(t=>t?this._nodeToJSON(t):null),n=t.residents?.map(t=>this.objectToBoundingSphere(t)),o=t.terminals?.map(t=>this.objectToBoundingSphere(t));return{children:e,residents:n,terminals:o}}static fromJSON(t){const e=new S(t=>t,{maximumDepth:t.maximumDepth,maximumObjectsPerNode:t.maximumObjectsPerNode});return e._objectCount=t.objectCount,e._root.initFrom(t.root.node,t.root.bounds,t.root.halfSize,t.root.depth),e}}class j{constructor(){this.bounds=m(),this.halfSize=0,this.initFrom(null,null,0,0)}init(t){return this.initFrom(t.node,t.bounds,t.halfSize,t.depth)}initFrom(t,e,n,o=this.depth){return this.node=null!=t?t:j.createEmptyNode(),e&&d(e,this.bounds),this.halfSize=n,this.depth=o,this}increaseHalfSize(t){this.halfSize*=t,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds[3]=this.halfSize*k}advance(t){let e=this.node.children[t];e||(e=j.createEmptyNode(),this.node.children[t]=e),this.node=e,this.halfSize/=2,this.depth++;const n=q[t];return this.bounds[0]+=n[0]*this.halfSize,this.bounds[1]+=n[1]*this.halfSize,this.bounds[2]+=n[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(t,e,n=!1){for(;;){if(this.isTerminalFor(t))return e?.(this,-1),!0;if(this.isLeaf()){if(!n)return e?.(this,-1),!1;this.node.residents=null}const o=this._childIndex(t);e?.(this,o),this.advance(o)}}isLeaf(){return null!=this.node.residents}isTerminalFor(t){return t[3]>this.halfSize/2}_childIndex(t){const e=this.bounds;return(e[0]<t[0]?1:0)+(e[1]<t[1]?2:0)+(e[2]<t[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new e({shrink:!0}),residents:new e({shrink:!0})}}static{this._pool=new t(()=>new j)}static acquire(){return j._pool.acquire()}static release(t){j._pool.release(t)}static clearPool(){j._pool.prune()}}function x(t,e){let n=j.acquire().init(t);const o=[n];for(;0!==o.length;){if(n=o.pop(),e(n)&&!n.isLeaf())for(let t=0;t<n.node.children.length;t++){n.node.children[t]&&o.push(j.acquire().init(n).advance(t))}j.release(n)}}function O(t,e,n,o=1){let i=j.acquire().init(t);const s=[i];for(P(n,o,Z);0!==s.length;){if(i=s.pop(),e(i)&&!i.isLeaf())for(let t=7;t>=0;--t){const e=Z[t];i.node.children[e]&&s.push(j.acquire().init(i).advance(e))}j.release(i)}}function z(t,e,n){V.clear();const o=n.advanceTo(e,(t,e)=>{V.push(t.node),V.push(e)})?n.node.terminals:n.node.residents;if(o.removeUnordered(t),0===o.length)for(let i=V.length-2;i>=0;i-=2){if(!M(V.data[i],V.data[i+1]))break}}function M(t,n){return n>=0&&(t.children[n]=null),!!D(t)&&(null===t.residents&&(t.residents=new e({shrink:!0})),!0)}function N(t,e){return v(b(e.bounds),2*-e.halfSize,J),v(b(e.bounds),2*e.halfSize,W),g(t.origin,t.direction,J,W)}function T(t,e,n){return v(b(e.bounds),2*-e.halfSize,J),v(b(e.bounds),2*e.halfSize,W),n.applyToMinMax(J,W),g(t.origin,t.direction,J,W)}function D(t){if(0!==t.terminals.length)return!1;if(null!==t.residents)return 0===t.residents.length;for(let e=0;e<t.children.length;e++)if(t.children[e])return!1;return!0}function A(t,e){t[0]=Math.min(t[0],e[0]-e[3]),t[1]=Math.min(t[1],e[1]-e[3]),t[2]=Math.min(t[2],e[2]-e[3])}function B(t,e){t[0]=Math.max(t[0],e[0]+e[3]),t[1]=Math.max(t[1],e[1]+e[3]),t[2]=Math.max(t[2],e[2]+e[3])}function v(t,e,n){n[0]=t[0]+e,n[1]=t[1]+e,n[2]=t[2]+e}function E(t,e,o){J[0]=1/0,J[1]=1/0,J[2]=1/0,W[0]=-1/0,W[1]=-1/0,W[2]=-1/0;for(const n of t){const t=e(n);F(t[3])&&(A(J,t),B(W,t))}p(o,n($,J,W,.5)),o[3]=Math.max(W[0]-J[0],W[1]-J[1],W[2]-J[2])/2}function P(t,e,n){if(!Y.length)for(let o=0;o<8;++o)Y.push({index:0,distance:0});for(let o=0;o<8;++o){const n=q[o];Y.data[o].index=o,Y.data[o].distance=w(t,e,n)}Y.sort((t,e)=>t.distance-e.distance);for(let o=0;o<8;++o)n[o]=Y.data[o].index}function R(t,e){let n,o=1/0;for(let i=0;i<8;++i){const s=w(t,e,y[i]);s<o&&(o=s,n=y[i])}return n}function w(t,e,n){return e*(t[0]*n[0]+t[1]*n[1]+t[2]*n[2])}function F(t){return!isNaN(t)&&t!==-1/0&&t!==1/0&&t>0}const q=[h(-1,-1,-1),h(1,-1,-1),h(-1,1,-1),h(1,1,-1),h(-1,-1,1),h(1,-1,1),h(-1,1,1),h(1,1,1)],y=[h(-1,-1,-1),h(-1,-1,1),h(-1,1,-1),h(-1,1,1),h(1,-1,-1),h(1,-1,1),h(1,1,-1),h(1,1,1)],k=Math.sqrt(3),C=[null];function I(t){return C[0]=t,C}const L=m(),H=r(),J=r(),W=r(),V=new e,G=m(),U=m(),K=m(),Q=m(),X=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],Y=new e,Z=[0,0,0,0,0,0,0,0],$=r();export{S as Octree};
|
|
5
|
+
import t from"../../../../core/ObjectPool.js";import e from"../../../../core/PooledArray.js";import{m as n,s as o,g as i,f as s}from"../../../../chunks/vec32.js";import{create as r,fromValues as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{intersectsSphere as a}from"../../../../geometry/support/frustum.js";import{wrap as l}from"../../../../geometry/support/ray.js";import{m as d,g as u,n as c,w as f,c as m,x as _,o as p,a as b}from"../../../../chunks/sphere.js";import{rayBoxTest as g}from"./Util.js";class S{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(t,e){this.objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new j,this._objectCount=0,e&&(void 0!==e.maximumObjectsPerNode&&(this._maximumObjectsPerNode=e.maximumObjectsPerNode),void 0!==e.maximumDepth&&(this._maximumDepth=e.maximumDepth))}destroy(){this._degenerateObjects.clear(),j.clearPool(),C[0]=null,V.prune(),Y.prune()}add(t){const e=Array.from(t);this._grow(e);const n=j.acquire();for(const o of e)++this._objectCount,this._isDegenerate(o)?this._degenerateObjects.add(o):(n.init(this._root),this._add(o,n));j.release(n)}remove(t,e=null){this._objectCount-=t.length;const n=j.acquire();for(const o of t){const t=e??d(this.objectToBoundingSphere(o),G);F(t[3])?(n.init(this._root),z(o,t,n)):this._degenerateObjects.delete(o)}j.release(n),this._shrink()}update(t,e){if(!F(e[3])&&this._isDegenerate(t))return;const n=I(t);this.remove(n,e),this.add(n)}forEachAlongRay(t,e,n){const o=l(t,e);x(this._root,t=>{if(!N(o,t))return!1;const e=t.node;return e.terminals.forAll(t=>{this._intersectsObject(o,t)&&n(t)}),null!==e.residents&&e.residents.forAll(t=>{this._intersectsObject(o,t)&&n(t)}),!0})}forEachAlongRayWithVerticalOffset(t,e,n,o){const i=l(t,e);x(this._root,t=>{if(!T(i,t,o))return!1;const e=t.node;return e.terminals.forAll(t=>{this._intersectsObjectWithOffset(i,t,o)&&n(t)}),null!==e.residents&&e.residents.forAll(t=>{this._intersectsObjectWithOffset(i,t,o)&&n(t)}),!0})}forEach(t){x(this._root,e=>{const n=e.node;return n.terminals.forAll(t),null!==n.residents&&n.residents.forAll(t),!0}),this._degenerateObjects.forEach(t)}forEachDegenerateObject(t){this._degenerateObjects.forEach(t)}findClosest(t,e,n,o=()=>!0,r=1/0){let h=1/0,l=1/0,d=null;const u=P(t,e),c=i=>{if(--r,!o(i))return;const s=this.objectToBoundingSphere(i);if(!a(n,s))return;const u=R(t,e,b(s)),c=u-s[3],f=u+s[3];c<h&&(h=c,l=f,d=i)};return O(this._root,o=>{if(r<=0||!a(n,o.bounds))return!1;i(H,u,o.halfSize),s(H,H,b(o.bounds));if(R(t,e,H)>l)return!1;const h=o.node;return h.terminals.forAll(t=>c(t)),null!==h.residents&&h.residents.forAll(t=>c(t)),!0},t,e),d}forEachInDepthRange(t,e,n,o,r,h,l){let d=-1/0,u=1/0;const c={setRange:t=>{1===n?(d=Math.max(d,t.near),u=Math.min(u,t.far)):(d=Math.max(d,-t.far),u=Math.min(u,-t.near))}};c.setRange(o);const f=R(e,n,t),m=P(e,n),_=P(e,-n),p=t=>{if(!l(t))return;const o=this.objectToBoundingSphere(t),i=R(e,n,b(o))-f,s=i-o[3],m=i+o[3];s>u||m<d||!a(h,o)||r(t,c)};O(this._root,t=>{if(!a(h,t.bounds))return!1;i(H,m,t.halfSize),s(H,H,b(t.bounds));if(R(e,n,H)-f>u)return!1;i(H,_,t.halfSize),s(H,H,b(t.bounds));if(R(e,n,H)-f<d)return!1;const o=t.node;return o.terminals.forAll(t=>p(t)),null!==o.residents&&o.residents.forAll(t=>p(t)),!0},e,n)}forEachNode(t){x(this._root,e=>t(e.node,e.bounds,e.halfSize,e.depth))}forEachNeighbor(t,e){const n=u(e),i=c(e,r()),s=e=>{const s=this.objectToBoundingSphere(e),r=u(s),h=n+r;return!(o(b(s),i)-h*h<=0)||t(e)};let h=!0;const a=t=>{h&&(h=s(t))};x(this._root,t=>{const e=u(t.bounds),s=n+e;if(o(b(t.bounds),i)-s*s>0)return!1;const r=t.node;return r.terminals.forAll(a),h&&null!==r.residents&&r.residents.forAll(a),h}),h&&this.forEachDegenerateObject(a)}_intersectsObject(t,e){const n=this.objectToBoundingSphere(e);return!(n[3]>0)||f(n,t)}_intersectsObjectWithOffset(t,e,n){const o=this.objectToBoundingSphere(e);return!(o[3]>0)||f(n.applyToBoundingSphere(o),t)}_add(t,e){e.advanceTo(this.objectToBoundingSphere(t))?e.node.terminals.push(t):(e.node.residents.push(t),e.node.residents.length>this._maximumObjectsPerNode&&e.depth<this._maximumDepth&&this._split(e))}_split(t){const e=t.node.residents;t.node.residents=null;for(let n=0;n<e.length;n++){const o=j.acquire().init(t);this._add(e.at(n),o),j.release(o)}}_grow(t){if(w(t,t=>this.objectToBoundingSphere(t),U),F(U[3])&&!this._fitsInsideTree(U))if(D(this._root.node))d(U,this._root.bounds),this._root.halfSize=1.25*this._root.bounds[3],this._root.updateBoundsRadiusFromHalfSize();else{const t=this._rootBoundsForRootAsSubNode(U);this._placingRootViolatesMaxDepth(t)?this._rebuildTree(U,t):this._growRootAsSubNode(t),j.release(t)}}_rebuildTree(t,e){_(K,e.bounds),K[3]=e.halfSize,w([t,K],t=>t,Q);const n=j.acquire().init(this._root);this._root.initFrom(null,Q,Q[3]),this._root.increaseHalfSize(1.25),x(n,t=>(this.add(t.node.terminals.data),null!==t.node.residents&&this.add(t.node.residents.data),!0)),j.release(n)}_placingRootViolatesMaxDepth(t){const e=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E;let n=0;return x(this._root,t=>(n=Math.max(n,t.depth),n+e<=this._maximumDepth)),n+e>this._maximumDepth}_rootBoundsForRootAsSubNode(t){const e=t[3],n=t;let o=-1/0;const i=this._root.bounds,s=this._root.halfSize;for(let h=0;h<3;h++){const t=i[h]-s-(n[h]-e),r=n[h]+e-(i[h]+s),a=Math.max(0,Math.ceil(t/(2*s))),l=Math.max(0,Math.ceil(r/(2*s)))+1,d=2**Math.ceil(Math.log(a+l)*Math.LOG2E);o=Math.max(o,d),X[h].min=a,X[h].max=l}for(let h=0;h<3;h++){let t=X[h].min,e=X[h].max;const n=(o-(t+e))/2;t+=Math.ceil(n),e+=Math.floor(n);const r=i[h]-s-t*s*2;L[h]=r+(e+t)*s}const r=o*s;return L[3]=r*k,j.acquire().initFrom(null,L,r,0)}_growRootAsSubNode(t){const e=this._root.node;_(U,this._root.bounds),U[3]=this._root.halfSize,this._root.init(t),t.advanceTo(U,null,!0),t.node.children=e.children,t.node.residents=e.residents,t.node.terminals=e.terminals}_shrink(){for(;;){const t=this._findShrinkIndex();if(-1===t)break;this._root.advance(t),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let t=null;const e=this._root.node.children;let n=0,o=0;for(;o<e.length&&null==t;)n=o++,t=e[n];for(;o<e.length;)if(e[o++])return-1;return n}_isDegenerate(t){return!F(this.objectToBoundingSphere(t)[3])}_fitsInsideTree(t){const e=this._root.bounds,n=this._root.halfSize;return t[3]<=n&&t[0]>=e[0]-n&&t[0]<=e[0]+n&&t[1]>=e[1]-n&&t[1]<=e[1]+n&&t[2]>=e[2]-n&&t[2]<=e[2]+n}toJSON(){const{maximumDepth:t,maximumObjectsPerNode:e,_objectCount:n}=this,o=this._nodeToJSON(this._root.node);return{maximumDepth:t,maximumObjectsPerNode:e,objectCount:n,root:{bounds:this._root.bounds,halfSize:this._root.halfSize,depth:this._root.depth,node:o}}}_nodeToJSON(t){const e=t.children.map(t=>t?this._nodeToJSON(t):null),n=t.residents?.map(t=>this.objectToBoundingSphere(t)),o=t.terminals?.map(t=>this.objectToBoundingSphere(t));return{children:e,residents:n,terminals:o}}static fromJSON(t){const e=new S(t=>t,{maximumDepth:t.maximumDepth,maximumObjectsPerNode:t.maximumObjectsPerNode});return e._objectCount=t.objectCount,e._root.initFrom(t.root.node,t.root.bounds,t.root.halfSize,t.root.depth),e}}class j{constructor(){this.bounds=m(),this.halfSize=0,this.initFrom(null,null,0,0)}init(t){return this.initFrom(t.node,t.bounds,t.halfSize,t.depth)}initFrom(t,e,n,o=this.depth){return this.node=null!=t?t:j.createEmptyNode(),e&&d(e,this.bounds),this.halfSize=n,this.depth=o,this}increaseHalfSize(t){this.halfSize*=t,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds[3]=this.halfSize*k}advance(t){let e=this.node.children[t];e||(e=j.createEmptyNode(),this.node.children[t]=e),this.node=e,this.halfSize/=2,this.depth++;const n=y[t];return this.bounds[0]+=n[0]*this.halfSize,this.bounds[1]+=n[1]*this.halfSize,this.bounds[2]+=n[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(t,e,n=!1){for(;;){if(this.isTerminalFor(t))return e?.(this,-1),!0;if(this.isLeaf()){if(!n)return e?.(this,-1),!1;this.node.residents=null}const o=this._childIndex(t);e?.(this,o),this.advance(o)}}isLeaf(){return null!=this.node.residents}isTerminalFor(t){return t[3]>this.halfSize/2}_childIndex(t){const e=this.bounds;return(e[0]<t[0]?1:0)+(e[1]<t[1]?2:0)+(e[2]<t[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new e({shrink:!0}),residents:new e({shrink:!0})}}static{this._pool=new t(()=>new j)}static acquire(){return j._pool.acquire()}static release(t){j._pool.release(t)}static clearPool(){j._pool.prune()}}function x(t,e){let n=j.acquire().init(t);const o=[n];for(;0!==o.length;){if(n=o.pop(),e(n)&&!n.isLeaf())for(let t=0;t<n.node.children.length;t++){n.node.children[t]&&o.push(j.acquire().init(n).advance(t))}j.release(n)}}function O(t,e,n,o=1){let i=j.acquire().init(t);const s=[i];for(E(n,o,Z);0!==s.length;){if(i=s.pop(),e(i)&&!i.isLeaf())for(let t=7;t>=0;--t){const e=Z[t];i.node.children[e]&&s.push(j.acquire().init(i).advance(e))}j.release(i)}}function z(t,e,n){V.clear();const o=n.advanceTo(e,(t,e)=>{V.push(t.node),V.push(e)})?n.node.terminals:n.node.residents;if(o.removeUnordered(t),0===o.length)for(let i=V.length-2;i>=0;i-=2){if(!M(V.data[i],V.data[i+1]))break}}function M(t,n){return n>=0&&(t.children[n]=null),!!D(t)&&(null===t.residents&&(t.residents=new e({shrink:!0})),!0)}function N(t,e){return v(b(e.bounds),2*-e.halfSize,J),v(b(e.bounds),2*e.halfSize,W),g(t.origin,t.direction,J,W)}function T(t,e,n){return v(b(e.bounds),2*-e.halfSize,J),v(b(e.bounds),2*e.halfSize,W),n.applyToMinMax(J,W),g(t.origin,t.direction,J,W)}function D(t){if(0!==t.terminals.length)return!1;if(null!==t.residents)return 0===t.residents.length;for(let e=0;e<t.children.length;e++)if(t.children[e])return!1;return!0}function A(t,e){t[0]=Math.min(t[0],e[0]-e[3]),t[1]=Math.min(t[1],e[1]-e[3]),t[2]=Math.min(t[2],e[2]-e[3])}function B(t,e){t[0]=Math.max(t[0],e[0]+e[3]),t[1]=Math.max(t[1],e[1]+e[3]),t[2]=Math.max(t[2],e[2]+e[3])}function v(t,e,n){n[0]=t[0]+e,n[1]=t[1]+e,n[2]=t[2]+e}function w(t,e,o){J[0]=1/0,J[1]=1/0,J[2]=1/0,W[0]=-1/0,W[1]=-1/0,W[2]=-1/0;for(const n of t){const t=e(n);F(t[3])&&(A(J,t),B(W,t))}p(o,n($,J,W,.5)),o[3]=Math.max(W[0]-J[0],W[1]-J[1],W[2]-J[2])/2}function E(t,e,n){if(!Y.length)for(let o=0;o<8;++o)Y.push({index:0,distance:0});for(let o=0;o<8;++o){const n=y[o];Y.data[o].index=o,Y.data[o].distance=R(t,e,n)}Y.sort((t,e)=>t.distance-e.distance);for(let o=0;o<8;++o)n[o]=Y.data[o].index}function P(t,e){let n,o=1/0;for(let i=0;i<8;++i){const s=R(t,e,q[i]);s<o&&(o=s,n=q[i])}return n}function R(t,e,n){return e*(t[0]*n[0]+t[1]*n[1]+t[2]*n[2])}function F(t){return!isNaN(t)&&t!==-1/0&&t!==1/0&&t>0}const y=[h(-1,-1,-1),h(1,-1,-1),h(-1,1,-1),h(1,1,-1),h(-1,-1,1),h(1,-1,1),h(-1,1,1),h(1,1,1)],q=[h(-1,-1,-1),h(-1,-1,1),h(-1,1,-1),h(-1,1,1),h(1,-1,-1),h(1,-1,1),h(1,1,-1),h(1,1,1)],k=Math.sqrt(3),C=[null];function I(t){return C[0]=t,C}const L=m(),H=r(),J=r(),W=r(),V=new e,G=m(),U=m(),K=m(),Q=m(),X=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],Y=new e,Z=[0,0,0,0,0,0,0,0],$=r();export{S as Octree};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{generateUID as t}from"../../../../core/uid.js";import{copy as r,multiply as i}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as e}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{N as s,c as o,
|
|
5
|
+
import{generateUID as t}from"../../../../core/uid.js";import{copy as r,multiply as i}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as e}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{N as s,c as o,q as n}from"../../../../chunks/sphere.js";import{maxScale as a}from"../../support/mathUtils.js";class h{constructor(r,i={}){this.geometry=r,this.screenToWorldRatio=1,this._transformation=e(),this._shaderTransformation=null,this._boundingSphere=null,this.id=t(),this.layerViewUid=i.layerViewUid,this.graphicUid=i.graphicUid,this.castShadow=i.castShadow??!1,i.objectShaderTransformation&&this.objectShaderTransformationChanged(i.objectShaderTransformation)}get transformation(){return this._transformation}set transformation(t){r(this._transformation,t),this._boundingSphere=null}get boundingInfo(){return this.geometry.boundingInfo}objectShaderTransformationChanged(t){null==t?this._shaderTransformation=null:(this._shaderTransformation??=e(),i(this._shaderTransformation,t,this.geometry.transformation)),this._boundingSphere=null}get boundingSphere(){return this.boundingInfo?(null==this._boundingSphere&&(this._boundingSphere??=o(),n(this._boundingSphere,this.boundingInfo.center,this.shaderTransformation),this._boundingSphere[3]=this.boundingInfo.radius*a(this.shaderTransformation)),this._boundingSphere):s}get material(){return this.geometry.material}get type(){return this.geometry.type}get shaderTransformation(){return this._shaderTransformation??this.transformation}get attributes(){return this.geometry.attributes}foreachHighlightOptions(t){this.geometry.foreachHighlightOptions(t)}get hasHighlights(){return this.geometry.hasHighlights}get occludees(){return this.geometry.occludees}get visible(){return this.geometry.visible}set visible(t){this.geometry.visible=t}}class g extends h{}export{h as RenderGeometry,g as ValidatedRenderGeometry};
|