@arcgis/core 5.2.0-next.36 → 5.2.0-next.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/02b043a3c5fa8bcb4c5b.js +1 -0
- package/assets/esri/core/workers/chunks/{acbc14395c31f6da509e.js → 03437a8ef35c200dbf17.js} +1 -1
- package/assets/esri/core/workers/chunks/034dd8ee5152a12412cd.js +1 -0
- package/assets/esri/core/workers/chunks/0a6e03263ab0906d8bcf.js +1 -0
- package/assets/esri/core/workers/chunks/0edd250159ec259601b3.js +1 -0
- package/assets/esri/core/workers/chunks/{401ee7fa500adad77db1.js → 1079914101d69a40b3eb.js} +1 -1
- package/assets/esri/core/workers/chunks/{c72121076e438ed28d60.js → 1599dc5309a4e60017ce.js} +2 -2
- package/assets/esri/core/workers/chunks/181e98399732f425305d.js +1 -0
- package/assets/esri/core/workers/chunks/{47d88e1b003c4519b7b6.js → 18f4b2099299942aaf97.js} +1 -1
- package/assets/esri/core/workers/chunks/196e7515a43bd0026f49.js +1 -0
- package/assets/esri/core/workers/chunks/1aa7496a7dc95aae11ac.js +1 -0
- package/assets/esri/core/workers/chunks/1d524690c4b66289bd20.js +1 -0
- package/assets/esri/core/workers/chunks/{f72f38e7609756a7f8ea.js → 20fa2c3d4360afa5e136.js} +1 -1
- package/assets/esri/core/workers/chunks/{03350a56f840cffe5459.js → 2757c4bf0280e27f3484.js} +1 -1
- package/assets/esri/core/workers/chunks/{93ceb74ac88ef460fe5f.js → 278409028bc5af45b507.js} +1 -1
- package/assets/esri/core/workers/chunks/{2c61bb25578f73ba49bc.js → 29a1d0659bbc5a039864.js} +1 -1
- package/assets/esri/core/workers/chunks/29df3f829006719b2680.js +1 -0
- package/assets/esri/core/workers/chunks/30cf84a47ebefd180bb7.js +1 -0
- package/assets/esri/core/workers/chunks/{71a593fa116770e58832.js → 37a95f097533bad1b338.js} +1 -1
- package/assets/esri/core/workers/chunks/{7335a762412bc8c15a2f.js → 37e823202424c11076cb.js} +1 -1
- package/assets/esri/core/workers/chunks/{ee446250a40e5d89bb5a.js → 3a76fffa2016c16d7989.js} +3 -3
- package/assets/esri/core/workers/chunks/{58ce4bcfb15f378b1b9f.js → 3d6d2b42ba2ad7086d5d.js} +1 -1
- package/assets/esri/core/workers/chunks/3ec91474658eae87b832.js +1 -0
- package/assets/esri/core/workers/chunks/448e0596005cba9a4225.js +1 -0
- package/assets/esri/core/workers/chunks/{f148666308071bdb185a.js → 45530a49fa1f09d1682e.js} +1 -1
- package/assets/esri/core/workers/chunks/{155940ef3d1888272d73.js → 459e89d1b94a3b204d20.js} +2 -2
- package/assets/esri/core/workers/chunks/{f71f5778e03f68f27482.js → 45b2e58051f42ebd236e.js} +1 -1
- package/assets/esri/core/workers/chunks/4611cf051c3c396fdf96.js +1 -0
- package/assets/esri/core/workers/chunks/{efaa1d05705f6b450e8f.js → 46e3d33e44e5398221e2.js} +1 -1
- package/assets/esri/core/workers/chunks/{866950e9ab96aebc6b32.js → 4a8201e09bc3ad5cc00b.js} +1 -1
- package/assets/esri/core/workers/chunks/{110135b0562a3b5708b9.js → 4abe820bbe4f7ffccc09.js} +1 -1
- package/assets/esri/core/workers/chunks/4ad86d6b1be07c97b6f6.js +1 -0
- package/assets/esri/core/workers/chunks/{20ffeb09bb30400de110.js → 4e28f49d0be20ea50fd7.js} +1 -1
- package/assets/esri/core/workers/chunks/4f25aac84d9eb10cac83.js +1 -0
- package/assets/esri/core/workers/chunks/{0197e459fdb04dfb28ef.js → 51838d55d8ec4ce70398.js} +1 -1
- package/assets/esri/core/workers/chunks/542d8a6c415098b9857c.js +1 -0
- package/assets/esri/core/workers/chunks/57abf838fcff0f0e2c5e.js +1 -0
- package/assets/esri/core/workers/chunks/57dd017fed2943d24e3d.js +1 -0
- package/assets/esri/core/workers/chunks/59801b2ccaaf4b394e02.js +1 -0
- package/assets/esri/core/workers/chunks/5a62c9f64db4fcae5e52.js +1 -0
- package/assets/esri/core/workers/chunks/{e84c13ac59e5381b77e2.js → 5aebecb5c2b3e7887127.js} +1 -1
- package/assets/esri/core/workers/chunks/{c19fe4f31e4ef84bbcf6.js → 5e68b74fd548c7cdba36.js} +1 -1
- package/assets/esri/core/workers/chunks/{9dcb2cbf89dcb7558432.js → 5f360492560ae07083a6.js} +1 -1
- package/assets/esri/core/workers/chunks/6022f43ebd58e21c737a.js +1 -0
- package/assets/esri/core/workers/chunks/62b137a795e487fa06a1.js +1 -0
- package/assets/esri/core/workers/chunks/{007485862ce95928717a.js → 632de34ebd2f44b4423d.js} +1 -1
- package/assets/esri/core/workers/chunks/{1ad5fcae6d6a9801cf58.js → 63ca17f569407c89bde1.js} +2 -2
- package/assets/esri/core/workers/chunks/6896a6dd36fa91a27151.js +1 -0
- package/assets/esri/core/workers/chunks/{e6263e1983e703befe48.js → 68bc674affe2f7269c40.js} +1 -1
- package/assets/esri/core/workers/chunks/{759686b896f51f0fe6a9.js → 6a51499c6623ddce5f00.js} +1 -1
- package/assets/esri/core/workers/chunks/6cdf1db30793133294dd.js +1 -0
- package/assets/esri/core/workers/chunks/{b0e4af49fc968b0a910f.js → 6ff6783f89ecd3a5e752.js} +1 -1
- package/assets/esri/core/workers/chunks/{857532de88f21e8c3466.js → 70763c7b68d8abe8d5fe.js} +1 -1
- package/assets/esri/core/workers/chunks/{e67a9f9298d63026e7f6.js → 716b1f073e3cd807abd3.js} +1 -1
- package/assets/esri/core/workers/chunks/71a3f05cb86ae2920f8d.js +1 -0
- package/assets/esri/core/workers/chunks/723bb56de2324b41df4e.js +1 -0
- package/assets/esri/core/workers/chunks/73f61107cb7e6d30bf03.js +1 -0
- package/assets/esri/core/workers/chunks/752c34cee981862add89.js +1 -0
- package/assets/esri/core/workers/chunks/760dfd585b6c2c1937ce.js +1 -0
- package/assets/esri/core/workers/chunks/{595401947e74a0a67144.js → 76449e50222111ba0eb1.js} +1 -1
- package/assets/esri/core/workers/chunks/76bed5497f42f23a27ed.js +1 -0
- package/assets/esri/core/workers/chunks/832ecc1f7d45774c4726.js +1 -0
- package/assets/esri/core/workers/chunks/860a0f9d20f53db1caf4.js +1 -0
- package/assets/esri/core/workers/chunks/867e39bb444947c93586.js +1 -0
- package/assets/esri/core/workers/chunks/8a8b7ac6693bdfbebf07.js +1 -0
- package/assets/esri/core/workers/chunks/8fce15ce4cfdccf407f3.js +1 -0
- package/assets/esri/core/workers/chunks/{5260f623438bd84f2caa.js → 937cf55b3b9d324eea73.js} +1 -1
- package/assets/esri/core/workers/chunks/93df864c2e829f0fd5ce.js +1 -0
- package/assets/esri/core/workers/chunks/{7b5e628ea3d4a51f1c4e.js → 966d002acec8c72be56a.js} +1 -1
- package/assets/esri/core/workers/chunks/{367a3031abbeff0c0090.js → 9aef0b87f471626abd66.js} +1 -1
- package/assets/esri/core/workers/chunks/{f1d211904d5a1de93cb3.js → 9ba9a3705623679bc305.js} +1 -1
- package/assets/esri/core/workers/chunks/{aec82b94787821153d2b.js → a188d0767825d322f96d.js} +1 -1
- package/assets/esri/core/workers/chunks/a638de0102c3990403d1.js +1 -0
- package/assets/esri/core/workers/chunks/b09935d0105d50a0971b.js +1 -0
- package/assets/esri/core/workers/chunks/b2c0262c4a76b8a86200.js +1 -0
- package/assets/esri/core/workers/chunks/{599bd80379423c99799d.js → b4323e69e624c6b51754.js} +1 -1
- package/assets/esri/core/workers/chunks/b5141f240ca79729686d.js +1 -0
- package/assets/esri/core/workers/chunks/b549a4d4b1a34bee8beb.js +1 -0
- package/assets/esri/core/workers/chunks/bb89b6fd93513c61b2d3.js +1 -0
- package/assets/esri/core/workers/chunks/{3bd32387af52fa48d747.js → bc553ecc8cbcc1b02717.js} +1 -1
- package/assets/esri/core/workers/chunks/bcba02f61cf0abcb5600.js +1 -0
- package/assets/esri/core/workers/chunks/{f63e7b01c70352538b1e.js → bd0f488e228a75fbefb3.js} +2 -2
- package/assets/esri/core/workers/chunks/c48dfda8dcb9551606fb.js +1 -0
- package/assets/esri/core/workers/chunks/c4e44fde4bc4ff89e2bc.js +1 -0
- package/assets/esri/core/workers/chunks/c93a68618674b38b932e.js +1 -0
- package/assets/esri/core/workers/chunks/d2745886ba5a86fd5c4c.js +680 -0
- package/assets/esri/core/workers/chunks/d4c341b15d9244276fb9.js +1 -0
- package/assets/esri/core/workers/chunks/d5faab9799891e5da5a8.js +1 -0
- package/assets/esri/core/workers/chunks/d811924acc9c0be95bba.js +1 -0
- package/assets/esri/core/workers/chunks/{4b96aa2dc5b88846bb53.js → e0a4d0288abd334b0673.js} +1 -1
- package/assets/esri/core/workers/chunks/{b22a1c98271c2e4d8808.js → e1ddb8e4977b317fd40c.js} +1 -1
- package/assets/esri/core/workers/chunks/e961c6140c39921816a8.js +1 -0
- package/assets/esri/core/workers/chunks/eb7daa0f6610983ff8db.js +1 -0
- package/assets/esri/core/workers/chunks/eb842cf470ce28a73187.js +1 -0
- package/assets/esri/core/workers/chunks/ed1d4ebf487c7dcd5c33.js +1 -0
- package/assets/esri/core/workers/chunks/f565e203d8fed2672112.js +1 -0
- package/assets/esri/core/workers/chunks/f80cadcc2a588da63b38.js +1 -0
- package/assets/esri/core/workers/chunks/f8bbb52b865a0a242140.js +1 -0
- package/assets/esri/core/workers/chunks/f9592bcdd9988199a7ea.js +1 -0
- package/assets/esri/core/workers/chunks/ff7e1eb2366d4301d288.js +1 -0
- package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
- package/chunks/NavigationDepth.glsl.js +18 -0
- package/chunks/Path.glsl.js +20 -16
- package/config.js +1 -1
- package/core/accessorSupport/diffUtils.js +1 -1
- package/geometry/FlatGeometry.js +1 -1
- package/geometry/support/Indices.js +1 -1
- package/geometry/support/ShortArray.js +1 -1
- package/geometry/support/UintArray.js +1 -1
- package/geometry/support/meshUtils/geographicUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/mixins/PublishableLayer.js +1 -1
- package/layers/mixins/RefreshableLayer.js +1 -1
- package/layers/raster/functions/pixelUtils.js +1 -1
- package/layers/support/kustoUtils.js +1 -1
- package/package.json +1 -1
- package/popup/Feature.js +1 -1
- package/portal/support/resourceUtils.js +1 -1
- package/renderers/support/rasterTypeUtils.js +1 -1
- package/rest/query/operations/pbfFeatureSetUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/utils.js +1 -1
- package/tables/support/tablesUtils.js +1 -1
- package/views/2d/engine/flow/utils.js +1 -1
- package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/AlignedVertexSpec.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/features/layerAdapters/labelingUtils.js +1 -1
- package/views/2d/layers/support/annodime/dimensionUtils.js +1 -1
- package/views/2d/layers/support/annodime/utils.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/Lyr3DWasm.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
- package/views/3d/layers/i3s/PointCloudRendererUtil.js +1 -1
- package/views/3d/layers/i3s/PointCloudWorkerUtil.js +1 -1
- package/views/3d/layers/support/lyr3dTypeConversions.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatAtlasPages.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
- package/views/3d/support/orientedBoundingBox.js +1 -1
- package/views/3d/terrain/terrainUtils.js +1 -1
- package/views/3d/webgl-engine/core/material/MaterialBase.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +32 -16
- package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadowFromDepth.glsl.js +2 -2
- package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
- package/views/3d/webgl-engine/lib/Geometry.js +1 -1
- package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
- package/views/3d/webgl-engine/lib/Intersector.js +1 -1
- package/views/3d/webgl-engine/lib/NavigationDepthCache.js +2 -0
- package/views/3d/webgl-engine/lib/PathEvaluator.js +1 -1
- package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
- package/views/3d/webgl-engine/lib/screenPolygonOverlapUtils.js +1 -1
- package/views/3d/webgl-engine/lib/screenPolygonTriangleIntersections.js +1 -1
- package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
- package/views/3d/webgl-engine/materials/PathLayouts.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/NavigationDepth.glsl.js +2 -0
- package/views/3d/webgl-engine/shaders/NavigationDepthTechnique.js +2 -0
- package/views/3d/webgl-engine/shaders/oitResolution.glsl.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/support/euclideanLengthMeasurementUtils.js +1 -1
- package/views/support/selectionUtils.js +1 -1
- package/views/webgl/BufferObject.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/VertexAttributeLayouts.js +1 -1
- package/webscene/spec-certification/utils.js +1 -1
- package/widgets/Editor/legacy/workflowUtils.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/errors.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
- package/widgets/OrientedImageryViewer/support/superimposeUtils.js +1 -1
- package/widgets/OrientedImageryViewer/utils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/PanoramicViewer/constants.js +1 -1
- package/widgets/PanoramicViewer/support/importUtils.js +1 -1
- package/widgets/PanoramicViewer/utils.js +1 -1
- package/widgets/support/dateUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0a2f08298a3c932614f2.js +0 -1
- package/assets/esri/core/workers/chunks/0df978697328b6453c94.js +0 -1
- package/assets/esri/core/workers/chunks/168c15cf462f9abcbdd2.js +0 -1
- package/assets/esri/core/workers/chunks/22c447fcc9a28afeb6e3.js +0 -1
- package/assets/esri/core/workers/chunks/24aa98cb2021ddd789ce.js +0 -1
- package/assets/esri/core/workers/chunks/2509da565e5a2b43ac7f.js +0 -1
- package/assets/esri/core/workers/chunks/256cc116e3be4feee593.js +0 -1
- package/assets/esri/core/workers/chunks/2bb3494659609594c4ca.js +0 -1
- package/assets/esri/core/workers/chunks/2c017eae434254610c8e.js +0 -1
- package/assets/esri/core/workers/chunks/303e723e829ea7088d43.js +0 -1
- package/assets/esri/core/workers/chunks/368db1420b8520beae05.js +0 -1
- package/assets/esri/core/workers/chunks/38a6a7c56c592f336a12.js +0 -1
- package/assets/esri/core/workers/chunks/39ff5b2a05a90e1cb214.js +0 -1
- package/assets/esri/core/workers/chunks/3b914ca36e7e2b00cfe6.js +0 -1
- package/assets/esri/core/workers/chunks/3e8fa2a7a36881234479.js +0 -1
- package/assets/esri/core/workers/chunks/451331f69d21c61ec93b.js +0 -1
- package/assets/esri/core/workers/chunks/4656a4bf430d7eed1465.js +0 -1
- package/assets/esri/core/workers/chunks/472ec242cd3070e6acfe.js +0 -1
- package/assets/esri/core/workers/chunks/51d7145f748b4865de7f.js +0 -1
- package/assets/esri/core/workers/chunks/54f54623532f633dc0e2.js +0 -1
- package/assets/esri/core/workers/chunks/570a4725b2a4a19c5148.js +0 -1
- package/assets/esri/core/workers/chunks/586ca90e46f5cbdfeece.js +0 -1
- package/assets/esri/core/workers/chunks/59c22bab85f9cdbb9948.js +0 -1
- package/assets/esri/core/workers/chunks/5dfeefee96659832398a.js +0 -1
- package/assets/esri/core/workers/chunks/6c746ac4bd2e57b8cb41.js +0 -1
- package/assets/esri/core/workers/chunks/6d72a1bdc2664df62c4c.js +0 -1
- package/assets/esri/core/workers/chunks/7085b4c655a19694da04.js +0 -1
- package/assets/esri/core/workers/chunks/777b16b76db406c99c69.js +0 -1
- package/assets/esri/core/workers/chunks/818a481ce579f519de1c.js +0 -1
- package/assets/esri/core/workers/chunks/85a280ee915010a8da3c.js +0 -1
- package/assets/esri/core/workers/chunks/86731e276b31453bc235.js +0 -1
- package/assets/esri/core/workers/chunks/87b86375f8557418dbe6.js +0 -1
- package/assets/esri/core/workers/chunks/8817d25c7f4cf0e6c6bd.js +0 -1
- package/assets/esri/core/workers/chunks/8a9b2efa0603e9fa4e8b.js +0 -1
- package/assets/esri/core/workers/chunks/8aa5bbf9a9b09815725a.js +0 -1
- package/assets/esri/core/workers/chunks/8b68a69ab8fb1679e7b2.js +0 -1
- package/assets/esri/core/workers/chunks/98685bd149dee1d6dc99.js +0 -1
- package/assets/esri/core/workers/chunks/9de673a04c70bd47047e.js +0 -1
- package/assets/esri/core/workers/chunks/9de9cec5c644bc452294.js +0 -1
- package/assets/esri/core/workers/chunks/9fb0431b0628dcb53004.js +0 -680
- package/assets/esri/core/workers/chunks/a2a688dd2ed4565e01ff.js +0 -1
- package/assets/esri/core/workers/chunks/a3ae7c41832c7a8b0570.js +0 -1
- package/assets/esri/core/workers/chunks/a3e86830460e52706a4d.js +0 -1
- package/assets/esri/core/workers/chunks/a58b8903ae17acf117d6.js +0 -1
- package/assets/esri/core/workers/chunks/a99ce2f12c8204ee542a.js +0 -1
- package/assets/esri/core/workers/chunks/ab3d1c00ef514b61ce0b.js +0 -1
- package/assets/esri/core/workers/chunks/ae5363956b4467208e04.js +0 -1
- package/assets/esri/core/workers/chunks/b24b7411a73d1da87c30.js +0 -1
- package/assets/esri/core/workers/chunks/b97b83159fec34f383af.js +0 -1
- package/assets/esri/core/workers/chunks/bec660ee2e7828f965e2.js +0 -1
- package/assets/esri/core/workers/chunks/c7316fd2bdb7ac9eada3.js +0 -1
- package/assets/esri/core/workers/chunks/ca7d4d76a6bf5a3046cd.js +0 -1
- package/assets/esri/core/workers/chunks/cffef41791f0cfa6c26c.js +0 -1
- package/assets/esri/core/workers/chunks/d26b1a9f47b4b2744c89.js +0 -1
- package/assets/esri/core/workers/chunks/d4a96f0402172787823a.js +0 -1
- package/assets/esri/core/workers/chunks/d9fcc63df008f687848a.js +0 -1
- package/assets/esri/core/workers/chunks/e3a4695c31d3f9d55213.js +0 -1
- package/assets/esri/core/workers/chunks/e65d291bab13f7f5323b.js +0 -1
- package/assets/esri/core/workers/chunks/eeee7421f64a52074ff4.js +0 -1
- package/assets/esri/core/workers/chunks/eef7e0bee19c4258ba55.js +0 -1
- package/assets/esri/core/workers/chunks/efaf998d18479a0380ae.js +0 -1
- package/assets/esri/core/workers/chunks/f0573db9a3d3e1499a7e.js +0 -1
- package/assets/esri/core/workers/chunks/f07722efd7fa2b75d4dd.js +0 -1
- package/assets/esri/core/workers/chunks/f137e544076482e348ad.js +0 -1
- package/assets/esri/core/workers/chunks/fd53ef66176ae164e221.js +0 -1
- package/assets/esri/core/workers/chunks/fd956a58787020d610af.js +0 -1
- package/rest/sharedTemplates/addSharedTemplates.js +0 -2
- package/support/featureFlags.js +0 -2
- package/views/2d/engine/webgl/ClippingInfo.js +0 -2
- package/views/2d/engine/webgl/Mesh2D.js +0 -2
- package/views/2d/engine/webgl/shaderGraph/GLSLShaderModule.js +0 -2
- package/views/2d/layers/features/ProcessorTileMessageQueue.js +0 -2
- package/views/3d/support/AsyncWorkerQueue.js +0 -2
- package/views/3d/webgl-engine/lib/PathGeometryData.js +0 -2
- package/widgets/BatchAttributeForm/templates/support/contingentValuesUtils.js +0 -2
- package/widgets/OrientedImageryViewer/components/NavigationAction.js +0 -2
- package/widgets/OrientedImageryViewer/components/NavigationActions.js +0 -2
- package/widgets/OrientedImageryViewer/support/NonPanoramicMediaCollection.js +0 -2
- package/widgets/PanoramicViewer/support/PanoramicMediaCollection.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{fromValues as e}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{TextureBackedBufferModule as t}from"../TextureBackedBuffer.glsl.js";import{PathEvaluate as r}from"./PathEvaluate.glsl.js";import{PiUtils as o}from"../shading/PiUtils.glsl.js";import{Float2PassUniform as i}from"../../shaderModules/Float2PassUniform.js";import{Float3PassUniform as a}from"../../shaderModules/Float3PassUniform.js";import{Float4PassUniform as l}from"../../shaderModules/Float4PassUniform.js";import{Float4sPassUniform as s}from"../../shaderModules/Float4sPassUniform.js";import{FloatPassUniform as
|
|
2
|
+
import{fromValues as e}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{TextureBackedBufferModule as t}from"../TextureBackedBuffer.glsl.js";import{PathEvaluate as r}from"./PathEvaluate.glsl.js";import{PiUtils as o}from"../shading/PiUtils.glsl.js";import{Float2PassUniform as i}from"../../shaderModules/Float2PassUniform.js";import{Float3PassUniform as a}from"../../shaderModules/Float3PassUniform.js";import{Float4PassUniform as l}from"../../shaderModules/Float4PassUniform.js";import{Float4sPassUniform as s}from"../../shaderModules/Float4sPassUniform.js";import{FloatPassUniform as c}from"../../shaderModules/FloatPassUniform.js";import{FloatsPassUniform as v}from"../../shaderModules/FloatsPassUniform.js";import{glsl as u,If as n}from"../../shaderModules/glsl.js";import{Texture2DUintDrawUniform as d}from"../../shaderModules/Texture2DUintDrawUniform.js";import{circleProfiles as f}from"../../../lib/PathProfile.js";import{getTextureLayout as p}from"../../../materials/PathLayouts.js";import{VisualVariablePassParameters as x,vvColorNumber as m}from"../../../materials/VisualVariablePassParameters.js";const g=8;function h(e,f){const{vertex:x}=e,h=new d("componentTextureBuffer",e=>e.textureBuffer),y=new t({layout:p(f),itemIndexExpression:"getFrameIndex()",bufferUniform:h}).createBuilder(e,f);x.uniforms.add(new i("size",e=>e.size));const{hasVVSize:b,hasVVColor:V,hasVVOpacity:z,hasPathSize:O,hasPathColor:C,hasPathOpacity:S}=f;b?(x.uniforms.add(new a("vvSizeMinSize",e=>e.vvSize.minSize),new a("vvSizeMaxSize",e=>e.vvSize.maxSize),new a("vvSizeOffset",e=>e.vvSize.offset),new a("vvSizeFactor",e=>e.vvSize.factor),new a("vvSizeFallback",e=>e.vvSize.fallback)),x.code.add(u`
|
|
3
3
|
vec2 getSize() {
|
|
4
4
|
float value = ${y.getTextureAttribute("sizeFeatureAttribute")};
|
|
5
5
|
if (isnan(value)) {
|
|
@@ -7,9 +7,13 @@ import{fromValues as e}from"../../../../../../core/libs/gl-matrix-2/factories/ve
|
|
|
7
7
|
}
|
|
8
8
|
return size * clamp(vvSizeOffset + value * vvSizeFactor, vvSizeMinSize, vvSizeMaxSize).xz;
|
|
9
9
|
}
|
|
10
|
-
`)):
|
|
10
|
+
`)):O?x.code.add(u`
|
|
11
|
+
vec2 getSize(){
|
|
12
|
+
return ${y.getTextureAttribute("size")};
|
|
13
|
+
}
|
|
14
|
+
`):x.code.add(u`vec2 getSize(){
|
|
11
15
|
return size;
|
|
12
|
-
}`),z?(
|
|
16
|
+
}`),z?(x.constants.add("vvOpacityNumber","int",g),x.uniforms.add(new v("vvOpacityValues",g,e=>e.vvOpacity.values),new v("vvOpacityOpacities",g,e=>e.vvOpacity.opacityValues),new c("vvOpacityFallback",e=>e.vvOpacity.fallback,{supportsNaN:!0})),x.code.add(u`
|
|
13
17
|
vec4 applyOpacity(vec4 color) {
|
|
14
18
|
// if we encounter NaN in the color it means the color is in the fallback case where the symbol color
|
|
15
19
|
// is not defined and there is no valid color visual variable override. In this case just return a fully
|
|
@@ -22,7 +26,7 @@ return size;
|
|
|
22
26
|
|
|
23
27
|
if (isnan(value)) {
|
|
24
28
|
// If there is a color vv then it will already have taken care of applying the fallback
|
|
25
|
-
return ${
|
|
29
|
+
return ${n(V,"color","vec4(color.rgb, vvOpacityFallback)")};
|
|
26
30
|
}
|
|
27
31
|
|
|
28
32
|
if (value <= vvOpacityValues[0]) {
|
|
@@ -36,11 +40,15 @@ return size;
|
|
|
36
40
|
}
|
|
37
41
|
}
|
|
38
42
|
|
|
39
|
-
return vec4(
|
|
43
|
+
return vec4(color.rgb, vvOpacityOpacities[vvOpacityNumber - 1]);
|
|
44
|
+
}
|
|
45
|
+
`)):S?x.code.add(u`
|
|
46
|
+
vec4 applyOpacity(vec4 color){
|
|
47
|
+
return vec4(color.rgb, ${y.getTextureAttribute("opacity")});
|
|
40
48
|
}
|
|
41
|
-
`)
|
|
49
|
+
`):x.code.add(u`vec4 applyOpacity(vec4 color){
|
|
42
50
|
return color;
|
|
43
|
-
}`),
|
|
51
|
+
}`),V?(x.constants.add("vvColorNumber","int",m),x.uniforms.add(new v("vvColorValues",m,e=>e.vvColor.values),new s("vvColorColors",m,e=>e.vvColor.colors),new l("vvColorFallback",e=>e.vvColor.fallback)),x.code.add(u`
|
|
44
52
|
vec4 getColor() {
|
|
45
53
|
float value = ${y.getTextureAttribute("colorFeatureAttribute")};
|
|
46
54
|
if (isnan(value)) {
|
|
@@ -60,9 +68,13 @@ return color;
|
|
|
60
68
|
|
|
61
69
|
return applyOpacity(vvColorColors[vvColorNumber - 1]);
|
|
62
70
|
}
|
|
63
|
-
`)):
|
|
71
|
+
`)):C?x.code.add(u`
|
|
72
|
+
vec4 getColor(){
|
|
73
|
+
return applyOpacity(${y.getTextureAttribute("color")});
|
|
74
|
+
}
|
|
75
|
+
`):x.code.add(u`vec4 getColor(){
|
|
64
76
|
return applyOpacity(vec4(1, 1, 1, 1));
|
|
65
|
-
}`),
|
|
77
|
+
}`),x.include(o),x.code.add(u`
|
|
66
78
|
vec3 decompressAxis(vec2 axis) {
|
|
67
79
|
float z = 1.0 - abs(axis.x) - abs(axis.y);
|
|
68
80
|
return normalize(vec3(axis + sign(axis) * min(z, 0.0), z));
|
|
@@ -83,25 +95,29 @@ return applyOpacity(vec4(1, 1, 1, 1));
|
|
|
83
95
|
vec3 getFrameRight() {
|
|
84
96
|
return decompressAxis(${y.getTextureAttribute("profileRight")});
|
|
85
97
|
}
|
|
86
|
-
`),
|
|
98
|
+
`),11===f.output&&x.code.add(u`
|
|
99
|
+
vec4 getOlidColor() {
|
|
100
|
+
return ${y.getTextureAttribute("olidColor")};
|
|
101
|
+
}
|
|
102
|
+
`),x.code.add(u`
|
|
87
103
|
vec3 getFrameRotationUp() {
|
|
88
|
-
return ${1===
|
|
104
|
+
return ${1===f.upVectorAlignment?u`decompressAxis(${y.getTextureAttribute("pathRotationUp")})`:u`getFrameUp()`};
|
|
89
105
|
}
|
|
90
|
-
`),e.include(r,
|
|
106
|
+
`),e.include(r,f),x.code.add(u`
|
|
91
107
|
vec3 calculateVPos(ExtrudedVertex extrudedVertex) {
|
|
92
108
|
vec2 size = getSize();
|
|
93
109
|
vec3 origin = ${y.getTextureAttribute("position")};
|
|
94
110
|
vec3 right = extrudedVertex.frame.right;
|
|
95
111
|
vec3 up = extrudedVertex.frame.up;
|
|
96
112
|
vec2 profileVertex = extrudedVertex.profileVertex * size;
|
|
97
|
-
`),
|
|
113
|
+
`),x.code.add(u`if(extrudedVertex.isCap) {
|
|
98
114
|
float positionOffsetAlongProfilePlaneNormal = extrudedVertex.capPositionOffset * size[0];
|
|
99
115
|
vec3 forward = cross(up, right);
|
|
100
116
|
vec3 offset = right * profileVertex.x + up * profileVertex.y + forward * positionOffsetAlongProfilePlaneNormal;
|
|
101
117
|
return origin + offset;
|
|
102
118
|
}
|
|
103
119
|
vec2 rotationRight = extrudedVertex.rotationRight;
|
|
104
|
-
float maxDistance = extrudedVertex.maxDistance;`),
|
|
120
|
+
float maxDistance = extrudedVertex.maxDistance;`),x.code.add(u`rotationRight *= size;
|
|
105
121
|
rotationRight = length(rotationRight) > 0.0 ? normalize(rotationRight) : vec2(0, 0);
|
|
106
122
|
float rx = dot(profileVertex, rotationRight);
|
|
107
123
|
if (abs(rx) > maxDistance) {
|
|
@@ -111,7 +127,7 @@ profileVertex = rotationRight * maxDistance * sign(rx) + rotationUp * ry;
|
|
|
111
127
|
}
|
|
112
128
|
vec3 offset = right * profileVertex.x + up * profileVertex.y;
|
|
113
129
|
return origin + offset;
|
|
114
|
-
}`),
|
|
130
|
+
}`),x.code.add(u`vec3 localNormal(ExtrudedVertex extrudedVertex) {
|
|
115
131
|
vec3 right = extrudedVertex.frame.right;
|
|
116
132
|
vec3 up = extrudedVertex.frame.up;
|
|
117
133
|
vec2 profileNormal = extrudedVertex.profileNormal;
|
|
@@ -121,4 +137,4 @@ vec3 forward = cross(up, right);
|
|
|
121
137
|
normal += forward * extrudedVertex.capNormalOffset;
|
|
122
138
|
}
|
|
123
139
|
return normal;
|
|
124
|
-
}`)}class y extends
|
|
140
|
+
}`)}class y extends x{constructor(){super(...arguments),this.numJoinSubdivisions=1,this.size=e(1,1),this.cutoffAngle=0,this.profile=f.center,this.hasPathSize=!1,this.hasPathColor=!1,this.hasPathOpacity=!1}}export{h as PathVertexPosition,y as PathVertexPositionPassParameters};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{clamp as e}from"../../../../../../core/mathUtils.js";import{isColor as s}from"../ShaderOutput.js";import{VertexTextureCoordinates as i}from"../attributes/VertexTextureCoordinates.glsl.js";import{Gamma as o}from"../shading/Gamma.glsl.js";import{Float3DrawUniform as r}from"../../shaderModules/Float3DrawUniform.js";import{Float3PassUniform as m}from"../../shaderModules/Float3PassUniform.js";import{FloatDrawUniform as t}from"../../shaderModules/FloatDrawUniform.js";import{FloatPassUniform as n}from"../../shaderModules/FloatPassUniform.js";import{If as a,glsl as v}from"../../shaderModules/glsl.js";import{Texture2DDrawUniform as l}from"../../shaderModules/Texture2DDrawUniform.js";import{Texture2DPassUniform as u}from"../../shaderModules/Texture2DPassUniform.js";import{
|
|
2
|
+
import{clamp as e}from"../../../../../../core/mathUtils.js";import{isColor as s}from"../ShaderOutput.js";import{VertexTextureCoordinates as i}from"../attributes/VertexTextureCoordinates.glsl.js";import{Gamma as o}from"../shading/Gamma.glsl.js";import{Float3DrawUniform as r}from"../../shaderModules/Float3DrawUniform.js";import{Float3PassUniform as m}from"../../shaderModules/Float3PassUniform.js";import{FloatDrawUniform as t}from"../../shaderModules/FloatDrawUniform.js";import{FloatPassUniform as n}from"../../shaderModules/FloatPassUniform.js";import{If as a,glsl as v}from"../../shaderModules/glsl.js";import{Texture2DDrawUniform as l}from"../../shaderModules/Texture2DDrawUniform.js";import{Texture2DPassUniform as u}from"../../shaderModules/Texture2DPassUniform.js";import{floatBlendReductionFactor as f}from"../../../shaders/oitResolution.glsl.js";const c=1,d=1;function g(c,g){if(!s(g.output))return;c.fragment.include(o);const{emissionSource:x,hasEmissiveTextureTransform:p,bindType:h}=g,j=3===x||4===x||5===x;j&&(c.include(i,g),c.fragment.uniforms.add(1===h?new u("texEmission",e=>e.textureEmissive):new l("texEmission",e=>e.textureEmissive)));const T=2===x||j;T&&c.fragment.uniforms.add(1===h?new m("emissiveBaseColor",e=>e.emissiveBaseColor):new r("emissiveBaseColor",e=>e.emissiveBaseColor));const C=0!==x;if(C&&!(7===x||6===x||4===x||5===x)){const s=s=>e(s??0,0,f);c.fragment.uniforms.add(1===h?new n("emissiveStrength",e=>s(e.emissiveStrength)):new t("emissiveStrength",e=>s(e.emissiveStrength)))}const b=7===x,F=5===x,S=1===x||6===x||b;c.fragment.code.add(v`
|
|
3
3
|
vec4 getEmissions(vec3 symbolColor) {
|
|
4
4
|
vec4 emissions = ${T?F?"emissiveSource == 0 ? vec4(emissiveBaseColor, 1.0): vec4(linearizeGamma(symbolColor), 1.0)":"vec4(emissiveBaseColor, 1.0)":S?b?"emissiveSource == 0 ? vec4(0.0): vec4(linearizeGamma(symbolColor), 1.0)":"vec4(linearizeGamma(symbolColor), 1.0)":"vec4(0.0)"};
|
|
5
5
|
${a(j,`${a(F,`if(emissiveSource == 0) {\n vec4 emissiveFromTex = textureLookup(texEmission, ${p?"emissiveUV":"vuv0"});\n emissions *= vec4(linearizeGamma(emissiveFromTex.rgb), emissiveFromTex.a);\n }`,`vec4 emissiveFromTex = textureLookup(texEmission, ${p?"emissiveUV":"vuv0"});\n emissions *= vec4(linearizeGamma(emissiveFromTex.rgb), emissiveFromTex.a);`)}\n emissions.a = emissions.rgb == vec3(0.0) ? 0.0: emissions.a;`)}
|
package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadowFromDepth.glsl.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{invert as e,translate as r}from"../../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as t}from"../../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{ReadDepth as a}from"../output/ReadDepth.glsl.js";import{calculateUVZShadowPass as o
|
|
2
|
+
import{invert as e,translate as r}from"../../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as t}from"../../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{ReadDepth as a}from"../output/ReadDepth.glsl.js";import{calculateUVZShadowPass as o}from"./calculateUVZShadow.glsl.js";import{CameraSpace as i}from"../util/CameraSpace.glsl.js";import{glsl as l}from"../../shaderModules/glsl.js";import{Matrix4BindUniform as c}from"../../shaderModules/Matrix4BindUniform.js";function p(e){e.fragment.include(o),n(e)}function n(t){t.fragment.include(a),t.include(i),t.fragment.uniforms.add(new c("inverseViewMatrix",({camera:t})=>e(d,r(d,t.viewMatrix,t.center)))).code.add(l`vec3 calculateUVZShadowAndPixelPosFromDepth(
|
|
3
3
|
in vec2 _uv,
|
|
4
4
|
ivec2 shadowMapSize,
|
|
5
5
|
in sampler2D _depthMap,
|
|
@@ -22,4 +22,4 @@ in sampler2D _depthMap
|
|
|
22
22
|
) {
|
|
23
23
|
vec4 currentPixelPos;
|
|
24
24
|
return calculateUVZShadowAndPixelPosFromDepth(_uv, shadowMapSize, _depthMap, currentPixelPos);
|
|
25
|
-
}`)}const
|
|
25
|
+
}`)}const d=t();export{p as calculateUVZShadowFromDepthPass};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../../../core/Accessor.js";
|
|
2
|
+
import e from"../../../../core/Accessor.js";class r extends e{precompile(e){return!!this.acquireTechniques(e)}get usedMemory(){return 0}get renderOccludedFlags(){return 1}get testsTransparentRenderOrder(){return 0}get isDecoration(){return!1}get readyToRun(){return!1}get numGeometries(){return 0}get hasOccludees(){return!1}get emissions(){return 0}forEachGeometry(e){}}class t extends r{}class s extends r{}export{s as AsyncRenderPlugin,t as SyncRenderPlugin};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{IDENTITY as t,clone as i}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as e}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{getContinuousIndexArray as s}from"../../../../geometry/support/Indices.js";import{Attribute as n}from"./Attribute.js";import{cloneAttributeData as o}from"./AttributeArray.js";import{BoundingInfo as r}from"./BoundingInfo.js";import{GeometryBaseInstance as h}from"./GeometryBaseInstance.js";import{computeAttachmentOriginTriangles as
|
|
2
|
+
import{IDENTITY as t,clone as i}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as e}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{getContinuousIndexArray as s}from"../../../../geometry/support/Indices.js";import{Attribute as n}from"./Attribute.js";import{cloneAttributeData as o}from"./AttributeArray.js";import{BoundingInfo as r}from"./BoundingInfo.js";import{GeometryBaseInstance as h}from"./GeometryBaseInstance.js";import{computeAttachmentOriginTriangles as a,computeAttachmentOriginLines as u,computeAttachmentOriginPoints as g}from"./geometryDataUtils.js";import{Object3DHighlightStateID as l}from"./Object3DStateID.js";import{assert as c}from"./Util.js";import{webglDebugEnabled as d}from"../../../webgl/checkWebGLError.js";class m extends h{constructor(t,i,e=null,s=0,n=null,o=-1,r,h){super(i),this.material=t,this.mapPositions=e,this.type=s,this.olidColor=n,this.edgeIndicesLength=o,this.baseGeometry=r,this.drawIndices=h,this._vertexPositionIndicesCache=void 0,this._highlights=null,this._highlightOptionsCounts=null,this.visible=!0,this._boundingInfo=null,c((t?.useIndexing??!1)===(null!=h),"Material index requirement and Geometry must match");const a=this.positionAttribute;null!=a&&this.edgeIndicesLength<0&&(this.edgeIndicesLength=a.indices.length)}instantiate(t={}){const i=new m(t.material||this.material,[],this.mapPositions,this.type,this.olidColor,this.edgeIndicesLength,this.baseGeometry,this.drawIndices);return this._attributes.forEach((t,e)=>{t.exclusive=!1,i._attributes.set(e,t)}),i._boundingInfo=this._boundingInfo,i.transformation=t.transformation||this.transformation,i}getMutableAttribute(t){let i=this._attributes.get(t);return i&&!i.exclusive&&(i={...i,exclusive:!0,data:o(i.data)},this._attributes.set(t,i)),i}setAttributeData(t,i){const e=this._attributes.get(t);e?this._attributes.set(t,{...e,exclusive:!0,data:i}):d()&&console.warn(`Setting undefined attribute ${t} data`)}get primitivePositionIndices(){return void 0!==this._vertexPositionIndicesCache||(this._vertexPositionIndicesCache=this._computePrimitivePositionIndices()),this._vertexPositionIndicesCache}_computePrimitivePositionIndices(){const{drawIndices:t}=this,i=this.positionAttribute;if(null!=t&&null!=i){const e=new Array;for(const s of t)e.push(i.indices[s]);return e}return i?.indices??null}get positionAttribute(){return this.attributes.get("position")??this.baseGeometry?.attributes.get("position")}get indexCount(){const t=this.drawIndices??this.positionAttribute?.indices;return t?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}computeAttachmentOrigin(t){return!!this._calculateAttachmentOrigin(t)&&(null!=this._transformation&&e(t,t,this._transformation),!0)}_calculateAttachmentOrigin(t){return 0===this.type?this._computeAttachmentOriginTriangles(t):2===this.type?this._computeAttachmentOriginLines(t):this._computeAttachmentOriginPoints(t)}_computeAttachmentOriginTriangles(t){const i=this.positionAttribute,e=this.primitivePositionIndices;return a(t,i,e)}_computeAttachmentOriginLines(t){const i=this.positionAttribute,e=this.primitivePositionIndices;return u(t,i,p(this.material.parameters,i),e)}_computeAttachmentOriginPoints(t){const i=this.positionAttribute,e=this.primitivePositionIndices;return g(t,i,e)}invalidateBoundingInfo(){this._boundingInfo=null,this._vertexPositionIndicesCache=void 0}_calculateBoundingInfo(){const t=this.positionAttribute,i=this.primitivePositionIndices;if(!t||!i||0===i.length)return null;const e=i===t.indices?t:new n(t.data,i,t.size,!1,t.stride),o=0===this.type?3:1;c(i.length%o===0,"Indexing error: "+i.length+" not divisible by "+o);const h=s(i.length/o);return new r(h,o,e)}get transformation(){return this._transformation??t}set transformation(e){this._transformation=e&&e!==t?i(e):null}get highlights(){return this._highlights||_}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}foreachHighlightOptions(t){this._highlightOptionsCounts?.forEach((i,e)=>t(e))}allocateIdAndHighlight(t){const i=new l(t);return this.addHighlight(i)}addHighlight(t){this._ensureHighlights().add(t);const{highlightName:i}=t,e=(this._highlightOptionsCounts?.get(i)??0)+1;return this._ensureHighlightOptionsCounts().set(i,e),t}_ensureHighlights(){let t=this._highlights;return t||(t=new Set,this._highlights=t),t}_ensureHighlightOptionsCounts(){let t=this._highlightOptionsCounts;return t||(t=new Map,this._highlightOptionsCounts=t),t}removeHighlight(t){if(this._highlights?.delete(t)){const{highlightName:i}=t,e=this._highlightOptionsCounts?.get(i)??0;e<=1?this._highlightOptionsCounts?.delete(i):this._ensureHighlightOptionsCounts().set(i,e-1)}}}function p(t,i){return!(!("isClosed"in t)||!t.isClosed)&&i.indices.length>2}const _=new Set;export{m as Geometry};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"../../../../core/has.js";import{generateUID as
|
|
2
|
+
import"../../../../core/has.js";import{generateUID as i}from"../../../../core/uid.js";import{getMetersPerUnitForSR as t}from"../../../../core/units.js";import{subtract as r,distance as s}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as e}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as o}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{projectBuffer as n}from"../../../../geometry/projection/projectBuffer.js";import{Attribute as a}from"./Attribute.js";import{Geometry as h}from"./Geometry.js";import{fromValues as c}from"./LocalOriginFactory.js";import{Object3D as g}from"./Object3D.js";import{gridLocalOriginFactory as m}from"./testUtils.js";import{WebGLLayer as _}from"./WebGLLayer.js";import{RibbonLineMaterial as l}from"../materials/RibbonLineMaterial.js";class f{constructor(r){this._originSR=r,this._rootOriginId="root/"+i(),this._origins=new Map,this._objects=new Map,this._gridSize=5e5,this._originSR?.isGeographic&&(this._gridSize/=t(this._originSR)),this._baselineDistance=.5*this._gridSize;const s=this._baselineDistance*d;this._baselineObjectSize=s/p}getOrigin(i){const t=this._origins.get(this._rootOriginId);if(null==t){const t=m.rootOrigin;if(null!=t)return this._origins.set(this._rootOriginId,c(t[0],t[1],t[2],this._rootOriginId)),this.getOrigin(i);const r=c(i[0],i[1],i[2],this._rootOriginId);return this._origins.set(this._rootOriginId,r),r}const s=this._gridSize,e=Math.round(i[0]/s),o=Math.round(i[1]/s),n=Math.round(i[2]/s),a=`${e}/${o}/${n}`;let h=this._origins.get(a);const g=.5*s;if(r(b,i,t.vec3),b[0]=Math.abs(b[0]),b[1]=Math.abs(b[1]),b[2]=Math.abs(b[2]),b[0]<g&&b[1]<g&&b[2]<g){if(h){const t=Math.max(...b);r(b,i,h.vec3),b[0]=Math.abs(b[0]),b[1]=Math.abs(b[1]),b[2]=Math.abs(b[2]);if(Math.max(...b)<t)return h}return t}return h||(h=c(e*s,o*s,n*s,a),this._origins.set(a,h)),h}needsOriginUpdate(i,t,r){const e=s(i.vec3,t),o=Math.max(1,r/this._baselineObjectSize);return e>this._baselineDistance*o}_drawOriginBox(i,t=o(1,1,0,1)){const r=window.view,s=r.stage,e=t.toString();if(!this._objects.has(e)){this._material=new l({width:2,color:t},!1);const i=new _(s,{pickable:!1}),r=new g({castShadow:!1});i.add(r),this._objects.set(e,r)}const c=this._objects.get(e),m=[0,1,5,4,0,2,1,7,6,2,0,1,3,7,5,4,6,2,0],f=m.length,b=new Array(3*f),d=new Array,p=.5*this._gridSize;for(let o=0;o<f;o++)b[3*o]=i[0]+(1&m[o]?p:-p),b[3*o+1]=i[1]+(2&m[o]?p:-p),b[3*o+2]=i[2]+(4&m[o]?p:-p),o>0&&d.push(o-1,o);n(b,this._originSR,0,b,r.renderSpatialReference,0,f);const j=new h(this._material,[["position",new a(b,d,3,!0)]],null,2);c.addGeometry(j)}get test(){}}const b=e(),d=2**-23,p=.05;export{f as GridLocalOriginFactory};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{add as t,transformMat4 as e,copy as s}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{intersectsSphere as r}from"../../../../geometry/support/frustum.js";import{create as n,fromPoints as o,copy as a}from"../../../../geometry/support/ray.js";import l from"../../webgl/RenderCamera.js";import{HUDTarget as c,HUDIntersectorResult as h}from"./HUDIntersectorResult.js";import{IntersectorOptions as f}from"./IntersectorInterfaces.js";import{IntersectorResult as m,compareOrderedIntersectionHits as u}from"./IntersectorResult.js";import{ObjectTarget as d}from"./ObjectTarget.js";import{PolygonIntersectionResults as y}from"./PolygonIntersectionResults.js";import{IntersectorTransform as g,getVerticalOffsetObject3D as _}from"./verticalOffsetUtils.js";const p=1e-5;class v{constructor(t){this.options=new f,this._results=new b,this.polygonResults=new y,this.transform=new g,this.camera=new l,this.screenPolygonPrimitiveProcessor=j,this.tolerance=p,this.verticalOffset=null,this._ray=n(),this._rayEnd=i(),this._rayBeginTransformed=i(),this._rayEndTransformed=i(),this.viewingMode=t??1}get results(){return this._results}get ray(){return this._ray}get rayBegin(){return this._ray.origin}get rayEnd(){return this._rayEnd}reset(t,e,s){this.resetWithRay(o(t,e,this._ray),s)}resetWithRay(e,s){this.camera=s,e!==this._ray&&a(e,this._ray),0!==this.options.verticalOffset?2===this.viewingMode?this._ray.origin[2]-=this.options.verticalOffset:this.verticalOffset=this.options.verticalOffset:this.verticalOffset=null,t(this._rayEnd,this._ray.origin,this._ray.direction),this._results.init(this._ray),this.polygonResults.init()}intersect(t=null,e,s,i,r){this.point=e,this.filterPredicate=i,this.tolerance=s??p;const n=_(this.verticalOffset);if(t&&t.length>0){const e=r?t=>{r(t)&&this.intersectObject(t)}:t=>{this.intersectObject(t)};for(const s of t){const t=s.getSpatialQueryAccelerator?.();null!=t?(null!=n?t.forEachAlongRayWithVerticalOffset(this._ray.origin,this._ray.direction,e,n):t.forEachAlongRay(this._ray.origin,this._ray.direction,e),this.options.selectionMode&&this.options.hud&&t.forEachDegenerateObject(e)):s.objects.forEach(t=>e(t))}}this.sortResults()}*intersectScreenPolygon(t=null,e){if(this.verticalOffset=null,t?.length)for(const s of t){const t=s.getSpatialQueryAccelerator?.();if(null!=t)for(const s of t.intersectingFrustumValues(e.broadPhaseFrustum,t=>t.visible))yield*this._intersectScreenPolygonObject(s,e);else for(const i of s.objects.values())i.visible&&r(e.broadPhaseFrustum,i.boundingVolumeWorldSpace.bounds)&&(yield*this._intersectScreenPolygonObject(i,e))}}*_intersectScreenPolygonObject(t,e){const s=t.geometries;if(!s)return;const i=t.effectiveTransformation;for(const r of s){if(!r.visible)continue;const{material:s,id:n}=r;if(!s.visible||!s.intersectScreenPolygon)continue;this.transform.setAndInvalidateLazyTransforms(i,r.transformation);const o=s.intersectScreenPolygon(r,this.transform.transform,this,e);o?.valid&&this._handleObjectScreenPolygonIntersection(new d(t,n,o.primitiveIndex),o.distance,o.point),yield}}intersectObject(t){const s=t.geometries;if(!s)return;const i=t.effectiveTransformation,r=_(this.verticalOffset);for(const n of s){if(!n.visible)continue;const{material:s,id:o}=n;if(!s.visible)continue;this.transform.setAndInvalidateLazyTransforms(i,n.transformation),e(this._rayBeginTransformed,this.rayBegin,this.transform.inverse),e(this._rayEndTransformed,this.rayEnd,this.transform.inverse);const a=this.transform.transform;null!=r&&(r.objectTransform=this.transform),s.intersectRay(n,this.transform.transform,this,this._rayBeginTransformed,this._rayEndTransformed,(e,s,i,r)=>this.handleObjectIntersection({object:t,geometryId:o,primitiveIndex:i},e,s,a,r))}}handleObjectIntersection(t,e,s,i,r){if(e<0||null!=this.filterPredicate&&!this.filterPredicate(this._ray.origin,this._rayEnd,e))return;const n=r?this._results.hud:this._results;t=r?new c(t,r):t;const o=r?i=>i.set(1,t,e,s):r=>r.set(4,t,e,s,i);if((null==n.min.distance||e<n.min.distance)&&o(n.min),0!==this.options.store&&(null==n.max.distance||e>n.max.distance)&&o(n.max),2===this.options.store)if(r){const t=new h(this._ray);o(t),this._results.hud.all.push(t)}else{const t=new m(this._ray);o(t),this._results.all.push(t)}}_handleObjectScreenPolygonIntersection(t,e,s,i){e<0||(null==this.filterPredicate||null!=s&&this.filterPredicate(this.camera.eye,s,1))&&this.polygonResults.add(i?1:4,i?new c(t,i):t,e)}sortResults(t=this._results.all){t.sort(u)}}class b{constructor(){this.min=new m(n()),this.max=new m(n()),this.hud={min:new h(n()),max:new h(n()),all:new Array},this.ground=new m(n()),this.all=[]}init(t){this.min.init(t),this.max.init(t),this.ground.init(t),this.all.length=0,this.hud.min.init(t),this.hud.max.init(t),this.hud.all.length=0}}const j={*processTriangle(t,e){t.list=e,t.count=e.length,yield t},*processLineSegment(t,e,i){s(t[0],e),s(t[1],i),yield t}};export{v as Intersector,j as defaultScreenPolygonPrimitiveProcessor,p as defaultTolerance};
|
|
2
|
+
import{add as t,transformMat4 as e,copy as s}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{intersectsSphere as r}from"../../../../geometry/support/frustum.js";import{create as n,fromPoints as o,copy as a}from"../../../../geometry/support/ray.js";import l from"../../webgl/RenderCamera.js";import{HUDTarget as c,HUDIntersectorResult as h}from"./HUDIntersectorResult.js";import{IntersectorOptions as f}from"./IntersectorInterfaces.js";import{IntersectorResult as m,compareOrderedIntersectionHits as u}from"./IntersectorResult.js";import{ObjectTarget as d}from"./ObjectTarget.js";import{PolygonIntersectionResults as y}from"./PolygonIntersectionResults.js";import{IntersectorTransform as g,getVerticalOffsetObject3D as _}from"./verticalOffsetUtils.js";const p=1e-5;class v{constructor(t){this.options=new f,this._results=new b,this.polygonResults=new y,this.transform=new g,this.camera=new l,this.screenPolygonPrimitiveProcessor=j,this.tolerance=p,this.verticalOffset=null,this._ray=n(),this._rayEnd=i(),this._rayBeginTransformed=i(),this._rayEndTransformed=i(),this.viewingMode=t??1}get results(){return this._results}get ray(){return this._ray}get rayBegin(){return this._ray.origin}get rayEnd(){return this._rayEnd}reset(t,e,s){this.resetWithRay(o(t,e,this._ray),s)}resetWithRay(e,s){this.camera=s,e!==this._ray&&a(e,this._ray),0!==this.options.verticalOffset?2===this.viewingMode?this._ray.origin[2]-=this.options.verticalOffset:this.verticalOffset=this.options.verticalOffset:this.verticalOffset=null,t(this._rayEnd,this._ray.origin,this._ray.direction),this._results.init(this._ray),this.polygonResults.init()}intersect(t=null,e,s,i,r){this.point=e,this.filterPredicate=i,this.tolerance=s??p;const n=_(this.verticalOffset);if(t&&t.length>0){const e=r?t=>{r(t)&&this.intersectObject(t)}:t=>{this.intersectObject(t)};for(const s of t){const t=s.getSpatialQueryAccelerator?.();null!=t?(null!=n?t.forEachAlongRayWithVerticalOffset(this._ray.origin,this._ray.direction,e,n):t.forEachAlongRay(this._ray.origin,this._ray.direction,e),this.options.selectionMode&&this.options.hud&&t.forEachDegenerateObject(e)):s.objects.forEach(t=>e(t))}}this.sortResults()}*intersectScreenPolygon(t=null,e){if(this.verticalOffset=null,t?.length)for(const s of t){const t=s.getSpatialQueryAccelerator?.();if(null!=t)for(const s of t.intersectingFrustumValues(e.broadPhaseFrustum,t=>t.visible))yield*this._intersectScreenPolygonObject(s,e);else for(const i of s.objects.values())i.visible&&r(e.broadPhaseFrustum,i.boundingVolumeWorldSpace.bounds)&&(yield*this._intersectScreenPolygonObject(i,e))}}*_intersectScreenPolygonObject(t,e){const s=t.geometries;if(!s)return;const i=t.effectiveTransformation;for(const r of s){if(!r.visible)continue;const{material:s,id:n}=r;if(!s.visible||!s.intersectScreenPolygon)continue;this.transform.setAndInvalidateLazyTransforms(i,r.transformation);const o=s.intersectScreenPolygon(r,this.transform.transform,this,e);o?.valid&&this._handleObjectScreenPolygonIntersection(new d(t,n,o.primitiveIndex),o.distance,o.point),yield}}intersectObject(t){const s=t.geometries;if(!s)return;const i=t.effectiveTransformation,r=_(this.verticalOffset);for(const n of s){if(!n.visible)continue;const{material:s,id:o}=n;if(!s.visible)continue;this.transform.setAndInvalidateLazyTransforms(i,n.transformation),e(this._rayBeginTransformed,this.rayBegin,this.transform.inverse),e(this._rayEndTransformed,this.rayEnd,this.transform.inverse);const a=this.transform.transform;null!=r&&(r.objectTransform=this.transform),s.intersectRay(n,this.transform.transform,this,this._rayBeginTransformed,this._rayEndTransformed,(e,s,i,r)=>this.handleObjectIntersection({object:t,geometryId:o,primitiveIndex:i},e,s,a,r))}}handleObjectIntersection(t,e,s,i,r){if(e<0||null!=this.filterPredicate&&!this.filterPredicate(this._ray.origin,this._rayEnd,e))return;const n=r?this._results.hud:this._results;t=r?new c(t,r):t;const o=r?i=>i.set(1,t,e,s):r=>r.set(4,t,e,s,i);if((null==n.min.distance||e<n.min.distance)&&o(n.min),0!==this.options.store&&(null==n.max.distance||e>n.max.distance)&&o(n.max),2===this.options.store)if(r){const t=new h(this._ray);o(t),this._results.hud.all.push(t)}else{const t=new m(this._ray);o(t),this._results.all.push(t)}}_handleObjectScreenPolygonIntersection(t,e,s,i){e<0||(null==this.filterPredicate||null!=s&&this.filterPredicate(this.camera.eye,s,1))&&this.polygonResults.add(i?1:4,i?new c(t,i):t,e)}sortResults(t=this._results.all){t.sort(u)}}class b{constructor(){this.min=new m(n()),this.max=new m(n()),this.hud={min:new h(n()),max:new h(n()),all:new Array},this.ground=new m(n()),this.all=[]}init(t){this.min.init(t),this.max.init(t),this.ground.init(t),this.all.length=0,this.hud.min.init(t),this.hud.max.init(t),this.hud.all.length=0}}const j={*processTriangle(t,e){t.list=e,t.count=e.length,yield t},*processLineSegment(t,e,i){s(t[0],e),s(t[1],i),yield t},validatePoint:()=>!0};export{v as Intersector,j as defaultScreenPolygonPrimitiveProcessor,p as defaultTolerance};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import"../../../../core/has.js";import{abortMaybe as e}from"../../../../core/maybe.js";import{recordPerformance as t}from"../../../../core/performance.js";import{createAbortError as a}from"../../../../core/promiseUtils.js";import{Milliseconds as i}from"../../../../core/time.js";import{N as s}from"../../../../chunks/NavigationDepth.glsl.js";import{NavigationDepthTechnique as r}from"../shaders/NavigationDepthTechnique.js";import{PixelType as h}from"../../../webgl/enums.js";const l=4,d=l*l,n=i(250),o=1;class c{constructor(e,t,a,r){this._rctx=e,this._fboCache=t,this._techniques=a,this._requestRender=r,this._passParameters=new s,this._updateWaiters=new Array,this._destroyed=!1,this._readbackPending=!1,this._width=0,this._height=0,this._cameraWidth=0,this._cameraHeight=0,this._lastUpdateTime=i(-1/0),this._testImmediateUpdateId=0,this._abortController=new AbortController}destroy(){this._destroyed=!0,this._withUpdateWaiters(e=>e.reject(a())),this._abortController=e(this._abortController),this._releaseReadbackHandles()}update(e,a,s){const{camera:d}=e;if(this._destroyed||this._readbackPending||s-this._lastUpdateTime<n||d.fullWidth<=0||d.fullHeight<=0)return;const o=this._techniques.getCompiled(r);if(!o)return void this._requestRender();const c=performance.now();this._lastUpdateTime=s;const _=Math.ceil(d.fullWidth/l),m=Math.ceil(d.fullHeight/l),u=Math.ceil(_/l),f=Math.ceil(m/l),p=u*f,b=this._ensureReadbackBuffer(p),g=this._fboCache.acquire(_,m,"navigation depth",7);this._readbackImmediateHandle=g;const H=this._fboCache.acquire(u,f,"navigation depth",10);this._readbackHandle=H,this._passParameters.depthTexture=a,this._passParameters.depthTextureSize=[d.fullWidth,d.fullHeight],this._passParameters.cellSize=l,this._passParameters.reduced=!1,this._rctx.bindFramebuffer(g.fbo),this._rctx.setViewport(0,0,_,m),this._rctx.bindTechnique(o,e,this._passParameters),this._rctx.screen.draw(),this._passParameters.depthTexture=g.getTexture(),this._passParameters.depthTextureSize=[_,m],this._passParameters.reduced=!0,this._rctx.bindFramebuffer(H.fbo),this._rctx.setViewport(0,0,u,f),this._rctx.bindTechnique(o,e,this._passParameters),this._rctx.screen.draw(),this._readbackPending=!0;const x=this._testImmediateUpdateId;H.fbo.readPixelsAsync(0,0,u,f,6403,h.FLOAT,b,this._abortController?.signal).then(()=>{this._destroyed||(this._data=b.slice(0,p),this._width=u,this._height=f,this._cameraWidth=d.fullWidth,this._cameraHeight=d.fullHeight,this._nearFar=[d.nearFar[0],d.nearFar[1]],x===this._testImmediateUpdateId?this._withUpdateWaiters(e=>e.resolve()):(this._lastUpdateTime=i(-1/0),this._requestRender()))}).catch(()=>this._withUpdateWaiters(e=>e.reject())).finally(()=>{this._releaseReadbackHandles(),this._readbackPending=!1,t("NavigationDepthCache update",c,performance.now(),"Maps SDK","Scheduling")}),d.setGLViewport(this._rctx)}getMinimalDepthForArea(e,t,a,i,s=i){if(null==this._data||null==this._nearFar||!this._hasCompatibleCameraResolution(a))return null;const r=a.constrainWindowSize(e,t,i*a.pixelRatio,s*a.pixelRatio),h=this._cameraWidth/a.fullWidth,l=this._cameraHeight/a.fullHeight,n=Math.max(Math.floor(r[0]*h/d),0),c=Math.max(Math.floor(r[1]*l/d),0),_=Math.min(Math.ceil((r[0]+r[2])*h/d),this._width),m=Math.min(Math.ceil((r[1]+r[3])*l/d),this._height),[u,f]=this._nearFar;let p=Number.MAX_VALUE;for(let d=c;d<m;++d)for(let e=n;e<_;++e){const t=this._data[e+d*this._width];if(t>=o)continue;const a=t*(f-u)+u;a!==u&&a!==f&&a<p&&(p=a)}return p===Number.MAX_VALUE?null:p}_hasCompatibleCameraResolution(e){if(this._cameraWidth<=0||this._cameraHeight<=0||e.fullWidth<=0||e.fullHeight<=0)return!1;return Math.abs(this._cameraWidth*e.fullHeight-this._cameraHeight*e.fullWidth)<=Math.max(this._cameraWidth,this._cameraHeight,e.fullWidth,e.fullHeight)}_ensureReadbackBuffer(e){return(null==this._readbackBuffer||this._readbackBuffer.length<e)&&(this._readbackBuffer=new Float32Array(e)),this._readbackBuffer}_withUpdateWaiters(e){const t=this._updateWaiters.slice();this._updateWaiters.length=0;for(const a of t)e(a)}_releaseReadbackHandles(){this._readbackHandle?.release(),this._readbackHandle=null,this._readbackImmediateHandle?.release(),this._readbackImmediateHandle=null}get test(){return null}}export{c as NavigationDepthCache};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{reciprocalClamped as
|
|
2
|
+
import{reciprocalClamped as t}from"../../../../core/mathUtils.js";import{set as e}from"../../../../core/libs/gl-matrix-2/math/mat2.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/mat2f64.js";import{setAxisAngle as i}from"../../../../core/libs/gl-matrix-2/math/quat.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/quatf64.js";import{multiply as o,copy as a,length as c,scale as n,set as f,dot as p,add as m,subtract as l,normalize as h,transformMat2 as u}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{UNIT_X as x,ZEROS as d,create as b}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{cross as g,set as V,transformQuat as I,dot as v,scale as P,add as j,normalize as M}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as y}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{pathNumRoundCapExtrusionSubdivisions as C}from"../../layers/graphics/Graphics3DPathSymbolLayerConstants.js";import{decodeInt16 as A,decompressNormal as O}from"./Normals.js";import{PathFrame2D as k}from"./PathFrame2D.js";import{decodePathVertexInfo as D}from"./PathVertexInfo.js";class R{constructor(t,e,s,i,r,o){this.builder=t,this.profile=e,this.numJoinSubdivisions=s,this.capType=i,this.miterCutoffAngle=r,this.upVectorAlignment=o}evaluateVertexPosition(t,e,s,i){const{framePositionIndices:r,positions:l}=this.builder,h=Q;this._evaluateExtrudedVertex(h,s);const u=G;let x=0;const d=h.frameIndex,b=h.frame.right,I=h.frame.up,v=3*r[d],P=o(L,h.profileVertex,e);if(h.isCap)g(u,I,b),x=h.capPositionOffset*e[0];else{const t=N,s=B;a(t,h.rotationRight);const i=h.maxDistance;o(t,t,e);const r=c(t);r>0?n(t,t,1/r):f(t,0,0);const l=p(P,t);if(Math.abs(l)>i){f(s,-t[1],t[0]);const e=p(P,s);n(t,t,i*Math.sign(l)),n(s,s,e),m(P,t,s)}V(u,0,0,0)}const j=b[0]*P[0]+I[0]*P[1],M=b[1]*P[0]+I[1]*P[1],y=b[2]*P[0]+I[2]*P[1],C=3*i;t[C]=l[v]+j+u[0]*x,t[C+1]=l[v+1]+M+u[1]*x,t[C+2]=l[v+2]+y+u[2]*x}_evaluateExtrudedVertex(t,e){const{profileRotations:s,profileUpAxes:r,profileRightAxes:o,profileRotationFrameUpAxes:c,pathMaxStretchDistances:f,pathVertexInfos:u}=this.builder,{miterCutoffAngle:b,profile:g,upVectorAlignment:V}=this,v=S[V],P=1===this.upVectorAlignment,j=D(u[e]),M=j.frameIndex;t.frameIndex=M;const y=A(s[M])*Math.PI,k=f[M];switch(O(t.frame.right,o,M),O(t.frame.up,r,M),t.maxDistance=0,j.type){case 0:{t.isCap=!1;const e=g.vertices[j.sourceIndex],s=Math.abs(y)>=b,r=P?O(H,c,M):t.frame.up,o=null!=c?T(J,t.frame,r):x,n=p(e,o)*y>=0;if(s&&n){a(t.profileVertex,e);const s=.5*-y+j.subdivision*y/this.numJoinSubdivisions;0!==s&&(i(K,r,s),P&&I(t.frame.up,t.frame.up,K),I(t.frame.right,t.frame.right,K))}else{const s=v(E,e,y,o);a(t.profileVertex,s)}a(t.rotationRight,n?d:o),t.maxDistance=n?0:k;break}case 1:{t.isCap=!0;const e=g.vertices[j.sourceIndex];switch(a(t.profileVertex,e),this.capType){case 0:case 1:case 3:t.capPositionOffset=0;break;case 2:t.capPositionOffset=w(j)?.5:-.5}break}case 2:{t.isCap=!0;const e=w(j)?1:-1;switch(this.capType){case 1:case 2:{const s=g.vertices[j.sourceIndex],i=2===this.capType?.5*e:0;a(t.profileVertex,s),t.capPositionOffset=i;break}case 3:{const s=.5*e,i=g.poles[j.sourceIndex],r=i.position;i.normal;a(t.profileVertex,r),t.capPositionOffset=s;break}}break}case 3:{t.isCap=!0;const e=.5*(w(j)?1:-1),s=(1-(j.subdivision+1)/C)*Math.PI*.5,i=Math.sin(s),r=Math.cos(s),o=g.poleIndices[j.sourceIndex],c=g.poles[o],f=c.position,p=c.normal,u=g.vertices[j.sourceIndex];l(E,u,f),n(E,E,i),p?(m(E,E,f),a(t.profileVertex,E),t.capPositionOffset=e*r):(h(q,E),n(q,q,i),m(E,E,f),a(t.profileVertex,E),t.capPositionOffset=e*r);break}default:j.type}}}const S={0:(e,s,i)=>{if(Math.abs(i)<=0)return s;const r=t(Math.cos(.5*i));return f(e,(r-1+1)*s[0],s[1])},1:(s,i,r,o)=>{if(0===Math.abs(r))return i;const a=t(Math.cos(.5*r)),c=e(F,1+(a-1)*o[0]*o[0],(a-1)*o[0]*o[1],(a-1)*o[0]*o[1],1+(a-1)*o[1]*o[1]);return u(s,i,c)}};function w(t){return 1===t.capSide}function T(t,e,s){const i=v(s,e.up),r=v(s,e.right);return P(_,e.up,-r),P(z,e.right,i),j(_,_,z),M(_,_),U(t,e,_),t}function U(t,e,s){f(t,v(s,e.right),v(s,e.up))}const q=b(),E=b(),F=s(),J=b(),_=y(),z=y(),G=y(),L=b(),N=b(),B=b(),H=y(),K=r(),Q={profileVertex:b(),rotationRight:b(),maxDistance:0,capPositionOffset:0,isCap:!1,frame:new k,frameIndex:0};export{R as PathEvaluator};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{
|
|
2
|
+
import{clamp as t}from"../../../../core/mathUtils.js";import{copy as e,exactEquals as i}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as o,clone as r}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{transformMat4 as s}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as n,negativeInfinity as l,expandWithVec3 as u,toCorners as c}from"../../../../geometry/support/aaBoundingBox.js";import{newFloatArray as p}from"../../../../geometry/support/FloatArray.js";import{getContinuousIndexArray as m,getZeroIndexArray as h,newContinuousIndexArray as f}from"../../../../geometry/support/Indices.js";import{Attribute as v,Vertices as d}from"./Attribute.js";import{BoundingInfo as g}from"./BoundingInfo.js";import{Geometry as b}from"./Geometry.js";import{computeAttachmentOriginTrianglesReader as x}from"./geometryDataUtils.js";import{getPathVertexFrameIndex as z}from"./PathVertexInfo.js";import{intersectTriangles as V}from"./RayIntersections.js";import{intersectTriangleReaderRangeScreenPolygon as I}from"./screenPolygonTriangleIntersections.js";class P extends b{constructor(t,e,i,r){const{vertexIndices:s,framePositionIndices:a,numExtrusionFrames:n}=e,l=m(n),u=h(n),c=[["position",new v(e.positions,a,3,!0)],["profileRight",new v(e.profileRightAxes,l,2,!0)],["profileUp",new v(e.profileUpAxes,l,2,!0)],["profileRotation",new v(e.profileRotations,l,1,!0)],["pathMaxStretchDistance",new v(e.pathMaxStretchDistances,l,1,!0)],["pathVertexInfo",new v(e.pathVertexInfos,s,1,!0)]];e.profileRotationFrameUpAxes&&c.push(["pathRotationUp",new v(e.profileRotationFrameUpAxes,l,2,!0)]),null!=i.sizeAttributeValue&&c.push(["sizeFeatureAttribute",new v([i.sizeAttributeValue],u,1,!0)]),null!=i.size&&c.push(["size",new v([...i.size],u,2,!0)]),null!=i.colorAttributeValue&&c.push(["colorFeatureAttribute",new v([i.colorAttributeValue],u,1,!0)]),null!=i.color&&c.push(["color",new v([...i.color],u,4,!0)]),null!=i.opacityAttributeValue&&c.push(["opacityFeatureAttribute",new v([i.opacityAttributeValue],u,1,!0)]),null!=i.opacity&&c.push(["opacity",new v([i.opacity],u,1,!0)]),super(t,c,null,0,r),this.builder=e,this.visualVariablesState=i,this._lastBoundingSize=o()}onPathChanged(){this.builder.onPathChanged();const t=this.getMutableAttribute("position");t&&(t.data=this.builder.positions),this.invalidateBoundingInfo()}get size(){const{parameters:i}=this.material,o=r(i.size);if(i.vvSize){const{offset:e,factor:r,minSize:s,maxSize:a,fallback:n}=i.vvSize,l=this.visualVariablesState.sizeAttributeValue??NaN;Number.isNaN(l)?(o[0]*=n[0],o[1]*=n[2]):(o[0]*=t(e[0]+l*r[0],s[0],a[0]),o[1]*=t(e[2]+l*r[2],s[2],a[2]))}else i.hasPathSize&&this.visualVariablesState.size&&e(o,this.visualVariablesState.size);return o}get primitivePositionIndices(){return this._validateSize(),super.primitivePositionIndices}_computePrimitivePositionIndices(){const t=this.attributes.get("pathVertexInfo"),e=this.attributes.get("position");if(t&&e){const i=e.indices,o=t.indices,r=t.data;return o.map(e=>i[z(r[t.stride*e])])}return e?.indices??null}get boundingInfo(){return this._validateSize(),super.boundingInfo}_calculateBoundingInfo(){const{builder:t,size:e}=this,{numVerticesTotal:i}=t;if(0===i)return null;const o=n(l);for(let r=0;r<i;++r)t.evaluator.evaluateVertexPosition(B,e,r,0),u(o,B);return new g(S,1,new v(c(o),S,3,!0))}_calculateAttachmentOrigin(t){const{builder:e,size:i}=this,{vertexIndices:o}=e,r=(t,r,s,a)=>{const n=3*a;e.evaluator.evaluateVertexPosition(t,i,o[n],0),e.evaluator.evaluateVertexPosition(r,i,o[n+1],0),e.evaluator.evaluateVertexPosition(s,i,o[n+2],0)};return x(t,o.length/3,r)}intersectRay(t,e,i,o){const{builder:r,size:s}=this,a=r.vertexIndices,n=a.length/3;for(let l=0;l<n;++l){const n=3*l;r.evaluator.evaluateVertexPosition(y,s,a[n],0),r.evaluator.evaluateVertexPosition(y,s,a[n+1],1),r.evaluator.evaluateVertexPosition(y,s,a[n+2],2),V(t,e,0,1,w,j,void 0,i,(t,e)=>o(t,e,l))}}intersectScreenPolygon(t,e,i){const{builder:o,size:r}=this,a=o.vertexIndices,n=a.length/3;return I(t,i,0,n,(t,i,n,l)=>{const u=3*l;return o.evaluator.evaluateVertexPosition(t,r,a[u],0),o.evaluator.evaluateVertexPosition(i,r,a[u+1],0),o.evaluator.evaluateVertexPosition(n,r,a[u+2],0),e&&(s(t,t,e),s(i,i,e),s(n,n,e)),l})}_validateSize(){const{size:t}=this;i(t,this._lastBoundingSize)||(e(this._lastBoundingSize,t),this.invalidateBoundingInfo())}}function A(t){return t instanceof P}const S=m(8),w=f(3),y=p(9),j=new d(y,3),B=a();export{P as PathGeometry,A as isPathGeometry};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{update as t}from"../../../../core/arrayUtils.js";import{createTask as s}from"../../../../core/asyncUtils.js";import has from"../../../../core/has.js";import{removeMaybe as i,abortMaybe as r,destroyMaybe as a,releaseMaybe as n,releaseReferencedMaybe as h}from"../../../../core/maybe.js";import{throwIfAborted as o}from"../../../../core/promiseUtils.js";import{watch as d,syncAndInitial as l,initial as u,sync as m}from"../../../../core/reactiveUtils.js";import{signal as _}from"../../../../core/signal.js";import{property as p,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{equals as f,invert as b,multiply as g,copy as P}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as w,create as E}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as I}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{fromValues as A,ZEROS as C}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{pruneIndexArrays as T}from"../../../../geometry/support/Indices.js";import{RenderNodeOutput as O,InternalRenderCategory as R,AllRenderNodeOutputs as S,AllInternalRenderNodeOutputs as D}from"../../webgl.js";import{minNearDistanceInMeters as N}from"../../state/NearFarHeuristic.js";import{debugFlags as F}from"../../support/debugFlags.js";import{computeShadowsEnabled as G}from"../../support/sunUtils.js";import{FBOCache as H}from"../core/FBOCache.js";import{RenderPassManager as x}from"../core/renderPasses/RenderPassManager.js";import{isColor as y}from"../core/shaderLibrary/ShaderOutput.js";import{distanceFadeEnd as M}from"../core/shaderLibrary/shading/ScreenSpaceConstants.js";import{RenderNodes as v}from"../effects/RenderNodes.js";import{RenderPluginManager as L}from"../effects/RenderPluginManager.js";import{WeatherFader as q}from"../effects/WeatherFader.js";import{innerAtmosphereFadeStart as U}from"../effects/atmosphere/atmosphereUtils.js";import{Blit as j}from"../effects/blit/Blit.js";import{maxHighlightsPerChannel as B,renderHighlightBuffer as V}from"../effects/highlight/Highlight.js";import{OITBlend as k}from"../effects/transparency/OITBlend.js";import{AnimationTimer as W}from"./AnimationTimer.js";import{AnimationTimeStep as Q}from"./AnimationTimeStep.js";import{BoundingInfo as z}from"./BoundingInfo.js";import{Compositor as Y}from"./Compositor.js";import{DepthRange as J}from"./DepthRange.js";import{depthRangeFromScene as X}from"./depthRangeUtils.js";import{MainFramebuffer as $}from"./MainFramebuffer.js";import{blendingColorAlphaClear as K}from"./OrderIndependentTransparency.js";import{RenderContext as Z,defaultRenderOccludedMask as ee}from"./RenderContext.js";import{RendererBase as te}from"./RendererBase.js";import{setupFeatureDefaults as se}from"./RenderFeature.js";import{RenderPluginInput as ie}from"./RenderPluginInput.js";import{ShadowAccumulator as re}from"./ShadowAccumulator.js";import{ShadowMap as ae}from"./ShadowMap.js";import ne from"./SliceHelper.js";import{MergedRenderer as he}from"../materials/renderers/MergedRenderer.js";import{RenderSceneResult as oe}from"../parts/renderUtils.js";import{RendererPerformanceInfo as de,PerformanceCategory as le}from"../statistics/RendererPerformanceInfo.js";import{ColorAttachment1 as ue,PixelType as me,ColorAttachment2 as _e,ColorAttachment0 as pe,DrawBufferNone as ce}from"../../../webgl/enums.js";let fe=class extends te{constructor(e,t,s,i,r){super({stage:e}),this._techniques=s,this._rctx=i,this._requestRender=r,this._pluginsHas={occludedHudElements:!1,hudElements:!1,water:!1},this.renderPassManager=new x,this._isRendering=!1,this._inGlobeView=!1,this._backgroundColor=A(0,0,0,1),this._sliceHelper=new ne,this.sceneDepthRange=_(J.Infinite),this._state=_(2),this._hasGlobalIlluminationFlag=!!has("global-illumination"),this._hasAnimations=!1,this._animationTimestep=new Q,this._loadEdgeViewTask=null,this._edgeViewCallbacks=[],this._reprojectionMatrixVersion=_(0),this._renderHiddenTransparentEdges=()=>{},this._pluginInput=new ie,this._hasTransparentGeometry=!1,this._releaseNodeInputs=e=>{for(const t of Se)e.some(({name:e})=>e===t)&&this._pluginInput.release(t)},this._testsNeedsDepth=!1,this._fboCache=new H(i),this._compositor=new Y(i,s),this._renderStateFeatures=_(se(e.view.qualityProfile));const a=new ae(this._fboCache,e.viewingMode);this._renderContext=new Z(this._rctx,a,s),this._framebuffer=new $(this._fboCache,this._bindParameters),this._performanceInfo=new de(this._rctx),this._blit=new j(s),this._shadowAccumulator=new re(this.fboCache,s,e,(t,s,i)=>{const r=e.view.qualitySettings.maximumPixelRatio;t.shadowMap.start(t.camera,s,i,!0,r),this._renderShadowCascades(5,t.shadowMap),t.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(t.camera,t.contentCamera)},r),this._nodes=new v(this._renderContext),this._plugins=new L({renderContext:this._renderContext,techniques:s,materials:t,requestRender:r,controller:e}),this._plugins.add(this.renderPassManager),this.weatherFader=new q({view:e.view,context:this._renderContext}),this.addHandles([d(()=>e.view.state.camera,()=>r(),l),d(()=>F.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES,e=>{this._renderHiddenTransparentEdges=e?()=>this._renderEdges(0):()=>{},r()},u),d(()=>e.view.environment.background?.color,e=>{const t=e?e.toUnitRGBA():C;I(this._backgroundColor,t[0]*t[3],t[1]*t[3],t[2]*t[3],t[3]),r()},l),d(()=>e.view.state.camera.relativeElevation,e=>this._inGlobeView=(e??1/0)>=M,l),d(()=>this._bindParameters.clouds.fadeFactor,()=>{this._bindParameters.fadeLighting(),this._requestRender(2)},m),d(()=>this._bindParameters.clouds.data?.state,()=>r(),m),d(()=>e.view.state.highlights,e=>{this._bindParameters.highlights=e,r()},u),d(()=>"sun"===e.view.environment.lighting?.type,e=>{this._bindParameters.enableFillLights=e,this._requestRender()},l)])}destroy(){this._gpuTimerHandle=i(this._gpuTimerHandle),this._nodes.destroy(),this._framebuffer.dispose(),this._shadowAccumulator.destroy(),this._shadowAccumulator=null,this._loadEdgeViewTask=r(this._loadEdgeViewTask),this._edgeView=a(this._edgeView),this.renderPassManager.dispose(),this.weatherFader=a(this.weatherFader),this._releaseFBOs(),this._disposeOffscreenBuffers(),this._fboCache.destroy(),this._fboCache=null,this._renderContext.destroy(),this._plugins.destroy(),this._pluginInput=null,this._oitBlendOrNil=null,this._nodes=null,this._framebuffer=null,this._performanceInfo=null,z.prune(),he.prune(),T()}get renderContext(){return this._renderContext}get _bindParameters(){return this._renderContext.bind}get _oitBlend(){return this._oitBlendOrNil??=new k(this._techniques),this._oitBlendOrNil}get performanceInfo(){return this._performanceInfo}updateRenderFeatures(e){this._renderStateFeatures.value=se(e),this._requestRender()}isFeatureEnabled(e,t=this._state.value){return this._renderStateFeatures.value.get(t,e)??!1}setFeatureEnabled(e,t,s){this._renderStateFeatures.mutate(i=>i.set(t,e,s)),this._requestRender()}setTime(e){this._renderContext.time=e}get hasReflections(){return this._bindParameters.screenSpaceReflections.enabled=this._pluginsHas.water&&this.isFeatureEnabled(4),this._bindParameters.screenSpaceReflections.enabled}get _hasHighlights(){return this._plugins.produces(10,2,4,18,12,13,14)}hasHighlight(e){return this._plugins.hasHighlight(e)}get _hasHUDHighlights(){return this._plugins.produces(10,12,13,14)}get hasAmbientIllumination(){return this.isFeatureEnabled(3)&&!this._inGlobeView}get hasGlobalIllumination(){return this._hasGlobalIlluminationFlag&&this.hasAmbientIllumination}get hasGlobalIlluminationHighQuality(){return this.hasGlobalIllumination&&this.isFeatureEnabled(10)}get _keepGlobalIlluminationShadingAlive(){return this._hasGlobalIlluminationFlag&&!this._inGlobeView}get hasSMAA(){return this.isFeatureEnabled(0)}get _emissions(){return this._plugins.emissions}get hasFloatBlend(){return this._rctx.driverTest.floatBufferBlend.result&&this.isFeatureEnabled(9)}get highResolutionAtmosphere(){return this.isFeatureEnabled(2)}get fboCache(){return this._fboCache}_releaseFBOs(){this._bindParameters.hudOcclusion=n(this._bindParameters.hudOcclusion),this._bindParameters.depth=null}_disposeOffscreenBuffers(){this._framebuffer.dispose(),this._bindParameters.globalIllumination=n(this._bindParameters.globalIllumination),this._bindParameters.reprojection.lastFrameDepth=n(this._bindParameters.reprojection.lastFrameDepth),this._bindParameters.reprojection.lastFrameEmission=n(this._bindParameters.reprojection.lastFrameEmission),this._disposeBindBuffers()}_disposeBindBuffers(){this._bindParameters.shadowMap.disposeOutputs()}get updating(){return this._loadEdgeViewTask&&!this._loadEdgeViewTask.finished||this._edgeView?.updating||this._plugins.updating||this.weatherFader?.readyToRun||!this.isCameraFinal}loadEdgeView(){return this._loadEdgeViewTask||(this._loadEdgeViewTask=s(async e=>{const{EdgeView:t}=await import("./edgeRendering/EdgeView.js");o(e);const s=this._edgeView=new t({rctx:this._rctx,renderSR:this.stage.view.renderSpatialReference,viewingMode:this.stage.view.stage.viewingMode,techniques:this._techniques,setNeedsRender:()=>this._requestRender(),schedule:He(this.stage.view.resourceController)});return this.addHandles(d(()=>s.updating,()=>this._requestRender(),m)),this._requestRender(),this._edgeViewCallbacks.forEach(e=>e(s)),this._edgeViewCallbacks.length=0,s})),this._loadEdgeViewTask.promise}withEdgeView(e){this.loadEdgeView(),null==this._edgeView?this._edgeViewCallbacks.push(e):e(this._edgeView)}get edgeView(){return this._edgeView}get isCameraFinal(){return this._reprojectionMatrixVersion.value>=0&&f(this._bindParameters.reprojection.matrix,w)}set _reprojectionMatrix(e){t(this._bindParameters.reprojection.matrix,e)&&this._reprojectionMatrixVersion.value++}modifyShadowsEnabled(){const e=this.stage.view.environmentManager.referencePositionGeographic,t=null==e||G(e[2],this.stage.viewingMode),s=this.stage.view.environment.lighting.directShadowsEnabled&&t;this._bindParameters.shadowMap.enabled!==s&&(this._bindParameters.shadowMap.enabled=s,this._requestRender(1))}get shadowsEnabled(){return!!this._bindParameters.shadowMap.enabled}setParameters(e){e.shadowCast&&this._shadowAccumulator.setParameters(e.shadowCast)}set slice(e){this._sliceHelper.update(e)&&this._requestRender()}get plugins(){return this._plugins}commit(e,t){return this._isRendering&&console.warn("Renderer.modify called while rendering"),!!super.commit(e,t,this._plugins.context)&&(this.updateHasFlags(),!0)}addRenderer(e){this._plugins.add(e)}removeRenderer(e){this._plugins.remove(e)}get occludedRequiresStencil(){return this._occludedRequiresOccludeeStencil||this.occludedRequiresIntegratedMeshStencil}get _occludedRequiresOccludeeStencil(){return this._bindParameters.hasOccludees&&!!(8&this.plugins.renderOccludedFlags)}get occludedRequiresIntegratedMeshStencil(){return this._plugins.produces(0,0)&&this._plugins.produces(0,9)}updateHasFlags(){const has=this._pluginsHas;has.occludedHudElements=this._plugins.produces(0,13),has.hudElements=has.occludedHudElements||this._plugins.produces(0,...Ae),has.water=this._plugins.produces(4,19),this._bindParameters.hasOccludees=this._plugins.hasOccludees,this._requestRender()}updateAnimation(e,t){this._animationTimer??=new W(e.camera,t),this._animationTimer.advance(e.camera,t,this._animationTimeDilation);const s=this._hasAnimations;return this._hasAnimations=this._plugins.updateAnimation(this._animationTimer),this._hasAnimations=this._nodes.updateAnimation(this._animationTimer)||this._hasAnimations,this._hasAnimations!==s&&(this._gpuTimerHandle=s?i(this._gpuTimerHandle):this.performanceInfo.enableGPUPerformanceInfo()),this._hasAnimations}get animationTimestep(){return this._animationTimestep.value}get _animationTimeDilation(){return this._animationTimestep.timeDilation}resetAnimation(){this._animationTimestep.clear()}tick(){this.fboCache.clean()}render(e,t,s=!1){try{return this._isRendering=!0,this._render(e,t,s)}catch(i){console.error(`Exception during rendering: ${i}:\n${i.stack}`)}finally{this._isRendering=!1}return new oe(this._pluginInput.get(O.FINAL),null)}_render(e,t,s){const i=0===t;this.performanceInfo.startFrame(),this.fboCache.frameStart(),this.fboCache.interactive=i,this._disposeBindBuffers();const{camera:r,contentCamera:a,mode:o,alignPixelEnabled:d}=e;this._state.value=o,this._bindParameters.output=0,this._bindParameters.emissions=this._emissions,this._bindParameters.alignPixelEnabled=d,this._bindParameters.decorations=!s,this._bindParameters.mainDepth=null,this._bindParameters.useFloatBlend.value=this.hasFloatBlend;const l=!s||!this._sliceHelper.isDecoration;this._bindParameters.slicePlane=l?this._sliceHelper.plane:null,this._bindParameters.viewshedEnabled=this._nodes.produces(R.VIEWSHED),this._bindParameters.cutFillComputationEnabled=this._nodes.produces(R.CUTFILL_COMPUTATION),this._bindParameters.cutFillVisualizationEnabled=this._nodes.produces(R.CUTFILL_COLOR),this._renderOverlay(),r.setGLViewport(this._rctx);const u=this._framebuffer,m=u.initialize(r.fullWidth,r.fullHeight,this._backgroundColor),_=this._needsLastFrameColor;_?(m?.retain(_-1),m?.setName("last frame color"),this._bindParameters.reprojection.lastFrameColor=m):m?.release(),this._ensureBindParameters(r,a),this._plugins.sortTestsTransparentOrderedSlots(Te),this._plugins.prepareRender(),this._bindParameters.hasShadowHighlights=this._needsShadowHighlight&&!s,this._shadowAccumulator.fullyRecompute=!i,this._shadowAccumulator.updateCamera(r),this._hasTransparentGeometry=this._plugins.produces(0,...ge),this._precompilePrepasses(),this.performanceInfo.advance(le.PREPARE);const p=this._computeShadowDepthRange(r);this._pluginInput.set("normals",this._renderNormals()),this._renderAmbientIlluminationAndDepth(),this._renderShadowMap(r,a,this._bindParameters.lighting.mainLight.direction,p),this._renderShadowAccumulation(p),u.bind(),this._bindParameters.mainDepth=u.depth.attachment,this._precompileShaders(i),this._bindParameters.output=0,this._renderOpaque(),this._renderPreTransparent(),this._renderTransparent(),this.hasReflections&&(this._bindParameters.depth=h(this._bindParameters.depth),this._bindParameters.reprojection.lastFrameColor=h(this._bindParameters.reprojection.lastFrameColor)),this._bindParameters.shadowMap.disposeOutput(5),u.update(e=>this._renderNodes(R.CUTFILL_COMPUTATION,e)),this._pluginInput.set(R.FOCUSAREA,this._renderFocusAreaGeometry()),u.update(e=>this._renderNodes(R.TRANSPARENT_ENVIRONMENT,e)),u.update(e=>this._renderNodes(R.VIEWSHED,e)),u.update(e=>this._renderNodes(R.LASERLINES,e)),this._nodes.requireGeometryDepth&&(this._bindParameters.depth=h(this._bindParameters.depth)),u.update(e=>this._renderNodes(R.FOCUSAREA_COLOR,e)),u.update(e=>this._renderNodes(R.CUTFILL_COLOR,e)),this._pluginInput.release(R.FOCUSAREA),this._pluginInput.release(R.GROUND_DEPTH),u.update(e=>this._renderNodes(R.OCCLUDED,e)),this._pluginInput.set("highlights",this._renderHighlightPrepass());const c=2===t?this._renderObjectAndLayerIdColor():null;u.update(e=>this._renderNodes(O.COMPOSITE,e)),this._bindParameters.shadowMap.disposeOutputs(),this._bindParameters.shadowHighlight=n(this._bindParameters.shadowHighlight),u.update(e=>this._renderNodes(R.ANTIALIASING,e));const f=this._hasTransparentGeometry?2:1,b=this._bindParameters.emissions;let g;return this._bindParameters.emissions=0,this._hasHUDHighlights&&u.update(e=>this._renderHUD(f,e)),u.update(e=>this._renderNodes(R.HIGHLIGHT_COLOR,e)),this._hasHUDHighlights||u.update(e=>this._renderHUD(f,e)),this._bindParameters.emissions=b,u.update(e=>this._renderNodes(R.MAGNIFIER,e)),u.update(e=>this._renderNodes(O.FINAL,e)),i&&this._blit.toFramebuffer(u.color,this._bindParameters),this.hasGlobalIllumination&&(this._bindParameters.reprojection.lastFrameDepth=this._bindParameters.depth,0!==this._emissions&&(this._bindParameters.reprojection.lastFrameEmission=u.color.obtainAttachment(ue))),this._testsNeedsDepth&&(this._bindParameters.depth=h(this._bindParameters.depth)),this._releaseFBOs(),u.releaseDepth(),this._bindParameters.reprojection.lastFrameCamera.copyFrom(this._bindParameters.camera),this.fboCache.frameEnd(),i||(g=u.color,g.retain(),this._releaseFBOs(),this._disposeOffscreenBuffers()),this.performanceInfo.finishFrame(),new oe(g,c)}_precompileShaders(e){++this._plugins.context.techniques.precompiling;const t=this._bindParameters;t.output=0;const s=t.emissions;if(this._precompileOpaqueGeometry(),this._nodes.precompile(t.hasOpaqueEmission,R.OPAQUE_ENVIRONMENT,R.GAUSSIAN_SPLAT,R.OPAQUE_OCCLUSION_QUERY,R.VOXEL),this._precompileOpaqueGeometry(),t.output=3,this._plugins.precompile(...Pe),t.output=0,this._plugins.precompile(...Pe),this._hasTransparentGeometry){const e=this._pluginsHas.occludedHudElements;this._oitBlend.precompile(t,e,0),this._pluginsHas.hudElements&&this._oitBlend.precompile(t,!1,1),this._precompileTransparentGeometry(),t.hasTransparentEmission&&(t.emissions=3)}this._nodes.precompile(t.hasOpaqueEmission,R.FOCUSAREA),this._compositor.precompile(this._usesPremultipliedAlphaBlit,!!this._needsEdges,t),this._hasTransparentGeometry||this._plugins.precompile(15),this._nodes.precompile(t.hasOpaqueEmission,R.TRANSPARENT_ENVIRONMENT,R.VIEWSHED,R.CUTFILL_COMPUTATION,R.CUTFILL_COLOR,R.LASERLINES,R.FOCUSAREA_COLOR,R.OCCLUDED,R.ANTIALIASING),t.highlightMixTexture=t.highlights.length>1?this._rctx.emptyTexture:null,this._precompileHUD(0),t.emissions=0,this._precompileHUD(0),this._precompileHUD(1),t.emissions=s,this._hasHighlights&&(t.highlights.forEach((e,s)=>{t.highlightLevel=s,this._precompileAllGeometry(10),this._hasHUDHighlights&&this._plugins.precompile(13,12)}),t.highlightLevel=null,this._nodes.precompile(t.hasOpaqueEmission,R.HIGHLIGHT_COLOR)),t.highlightMixTexture=null,this._nodes.precompile(t.hasOpaqueEmission,O.COMPOSITE,R.MAGNIFIER),this._shadowAccumulator.precompile(),this._plugins.precompile(8),t.hasOpaqueEmission&&(t.transparentWithoutDepthEmissionDimmingPass=!0,this._plugins.precompile(8),t.transparentWithoutDepthEmissionDimmingPass=!1),e&&this._blit.precompile(),--this._plugins.context.techniques.precompiling}_renderFocusAreaGeometry(){const e=this._nodes.produce(R.FOCUSAREA,this._pluginInput);return e&&this.performanceInfo.advance(le.FOCUS_AREA_MASK),e}_renderObjectAndLayerIdColor(){if(!this._nodes.produces(R.OBJECT_AND_LAYER_ID_COLOR))return null;const e=this._bindParameters.output;++this._techniques.precompiling;const{width:t,height:s}=this._framebuffer.size;let i=this.fboCache.acquire(t,s,R.OBJECT_AND_LAYER_ID_COLOR).acquireDepth(14);return i=this._renderNodes(R.OBJECT_AND_LAYER_ID_COLOR,i),--this._techniques.precompiling,this._bindParameters.output=e,i}finish(e){this._hasAnimations||this._animationTimestep.clear();const t=this.performanceInfo.gpuSamplingEnabled,s=0===e;if(s||t){const e=s?this.performanceInfo.elapsedTime:0;let i=0;t?i=this.performanceInfo.totalGPUTimeSampler.last:this._rctx.gl.finish();const r=Math.max(e,i);this._animationTimestep.frame(r,s)}}readMainDepth(e,t){const{mainDepth:s,camera:i}=this._bindParameters;if(!s)return;const r=this.fboCache.acquire(this._framebuffer.size.width,this._framebuffer.size.height,"linear depth");this._rctx.bindFramebuffer(r.fbo),i.setGLViewport(this._rctx),this._rctx.setScissorRect(e[0],e[1],e[2],e[3]),this._rctx.setScissorTestEnabled(!0),this._rctx.clearFramebuffer(C),this._compositor.blitDepthToLinearDepth(this._bindParameters,s),this._rctx.setScissorTestEnabled(!1),this._rctx.setScissorRect(0,0,this._rctx.gl.canvas.width,this._rctx.gl.canvas.width),r.fbo?.readPixels(e[0],e[1],e[2],e[3],6408,me.UNSIGNED_BYTE,t),r.release()}readAccumulatedShadow(e){return this._shadowAccumulator.readAccumulatedShadow(e[0],e[1])}get _needsEdges(){return this._edgeView?.shouldRender()?this._edgeView:null}_renderEdges(e){const t=this._needsEdges;if(!t)return;const{width:s,height:i}=this._framebuffer.size,r=this.fboCache.acquire(s,i,"edges");r.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(r.fbo),this._rctx.clearFramebuffer(C),t.render(this._bindParameters,e),r.detachDepth(),this._framebuffer.bind(),this._compositor.composite(this._bindParameters,r.getTexture()),r.release(),this.performanceInfo.advance(1===e?le.OPAQUE_EDGES:le.TRANSPARENT_EDGES)}_renderOverlay(){this._bindParameters.overlay=this.overlay?.render(this._renderContext.time),this._bindParameters.overlay&&this.performanceInfo.advance(le.OVERLAY)}_renderShadowMap(e,t,s,i){if(!this.shadowsEnabled)return;const r=this._bindParameters.shadowMap;if(r.start(e,s,i,this.isFeatureEnabled(5),this.stage.view.qualitySettings.maximumPixelRatio),this._needsShadowHighlight){this._renderShadowCascades(6,r),e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,t);const s=this._bindParameters.output;this._bindParameters.output=0,this._bindParameters.shadowHighlight=this._nodes.produce(R.SHADOW_HIGHLIGHT,this._pluginInput),this._bindParameters.output=s,r.disposeOutput(6),r.clear(),this._renderShadowCascades(7,r)}else this._renderShadowCascades(5);e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,this._bindParameters.contentCamera),this._needsShadowHighlight&&(this._bindParameters.depth=h(this._bindParameters.depth)),this.performanceInfo.advance(R.SHADOWMAP)}_precompileShadowCascades(e){0!==this._bindParameters.shadowMap.cascades.length&&this._precompileAllGeometry(e)}_renderShadowCascades(e,t=this._bindParameters.shadowMap){const s=this._bindParameters.output,i=t===this._bindParameters.shadowMap&&6!==e;t.bindFramebuffer();for(const r of t.cascades)r.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(r.camera,r.camera),this.renderAllGeometry(e),i&&this._renderShadowNodes();t.finish(e),this._bindParameters.output=s}_renderShadowNodes(){const e=this._bindParameters.shadowMap.renderTarget;e&&(this._renderNodes(R.SHADOWMAP,e),this._pluginInput.set(R.SHADOWMAP,null))}get _needsLastFrameColor(){return+this.hasReflections+ +this.hasGlobalIllumination}get _needsDepth(){return+this._nodes.requireGeometryDepth+ +this.hasReflections+ +this.hasGlobalIllumination+ +this._shadowAccumulator.requiresDepth+ +this._testsNeedsDepth+ +this._needsShadowHighlight}get _usesPremultipliedAlphaBlit(){return this._pluginsHas.hudElements}_renderAmbientIlluminationAndDepth(){this._bindParameters.depth=n(this._bindParameters.depth);const e=this._pluginInput.get("normals");if(e){this._pluginInput.set(R.AMBIENT_ILLUMINATION,this._hasGlobalIlluminationFlag?this._renderGlobalIllumination():this._renderSSAO());const t=this._needsDepth;t?(this._rctx.bindFramebuffer(e.fbo),this._rctx.clear(1024),this._renderGeometryWithoutNormals(3),this._bindParameters.depth=e.obtainDepthTexture(),this._bindParameters.depth?.retain(t-1),this.performanceInfo.advance(le.DEPTH)):e.detachDepth(),this.hasAmbientIllumination&&this._pluginInput.release("normals")}else this._hasGlobalIlluminationFlag&&(this._releaseGlobalIlluminationBuffers(),this._bindParameters.globalIlluminationEnabled=this._keepGlobalIlluminationShadingAlive),this._renderAllGeometryDepth()}_renderAllGeometryDepth(){const e=this._needsDepth;if(0===e)return;const{width:t,height:s}=this._framebuffer.size,i=this.fboCache.acquire(t,s,"geometry depth",14);this._rctx.bindFramebuffer(i.fbo),this._rctx.clear(1280),this.renderAllGeometry(3),this._bindParameters.depth=i.obtainDepthTexture(),this._bindParameters.depth?.retain(e-1),i.release(),this.performanceInfo.advance(le.DEPTH)}get _needsShadowDepthRange(){return this._bindParameters.shadowMap.enabled||this._shadowAccumulator.active}_computeShadowDepthRange(e){if(!this._needsShadowDepthRange)return J.Zero;const t=X(e,this._plugins.plugins,this.stage.layers,0);return t.union(this._plugins.queryDepthRange(e)),this._bindParameters.shadowMap.enabled&&t.union(this._nodes.queryDepthRange(R.SHADOWMAP,e)),t.near=Math.max(e.near,t.near),t.far=Math.min(e.far,t.far),t}updateSceneDepthRange(e){if(!this.stage.view.state.isGlobal)return void(this.sceneDepthRange.value=J.Infinite);if((this.stage.view.renderCoordsHelper?.getAltitude(e.eye)??0)<U)return void(this.sceneDepthRange.value=J.Infinite);const t=e.clone();t.near=N,t.far=1e10;const s=X(t,this._plugins.plugins,this.stage.layers,1);s.union(this._plugins.queryDepthRange(t)),this.sceneDepthRange.value.equals(s)||(this.sceneDepthRange.value=s)}get _normalsRequired(){return this._nodes.require("normals",...S,R.VIEWSHED,R.LASERLINES)+(this.hasAmbientIllumination?1:0)}_precompilePrepasses(){this._normalsRequired?(this._precompilePlugins(4,we),this._needsDepth&&this._precompilePlugins(3,Ee)):this._needsDepth&&this._precompileAllGeometry(3),this.shadowsEnabled&&(this._needsShadowHighlight?(this._nodes.precompile(this._bindParameters.hasEmission,R.SHADOW_HIGHLIGHT),this._precompileShadowCascades(6),this._precompileShadowCascades(7)):this._precompileShadowCascades(5)),this._shadowAccumulator.active&&(this._shadowAccumulator.precompilePrepass(),this._precompileAllGeometry(5)),this.hasAmbientIllumination&&this._normalsRequired&&this._nodes.precompile(this._bindParameters.hasEmission,R.AMBIENT_ILLUMINATION)}_renderNormals(){const e=this._normalsRequired;if(0===e)return;const{width:t,height:s}=this._framebuffer.size,i=this.fboCache.acquire(t,s,"normals",5);i.acquireDepth(14),this._rctx.bindFramebuffer(i.fbo),this._rctx.clearFramebuffer(C,!0,!0),this._bindParameters.output=4,this._plugins.render(...we);const r=this._nodes.optional("normals",...S,R.VIEWSHED);return i.retain(e+r-1),this.performanceInfo.advance(le.NORMALS),i}_renderSSAO(){this._bindParameters.globalIlluminationEnabled=!1;const e=this._pluginInput.get("normals");return this.hasAmbientIllumination&&e?(this._bindParameters.ssao=this._nodes.produce(R.AMBIENT_ILLUMINATION,this._pluginInput),this._bindParameters.ssao&&this.performanceInfo.advance(le.AMBIENT_ILLUMINATION),this._bindParameters.ssao):null}_renderGlobalIllumination(){if(!this.hasGlobalIllumination)return this._releaseGlobalIlluminationBuffers(),this._bindParameters.globalIlluminationEnabled=this._keepGlobalIlluminationShadingAlive,null;const e=this._nodes.produce(R.AMBIENT_ILLUMINATION,this._pluginInput);return this._releaseGlobalIlluminationBuffers(),this._bindParameters.globalIllumination=e,this._bindParameters.globalIlluminationEnabled=!0,this.performanceInfo.advance(this.hasGlobalIlluminationHighQuality?le.AMBIENT_ILLUMINATION_HIGH_QUALITY:le.AMBIENT_ILLUMINATION),e}_releaseGlobalIlluminationBuffers(){const e=this._bindParameters;e.reprojection.lastFrameColor=h(e.reprojection.lastFrameColor),e.reprojection.lastFrameDepth=h(e.reprojection.lastFrameDepth),e.reprojection.lastFrameEmission=h(e.reprojection.lastFrameEmission),e.globalIllumination=h(e.globalIllumination),e.globalIlluminationEnabled=!1}_precompileAllGeometry(e){const t=this._bindParameters.output;this._bindParameters.output=e,this._precompileOpaqueGeometry(),this._precompileTransparentGeometry(),this._plugins.precompile(...Pe),this._bindParameters.output=t}renderAllGeometry(e){this._bindParameters.output=e,this._renderOpaqueAndTransparentGeometry(e),this._renderTransparentGround()}precompileSlots(e,...t){for(const s of t)this._bindParameters.slot=s,e.precompile(this._renderContext)}precompileOccludedSlots(e,t){for(const s of t)this._renderContext.renderOccludedMask=s,this.precompileSlots(e,...Ie);this._renderContext.renderOccludedMask=ee}renderSlots(e,...t){for(const s of t)this._bindParameters.slot=s,e.forAll(e=>{const t=e.acquireTechniques(this._renderContext);t&&e.render(this._renderContext,t)})}renderOccludedSlots(e,t){this._renderContext.renderOccludedMask=t,this.plugins.renderOccludedFlags>1&&this._plugins.render(9),this.renderSlots(e,...Ie),this._renderContext.renderOccludedMask=ee}renderHUD(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(...Oe[e])}_renderHUDElements(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(16),this.renderHUD(e),this._bindParameters.hudRenderStyle=e,this._plugins.render(14)}precompileViewshedShadowMap(){this._precompileAllGeometry(8)}precompileCutFillOrthographicReferenceDepth(){this._precompilePlugins(9,Re)}_precompilePlugins(e,t){const s=this._bindParameters.output;this._bindParameters.output=e,this._plugins.precompile(...t),this._bindParameters.output=s}renderViewshedShadowMap(e){const{camera:t,contentCamera:s}=this._bindParameters,i=this._bindParameters.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this.renderAllGeometry(8),this._ensureBindParametersCamera(t,s),this._bindParameters.camera.setGLViewport(this._rctx),this._bindParameters.output=i}renderCutFillOrthographicReferenceDepth(e){const{camera:t,contentCamera:s}=this._bindParameters,i=this._bindParameters.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this._bindParameters.output=9,this._plugins.render(...Re),this._ensureBindParametersCamera(t,s),t.setGLViewport(this._rctx),this._bindParameters.output=i}get _needsGroundDepth(){return this._bindParameters.cutFillVisualizationEnabled}_blitGroundDepth(){if(!this._needsGroundDepth)return null;const{width:e,height:t}=this._framebuffer.size,s=this.fboCache.acquire(e,t,R.GROUND_DEPTH,14);return this._rctx.blitFramebuffer(this._framebuffer.color.fbo,s.fbo,256),this._framebuffer.bind(),s}_renderOpaqueAndTransparentGeometry(e){this._bindParameters.output=e,this._renderOpaqueGeometry(),this._renderTransparentGeometry()}_renderGeometryWithoutNormals(e){this._bindParameters.output=e,this._plugins.render(...Ee)}_precompileOpaqueGeometry(){this._needsOpaquePass&&(this._plugins.precompile(...be),this._nodes.precompile(this._bindParameters.hasEmission,"opaque-color"))}_renderOpaqueGeometry(){this._plugins.render(...be)}_renderTransparentGeometry(){this._plugins.render(...ge),this._hasTransparentGeometry&&this._plugins.render(15)}_renderTransparentGround(){this._plugins.render(...Pe)}_precompileHUD(e){if(!this._pluginsHas.hudElements)return;const t=this._bindParameters.output,s=this._bindParameters.hudRenderStyle,i=this._bindParameters.emissions;this._bindParameters.emissions=0,this._bindParameters.hudRenderStyle=e,this._bindParameters.output=1,this._plugins.precompile(...Ae),this._bindParameters.output=2,this._plugins.precompile(...Ae),this._bindParameters.output=0,this._oitBlend.precompile(this._bindParameters,!1,1),this._hasHighlights&&(this._bindParameters.output=10,this._plugins.precompile(...Ae)),this._bindParameters.emissions=i,this._bindParameters.output=t,this._bindParameters.hudRenderStyle=s}_renderHUD(e,t){if(!this._pluginsHas.hudElements)return t;const s=this._renderOIT(1,e);this._rctx.bindFramebuffer(t.fbo);const i=!!t.getTexture(ue);return this._compositor.compositePreMultipliedAlpha(this._bindParameters,s.getTexture(),i),s.release(),this.performanceInfo.advance(0===e?le.HUD_OCCLUDED:le.HUD),t}get _needsShadowHighlight(){return this.shadowsEnabled&&this._plugins.produces(6,2)}_renderHighlightPrepass(){if(!this._hasHighlights)return;const{fboCache:e,_rctx:t,_bindParameters:s}=this,{width:i,height:r}=this._framebuffer.size,{highlights:a}=s,n=a.length>B?3:1,h=e.acquire(i,r,"highlights",n);h.acquireDepth(14);const o=this._plugins.produces(10,0);return o&&this._framebuffer.color.fbo&&h.fbo&&t.blitFramebuffer(this._framebuffer.color.fbo,h.fbo,1024),t.bindFramebuffer(h.fbo),t.gl.clearBufferuiv(6144,0,[0,0,0,0]),o||t.clear(1024),this._bindParameters.output=10,t.bindFramebuffer(h.fbo),V(t,e,i,r,s,()=>this._renderHighlightGeometries()),h.detachDepth(),this.performanceInfo.advance(le.HIGHLIGHTS),h.retain(this._nodes.require("highlights",...D)+this._nodes.optional("highlights",...D)-1),h}_renderHighlightGeometries(){this._plugins.render(...Ce),this._rctx.clear(256),this._renderHUDElements(2)}_renderShadowAccumulation(e){this._shadowAccumulator.updateDepthRange(e);const t=this._shadowAccumulator.requiresDepth;this._bindParameters.output=0,this._shadowAccumulator.renderAccumulation(this._bindParameters)&&this.performanceInfo.advance(le.ACCUMULATED_SHADOWS),this._shadowAccumulator.updateMask(),t&&(this._bindParameters.depth=h(this._bindParameters.depth))}_precompileTransparentGeometry(){y(this._bindParameters.output)?(this._bindParameters.output=1,this._plugins.precompile(...ge),this._hasTransparentGeometry&&this._plugins.precompile(15),this._bindParameters.output=2,this._plugins.precompile(...ge),this._hasTransparentGeometry&&this._plugins.precompile(15),this._bindParameters.output=0):this._plugins.precompile(...ge)}_renderOIT(e,t=2){const s=1===e,{width:i,height:r}=this._framebuffer.size,a=s?()=>this._renderHUDElements(t):()=>this._renderTransparentGeometry(),h=this._bindParameters,o=h.useFloatBlend.value?8:5,d=h.output;h.output=1;const l=s?"oit hud":"oit",u=this.fboCache.acquire(i,r,l,o).acquireColor(ue,this.hasFloatBlend?7:0,"oit alpha"),m=h.hasEmission&&(0===e||1!==t);m&&u.acquireColor(_e,o,"oit emissive"),s||u.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(u.fbo),this._rctx.clearFramebuffer(K),m&&this._rctx.clearBuffer(2,K),a(),u.detachDepth(),h.output=2;const _=this.fboCache.acquire(i,r,s?"oit front hud":"oit front");m&&_.acquireColor(ue,o,"oit front emissive"),s?_.acquireDepth(this._hudDepthFormat):_.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(_.fbo),this._rctx.clearFramebuffer(C,s),a(),_.detachDepth();const p=this._pluginsHas.occludedHudElements&&!s,c=p&&0!==h.emissions?_e:ue;let f;return h.hudOcclusion=n(this._bindParameters.hudOcclusion),h.output=0,s?(f=this.fboCache.acquire(i,r,"oit composite hud"),this._rctx.bindFramebuffer(f.fbo),this._rctx.setClearColor(0,0,0,1e-13),this._rctx.clear(16384)):(0!==h.emissions&&this._framebuffer.ensureEmissionAttachment(),p&&(this._framebuffer.color.acquireColor(c,0,"hud occlusion"),this._rctx.clearBuffer(c-pe,C)),this._framebuffer.bind()),this._oitBlend.blend(this._rctx,u,_,h,p,e,this._fboCache.debugCallback),f?.detachDepth(),s||(m&&(this._bindParameters.emissions=3),p&&(h.hudOcclusion=this._framebuffer.color.obtainAttachment(c))),_.release(),u.release(),h.output=d,f}get _hudDepthFormat(){return this.isFeatureEnabled(7)?14:13}get _needsOpaquePass(){return this.plugins.produces(0,...be)||this.plugins.produces(5,...be)||this.plugins.produces(3,3)}_renderOpaque(){const e=this._needsOpaquePass;e&&(this._plugins.render(0,1),this._pluginInput.set(R.GROUND_DEPTH,this._blitGroundDepth()),this._plugins.render(2,3));const t=this._framebuffer;t.update(t=>this._renderNodes(O.OPAQUE,t,e)),this.fboCache.debugCallback?.(O.OPAQUE,t.color.fbo),t.update(e=>this._renderNodes(R.OPAQUE_ENVIRONMENT,e)),this.fboCache.debugCallback?.(R.OPAQUE_ENVIRONMENT,t.color.fbo),this._renderEdges(1)}_renderPreTransparent(){this._framebuffer.update(e=>this._renderNodes(R.GAUSSIAN_SPLAT,e)),this.fboCache.debugCallback?.(R.GAUSSIAN_SPLAT,this._framebuffer.color.fbo),this._framebuffer.update(e=>this._renderNodes(R.OPAQUE_OCCLUSION_QUERY,e)),this.fboCache.debugCallback?.(R.OPAQUE_OCCLUSION_QUERY,this._framebuffer.color.fbo),this._framebuffer.update(e=>this._renderNodes(R.VOXEL,e)),this.fboCache.debugCallback?.(R.VOXEL,this._framebuffer.color.fbo)}_renderTransparent(){const e=this._framebuffer;this._renderHiddenTransparentEdges(),this._hasTransparentGeometry&&this._renderOIT(0),e.update(e=>this._renderNodes(O.TRANSPARENT,e,this._hasTransparentGeometry)),this.fboCache.debugCallback?.(O.TRANSPARENT,e.color.fbo),this._hasTransparentGeometry||this._plugins.render(15),this._renderEdges(0),this._bindParameters.ssao=n(this._bindParameters.ssao),e.update(e=>this._renderNodes(R.TRANSPARENT_NO_DEPTH,e)),this.fboCache.debugCallback?.(R.TRANSPARENT_NO_DEPTH,e.color.fbo),this._renderTransparentMaterialWithoutDepth()}_renderTransparentMaterialWithoutDepth(){if(this._framebuffer.bind(),this._plugins.render(8),this._bindParameters.hasEmission){const e=this._rctx.setDrawBuffers([ce,ue]);this._bindParameters.transparentWithoutDepthEmissionDimmingPass=!0,this._plugins.render(8),this._bindParameters.transparentWithoutDepthEmissionDimmingPass=!1,this._rctx.setDrawBuffers(e)}this.performanceInfo.advance(le.TRANSPARENT_MATERIAL_WITHOUT_DEPTH)}_renderNodes(e,t,s=!1){if(t.setName(e),this._pluginInput.set(e,t),!this._nodes.produces(e))return s&&this.performanceInfo.advance(e),t;const i=this._nodes.render(t,this._pluginInput,this._releaseNodeInputs);return this.performanceInfo.advance(e),this._fboCache.debugCallback?.(e,i.fbo),i}_ensureBindParameters(e,t){this._ensureBindParametersCamera(e,t),this._ensureBindParametersWeatherFader(),this._ensureBindParametersScreenSpaceReflections(),this._ensureBindParametersReprojection()}_ensureBindParametersCamera(e,t){this._bindParameters.camera=e,this._bindParameters.contentCamera=t}_ensureBindParametersWeatherFader(){1===this.stage.viewingMode&&(this._bindParameters.clouds.data&&(this._bindParameters.clouds.fade(this._bindParameters.camera,this.renderContext.time,this.stage.view.qualitySettings.fadeDuration),this.weatherFader?.cleanupCubemap()),this._bindParameters.snowCover=this.weatherFader?.snowCover??0)}_ensureBindParametersScreenSpaceReflections(){const{time:e}=this.renderContext,{screenSpaceReflections:t}=this._bindParameters;if(this.hasReflections){null==this._ssrEnableTime&&(this._ssrEnableTime=e);const s=this.stage.view.qualitySettings.fadeDuration;t.fadeFactor=s>0?Math.min(s,e-this._ssrEnableTime)/s:1,t.fadeFactor<1&&this._requestRender()}else this._ssrEnableTime=null}_ensureBindParametersReprojection(){if(!(this.hasReflections||this.hasGlobalIllumination))return void(this._reprojectionMatrix=w);const{reprojection:e,camera:t}=this._bindParameters,{lastFrameCamera:s}=e,i=!s.equals(t);if(i?(b(Ne,t.viewMatrix),b(De,t.projectionMatrix),g(Fe,Ne,De),g(Fe,s.viewMatrix,Fe),g(Fe,s.projectionMatrix,Fe),this._reprojectionMatrix=Fe):this._reprojectionMatrix=w,this.hasGlobalIllumination){const{viewMatrix:t}=e;i?(g(Ge,s.viewMatrix,Ne),P(t,Ge)):P(t,w)}}addRenderNode(e){this._nodes.add(e),this._requestRender()}removeRenderNode(e){this._nodes.remove(e),this._requestRender()}updateLighting(e,t,s,i){this._bindParameters.updateLighting(e,t,s,i),this._requestRender(1)}get usedMemory(){return{fbos:this.fboCache.usedMemory,plugins:this._plugins.usedMemory,edges:this.edgeView?.usedMemory??0,clouds:this.weatherFader?.usedMemory??0}}get test(){}};e([p()],fe.prototype,"_inGlobeView",void 0),e([p({readOnly:!0})],fe.prototype,"highResolutionAtmosphere",null),e([p()],fe.prototype,"_edgeView",void 0),e([p()],fe.prototype,"updating",null),fe=e([c("esri.views.3d.webgl-engine.lib.Renderer")],fe);const be=[0,1,2,3],ge=[7,6,4,5],Pe=[7,6],we=[0,1,2,4,...Pe],Ee=[3,5],Ie=[2,4,8],Ae=[16,12,14,13],Ce=[4,5,2,3,0,1,...Pe],Te=[4,8,5,11],Oe={0:[13],1:[12],2:[13,12],3:[13,12]},Re=[0,1,...Pe],Se=["normals","highlights"],De=E(),Ne=E(),Fe=E(),Ge=E();function He(e){return t=>e.immediate.schedule(t)}export{fe as Renderer};
|
|
2
|
+
import{__decorate as e}from"tslib";import{update as t}from"../../../../core/arrayUtils.js";import{createTask as s}from"../../../../core/asyncUtils.js";import has from"../../../../core/has.js";import{removeMaybe as i,abortMaybe as r,destroyMaybe as a,releaseMaybe as n,releaseReferencedMaybe as h}from"../../../../core/maybe.js";import{throwIfAborted as o}from"../../../../core/promiseUtils.js";import{watch as d,syncAndInitial as l,initial as u,sync as m}from"../../../../core/reactiveUtils.js";import{signal as _}from"../../../../core/signal.js";import{property as p,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{equals as f,invert as b,multiply as g,copy as P}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as w,create as E}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as I}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{fromValues as A,ZEROS as C}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{pruneIndexArrays as T}from"../../../../geometry/support/Indices.js";import{RenderNodeOutput as O,InternalRenderCategory as R,AllRenderNodeOutputs as S,AllInternalRenderNodeOutputs as D}from"../../webgl.js";import{minNearDistanceInMeters as N}from"../../state/NearFarHeuristic.js";import{debugFlags as F}from"../../support/debugFlags.js";import{computeShadowsEnabled as G}from"../../support/sunUtils.js";import{FBOCache as x}from"../core/FBOCache.js";import{RenderPassManager as H}from"../core/renderPasses/RenderPassManager.js";import{isColor as y}from"../core/shaderLibrary/ShaderOutput.js";import{distanceFadeEnd as v}from"../core/shaderLibrary/shading/ScreenSpaceConstants.js";import{RenderNodes as M}from"../effects/RenderNodes.js";import{RenderPluginManager as L}from"../effects/RenderPluginManager.js";import{WeatherFader as q}from"../effects/WeatherFader.js";import{innerAtmosphereFadeStart as j}from"../effects/atmosphere/atmosphereUtils.js";import{Blit as U}from"../effects/blit/Blit.js";import{maxHighlightsPerChannel as B,renderHighlightBuffer as V}from"../effects/highlight/Highlight.js";import{OITBlend as k}from"../effects/transparency/OITBlend.js";import{AnimationTimer as W}from"./AnimationTimer.js";import{AnimationTimeStep as Q}from"./AnimationTimeStep.js";import{BoundingInfo as z}from"./BoundingInfo.js";import{Compositor as Y}from"./Compositor.js";import{DepthRange as J}from"./DepthRange.js";import{depthRangeFromScene as X}from"./depthRangeUtils.js";import{MainFramebuffer as $}from"./MainFramebuffer.js";import{NavigationDepthCache as K}from"./NavigationDepthCache.js";import{blendingColorAlphaClear as Z}from"./OrderIndependentTransparency.js";import{RenderContext as ee,defaultRenderOccludedMask as te}from"./RenderContext.js";import{RendererBase as se}from"./RendererBase.js";import{setupFeatureDefaults as ie}from"./RenderFeature.js";import{RenderPluginInput as re}from"./RenderPluginInput.js";import{ShadowAccumulator as ae}from"./ShadowAccumulator.js";import{ShadowMap as ne}from"./ShadowMap.js";import he from"./SliceHelper.js";import{MergedRenderer as oe}from"../materials/renderers/MergedRenderer.js";import{RenderSceneResult as de}from"../parts/renderUtils.js";import{RendererPerformanceInfo as le,PerformanceCategory as ue}from"../statistics/RendererPerformanceInfo.js";import{ColorAttachment1 as me,PixelType as _e,ColorAttachment2 as pe,ColorAttachment0 as ce,DrawBufferNone as fe}from"../../../webgl/enums.js";const be=has("disable-feature:async-navigation-3d-depth-readback");let ge=class extends se{constructor(e,t,s,i,r){super({stage:e}),this._techniques=s,this._rctx=i,this._requestRender=r,this._pluginsHas={occludedHudElements:!1,hudElements:!1,water:!1},this.renderPassManager=new H,this._isRendering=!1,this._inGlobeView=!1,this._backgroundColor=A(0,0,0,1),this._sliceHelper=new he,this.sceneDepthRange=_(J.Infinite),this._state=_(2),this._hasGlobalIlluminationFlag=!!has("global-illumination"),this._hasAnimations=!1,this._animationTimestep=new Q,this._loadEdgeViewTask=null,this._edgeViewCallbacks=[],this._reprojectionMatrixVersion=_(0),this._renderHiddenTransparentEdges=()=>{},this._pluginInput=new re,this._hasTransparentGeometry=!1,this._releaseNodeInputs=e=>{for(const t of Ne)e.some(({name:e})=>e===t)&&this._pluginInput.release(t)},this._testsNeedsDepth=!1,this._fboCache=new x(i),this._compositor=new Y(i,s),this._renderStateFeatures=_(ie(e.view.qualityProfile));const a=new ne(this._fboCache,e.viewingMode);this._renderContext=new ee(this._rctx,a,s),this._framebuffer=new $(this._fboCache,this._bindParameters),this._performanceInfo=new le(this._rctx),this._blit=new U(s),this.navigationDepthCache=new K(this._rctx,this._fboCache,s,()=>this._requestRender(0)),this._shadowAccumulator=new ae(this.fboCache,s,e,(t,s,i)=>{const r=e.view.qualitySettings.maximumPixelRatio;t.shadowMap.start(t.camera,s,i,!0,r),this._renderShadowCascades(5,t.shadowMap),t.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(t.camera,t.contentCamera)},r),this._nodes=new M(this._renderContext),this._plugins=new L({renderContext:this._renderContext,techniques:s,materials:t,requestRender:r,controller:e}),this._plugins.add(this.renderPassManager),this.weatherFader=new q({view:e.view,context:this._renderContext}),this.addHandles([d(()=>e.view.state.camera,()=>r(),l),d(()=>F.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES,e=>{this._renderHiddenTransparentEdges=e?()=>this._renderEdges(0):()=>{},r()},u),d(()=>e.view.environment.background?.color,e=>{const t=e?e.toUnitRGBA():C;I(this._backgroundColor,t[0]*t[3],t[1]*t[3],t[2]*t[3],t[3]),r()},l),d(()=>e.view.state.camera.relativeElevation,e=>this._inGlobeView=(e??1/0)>=v,l),d(()=>this._bindParameters.clouds.fadeFactor,()=>{this._bindParameters.fadeLighting(),this._requestRender(2)},m),d(()=>this._bindParameters.clouds.data?.state,()=>r(),m),d(()=>e.view.state.highlights,e=>{this._bindParameters.highlights=e,r()},u),d(()=>"sun"===e.view.environment.lighting?.type,e=>{this._bindParameters.enableFillLights=e,this._requestRender()},l)])}destroy(){this._gpuTimerHandle=i(this._gpuTimerHandle),this._nodes.destroy(),this._framebuffer.dispose(),this._shadowAccumulator.destroy(),this._shadowAccumulator=null,this._loadEdgeViewTask=r(this._loadEdgeViewTask),this._edgeView=a(this._edgeView),this.renderPassManager.dispose(),this.weatherFader=a(this.weatherFader),this._releaseFBOs(),this._disposeOffscreenBuffers(),this.navigationDepthCache.destroy(),this._fboCache.destroy(),this._fboCache=null,this._renderContext.destroy(),this._plugins.destroy(),this._pluginInput=null,this._oitBlendOrNil=null,this._nodes=null,this._framebuffer=null,this._performanceInfo=null,z.prune(),oe.prune(),T()}get renderContext(){return this._renderContext}get _bindParameters(){return this._renderContext.bind}get _oitBlend(){return this._oitBlendOrNil??=new k(this._techniques),this._oitBlendOrNil}get performanceInfo(){return this._performanceInfo}updateRenderFeatures(e){this._renderStateFeatures.value=ie(e),this._requestRender()}isFeatureEnabled(e,t=this._state.value){return this._renderStateFeatures.value.get(t,e)??!1}setFeatureEnabled(e,t,s){this._renderStateFeatures.mutate(i=>i.set(t,e,s)),this._requestRender()}setTime(e){this._renderContext.time=e}get hasReflections(){return this._bindParameters.screenSpaceReflections.enabled=this._pluginsHas.water&&this.isFeatureEnabled(4),this._bindParameters.screenSpaceReflections.enabled}get _hasHighlights(){return this._plugins.produces(10,2,4,18,12,13,14)}hasHighlight(e){return this._plugins.hasHighlight(e)}get _hasHUDHighlights(){return this._plugins.produces(10,12,13,14)}get hasAmbientIllumination(){return this.isFeatureEnabled(3)&&!this._inGlobeView}get hasGlobalIllumination(){return this._hasGlobalIlluminationFlag&&this.hasAmbientIllumination}get hasGlobalIlluminationHighQuality(){return this.hasGlobalIllumination&&this.isFeatureEnabled(10)}get _keepGlobalIlluminationShadingAlive(){return this._hasGlobalIlluminationFlag&&!this._inGlobeView}get hasSMAA(){return this.isFeatureEnabled(0)}get _emissions(){return this._plugins.emissions}get hasFloatBlend(){return this._rctx.driverTest.floatBufferBlend.result&&this.isFeatureEnabled(9)}get highResolutionAtmosphere(){return this.isFeatureEnabled(2)}get fboCache(){return this._fboCache}_releaseFBOs(){this._bindParameters.hudOcclusion=n(this._bindParameters.hudOcclusion),this._bindParameters.depth=null}_disposeOffscreenBuffers(){this._framebuffer.dispose(),this._bindParameters.globalIllumination=n(this._bindParameters.globalIllumination),this._bindParameters.reprojection.lastFrameDepth=n(this._bindParameters.reprojection.lastFrameDepth),this._bindParameters.reprojection.lastFrameEmission=n(this._bindParameters.reprojection.lastFrameEmission),this._disposeBindBuffers()}_disposeBindBuffers(){this._bindParameters.shadowMap.disposeOutputs()}get updating(){return this._loadEdgeViewTask&&!this._loadEdgeViewTask.finished||this._edgeView?.updating||this._plugins.updating||this.weatherFader?.readyToRun||!this.isCameraFinal}loadEdgeView(){return this._loadEdgeViewTask||(this._loadEdgeViewTask=s(async e=>{const{EdgeView:t}=await import("./edgeRendering/EdgeView.js");o(e);const s=this._edgeView=new t({rctx:this._rctx,renderSR:this.stage.view.renderSpatialReference,viewingMode:this.stage.view.stage.viewingMode,techniques:this._techniques,setNeedsRender:()=>this._requestRender(),schedule:ye(this.stage.view.resourceController)});return this.addHandles(d(()=>s.updating,()=>this._requestRender(),m)),this._requestRender(),this._edgeViewCallbacks.forEach(e=>e(s)),this._edgeViewCallbacks.length=0,s})),this._loadEdgeViewTask.promise}withEdgeView(e){this.loadEdgeView(),null==this._edgeView?this._edgeViewCallbacks.push(e):e(this._edgeView)}get edgeView(){return this._edgeView}get isCameraFinal(){return this._reprojectionMatrixVersion.value>=0&&f(this._bindParameters.reprojection.matrix,w)}set _reprojectionMatrix(e){t(this._bindParameters.reprojection.matrix,e)&&this._reprojectionMatrixVersion.value++}modifyShadowsEnabled(){const e=this.stage.view.environmentManager.referencePositionGeographic,t=null==e||G(e[2],this.stage.viewingMode),s=this.stage.view.environment.lighting.directShadowsEnabled&&t;this._bindParameters.shadowMap.enabled!==s&&(this._bindParameters.shadowMap.enabled=s,this._requestRender(1))}get shadowsEnabled(){return!!this._bindParameters.shadowMap.enabled}setParameters(e){e.shadowCast&&this._shadowAccumulator.setParameters(e.shadowCast)}set slice(e){this._sliceHelper.update(e)&&this._requestRender()}get plugins(){return this._plugins}commit(e,t){return this._isRendering&&console.warn("Renderer.modify called while rendering"),!!super.commit(e,t,this._plugins.context)&&(this.updateHasFlags(),!0)}addRenderer(e){this._plugins.add(e)}removeRenderer(e){this._plugins.remove(e)}get occludedRequiresStencil(){return this._occludedRequiresOccludeeStencil||this.occludedRequiresIntegratedMeshStencil}get _occludedRequiresOccludeeStencil(){return this._bindParameters.hasOccludees&&!!(8&this.plugins.renderOccludedFlags)}get occludedRequiresIntegratedMeshStencil(){return this._plugins.produces(0,0)&&this._plugins.produces(0,9)}updateHasFlags(){const has=this._pluginsHas;has.occludedHudElements=this._plugins.produces(0,13),has.hudElements=has.occludedHudElements||this._plugins.produces(0,...Te),has.water=this._plugins.produces(4,19),this._bindParameters.hasOccludees=this._plugins.hasOccludees,this._requestRender()}updateAnimation(e,t){this._animationTimer??=new W(e.camera,t),this._animationTimer.advance(e.camera,t,this._animationTimeDilation);const s=this._hasAnimations;return this._hasAnimations=this._plugins.updateAnimation(this._animationTimer),this._hasAnimations=this._nodes.updateAnimation(this._animationTimer)||this._hasAnimations,this._hasAnimations!==s&&(this._gpuTimerHandle=s?i(this._gpuTimerHandle):this.performanceInfo.enableGPUPerformanceInfo()),this._hasAnimations}get animationTimestep(){return this._animationTimestep.value}get _animationTimeDilation(){return this._animationTimestep.timeDilation}resetAnimation(){this._animationTimestep.clear()}tick(){this.fboCache.clean()}render(e,t,s=!1){try{return this._isRendering=!0,this._render(e,t,s)}catch(i){console.error(`Exception during rendering: ${i}:\n${i.stack}`)}finally{this._isRendering=!1}return new de(this._pluginInput.get(O.FINAL),null)}_render(e,t,s){const i=0===t;this.performanceInfo.startFrame(),this.fboCache.frameStart(),this.fboCache.interactive=i,this._disposeBindBuffers();const{camera:r,contentCamera:a,mode:o,alignPixelEnabled:d}=e;this._state.value=o,this._bindParameters.output=0,this._bindParameters.emissions=this._emissions,this._bindParameters.alignPixelEnabled=d,this._bindParameters.decorations=!s,this._bindParameters.mainDepth=null,this._bindParameters.useFloatBlend.value=this.hasFloatBlend;const l=!s||!this._sliceHelper.isDecoration;this._bindParameters.slicePlane=l?this._sliceHelper.plane:null,this._bindParameters.viewshedEnabled=this._nodes.produces(R.VIEWSHED),this._bindParameters.cutFillComputationEnabled=this._nodes.produces(R.CUTFILL_COMPUTATION),this._bindParameters.cutFillVisualizationEnabled=this._nodes.produces(R.CUTFILL_COLOR),this._renderOverlay(),r.setGLViewport(this._rctx);const u=this._framebuffer,m=u.initialize(r.fullWidth,r.fullHeight,this._backgroundColor),_=this._needsLastFrameColor;_?(m?.retain(_-1),m?.setName("last frame color"),this._bindParameters.reprojection.lastFrameColor=m):m?.release(),this._ensureBindParameters(r,a),this._plugins.sortTestsTransparentOrderedSlots(Re),this._plugins.prepareRender(),this._bindParameters.hasShadowHighlights=this._needsShadowHighlight&&!s,this._shadowAccumulator.fullyRecompute=!i,this._shadowAccumulator.updateCamera(r),this._hasTransparentGeometry=this._plugins.produces(0,...we),this._precompilePrepasses(),this.performanceInfo.advance(ue.PREPARE);const p=this._computeShadowDepthRange(r);this._pluginInput.set("normals",this._renderNormals()),this._renderAmbientIlluminationAndDepth(),this._renderShadowMap(r,a,this._bindParameters.lighting.mainLight.direction,p),this._renderShadowAccumulation(p),u.bind(),this._bindParameters.mainDepth=u.depth.attachment,this._precompileShaders(i),this._bindParameters.output=0,this._renderOpaque(),this._renderPreTransparent(),this._renderTransparent(),this.hasReflections&&(this._bindParameters.depth=h(this._bindParameters.depth),this._bindParameters.reprojection.lastFrameColor=h(this._bindParameters.reprojection.lastFrameColor)),this._bindParameters.shadowMap.disposeOutput(5),u.update(e=>this._renderNodes(R.CUTFILL_COMPUTATION,e)),this._pluginInput.set(R.FOCUSAREA,this._renderFocusAreaGeometry()),u.update(e=>this._renderNodes(R.TRANSPARENT_ENVIRONMENT,e)),u.update(e=>this._renderNodes(R.VIEWSHED,e)),u.update(e=>this._renderNodes(R.LASERLINES,e)),this._nodes.requireGeometryDepth&&(this._bindParameters.depth=h(this._bindParameters.depth)),u.update(e=>this._renderNodes(R.FOCUSAREA_COLOR,e)),u.update(e=>this._renderNodes(R.CUTFILL_COLOR,e)),this._pluginInput.release(R.FOCUSAREA),this._pluginInput.release(R.GROUND_DEPTH),u.update(e=>this._renderNodes(R.OCCLUDED,e)),this._pluginInput.set("highlights",this._renderHighlightPrepass());const c=2===t?this._renderObjectAndLayerIdColor():null;u.update(e=>this._renderNodes(O.COMPOSITE,e)),this._bindParameters.shadowMap.disposeOutputs(),this._bindParameters.shadowHighlight=n(this._bindParameters.shadowHighlight),u.update(e=>this._renderNodes(R.ANTIALIASING,e));const f=this._hasTransparentGeometry?2:1,b=this._bindParameters.emissions;let g;return this._bindParameters.emissions=0,this._hasHUDHighlights&&u.update(e=>this._renderHUD(f,e)),u.update(e=>this._renderNodes(R.HIGHLIGHT_COLOR,e)),this._hasHUDHighlights||u.update(e=>this._renderHUD(f,e)),this._bindParameters.emissions=b,u.update(e=>this._renderNodes(R.MAGNIFIER,e)),u.update(e=>this._renderNodes(O.FINAL,e)),i&&(this._blit.toFramebuffer(u.color,this._bindParameters),be||2!==o&&0!==o||this.navigationDepthCache.update(this._bindParameters,u.depth.attachment,this._renderContext.time)),this.hasGlobalIllumination&&(this._bindParameters.reprojection.lastFrameDepth=this._bindParameters.depth,0!==this._emissions&&(this._bindParameters.reprojection.lastFrameEmission=u.color.obtainAttachment(me))),this._testsNeedsDepth&&(this._bindParameters.depth=h(this._bindParameters.depth)),this._releaseFBOs(),u.releaseDepth(),this._bindParameters.reprojection.lastFrameCamera.copyFrom(this._bindParameters.camera),this.fboCache.frameEnd(),i||(g=u.color,g.retain(),this._releaseFBOs(),this._disposeOffscreenBuffers()),this.performanceInfo.finishFrame(),new de(g,c)}_precompileShaders(e){++this._plugins.context.techniques.precompiling;const t=this._bindParameters;t.output=0;const s=t.emissions;if(this._precompileOpaqueGeometry(),this._nodes.precompile(t.hasOpaqueEmission,R.OPAQUE_ENVIRONMENT,R.GAUSSIAN_SPLAT,R.OPAQUE_OCCLUSION_QUERY,R.VOXEL),this._precompileOpaqueGeometry(),t.output=3,this._plugins.precompile(...Ee),t.output=0,this._plugins.precompile(...Ee),this._hasTransparentGeometry){const e=this._pluginsHas.occludedHudElements;this._oitBlend.precompile(t,e,0),this._pluginsHas.hudElements&&this._oitBlend.precompile(t,!1,1),this._precompileTransparentGeometry(),t.hasTransparentEmission&&(t.emissions=3)}this._nodes.precompile(t.hasOpaqueEmission,R.FOCUSAREA),this._compositor.precompile(this._usesPremultipliedAlphaBlit,!!this._needsEdges,t),this._hasTransparentGeometry||this._plugins.precompile(15),this._nodes.precompile(t.hasOpaqueEmission,R.TRANSPARENT_ENVIRONMENT,R.VIEWSHED,R.CUTFILL_COMPUTATION,R.CUTFILL_COLOR,R.LASERLINES,R.FOCUSAREA_COLOR,R.OCCLUDED,R.ANTIALIASING),t.highlightMixTexture=t.highlights.length>1?this._rctx.emptyTexture:null,this._precompileHUD(0),t.emissions=0,this._precompileHUD(0),this._precompileHUD(1),t.emissions=s,this._hasHighlights&&(t.highlights.forEach((e,s)=>{t.highlightLevel=s,this._precompileAllGeometry(10),this._hasHUDHighlights&&this._plugins.precompile(13,12)}),t.highlightLevel=null,this._nodes.precompile(t.hasOpaqueEmission,R.HIGHLIGHT_COLOR)),t.highlightMixTexture=null,this._nodes.precompile(t.hasOpaqueEmission,O.COMPOSITE,R.MAGNIFIER),this._shadowAccumulator.precompile(),this._plugins.precompile(8),t.hasOpaqueEmission&&(t.transparentWithoutDepthEmissionDimmingPass=!0,this._plugins.precompile(8),t.transparentWithoutDepthEmissionDimmingPass=!1),e&&this._blit.precompile(),--this._plugins.context.techniques.precompiling}_renderFocusAreaGeometry(){const e=this._nodes.produce(R.FOCUSAREA,this._pluginInput);return e&&this.performanceInfo.advance(ue.FOCUS_AREA_MASK),e}_renderObjectAndLayerIdColor(){if(!this._nodes.produces(R.OBJECT_AND_LAYER_ID_COLOR))return null;const e=this._bindParameters.output;++this._techniques.precompiling;const{width:t,height:s}=this._framebuffer.size;let i=this.fboCache.acquire(t,s,R.OBJECT_AND_LAYER_ID_COLOR).acquireDepth(14);return i=this._renderNodes(R.OBJECT_AND_LAYER_ID_COLOR,i),--this._techniques.precompiling,this._bindParameters.output=e,i}finish(e){this._hasAnimations||this._animationTimestep.clear();const t=this.performanceInfo.gpuSamplingEnabled,s=0===e;if(s||t){const e=s?this.performanceInfo.elapsedTime:0;let i=0;t?i=this.performanceInfo.totalGPUTimeSampler.last:this._rctx.gl.finish();const r=Math.max(e,i);this._animationTimestep.frame(r,s)}}readAccumulatedShadow(e){return this._shadowAccumulator.readAccumulatedShadow(e[0],e[1])}readMainDepth(e,t){const{mainDepth:s,camera:i}=this._bindParameters;if(!s)return;const r=this.fboCache.acquire(this._framebuffer.size.width,this._framebuffer.size.height,"linear depth");this._rctx.bindFramebuffer(r.fbo),i.setGLViewport(this._rctx),this._rctx.setScissorRect(e[0],e[1],e[2],e[3]),this._rctx.setScissorTestEnabled(!0),this._rctx.clearFramebuffer(C),this._compositor.blitDepthToLinearDepth(this._bindParameters,s),this._rctx.setScissorTestEnabled(!1),this._rctx.setScissorRect(0,0,this._rctx.gl.canvas.width,this._rctx.gl.canvas.width),r.fbo?.readPixels(e[0],e[1],e[2],e[3],6408,_e.UNSIGNED_BYTE,t),r.release()}get _needsEdges(){return this._edgeView?.shouldRender()?this._edgeView:null}_renderEdges(e){const t=this._needsEdges;if(!t)return;const{width:s,height:i}=this._framebuffer.size,r=this.fboCache.acquire(s,i,"edges");r.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(r.fbo),this._rctx.clearFramebuffer(C),t.render(this._bindParameters,e),r.detachDepth(),this._framebuffer.bind(),this._compositor.composite(this._bindParameters,r.getTexture()),r.release(),this.performanceInfo.advance(1===e?ue.OPAQUE_EDGES:ue.TRANSPARENT_EDGES)}_renderOverlay(){this._bindParameters.overlay=this.overlay?.render(this._renderContext.time),this._bindParameters.overlay&&this.performanceInfo.advance(ue.OVERLAY)}_renderShadowMap(e,t,s,i){if(!this.shadowsEnabled)return;const r=this._bindParameters.shadowMap;if(r.start(e,s,i,this.isFeatureEnabled(5),this.stage.view.qualitySettings.maximumPixelRatio),this._needsShadowHighlight){this._renderShadowCascades(6,r),e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,t);const s=this._bindParameters.output;this._bindParameters.output=0,this._bindParameters.shadowHighlight=this._nodes.produce(R.SHADOW_HIGHLIGHT,this._pluginInput),this._bindParameters.output=s,r.disposeOutput(6),r.clear(),this._renderShadowCascades(7,r)}else this._renderShadowCascades(5);e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,this._bindParameters.contentCamera),this._needsShadowHighlight&&(this._bindParameters.depth=h(this._bindParameters.depth)),this.performanceInfo.advance(R.SHADOWMAP)}_precompileShadowCascades(e){0!==this._bindParameters.shadowMap.cascades.length&&this._precompileAllGeometry(e)}_renderShadowCascades(e,t=this._bindParameters.shadowMap){const s=this._bindParameters.output,i=t===this._bindParameters.shadowMap&&6!==e;t.bindFramebuffer();for(const r of t.cascades)r.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(r.camera,r.camera),this.renderAllGeometry(e),i&&this._renderShadowNodes();t.finish(e),this._bindParameters.output=s}_renderShadowNodes(){const e=this._bindParameters.shadowMap.renderTarget;e&&(this._renderNodes(R.SHADOWMAP,e),this._pluginInput.set(R.SHADOWMAP,null))}get _needsLastFrameColor(){return+this.hasReflections+ +this.hasGlobalIllumination}get _needsDepth(){return+this._nodes.requireGeometryDepth+ +this.hasReflections+ +this.hasGlobalIllumination+ +this._shadowAccumulator.requiresDepth+ +this._testsNeedsDepth+ +this._needsShadowHighlight}get _usesPremultipliedAlphaBlit(){return this._pluginsHas.hudElements}_renderAmbientIlluminationAndDepth(){this._bindParameters.depth=n(this._bindParameters.depth);const e=this._pluginInput.get("normals");if(e){this._pluginInput.set(R.AMBIENT_ILLUMINATION,this._hasGlobalIlluminationFlag?this._renderGlobalIllumination():this._renderSSAO());const t=this._needsDepth;t?(this._rctx.bindFramebuffer(e.fbo),this._rctx.clear(1024),this._renderGeometryWithoutNormals(3),this._bindParameters.depth=e.obtainDepthTexture(),this._bindParameters.depth?.retain(t-1),this.performanceInfo.advance(ue.DEPTH)):e.detachDepth(),this.hasAmbientIllumination&&this._pluginInput.release("normals")}else this._hasGlobalIlluminationFlag&&(this._releaseGlobalIlluminationBuffers(),this._bindParameters.globalIlluminationEnabled=this._keepGlobalIlluminationShadingAlive),this._renderAllGeometryDepth()}_renderAllGeometryDepth(){const e=this._needsDepth;if(0===e)return;const{width:t,height:s}=this._framebuffer.size,i=this.fboCache.acquire(t,s,"geometry depth",14);this._rctx.bindFramebuffer(i.fbo),this._rctx.clear(1280),this.renderAllGeometry(3),this._bindParameters.depth=i.obtainDepthTexture(),this._bindParameters.depth?.retain(e-1),i.release(),this.performanceInfo.advance(ue.DEPTH)}get _needsShadowDepthRange(){return this._bindParameters.shadowMap.enabled||this._shadowAccumulator.active}_computeShadowDepthRange(e){if(!this._needsShadowDepthRange)return J.Zero;const t=X(e,this._plugins.plugins,this.stage.layers,0);return t.union(this._plugins.queryDepthRange(e)),this._bindParameters.shadowMap.enabled&&t.union(this._nodes.queryDepthRange(R.SHADOWMAP,e)),t.near=Math.max(e.near,t.near),t.far=Math.min(e.far,t.far),t}updateSceneDepthRange(e){if(!this.stage.view.state.isGlobal)return void(this.sceneDepthRange.value=J.Infinite);if((this.stage.view.renderCoordsHelper?.getAltitude(e.eye)??0)<j)return void(this.sceneDepthRange.value=J.Infinite);const t=e.clone();t.near=N,t.far=1e10;const s=X(t,this._plugins.plugins,this.stage.layers,1);s.union(this._plugins.queryDepthRange(t)),this.sceneDepthRange.value.equals(s)||(this.sceneDepthRange.value=s)}get _normalsRequired(){return this._nodes.require("normals",...S,R.VIEWSHED,R.LASERLINES)+(this.hasAmbientIllumination?1:0)}_precompilePrepasses(){this._normalsRequired?(this._precompilePlugins(4,Ie),this._needsDepth&&this._precompilePlugins(3,Ae)):this._needsDepth&&this._precompileAllGeometry(3),this.shadowsEnabled&&(this._needsShadowHighlight?(this._nodes.precompile(this._bindParameters.hasEmission,R.SHADOW_HIGHLIGHT),this._precompileShadowCascades(6),this._precompileShadowCascades(7)):this._precompileShadowCascades(5)),this._shadowAccumulator.active&&(this._shadowAccumulator.precompilePrepass(),this._precompileAllGeometry(5)),this.hasAmbientIllumination&&this._normalsRequired&&this._nodes.precompile(this._bindParameters.hasEmission,R.AMBIENT_ILLUMINATION)}_renderNormals(){const e=this._normalsRequired;if(0===e)return;const{width:t,height:s}=this._framebuffer.size,i=this.fboCache.acquire(t,s,"normals",5);i.acquireDepth(14),this._rctx.bindFramebuffer(i.fbo),this._rctx.clearFramebuffer(C,!0,!0),this._bindParameters.output=4,this._plugins.render(...Ie);const r=this._nodes.optional("normals",...S,R.VIEWSHED);return i.retain(e+r-1),this.performanceInfo.advance(ue.NORMALS),i}_renderSSAO(){this._bindParameters.globalIlluminationEnabled=!1;const e=this._pluginInput.get("normals");return this.hasAmbientIllumination&&e?(this._bindParameters.ssao=this._nodes.produce(R.AMBIENT_ILLUMINATION,this._pluginInput),this._bindParameters.ssao&&this.performanceInfo.advance(ue.AMBIENT_ILLUMINATION),this._bindParameters.ssao):null}_renderGlobalIllumination(){if(!this.hasGlobalIllumination)return this._releaseGlobalIlluminationBuffers(),this._bindParameters.globalIlluminationEnabled=this._keepGlobalIlluminationShadingAlive,null;const e=this._nodes.produce(R.AMBIENT_ILLUMINATION,this._pluginInput);return this._releaseGlobalIlluminationBuffers(),this._bindParameters.globalIllumination=e,this._bindParameters.globalIlluminationEnabled=!0,this.performanceInfo.advance(this.hasGlobalIlluminationHighQuality?ue.AMBIENT_ILLUMINATION_HIGH_QUALITY:ue.AMBIENT_ILLUMINATION),e}_releaseGlobalIlluminationBuffers(){const e=this._bindParameters;e.reprojection.lastFrameColor=h(e.reprojection.lastFrameColor),e.reprojection.lastFrameDepth=h(e.reprojection.lastFrameDepth),e.reprojection.lastFrameEmission=h(e.reprojection.lastFrameEmission),e.globalIllumination=h(e.globalIllumination),e.globalIlluminationEnabled=!1}_precompileAllGeometry(e){const t=this._bindParameters.output;this._bindParameters.output=e,this._precompileOpaqueGeometry(),this._precompileTransparentGeometry(),this._plugins.precompile(...Ee),this._bindParameters.output=t}renderAllGeometry(e){this._bindParameters.output=e,this._renderOpaqueAndTransparentGeometry(e),this._renderTransparentGround()}precompileSlots(e,...t){for(const s of t)this._bindParameters.slot=s,e.precompile(this._renderContext)}precompileOccludedSlots(e,t){for(const s of t)this._renderContext.renderOccludedMask=s,this.precompileSlots(e,...Ce);this._renderContext.renderOccludedMask=te}renderSlots(e,...t){for(const s of t)this._bindParameters.slot=s,e.forAll(e=>{const t=e.acquireTechniques(this._renderContext);t&&e.render(this._renderContext,t)})}renderOccludedSlots(e,t){this._renderContext.renderOccludedMask=t,this.plugins.renderOccludedFlags>1&&this._plugins.render(9),this.renderSlots(e,...Ce),this._renderContext.renderOccludedMask=te}renderHUD(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(...Se[e])}_renderHUDElements(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(16),this.renderHUD(e),this._bindParameters.hudRenderStyle=e,this._plugins.render(14)}precompileViewshedShadowMap(){this._precompileAllGeometry(8)}precompileCutFillOrthographicReferenceDepth(){this._precompilePlugins(9,De)}_precompilePlugins(e,t){const s=this._bindParameters.output;this._bindParameters.output=e,this._plugins.precompile(...t),this._bindParameters.output=s}renderViewshedShadowMap(e){const{camera:t,contentCamera:s}=this._bindParameters,i=this._bindParameters.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this.renderAllGeometry(8),this._ensureBindParametersCamera(t,s),this._bindParameters.camera.setGLViewport(this._rctx),this._bindParameters.output=i}renderCutFillOrthographicReferenceDepth(e){const{camera:t,contentCamera:s}=this._bindParameters,i=this._bindParameters.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this._bindParameters.output=9,this._plugins.render(...De),this._ensureBindParametersCamera(t,s),t.setGLViewport(this._rctx),this._bindParameters.output=i}get _needsGroundDepth(){return this._bindParameters.cutFillVisualizationEnabled}_blitGroundDepth(){if(!this._needsGroundDepth)return null;const{width:e,height:t}=this._framebuffer.size,s=this.fboCache.acquire(e,t,R.GROUND_DEPTH,14);return this._rctx.blitFramebuffer(this._framebuffer.color.fbo,s.fbo,256),this._framebuffer.bind(),s}_renderOpaqueAndTransparentGeometry(e){this._bindParameters.output=e,this._renderOpaqueGeometry(),this._renderTransparentGeometry()}_renderGeometryWithoutNormals(e){this._bindParameters.output=e,this._plugins.render(...Ae)}_precompileOpaqueGeometry(){this._needsOpaquePass&&(this._plugins.precompile(...Pe),this._nodes.precompile(this._bindParameters.hasEmission,"opaque-color"))}_renderOpaqueGeometry(){this._plugins.render(...Pe)}_renderTransparentGeometry(){this._plugins.render(...we),this._hasTransparentGeometry&&this._plugins.render(15)}_renderTransparentGround(){this._plugins.render(...Ee)}_precompileHUD(e){if(!this._pluginsHas.hudElements)return;const t=this._bindParameters.output,s=this._bindParameters.hudRenderStyle,i=this._bindParameters.emissions;this._bindParameters.emissions=0,this._bindParameters.hudRenderStyle=e,this._bindParameters.output=1,this._plugins.precompile(...Te),this._bindParameters.output=2,this._plugins.precompile(...Te),this._bindParameters.output=0,this._oitBlend.precompile(this._bindParameters,!1,1),this._hasHighlights&&(this._bindParameters.output=10,this._plugins.precompile(...Te)),this._bindParameters.emissions=i,this._bindParameters.output=t,this._bindParameters.hudRenderStyle=s}_renderHUD(e,t){if(!this._pluginsHas.hudElements)return t;const s=this._renderOIT(1,e);this._rctx.bindFramebuffer(t.fbo);const i=!!t.getTexture(me);return this._compositor.compositePreMultipliedAlpha(this._bindParameters,s.getTexture(),i),s.release(),this.performanceInfo.advance(0===e?ue.HUD_OCCLUDED:ue.HUD),t}get _needsShadowHighlight(){return this.shadowsEnabled&&this._plugins.produces(6,2)}_renderHighlightPrepass(){if(!this._hasHighlights)return;const{fboCache:e,_rctx:t,_bindParameters:s}=this,{width:i,height:r}=this._framebuffer.size,{highlights:a}=s,n=a.length>B?3:1,h=e.acquire(i,r,"highlights",n);h.acquireDepth(14);const o=this._plugins.produces(10,0);return o&&this._framebuffer.color.fbo&&h.fbo&&t.blitFramebuffer(this._framebuffer.color.fbo,h.fbo,1024),t.bindFramebuffer(h.fbo),t.gl.clearBufferuiv(6144,0,[0,0,0,0]),o||t.clear(1024),this._bindParameters.output=10,t.bindFramebuffer(h.fbo),V(t,e,i,r,s,()=>this._renderHighlightGeometries()),h.detachDepth(),this.performanceInfo.advance(ue.HIGHLIGHTS),h.retain(this._nodes.require("highlights",...D)+this._nodes.optional("highlights",...D)-1),h}_renderHighlightGeometries(){this._plugins.render(...Oe),this._rctx.clear(256),this._renderHUDElements(2)}_renderShadowAccumulation(e){this._shadowAccumulator.updateDepthRange(e);const t=this._shadowAccumulator.requiresDepth;this._bindParameters.output=0,this._shadowAccumulator.renderAccumulation(this._bindParameters)&&this.performanceInfo.advance(ue.ACCUMULATED_SHADOWS),this._shadowAccumulator.updateMask(),t&&(this._bindParameters.depth=h(this._bindParameters.depth))}_precompileTransparentGeometry(){y(this._bindParameters.output)?(this._bindParameters.output=1,this._plugins.precompile(...we),this._hasTransparentGeometry&&this._plugins.precompile(15),this._bindParameters.output=2,this._plugins.precompile(...we),this._hasTransparentGeometry&&this._plugins.precompile(15),this._bindParameters.output=0):this._plugins.precompile(...we)}_renderOIT(e,t=2){const s=1===e,{width:i,height:r}=this._framebuffer.size,a=s?()=>this._renderHUDElements(t):()=>this._renderTransparentGeometry(),h=this._bindParameters,o=h.useFloatBlend.value?8:5,d=h.output;h.output=1;const l=s?"oit hud":"oit",u=this.fboCache.acquire(i,r,l,o).acquireColor(me,this.hasFloatBlend?7:0,"oit alpha"),m=h.hasEmission&&(0===e||1!==t);m&&u.acquireColor(pe,o,"oit emissive"),s||u.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(u.fbo),this._rctx.clearFramebuffer(Z),m&&this._rctx.clearBuffer(2,Z),a(),u.detachDepth(),h.output=2;const _=this.fboCache.acquire(i,r,s?"oit front hud":"oit front");m&&_.acquireColor(me,o,"oit front emissive"),s?_.acquireDepth(this._hudDepthFormat):_.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(_.fbo),this._rctx.clearFramebuffer(C,s),a(),_.detachDepth();const p=this._pluginsHas.occludedHudElements&&!s,c=p&&0!==h.emissions?pe:me;let f;return h.hudOcclusion=n(this._bindParameters.hudOcclusion),h.output=0,s?(f=this.fboCache.acquire(i,r,"oit composite hud"),this._rctx.bindFramebuffer(f.fbo),this._rctx.setClearColor(0,0,0,1e-13),this._rctx.clear(16384)):(0!==h.emissions&&this._framebuffer.ensureEmissionAttachment(),p&&(this._framebuffer.color.acquireColor(c,0,"hud occlusion"),this._rctx.clearBuffer(c-ce,C)),this._framebuffer.bind()),this._oitBlend.blend(this._rctx,u,_,h,p,e,this._fboCache.debugCallback),f?.detachDepth(),s||(m&&(this._bindParameters.emissions=3),p&&(h.hudOcclusion=this._framebuffer.color.obtainAttachment(c))),_.release(),u.release(),h.output=d,f}get _hudDepthFormat(){return this.isFeatureEnabled(7)?14:13}get _needsOpaquePass(){return this.plugins.produces(0,...Pe)||this.plugins.produces(5,...Pe)||this.plugins.produces(3,3)}_renderOpaque(){const e=this._needsOpaquePass;e&&(this._plugins.render(0,1),this._pluginInput.set(R.GROUND_DEPTH,this._blitGroundDepth()),this._plugins.render(2,3));const t=this._framebuffer;t.update(t=>this._renderNodes(O.OPAQUE,t,e)),this.fboCache.debugCallback?.(O.OPAQUE,t.color.fbo),t.update(e=>this._renderNodes(R.OPAQUE_ENVIRONMENT,e)),this.fboCache.debugCallback?.(R.OPAQUE_ENVIRONMENT,t.color.fbo),this._renderEdges(1)}_renderPreTransparent(){this._framebuffer.update(e=>this._renderNodes(R.GAUSSIAN_SPLAT,e)),this.fboCache.debugCallback?.(R.GAUSSIAN_SPLAT,this._framebuffer.color.fbo),this._framebuffer.update(e=>this._renderNodes(R.OPAQUE_OCCLUSION_QUERY,e)),this.fboCache.debugCallback?.(R.OPAQUE_OCCLUSION_QUERY,this._framebuffer.color.fbo),this._framebuffer.update(e=>this._renderNodes(R.VOXEL,e)),this.fboCache.debugCallback?.(R.VOXEL,this._framebuffer.color.fbo)}_renderTransparent(){const e=this._framebuffer;this._renderHiddenTransparentEdges(),this._hasTransparentGeometry&&this._renderOIT(0),e.update(e=>this._renderNodes(O.TRANSPARENT,e,this._hasTransparentGeometry)),this.fboCache.debugCallback?.(O.TRANSPARENT,e.color.fbo),this._hasTransparentGeometry||this._plugins.render(15),this._renderEdges(0),this._bindParameters.ssao=n(this._bindParameters.ssao),e.update(e=>this._renderNodes(R.TRANSPARENT_NO_DEPTH,e)),this.fboCache.debugCallback?.(R.TRANSPARENT_NO_DEPTH,e.color.fbo),this._renderTransparentMaterialWithoutDepth()}_renderTransparentMaterialWithoutDepth(){if(this._framebuffer.bind(),this._plugins.render(8),this._bindParameters.hasEmission){const e=this._rctx.setDrawBuffers([fe,me]);this._bindParameters.transparentWithoutDepthEmissionDimmingPass=!0,this._plugins.render(8),this._bindParameters.transparentWithoutDepthEmissionDimmingPass=!1,this._rctx.setDrawBuffers(e)}this.performanceInfo.advance(ue.TRANSPARENT_MATERIAL_WITHOUT_DEPTH)}_renderNodes(e,t,s=!1){if(t.setName(e),this._pluginInput.set(e,t),!this._nodes.produces(e))return s&&this.performanceInfo.advance(e),t;const i=this._nodes.render(t,this._pluginInput,this._releaseNodeInputs);return this.performanceInfo.advance(e),this._fboCache.debugCallback?.(e,i.fbo),i}_ensureBindParameters(e,t){this._ensureBindParametersCamera(e,t),this._ensureBindParametersWeatherFader(),this._ensureBindParametersScreenSpaceReflections(),this._ensureBindParametersReprojection()}_ensureBindParametersCamera(e,t){this._bindParameters.camera=e,this._bindParameters.contentCamera=t}_ensureBindParametersWeatherFader(){1===this.stage.viewingMode&&(this._bindParameters.clouds.data&&(this._bindParameters.clouds.fade(this._bindParameters.camera,this.renderContext.time,this.stage.view.qualitySettings.fadeDuration),this.weatherFader?.cleanupCubemap()),this._bindParameters.snowCover=this.weatherFader?.snowCover??0)}_ensureBindParametersScreenSpaceReflections(){const{time:e}=this.renderContext,{screenSpaceReflections:t}=this._bindParameters;if(this.hasReflections){null==this._ssrEnableTime&&(this._ssrEnableTime=e);const s=this.stage.view.qualitySettings.fadeDuration;t.fadeFactor=s>0?Math.min(s,e-this._ssrEnableTime)/s:1,t.fadeFactor<1&&this._requestRender()}else this._ssrEnableTime=null}_ensureBindParametersReprojection(){if(!(this.hasReflections||this.hasGlobalIllumination))return void(this._reprojectionMatrix=w);const{reprojection:e,camera:t}=this._bindParameters,{lastFrameCamera:s}=e,i=!s.equals(t);if(i?(b(Ge,t.viewMatrix),b(Fe,t.projectionMatrix),g(xe,Ge,Fe),g(xe,s.viewMatrix,xe),g(xe,s.projectionMatrix,xe),this._reprojectionMatrix=xe):this._reprojectionMatrix=w,this.hasGlobalIllumination){const{viewMatrix:t}=e;i?(g(He,s.viewMatrix,Ge),P(t,He)):P(t,w)}}addRenderNode(e){this._nodes.add(e),this._requestRender()}removeRenderNode(e){this._nodes.remove(e),this._requestRender()}updateLighting(e,t,s,i){this._bindParameters.updateLighting(e,t,s,i),this._requestRender(1)}get usedMemory(){return{fbos:this.fboCache.usedMemory,plugins:this._plugins.usedMemory,edges:this.edgeView?.usedMemory??0,clouds:this.weatherFader?.usedMemory??0}}get test(){}};e([p()],ge.prototype,"_inGlobeView",void 0),e([p({readOnly:!0})],ge.prototype,"highResolutionAtmosphere",null),e([p()],ge.prototype,"_edgeView",void 0),e([p()],ge.prototype,"updating",null),ge=e([c("esri.views.3d.webgl-engine.lib.Renderer")],ge);const Pe=[0,1,2,3],we=[7,6,4,5],Ee=[7,6],Ie=[0,1,2,4,...Ee],Ae=[3,5],Ce=[2,4,8],Te=[16,12,14,13],Oe=[4,5,2,3,0,1,...Ee],Re=[4,8,5,11],Se={0:[13],1:[12],2:[13,12],3:[13,12]},De=[0,1,...Ee],Ne=["normals","highlights"],Fe=E(),Ge=E(),xe=E(),He=E();function ye(e){return t=>e.immediate.schedule(t)}export{ge as Renderer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{set as t,
|
|
2
|
+
import{set as t,scale as r,add as e,dist as n}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{area3dFromValues as i}from"../../../../geometry/support/triangle.js";function s(r,e,n=e?.indices){if(!e||!n)return!1;const{size:o,data:i}=e,s=(r,e,s,c)=>{const f=3*c,l=n[f]*o,u=n[f+1]*o,a=n[f+2]*o;t(r,i[l],i[l+1],i[l+2]),t(e,i[u],i[u+1],i[u+2]),t(s,i[a],i[a+1],i[a+2])};return c(r,n.length/3,s)}function c(n,o,s){t(n,0,0,0),t(g,0,0,0);let c=0,f=0;for(let t=0;t<o;++t){s(u,a,m,t);const o=i(u,a,m);o?(e(u,u,a),e(u,u,m),r(u,u,1/3*o),e(n,n,u),c+=o):(e(g,g,u),e(g,g,a),e(g,g,m),f+=3)}return(0!==f||0!==c)&&(0!==c?(r(n,n,1/c),!0):0!==f&&(r(n,g,1/f),!0))}function f(e,n,o=n?.indices){if(!n||!o)return!1;const{size:i,data:s}=n;t(e,0,0,0);let c=-1,f=0;for(let t=0;t<o.length;t++){const r=o[t]*i;c!==r&&(e[0]+=s[r],e[1]+=s[r+1],e[2]+=s[r+2],f++),c=r}return f>1&&r(e,e,1/f),f>0}function l(o,i,s,c=i?.indices){if(!i||!c)return!1;t(o,0,0,0),t(g,0,0,0);let f=0,l=0;const{size:m,data:d}=i,p=c.length-1,h=p+(s?2:0);for(let t=0;t<h;t+=2){const i=t<p?t+1:0,s=c[t<p?t:p]*m,h=c[i]*m;u[0]=d[s],u[1]=d[s+1],u[2]=d[s+2],a[0]=d[h],a[1]=d[h+1],a[2]=d[h+2],r(u,e(u,u,a),.5);const j=n(u,a);j>0?(e(o,o,r(u,u,j)),f+=j):0===f&&(e(g,g,u),l++)}return 0!==f?(r(o,o,1/f),!0):0!==l&&(r(o,g,1/l),!0)}const u=o(),a=o(),m=o(),g=o();export{l as computeAttachmentOriginLines,f as computeAttachmentOriginPoints,s as computeAttachmentOriginTriangles,c as computeAttachmentOriginTrianglesReader};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{copy as i,lerp as s,squaredLength as t,dot as n}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as e}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{h as o}from"../../../../chunks/boundedPlane.js";import{clipPolygon as
|
|
2
|
+
import{copy as i,lerp as s,squaredLength as t,dot as n}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as e}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a as l,h as o}from"../../../../chunks/boundedPlane.js";import{clipPolygon as r,clipLineSegment as c,create as a,fromValues as h}from"../../../../geometry/support/plane.js";function u(i){return(t,n,e)=>!o(i,s(d,t,n,e))}class m{constructor(i,s){this.list=i,this.count=s}}class f{constructor(i){this._remainingA=p(),this._remainingB=p(),this._visible=p(),this._lineRemainingA=b(),this._lineRemainingB=b(),this._lineVisible=b(),this._slicedAwayHalfspaces=_(i),this._slicePlane=l(i)}*processTriangle(s,t){let n=new m(this._remainingA,3),e=new m(this._remainingB,0);i(n.list[0],t[0]),i(n.list[1],t[1]),i(n.list[2],t[2]);const l=new m(this._visible,0);for(const i of this._slicedAwayHalfspaces){if(l.count=r(i,n.list,n.count,l.list,!1),l.count>=3&&(s.list=l.list,s.count=l.count,yield s),e.count=r(i,n.list,n.count,e.list,!0),e.count<3)return;[e,n]=[n,e]}}*processLineSegment(s,t,n){let e=this._lineRemainingA,l=this._lineRemainingB;i(e[0],t),i(e[1],n);for(const o of this._slicedAwayHalfspaces){if(c(o,e[0],e[1],this._lineVisible[0],this._lineVisible[1],!1)&&(i(s[0],this._lineVisible[0]),i(s[1],this._lineVisible[1]),yield s),!c(o,e[0],e[1],l[0],l[1],!0))return;[l,e]=[e,l]}}validatePoint(i){return!o(this._slicePlane,i)}}function _(i){const s=[a(i.plane),a(),a(),a(),a()];return g(i.basis1,i.origin,s[1],s[2]),g(i.basis2,i.origin,s[3],s[4]),s}function g(i,s,e,l){const o=t(i),r=n(i,s);h(i[0],i[1],i[2],-r+o,e),h(-i[0],-i[1],-i[2],r+o,l)}function p(){return Array.from({length:12},()=>e())}function b(){return[e(),e()]}const d=e();export{f as SliceScreenPolygonPrimitiveProcessor,u as sliceFilterPredicate};
|