@arcgis/core 6.0.0-next.28 → 6.0.0-next.29
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/arcgisGlobal.d.ts +0 -2
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/131185d26343a997495e.js +1 -0
- package/assets/esri/core/workers/chunks/{dbda982485d3fe26c729.js → 13c64087be3b2985a21b.js} +1 -1
- package/assets/esri/core/workers/chunks/144bad0c2415c345736a.js +1 -0
- package/assets/esri/core/workers/chunks/176d0a06ebff5a29dedf.js +1 -0
- package/assets/esri/core/workers/chunks/{b0ca81a07cff25df19d2.js → 176d75e76318bfc25a53.js} +1 -1
- package/assets/esri/core/workers/chunks/18776a130d96879a68b1.js +1 -0
- package/assets/esri/core/workers/chunks/{e35641a3a4da8cfbcf54.js → 189321d88026bd7e6d3e.js} +1 -1
- package/assets/esri/core/workers/chunks/18e7fa4d3e0b1a084cc6.js +1 -0
- package/assets/esri/core/workers/chunks/{1168bc5c9f0a7e1f63a2.js → 1989410a618865f02dec.js} +1 -1
- package/assets/esri/core/workers/chunks/{2c0cb214fedb29487eef.js → 199a7f97916679e0257c.js} +1 -1
- package/assets/esri/core/workers/chunks/1c406ab2bf99ac563316.js +1 -0
- package/assets/esri/core/workers/chunks/1d96fbad881a7d14a950.js +1 -0
- package/assets/esri/core/workers/chunks/{42d44c7d532df5ee70e9.js → 1deca3de77b1a9a07da4.js} +1 -1
- package/assets/esri/core/workers/chunks/{45f826554499c38968c6.js → 1ee4df0fd61440cb5f02.js} +1 -1
- package/assets/esri/core/workers/chunks/22e73501e1435a896826.js +1 -0
- package/assets/esri/core/workers/chunks/25657f70c5f04a4ed978.js +1 -0
- package/assets/esri/core/workers/chunks/276a0b549acf048e8673.js +1 -0
- package/assets/esri/core/workers/chunks/{56e903ccef66cbe18f92.js → 2cd60fd062d954322c1f.js} +1 -1
- package/assets/esri/core/workers/chunks/{ad96132bc89671e595f3.js → 2d3e0e4442dbc6ec6def.js} +1 -1
- package/assets/esri/core/workers/chunks/2de4296590bf9f9e9add.js +1 -0
- package/assets/esri/core/workers/chunks/2f5d014d6a72108b0b3a.js +1 -0
- package/assets/esri/core/workers/chunks/{0363d29fc665d169ebc4.js → 3105336a05f38a95ebea.js} +1 -1
- package/assets/esri/core/workers/chunks/379ef56f6b32494832a6.js +1 -0
- package/assets/esri/core/workers/chunks/3aafdb905c697bc9b1ad.js +1 -0
- package/assets/esri/core/workers/chunks/40c2674dae73f0942751.js +1 -0
- package/assets/esri/core/workers/chunks/418addce122dbb8897b4.js +1 -0
- package/assets/esri/core/workers/chunks/4419732baf3459a80e6d.js +1 -0
- package/assets/esri/core/workers/chunks/4976f5567fc7f1b63d10.js +1 -0
- package/assets/esri/core/workers/chunks/4e17665dd9048c300d87.js +1 -0
- package/assets/esri/core/workers/chunks/5396b6e99a0546a25d19.js +1 -0
- package/assets/esri/core/workers/chunks/53c7510df09b71ab5646.js +1 -0
- package/assets/esri/core/workers/chunks/561c48cb4d49b150765b.js +1 -0
- package/assets/esri/core/workers/chunks/{d90a3bfd45b5ed4092e0.js → 590fe0f56bc4c33a50e7.js} +1 -1
- package/assets/esri/core/workers/chunks/5bb6c255bdc8aa9ba23e.js +1 -0
- package/assets/esri/core/workers/chunks/5f1cb79aec9c4a9b7ddc.js +29 -0
- package/assets/esri/core/workers/chunks/{23a4806b4cdf7cc32e4d.js → 5f787809b74eed7b9a91.js} +1 -1
- package/assets/esri/core/workers/chunks/636e9c4ac1f9ae98f9d1.js +1 -0
- package/assets/esri/core/workers/chunks/654f5441227579d2b6b4.js +1 -0
- package/assets/esri/core/workers/chunks/692f0093c444fcc752b5.js +1 -0
- package/assets/esri/core/workers/chunks/69627b2634da64dd885f.js +1 -0
- package/assets/esri/core/workers/chunks/6a7de221cea4426cb490.js +1 -0
- package/assets/esri/core/workers/chunks/7030a4d0714a35995a58.js +1 -0
- package/assets/esri/core/workers/chunks/72d20d3957d612f86431.js +1 -0
- package/assets/esri/core/workers/chunks/7862abd24fb5c3b12e6b.js +1 -0
- package/assets/esri/core/workers/chunks/7a0b4dc0cda190367a39.js +1 -0
- package/assets/esri/core/workers/chunks/{5eec1c1162779574f46e.js → 7c75a8ee266c36baa902.js} +1 -1
- package/assets/esri/core/workers/chunks/{ab1660f5f8a5268c2fac.js → 84038dd85005fea413eb.js} +1 -1
- package/assets/esri/core/workers/chunks/849f446c718e892f39ce.js +1 -0
- package/assets/esri/core/workers/chunks/{8ac2098ecdc40ad41055.js → 8502274806ea52308822.js} +1 -1
- package/assets/esri/core/workers/chunks/865cebc5c982c040ab6f.js +1 -0
- package/assets/esri/core/workers/chunks/{76196c414e48834f7b92.js → 8f008eedb11685ee2048.js} +1 -1
- package/assets/esri/core/workers/chunks/90d797ab82d4a68ba32f.js +1 -0
- package/assets/esri/core/workers/chunks/9184c947cdefe06bf551.js +1 -0
- package/assets/esri/core/workers/chunks/9976eaa81085c0d17e14.js +1 -0
- package/assets/esri/core/workers/chunks/{177f353ce72133e2eeed.js → 9c2436464b7dfd666678.js} +1 -1
- package/assets/esri/core/workers/chunks/a125650edbed802e419a.js +1 -0
- package/assets/esri/core/workers/chunks/{23fd4de56de352f63e2d.js → a2196a49f89d57a0a1c7.js} +1 -1
- package/assets/esri/core/workers/chunks/ad21757d78e372fa2ed6.js +1 -0
- package/assets/esri/core/workers/chunks/b01688ccc29d33bfc82d.js +1 -0
- package/assets/esri/core/workers/chunks/b5eff28cf482d920b9ea.js +1 -0
- package/assets/esri/core/workers/chunks/{04ecf15524ff3838c01c.js → ba4520ddcb6a49988da6.js} +1 -1
- package/assets/esri/core/workers/chunks/be55771758e4bcef0976.js +1 -0
- package/assets/esri/core/workers/chunks/bead830a677690eeb6fb.js +1 -0
- package/assets/esri/core/workers/chunks/c131e0dd180a4c10e12e.js +1 -0
- package/assets/esri/core/workers/chunks/c1cf3edce15f09648eb4.js +1 -0
- package/assets/esri/core/workers/chunks/c4f78a481f43cfae7b63.js +1 -0
- package/assets/esri/core/workers/chunks/c570b90995c65bbb2e14.js +1 -0
- package/assets/esri/core/workers/chunks/c576bef77e34920af188.js +1 -0
- package/assets/esri/core/workers/chunks/c9feffb9884cfed52c4b.js +1 -0
- package/assets/esri/core/workers/chunks/cc97e4fd0dacad970a23.js +1 -0
- package/assets/esri/core/workers/chunks/ce324dde6d7daea33638.js +1 -0
- package/assets/esri/core/workers/chunks/d1d6154b4af1c9cc497b.js +1 -0
- package/assets/esri/core/workers/chunks/d3c3fb079ad97970f834.js +1 -0
- package/assets/esri/core/workers/chunks/daae21cf77864f3293ef.js +1 -0
- package/assets/esri/core/workers/chunks/dc2f93453dfa40f623ab.js +1 -0
- package/assets/esri/core/workers/chunks/dcf6024dc19428ff2b9d.js +1 -0
- package/assets/esri/core/workers/chunks/dd30b02c5978c1c5f511.js +1 -0
- package/assets/esri/core/workers/chunks/de3f140058aa0b907b65.js +1 -0
- package/assets/esri/core/workers/chunks/df375d1b0dab5ecbd1be.js +1 -0
- package/assets/esri/core/workers/chunks/{ef2c3febcceedc44b3ac.js → dfd4782b11d6fdca0492.js} +1 -1
- package/assets/esri/core/workers/chunks/{48cc58890fddbcf69cef.js → e121d15b883184ee83e7.js} +1 -1
- package/assets/esri/core/workers/chunks/{67e06d606c7fd2064adf.js → e2c6cd8dac01e129ccfe.js} +1 -1
- package/assets/esri/core/workers/chunks/e3b212f8af448ec29eef.js +1 -0
- package/assets/esri/core/workers/chunks/e4042e43f0081fe49f7b.js +1 -0
- package/assets/esri/core/workers/chunks/e480e7d5f40049a2053b.js +1 -0
- package/assets/esri/core/workers/chunks/eaab787a5f2445be5e5a.js +1 -0
- package/assets/esri/core/workers/chunks/edd36a1fc80b1d29907e.js +1 -0
- package/assets/esri/core/workers/chunks/ee0dc906cc7979080329.js +1 -0
- package/assets/esri/core/workers/chunks/f07fb9b3fa30d7ee1681.js +1 -0
- package/assets/esri/core/workers/chunks/f09bc86cd52224febfcb.js +1 -0
- package/assets/esri/core/workers/chunks/{037c67ef5c4398d5954d.js → f2dab9fcd90ce38ae3d1.js} +1 -1
- package/assets/esri/core/workers/chunks/f39c700f3db7db52b522.js +1 -0
- package/assets/esri/core/workers/chunks/f3b4159c0722df8ffe13.js +1 -0
- package/assets/esri/core/workers/chunks/f3dc0bc0e00635855a7a.js +1 -0
- package/assets/esri/core/workers/chunks/f45064066e1ab041a0b2.js +1 -0
- package/assets/esri/core/workers/chunks/{dc7aa0a1eb6c6e361f9f.js → f7398cfd8bbd041bd635.js} +1 -1
- package/assets/esri/core/workers/chunks/f9dc38761b314d33890f.js +1 -0
- package/assets/esri/core/workers/chunks/fe6dcb21570395e46ce8.js +1 -0
- package/assets/esri/core/workers/chunks/{9c4961213ac6ec283dd9.js → fefdd10bdd5a4c8d8ed0.js} +44 -47
- package/assets/esri/core/workers/chunks/ffe49d9e7df081bef4a5.js +1 -0
- package/assets/esri/themes/base/_core.scss +0 -2
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/Component.glsl.js +48 -48
- package/chunks/EmissionComposite.glsl.js +1 -1
- package/chunks/Fog.glsl.js +1 -1
- package/chunks/GaussianSplatDepth.glsl.js +15 -7
- package/chunks/GaussianSplatShadow.glsl.js +14 -4
- package/config.d.ts +12 -9
- package/config.js +1 -1
- package/form/FormTemplate.d.ts +1 -1
- package/form/elements/AttachmentElement.d.ts +2 -0
- package/form/elements/FieldElement.d.ts +2 -2
- package/form/elements/FieldElement.js +1 -1
- package/form/elements/RelationshipElement.d.ts +1 -1
- package/form/elements/TextElement.d.ts +2 -2
- package/form/elements/UtilityNetworkAssociationsElement.d.ts +1 -1
- package/form/elements/inputs/inputUtils.js +1 -1
- package/form/elements/inputs/types.d.ts +19 -0
- package/form/elements/inputs.d.ts +3 -2
- package/form/elements/inputs.js +1 -1
- package/interfaces.d.ts +0 -14
- package/kernel.js +1 -1
- package/layers/VideoLayer.d.ts +5 -5
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/orientedImagery/transformations/rotationUtils.js +2 -0
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/save/parquetLayerUtils.js +1 -1
- package/layers/support/vectorTileLayerLoader.js +1 -1
- package/package.json +2 -2
- package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
- package/views/2d/engine/vectorTiles/TileHandler.js +1 -1
- package/views/2d/engine/vectorTiles/style/GeoJSONVectorTileSource.js +1 -1
- package/views/2d/engine/vectorTiles/style/GeoJSONVectorTileSourceWorker.js +1 -1
- package/views/2d/engine/vectorTiles/style/geoJSONVectorTileUtils.js +2 -0
- package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
- package/views/2d/engine/webgl/collisions/LabelStore.js +1 -1
- package/views/2d/layers/VectorTileLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/support/visualVariableSimpleUtils.js +1 -1
- package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
- package/views/3d/support/ResourceController.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/TileAgent.js +1 -1
- package/views/3d/webgl-engine/Stage.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +23 -26
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +18 -21
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js +5 -5
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js +10 -12
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +22 -25
- package/views/3d/webgl-engine/effects/RenderPluginContext.js +2 -0
- package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/effects/glow/applyEmissiveGlow.glsl.js +3 -3
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatDepthRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeUtil.glsl.js +30 -35
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/EmissiveTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +62 -53
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/VideoView.d.ts +10 -0
- package/views/VideoView.js +1 -1
- package/views/layers/LayerView.d.ts +10 -2
- package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +2 -2
- package/widgets/Editor/EditorViewModel.d.ts +10 -12
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/support/EditableColumnTemplateMixin.js +1 -1
- package/widgets/OrientedImageryViewer/ImageMeasurementWorker.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementWorkerUtils.js +2 -0
- package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
- package/widgets/OrientedImageryViewer/support/superimposeUtils.js +1 -1
- package/widgets/support/iconUtils.js +1 -1
- package/assets/esri/core/workers/chunks/010f57ec7fdbedf78d02.js +0 -1
- package/assets/esri/core/workers/chunks/03f33cb78b5405ab7e23.js +0 -1
- package/assets/esri/core/workers/chunks/0487e1d7a7cecf7c1c25.js +0 -1
- package/assets/esri/core/workers/chunks/09300e74e5b014ce6269.js +0 -1
- package/assets/esri/core/workers/chunks/0d9c4c6c571ce26d356b.js +0 -1
- package/assets/esri/core/workers/chunks/112ed86f812e4400a7e0.js +0 -1
- package/assets/esri/core/workers/chunks/151e5799ede763a03ee2.js +0 -1
- package/assets/esri/core/workers/chunks/173f89c55a5c79ff065b.js +0 -1
- package/assets/esri/core/workers/chunks/2447d2e2a4a3ab8fcf94.js +0 -1
- package/assets/esri/core/workers/chunks/2a36fe3f3f257a779a1b.js +0 -1
- package/assets/esri/core/workers/chunks/2a97268000c6d03ef720.js +0 -1
- package/assets/esri/core/workers/chunks/2cf8172be83b10b11bdc.js +0 -1
- package/assets/esri/core/workers/chunks/2df37a9a95ceebb87a5f.js +0 -1
- package/assets/esri/core/workers/chunks/2e00c155e447e4930442.js +0 -1
- package/assets/esri/core/workers/chunks/2f91fd61019d2a37476d.js +0 -1
- package/assets/esri/core/workers/chunks/30af63b3b750142faadb.js +0 -1
- package/assets/esri/core/workers/chunks/3a47fc97c400fca2c736.js +0 -1
- package/assets/esri/core/workers/chunks/3cd04d23b73beaf79650.js +0 -1
- package/assets/esri/core/workers/chunks/426b4eb500fdfe9df325.js +0 -1
- package/assets/esri/core/workers/chunks/45367aa8e5c5d574de94.js +0 -1
- package/assets/esri/core/workers/chunks/47c97640ec525676918b.js +0 -1
- package/assets/esri/core/workers/chunks/47d074136a7f8e551a9a.js +0 -1
- package/assets/esri/core/workers/chunks/4a6b92ecbb1f1c55cc43.js +0 -1
- package/assets/esri/core/workers/chunks/4cb751dc8d00bdaeb04c.js +0 -1
- package/assets/esri/core/workers/chunks/518ab22f80c3300bcfff.js +0 -1
- package/assets/esri/core/workers/chunks/53ff68d4f9e365fc15cd.js +0 -1
- package/assets/esri/core/workers/chunks/58609bf94f72bc4f1952.js +0 -1
- package/assets/esri/core/workers/chunks/586a929bc037e23857af.js +0 -1
- package/assets/esri/core/workers/chunks/5c7780f804d789cb37f5.js +0 -1
- package/assets/esri/core/workers/chunks/5d76f4d97beee494bbbf.js +0 -1
- package/assets/esri/core/workers/chunks/603fdbbe9534c614928f.js +0 -1
- package/assets/esri/core/workers/chunks/611e3cdf67283c11576f.js +0 -1
- package/assets/esri/core/workers/chunks/6431480ba0fa8c8d487f.js +0 -1
- package/assets/esri/core/workers/chunks/652faf4359ac072c5dde.js +0 -1
- package/assets/esri/core/workers/chunks/65c98f3449044fa4fd79.js +0 -1
- package/assets/esri/core/workers/chunks/6b9961261241fdce0e94.js +0 -1
- package/assets/esri/core/workers/chunks/6dfe96b056bec30068df.js +0 -1
- package/assets/esri/core/workers/chunks/6f897b4e7ddd1dd1672b.js +0 -1
- package/assets/esri/core/workers/chunks/70cc2d79653d66e85b58.js +0 -1
- package/assets/esri/core/workers/chunks/7159d9c36869cd82599e.js +0 -29
- package/assets/esri/core/workers/chunks/7393f63043a1da3d05a6.js +0 -1
- package/assets/esri/core/workers/chunks/7449568eb2305bf2d650.js +0 -1
- package/assets/esri/core/workers/chunks/75d551a449bba61ce238.js +0 -1
- package/assets/esri/core/workers/chunks/76e27e36050a3dd9d249.js +0 -1
- package/assets/esri/core/workers/chunks/76f877e2d2493d56afab.js +0 -1
- package/assets/esri/core/workers/chunks/7748c2886d0122b40eeb.js +0 -1
- package/assets/esri/core/workers/chunks/78643f116677950ea29a.js +0 -1
- package/assets/esri/core/workers/chunks/78fbe330f16bdbdb886e.js +0 -1
- package/assets/esri/core/workers/chunks/7e0f04a5038e2a4f6e4b.js +0 -1
- package/assets/esri/core/workers/chunks/7f16ae01ccd9b6114d1c.js +0 -1
- package/assets/esri/core/workers/chunks/90153b5230b3a4985c14.js +0 -1
- package/assets/esri/core/workers/chunks/9189dfe19a2a2ccd5173.js +0 -1
- package/assets/esri/core/workers/chunks/943a0f140813ee4ab04a.js +0 -1
- package/assets/esri/core/workers/chunks/98be2f621801e230aa01.js +0 -1
- package/assets/esri/core/workers/chunks/99f51d5d9da6e9bfc430.js +0 -1
- package/assets/esri/core/workers/chunks/9aebe876b1a2fb075f9c.js +0 -1
- package/assets/esri/core/workers/chunks/9b6929faf649e81265fb.js +0 -1
- package/assets/esri/core/workers/chunks/9dd48e75b4e8d9811d81.js +0 -1
- package/assets/esri/core/workers/chunks/a163c6005aba3378edaa.js +0 -1
- package/assets/esri/core/workers/chunks/a8286febe371dc186aaa.js +0 -1
- package/assets/esri/core/workers/chunks/acb265a22be5e12f38e5.js +0 -1
- package/assets/esri/core/workers/chunks/b12acf1f694f82e00df9.js +0 -1
- package/assets/esri/core/workers/chunks/b83cef2d3f528726d492.js +0 -1
- package/assets/esri/core/workers/chunks/b9596d862da1ec342cd3.js +0 -1
- package/assets/esri/core/workers/chunks/bc1fcc9c897461e68e29.js +0 -1
- package/assets/esri/core/workers/chunks/bdc221d94300c225665a.js +0 -1
- package/assets/esri/core/workers/chunks/be97a629e2ae4d13ceb3.js +0 -1
- package/assets/esri/core/workers/chunks/bfb39590c548188f5052.js +0 -1
- package/assets/esri/core/workers/chunks/c2318c014e97ba519be8.js +0 -1
- package/assets/esri/core/workers/chunks/c62237c344e341619341.js +0 -1
- package/assets/esri/core/workers/chunks/cdb5c26fed7d9a97db49.js +0 -1
- package/assets/esri/core/workers/chunks/cdf0c7706d3e1221f49b.js +0 -1
- package/assets/esri/core/workers/chunks/cea0db3ee326f60610eb.js +0 -1
- package/assets/esri/core/workers/chunks/d7f2f1708d2a2668676c.js +0 -1
- package/assets/esri/core/workers/chunks/daf9b691817e83a11f3c.js +0 -1
- package/assets/esri/core/workers/chunks/db41490bd39d863305bf.js +0 -1
- package/assets/esri/core/workers/chunks/ddc95cdac6c06fc4794c.js +0 -1
- package/assets/esri/core/workers/chunks/df26ec0b508cf4716e0a.js +0 -1
- package/assets/esri/core/workers/chunks/e11159e3dc3353b27c57.js +0 -1
- package/assets/esri/core/workers/chunks/e4a57a0a9629faafd6c6.js +0 -1
- package/assets/esri/core/workers/chunks/ebc1a2ef3aed8aa29424.js +0 -1
- package/assets/esri/core/workers/chunks/ec1c4d66142b6efb0e8b.js +0 -1
- package/assets/esri/core/workers/chunks/ef12fa3574d4cbf8b084.js +0 -1
- package/assets/esri/core/workers/chunks/f2d56f5c15d5977e1d19.js +0 -1
- package/assets/esri/core/workers/chunks/f7bfa3d33b05b250ce33.js +0 -1
- package/assets/esri/core/workers/chunks/f905f1a1aa4c123cbe83.js +0 -1
- package/assets/esri/core/workers/chunks/fc139f251dc0523074e7.js +0 -1
- package/assets/esri/themes/base/widgets/_VideoPlayer.scss +0 -129
- package/assets/esri/widgets/VideoPlayer/t9n/messages.ar.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.bg.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.bs.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.ca.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.cs.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.da.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.de.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.el.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.en.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.es.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.et.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.fi.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.fr.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.he.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.hr.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.hu.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.id.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.it.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.ja.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.ko.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.lt.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.lv.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.nl.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.no.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.pl.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.pt-BR.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.pt-PT.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.ro.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.ru.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.sk.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.sl.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.sr.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.sv.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.th.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.tr.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.uk.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.vi.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.zh-CN.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.zh-HK.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.zh-TW.json +0 -1
- package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +0 -232
- package/widgets/VideoPlayer/VideoPlayerViewModel.js +0 -2
- package/widgets/VideoPlayer/components/MetadataSection.js +0 -2
- package/widgets/VideoPlayer/components/PlayerActionsGroup.js +0 -2
- package/widgets/VideoPlayer/components/PlayerControlsGroup.js +0 -2
- package/widgets/VideoPlayer/components/SettingsButton.js +0 -2
- package/widgets/VideoPlayer/css.js +0 -2
- package/widgets/VideoPlayer.d.ts +0 -119
- package/widgets/VideoPlayer.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{update as t}from"../../../../core/arrayUtils.js";import{createTask as n}from"../../../../core/asyncUtils.js";import has from"../../../../core/has.js";import{removeMaybe as r,abortMaybe as i,destroyMaybe as a,releaseMaybe as o,releaseReferencedMaybe as s}from"../../../../core/maybe.js";import{throwIfAborted as c}from"../../../../core/promiseUtils.js";import{watch as l,syncAndInitial as u,initial as d,sync as f}from"../../../../core/reactiveUtils.js";import{signal as p}from"../../../../core/signal.js";import{property as m,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{equals as g,invert as _,multiply as v,copy as y}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as b,create as x}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as ee}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{fromValues as te,ZEROS as S}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{pruneIndexArrays as ne}from"../../../../geometry/support/Indices.js";import{InternalRenderCategory as C,RenderNodeOutput as w,AllRenderNodeOutputs as T,AllInternalRenderNodeOutputs as E}from"../../webgl.js";import{minNearDistanceInMeters as re}from"../../state/NearFarHeuristic.js";import{debugFlags as ie}from"../../support/debugFlags.js";import{FBOCache as ae}from"../core/FBOCache.js";import{RenderPassManager as oe}from"../core/renderPasses/RenderPassManager.js";import{isColor as se}from"../core/shaderLibrary/ShaderOutput.js";import{RenderNodes as ce}from"../effects/RenderNodes.js";import{RenderPluginManager as le}from"../effects/RenderPluginManager.js";import{WeatherFader as ue}from"../effects/WeatherFader.js";import{innerAtmosphereFadeStart as de}from"../effects/atmosphere/atmosphereUtils.js";import{Blit as fe}from"../effects/blit/Blit.js";import{maxHighlightsPerChannel as pe,renderHighlightBuffer as me}from"../effects/highlight/Highlight.js";import{OITBlend as D}from"../effects/transparency/OITBlend.js";import{AnimationTimer as he}from"./AnimationTimer.js";import{AnimationTimeStep as ge}from"./AnimationTimeStep.js";import{BoundingInfo as _e}from"./BoundingInfo.js";import{Compositor as ve}from"./Compositor.js";import{DepthRange as O}from"./DepthRange.js";import{depthRangeFromScene as k}from"./depthRangeUtils.js";import{MainFramebuffer as ye}from"./MainFramebuffer.js";import{NavigationDepthCache as be}from"./NavigationDepthCache.js";import{blendingColorAlphaClear as A}from"./OrderIndependentTransparency.js";import{RenderContext as j,defaultRenderOccludedMask as M}from"./RenderContext.js";import{RendererBase as N}from"./RendererBase.js";import{setupFeatureDefaults as P}from"./RenderFeature.js";import{RenderPluginInput as xe}from"./RenderPluginInput.js";import{ShadowMap as Se}from"./ShadowMap.js";import Ce from"./SliceHelper.js";import{MergedRenderer as we}from"../materials/renderers/MergedRenderer.js";import{RenderSceneResult as F}from"../parts/renderUtils.js";import{RendererPerformanceInfo as I,PerformanceCategory as L}from"../statistics/RendererPerformanceInfo.js";import{PixelType as Te,ColorAttachment0 as R,ColorAttachment1 as z,ColorAttachment2 as B,DrawBufferNone as Ee}from"../../../webgl/enums.js";const De=has(`disable-feature:async-navigation-3d-depth-readback`);let V=class extends N{constructor(e,t,n,r,i){super({stage:e}),this._techniques=n,this._rctx=r,this._requestRender=i,this._pluginsHas={occludedHudElements:!1,hudElements:!1,water:!1},this.renderPassManager=new oe,this._isRendering=!1,this._backgroundColor=te(0,0,0,1),this._sliceHelper=new Ce,this._shadowAccumulator=null,this._shadowCastOptions=null,this.sceneDepthRange=p(O.Infinite),this._state=p(2),this._hasAnimations=!1,this._animationTimestep=new ge,this._loadEdgeViewTask=null,this._edgeViewCallbacks=[],this._reprojectionMatrixVersion=p(0),this._renderHiddenTransparentEdges=()=>{},this._pluginInput=new xe,this._hasTransparentGeometry=!1,this._releaseNodeInputs=e=>{for(let t of je)e.some(({name:e})=>e===t)&&this._pluginInput.release(t)},this._testsNeedsDepth=!1,this._fboCache=new ae(r),this._compositor=new ve(r,n),this._renderStateFeatures=p(P(e.view.qualityProfile));let a=new Se(this._fboCache,e.viewingMode);this._renderContext=new j(this._rctx,a,n),this._framebuffer=new ye(this._fboCache,this._bindParameters),this._performanceInfo=new I(this._rctx),this._blit=new fe(n),this.navigationDepthCache=new be(this._rctx,this._fboCache,n,()=>this._requestRender(0)),this._nodes=new ce(this._renderContext),this._plugins=new le({renderContext:this._renderContext,techniques:n,materials:t,requestRender:i,controller:e}),this._plugins.add(this.renderPassManager),this.weatherFader=new ue({view:e.view,context:this._renderContext}),this.addHandles([l(()=>e.view.state.camera,()=>i(),u),l(()=>ie.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES,e=>{this._renderHiddenTransparentEdges=e?()=>this._renderEdges(0):()=>{},i()},d),l(()=>e.view.environment.background?.color,e=>{let t=e?e.toUnitRGBA():S;ee(this._backgroundColor,t[0]*t[3],t[1]*t[3],t[2]*t[3],t[3]),i()},u),l(()=>e.view.environmentView.shadowsAvailable,e=>{this._bindParameters.shadowMap.enabled=e,this._requestRender(1)},u),l(()=>this._bindParameters.clouds.fadeFactor,()=>{this._bindParameters.fadeLighting(),this._requestRender(2)},f),l(()=>this._bindParameters.clouds.data?.state,()=>i(),f),l(()=>e.view.state.highlights,e=>{this._bindParameters.highlights=e,i()},d),l(()=>e.view.environment.lighting?.type===`sun`,e=>{this._bindParameters.enableFillLights=e,this._requestRender()},u)])}destroy(){this._gpuTimerHandle=r(this._gpuTimerHandle),this._nodes.destroy(),this._framebuffer.dispose(),this._shadowAccumulator=null,this._shadowCastOptions=null,this._loadEdgeViewTask=i(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,_e.prune(),we.prune(),ne()}get renderContext(){return this._renderContext}get _bindParameters(){return this._renderContext.bind}get _oitBlend(){return this._oitBlendOrNil??=new D(this._techniques),this._oitBlendOrNil}get performanceInfo(){return this._performanceInfo}updateRenderFeatures(e){this._renderStateFeatures.value=P(e),this.updateGlobalIllumination(this.stage.view.environment.lighting.globalIllumination),this._requestRender()}updateGlobalIllumination(e){let t=P(this.stage.view.qualityProfile);for(let n of[0,1,2])this.setFeatureEnabled(11,n,e),this.setFeatureEnabled(10,n,e&&n===2),this.setFeatureEnabled(3,n,!e&&(t.get(n,3)??!1))}isFeatureEnabled(e,t=this._state.value){return this._renderStateFeatures.value.get(t,e)??!1}setFeatureEnabled(e,t,n){this.isFeatureEnabled(e,t)!==n&&(this._renderStateFeatures.mutate(r=>r.set(t,e,n)),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._nodes.produces(C.AMBIENT_ILLUMINATION)}get hasGlobalIllumination(){return this.stage.renderView?.globalIllumination?.enabled??!1}get hasGlobalIlluminationHighQuality(){let e=this.stage.renderView?.globalIllumination;return this.hasGlobalIllumination&&e?.hasHighQuality===!0}get hasSMAA(){return this.isFeatureEnabled(0)}get _emissions(){let e=this._plugins.emissions;return this._hasTransparentGeometry?e:+(e===1||e===3)}get hasFloatBlend(){return this._rctx.driverTest.floatBufferBlend.result&&this.isFeatureEnabled(9)}get highResolutionAtmosphere(){return this.isFeatureEnabled(2)}get fboCache(){return this._fboCache}setShadowAccumulator(e){this._shadowAccumulator=e,this._shadowCastOptions&&e.setParameters(this._shadowCastOptions)}_releaseFBOs(){this._bindParameters.hudOcclusion=o(this._bindParameters.hudOcclusion),this._bindParameters.depth=null}_disposeOffscreenBuffers(){this._framebuffer.dispose();let e=this._bindParameters;e.globalIllumination=o(e.globalIllumination),e.reprojection.lastFrameDepth=o(e.reprojection.lastFrameDepth),e.reprojection.lastFrameEmission=o(e.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||=n(async e=>{let{EdgeView:t}=await import(`./edgeRendering/EdgeView.js`);c(e);let n=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:Me(this.stage.view.resourceController)});return this.addHandles(l(()=>n.updating,()=>this._requestRender(),f)),this._requestRender(),this._edgeViewCallbacks.forEach(e=>e(n)),this._edgeViewCallbacks.length=0,n}),this._loadEdgeViewTask.promise}withEdgeView(e){this.loadEdgeView().catch(()=>{}),this._edgeView==null?this._edgeViewCallbacks.push(e):e(this._edgeView)}get edgeView(){return this._edgeView}get isCameraFinal(){return this._reprojectionMatrixVersion.value>=0&&g(this._bindParameters.reprojection.matrix,b)}set _reprojectionMatrix(e){t(this._bindParameters.reprojection.matrix,e)&&this._reprojectionMatrixVersion.value++}get shadowsEnabled(){return!!this._bindParameters.shadowMap.enabled}setParameters(e){e.shadowCast&&(this._shadowCastOptions={...this._shadowCastOptions,...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):!1}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&&!!(this.plugins.renderOccludedFlags&8)}get occludedRequiresIntegratedMeshStencil(){return this._plugins.produces(0,0)&&this._plugins.produces(0,9)}updateHasFlags(){let has=this._pluginsHas;has.occludedHudElements=this._plugins.produces(0,13),has.hudElements=has.occludedHudElements||this._plugins.produces(0,...J),has.water=this._plugins.produces(4,19),this._bindParameters.hasOccludees=this._plugins.hasOccludees,this._requestRender()}updateAnimation(e,t){this._animationTimer??=new he(e.camera,t),this._animationTimer.advance(e.camera,t,this._animationTimeDilation);let n=this._hasAnimations;return this._hasAnimations=this._plugins.updateAnimation(this._animationTimer),this._hasAnimations=this._nodes.updateAnimation(this._animationTimer)||this._hasAnimations,this._hasAnimations!==n&&(this._gpuTimerHandle=n?r(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,n=!1){try{this._isRendering=!0,this._needsOffscreenPrepass(e.camera,t)&&this._render(e,3,n).color?.release();let r=this._render(e,t,n);return t!==0&&this._disposeOffscreenBuffers(),r}catch(e){console.error(`Exception during rendering: ${e}:\n${e.stack}`)}finally{this._isRendering=!1}return new F(this._pluginInput.get(w.FINAL),null)}_needsOffscreenPrepass(e,t){return(t===1||t===2)&&(this.hasGlobalIllumination||this.hasReflections)&&(!this._framebuffer.hasColor||!this._bindParameters.reprojection.lastFrameCamera.equals(e))}_render(e,t,n){let r=t===0;this.performanceInfo.startFrame(),this.fboCache.frameStart(),this.fboCache.interactive=r,this._disposeBindBuffers();let{camera:i,contentCamera:a,mode:c,alignPixelEnabled:l}=e;this._state.value=c,this._bindParameters.frameRendererTarget=t,this._bindParameters.output=0,this._bindParameters.emissions=this._emissions,this._bindParameters.alignPixelEnabled=l,this._bindParameters.metersPerRenderUnit=this.stage.view.renderCoordsHelper.unitInMeters,this._bindParameters.decorations=!n,this._bindParameters.mainDepth=null,this._bindParameters.useFloatBlend.value=this.hasFloatBlend;let u=!n||!this._sliceHelper.isDecoration;this._bindParameters.slicePlane=u?this._sliceHelper.plane:null,this._bindParameters.viewshedEnabled=this._nodes.produces(C.VIEWSHED),this._bindParameters.laserlinesEnabled=this._nodes.produces(C.LASERLINES),this._bindParameters.shadowAnalysisEnabled=!!this._shadowAccumulator?.active,this._bindParameters.cutFillComputationEnabled=this._nodes.produces(C.CUTFILL_COMPUTATION),this._bindParameters.cutFillVisualizationEnabled=this._nodes.produces(C.CUTFILL),this._ensureBindParameters(i,a),this._plugins.sortTestsTransparentOrderedSlots(ke),this._plugins.prepareRender(),this._hasTransparentGeometry=this._plugins.produces(1,...U),this._renderOverlay(),i.setGLViewport(this._rctx);let d=this._framebuffer,f=d.initialize(i.fullWidth,i.fullHeight,this._backgroundColor);this.hasReflections?(f?.setName(`last frame color`),this._bindParameters.reprojection.lastFrameColor?.release(),this._bindParameters.reprojection.lastFrameColor=f):f?.release(),this._bindParameters.hasShadowHighlights=this._needsShadowHighlight&&!n,this._precompilePrepasses(),this.performanceInfo.advance(L.PREPARE);let p=this._computeShadowDepthRange(i);this._pluginInput.set(`normals`,this._renderNormals()),this._renderAmbientIlluminationAndDepth(),this._renderShadowMap(i,a,this._bindParameters.lighting.mainLight.direction,p),this._renderShadowAccumulation(p),d.bind(),this._bindParameters.mainDepth=d.depth.attachment,this._precompileShaders(r),this._bindParameters.output=0,this._renderOpaque(),this._renderPreTransparent(),this._renderTransparent(),this._3dGeometryRendered(),d.update(e=>this._renderNodes(C.CUTFILL_COMPUTATION,e)),this._pluginInput.set(C.FOCUSAREA_MASK,this._renderFocusAreaMask()),d.update(e=>this._renderNodes(C.TRANSPARENT_ENVIRONMENT,e)),d.update(e=>this._renderNodes(C.VIEWSHED,e)),d.update(e=>this._renderNodes(C.LASERLINES,e)),this._nodes.requireGeometryDepth&&(this._bindParameters.depth=s(this._bindParameters.depth)),d.update(e=>this._renderNodes(C.FOCUSAREA,e)),this._pluginInput.release(C.FOCUSAREA_MASK),d.update(e=>this._renderNodes(C.CUTFILL,e)),this._pluginInput.release(C.GROUND_DEPTH),d.update(e=>this._renderNodes(C.OCCLUDED,e)),this._pluginInput.set(`highlights`,this._renderHighlightPrepass());let m=t===2?this._renderObjectAndLayerIdColor():null;d.update(e=>this._renderNodes(w.COMPOSITE,e)),this._bindParameters.shadowMap.disposeOutputs(),this._bindParameters.shadowHighlight=o(this._bindParameters.shadowHighlight),d.update(e=>this._renderNodes(C.ANTIALIASING,e));let h=this._hasTransparentGeometry?2:1,g=this._bindParameters.emissions;this._bindParameters.emissions=0,this._hasHUDHighlights&&d.update(e=>this._renderHUD(h,e)),d.update(e=>this._renderNodes(C.HIGHLIGHT,e)),this._hasHUDHighlights||d.update(e=>this._renderHUD(h,e)),this._bindParameters.emissions=g,d.update(e=>this._renderNodes(C.MAGNIFIER,e)),d.update(e=>this._renderNodes(w.FINAL,e)),r&&(this._blit.toFramebuffer(d.color,this._bindParameters),De||c!==2&&c!==0||this.navigationDepthCache.update(this._bindParameters,d.depth.attachment,this._renderContext.time)),this._bindParameters.reprojection.lastFrameDepth?.release(),this.hasGlobalIllumination&&(this._bindParameters.reprojection.lastFrameDepth=this._bindParameters.depth),this._testsNeedsDepth&&(this._bindParameters.depth=s(this._bindParameters.depth)),this._releaseFBOs(),d.releaseDepth(),this._bindParameters.reprojection.lastFrameCamera.copyFrom(this._bindParameters.camera),this.fboCache.frameEnd();let _;return r||(_=d.color,_.retain()),this.performanceInfo.finishFrame(),new F(_,m)}_precompileShaders(e){++this._plugins.context.techniques.precompiling;let t=this._bindParameters;t.output=0;let n=t.emissions;if(this._precompileOpaqueGeometry(),this._nodes.precompile(C.OPAQUE_ENVIRONMENT,C.GAUSSIAN_SPLAT,C.OPAQUE_OCCLUSION_QUERY,C.VOXEL),this._precompileOpaqueGeometry(),t.output=3,this._plugins.precompile(...W),t.output=0,this._plugins.precompile(...W),this._hasTransparentGeometry){let 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(C.FOCUSAREA_MASK),this._compositor.precompile(this._usesPremultipliedAlphaBlit,!!this._needsEdges,t),this._hasTransparentGeometry||this._plugins.precompile(15),this._nodes.precompile(C.TRANSPARENT_ENVIRONMENT,C.VIEWSHED,C.CUTFILL_COMPUTATION,C.CUTFILL,C.LASERLINES,C.FOCUSAREA,C.OCCLUDED,C.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=n,this._hasHighlights&&(t.highlights.forEach((e,n)=>{t.highlightLevel=n,this._precompileAllGeometry(10),this._hasHUDHighlights&&this._plugins.precompile(13,12)}),t.highlightLevel=null,this._nodes.precompile(C.HIGHLIGHT)),t.highlightMixTexture=null,this._nodes.precompile(w.COMPOSITE,C.MAGNIFIER),this._nodes.precompile(C.TRANSPARENT_NO_DEPTH),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}_renderFocusAreaMask(){let e=this._nodes.produce(C.FOCUSAREA_MASK,this._pluginInput);return e&&this.performanceInfo.advance(L.FOCUS_AREA_MASK),e}_renderObjectAndLayerIdColor(){if(!this._nodes.produces(C.OBJECT_AND_LAYER_ID_COLOR))return null;let e=this._bindParameters.output;++this._techniques.precompiling;let{width:t,height:n}=this._framebuffer.size,r=this.fboCache.acquire(t,n,C.OBJECT_AND_LAYER_ID_COLOR).acquireDepth(14);return r=this._renderNodes(C.OBJECT_AND_LAYER_ID_COLOR,r),--this._techniques.precompiling,this._bindParameters.output=e,r}finish(e){this._hasAnimations||this._animationTimestep.clear();let t=this.performanceInfo.gpuSamplingEnabled,n=e===0,r=n?this.performanceInfo.elapsedTime:0;if(n||t){let e=0;t?e=this.performanceInfo.totalGPUTimeSampler.last:(this._rctx.gl.finish(),e=this.performanceInfo.elapsedTime);let i=Math.max(r,e);this._animationTimestep.frame(i,n)}}readAccumulatedShadow(e){return this._shadowAccumulator?.readAccumulatedShadow(e[0],e[1])??0}readMainDepth(e,t){let{mainDepth:n,camera:r}=this._bindParameters;if(!n)return;let i=this.fboCache.acquire(this._framebuffer.size.width,this._framebuffer.size.height,`linear depth`);this._rctx.bindFramebuffer(i.fbo),r.setGLViewport(this._rctx),this._rctx.setScissorRect(e[0],e[1],e[2],e[3]),this._rctx.setScissorTestEnabled(!0),this._rctx.clearFramebuffer(S),this._compositor.blitDepthToLinearDepth(this._bindParameters,n),this._rctx.setScissorTestEnabled(!1),this._rctx.setScissorRect(0,0,this._rctx.gl.canvas.width,this._rctx.gl.canvas.width),i.fbo?.readPixels(e[0],e[1],e[2],e[3],6408,Te.UNSIGNED_BYTE,t),i.release()}get _needsEdges(){return this._edgeView?.shouldRender()?this._edgeView:null}_renderEdges(e){let t=this._needsEdges;if(!t)return;let{width:n,height:r}=this._framebuffer.size,i=this.fboCache.acquire(n,r,`edges`);i.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(i.fbo),this._rctx.clearFramebuffer(S),t.render(this._bindParameters,e),i.detachDepth(),this._framebuffer.bind(),this._compositor.composite(this._bindParameters,i.getTexture()),i.release(),this.performanceInfo.advance(e===1?L.OPAQUE_EDGES:L.TRANSPARENT_EDGES)}_renderOverlay(){this._bindParameters.overlay=this.overlay?.render(this._renderContext.time),this._bindParameters.overlay&&this.performanceInfo.advance(L.OVERLAY)}_renderShadowMap(e,t,n,r){if(!this.shadowsEnabled)return;let i=this._bindParameters.shadowMap;if(i.start(e,n,r,this.isFeatureEnabled(5),this.stage.view.qualitySettings.maximumPixelRatio),this._needsShadowHighlight){this._renderShadowCascades(6,i),e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,t);let n=this._bindParameters.output;this._bindParameters.output=0,this._bindParameters.shadowHighlight=this._nodes.produce(C.SHADOW_HIGHLIGHT,this._pluginInput),this._bindParameters.output=n,i.disposeOutput(6),i.clear(),this._renderShadowCascades(7,i)}else this._renderShadowCascades(5);e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,this._bindParameters.contentCamera),this._needsShadowHighlight&&(this._bindParameters.depth=s(this._bindParameters.depth)),this.performanceInfo.advance(C.SHADOWMAP)}_precompileShadowCascades(e){this._bindParameters.shadowMap.cascades.length!==0&&this._precompileAllGeometry(e)}_renderShadowCascades(e,t=this._bindParameters.shadowMap){let n=this._bindParameters.output,r=e!==6;t.bindFramebuffer();for(let n of t.cascades)n.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(n.camera,n.camera),this.renderAllGeometry(e),r&&this._renderShadowNodes(t.renderTarget);t.finish(e),this._bindParameters.output=n}_renderShadowNodes(e){this._renderInternalNodeCategory(C.SHADOWMAP,e)}get _needsDepth(){return+this._nodes.requireGeometryDepth+ +this.hasReflections+ +this.hasGlobalIllumination+ +this._testsNeedsDepth+ +this._needsShadowHighlight}get _usesPremultipliedAlphaBlit(){return this._pluginsHas.hudElements}_renderAmbientIlluminationAndDepth(){let e=this._bindParameters;e.depth=o(this._bindParameters.depth);let t=this._pluginInput.get(`normals`);if(t){let n=this._nodes.produce(C.AMBIENT_ILLUMINATION,this._pluginInput);this._pluginInput.set(C.AMBIENT_ILLUMINATION,n),this._releaseGlobalIlluminationBuffers(),e.ssao=this.hasGlobalIllumination?null:n,e.globalIllumination=this.hasGlobalIllumination?n:null,e.globalIlluminationEnabled=e.globalIllumination!=null,n&&this.performanceInfo.advance(this.hasGlobalIlluminationHighQuality?L.AMBIENT_ILLUMINATION_HIGH_QUALITY:L.AMBIENT_ILLUMINATION);let r=this._needsDepth;if(r){let n=t.obtainAttachment(R);this._rctx.bindFramebuffer(t.fbo),this._rctx.clear(1024),this._renderGeometryWithoutNormals(3),e.depth=t.obtainDepthTexture(),e.depth?.retain(r-1),t.attachColor(n,R),n?.release(),this.performanceInfo.advance(L.DEPTH)}else t.detachDepth();this.hasAmbientIllumination&&this._pluginInput.release(`normals`)}else this._releaseGlobalIlluminationBuffers(),e.ssao=null,this._pluginInput.set(C.AMBIENT_ILLUMINATION,null),this._renderAllGeometryDepth()}_renderAllGeometryDepth(){let e=this._needsDepth;if(e===0)return;let{width:t,height:n}=this._framebuffer.size,r=this.fboCache.acquire(t,n,`geometry depth`,14);this._rctx.bindFramebuffer(r.fbo),this._rctx.clear(1280),this.renderAllGeometry(3),this._renderGaussianSplatPrepassDepth(r),this._bindParameters.depth=r.obtainDepthTexture(),this._bindParameters.depth?.retain(e-1),r.release(),this.performanceInfo.advance(L.DEPTH)}_renderGaussianSplatPrepassDepth(e){let t=this._shadowAccumulator;if(!t?.active||!t.requireGeometryDepth)return;let n=this._bindParameters.output;this._bindParameters.output=3,this._renderInternalNodeCategory(C.GAUSSIAN_SPLAT_DEPTH,e),this._bindParameters.output=n}_renderGaussianSplatDepthAndNormals(e){let t=this._bindParameters.output;this._bindParameters.output=4,this._renderInternalNodeCategory(C.GAUSSIAN_SPLAT_DEPTH,e),this._bindParameters.output=t}get _needsShadowDepthRange(){return this._bindParameters.shadowMap.enabled||!!this._shadowAccumulator?.active}_computeShadowDepthRange(e){if(!this._needsShadowDepthRange)return O.Zero;let t=k(e,this._plugins.plugins,this.stage.layers,0);return t.union(this._plugins.queryDepthRange(e)),t.union(this._nodes.queryDepthRange(C.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||(this.stage.view.renderCoordsHelper?.getAltitude(e.eye)??0)<de){this.sceneDepthRange.value=O.Infinite;return}let t=e.clone();t.near=re,t.far=1e10;let n=k(t,this._plugins.plugins,this.stage.layers,1);n.union(this._plugins.queryDepthRange(t)),this.sceneDepthRange.value.equals(n)||(this.sceneDepthRange.value=n)}get _normalsRequired(){return this._nodes.require(`normals`,...T,C.VIEWSHED,C.LASERLINES)+ +!!this.hasAmbientIllumination}_precompilePrepasses(){let e=!!this._normalsRequired;if(e?(this._precompilePlugins(4,G),this._needsDepth&&this._precompilePlugins(3,K)):this._needsDepth&&this._precompileAllGeometry(3),this.shadowsEnabled&&(this._needsShadowHighlight?(this._nodes.precompile(C.SHADOW_HIGHLIGHT),this._precompileShadowCascades(6),this._precompileShadowCascades(7)):this._precompileShadowCascades(5)),this._shadowAccumulator?.active&&(this._nodes.precompile(C.SHADOW_ACCUMULATION),this._precompileAllGeometry(5)),this._shadowAccumulator?.active||e){let t=this._bindParameters.output;this._bindParameters.output=e?4:3,this._nodes.precompile(C.GAUSSIAN_SPLAT_DEPTH),this._bindParameters.output=t}(this.shadowsEnabled||this._shadowAccumulator?.active)&&this._nodes.precompile(C.SHADOWMAP),this.hasAmbientIllumination&&e&&this._nodes.precompile(C.AMBIENT_ILLUMINATION)}_renderNormals(){let e=this._normalsRequired;if(e===0)return;let{width:t,height:n}=this._framebuffer.size,r=this.fboCache.acquire(t,n,`normals`);r.acquireDepth(14),this._rctx.bindFramebuffer(r.fbo),this._rctx.clearFramebuffer(S,!0,!0),this._bindParameters.output=4,this._plugins.render(...G),this._renderGaussianSplatDepthAndNormals(r);let i=this._nodes.optional(`normals`,...T,C.VIEWSHED);return r.retain(e+i-1),this.performanceInfo.advance(L.NORMALS),r}_releaseGlobalIlluminationBuffers(){let e=this._bindParameters;e.reprojection.lastFrameDepth=o(e.reprojection.lastFrameDepth),e.reprojection.lastFrameEmission=o(e.reprojection.lastFrameEmission),e.globalIllumination=s(e.globalIllumination),e.globalIlluminationEnabled=!1}_precompileAllGeometry(e){let t=this._bindParameters.output;this._bindParameters.output=e,this._precompileOpaqueGeometry(),this._precompileTransparentGeometry(),this._plugins.precompile(...W),this._bindParameters.output=t}renderAllGeometry(e){this._bindParameters.output=e,this._renderOpaqueAndTransparentGeometry(e),this._renderTransparentGround()}precompileSlots(e,...t){for(let n of t)this._bindParameters.slot=n,e.precompile(this._renderContext)}precompileOccludedSlots(e,t){for(let n of t)this._renderContext.renderOccludedMask=n,this.precompileSlots(e,...q);this._renderContext.renderOccludedMask=M}renderSlots(e,...t){for(let n of t)this._bindParameters.slot=n,e.forAll(e=>{let 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,...q),this._renderContext.renderOccludedMask=M}renderHUD(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(...Ae[e])}_renderHUDElements(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(16),this.renderHUD(e),this._bindParameters.hudRenderStyle=e,this._plugins.render(14)}precompileViewshedShadowMap(){let e=this._bindParameters.output;this._bindParameters.output=8,this._precompileAllGeometry(8),this._nodes.precompile(C.SHADOWMAP),this._bindParameters.output=e}precompileCutFillDepth(){this._precompilePlugins(9,Y)}_precompilePlugins(e,t){let n=this._bindParameters.output;this._bindParameters.output=e,this._plugins.precompile(...t),this._bindParameters.output=n}renderViewshedShadowMap(e,t){let{camera:n,contentCamera:r}=this._bindParameters,i=this._bindParameters.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this.renderAllGeometry(8),this._renderShadowNodes(t),this._ensureBindParametersCamera(n,r),this._bindParameters.camera.setGLViewport(this._rctx),this._bindParameters.output=i}renderCutFillDepth(e){let{camera:t,contentCamera:n}=this._bindParameters,r=this._bindParameters.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this._bindParameters.output=9,this._plugins.render(...Y),this._ensureBindParametersCamera(t,n),t.setGLViewport(this._rctx),this._bindParameters.output=r}get _needsGroundDepth(){return this._bindParameters.cutFillVisualizationEnabled}_blitGroundDepth(){if(!this._needsGroundDepth)return null;let{width:e,height:t}=this._framebuffer.size,n=this.fboCache.acquire(e,t,C.GROUND_DEPTH,14);return this._rctx.blitFramebuffer(this._framebuffer.color.fbo,n.fbo,256),this._framebuffer.bind(),n}_renderOpaqueAndTransparentGeometry(e){this._bindParameters.output=e,this._renderOpaqueGeometry(),this._renderTransparentGeometry()}_renderGeometryWithoutNormals(e){this._bindParameters.output=e,this._plugins.render(...K)}_precompileOpaqueGeometry(){this._needsOpaquePass&&(this._plugins.precompile(...H),this._nodes.precompile(`opaque-color`))}_renderOpaqueGeometry(){this._plugins.render(...H)}_renderTransparentGeometry(){this._plugins.render(...U),this._hasTransparentGeometry&&this._plugins.render(15)}_renderTransparentGround(){this._plugins.render(...W)}_precompileHUD(e){if(!this._pluginsHas.hudElements)return;let t=this._bindParameters.output,n=this._bindParameters.hudRenderStyle,r=this._bindParameters.emissions;this._bindParameters.emissions=0,this._bindParameters.hudRenderStyle=e,this._bindParameters.output=1,this._plugins.precompile(...J),this._bindParameters.output=2,this._plugins.precompile(...J),this._bindParameters.output=0,this._oitBlend.precompile(this._bindParameters,!1,1),this._hasHighlights&&(this._bindParameters.output=10,this._plugins.precompile(...J)),this._bindParameters.emissions=r,this._bindParameters.output=t,this._bindParameters.hudRenderStyle=n}_renderHUD(e,t){if(!this._pluginsHas.hudElements)return t;let n=this._renderOIT(1,e);this._rctx.bindFramebuffer(t.fbo);let r=!!t.getTexture(z);return this._compositor.compositePreMultipliedAlpha(this._bindParameters,n.getTexture(),r),n.release(),this.performanceInfo.advance(e===0?L.HUD_OCCLUDED:L.HUD),t}get _needsShadowHighlight(){return this.shadowsEnabled&&this._plugins.produces(6,2)}_renderHighlightPrepass(){if(!this._hasHighlights)return;let{fboCache:e,_rctx:t,_bindParameters:n}=this,{width:r,height:i}=this._framebuffer.size,{highlights:a}=n,o=a.length>pe?3:1,s=e.acquire(r,i,`highlights`,o);s.acquireDepth(14);let c=this._plugins.produces(10,0);return c&&this._framebuffer.color.fbo&&s.fbo&&t.blitFramebuffer(this._framebuffer.color.fbo,s.fbo,1024),t.bindFramebuffer(s.fbo),t.gl.clearBufferuiv(6144,0,[0,0,0,0]),c||t.clear(1024),this._bindParameters.output=10,t.bindFramebuffer(s.fbo),me(t,e,r,i,n,()=>this._renderHighlightGeometries()),s.detachDepth(),this.performanceInfo.advance(L.HIGHLIGHTS),s.retain(this._nodes.require(`highlights`,...E)+this._nodes.optional(`highlights`,...E)-1),s}_renderHighlightGeometries(){this._plugins.render(...Oe),this._rctx.clear(256),this._renderHUDElements(2)}_renderShadowAccumulation(e){let t=this._shadowAccumulator;if(!t)return;t.updateDepthRange(e);let n=t.requireGeometryDepth;this._bindParameters.output=0;let r=this._nodes.produce(C.SHADOW_ACCUMULATION,this._pluginInput);t.didAccumulate&&this.performanceInfo.advance(L.ACCUMULATED_SHADOWS),this._pluginInput.set(C.SHADOW_ACCUMULATION,null),r?.release(),n&&(this._bindParameters.depth=s(this._bindParameters.depth))}renderShadowAccumulationShadowMap(e,t,n,r,i){let a=this.stage.view.qualitySettings.maximumPixelRatio;n.start(e,r,i,!0,a),this._renderShadowCascades(5,n),e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,t)}_precompileTransparentGeometry(){se(this._bindParameters.output)?(this._bindParameters.output=1,this._plugins.precompile(...U),this._hasTransparentGeometry&&this._plugins.precompile(15),this._bindParameters.output=2,this._plugins.precompile(...U),this._hasTransparentGeometry&&this._plugins.precompile(15),this._bindParameters.output=0):this._plugins.precompile(...U)}_renderOIT(e,t=2){let n=e===1,{width:r,height:i}=this._framebuffer.size,a=n?()=>this._renderHUDElements(t):()=>this._renderTransparentGeometry(),s=this._bindParameters,c=s.useFloatBlend.value?8:5,l=s.output;s.output=1;let u=n?`oit hud`:`oit`,d=this.fboCache.acquire(r,i,u,c).acquireColor(z,this.hasFloatBlend?7:0,`oit alpha`),f=s.hasEmission&&(e===0||t!==1);f&&d.acquireColor(B,c,`oit emissive`),n||d.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(d.fbo),this._rctx.clearFramebuffer(A),f&&this._rctx.clearBuffer(2,A),a(),d.detachDepth(),s.output=2;let p=this.fboCache.acquire(r,i,n?`oit front hud`:`oit front`);f&&p.acquireColor(z,c,`oit front emissive`),n?p.acquireDepth(this._hudDepthFormat):p.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(p.fbo),this._rctx.clearFramebuffer(S,n),a(),p.detachDepth();let m=this._pluginsHas.occludedHudElements&&!n,h=m&&s.emissions!==0?B:z;s.hudOcclusion=o(this._bindParameters.hudOcclusion),s.output=0;let g;return n?(g=this.fboCache.acquire(r,i,`oit composite hud`),this._rctx.bindFramebuffer(g.fbo),this._rctx.setClearColor(0,0,0,1e-13),this._rctx.clear(16384)):(s.emissions!==0&&this._framebuffer.ensureEmissionAttachment(),m&&(this._framebuffer.color.acquireColor(h,0,`hud occlusion`),this._rctx.clearBuffer(h-R,S)),this._framebuffer.bind()),this._oitBlend.blend(this._rctx,d,p,s,m,e,this._fboCache.debugCallback),g?.detachDepth(),n||(f&&(this._bindParameters.emissions=3),m&&(s.hudOcclusion=this._framebuffer.color.obtainAttachment(h))),p.release(),d.release(),s.output=l,g}get _hudDepthFormat(){return this.isFeatureEnabled(7)?14:13}get _needsOpaquePass(){return this.plugins.produces(0,...H)||this.plugins.produces(5,...H)||this.plugins.produces(3,3)}_renderOpaque(){let e=this._needsOpaquePass;e&&(this._plugins.render(0,1),this._pluginInput.set(C.GROUND_DEPTH,this._blitGroundDepth()),this._plugins.render(2,3));let t=this._framebuffer;t.update(t=>this._renderNodes(w.OPAQUE,t,e)),this.fboCache.debugCallback?.(w.OPAQUE,t.color.fbo),t.update(e=>this._renderNodes(C.OPAQUE_ENVIRONMENT,e)),this.fboCache.debugCallback?.(C.OPAQUE_ENVIRONMENT,t.color.fbo),this._renderEdges(1)}_renderPreTransparent(){this._framebuffer.update(e=>this._renderNodes(C.GAUSSIAN_SPLAT,e)),this.fboCache.debugCallback?.(C.GAUSSIAN_SPLAT,this._framebuffer.color.fbo),this._framebuffer.update(e=>this._renderNodes(C.OPAQUE_OCCLUSION_QUERY,e)),this.fboCache.debugCallback?.(C.OPAQUE_OCCLUSION_QUERY,this._framebuffer.color.fbo),this._framebuffer.update(e=>this._renderNodes(C.VOXEL,e)),this.fboCache.debugCallback?.(C.VOXEL,this._framebuffer.color.fbo)}_renderTransparent(){let e=this._framebuffer;if(this._renderHiddenTransparentEdges(),this._hasTransparentGeometry&&this._renderOIT(0),e.update(e=>this._renderNodes(w.TRANSPARENT,e,this._hasTransparentGeometry)),this.fboCache.debugCallback?.(w.TRANSPARENT,e.color.fbo),this._hasTransparentGeometry||this._plugins.render(15),this._renderEdges(0),this._bindParameters.ssao=o(this._bindParameters.ssao),e.update(e=>this._renderNodes(C.TRANSPARENT_NO_DEPTH,e)),this.fboCache.debugCallback?.(C.TRANSPARENT_NO_DEPTH,e.color.fbo),this._framebuffer.bind(),this._plugins.render(8),this._bindParameters.hasEmission){let e=this._rctx.setDrawBuffers([Ee,z]);this._bindParameters.transparentWithoutDepthEmissionDimmingPass=!0,this._plugins.render(8),this._bindParameters.transparentWithoutDepthEmissionDimmingPass=!1,this._rctx.setDrawBuffers(e)}this.performanceInfo.advance(L.TRANSPARENT_MATERIAL_WITHOUT_DEPTH)}_renderNodes(e,t,n=!1){if(t.setName(e),this._pluginInput.set(e,t),!this._nodes.produces(e))return n&&this.performanceInfo.advance(e),t;let r=this._nodes.render(t,this._pluginInput,this._releaseNodeInputs);return this.performanceInfo.advance(e),this._fboCache.debugCallback?.(e,r.fbo),r}_renderInternalNodeCategory(e,t){if(!t)return;let n=t.name;try{this._renderNodes(e,t)}finally{this._pluginInput.set(e,null),t.setName(n)}}_3dGeometryRendered(){let e=this._bindParameters;this.hasReflections&&(e.depth=s(e.depth),e.reprojection.lastFrameColor=s(e.reprojection.lastFrameColor)),e.shadowMap.disposeOutput(5);let t=this._framebuffer.color.getAttachment(z)?.attachment;if(this.hasGlobalIllumination&&t){let{width:n,height:r}=this._framebuffer.size,i=e.useFloatBlend.value?8:5;e.reprojection.lastFrameEmission=this.fboCache.acquire(n,r,`emissive`,i),this._blit.blitTexture(t,e,e.reprojection.lastFrameEmission.fbo)}}_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(){this.stage.viewingMode===1&&(this._bindParameters.clouds.data&&(this._bindParameters.clouds.fade(this._bindParameters.camera,this.renderContext.time,this.stage.view.qualitySettings.fadeDuration,this.stage.view.state.stationary),this.weatherFader?.cleanupCubemap()),this._bindParameters.snowCover=this.weatherFader?.snowCover??0)}_ensureBindParametersScreenSpaceReflections(){let{time:e}=this.renderContext,{screenSpaceReflections:t}=this._bindParameters;if(this.hasReflections){this._ssrEnableTime??=e;let n=this.stage.view.qualitySettings.fadeDuration;t.fadeFactor=n>0?Math.min(n,e-this._ssrEnableTime)/n:1,t.fadeFactor<1&&this._requestRender()}else this._ssrEnableTime=null}_ensureBindParametersReprojection(){if(!(this.hasReflections||this.hasGlobalIllumination)){this._reprojectionMatrix=b;return}let{reprojection:e,camera:t}=this._bindParameters,{lastFrameCamera:n}=e,r=!n.equals(t);if(r?(_(Z,t.viewMatrix),_(X,t.projectionMatrix),v(Q,Z,X),v(Q,n.viewMatrix,Q),v(Q,n.projectionMatrix,Q),this._reprojectionMatrix=Q):this._reprojectionMatrix=b,this.hasGlobalIllumination){let{viewMatrix:t}=e;r?(v($,n.viewMatrix,Z),y(t,$)):y(t,b)}}addRenderNode(e){this._nodes.add(e),this._requestRender()}removeRenderNode(e){this._nodes.remove(e),this._requestRender()}updateLighting(e,t,n,r){this._bindParameters.updateLighting(e,t,n,r),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([m({readOnly:!0})],V.prototype,`highResolutionAtmosphere`,null),e([m()],V.prototype,`_edgeView`,void 0),e([m()],V.prototype,`updating`,null),V=e([h(`esri.views.3d.webgl-engine.lib.Renderer`)],V);const H=[0,1,2,3],U=[7,6,4,5],W=[7,6],G=[0,1,2,4,...W],K=[3,5],q=[2,4,8],J=[16,12,14,13],Oe=[4,5,2,3,0,1,...W],ke=[4,8,5,11],Ae={0:[13],1:[12],2:[13,12],3:[13,12]},Y=[0,1,...W],je=[`normals`,`highlights`],X=x(),Z=x(),Q=x(),$=x();function Me(e){return t=>e.immediate.schedule(t)}export{V as Renderer};
|
|
2
|
+
import{__decorate as e}from"tslib";import{update as t}from"../../../../core/arrayUtils.js";import{createTask as n}from"../../../../core/asyncUtils.js";import has from"../../../../core/has.js";import{removeMaybe as r,abortMaybe as i,destroyMaybe as a,releaseMaybe as o,releaseReferencedMaybe as s}from"../../../../core/maybe.js";import{throwIfAborted as c}from"../../../../core/promiseUtils.js";import{watch as l,syncAndInitial as u,initial as d,sync as f}from"../../../../core/reactiveUtils.js";import{signal as p}from"../../../../core/signal.js";import{property as m,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{equals as g,invert as _,multiply as v,copy as y}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as b,create as x}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as ee}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{fromValues as te,ZEROS as S}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{pruneIndexArrays as ne}from"../../../../geometry/support/Indices.js";import{InternalRenderCategory as C,RenderNodeOutput as w,AllRenderNodeOutputs as T,AllInternalRenderNodeOutputs as E}from"../../webgl.js";import{minNearDistanceInMeters as re}from"../../state/NearFarHeuristic.js";import{debugFlags as ie}from"../../support/debugFlags.js";import{FBOCache as ae}from"../core/FBOCache.js";import{RenderPassManager as oe}from"../core/renderPasses/RenderPassManager.js";import{isColor as se}from"../core/shaderLibrary/ShaderOutput.js";import{RenderNodes as ce}from"../effects/RenderNodes.js";import{RenderPluginContext as le}from"../effects/RenderPluginContext.js";import{RenderPluginManager as D}from"../effects/RenderPluginManager.js";import{WeatherFader as O}from"../effects/WeatherFader.js";import{innerAtmosphereFadeStart as ue}from"../effects/atmosphere/atmosphereUtils.js";import{Blit as de}from"../effects/blit/Blit.js";import{maxHighlightsPerChannel as fe,renderHighlightBuffer as pe}from"../effects/highlight/Highlight.js";import{OITBlend as me}from"../effects/transparency/OITBlend.js";import{AnimationTimer as he}from"./AnimationTimer.js";import{AnimationTimeStep as ge}from"./AnimationTimeStep.js";import{BoundingInfo as _e}from"./BoundingInfo.js";import{Compositor as ve}from"./Compositor.js";import{DepthRange as k}from"./DepthRange.js";import{depthRangeFromScene as A}from"./depthRangeUtils.js";import{MainFramebuffer as ye}from"./MainFramebuffer.js";import{NavigationDepthCache as be}from"./NavigationDepthCache.js";import{blendingColorAlphaClear as j}from"./OrderIndependentTransparency.js";import{RenderContext as M,defaultRenderOccludedMask as N}from"./RenderContext.js";import{RendererBase as xe}from"./RendererBase.js";import{setupFeatureDefaults as P}from"./RenderFeature.js";import{RenderPluginInput as F}from"./RenderPluginInput.js";import{ShadowMap as Se}from"./ShadowMap.js";import Ce from"./SliceHelper.js";import{MergedRenderer as we}from"../materials/renderers/MergedRenderer.js";import{RenderSceneResult as I}from"../parts/renderUtils.js";import{RendererPerformanceInfo as Te,PerformanceCategory as L}from"../statistics/RendererPerformanceInfo.js";import{PixelType as Ee,ColorAttachment0 as R,ColorAttachment1 as z,ColorAttachment2 as B,DrawBufferNone as De}from"../../../webgl/enums.js";const Oe=has(`disable-feature:async-navigation-3d-depth-readback`);let V=class extends xe{constructor(e,t,n,r,i){super({stage:e}),this._techniques=n,this._rctx=r,this._requestRender=i,this._pluginsHas={occludedHudElements:!1,hudElements:!1,water:!1},this.renderPassManager=new oe,this._isRendering=!1,this._backgroundColor=te(0,0,0,1),this._sliceHelper=new Ce,this._shadowAccumulator=null,this._shadowCastOptions=null,this.sceneDepthRange=p(k.Infinite),this._state=p(2),this._hasAnimations=!1,this._animationTimestep=new ge,this._loadEdgeViewTask=null,this._edgeViewCallbacks=[],this._reprojectionMatrixVersion=p(0),this._renderHiddenTransparentEdges=()=>{},this._pluginInput=new F,this._hasTransparentGeometry=!1,this._releaseNodeInputs=e=>{for(let t of Me)e.some(({name:e})=>e===t)&&this._pluginInput.release(t)},this._testsNeedsDepth=!1,this._fboCache=new ae(r),this._compositor=new ve(r,n),this._renderStateFeatures=p(P(e.view.qualityProfile));let a=new Se(this._fboCache,e.viewingMode);this._renderContext=new M(this._rctx,a,n),this._framebuffer=new ye(this._fboCache,this._bindParameters),this._performanceInfo=new Te(this._rctx),this._blit=new de(n),this.navigationDepthCache=new be(this._rctx,this._fboCache,n,()=>this._requestRender(0)),this._nodes=new ce(this._renderContext),this._plugins=new D(new le(this._renderContext,n,t,e,i)),this._plugins.add(this.renderPassManager),this.weatherFader=new O({view:e.view,context:this._renderContext}),this.addHandles([l(()=>e.view.state.camera,()=>i(),u),l(()=>ie.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES,e=>{this._renderHiddenTransparentEdges=e?()=>this._renderEdges(0):()=>{},i()},d),l(()=>e.view.environment.background?.color,e=>{let t=e?e.toUnitRGBA():S;ee(this._backgroundColor,t[0]*t[3],t[1]*t[3],t[2]*t[3],t[3]),i()},u),l(()=>e.view.environmentView.shadowsAvailable,e=>{this._bindParameters.shadowMap.enabled=e,this._requestRender(1)},u),l(()=>this._bindParameters.clouds.fadeFactor,()=>{this._bindParameters.fadeLighting(),this._requestRender(2)},f),l(()=>this._bindParameters.clouds.data?.state,()=>i(),f),l(()=>e.view.state.highlights,e=>{this._bindParameters.highlights=e,i()},d),l(()=>e.view.environment.lighting?.type===`sun`,e=>{this._bindParameters.enableFillLights=e,this._requestRender()},u)])}destroy(){this._gpuTimerHandle=r(this._gpuTimerHandle),this._nodes.destroy(),this._framebuffer.dispose(),this._shadowAccumulator=null,this._shadowCastOptions=null,this._loadEdgeViewTask=i(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,_e.prune(),we.prune(),ne()}get renderContext(){return this._renderContext}get _bindParameters(){return this._renderContext.bind}get _oitBlend(){return this._oitBlendOrNil??=new me(this._techniques),this._oitBlendOrNil}get performanceInfo(){return this._performanceInfo}updateRenderFeatures(e){this._renderStateFeatures.value=P(e),this.updateGlobalIllumination(this.stage.view.environment.lighting.globalIllumination),this._requestRender()}updateGlobalIllumination(e){let t=P(this.stage.view.qualityProfile);for(let n of[0,1,2])this.setFeatureEnabled(11,n,e),this.setFeatureEnabled(10,n,e&&n===2),this.setFeatureEnabled(3,n,!e&&(t.get(n,3)??!1))}isFeatureEnabled(e,t=this._state.value){return this._renderStateFeatures.value.get(t,e)??!1}setFeatureEnabled(e,t,n){this.isFeatureEnabled(e,t)!==n&&(this._renderStateFeatures.mutate(r=>r.set(t,e,n)),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._nodes.produces(C.AMBIENT_ILLUMINATION)}get hasGlobalIllumination(){return this.stage.renderView?.globalIllumination?.enabled??!1}get hasGlobalIlluminationHighQuality(){let e=this.stage.renderView?.globalIllumination;return this.hasGlobalIllumination&&e?.hasHighQuality===!0}get hasSMAA(){return this.isFeatureEnabled(0)}get _emissions(){let e=this._plugins.emissions;return this._hasTransparentGeometry?e:+(e===1||e===3)}get hasFloatBlend(){return this._rctx.driverTest.floatBufferBlend.result&&this.isFeatureEnabled(9)}get highResolutionAtmosphere(){return this.isFeatureEnabled(2)}get fboCache(){return this._fboCache}setShadowAccumulator(e){this._shadowAccumulator=e,this._shadowCastOptions&&e.setParameters(this._shadowCastOptions)}_releaseFBOs(){this._bindParameters.hudOcclusion=o(this._bindParameters.hudOcclusion),this._bindParameters.depth=null}_disposeOffscreenBuffers(){this._framebuffer.dispose();let e=this._bindParameters;e.globalIllumination=o(e.globalIllumination),e.reprojection.lastFrameDepth=o(e.reprojection.lastFrameDepth),e.reprojection.lastFrameEmission=o(e.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||=n(async e=>{let{EdgeView:t}=await import(`./edgeRendering/EdgeView.js`);c(e);let n=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:Ne(this.stage.view.resourceController)});return this.addHandles(l(()=>n.updating,()=>this._requestRender(),f)),this._requestRender(),this._edgeViewCallbacks.forEach(e=>e(n)),this._edgeViewCallbacks.length=0,n}),this._loadEdgeViewTask.promise}withEdgeView(e){this.loadEdgeView().catch(()=>{}),this._edgeView==null?this._edgeViewCallbacks.push(e):e(this._edgeView)}get edgeView(){return this._edgeView}get isCameraFinal(){return this._reprojectionMatrixVersion.value>=0&&g(this._bindParameters.reprojection.matrix,b)}set _reprojectionMatrix(e){t(this._bindParameters.reprojection.matrix,e)&&this._reprojectionMatrixVersion.value++}get shadowsEnabled(){return!!this._bindParameters.shadowMap.enabled}setParameters(e){e.shadowCast&&(this._shadowCastOptions={...this._shadowCastOptions,...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):!1}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&&!!(this.plugins.renderOccludedFlags&8)}get occludedRequiresIntegratedMeshStencil(){return this._plugins.produces(0,0)&&this._plugins.produces(0,9)}updateHasFlags(){let has=this._pluginsHas;has.occludedHudElements=this._plugins.produces(0,13),has.hudElements=has.occludedHudElements||this._plugins.produces(0,...J),has.water=this._plugins.produces(4,19),this._bindParameters.hasOccludees=this._plugins.hasOccludees,this._requestRender()}updateAnimation(e,t){this._animationTimer??=new he(e.camera,t),this._animationTimer.advance(e.camera,t,this._animationTimeDilation);let n=this._hasAnimations;return this._hasAnimations=this._plugins.updateAnimation(this._animationTimer),this._hasAnimations=this._nodes.updateAnimation(this._animationTimer)||this._hasAnimations,this._hasAnimations!==n&&(this._gpuTimerHandle=n?r(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,n=!1){try{this._isRendering=!0,this._needsOffscreenPrepass(e.camera,t)&&this._render(e,3,n).color?.release();let r=this._render(e,t,n);return t!==0&&this._disposeOffscreenBuffers(),r}catch(e){console.error(`Exception during rendering: ${e}:\n${e.stack}`)}finally{this._isRendering=!1}return new I(this._pluginInput.get(w.FINAL),null)}_needsOffscreenPrepass(e,t){return(t===1||t===2)&&(this.hasGlobalIllumination||this.hasReflections)&&(!this._framebuffer.hasColor||!this._bindParameters.reprojection.lastFrameCamera.equals(e))}_render(e,t,n){let r=t===0;this.performanceInfo.startFrame(),this.fboCache.frameStart(),this.fboCache.interactive=r,this._disposeBindBuffers();let{camera:i,contentCamera:a,mode:c,alignPixelEnabled:l}=e;this._state.value=c,this._bindParameters.frameRendererTarget=t,this._bindParameters.output=0,this._bindParameters.emissions=this._emissions,this._bindParameters.alignPixelEnabled=l,this._bindParameters.metersPerRenderUnit=this.stage.view.renderCoordsHelper.unitInMeters,this._bindParameters.decorations=!n,this._bindParameters.mainDepth=null,this._bindParameters.useFloatBlend.value=this.hasFloatBlend;let u=!n||!this._sliceHelper.isDecoration;this._bindParameters.slicePlane=u?this._sliceHelper.plane:null,this._bindParameters.viewshedEnabled=this._nodes.produces(C.VIEWSHED),this._bindParameters.laserlinesEnabled=this._nodes.produces(C.LASERLINES),this._bindParameters.shadowAnalysisEnabled=!!this._shadowAccumulator?.active,this._bindParameters.cutFillComputationEnabled=this._nodes.produces(C.CUTFILL_COMPUTATION),this._bindParameters.cutFillVisualizationEnabled=this._nodes.produces(C.CUTFILL),this._ensureBindParameters(i,a),this._plugins.sortTestsTransparentOrderedSlots(Ae),this._plugins.prepareRender(),this._hasTransparentGeometry=this._plugins.produces(1,...U),this._renderOverlay(),i.setGLViewport(this._rctx);let d=this._framebuffer,f=d.initialize(i.fullWidth,i.fullHeight,this._backgroundColor);this.hasReflections?(f?.setName(`last frame color`),this._bindParameters.reprojection.lastFrameColor?.release(),this._bindParameters.reprojection.lastFrameColor=f):f?.release(),this._bindParameters.hasShadowHighlights=this._needsShadowHighlight&&!n,this._precompilePrepasses(),this.performanceInfo.advance(L.PREPARE);let p=this._computeShadowDepthRange(i);this._pluginInput.set(`normals`,this._renderNormals()),this._renderAmbientIlluminationAndDepth(),this._renderShadowMap(i,a,this._bindParameters.lighting.mainLight.direction,p),this._renderShadowAccumulation(p),d.bind(),this._bindParameters.mainDepth=d.depth.attachment,this._precompileShaders(r),this._bindParameters.output=0,this._renderOpaque(),this._renderPreTransparent(),this._renderTransparent(),this._3dGeometryRendered(),d.update(e=>this._renderNodes(C.CUTFILL_COMPUTATION,e)),this._pluginInput.set(C.FOCUSAREA_MASK,this._renderFocusAreaMask()),d.update(e=>this._renderNodes(C.TRANSPARENT_ENVIRONMENT,e)),d.update(e=>this._renderNodes(C.VIEWSHED,e)),d.update(e=>this._renderNodes(C.LASERLINES,e)),this._nodes.requireGeometryDepth&&(this._bindParameters.depth=s(this._bindParameters.depth)),d.update(e=>this._renderNodes(C.FOCUSAREA,e)),this._pluginInput.release(C.FOCUSAREA_MASK),d.update(e=>this._renderNodes(C.CUTFILL,e)),this._pluginInput.release(C.GROUND_DEPTH),d.update(e=>this._renderNodes(C.OCCLUDED,e)),this._pluginInput.set(`highlights`,this._renderHighlightPrepass());let m=t===2?this._renderObjectAndLayerIdColor():null;d.update(e=>this._renderNodes(w.COMPOSITE,e)),this._bindParameters.shadowMap.disposeOutputs(),this._bindParameters.shadowHighlight=o(this._bindParameters.shadowHighlight),d.update(e=>this._renderNodes(C.ANTIALIASING,e));let h=this._hasTransparentGeometry?2:1,g=this._bindParameters.emissions;this._bindParameters.emissions=0,this._hasHUDHighlights&&d.update(e=>this._renderHUD(h,e)),d.update(e=>this._renderNodes(C.HIGHLIGHT,e)),this._hasHUDHighlights||d.update(e=>this._renderHUD(h,e)),this._bindParameters.emissions=g,d.update(e=>this._renderNodes(C.MAGNIFIER,e)),d.update(e=>this._renderNodes(w.FINAL,e)),r&&(this._blit.toFramebuffer(d.color,this._bindParameters),Oe||c!==2&&c!==0||this.navigationDepthCache.update(this._bindParameters,d.depth.attachment,this._renderContext.time)),this._bindParameters.reprojection.lastFrameDepth?.release(),this.hasGlobalIllumination&&(this._bindParameters.reprojection.lastFrameDepth=this._bindParameters.depth),this._testsNeedsDepth&&(this._bindParameters.depth=s(this._bindParameters.depth)),this._releaseFBOs(),d.releaseDepth(),this._bindParameters.reprojection.lastFrameCamera.copyFrom(this._bindParameters.camera),this.fboCache.frameEnd();let _;return r||(_=d.color,_.retain()),this.performanceInfo.finishFrame(),new I(_,m)}_precompileShaders(e){++this._plugins.context.techniques.precompiling;let t=this._bindParameters;t.output=0;let n=t.emissions;if(this._precompileOpaqueGeometry(),this._nodes.precompile(C.OPAQUE_ENVIRONMENT,C.GAUSSIAN_SPLAT,C.OPAQUE_OCCLUSION_QUERY,C.VOXEL),this._precompileOpaqueGeometry(),t.output=3,this._plugins.precompile(...W),t.output=0,this._plugins.precompile(...W),this._hasTransparentGeometry){let 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(C.FOCUSAREA_MASK),this._compositor.precompile(this._usesPremultipliedAlphaBlit,!!this._needsEdges,t),this._hasTransparentGeometry||this._plugins.precompile(15),this._nodes.precompile(C.TRANSPARENT_ENVIRONMENT,C.VIEWSHED,C.CUTFILL_COMPUTATION,C.CUTFILL,C.LASERLINES,C.FOCUSAREA,C.OCCLUDED,C.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=n,this._hasHighlights&&(t.highlights.forEach((e,n)=>{t.highlightLevel=n,this._precompileAllGeometry(10),this._hasHUDHighlights&&this._plugins.precompile(13,12)}),t.highlightLevel=null,this._nodes.precompile(C.HIGHLIGHT)),t.highlightMixTexture=null,this._nodes.precompile(w.COMPOSITE,C.MAGNIFIER),this._nodes.precompile(C.TRANSPARENT_NO_DEPTH),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}_renderFocusAreaMask(){let e=this._nodes.produce(C.FOCUSAREA_MASK,this._pluginInput);return e&&this.performanceInfo.advance(L.FOCUS_AREA_MASK),e}_renderObjectAndLayerIdColor(){if(!this._nodes.produces(C.OBJECT_AND_LAYER_ID_COLOR))return null;let e=this._bindParameters.output;++this._techniques.precompiling;let{width:t,height:n}=this._framebuffer.size,r=this.fboCache.acquire(t,n,C.OBJECT_AND_LAYER_ID_COLOR).acquireDepth(14);return r=this._renderNodes(C.OBJECT_AND_LAYER_ID_COLOR,r),--this._techniques.precompiling,this._bindParameters.output=e,r}finish(e){this._hasAnimations||this._animationTimestep.clear();let t=this.performanceInfo.gpuSamplingEnabled,n=e===0,r=n?this.performanceInfo.elapsedTime:0;if(n||t){let e=0;t?e=this.performanceInfo.totalGPUTimeSampler.last:(this._rctx.gl.finish(),e=this.performanceInfo.elapsedTime);let i=Math.max(r,e);this._animationTimestep.frame(i,n)}}readAccumulatedShadow(e){return this._shadowAccumulator?.readAccumulatedShadow(e[0],e[1])??0}readMainDepth(e,t){let{mainDepth:n,camera:r}=this._bindParameters;if(!n)return;let i=this.fboCache.acquire(this._framebuffer.size.width,this._framebuffer.size.height,`linear depth`);this._rctx.bindFramebuffer(i.fbo),r.setGLViewport(this._rctx),this._rctx.setScissorRect(e[0],e[1],e[2],e[3]),this._rctx.setScissorTestEnabled(!0),this._rctx.clearFramebuffer(S),this._compositor.blitDepthToLinearDepth(this._bindParameters,n),this._rctx.setScissorTestEnabled(!1),this._rctx.setScissorRect(0,0,this._rctx.gl.canvas.width,this._rctx.gl.canvas.width),i.fbo?.readPixels(e[0],e[1],e[2],e[3],6408,Ee.UNSIGNED_BYTE,t),i.release()}get _needsEdges(){return this._edgeView?.shouldRender()?this._edgeView:null}_renderEdges(e){let t=this._needsEdges;if(!t)return;let{width:n,height:r}=this._framebuffer.size,i=this.fboCache.acquire(n,r,`edges`);i.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(i.fbo),this._rctx.clearFramebuffer(S),t.render(this._bindParameters,e),i.detachDepth(),this._framebuffer.bind(),this._compositor.composite(this._bindParameters,i.getTexture()),i.release(),this.performanceInfo.advance(e===1?L.OPAQUE_EDGES:L.TRANSPARENT_EDGES)}_renderOverlay(){this._bindParameters.overlay=this.overlay?.render(this._renderContext.time),this._bindParameters.overlay&&this.performanceInfo.advance(L.OVERLAY)}_renderShadowMap(e,t,n,r){if(!this.shadowsEnabled)return;let i=this._bindParameters.shadowMap;if(i.start(e,n,r,this.isFeatureEnabled(5),this.stage.view.qualitySettings.maximumPixelRatio),this._needsShadowHighlight){this._renderShadowCascades(6,i),e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,t);let n=this._bindParameters.output;this._bindParameters.output=0,this._bindParameters.shadowHighlight=this._nodes.produce(C.SHADOW_HIGHLIGHT,this._pluginInput),this._bindParameters.output=n,i.disposeOutput(6),i.clear(),this._renderShadowCascades(7,i)}else this._renderShadowCascades(5);e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,this._bindParameters.contentCamera),this._needsShadowHighlight&&(this._bindParameters.depth=s(this._bindParameters.depth)),this.performanceInfo.advance(C.SHADOWMAP)}_precompileShadowCascades(e){this._bindParameters.shadowMap.cascades.length!==0&&this._precompileAllGeometry(e)}_renderShadowCascades(e,t=this._bindParameters.shadowMap){let n=this._bindParameters.output,r=e!==6;t.bindFramebuffer();for(let n of t.cascades)n.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(n.camera,n.camera),this.renderAllGeometry(e),r&&this._renderShadowNodes(t.renderTarget);t.finish(e),this._bindParameters.output=n}_renderShadowNodes(e){this._renderInternalNodeCategory(C.SHADOWMAP,e)}get _needsDepth(){return+this._nodes.requireGeometryDepth+ +this.hasReflections+ +this.hasGlobalIllumination+ +this._testsNeedsDepth+ +this._needsShadowHighlight}get _usesPremultipliedAlphaBlit(){return this._pluginsHas.hudElements}_renderAmbientIlluminationAndDepth(){let e=this._bindParameters;e.depth=o(this._bindParameters.depth);let t=this._pluginInput.get(`normals`);if(t){let n=this._nodes.produce(C.AMBIENT_ILLUMINATION,this._pluginInput);this._pluginInput.set(C.AMBIENT_ILLUMINATION,n),this._releaseGlobalIlluminationBuffers(),e.ssao=this.hasGlobalIllumination?null:n,e.globalIllumination=this.hasGlobalIllumination?n:null,e.globalIlluminationEnabled=e.globalIllumination!=null,n&&this.performanceInfo.advance(this.hasGlobalIlluminationHighQuality?L.AMBIENT_ILLUMINATION_HIGH_QUALITY:L.AMBIENT_ILLUMINATION);let r=this._needsDepth;if(r){let n=t.obtainAttachment(R);this._rctx.bindFramebuffer(t.fbo),this._rctx.clear(1024),this._renderGeometryWithoutNormals(3),e.depth=t.obtainDepthTexture(),e.depth?.retain(r-1),t.attachColor(n,R),n?.release(),this.performanceInfo.advance(L.DEPTH)}else t.detachDepth();this.hasAmbientIllumination&&this._pluginInput.release(`normals`)}else this._releaseGlobalIlluminationBuffers(),e.ssao=null,this._pluginInput.set(C.AMBIENT_ILLUMINATION,null),this._renderAllGeometryDepth()}_renderAllGeometryDepth(){let e=this._needsDepth;if(e===0)return;let{width:t,height:n}=this._framebuffer.size,r=this.fboCache.acquire(t,n,`geometry depth`,14);this._rctx.bindFramebuffer(r.fbo),this._rctx.clear(1280),this.renderAllGeometry(3),this._renderGaussianSplatPrepassDepth(r),this._bindParameters.depth=r.obtainDepthTexture(),this._bindParameters.depth?.retain(e-1),r.release(),this.performanceInfo.advance(L.DEPTH)}_renderGaussianSplatPrepassDepth(e){let t=this._shadowAccumulator;if(!t?.active||!t.requireGeometryDepth)return;let n=this._bindParameters.output;this._bindParameters.output=3,this._renderInternalNodeCategory(C.GAUSSIAN_SPLAT_DEPTH,e),this._bindParameters.output=n}_renderGaussianSplatDepthAndNormals(e){let t=this._bindParameters.output;this._bindParameters.output=4,this._renderInternalNodeCategory(C.GAUSSIAN_SPLAT_DEPTH,e),this._bindParameters.output=t}get _needsShadowDepthRange(){return this._bindParameters.shadowMap.enabled||!!this._shadowAccumulator?.active}_computeShadowDepthRange(e){if(!this._needsShadowDepthRange)return k.Zero;let t=A(e,this._plugins.plugins,this.stage.layers,0);return t.union(this._plugins.queryDepthRange(e)),t.union(this._nodes.queryDepthRange(C.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||(this.stage.view.renderCoordsHelper?.getAltitude(e.eye)??0)<ue){this.sceneDepthRange.value=k.Infinite;return}let t=e.clone();t.near=re,t.far=1e10;let n=A(t,this._plugins.plugins,this.stage.layers,1);n.union(this._plugins.queryDepthRange(t)),this.sceneDepthRange.value.equals(n)||(this.sceneDepthRange.value=n)}get _normalsRequired(){return this._nodes.require(`normals`,...T,C.VIEWSHED,C.LASERLINES)+ +!!this.hasAmbientIllumination}_precompilePrepasses(){let e=!!this._normalsRequired;if(e?(this._precompilePlugins(4,G),this._needsDepth&&this._precompilePlugins(3,K)):this._needsDepth&&this._precompileAllGeometry(3),this.shadowsEnabled&&(this._needsShadowHighlight?(this._nodes.precompile(C.SHADOW_HIGHLIGHT),this._precompileShadowCascades(6),this._precompileShadowCascades(7)):this._precompileShadowCascades(5)),this._shadowAccumulator?.active&&(this._nodes.precompile(C.SHADOW_ACCUMULATION),this._precompileAllGeometry(5)),this._shadowAccumulator?.active||e){let t=this._bindParameters.output;this._bindParameters.output=e?4:3,this._nodes.precompile(C.GAUSSIAN_SPLAT_DEPTH),this._bindParameters.output=t}(this.shadowsEnabled||this._shadowAccumulator?.active)&&this._nodes.precompile(C.SHADOWMAP),this.hasAmbientIllumination&&e&&this._nodes.precompile(C.AMBIENT_ILLUMINATION)}_renderNormals(){let e=this._normalsRequired;if(e===0)return;let{width:t,height:n}=this._framebuffer.size,r=this.fboCache.acquire(t,n,`normals`);r.acquireDepth(14),this._rctx.bindFramebuffer(r.fbo),this._rctx.clearFramebuffer(S,!0,!0),this._bindParameters.output=4,this._plugins.render(...G),this._renderGaussianSplatDepthAndNormals(r);let i=this._nodes.optional(`normals`,...T,C.VIEWSHED);return r.retain(e+i-1),this.performanceInfo.advance(L.NORMALS),r}_releaseGlobalIlluminationBuffers(){let e=this._bindParameters;e.reprojection.lastFrameDepth=o(e.reprojection.lastFrameDepth),e.reprojection.lastFrameEmission=o(e.reprojection.lastFrameEmission),e.globalIllumination=s(e.globalIllumination),e.globalIlluminationEnabled=!1}_precompileAllGeometry(e){let t=this._bindParameters.output;this._bindParameters.output=e,this._precompileOpaqueGeometry(),this._precompileTransparentGeometry(),this._plugins.precompile(...W),this._bindParameters.output=t}renderAllGeometry(e){this._bindParameters.output=e,this._renderOpaqueAndTransparentGeometry(e),this._renderTransparentGround()}precompileSlots(e,...t){for(let n of t)this._bindParameters.slot=n,e.precompile(this._renderContext)}precompileOccludedSlots(e,t){for(let n of t)this._renderContext.renderOccludedMask=n,this.precompileSlots(e,...q);this._renderContext.renderOccludedMask=N}renderSlots(e,...t){for(let n of t)this._bindParameters.slot=n,e.forAll(e=>{let 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,...q),this._renderContext.renderOccludedMask=N}renderHUD(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(...je[e])}_renderHUDElements(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(16),this.renderHUD(e),this._bindParameters.hudRenderStyle=e,this._plugins.render(14)}precompileViewshedShadowMap(){let e=this._bindParameters.output;this._bindParameters.output=8,this._precompileAllGeometry(8),this._nodes.precompile(C.SHADOWMAP),this._bindParameters.output=e}precompileCutFillDepth(){this._precompilePlugins(9,Y)}_precompilePlugins(e,t){let n=this._bindParameters.output;this._bindParameters.output=e,this._plugins.precompile(...t),this._bindParameters.output=n}renderViewshedShadowMap(e,t){let{camera:n,contentCamera:r}=this._bindParameters,i=this._bindParameters.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this.renderAllGeometry(8),this._renderShadowNodes(t),this._ensureBindParametersCamera(n,r),this._bindParameters.camera.setGLViewport(this._rctx),this._bindParameters.output=i}renderCutFillDepth(e){let{camera:t,contentCamera:n}=this._bindParameters,r=this._bindParameters.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this._bindParameters.output=9,this._plugins.render(...Y),this._ensureBindParametersCamera(t,n),t.setGLViewport(this._rctx),this._bindParameters.output=r}get _needsGroundDepth(){return this._bindParameters.cutFillVisualizationEnabled}_blitGroundDepth(){if(!this._needsGroundDepth)return null;let{width:e,height:t}=this._framebuffer.size,n=this.fboCache.acquire(e,t,C.GROUND_DEPTH,14);return this._rctx.blitFramebuffer(this._framebuffer.color.fbo,n.fbo,256),this._framebuffer.bind(),n}_renderOpaqueAndTransparentGeometry(e){this._bindParameters.output=e,this._renderOpaqueGeometry(),this._renderTransparentGeometry()}_renderGeometryWithoutNormals(e){this._bindParameters.output=e,this._plugins.render(...K)}_precompileOpaqueGeometry(){this._needsOpaquePass&&(this._plugins.precompile(...H),this._nodes.precompile(`opaque-color`))}_renderOpaqueGeometry(){this._plugins.render(...H)}_renderTransparentGeometry(){this._plugins.render(...U),this._hasTransparentGeometry&&this._plugins.render(15)}_renderTransparentGround(){this._plugins.render(...W)}_precompileHUD(e){if(!this._pluginsHas.hudElements)return;let t=this._bindParameters.output,n=this._bindParameters.hudRenderStyle,r=this._bindParameters.emissions;this._bindParameters.emissions=0,this._bindParameters.hudRenderStyle=e,this._bindParameters.output=1,this._plugins.precompile(...J),this._bindParameters.output=2,this._plugins.precompile(...J),this._bindParameters.output=0,this._oitBlend.precompile(this._bindParameters,!1,1),this._hasHighlights&&(this._bindParameters.output=10,this._plugins.precompile(...J)),this._bindParameters.emissions=r,this._bindParameters.output=t,this._bindParameters.hudRenderStyle=n}_renderHUD(e,t){if(!this._pluginsHas.hudElements)return t;let n=this._renderOIT(1,e);this._rctx.bindFramebuffer(t.fbo);let r=!!t.getTexture(z);return this._compositor.compositePreMultipliedAlpha(this._bindParameters,n.getTexture(),r),n.release(),this.performanceInfo.advance(e===0?L.HUD_OCCLUDED:L.HUD),t}get _needsShadowHighlight(){return this.shadowsEnabled&&this._plugins.produces(6,2)}_renderHighlightPrepass(){if(!this._hasHighlights)return;let{fboCache:e,_rctx:t,_bindParameters:n}=this,{width:r,height:i}=this._framebuffer.size,{highlights:a}=n,o=a.length>fe?3:1,s=e.acquire(r,i,`highlights`,o);s.acquireDepth(14);let c=this._plugins.produces(10,0);return c&&this._framebuffer.color.fbo&&s.fbo&&t.blitFramebuffer(this._framebuffer.color.fbo,s.fbo,1024),t.bindFramebuffer(s.fbo),t.gl.clearBufferuiv(6144,0,[0,0,0,0]),c||t.clear(1024),this._bindParameters.output=10,t.bindFramebuffer(s.fbo),pe(t,e,r,i,n,()=>this._renderHighlightGeometries()),s.detachDepth(),this.performanceInfo.advance(L.HIGHLIGHTS),s.retain(this._nodes.require(`highlights`,...E)+this._nodes.optional(`highlights`,...E)-1),s}_renderHighlightGeometries(){this._plugins.render(...ke),this._rctx.clear(256),this._renderHUDElements(2)}_renderShadowAccumulation(e){let t=this._shadowAccumulator;if(!t)return;t.updateDepthRange(e);let n=t.requireGeometryDepth;this._bindParameters.output=0;let r=this._nodes.produce(C.SHADOW_ACCUMULATION,this._pluginInput);t.didAccumulate&&this.performanceInfo.advance(L.ACCUMULATED_SHADOWS),this._pluginInput.set(C.SHADOW_ACCUMULATION,null),r?.release(),n&&(this._bindParameters.depth=s(this._bindParameters.depth))}renderShadowAccumulationShadowMap(e,t,n,r,i){let a=this.stage.view.qualitySettings.maximumPixelRatio;n.start(e,r,i,!0,a),this._renderShadowCascades(5,n),e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,t)}_precompileTransparentGeometry(){se(this._bindParameters.output)?(this._bindParameters.output=1,this._plugins.precompile(...U),this._hasTransparentGeometry&&this._plugins.precompile(15),this._bindParameters.output=2,this._plugins.precompile(...U),this._hasTransparentGeometry&&this._plugins.precompile(15),this._bindParameters.output=0):this._plugins.precompile(...U)}_renderOIT(e,t=2){let n=e===1,{width:r,height:i}=this._framebuffer.size,a=n?()=>this._renderHUDElements(t):()=>this._renderTransparentGeometry(),s=this._bindParameters,c=s.useFloatBlend.value?8:5,l=s.output;s.output=1;let u=n?`oit hud`:`oit`,d=this.fboCache.acquire(r,i,u,c).acquireColor(z,this.hasFloatBlend?7:0,`oit alpha`),f=s.hasEmission&&(e===0||t!==1);f&&d.acquireColor(B,c,`oit emissive`),n||d.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(d.fbo),this._rctx.clearFramebuffer(j),f&&this._rctx.clearBuffer(2,j),a(),d.detachDepth(),s.output=2;let p=this.fboCache.acquire(r,i,n?`oit front hud`:`oit front`);f&&p.acquireColor(z,c,`oit front emissive`),n?p.acquireDepth(this._hudDepthFormat):p.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(p.fbo),this._rctx.clearFramebuffer(S,n),a(),p.detachDepth();let m=this._pluginsHas.occludedHudElements&&!n,h=m&&s.emissions!==0?B:z;s.hudOcclusion=o(this._bindParameters.hudOcclusion),s.output=0;let g;return n?(g=this.fboCache.acquire(r,i,`oit composite hud`),this._rctx.bindFramebuffer(g.fbo),this._rctx.setClearColor(0,0,0,1e-13),this._rctx.clear(16384)):(s.emissions!==0&&this._framebuffer.ensureEmissionAttachment(),m&&(this._framebuffer.color.acquireColor(h,0,`hud occlusion`),this._rctx.clearBuffer(h-R,S)),this._framebuffer.bind()),this._oitBlend.blend(this._rctx,d,p,s,m,e,this._fboCache.debugCallback),g?.detachDepth(),n||(f&&(this._bindParameters.emissions=3),m&&(s.hudOcclusion=this._framebuffer.color.obtainAttachment(h))),p.release(),d.release(),s.output=l,g}get _hudDepthFormat(){return this.isFeatureEnabled(7)?14:13}get _needsOpaquePass(){return this.plugins.produces(0,...H)||this.plugins.produces(5,...H)||this.plugins.produces(3,3)}_renderOpaque(){let e=this._needsOpaquePass;e&&(this._plugins.render(0,1),this._pluginInput.set(C.GROUND_DEPTH,this._blitGroundDepth()),this._plugins.render(2,3));let t=this._framebuffer;t.update(t=>this._renderNodes(w.OPAQUE,t,e)),this.fboCache.debugCallback?.(w.OPAQUE,t.color.fbo),t.update(e=>this._renderNodes(C.OPAQUE_ENVIRONMENT,e)),this.fboCache.debugCallback?.(C.OPAQUE_ENVIRONMENT,t.color.fbo),this._renderEdges(1)}_renderPreTransparent(){this._framebuffer.update(e=>this._renderNodes(C.GAUSSIAN_SPLAT,e)),this.fboCache.debugCallback?.(C.GAUSSIAN_SPLAT,this._framebuffer.color.fbo),this._framebuffer.update(e=>this._renderNodes(C.OPAQUE_OCCLUSION_QUERY,e)),this.fboCache.debugCallback?.(C.OPAQUE_OCCLUSION_QUERY,this._framebuffer.color.fbo),this._framebuffer.update(e=>this._renderNodes(C.VOXEL,e)),this.fboCache.debugCallback?.(C.VOXEL,this._framebuffer.color.fbo)}_renderTransparent(){let e=this._framebuffer;if(this._renderHiddenTransparentEdges(),this._hasTransparentGeometry&&this._renderOIT(0),e.update(e=>this._renderNodes(w.TRANSPARENT,e,this._hasTransparentGeometry)),this.fboCache.debugCallback?.(w.TRANSPARENT,e.color.fbo),this._hasTransparentGeometry||this._plugins.render(15),this._renderEdges(0),this._bindParameters.ssao=o(this._bindParameters.ssao),e.update(e=>this._renderNodes(C.TRANSPARENT_NO_DEPTH,e)),this.fboCache.debugCallback?.(C.TRANSPARENT_NO_DEPTH,e.color.fbo),this._framebuffer.bind(),this._plugins.render(8),this._bindParameters.hasEmission){let e=this._rctx.setDrawBuffers([De,z]);this._bindParameters.transparentWithoutDepthEmissionDimmingPass=!0,this._plugins.render(8),this._bindParameters.transparentWithoutDepthEmissionDimmingPass=!1,this._rctx.setDrawBuffers(e)}this.performanceInfo.advance(L.TRANSPARENT_MATERIAL_WITHOUT_DEPTH)}_renderNodes(e,t,n=!1){if(t.setName(e),this._pluginInput.set(e,t),!this._nodes.produces(e))return n&&this.performanceInfo.advance(e),t;let r=this._nodes.render(t,this._pluginInput,this._releaseNodeInputs);return this.performanceInfo.advance(e),this._fboCache.debugCallback?.(e,r.fbo),r}_renderInternalNodeCategory(e,t){if(!t)return;let n=t.name;try{this._renderNodes(e,t)}finally{this._pluginInput.set(e,null),t.setName(n)}}_3dGeometryRendered(){let e=this._bindParameters;this.hasReflections&&(e.depth=s(e.depth),e.reprojection.lastFrameColor=s(e.reprojection.lastFrameColor)),e.shadowMap.disposeOutput(5);let t=this._framebuffer.color.getAttachment(z)?.attachment;if(this.hasGlobalIllumination&&t){let{width:n,height:r}=this._framebuffer.size,i=e.useFloatBlend.value?8:5;e.reprojection.lastFrameEmission=this.fboCache.acquire(n,r,`emissive`,i),this._blit.blitTexture(t,e,e.reprojection.lastFrameEmission.fbo)}}_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(){this.stage.viewingMode===1&&(this._bindParameters.clouds.data&&(this._bindParameters.clouds.fade(this._bindParameters.camera,this.renderContext.time,this.stage.view.qualitySettings.fadeDuration,this.stage.view.state.stationary),this.weatherFader?.cleanupCubemap()),this._bindParameters.snowCover=this.weatherFader?.snowCover??0)}_ensureBindParametersScreenSpaceReflections(){let{time:e}=this.renderContext,{screenSpaceReflections:t}=this._bindParameters;if(this.hasReflections){this._ssrEnableTime??=e;let n=this.stage.view.qualitySettings.fadeDuration;t.fadeFactor=n>0?Math.min(n,e-this._ssrEnableTime)/n:1,t.fadeFactor<1&&this._requestRender()}else this._ssrEnableTime=null}_ensureBindParametersReprojection(){if(!(this.hasReflections||this.hasGlobalIllumination)){this._reprojectionMatrix=b;return}let{reprojection:e,camera:t}=this._bindParameters,{lastFrameCamera:n}=e,r=!n.equals(t);if(r?(_(Z,t.viewMatrix),_(X,t.projectionMatrix),v(Q,Z,X),v(Q,n.viewMatrix,Q),v(Q,n.projectionMatrix,Q),this._reprojectionMatrix=Q):this._reprojectionMatrix=b,this.hasGlobalIllumination){let{viewMatrix:t}=e;r?(v($,n.viewMatrix,Z),y(t,$)):y(t,b)}}addRenderNode(e){this._nodes.add(e),this._requestRender()}removeRenderNode(e){this._nodes.remove(e),this._requestRender()}updateLighting(e,t,n,r){this._bindParameters.updateLighting(e,t,n,r),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([m({readOnly:!0})],V.prototype,`highResolutionAtmosphere`,null),e([m()],V.prototype,`_edgeView`,void 0),e([m()],V.prototype,`updating`,null),V=e([h(`esri.views.3d.webgl-engine.lib.Renderer`)],V);const H=[0,1,2,3],U=[7,6,4,5],W=[7,6],G=[0,1,2,4,...W],K=[3,5],q=[2,4,8],J=[16,12,14,13],ke=[4,5,2,3,0,1,...W],Ae=[4,8,5,11],je={0:[13],1:[12],2:[13,12],3:[13,12]},Y=[0,1,...W],Me=[`normals`,`highlights`],X=x(),Z=x(),Q=x(),$=x();function Ne(e){return t=>e.immediate.schedule(t)}export{V as Renderer};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{TextureBackedBufferModule as e}from"../../core/shaderLibrary/TextureBackedBuffer.glsl.js";import{NormalAttribute as t}from"../../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{
|
|
2
|
+
import{TextureBackedBufferModule as e}from"../../core/shaderLibrary/TextureBackedBuffer.glsl.js";import{NormalAttribute as t}from"../../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{getLocalUp as n}from"../../core/shaderLibrary/shading/getLocalUp.glsl.js";import{projMatrix as r}from"../../core/shaderLibrary/util/cameraUniforms.js";import{DoublePrecision as i}from"../../core/shaderLibrary/util/DoublePrecision.glsl.js";import{Float3PassUniform as a}from"../../core/shaderModules/Float3PassUniform.js";import{glsl as o}from"../../core/shaderModules/glsl.js";import{Matrix3PassUniform as s}from"../../core/shaderModules/Matrix3PassUniform.js";import{Texture2DUintDrawUniform as c}from"../../core/shaderModules/Texture2DUintDrawUniform.js";import{edgeViewTextureLayout as l}from"./bufferLayouts.js";import{Uniform as u}from"../../../../webgl/Uniform.js";const d=new e({layout:l,itemIndexExpression:`componentIndex`,bufferUniform:new c(`componentTextureBuffer`,e=>e.componentData?.texture)});function f(e,c){let{vertex:l}=e;e.include(t,c);let{silhouette:u,legacy:f}=c;e.attributes.add(`componentIndex`,`uint`);let p=d.createBuilder(e,c);l.constants.add(`lineWidthFractionFactor`,`float`,8),l.constants.add(`extensionLengthOffset`,`float`,128),l.code.add(o`
|
|
3
3
|
struct ComponentData {
|
|
4
4
|
vec4 color;
|
|
5
5
|
vec3 normal;
|
|
@@ -12,16 +12,16 @@ import{TextureBackedBufferModule as e}from"../../core/shaderLibrary/TextureBacke
|
|
|
12
12
|
|
|
13
13
|
ComponentData readComponentData() {
|
|
14
14
|
vec3 normal = normalModel();
|
|
15
|
-
vec3 normal2 = ${
|
|
15
|
+
vec3 normal2 = ${u?o`decompressNormal(normal2Compressed)`:o`normal`};
|
|
16
16
|
|
|
17
|
-
vec4 colorValue = ${
|
|
18
|
-
float lineWidth = float(${
|
|
19
|
-
float extensionLength = float(${
|
|
17
|
+
vec4 colorValue = ${p.getTextureAttribute(`color`)};
|
|
18
|
+
float lineWidth = float(${p.getTextureAttribute(`lineWidth`)}) / lineWidthFractionFactor;
|
|
19
|
+
float extensionLength = float(${p.getTextureAttribute(`extensionLength`)}) - extensionLengthOffset;
|
|
20
20
|
// SOLID (=0/255) needs to be > 0.0, SKETCHY (=1/255) needs to be <= 0;
|
|
21
|
-
float type = -(float(${
|
|
22
|
-
float opacity = ${
|
|
21
|
+
float type = -(float(${p.getTextureAttribute(`materialType`)})) + 0.5;
|
|
22
|
+
float opacity = ${p.getTextureAttribute(`opacity`)};
|
|
23
23
|
|
|
24
|
-
float verticalOffset = ${
|
|
24
|
+
float verticalOffset = ${p.getTextureAttribute(`elevationOffset`)};
|
|
25
25
|
|
|
26
26
|
return ComponentData(
|
|
27
27
|
vec4(colorValue.rgb, colorValue.a * opacity),
|
|
@@ -32,41 +32,36 @@ import{TextureBackedBufferModule as e}from"../../core/shaderLibrary/TextureBacke
|
|
|
32
32
|
verticalOffset
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
|
-
`),
|
|
35
|
+
`),f?l.code.add(o`vec3 _modelToWorldNormal(vec3 normal) {
|
|
36
36
|
return (model * vec4(normal, 0.0)).xyz;
|
|
37
37
|
}
|
|
38
38
|
vec3 _modelToViewNormal(vec3 normal) {
|
|
39
39
|
return (localView * model * vec4(normal, 0.0)).xyz;
|
|
40
|
-
}`):
|
|
40
|
+
}`):l.uniforms.add(new m(`transformNormalGlobalFromModel`)).code.add(o`vec3 _modelToWorldNormal(vec3 normal) {
|
|
41
41
|
return transformNormalGlobalFromModel * normal;
|
|
42
|
-
}`),
|
|
42
|
+
}`),u?(e.attributes.add(`normal2Compressed`,`vec2`),l.code.add(o`vec3 worldNormal(ComponentData data) {
|
|
43
43
|
return _modelToWorldNormal(normalize(data.normal + data.normal2));
|
|
44
|
-
}`)):
|
|
44
|
+
}`)):l.code.add(o`vec3 worldNormal(ComponentData data) {
|
|
45
45
|
return _modelToWorldNormal(data.normal);
|
|
46
|
-
}`),
|
|
46
|
+
}`),f?l.code.add(o`void worldAndViewFromModelPosition(vec3 modelPos, float verticalOffset, out vec3 worldPos, out vec3 viewPos) {
|
|
47
47
|
worldPos = (model * vec4(modelPos, 1.0)).xyz;
|
|
48
48
|
viewPos = (localView * vec4(worldPos, 1.0)).xyz;
|
|
49
|
-
}`):(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
viewPos = transformViewFromCameraRelativeRS * worldPos;
|
|
67
|
-
}
|
|
68
|
-
`)),c.uniforms.add(n).code.add(a`vec4 projFromViewPosition(vec3 position) {
|
|
49
|
+
}`):(l.include(i),l.include(n,c),l.uniforms.add(new h(`transformWorldFromModelTL`),new h(`transformWorldFromModelTH`),new m(`transformWorldFromModelRS`),new s(`transformViewFromCameraRelativeRS`,e=>e.transformViewFromCameraRelativeRS),new a(`transformWorldFromViewTL`,e=>e.transformWorldFromViewTL),new a(`transformWorldFromViewTH`,e=>e.transformWorldFromViewTH)).code.add(o`void worldAndViewFromModelPosition(vec3 modelPos, float verticalOffset, out vec3 worldPos, out vec3 viewPos) {
|
|
50
|
+
vec3 rotatedModelPosition = transformWorldFromModelRS * modelPos;
|
|
51
|
+
vec3 transformCameraRelativeFromModel = dpAdd(
|
|
52
|
+
transformWorldFromModelTL,
|
|
53
|
+
transformWorldFromModelTH,
|
|
54
|
+
-transformWorldFromViewTL,
|
|
55
|
+
-transformWorldFromViewTH
|
|
56
|
+
);
|
|
57
|
+
worldPos = transformCameraRelativeFromModel + rotatedModelPosition;
|
|
58
|
+
if (verticalOffset != 0.0) {
|
|
59
|
+
vec3 vUp = getLocalUp(rotatedModelPosition, transformWorldFromModelTL);
|
|
60
|
+
worldPos += verticalOffset * vUp;
|
|
61
|
+
}
|
|
62
|
+
viewPos = transformViewFromCameraRelativeRS * worldPos;
|
|
63
|
+
}`)),l.uniforms.add(r).code.add(o`vec4 projFromViewPosition(vec3 position) {
|
|
69
64
|
return proj * vec4(position, 1.0);
|
|
70
|
-
}`),
|
|
65
|
+
}`),l.code.add(o`float calculateExtensionLength(float extensionLength, float lineLength) {
|
|
71
66
|
return extensionLength / (log2(max(1.0, 256.0 / lineLength)) * 0.2 + 1.0);
|
|
72
|
-
}`)}function
|
|
67
|
+
}`)}function p(e){return e===1||e===2}class m extends u{constructor(e){super(e,`mat3`)}}class h extends u{constructor(e){super(e,`vec3`)}}export{f as EdgeUtil,p as usesSketchLogic};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{toConst as n}from"../../../../core/compilerUtils.js";import{unpackFloatRGBA as r}from"../../../../core/floatRGBA.js";import has from"../../../../core/has.js";import i from"../../../../core/Logger.js";import{removeMaybe as a,destroyMaybe as o}from"../../../../core/maybe.js";import{when as s,initial as c,watch as l,syncAndInitial as u}from"../../../../core/reactiveUtils.js";import{addFrameTask as ee}from"../../../../core/scheduling.js";import{signal as d}from"../../../../core/signal.js";import{Milliseconds as f}from"../../../../core/time.js";import{property as p,subclass as m}from"../../../../core/accessorSupport/decorators.js";import{isMoon as h,isMars as te}from"../../../../geometry/ellipsoidUtils.js";import{debugFlags as g}from"../../support/debugFlags.js";import{ComponentObjectCollection as _}from"../collections/Component/ComponentObjectCollection.js";import{ShaderTechniqueConstructionContext as v}from"../core/shaderTechnique/ShaderTechniqueConstructionContext.js";import{ShaderTechniqueRepository as y}from"../core/shaderTechnique/ShaderTechniqueRepository.js";import{ChapmanAtmosphere as b}from"../effects/atmosphere/ChapmanAtmosphere.js";import{LocalAtmosphere as x}from"../effects/atmosphere/LocalAtmosphere.js";import{MarsAtmosphere as S}from"../effects/atmosphere/MarsAtmosphere.js";import{CloudsComposition as C}from"../effects/clouds/CloudsComposition.js";import{Fog as w}from"../effects/fog/Fog.js";import{ObjectAndLayerID as T}from"../effects/geometry/ObjectAndLayerID.js";import{olidEnabled as E}from"../effects/geometry/olidUtils.js";import{RenderOccluded as D}from"../effects/geometry/RenderOccluded.js";import{GlobalIllumination as O}from"../effects/globalIllumination/GlobalIllumination.js";import{Haze as k}from"../effects/haze/Haze.js";import{Highlight as A}from"../effects/highlight/Highlight.js";import{ShadowHighlight as j}from"../effects/highlight/ShadowHighlight.js";import{ShadowHighlightBuffer as M}from"../effects/highlight/ShadowHighlightBuffer.js";import{Magnifier as N}from"../effects/magnifier/Magnifier.js";import{ShadowAccumulator as P}from"../effects/shadowAccumulation/ShadowAccumulator.js";import{ShadowCastRenderer as F}from"../effects/shadowAccumulation/ShadowCastRenderer.js";import{SMAA as ne}from"../effects/smaa/SMAA.js";import{SSAO as I}from"../effects/ssao/SSAO.js";import{Stars as L}from"../effects/stars/Stars.js";import{EmissionComposite as R}from"../lib/EmissionComposite.js";import{GLMaterialRepository as z}from"../lib/GLMaterialRepository.js";import{ObjectAndLayerIdRenderHelper as B}from"../lib/ObjectAndLayerIdRenderHelper.js";import{Renderer as V}from"../lib/Renderer.js";import{RenderingContext as H}from"../lib/RenderingContext.js";import{RenderingContextOptions as U}from"../lib/RenderingContextOptions.js";import{TextureRepository as W}from"../lib/TextureRepository.js";import{createMarkerTextureRepository as G}from"../materials/markerTextureRepository.js";import{createStippleTextureRepository as K}from"../materials/stippleTextureRepository.js";import{WaterTextureRepository as q}from"../materials/internal/WaterTextureRepository.js";import{getContextCache as J}from"./contextCache.js";import{removeLoadedShaderModules as Y}from"./renderUtils.js";import{ScreenshotManager as X,ScreenshotContext as Z}from"./ScreenshotManager.js";import{contextCache as re}from"./testUtils.js";import{noBudget as ie}from"../../../support/Scheduler.js";import{checkWebGLError as ae}from"../../../webgl/checkWebGLError.js";const oe=has(`disable-feature:async-navigation-3d-depth-readback`);let Q=class extends t{constructor(e,t){super(e),this.olidRenderHelper=E()?new B:null,this.waterTextures=new q,this._needsUpdate=!0,this._needsRender=!0,this._idleSuspend=!0,this._needsWaterReflectionUpdate=!1,this._lastAnimationUpdate=0,this._fog=d(null),this.globalIllumination=null,this.shadowAccumulator=null,this.test=null,this._initializeContext(t);let{memoryController:n}=t.view.resourceController;this.stippleTextures=K(this._rctx,n),this.markerTextures=G(this._rctx,n),this.techniques=new y(new v(this._rctx,this.stippleTextures,this.waterTextures,this.markerTextures)),this.textures=new W(t),this.addHandles(this.textures.events.on(`changed`,e=>this.requestRender(e)));let r=new z(this.textures,this.techniques,()=>this.requestRender(),()=>this.requestRender());this.renderer=new V(t,r,this.techniques,this._rctx,e=>this.requestRender(e)),this.addHandles([s(()=>t.view.ready,()=>this._createRenderNodes(),c),l(()=>this.waterTextures.updating,()=>this.requestRender(),c),l(()=>t.view.qualityProfile,e=>this.renderer?.updateRenderFeatures(e),u),l(()=>t.view.environment.lighting.globalIllumination,e=>this.renderer?.updateGlobalIllumination(e),u)]);let i={renderScene:(e,t,n,r)=>(this.renderer.setTime(t),this.renderer.render(e,n,r)),requestRenderScene:e=>this.requestRender(e),prepareOverlay:()=>t.options.screenshot.prepareOverlay(),renderOverlay:(e,n,r)=>t.options.screenshot.renderOverlay(e,n,r)};this._screenshotManager=new X(this._rctx,i,e=>t.view.overlayManager.updateOverlays(ie,e.camera,0)),this._registerFrameTask(t)}destroy(){let e=this.stage?.container;e?.contains(this._canvas)&&e.removeChild(this._canvas),this._frameTask=a(this._frameTask),this.techniques.destroy(),this._componentObjectCollection=o(this._componentObjectCollection),this._screenshotManager.destroy(),this.renderer.destroy(),this.globalIllumination=null,this.textures.destroy(),this.waterTextures.destroy(),this.markerTextures.destroy(),this.stippleTextures.destroy(),this._canvas=null,this._rctx=o(this._rctx),this.test?.destroy()}_createRenderNodes(){let{view:e,viewingMode:t}=this.stage;this.shadowAccumulator=new P({view:e}),this.shadowAccumulator.accumulationRenderer=new F({view:e,data:this.shadowAccumulator}),this.renderer.setShadowAccumulator(this.shadowAccumulator),new L({view:e}),h(e.spatialReference)||(t===2?new x({view:e}):te(e.spatialReference)?new S({view:e}):(new b({view:e}),new C({view:e}),new k({view:e}),this._fog.value=new w({view:e}))),new I({view:e}),this.globalIllumination=new O({view:e});let n=new ne({view:e,isEnabled:()=>this.renderer.hasSMAA});new N({view:e}),new A({view:e,antialias:n}),new M({view:e}),new j({view:e,viewingMode:t}),new R({view:e}),new D({view:e}),E()&&new T({view:e})}requestRender(e=1){switch(e){case 2:this.view.state.fading=!0;case 1:this._needsUpdate=!0,this.globalIllumination?.resetAccumulation();case 0:this._needsRender=!0}}get updating(){let e=this._needsUpdate||this._needsWaterReflectionUpdate||this.renderer.updating||this.textures.updating||this.waterTextures.updating;return e&&g.UPDATING&&console.log(` RenderView:`,this._needsUpdate,this._needsWaterReflectionUpdate,this.renderer.updating,this.textures.updating,this.waterTextures.updating),e}setIdleSuspend(e){this._idleSuspend!==e&&(this._idleSuspend=e,this.requestRender())}get renderingContext(){return this._rctx}get capabilities(){return this._rctx.capabilities}get canvas(){return this._canvas}takeScreenshot(e){return this._screenshotManager.takeScreenshot(n(e))}getAlpha(){return!!this._rctx.contextAttributes.alpha}getMinimalDepthForArea(e,t,n,r,i,a=i){let o=oe?this._readMainDepthSynchronously(t,n,r,i,a):this.renderer.navigationDepthCache.getMinimalDepthForArea(t,n,r,i,a)??Number.MAX_VALUE;if(e){let i=e.pickDepth(t*r.pixelRatio,n*r.pixelRatio,r);i!=null&&o>i&&i!==r.nearFar[0]&&i!==r.nearFar[1]&&(o=i)}return o===Number.MAX_VALUE?void 0:o}whenRepresentativeDepthForArea(e,t,n,r,i,a=1){return this.renderer.navigationDepthCache.whenRepresentativeDepthForArea(e,t,n,r,i,a)}_readMainDepthSynchronously(e,t,n,r,i){let a=n.constrainWindowSize(e,t,r*n.pixelRatio,i*n.pixelRatio),o=this._ensureLinearDepthArrayBuffer(a);this.renderer.readMainDepth(a,o);let s=Number.MAX_VALUE;for(let e=0;e<a[2]*a[3];e++){let t=this._linearDepthFromTexture(e*4,o,n.nearFar);s>t&&t!==n.nearFar[0]&&t!==n.nearFar[1]&&(s=t)}return s}_linearDepthFromTexture(e,t,n){return r(t,e)*(n[1]-n[0])+n[0]}_ensureLinearDepthArrayBuffer(e){let t=4*e[2]*e[3];return(this._tmpDepthBuffer==null||this._tmpDepthBuffer.byteLength<t)&&(this._tmpDepthBuffer=new Uint8Array(t)),this._tmpDepthBuffer}async reloadShaders(){Y(),await this.techniques.reloadAll(),this.renderer.overlay?.reloadShaders(),this.requestRender()}_registerFrameTask(e){let t=e.view.state,n=!1,r=0,i=!1,a={preRender:({time:i})=>{n=this.updating,r=+!!this._needsUpdate,this._needsRender&&this.renderer.updateSceneDepthRange(t.camera),e.commitSyncLayers(),i=this.test?.time??i;let a=f(i-this._lastAnimationUpdate);this.view.state.animationsEnabled&&(a>this.renderer.animationTimestep||n||this._needsRender)&&(this.renderer.updateAnimation(t,i)&&this.requestRender(0),this._lastAnimationUpdate=i)},render:({time:e})=>{if(e=this.test?.time??e,this.renderer.setTime(e),(this._needsRender||!this._idleSuspend||!this.renderer.isCameraFinal||this._needsWaterReflectionUpdate)&&t.camera.fullWidth>0&&t.camera.fullHeight>0){let e=this._needsUpdate&&this._idleSuspend&&this.renderer.isCameraFinal;this._needsRender=!1,this._needsUpdate=!1,this._needsWaterReflectionUpdate=!1,this.renderer.render(t,0),i=!0,e&&this.renderer.hasReflections&&(this.requestRender(0),this._needsWaterReflectionUpdate=!0)}},update:({time:e})=>{this.view.state.animationsEnabled&&this.textures.update();let n=new Z(t,this.renderer.fboCache,this.globalIllumination?.isAccumulating??!1);e=this.test?.time??e,this._screenshotManager.update(n,e)},finish:()=>{i&&=(this.renderer.finish(t.mode===2?r:1),!1)}};this._frameTask=ee(a)}_initializeContext(e){let{options:t}=e,n=t.canvas??document.createElement(`canvas`);n.setAttribute(`style`,`width: 100%; height:100%; display:block;`),this._canvas=n;let r={alpha:t.alpha||!1,premultipliedAlpha:!0,antialias:!1,depth:!0,stencil:t.stencil??!0,powerPreference:`high-performance`,preserveDrawingBuffer:t.preserveDrawingBuffer??!1},a=n.getContext(`webgl2`,r);if(a==null){i.getLogger(this).error(`A WebGL2 context could not be created.`);return}ae(a,!0),this._rctx=se(a,e),this._loadShaderOnlyExtensions(),!t.alpha&&this._rctx.contextAttributes.alpha&&i.getLogger(this).error(`WebGL context has alpha channel even though no alpha channel was requested`);let{container:o}=e;!this._rctx.contextAttributes.alpha&&has(`safari`)>=11&&(o.style.backgroundColor=`black`),o.contains(n)||o.appendChild(n)}_loadShaderOnlyExtensions(){this._rctx.capabilities.enable(`textureFloatLinear`)}get _viewingMode(){return this.stage.viewingMode}get stage(){return this.view.stage}getObjectAndLayerIdColor(e){return this.olidRenderHelper?.getObjectAndLayerIdColor(e)}get componentObjectCollection(){return this._componentObjectCollection??=new _(this.renderer.renderPassManager,this._viewingMode,this.view.spatialReference.isWebMercator),this._componentObjectCollection}updateQualitySettings(e){this.test?.time!=null&&e.fadeDuration!=null&&(this.test.savedFadeDuration=e.fadeDuration,e.fadeDuration=f(0)),this._rctx.updateOptions({maxPreferredTexturePixels:this.view.qualitySettings.maxTexturePixels})}get fog(){return n(this._fog.value)}};e([p({type:Boolean,readOnly:!0})],Q.prototype,`updating`,null),e([p({constructOnly:!0})],Q.prototype,`view`,void 0),e([p({readOnly:!0})],Q.prototype,`componentObjectCollection`,null),e([p()],Q.prototype,`_componentObjectCollection`,void 0),e([p()],Q.prototype,`_needsUpdate`,void 0),e([p()],Q.prototype,`_needsWaterReflectionUpdate`,void 0),Q=e([m(`esri.views.3d.webgl-engine.parts.RenderView`)],Q);function se(e,t){let n=new U(t);if(re.enabled){let t=$.get(e);return t?.refCount===1?(t.configure(n),t.ref(),t):(t=new H(e,n),$.set(e,t),t.ref(),t)}return new H(e,n)}const $=J();export{Q as RenderView};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{toConst as n}from"../../../../core/compilerUtils.js";import{unpackFloatRGBA as r}from"../../../../core/floatRGBA.js";import has from"../../../../core/has.js";import i from"../../../../core/Logger.js";import{removeMaybe as a,destroyMaybe as o}from"../../../../core/maybe.js";import{when as s,initial as c,watch as l,syncAndInitial as u}from"../../../../core/reactiveUtils.js";import{addFrameTask as ee}from"../../../../core/scheduling.js";import{signal as d}from"../../../../core/signal.js";import{Milliseconds as f}from"../../../../core/time.js";import{property as p,subclass as m}from"../../../../core/accessorSupport/decorators.js";import{isMoon as h,isMars as te}from"../../../../geometry/ellipsoidUtils.js";import{debugFlags as g}from"../../support/debugFlags.js";import{ComponentObjectCollection as _}from"../collections/Component/ComponentObjectCollection.js";import{ShaderTechniqueConstructionContext as v}from"../core/shaderTechnique/ShaderTechniqueConstructionContext.js";import{ShaderTechniqueRepository as y}from"../core/shaderTechnique/ShaderTechniqueRepository.js";import{ChapmanAtmosphere as b}from"../effects/atmosphere/ChapmanAtmosphere.js";import{LocalAtmosphere as x}from"../effects/atmosphere/LocalAtmosphere.js";import{MarsAtmosphere as S}from"../effects/atmosphere/MarsAtmosphere.js";import{CloudsComposition as C}from"../effects/clouds/CloudsComposition.js";import{Fog as w}from"../effects/fog/Fog.js";import{ObjectAndLayerID as T}from"../effects/geometry/ObjectAndLayerID.js";import{olidEnabled as E}from"../effects/geometry/olidUtils.js";import{RenderOccluded as D}from"../effects/geometry/RenderOccluded.js";import{GlobalIllumination as O}from"../effects/globalIllumination/GlobalIllumination.js";import{Haze as k}from"../effects/haze/Haze.js";import{Highlight as A}from"../effects/highlight/Highlight.js";import{ShadowHighlight as j}from"../effects/highlight/ShadowHighlight.js";import{ShadowHighlightBuffer as M}from"../effects/highlight/ShadowHighlightBuffer.js";import{Magnifier as N}from"../effects/magnifier/Magnifier.js";import{ShadowAccumulator as P}from"../effects/shadowAccumulation/ShadowAccumulator.js";import{ShadowCastRenderer as F}from"../effects/shadowAccumulation/ShadowCastRenderer.js";import{SMAA as ne}from"../effects/smaa/SMAA.js";import{SSAO as I}from"../effects/ssao/SSAO.js";import{Stars as L}from"../effects/stars/Stars.js";import{EmissionComposite as R}from"../lib/EmissionComposite.js";import{GLMaterialRepository as z}from"../lib/GLMaterialRepository.js";import{ObjectAndLayerIdRenderHelper as B}from"../lib/ObjectAndLayerIdRenderHelper.js";import{Renderer as V}from"../lib/Renderer.js";import{RenderingContext as H}from"../lib/RenderingContext.js";import{RenderingContextOptions as U}from"../lib/RenderingContextOptions.js";import{TextureRepository as W}from"../lib/TextureRepository.js";import{createMarkerTextureRepository as G}from"../materials/markerTextureRepository.js";import{createStippleTextureRepository as K}from"../materials/stippleTextureRepository.js";import{WaterTextureRepository as q}from"../materials/internal/WaterTextureRepository.js";import{getContextCache as J}from"./contextCache.js";import{removeLoadedShaderModules as Y}from"./renderUtils.js";import{ScreenshotManager as X,ScreenshotContext as Z}from"./ScreenshotManager.js";import{contextCache as re}from"./testUtils.js";import{noBudget as ie}from"../../../support/Scheduler.js";import{checkWebGLError as ae}from"../../../webgl/checkWebGLError.js";const oe=has(`disable-feature:async-navigation-3d-depth-readback`);let Q=class extends t{constructor(e,t){super(e),this.olidRenderHelper=E()?new B:null,this.waterTextures=new q,this._needsUpdate=!0,this._needsRender=!0,this._idleSuspend=!0,this._needsWaterReflectionUpdate=!1,this._lastAnimationUpdate=0,this._fog=d(null),this.globalIllumination=null,this.shadowAccumulator=null,this.test=null,this._initializeContext(t);let{memoryController:n}=t.view.resourceController;this.stippleTextures=K(this._rctx,n),this.markerTextures=G(this._rctx,n),this.techniques=new y(new v(this._rctx,this.stippleTextures,this.waterTextures,this.markerTextures)),this.textures=new W(t),this.addHandles(this.textures.events.on(`changed`,e=>this.requestRender(e)));let r=new z(this.textures,this.techniques,()=>this.requestRender(),()=>this.requestRender());this.renderer=new V(t,r,this.techniques,this._rctx,e=>this.requestRender(e)),this.addHandles([s(()=>t.view.ready,()=>this._createRenderNodes(),c),l(()=>this.waterTextures.updating,()=>this.requestRender(),c),l(()=>t.view.qualityProfile,e=>this.renderer?.updateRenderFeatures(e),u),l(()=>t.view.environment.lighting.globalIllumination,e=>this.renderer?.updateGlobalIllumination(e),u)]);let i={renderScene:(e,t,n,r)=>(this.renderer.setTime(t),this.renderer.render(e,n,r)),requestRenderScene:e=>this.requestRender(e),prepareOverlay:()=>t.options.screenshot.prepareOverlay(),renderOverlay:(e,n,r)=>t.options.screenshot.renderOverlay(e,n,r)};this._screenshotManager=new X(this._rctx,i,e=>t.view.overlayManager.updateOverlays(ie,e.camera,0)),this._registerFrameTask(t)}destroy(){let e=this.stage?.container;e?.contains(this._canvas)&&e.removeChild(this._canvas),this._frameTask=a(this._frameTask),this.techniques.destroy(),this._componentObjectCollection=o(this._componentObjectCollection),this._screenshotManager.destroy(),this.renderer.destroy(),this.globalIllumination=null,this.textures.destroy(),this.waterTextures.destroy(),this.markerTextures.destroy(),this.stippleTextures.destroy(),this._canvas=null,this._rctx=o(this._rctx),this.test?.destroy()}_createRenderNodes(){let{view:e,viewingMode:t}=this.stage;this.shadowAccumulator=new P({view:e}),this.shadowAccumulator.accumulationRenderer=new F({view:e,data:this.shadowAccumulator}),this.renderer.setShadowAccumulator(this.shadowAccumulator),new L({view:e}),h(e.spatialReference)||(t===2?new x({view:e}):te(e.spatialReference)?new S({view:e}):(new b({view:e}),new C({view:e}),new k({view:e}),this._fog.value=new w({view:e}))),new I({view:e}),this.globalIllumination=new O({view:e});let n=new ne({view:e,isEnabled:()=>this.renderer.hasSMAA});new N({view:e}),new A({view:e,antialias:n}),new M({view:e}),new j({view:e,viewingMode:t}),new R({view:e}),new D({view:e}),E()&&new T({view:e})}requestRender(e=1){switch(e){case 2:this.view.state.fading=!0;case 1:this._needsUpdate=!0,this.globalIllumination?.resetAccumulation();case 0:this._needsRender=!0}}get updating(){let e=this._needsUpdate||this._needsWaterReflectionUpdate||this.renderer.updating||this.textures.updating||this.waterTextures.updating;return e&&g.UPDATING&&console.log(` RenderView:`,this._needsUpdate,this._needsWaterReflectionUpdate,this.renderer.updating,this.textures.updating,this.waterTextures.updating),e}setIdleSuspend(e){this._idleSuspend!==e&&(this._idleSuspend=e,this.requestRender())}get renderingContext(){return this._rctx}get capabilities(){return this._rctx.capabilities}get canvas(){return this._canvas}takeScreenshot(e){return this._screenshotManager.takeScreenshot(n(e))}getAlpha(){return!!this._rctx.contextAttributes.alpha}getMinimalDepthForArea(e,t,n,r,i,a=i){let o=oe?this._readMainDepthSynchronously(t,n,r,i,a):this.renderer.navigationDepthCache.getMinimalDepthForArea(t,n,r,i,a)??Number.MAX_VALUE;if(e){let i=e.pickDepth(t*r.pixelRatio,n*r.pixelRatio,r);i!=null&&o>i&&i!==r.nearFar[0]&&i!==r.nearFar[1]&&(o=i)}return o===Number.MAX_VALUE?void 0:o}whenRepresentativeDepthForArea(e,t,n,r,i,a=1){return this.renderer.navigationDepthCache.whenRepresentativeDepthForArea(e,t,n,r,i,a)}_readMainDepthSynchronously(e,t,n,r,i){let a=n.constrainWindowSize(e,t,r*n.pixelRatio,i*n.pixelRatio),o=this._ensureLinearDepthArrayBuffer(a);this.renderer.readMainDepth(a,o);let s=Number.MAX_VALUE;for(let e=0;e<a[2]*a[3];e++){let t=this._linearDepthFromTexture(e*4,o,n.nearFar);s>t&&t!==n.nearFar[0]&&t!==n.nearFar[1]&&(s=t)}return s}_linearDepthFromTexture(e,t,n){return r(t,e)*(n[1]-n[0])+n[0]}_ensureLinearDepthArrayBuffer(e){let t=4*e[2]*e[3];return(this._tmpDepthBuffer==null||this._tmpDepthBuffer.byteLength<t)&&(this._tmpDepthBuffer=new Uint8Array(t)),this._tmpDepthBuffer}async reloadShaders(){Y(),await this.techniques.reloadAll(),this.renderer.overlay?.reloadShaders(),this.requestRender()}_registerFrameTask(e){let t=e.view.state,n=!1,r=0,i=!1,a={preRender:({time:i})=>{n=this.updating,r=+!!this._needsUpdate,this._needsRender&&this.renderer.updateSceneDepthRange(t.camera),e.commitSyncLayers(),i=this.test?.time??i;let a=f(i-this._lastAnimationUpdate);this.view.state.animationsEnabled&&(a>this.renderer.animationTimestep||n||this._needsRender)&&(this.renderer.updateAnimation(t,i)&&this.requestRender(0),this._lastAnimationUpdate=i)},render:({time:e})=>{if(e=this.test?.time??e,this.renderer.setTime(e),(this._needsRender||!this._idleSuspend||!this.renderer.isCameraFinal||this._needsWaterReflectionUpdate)&&t.camera.fullWidth>0&&t.camera.fullHeight>0){let e=this._needsUpdate&&this._idleSuspend&&this.renderer.isCameraFinal;this._needsRender=!1,this._needsUpdate=!1,this._needsWaterReflectionUpdate=!1,this.renderer.render(t,0),i=!0,e&&this.renderer.hasReflections&&(this.requestRender(0),this._needsWaterReflectionUpdate=!0)}},update:({time:e})=>{this.view.state.animationsEnabled&&this.textures.update();let n=new Z(t,this.renderer.fboCache,this.globalIllumination?.isAccumulating??!1);e=this.test?.time??e,this._screenshotManager.update(n,e)},finish:()=>{i&&=(this.renderer.finish(t.mode===2?r:1),!1)}};this._frameTask=ee(a)}_initializeContext(e){let{options:t}=e,n=t.canvas??document.createElement(`canvas`);n.setAttribute(`style`,`width: 100%; height:100%; display:block;`),this._canvas=n;let r={alpha:t.alpha||!1,premultipliedAlpha:!0,antialias:!1,depth:!0,stencil:t.stencil??!0,powerPreference:`high-performance`,preserveDrawingBuffer:t.preserveDrawingBuffer??!1},a=n.getContext(`webgl2`,r);if(a==null){i.getLogger(this).error(`A WebGL2 context could not be created.`);return}ae(a,!0),this._rctx=se(a,e),this._loadShaderOnlyExtensions(),!t.alpha&&this._rctx.contextAttributes.alpha&&i.getLogger(this).error(`WebGL context has alpha channel even though no alpha channel was requested`);let{container:o}=e;!this._rctx.contextAttributes.alpha&&has(`safari`)>=11&&(o.style.backgroundColor=`black`),o.contains(n)||o.appendChild(n)}_loadShaderOnlyExtensions(){this._rctx.capabilities.enable(`textureFloatLinear`)}get _viewingMode(){return this.stage.viewingMode}get stage(){return this.view.stage}getObjectAndLayerIdColor(e){return this.olidRenderHelper?.getObjectAndLayerIdColor(e)}get componentObjectCollection(){return this._componentObjectCollection??=new _(this.renderer.renderPassManager,this._viewingMode,this.view.spatialReference.isWebMercator),this._componentObjectCollection}updateQualitySettings(e){this.test?.time!=null&&e.fadeDuration!=null&&(this.test.savedFadeDuration=e.fadeDuration,e.fadeDuration=f(0)),this._rctx.updateOptions({maxPreferredTexturePixels:this.view.qualitySettings.maxTexturePixels})}get fog(){return n(this._fog.value)}};e([p()],Q.prototype,`updating`,null),e([p({constructOnly:!0})],Q.prototype,`view`,void 0),e([p({readOnly:!0})],Q.prototype,`componentObjectCollection`,null),e([p()],Q.prototype,`_componentObjectCollection`,void 0),e([p()],Q.prototype,`_needsUpdate`,void 0),e([p()],Q.prototype,`_needsWaterReflectionUpdate`,void 0),Q=e([m(`esri.views.3d.webgl-engine.parts.RenderView`)],Q);function se(e,t){let n=new U(t);if(re.enabled){let t=$.get(e);return t?.refCount===1?(t.configure(n),t.ref(),t):(t=new H(e,n),$.set(e,t),t.ref(),t)}return new H(e,n)}const $=J();export{Q as RenderView};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{
|
|
2
|
+
import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{EmissiveGlowConfiguration as n}from"../effects/glow/applyEmissiveGlow.glsl.js";class r extends n{constructor(){super(...arguments),this.hasEmissive=!1}}e([t()],r.prototype,`hasEmissive`,void 0);export{r as EmissiveTechniqueConfiguration};
|
|
@@ -1,53 +1,62 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{rejectBySlicePass as e}from"../core/shaderLibrary/Slice.glsl.js";import{DepthConversion as t}from"../core/shaderLibrary/output/DepthConversion.glsl.js";import{inverseProjectionMatrix as n,inverseScreenSize as r,projMatrix as i,viewMatrix as a,nearFar as o}from"../core/shaderLibrary/util/cameraUniforms.js";import{GaussianSplatCovariance as s}from"../core/shaderLibrary/util/GaussianSplatCovariance.glsl.js";import{GaussianSplatEvaluation as c}from"../core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js";import{GaussianSplatTextureFetch as l}from"../core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js";import{GaussianSplatUnpacking as u}from"../core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js";import{QuaternionToRotationMatrix as d}from"../core/shaderLibrary/util/QuaternionToRotationMatrix.glsl.js";import{Float2PassUniform as f}from"../core/shaderModules/Float2PassUniform.js";import{Float3PassUniform as p}from"../core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as m}from"../core/shaderModules/FloatPassUniform.js";import{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
opacity
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
float
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
2
|
+
import{rejectBySlicePass as e}from"../core/shaderLibrary/Slice.glsl.js";import{DepthConversion as t}from"../core/shaderLibrary/output/DepthConversion.glsl.js";import{inverseProjectionMatrix as n,inverseScreenSize as r,projMatrix as i,viewMatrix as a,nearFar as o}from"../core/shaderLibrary/util/cameraUniforms.js";import{GaussianSplatCovariance as s}from"../core/shaderLibrary/util/GaussianSplatCovariance.glsl.js";import{GaussianSplatEvaluation as c}from"../core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js";import{GaussianSplatTextureFetch as l}from"../core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js";import{GaussianSplatUnpacking as u}from"../core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js";import{QuaternionToRotationMatrix as d}from"../core/shaderLibrary/util/QuaternionToRotationMatrix.glsl.js";import{Float2PassUniform as f}from"../core/shaderModules/Float2PassUniform.js";import{Float3PassUniform as p}from"../core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as m}from"../core/shaderModules/FloatPassUniform.js";import{If as h,glsl as g}from"../core/shaderModules/glsl.js";import{Texture2DUintPassUniform as _}from"../core/shaderModules/Texture2DUintPassUniform.js";function v(e,t){let{fragment:n,vertex:f}=e;f.uniforms.add(new _(`splatOrderTexture`,e=>e.splatOrder),new _(`splatAtlasTexture`,e=>e.splatAtlas),new _(`splatHeaderTexture`,e=>e.splatHeader),new m(`minSplatRadius`,e=>e.minSplatRadius),r,i,a,o),f.include(u),f.include(l),f.include(d),f.include(s),f.include(c),f.include(S,t),n.include(c),n.include(S,t)}function y(e,r){e.include(v,r),e.vertex.uniforms.add(new m(`focalLength`,e=>e.focalLength),new f(`tanFov`,e=>e.tanFov)),e.vertex.code.add(g`
|
|
3
|
+
struct GaussianSplatProjection {
|
|
4
|
+
vec4 clipPosition;
|
|
5
|
+
vec3 viewOffset;
|
|
6
|
+
vec2 coordinates;
|
|
7
|
+
float logFalloffCutoff;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
bool projectGaussianSplat(
|
|
11
|
+
vec3 viewPosition,
|
|
12
|
+
vec3 gaussianScale,
|
|
13
|
+
mat3 gaussianRotation,
|
|
14
|
+
float alphaCutoff,
|
|
15
|
+
float logAlphaCutoff,
|
|
16
|
+
inout float opacity,
|
|
17
|
+
out GaussianSplatProjection projection
|
|
18
|
+
) {
|
|
19
|
+
vec3 covariance2D = computeGaussianCovariance2D(viewPosition, focalLength, tanFov, gaussianScale, gaussianRotation, view);
|
|
20
|
+
// Minimum-radius culling uses opacity before resolution-dependent regularization.
|
|
21
|
+
float minimumRadiusOpacity = opacity;
|
|
22
|
+
float opacityScale = regularizeGaussianCovariance(covariance2D);
|
|
23
|
+
opacity *= opacityScale;
|
|
24
|
+
if (opacity < alphaCutoff) {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
float determinant = computeGaussianCovarianceDeterminant(covariance2D);
|
|
29
|
+
if (determinant <= 0.0) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
vec2 eigenvalues = computeGaussianCovarianceEigenvalues(covariance2D);
|
|
34
|
+
projection.logFalloffCutoff = logAlphaCutoff - log(opacity);
|
|
35
|
+
float ellipseThreshold = computeGaussianEllipseThreshold(projection.logFalloffCutoff);
|
|
36
|
+
vec2 screenRadii = computeGaussianScreenRadii(covariance2D, ellipseThreshold);
|
|
37
|
+
float maxRadius = ceil(sqrt(eigenvalues.x * ellipseThreshold));
|
|
38
|
+
if (rejectGaussianByMinimumRadius(maxRadius, minimumRadiusOpacity, minSplatRadius)) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
vec4 projPos = proj * vec4(viewPosition, 1.0);
|
|
43
|
+
float invW = 1.0 / (projPos.w + 1e-7);
|
|
44
|
+
vec3 ndcPosition = projPos.xyz * invW;
|
|
45
|
+
vec2 clipSpacePixelScale = 2.0 * inverseScreenSize;
|
|
46
|
+
if (rejectGaussianByScreenBounds(ndcPosition.xy, screenRadii, clipSpacePixelScale)) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
projection.coordinates = computeGaussianUnitQuadCorner(gl_VertexID) * sqrt(ellipseThreshold);
|
|
51
|
+
vec2 offsetFromCenter = computeGaussianQuadOffset(covariance2D, determinant, projection.coordinates);
|
|
52
|
+
float viewSpacePixelScale = -viewPosition.z / focalLength;
|
|
53
|
+
projection.viewOffset = vec3(offsetFromCenter * viewSpacePixelScale, 0.0);
|
|
54
|
+
vec2 quadClipPosition = ndcPosition.xy + offsetFromCenter * clipSpacePixelScale - inverseScreenSize;
|
|
55
|
+
projection.clipPosition = vec4(quadClipPosition, ndcPosition.z, 1.0);
|
|
56
|
+
${h(r.normalizedCutoff,g`projection.coordinates = computeGaussianUnitQuadCorner(gl_VertexID);`)}
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
`),r.preciseDepth&&(e.include(b),e.vertex.uniforms.add(n),e.fragment.include(t))}function b(e){e.vertex.code.add(g`vec3 reconstructViewRay(vec2 clipPosition, mat4 inverseProjection) {
|
|
51
60
|
vec3 rayViewPoint = (inverseProjection * vec4(clipPosition, -1.0, 1.0)).xyz;
|
|
52
61
|
return vec3(-rayViewPoint.xy / rayViewPoint.z, -1.0);
|
|
53
62
|
}
|
|
@@ -62,18 +71,18 @@ vec3 inverseGaussianScale = 1.0 / gaussianScale;
|
|
|
62
71
|
vec3 rayGaussianFactorCenter = (gaussianRotation * cameraRelativePosition) * inverseGaussianScale;
|
|
63
72
|
vec3 rayGaussianFactorRay = (gaussianRotation * (transpose(viewRotation) * rayView)) * inverseGaussianScale;
|
|
64
73
|
return vec4(rayGaussianFactorRay, dot(rayGaussianFactorCenter, rayGaussianFactorRay));
|
|
65
|
-
}`);let t=
|
|
74
|
+
}`);let t=g`float computeGaussianRayDepth(vec4 rayFactor) {
|
|
66
75
|
return rayFactor.w / dot(rayFactor.xyz, rayFactor.xyz);
|
|
67
|
-
}`;e.vertex.code.add(t),e.fragment.code.add(t)}function x(e){e.uniforms.add(new _(`splatFadingTexture`,e=>e.splatFading)),e.code.add(
|
|
76
|
+
}`;e.vertex.code.add(t),e.fragment.code.add(t)}function x(e){e.uniforms.add(new _(`splatFadingTexture`,e=>e.splatFading)),e.code.add(g`float applyGaussianSplatFading(float opacity, uint gaussianIndex) {
|
|
68
77
|
uint pageIndex = fetchGaussianPageIndex(gaussianIndex);
|
|
69
78
|
uint fadingTextureWidth = uint(textureSize(splatFadingTexture, 0).x);
|
|
70
79
|
uint fadeX = pageIndex % fadingTextureWidth;
|
|
71
80
|
uint fadeY = pageIndex / fadingTextureWidth;
|
|
72
81
|
uint opacityModifier = texelFetch(splatFadingTexture, ivec2(fadeX, fadeY), 0).r;
|
|
73
82
|
return opacity * float(opacityModifier) / 255.0;
|
|
74
|
-
}`)}function S(t,n){n.clippingEnabled&&t.uniforms.add(new p(`clipMin`,e=>e.clipMinCameraRelative),new p(`clipMax`,e=>e.clipMaxCameraRelative)),t.include(e,n),t.code.add(
|
|
83
|
+
}`)}function S(t,n){n.clippingEnabled&&t.uniforms.add(new p(`clipMin`,e=>e.clipMinCameraRelative),new p(`clipMax`,e=>e.clipMaxCameraRelative)),t.include(e,n),t.code.add(g`
|
|
75
84
|
bool rejectGaussianPosition(vec3 positionCameraRelative) {
|
|
76
|
-
${
|
|
85
|
+
${h(n.clippingEnabled,g`
|
|
77
86
|
if (any(lessThan(positionCameraRelative, clipMin)) || any(greaterThan(positionCameraRelative, clipMax))) {
|
|
78
87
|
return true;
|
|
79
88
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{
|
|
2
|
+
import{__decorate as e}from"tslib";import{isColor as t}from"../core/shaderLibrary/ShaderOutput.js";import{SliceConfiguration as n}from"../core/shaderLibrary/Slice.glsl.js";import{parameter as r}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";class i extends n{constructor(e){super(),this.spherical=e,this.alphaCutoff=1,this.fadingEnabled=!1,this.clippingEnabled=!1,this.writeNormals=!1,this.preciseDepth=!1,this.receiveShadows=!1,this.fragmentShading=!0,this.hasShadowHighlights=!1,this.output=0,this.hasEmission=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.pbrMode=0,this.useCustomDTRExponentForWater=!1,this.useFillLights=!1,this.draped=!1,this.hasColorTexture=!0}get normalizedCutoff(){return!t(this.output)}}e([r({count:3})],i.prototype,`alphaCutoff`,void 0),e([r()],i.prototype,`fadingEnabled`,void 0),e([r()],i.prototype,`clippingEnabled`,void 0),e([r()],i.prototype,`writeNormals`,void 0),e([r()],i.prototype,`preciseDepth`,void 0),e([r()],i.prototype,`receiveShadows`,void 0),e([r()],i.prototype,`fragmentShading`,void 0),e([r()],i.prototype,`hasShadowHighlights`,void 0),e([r({count:12})],i.prototype,`output`,void 0),e([r()],i.prototype,`receiveAmbientOcclusion`,void 0),e([r()],i.prototype,`receiveGlobalIllumination`,void 0);function a(e){switch(e){case 2:return .005;case 0:return .05;default:return .01}}export{i as GaussianSplatTechniqueConfiguration,a as getGaussianSplatAlphaCutoffValue};
|
package/views/VideoView.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import type { EventedMixin } from "../core/Evented.js";
|
|
|
7
7
|
import type { EsriPromiseMixin } from "../core/Promise.js";
|
|
8
8
|
import type { ScreenRect } from "../core/types.js";
|
|
9
9
|
import type { DOMContainer, DOMContainerProperties } from "./DOMContainer.js";
|
|
10
|
+
import type { Screenshot, UserSettings } from "./types.js";
|
|
10
11
|
import type { Viewport2DMixin } from "./Viewport2DMixin.js";
|
|
11
12
|
import type { NavigationProperties } from "./navigation/Navigation.js";
|
|
12
13
|
|
|
@@ -183,5 +184,14 @@ export default class VideoView extends VideoViewSuperclass {
|
|
|
183
184
|
number,
|
|
184
185
|
number
|
|
185
186
|
];
|
|
187
|
+
/**
|
|
188
|
+
* Captures the current video frame as a static image. Excludes operational overlays and view element UI.
|
|
189
|
+
* Layer filtering and decoration settings do not apply to this video-only capture.
|
|
190
|
+
*
|
|
191
|
+
* @param options - Settings for the video screenshot.
|
|
192
|
+
* @returns Resolves to the screenshot's data URL and raw image data. Rejects if the view is not ready.
|
|
193
|
+
* @since 6.0
|
|
194
|
+
*/
|
|
195
|
+
takeScreenshot(options?: Partial<UserSettings>): Promise<Screenshot>;
|
|
186
196
|
}
|
|
187
197
|
declare const VideoViewSuperclass: typeof Accessor & typeof EsriPromiseMixin & typeof EventedMixin & typeof DOMContainer & typeof Viewport2DMixin
|