@arcgis/core 4.33.0-next.20250416 → 4.33.0-next.20250417
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/analysis/Analysis.js +1 -1
- package/analysis/AreaMeasurementAnalysis.js +1 -1
- package/analysis/DimensionAnalysis.js +1 -1
- package/analysis/DirectLineMeasurementAnalysis.js +1 -1
- package/analysis/LengthDimension.js +1 -1
- package/analysis/LineOfSightAnalysis.js +1 -1
- package/analysis/SliceAnalysis.js +1 -1
- package/analysis/Viewshed.js +1 -1
- package/analysis/ViewshedAnalysis.js +1 -1
- package/assets/components/assets/icon/browserJoin16.json +1 -0
- package/assets/components/assets/icon/browserJoin24.json +1 -0
- package/assets/components/assets/icon/browserJoin32.json +1 -0
- package/assets/components/assets/icon/browserPlus16.json +1 -0
- package/assets/components/assets/icon/browserPlus24.json +1 -0
- package/assets/components/assets/icon/browserPlus32.json +1 -0
- package/assets/components/assets/icon/check16.json +1 -1
- package/assets/components/assets/icon/check24.json +1 -1
- package/assets/components/assets/icon/check32.json +1 -1
- package/assets/components/assets/icon/classroomGis16.json +1 -0
- package/assets/components/assets/icon/classroomGis24.json +1 -0
- package/assets/components/assets/icon/classroomGis32.json +1 -0
- package/assets/components/assets/icon/documentLearning16.json +1 -0
- package/assets/components/assets/icon/documentLearning24.json +1 -0
- package/assets/components/assets/icon/documentLearning32.json +1 -0
- package/assets/components/assets/icon/doubleFloatSet16.json +1 -0
- package/assets/components/assets/icon/doubleFloatSet24.json +1 -0
- package/assets/components/assets/icon/doubleFloatSet32.json +1 -0
- package/assets/components/assets/icon/eLearningGis16.json +1 -0
- package/assets/components/assets/icon/eLearningGis24.json +1 -0
- package/assets/components/assets/icon/eLearningGis32.json +1 -0
- package/assets/components/assets/icon/language216.json +1 -0
- package/assets/components/assets/icon/language224.json +1 -0
- package/assets/components/assets/icon/language232.json +1 -0
- package/assets/components/assets/icon/layerSet16.json +1 -0
- package/assets/components/assets/icon/layerSet24.json +1 -0
- package/assets/components/assets/icon/layerSet32.json +1 -0
- package/assets/components/assets/icon/learningGisWorkflow16.json +1 -0
- package/assets/components/assets/icon/learningGisWorkflow24.json +1 -0
- package/assets/components/assets/icon/learningGisWorkflow32.json +1 -0
- package/assets/components/assets/icon/learningSteps16.json +1 -0
- package/assets/components/assets/icon/learningSteps24.json +1 -0
- package/assets/components/assets/icon/learningSteps32.json +1 -0
- package/assets/components/assets/icon/learningWebCourse16.json +1 -0
- package/assets/components/assets/icon/learningWebCourse24.json +1 -0
- package/assets/components/assets/icon/learningWebCourse32.json +1 -0
- package/assets/components/assets/icon/mapInformation16.json +1 -0
- package/assets/components/assets/icon/mapInformation24.json +1 -0
- package/assets/components/assets/icon/mapInformation32.json +1 -0
- package/assets/components/assets/icon/mooc16.json +1 -0
- package/assets/components/assets/icon/mooc24.json +1 -0
- package/assets/components/assets/icon/mooc32.json +1 -0
- package/assets/components/assets/icon/multipleVariablesSet16.json +1 -0
- package/assets/components/assets/icon/multipleVariablesSet24.json +1 -0
- package/assets/components/assets/icon/multipleVariablesSet32.json +1 -0
- package/assets/components/assets/icon/parameters16.json +1 -0
- package/assets/components/assets/icon/parameters24.json +1 -0
- package/assets/components/assets/icon/parameters32.json +1 -0
- package/assets/components/assets/icon/parametersGear16.json +1 -0
- package/assets/components/assets/icon/parametersGear24.json +1 -0
- package/assets/components/assets/icon/parametersGear32.json +1 -0
- package/assets/components/assets/icon/parametersPlus16.json +1 -0
- package/assets/components/assets/icon/parametersPlus24.json +1 -0
- package/assets/components/assets/icon/parametersPlus32.json +1 -0
- package/assets/components/assets/icon/storymapExperience16.json +1 -0
- package/assets/components/assets/icon/storymapExperience24.json +1 -0
- package/assets/components/assets/icon/storymapExperience32.json +1 -0
- package/assets/components/assets/icon/stringSet16.json +1 -0
- package/assets/components/assets/icon/stringSet24.json +1 -0
- package/assets/components/assets/icon/stringSet32.json +1 -0
- package/assets/components/assets/icon/tableSet16.json +1 -0
- package/assets/components/assets/icon/tableSet24.json +1 -0
- package/assets/components/assets/icon/tableSet32.json +1 -0
- package/assets/components/assets/icon/variablePlus16.json +1 -0
- package/assets/components/assets/icon/variablePlus24.json +1 -0
- package/assets/components/assets/icon/variablePlus32.json +1 -0
- package/assets/components/assets/icon/videoLearning16.json +1 -0
- package/assets/components/assets/icon/videoLearning24.json +1 -0
- package/assets/components/assets/icon/videoLearning32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/05cba30c0d3855de7a65.js +1 -0
- package/assets/esri/core/workers/chunks/{7ef9bcd58af499a14a08.js → 089a19381b66cd074425.js} +1 -1
- package/assets/esri/core/workers/chunks/0be7a0f4c4f4f91d1957.js +1 -0
- package/assets/esri/core/workers/chunks/0c6f2808c57ff820bfdd.js +2 -0
- package/assets/esri/core/workers/chunks/{baed733a29aa65efc2a0.js.LICENSE.txt → 0c6f2808c57ff820bfdd.js.LICENSE.txt} +7 -1
- package/assets/esri/core/workers/chunks/103c78c8bfdb56227bc0.js +1 -0
- package/assets/esri/core/workers/chunks/184d7c8ea818bec5c462.js +1 -0
- package/assets/esri/core/workers/chunks/{4523ba4a3c8987abca56.js → 1c75f7e4d2e9c8e377e7.js} +1 -1
- package/assets/esri/core/workers/chunks/1e1c3243ac82c969bb1f.js +1 -0
- package/assets/esri/core/workers/chunks/22f604726529ee6f8c25.js +1 -0
- package/assets/esri/core/workers/chunks/25142d431dd1e5e82234.js +1 -0
- package/assets/esri/core/workers/chunks/25e19bd171eeb5634a4f.js +1 -0
- package/assets/esri/core/workers/chunks/26924d2f03b8a1b7a9b2.js +1 -0
- package/assets/esri/core/workers/chunks/27482132abb939a1cdb7.js +1 -0
- package/assets/esri/core/workers/chunks/2ae1dbdac9f24f4a3c84.js +1 -0
- package/assets/esri/core/workers/chunks/{984c5047ab1fa632ca09.js → 2db5dd5638c93b0af102.js} +1 -1
- package/assets/esri/core/workers/chunks/31b2ceed80796c7f6c03.js +1 -0
- package/assets/esri/core/workers/chunks/3521a53f826f0ce6ac33.js +1 -0
- package/assets/esri/core/workers/chunks/3697ec74522cc5059098.js +1 -0
- package/assets/esri/core/workers/chunks/{60472225a228e499b1a2.js → 38557792ff9516fc991b.js} +1 -1
- package/assets/esri/core/workers/chunks/388a763da712ca71ccf4.js +1 -0
- package/assets/esri/core/workers/chunks/38f9ede26098eb03ca2d.js +2 -0
- package/assets/esri/core/workers/chunks/{239821543abbd63c5787.js.LICENSE.txt → 38f9ede26098eb03ca2d.js.LICENSE.txt} +3 -3
- package/assets/esri/core/workers/chunks/3b8eee013d7ca156ef2d.js +1 -0
- package/assets/esri/core/workers/chunks/{7f86c9ec45f4fae1fb49.js → 3ee505f9ddb671dcfa52.js} +1 -1
- package/assets/esri/core/workers/chunks/3f3a2c6ce48d832bf2f1.js +1 -0
- package/assets/esri/core/workers/chunks/{82493f51a2182f76dd2f.js → 459e3e507e8ea3e7e6ab.js} +1 -1
- package/assets/esri/core/workers/chunks/51b5dfc7085272d26b89.js +1 -0
- package/assets/esri/core/workers/chunks/536d7986ebb710a8a452.js +1 -0
- package/assets/esri/core/workers/chunks/53eaad20c4f55dae21e0.js +1 -0
- package/assets/esri/core/workers/chunks/55eff05354069f34bb1d.js +1 -0
- package/assets/esri/core/workers/chunks/569e9ec636199d1f1744.js +1 -0
- package/assets/esri/core/workers/chunks/598fade09fa4da759ac2.js +1 -0
- package/assets/esri/core/workers/chunks/5ac3096139e3eafd0e1d.js +1 -0
- package/assets/esri/core/workers/chunks/{93d06a1a0b700ddb3807.js → 5bdd5ae2d2f23ef6b331.js} +1 -1
- package/assets/esri/core/workers/chunks/5db336767959507c07e5.js +2 -0
- package/assets/esri/core/workers/chunks/{c03bffa13841e4f80379.js.LICENSE.txt → 5db336767959507c07e5.js.LICENSE.txt} +2 -2
- package/assets/esri/core/workers/chunks/5e5225623977e61fd0ef.js +1 -0
- package/assets/esri/core/workers/chunks/642a595353a86f3717e3.js +1 -0
- package/assets/esri/core/workers/chunks/64640051f1fd787a3362.js +1 -0
- package/assets/esri/core/workers/chunks/6d230c55cde66ee905b3.js +1 -0
- package/assets/esri/core/workers/chunks/{c1bd47cde53918f454ca.js → 729407e372c8353cf871.js} +1 -1
- package/assets/esri/core/workers/chunks/{29283c19e1ccdc6cfbde.js → 736a11e64e5f03e3936b.js} +34 -33
- package/assets/esri/core/workers/chunks/769b66cca8347f0f84db.js +1 -0
- package/assets/esri/core/workers/chunks/7c4746f60332620f75c5.js +1 -0
- package/assets/esri/core/workers/chunks/{b6dd25bccb9f6e19c18e.js → 7c7ff11246479382974c.js} +1 -1
- package/assets/esri/core/workers/chunks/7fce62ef3f0b011e0d35.js +1 -0
- package/assets/esri/core/workers/chunks/814d72abbfdd4552e4ec.js +2 -0
- package/assets/esri/core/workers/chunks/{373782e9f5d61616fde4.js.LICENSE.txt → 814d72abbfdd4552e4ec.js.LICENSE.txt} +1 -6
- package/assets/esri/core/workers/chunks/{07f206719763173faa8d.js → 873327fc41edd3830afa.js} +4 -4
- package/assets/esri/core/workers/chunks/8ea182c2fc20dba79ef2.js +1 -0
- package/assets/esri/core/workers/chunks/{d58fae2fc9d148e015ae.js → 90dc783a617ff053e862.js} +1 -1
- package/assets/esri/core/workers/chunks/93e9dfd1ba8f393c6c47.js +1 -0
- package/assets/esri/core/workers/chunks/93f792f5b94f3745b57d.js +2 -0
- package/assets/esri/core/workers/chunks/{3845e1d47bb51c06682e.js.LICENSE.txt → 93f792f5b94f3745b57d.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/a197c86d42cc9ce21924.js +1 -0
- package/assets/esri/core/workers/chunks/a276980c06d5d311a37e.js +1 -0
- package/assets/esri/core/workers/chunks/a600194cfe26aedc21dd.js +1 -0
- package/assets/esri/core/workers/chunks/{a4239e301728d594afa5.js → a6b14665a46c2af5ac11.js} +1 -1
- package/assets/esri/core/workers/chunks/ae156b99e60a2bf940e4.js +1 -0
- package/assets/esri/core/workers/chunks/afcb12bf54a5656f641e.js +2 -0
- package/assets/esri/core/workers/chunks/{75e01c6404cbd51daabc.js.LICENSE.txt → afcb12bf54a5656f641e.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/b2f1d1721a9dd88a1adf.js +1 -0
- package/assets/esri/core/workers/chunks/{4275dcec730a11173661.js → b7fc99ec15e2c86a6425.js} +1 -1
- package/assets/esri/core/workers/chunks/b8248939373e25a8d6db.js +1 -0
- package/assets/esri/core/workers/chunks/bbaadce582df7e20397b.js +1 -0
- package/assets/esri/core/workers/chunks/{18404cd87d29b2bdc7bf.js → c4dba6cf17aece714d22.js} +1 -1
- package/assets/esri/core/workers/chunks/c5d786166a5609b85276.js +2 -0
- package/assets/esri/core/workers/chunks/{e4d522ade82192f32d54.js.LICENSE.txt → c5d786166a5609b85276.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{f4111bb5e5a4910b684a.js → c616139a160eab9cd717.js} +1 -1
- package/assets/esri/core/workers/chunks/{c589d32f8efcca6bf712.js → c6b08fdc0421258efcf5.js} +1 -1
- package/assets/esri/core/workers/chunks/c779335f5d5455c77a62.js +1 -0
- package/assets/esri/core/workers/chunks/{eb61e484f090fca28937.js → cb2be1a81bdd3443f758.js} +1 -1
- package/assets/esri/core/workers/chunks/ccc50f28f217e50cc2c3.js +1 -0
- package/assets/esri/core/workers/chunks/cd2927b922444880566d.js +1 -0
- package/assets/esri/core/workers/chunks/{df1225a3e751a662c182.js → d04efa51da9b4eb3a8a7.js} +1 -1
- package/assets/esri/core/workers/chunks/d434d44916d32d4b10d5.js +1 -0
- package/assets/esri/core/workers/chunks/{50c1753ee3dc0d28ffd7.js → d696abbb1b13ac1a689b.js} +1 -1
- package/assets/esri/core/workers/chunks/dbaa4b8d37aab40d7bd1.js +2 -0
- package/assets/esri/core/workers/chunks/dbaa4b8d37aab40d7bd1.js.LICENSE.txt +3 -0
- package/assets/esri/core/workers/chunks/{4a15308b54734247f38e.js → dd8e72d6784a8ebc115d.js} +1 -1
- package/assets/esri/core/workers/chunks/de0784474d2e9e504a91.js +1 -0
- package/assets/esri/core/workers/chunks/{aca3ccb9599bcc444617.js → e1472af8f5d64c057d04.js} +1 -1
- package/assets/esri/core/workers/chunks/e27fa1e84f16b7f19a90.js +1 -0
- package/assets/esri/core/workers/chunks/e2cd6038d9c7167b128e.js +1 -0
- package/assets/esri/core/workers/chunks/{0252d853419adc203f04.js → ef6e805c49e1afdf966b.js} +1 -1
- package/assets/esri/core/workers/chunks/f2bc75a718a10065011d.js +1 -0
- package/assets/esri/core/workers/chunks/{1263391920fbb8926ced.js → f34ce3c37a385b341631.js} +1 -1
- package/assets/esri/core/workers/chunks/{e3d25d027885eb1a415f.js → f458a40e1f8fce3ad23c.js} +1 -1
- package/assets/esri/core/workers/chunks/f65b720b750aebca1bcd.js +1 -0
- package/assets/esri/core/workers/chunks/fdcbd28f38bc485ac5e3.js +1 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/ComponentShader.glsl.js +14 -14
- package/chunks/DefaultMaterial.glsl.js +6 -6
- package/chunks/OITBlend.glsl.js +1 -0
- package/chunks/Path.glsl.js +3 -3
- package/chunks/RealisticTree.glsl.js +5 -5
- package/chunks/SSAO.glsl.js +5 -4
- package/chunks/Viewshed.glsl.js +1 -1
- package/core/promiseUtils.d.ts +1 -0
- package/core/urlUtils.d.ts +4 -0
- package/identity/IdentityModal.js +1 -1
- package/interfaces.d.ts +246 -42
- package/intl/date.js +1 -1
- package/intl/messages.js +1 -1
- package/intl/number.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/ParquetLayer.js +1 -1
- package/layers/ViewshedLayer.js +1 -1
- package/layers/graphics/sources/ParquetSource.js +1 -1
- package/layers/save/featureLayerUtils.js +1 -1
- package/layers/support/ParquetEncodingBase.js +5 -0
- package/layers/support/ParquetEncodingLocation.js +5 -0
- package/layers/support/ParquetEncodingWkb.js +5 -0
- package/layers/support/layerUtils.js +1 -1
- package/layers/support/parquetUtils.js +5 -0
- package/libs/parquet/parquet.js +1 -1
- package/package.json +2 -2
- package/portal/PortalItem.js +1 -1
- package/portal/PortalUser.js +1 -1
- package/portal/support/portalItemUtils.js +1 -1
- package/rest/networks/trace.js +1 -1
- package/rest/print.js +1 -1
- package/support/TablesMixin.js +1 -1
- package/support/modeUtils.js +5 -0
- package/support/revision.js +1 -1
- package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetLoadStrategy.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedComputedData.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedVisualization.js +1 -1
- package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
- package/views/3d/interactive/editingTools/transform/ExtentTransformTool.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentMove.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentRotate.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +1 -1
- package/views/3d/interactive/visualElements/ViewshedShapeVisualElement.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/Laserline.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
- package/views/ToolViewManager.js +1 -1
- package/views/analysis/analysisViewUtils.js +1 -1
- package/views/draw/support/HighlightHelper.js +1 -1
- package/views/interactive/InteractiveToolBase.js +1 -1
- package/views/interactive/Tooltip.js +1 -1
- package/views/interactive/interactiveToolUtils.js +1 -1
- package/views/interactive/keybindings.js +1 -1
- package/views/ui/UI.js +1 -1
- package/webdoc/support/saveUtils.js +1 -1
- package/webdoc/support/webdocSaveUtils.js +1 -1
- package/widgets/ElevationProfile/support/chartUtils.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/Feature/support/featureUtils.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Legend/support/sizeRampUtils.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/widgets/support/AnalysisViewModel.js +1 -1
- package/widgets/support/InteractiveAnalysisViewModel.js +1 -1
- package/widgets/support/widget.js +1 -1
- package/assets/esri/core/workers/chunks/0297e55a49ca0d1231ef.js +0 -1
- package/assets/esri/core/workers/chunks/04008648c59031bca8ea.js +0 -1
- package/assets/esri/core/workers/chunks/067dda58592fbf4fb812.js +0 -1
- package/assets/esri/core/workers/chunks/0b4e63e705db09dbe171.js +0 -1
- package/assets/esri/core/workers/chunks/1072b4f37eacbbfda2c8.js +0 -1
- package/assets/esri/core/workers/chunks/1b87fa15470cce26feea.js +0 -1
- package/assets/esri/core/workers/chunks/239821543abbd63c5787.js +0 -2
- package/assets/esri/core/workers/chunks/272a309760dacb13dee3.js +0 -1
- package/assets/esri/core/workers/chunks/2791f1f2791087d0217f.js +0 -1
- package/assets/esri/core/workers/chunks/35dccd3883d2e466c42e.js +0 -1
- package/assets/esri/core/workers/chunks/364860a42edc0c3b8d5b.js +0 -1
- package/assets/esri/core/workers/chunks/373782e9f5d61616fde4.js +0 -2
- package/assets/esri/core/workers/chunks/37e49d1a1407c193dcd0.js +0 -1
- package/assets/esri/core/workers/chunks/37e4f588a6896f98bce3.js +0 -1
- package/assets/esri/core/workers/chunks/3845e1d47bb51c06682e.js +0 -2
- package/assets/esri/core/workers/chunks/3f6dc811b5d515c2725c.js +0 -1
- package/assets/esri/core/workers/chunks/42aab2a336ee22fd9055.js +0 -1
- package/assets/esri/core/workers/chunks/4ba34124054752b363c0.js +0 -1
- package/assets/esri/core/workers/chunks/4baef5262ce401bf81bb.js +0 -1
- package/assets/esri/core/workers/chunks/593396b4c210da77a131.js +0 -1
- package/assets/esri/core/workers/chunks/5b32c2a1b276352593dc.js +0 -1
- package/assets/esri/core/workers/chunks/5df4e73905c0ae75e37c.js +0 -1
- package/assets/esri/core/workers/chunks/5fb9bb3ac2f60dbd59c4.js +0 -1
- package/assets/esri/core/workers/chunks/66e90f7d473d1f688254.js +0 -1
- package/assets/esri/core/workers/chunks/68d7babbe7e0d934e056.js +0 -1
- package/assets/esri/core/workers/chunks/6e6b60779c11efc128af.js +0 -1
- package/assets/esri/core/workers/chunks/759c12b0715279e3c0f6.js +0 -1
- package/assets/esri/core/workers/chunks/75e01c6404cbd51daabc.js +0 -2
- package/assets/esri/core/workers/chunks/77660e18ea793ae85f83.js +0 -1
- package/assets/esri/core/workers/chunks/879d672d12f9ef2e1b50.js +0 -1
- package/assets/esri/core/workers/chunks/90442f47c9f31f26b453.js +0 -1
- package/assets/esri/core/workers/chunks/91439b59260b0fb04be9.js +0 -1
- package/assets/esri/core/workers/chunks/96978d039f183565bffa.js +0 -1
- package/assets/esri/core/workers/chunks/999a4f7ca581f28cc1c4.js +0 -1
- package/assets/esri/core/workers/chunks/af41dcc8006cd0f451c2.js +0 -1
- package/assets/esri/core/workers/chunks/af9fda47d02c51a2c7da.js +0 -1
- package/assets/esri/core/workers/chunks/baed733a29aa65efc2a0.js +0 -2
- package/assets/esri/core/workers/chunks/c03bffa13841e4f80379.js +0 -2
- package/assets/esri/core/workers/chunks/c7ab674764312d65348f.js +0 -1
- package/assets/esri/core/workers/chunks/ca0572fe5614005acceb.js +0 -1
- package/assets/esri/core/workers/chunks/d2c7067bb6654c0e2793.js +0 -1
- package/assets/esri/core/workers/chunks/d46c82a55219b27c301b.js +0 -1
- package/assets/esri/core/workers/chunks/d89f105b8a0b13dd8e5f.js +0 -1
- package/assets/esri/core/workers/chunks/e13caf9691f556071e31.js +0 -1
- package/assets/esri/core/workers/chunks/e14449f07ed3386f4f2b.js +0 -1
- package/assets/esri/core/workers/chunks/e31bb256921807464715.js +0 -1
- package/assets/esri/core/workers/chunks/e4d522ade82192f32d54.js +0 -2
- package/assets/esri/core/workers/chunks/e5713b757f770a138b8c.js +0 -1
- package/assets/esri/core/workers/chunks/e6544e966f14fb410157.js +0 -1
- package/assets/esri/core/workers/chunks/e792603b7cc3ddd133f3.js +0 -1
- package/assets/esri/core/workers/chunks/e7cb4003c45e42b48ea6.js +0 -1
- package/assets/esri/core/workers/chunks/eb011e8b14db37ddb110.js +0 -1
- package/assets/esri/core/workers/chunks/f0c864425f000ab87a7b.js +0 -1
- package/assets/esri/core/workers/chunks/f7d33d18bf1bd4db9df8.js +0 -1
- package/assets/esri/core/workers/chunks/f9396af9cbfd165e72e2.js +0 -1
- package/assets/esri/core/workers/chunks/fa2d836d4a844b26b84e.js +0 -1
- package/layers/support/parquetLayerUtils.js +0 -5
- package/support/themeUtils.js +0 -5
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../../chunks/tslib.es6.js";import e from"../../../../../core/Evented.js";import{makeHandle as i}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{watch as o,initial as a}from"../../../../../core/reactiveUtils.js";import{property as s}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as n}from"../../../../../core/accessorSupport/decorators/subclass.js";import{containsXY as r}from"../../../../../geometry/support/aaBoundingRect.js";import{sm4d as l}from"../../../../../geometry/support/vectorStacks.js";import{calculateBoundedPlaneTranslateRotate as p,resizeNormal as h,resizeOutlineOnly as c}from"../../../analysis/Slice/sliceToolUtils.js";import{Manipulator3D as d}from"../../Manipulator3D.js";import{manipulatedObjectGeometry as u}from"../manipulatedObjectUtils.js";import{ManipulatorType as m}from"../ManipulatorType.js";import{canMoveZOperations as b}from"../manipulatorUtils.js";import{createVisualElements as v}from"../visualElementUtils.js";import{ExtentMove as _}from"./extentTransform/ExtentMove.js";import{ExtentRotate as
|
|
5
|
+
import{_ as t}from"../../../../../chunks/tslib.es6.js";import e from"../../../../../core/Evented.js";import{makeHandle as i}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{watch as o,initial as a}from"../../../../../core/reactiveUtils.js";import{property as s}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as n}from"../../../../../core/accessorSupport/decorators/subclass.js";import{containsXY as r}from"../../../../../geometry/support/aaBoundingRect.js";import{sm4d as l}from"../../../../../geometry/support/vectorStacks.js";import{calculateBoundedPlaneTranslateRotate as p,resizeNormal as h,resizeOutlineOnly as c}from"../../../analysis/Slice/sliceToolUtils.js";import{Manipulator3D as d}from"../../Manipulator3D.js";import{manipulatedObjectGeometry as u}from"../manipulatedObjectUtils.js";import{ManipulatorType as m}from"../ManipulatorType.js";import{canMoveZOperations as b}from"../manipulatorUtils.js";import{createVisualElements as v}from"../visualElementUtils.js";import{ExtentMove as _}from"./extentTransform/ExtentMove.js";import{ExtentRotate as g}from"./extentTransform/ExtentRotate.js";import{ExtentScale as f}from"./extentTransform/ExtentScale.js";import{TransformBounds as j}from"./extentTransform/extentUtils.js";import{PreserveAspectRatio as y}from"./extentTransform/PreserveAspectRatio.js";import{SnapRotation as M}from"./extentTransform/SnapRotation.js";import{OutlineVisualElement as R}from"../../visualElements/OutlineVisualElement.js";import{InteractiveToolBase as x}from"../../../../interactive/InteractiveToolBase.js";import E from"../../../../interactive/sketch/SketchOptions.js";import{makeTooltip as A}from"../../../../interactive/tooltip/tooltipCommonUtils.js";let S=class extends x{get updating(){return!!this.object.updating}constructor(t){super(t),this.events=new e,this.enableZ=!0,this.enableScaling=!0,this.enableRotation=!0,this.sketchOptions=new E,this._preserveAspectRatio=new y,this._snapRotation=new M,this.grabbing=!1,this.inputState=null,this._attachmentOrigin=null,this.type="transform-3d",this._outlineVisualElement=null}initialize(){const{view:t,object:e}=this,s=this._bounds=new j(this,(()=>this._updateManipulators()));this._extentMove=new _(this,s),this._extentScale=new f(this,s,(()=>this._preserveAspectRatio.createDragEventPipelineStep())),this._extentRotate=new g(this,s,(()=>this._snapRotation.createDragEventPipelineStep())),this.addHandles([o((()=>this.enableZ),(()=>this._updateManipulatorAvailability(this._extentMove.moveZManipulator,m.TRANSLATE_Z))),o((()=>this.enableScaling),(()=>this._extentScale.forEachManipulator((t=>this._updateManipulatorAvailability(t,m.SCALE))))),o((()=>this.enableRotation),(()=>this._updateManipulatorAvailability(this._extentRotate.rotateManipulator,m.ROTATE)))]),this._updateManipulators(),this._updateAllManipulatorAvailability();const n=v({view:t,object:e,forEachManipulator:t=>this._forEachManipulator(t),onManipulatorsChanged:()=>i()});if(null!=n){const{visualElement:t}=n;t instanceof R&&(this._outlineVisualElement=t,this.addHandles(t.events.on("attachment-origin-changed",(()=>this._bounds.updateDisplayBounds())))),this.addHandles(n)}this.addHandles([e.on("committed",(()=>this._onGeometryChanged())),o((()=>this.object.visible),(()=>this._updateAllManipulatorAvailability())),o((()=>this.object.isDraped),(()=>this._graphicDrapedChanged()),a),o((()=>t.pointsOfInterest?.centerOnSurfaceFrequent.location),(()=>s.updateDisplayBounds()))]);const r=t=>{this.addHandles(t.events.on("grab-changed",(()=>{this.grabbing=t.grabbing,this._updateAllManipulatorAvailability()})))};this._forEachManipulator(r);const l=(t,i)=>{this.addHandles(t.events.on("immediate-click",(t=>{i===m.TRANSLATE_XY&&this.events.emit("immediate-click",{...t,object:e}),t.stopPropagation()})))};this._forEachManipulator(l),this._initializeTooltip(),this.finishToolCreation()}destroy(){this._extentMove.destroy(),this._extentScale.destroy(),this._extentRotate.destroy(),this.tooltip.destroy(),this._set("view",null),this._set("object",null)}_initializeTooltip(){const{view:t}=this;this.tooltip=A((()=>({view:t,options:this.sketchOptions.tooltips})));const e=()=>{this.tooltip.info=this._getUpdatedTooltipInfo()};this.addHandles([o((()=>this.sketchOptions.tooltips.effectiveEnabled),e),o((()=>this.preserveAspectRatio),e)]),this._forEachManipulator((t=>{this.addHandles([t.events.on(["focus-changed","grab-changed"],e),t.events.on("drag",(t=>{"cancel"===t.action?this.tooltip.clear():e()}))])}))}_getUpdatedTooltipInfo(){return this.sketchOptions.tooltips.effectiveEnabled?this._extentMove.getUpdatedTooltipInfo()??this._extentScale.getUpdatedTooltipInfo()??this._extentRotate.getUpdatedTooltipInfo():null}_onGeometryChanged(){this._bounds.updateDisplayBounds()}_graphicDrapedChanged(){this.removeHandles(T),this._bounds.updateDisplayBounds(),this.object.isDraped&&this.addHandles(this.view.elevationProvider.on("elevation-change",(t=>{null!=this._attachmentOrigin&&r(t.extent,this._attachmentOrigin.x,this._attachmentOrigin.y)&&this._bounds.updateDisplayBounds()})),T)}_updateManipulators(){if(!this.visible)return;const t=this._bounds.displayBounds,e=p(t,l.get());this._extentMove.updateManipulators(e,t),this._extentScale.updateManipulators(e,t),this._extentRotate.updateManipulators(e,t)}_updateAllManipulatorAvailability(){this._forEachManipulator(((t,e)=>this._updateManipulatorAvailability(t,e)))}_updateManipulatorAvailability(t,e){const i=this.grabbing&&!t.grabbing;if(t.interactive=!i,t instanceof d){const o=this.object.visible,a=this.enableZ&&b(this.object.operations,this.object.elevationInfo);switch(e){case m.ROTATE:t.available=o&&this.enableRotation;break;case m.SCALE:t.available=o&&(this.enableScaling||this.enableRotation||a),t.interactive=!i&&this.enableScaling,t.state=this.enableScaling?h:c;break;case m.TRANSLATE_Z:t.available=o&&a;break;default:t.available=o}}}_forEachManipulator(t){this._extentMove.forEachManipulator(t),this._extentScale.forEachManipulator(t),this._extentRotate.forEachManipulator(t)}get preserveAspectRatio(){return this._preserveAspectRatio.enabled}set preserveAspectRatio(t){this._preserveAspectRatio.enabled=t,this._set("preserveAspectRatio",t)}get snapRotation(){return this._snapRotation.enabled}set snapRotation(t){this._snapRotation.enabled=t,this._set("snapRotation",t)}get attachmentOrigin(){const t=this.object.isDraped?null:this._outlineVisualElement?.attachmentOrigin;return this._attachmentOrigin=t??this.object.origin??u(this.object)?.extent?.center,this._attachmentOrigin}reset(){}cancelDrag(){if(this.canUndo){const t=this.object.operations?.undo();t&&this._bounds.updateMapBoundsFromOperationInverse(t)}this.inputState=null}get canUndo(){return!!this.object.operations?.canUndo}undo(){if(null!=this.inputState)this.view.activeTool=null;else if(this.canUndo){const t=this.object.operations?.undo();t&&this._bounds.updateMapBoundsFromOperationInverse(t)}}get canRedo(){return!!this.object.operations?.canRedo}redo(){if(this.canRedo){const t=this.object.operations?.redo();t&&this._bounds.updateMapBoundsFromOperation(t)}}get test(){}};t([s()],S.prototype,"updating",null),t([s({constructOnly:!0,nonNullable:!0})],S.prototype,"view",void 0),t([s({constructOnly:!0,nonNullable:!0})],S.prototype,"object",void 0),t([s()],S.prototype,"enableZ",void 0),t([s()],S.prototype,"enableScaling",void 0),t([s()],S.prototype,"enableRotation",void 0),t([s({constructOnly:!0,type:E})],S.prototype,"sketchOptions",void 0),t([s()],S.prototype,"preserveAspectRatio",null),t([s()],S.prototype,"snapRotation",null),t([s()],S.prototype,"grabbing",void 0),t([s()],S.prototype,"inputState",void 0),t([s({readOnly:!0})],S.prototype,"type",void 0),t([s()],S.prototype,"tooltip",void 0),S=t([n("esri.views.3d.interactive.editingTools.transform.ExtentTransformTool")],S);const T="draped-elevation-changes";export{S as ExtentTransformTool};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{makeHandle as t}from"../../../../../../core/handleUtils.js";import{zeroMeters as e}from"../../../../../../core/quantityUtils.js";import{rotateZ as o}from"../../../../../../core/libs/gl-matrix-2/math/mat4.js";import{d as i}from"../../../../../../chunks/vec32.js";import{clone as n}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{sm4d as a,sv3d as r}from"../../../../../../geometry/support/vectorStacks.js";import{ShiftManipulator as s,OffsetMode as l}from"../../../../analysis/Slice/ShiftManipulator.js";import{IsShiftEdgeOnScreenFlag as p}from"../../../../analysis/Slice/sliceToolUtils.js";import{screenToZConstrained as c}from"../../dragEventPipeline3D.js";import{ManipulatorType as m}from"../../ManipulatorType.js";import{MoveXYObjectManipulation as u}from"../../manipulations/MoveXYObjectManipulation.js";import{createManipulatorDragEventPipeline as d,addScreenDelta as h,addMapDelta as v}from"../../../../../interactive/dragEventPipeline.js";import{AccumulationBehavior as f}from"../../../../../interactive/editGeometry/interfaces.js";import{TranslateTooltipInfo as _}from"../../../../../interactive/tooltip/infos/TranslateTooltipInfo.js";import{TranslateZTooltipInfo as M}from"../../../../../interactive/tooltip/infos/TranslateZTooltipInfo.js";import{autoDistance2D as g}from"../../../../../support/automaticLengthMeasurementUtils.js";import{verticalSignedDistance as j}from"../../../../../support/euclideanLengthMeasurementUtils.js";class b{get _object(){return this._tool.object}get _operations(){return this._object.operations}constructor(t,e){this._tool=t,this._bounds=e,this._moveXYTooltipInfo=null,this._moveZTooltipInfo=null;const o=this._tool,i=o.view;this.moveXYObjectManipulation=new u({view:i,tool:o,object:this._object}),o.addHandles(this._createMoveXYObjectDragPipeline()),this.moveZManipulator=new s(i,l.CENTER_ON_CALLOUT),this.moveZManipulator.state|=p,o.manipulators.add(this.moveZManipulator),o.addHandles(this._createMoveZDragPipeline()),o.addHandles(o.events.on("translate-stop",(()=>{this._moveXYTooltipInfo=null,this._moveZTooltipInfo=null})))}destroy(){this.moveXYObjectManipulation.destroy(),this._tool.manipulators.remove(this.moveZManipulator),this.moveZManipulator.destroy()}forEachManipulator(t){this.moveXYObjectManipulation.forEachManipulator(t),t(this.moveZManipulator,m.TRANSLATE_Z)}updateManipulators(t,e){const n=this.moveZManipulator,s=o(a.get(),t,Math.PI);s[12]=0,s[13]=0,s[14]=0,n.modelTransform=s,n.renderLocation=i(r.get(),e.origin,e.basis1)}getUpdatedTooltipInfo(){return this.moveXYObjectManipulation.grabbing||this.moveXYObjectManipulation.dragging?this._computeMoveXYTooltipInfo():this.moveZManipulator.focused?this._computeMoveZTooltipInfo():null}_computeMoveXYTooltipInfo(){const t=this._tool,o=this._moveXYTooltipInfo??=new _({sketchOptions:t.sketchOptions});if(this.moveXYObjectManipulation.dragging){const e=this._bounds,i=e.mapBoundsStart.origin,n=e.mapBounds.origin,{renderSpatialReference:a}=t.view;if(!a)return null;const r=g(i,n,a);if(null==r)return null;o.distance=r}else o.distance=e;return o}_computeMoveZTooltipInfo(){const t=this._tool,o=this._moveZTooltipInfo??=new M({sketchOptions:t.sketchOptions});if(this.moveZManipulator.dragging){const e=this._bounds,i=e.mapBoundsStart.origin,n=e.mapBounds.origin,{renderSpatialReference:a}=t.view;if(!a)return null;const r=j(i,n,a);if(null==r)return null;o.distance=r}else o.distance=e;return o}_createMoveXYObjectDragPipeline(){return this.moveXYObjectManipulation.createDragPipeline(((t,e,o)=>this._buildMoveDragPipeline(e,o)))}_createMoveZDragPipeline(){if(!this._operations)return t();const e=this._operations.data.spatialReference;return d(this.moveZManipulator,((t,o,i)=>{const a=n(t.renderLocation),r=o.next(c(this._tool.view,a,e)).next(h());this._buildMoveDragPipeline(r,i)}))}_buildMoveDragPipeline(t,e){const{_tool:o,_object:i}=this;t.next((t=>("start"===t.action&&(o.inputState={type:"move"},this._bounds.backupMapBounds(),o.events.emit("translate-start",{object:i,dxScreen:t.screenDeltaX,dyScreen:t.screenDeltaY})),t))).next(v()).next(this._updateGeometry()).next((t=>{const e={object:i,dxScreen:t.screenDeltaX,dyScreen:t.screenDeltaY};switch(t.action){case"start":case"update":(t.mapEnd.x-t.mapStart.x||t.mapEnd.y-t.mapStart.y||(t.mapEnd.z??0)-(t.mapStart.z??0))&&o.events.emit("translate",e);break;case"end":o.inputState=null,o.events.emit("translate-stop",e)}return t})),e.next((()=>{null!=o.inputState&&o.events.emit("translate-stop",{object:i,dxScreen:0,dyScreen:0}),o.
|
|
5
|
+
import{makeHandle as t}from"../../../../../../core/handleUtils.js";import{zeroMeters as e}from"../../../../../../core/quantityUtils.js";import{rotateZ as o}from"../../../../../../core/libs/gl-matrix-2/math/mat4.js";import{d as i}from"../../../../../../chunks/vec32.js";import{clone as n}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{sm4d as a,sv3d as r}from"../../../../../../geometry/support/vectorStacks.js";import{ShiftManipulator as s,OffsetMode as l}from"../../../../analysis/Slice/ShiftManipulator.js";import{IsShiftEdgeOnScreenFlag as p}from"../../../../analysis/Slice/sliceToolUtils.js";import{screenToZConstrained as c}from"../../dragEventPipeline3D.js";import{ManipulatorType as m}from"../../ManipulatorType.js";import{MoveXYObjectManipulation as u}from"../../manipulations/MoveXYObjectManipulation.js";import{createManipulatorDragEventPipeline as d,addScreenDelta as h,addMapDelta as v}from"../../../../../interactive/dragEventPipeline.js";import{AccumulationBehavior as f}from"../../../../../interactive/editGeometry/interfaces.js";import{TranslateTooltipInfo as _}from"../../../../../interactive/tooltip/infos/TranslateTooltipInfo.js";import{TranslateZTooltipInfo as M}from"../../../../../interactive/tooltip/infos/TranslateZTooltipInfo.js";import{autoDistance2D as g}from"../../../../../support/automaticLengthMeasurementUtils.js";import{verticalSignedDistance as j}from"../../../../../support/euclideanLengthMeasurementUtils.js";class b{get _object(){return this._tool.object}get _operations(){return this._object.operations}constructor(t,e){this._tool=t,this._bounds=e,this._moveXYTooltipInfo=null,this._moveZTooltipInfo=null;const o=this._tool,i=o.view;this.moveXYObjectManipulation=new u({view:i,tool:o,object:this._object}),o.addHandles(this._createMoveXYObjectDragPipeline()),this.moveZManipulator=new s(i,l.CENTER_ON_CALLOUT),this.moveZManipulator.state|=p,o.manipulators.add(this.moveZManipulator),o.addHandles(this._createMoveZDragPipeline()),o.addHandles(o.events.on("translate-stop",(()=>{this._moveXYTooltipInfo=null,this._moveZTooltipInfo=null})))}destroy(){this.moveXYObjectManipulation.destroy(),this._tool.manipulators.remove(this.moveZManipulator),this.moveZManipulator.destroy()}forEachManipulator(t){this.moveXYObjectManipulation.forEachManipulator(t),t(this.moveZManipulator,m.TRANSLATE_Z)}updateManipulators(t,e){const n=this.moveZManipulator,s=o(a.get(),t,Math.PI);s[12]=0,s[13]=0,s[14]=0,n.modelTransform=s,n.renderLocation=i(r.get(),e.origin,e.basis1)}getUpdatedTooltipInfo(){return this.moveXYObjectManipulation.grabbing||this.moveXYObjectManipulation.dragging?this._computeMoveXYTooltipInfo():this.moveZManipulator.focused?this._computeMoveZTooltipInfo():null}_computeMoveXYTooltipInfo(){const t=this._tool,o=this._moveXYTooltipInfo??=new _({sketchOptions:t.sketchOptions});if(this.moveXYObjectManipulation.dragging){const e=this._bounds,i=e.mapBoundsStart.origin,n=e.mapBounds.origin,{renderSpatialReference:a}=t.view;if(!a)return null;const r=g(i,n,a);if(null==r)return null;o.distance=r}else o.distance=e;return o}_computeMoveZTooltipInfo(){const t=this._tool,o=this._moveZTooltipInfo??=new M({sketchOptions:t.sketchOptions});if(this.moveZManipulator.dragging){const e=this._bounds,i=e.mapBoundsStart.origin,n=e.mapBounds.origin,{renderSpatialReference:a}=t.view;if(!a)return null;const r=j(i,n,a);if(null==r)return null;o.distance=r}else o.distance=e;return o}_createMoveXYObjectDragPipeline(){return this.moveXYObjectManipulation.createDragPipeline(((t,e,o)=>this._buildMoveDragPipeline(e,o)))}_createMoveZDragPipeline(){if(!this._operations)return t();const e=this._operations.data.spatialReference;return d(this.moveZManipulator,((t,o,i)=>{const a=n(t.renderLocation),r=o.next(c(this._tool.view,a,e)).next(h());this._buildMoveDragPipeline(r,i)}))}_buildMoveDragPipeline(t,e){const{_tool:o,_object:i}=this;t.next((t=>("start"===t.action&&(o.inputState={type:"move"},this._bounds.backupMapBounds(),o.events.emit("translate-start",{object:i,dxScreen:t.screenDeltaX,dyScreen:t.screenDeltaY})),t))).next(v()).next(this._updateGeometry()).next((t=>{const e={object:i,dxScreen:t.screenDeltaX,dyScreen:t.screenDeltaY};switch(t.action){case"start":case"update":(t.mapEnd.x-t.mapStart.x||t.mapEnd.y-t.mapStart.y||(t.mapEnd.z??0)-(t.mapStart.z??0))&&o.events.emit("translate",e);break;case"end":o.inputState=null,o.events.emit("translate-stop",e)}return t})),e.next((()=>{null!=o.inputState&&o.events.emit("translate-stop",{object:i,dxScreen:0,dyScreen:0}),o.cancelDrag()}))}_updateGeometry(){const t=this._tool;return e=>{if(null==t.inputState||"move"!==t.inputState.type)return e;const o="start"===e.action?f.NEW_STEP:f.ACCUMULATE_STEPS;if(this._operations){const t=this._operations.move(e.mapDeltaX,e.mapDeltaY,e.mapDeltaZ,o);this._bounds.updateMapBoundsFromOperation(t)}return e}}}export{b as ExtentMove};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{rad2deg as t}from"../../../../../../core/mathUtils.js";import{rotateX as e}from"../../../../../../core/libs/gl-matrix-2/math/mat4.js";import{g as o,c as r}from"../../../../../../chunks/vec32.js";import{create as a}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a as n}from"../../../../../../chunks/boundedPlane.js";import{create as s,intersectRay as i,getNormal as l}from"../../../../../../geometry/support/plane.js";import{sm4d as p,sv3d as c}from"../../../../../../geometry/support/vectorStacks.js";import{getRotateHeadingTexture as u}from"../../../../analysis/images/Factory.js";import{RotateManipulator as m}from"../../../../analysis/Slice/RotateManipulator.js";import{createRotatePlane as d,RotationAxis as h}from"../../../../analysis/Slice/sliceToolUtils.js";import{calculateInputRotationTransform as g}from"../../../manipulatorUtils.js";import{screenToRenderPlane as _}from"../../dragEventPipeline3D.js";import{ManipulatorType as f}from"../../ManipulatorType.js";import{fromScreenNormalized as j}from"../../../../support/geometryUtils/ray.js";import{createManipulatorDragEventPipeline as v}from"../../../../../interactive/dragEventPipeline.js";import{AccumulationBehavior as b}from"../../../../../interactive/editGeometry/interfaces.js";import{AccumulationType as A}from"../../../../../interactive/editGeometry/operations/UpdateVertices.js";import{ExtentRotateTooltipInfo as y}from"../../../../../interactive/tooltip/infos/ExtentRotateTooltipInfo.js";class M{get _object(){return this._tool.object}get _operations(){return this._object.operations}constructor(t,e,o){this._tool=t,this._bounds=e,this._snapRotation=o,this._rotateTooltipInfo=null,this._startAngle=0,this._endAngle=0;const r=this._tool,a=r.view,n=!a.stage?.renderView.renderingContext.driverTest.svgPremultipliesAlpha.result;this.rotateManipulator=new m(a,((t,e)=>u(a.stage.textures,{accentColor:t,contrastColor:e,preMultiplyAlpha:n}))),r.addHandles([this.rotateManipulator.events.on("grab-changed",(t=>this._onGrabChanged(t))),this._createRotateDragPipeline(this.rotateManipulator)]),r.manipulators.add(this.rotateManipulator),r.addHandles([r.events.on("rotate-start",(t=>this._startAngle=t.angle)),r.events.on("rotate",(t=>this._endAngle=t.angle)),r.events.on("rotate-stop",(()=>{this._startAngle=0,this._endAngle=0}))])}destroy(){this._tool.manipulators.remove(this.rotateManipulator),this.rotateManipulator.destroy()}forEachManipulator(t){t(this.rotateManipulator,f.ROTATE)}updateManipulators(t,r){const a=this._bounds.mapBounds.plane[2]<0?Math.PI:0,n=e(p.get(),t,a);n[12]=0,n[13]=0,n[14]=0,this.rotateManipulator.modelTransform=n,this.rotateManipulator.renderLocation=o(c.get(),r.origin,r.basis1)}getUpdatedTooltipInfo(){return this.rotateManipulator.focused?this._computeRotateTooltipInfo():null}_computeRotateTooltipInfo(){const t=this._rotateTooltipInfo??=new y({sketchOptions:this._tool.sketchOptions});return t.angle=this._startAngle-this._endAngle,t}_onGrabChanged({action:t,screenPoint:e}){const o=this._tool,r=this._bounds;if("start"!==t||!e)return;const a=d(r.displayBounds,o.view.renderCoordsHelper,h.HEADING,s()),n=j(o.view.state.camera,e);i(a,n,c.get())&&(r.backupMapBounds(),o.inputState={type:"rotate",rotatePlane:a})}_createRotateDragPipeline(e){const{_tool:o,_object:r}=this;return v(e,((e,a,n)=>{const s=o.inputState;null!=s&&(a.next((t=>("start"===t.action&&o.events.emit("rotate-start",{object:r,angle:0}),t))).next(_(o.view,s.rotatePlane)).next(this._renderPlaneToAngle()).next(...this._snapRotation()).next(this._updateGeometry()).next((e=>{const a={object:r,angle:t(e.rotateAngle)};switch(e.action){case"start":case"update":o.events.emit("rotate",a);break;case"end":o.inputState=null,o.events.emit("rotate-stop",a)}return e})),n.next((()=>{null!=o.inputState&&o.events.emit("rotate-stop",{object:r,angle:0}),o.
|
|
5
|
+
import{rad2deg as t}from"../../../../../../core/mathUtils.js";import{rotateX as e}from"../../../../../../core/libs/gl-matrix-2/math/mat4.js";import{g as o,c as r}from"../../../../../../chunks/vec32.js";import{create as a}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a as n}from"../../../../../../chunks/boundedPlane.js";import{create as s,intersectRay as i,getNormal as l}from"../../../../../../geometry/support/plane.js";import{sm4d as p,sv3d as c}from"../../../../../../geometry/support/vectorStacks.js";import{getRotateHeadingTexture as u}from"../../../../analysis/images/Factory.js";import{RotateManipulator as m}from"../../../../analysis/Slice/RotateManipulator.js";import{createRotatePlane as d,RotationAxis as h}from"../../../../analysis/Slice/sliceToolUtils.js";import{calculateInputRotationTransform as g}from"../../../manipulatorUtils.js";import{screenToRenderPlane as _}from"../../dragEventPipeline3D.js";import{ManipulatorType as f}from"../../ManipulatorType.js";import{fromScreenNormalized as j}from"../../../../support/geometryUtils/ray.js";import{createManipulatorDragEventPipeline as v}from"../../../../../interactive/dragEventPipeline.js";import{AccumulationBehavior as b}from"../../../../../interactive/editGeometry/interfaces.js";import{AccumulationType as A}from"../../../../../interactive/editGeometry/operations/UpdateVertices.js";import{ExtentRotateTooltipInfo as y}from"../../../../../interactive/tooltip/infos/ExtentRotateTooltipInfo.js";class M{get _object(){return this._tool.object}get _operations(){return this._object.operations}constructor(t,e,o){this._tool=t,this._bounds=e,this._snapRotation=o,this._rotateTooltipInfo=null,this._startAngle=0,this._endAngle=0;const r=this._tool,a=r.view,n=!a.stage?.renderView.renderingContext.driverTest.svgPremultipliesAlpha.result;this.rotateManipulator=new m(a,((t,e)=>u(a.stage.textures,{accentColor:t,contrastColor:e,preMultiplyAlpha:n}))),r.addHandles([this.rotateManipulator.events.on("grab-changed",(t=>this._onGrabChanged(t))),this._createRotateDragPipeline(this.rotateManipulator)]),r.manipulators.add(this.rotateManipulator),r.addHandles([r.events.on("rotate-start",(t=>this._startAngle=t.angle)),r.events.on("rotate",(t=>this._endAngle=t.angle)),r.events.on("rotate-stop",(()=>{this._startAngle=0,this._endAngle=0}))])}destroy(){this._tool.manipulators.remove(this.rotateManipulator),this.rotateManipulator.destroy()}forEachManipulator(t){t(this.rotateManipulator,f.ROTATE)}updateManipulators(t,r){const a=this._bounds.mapBounds.plane[2]<0?Math.PI:0,n=e(p.get(),t,a);n[12]=0,n[13]=0,n[14]=0,this.rotateManipulator.modelTransform=n,this.rotateManipulator.renderLocation=o(c.get(),r.origin,r.basis1)}getUpdatedTooltipInfo(){return this.rotateManipulator.focused?this._computeRotateTooltipInfo():null}_computeRotateTooltipInfo(){const t=this._rotateTooltipInfo??=new y({sketchOptions:this._tool.sketchOptions});return t.angle=this._startAngle-this._endAngle,t}_onGrabChanged({action:t,screenPoint:e}){const o=this._tool,r=this._bounds;if("start"!==t||!e)return;const a=d(r.displayBounds,o.view.renderCoordsHelper,h.HEADING,s()),n=j(o.view.state.camera,e);i(a,n,c.get())&&(r.backupMapBounds(),o.inputState={type:"rotate",rotatePlane:a})}_createRotateDragPipeline(e){const{_tool:o,_object:r}=this;return v(e,((e,a,n)=>{const s=o.inputState;null!=s&&(a.next((t=>("start"===t.action&&o.events.emit("rotate-start",{object:r,angle:0}),t))).next(_(o.view,s.rotatePlane)).next(this._renderPlaneToAngle()).next(...this._snapRotation()).next(this._updateGeometry()).next((e=>{const a={object:r,angle:t(e.rotateAngle)};switch(e.action){case"start":case"update":o.events.emit("rotate",a);break;case"end":o.inputState=null,o.events.emit("rotate-stop",a)}return e})),n.next((()=>{null!=o.inputState&&o.events.emit("rotate-stop",{object:r,angle:0}),o.cancelDrag()})))}))}_renderPlaneToAngle(){return t=>{const e=g(t.renderStart,t.renderEnd,this._bounds.displayBounds.origin,l(t.plane));return{...t,rotateAngle:e}}}_updateGeometry(){const t=this._bounds;return e=>{const o=r(a(),t.mapBoundsStart.origin),s="start"===e.action?b.NEW_STEP:b.ACCUMULATE_STEPS;if(this._operations){const r=this._operations.rotate(o,e.rotateAngle,s,A.REPLACE);n(t.mapBoundsStart,t.mapBounds),t.updateMapBoundsFromOperation(r)}return e}}}export{M as ExtentRotate};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{set as t,normalize as e}from"../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as s}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{c as i,b as a,d as o,l as r,f as n}from"../../../../../../chunks/vec32.js";import{create as c}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{d as p,a as l}from"../../../../../../chunks/boundedPlane.js";import{intersectRay as d}from"../../../../../../geometry/support/plane.js";import{sv3d as u}from"../../../../../../geometry/support/vectorStacks.js";import{ResizeManipulator as h}from"../../../../analysis/Slice/ResizeManipulator.js";import{updateResizeHandle as m,isDiagonalResizeHandle as _,calculateDiagonalResizeHandleScale as f}from"../../../../analysis/Slice/sliceToolUtils.js";import{screenToRenderPlane as S}from"../../dragEventPipeline3D.js";import{ManipulatorType as y}from"../../ManipulatorType.js";import{mapPlaneAutoSize2D as
|
|
5
|
+
import{set as t,normalize as e}from"../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as s}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{c as i,b as a,d as o,l as r,f as n}from"../../../../../../chunks/vec32.js";import{create as c}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{d as p,a as l}from"../../../../../../chunks/boundedPlane.js";import{intersectRay as d}from"../../../../../../geometry/support/plane.js";import{sv3d as u}from"../../../../../../geometry/support/vectorStacks.js";import{ResizeManipulator as h}from"../../../../analysis/Slice/ResizeManipulator.js";import{updateResizeHandle as m,isDiagonalResizeHandle as _,calculateDiagonalResizeHandleScale as f}from"../../../../analysis/Slice/sliceToolUtils.js";import{screenToRenderPlane as S}from"../../dragEventPipeline3D.js";import{ManipulatorType as y}from"../../ManipulatorType.js";import{mapPlaneAutoSize2D as g}from"./extentUtils.js";import{fromScreenNormalized as x}from"../../../../support/geometryUtils/ray.js";import{createManipulatorDragEventPipeline as M}from"../../../../../interactive/dragEventPipeline.js";import{AccumulationBehavior as b}from"../../../../../interactive/editGeometry/interfaces.js";import{AccumulationType as z}from"../../../../../interactive/editGeometry/operations/UpdateVertices.js";import{ExtentScaleTooltipInfo as j}from"../../../../../interactive/tooltip/infos/ExtentScaleTooltipInfo.js";class v{get _object(){return this._tool.object}get _operations(){return this._object.operations}get zMax(){if(!this._zMaxDirty||!this._operations)return this._zMax;const t=this._operations.data;if(t.geometry.hasZ){const e=t.coordinateHelper;this._zMax=Number.NEGATIVE_INFINITY;for(const s of t.components)for(const t of s.vertices){const s=e.getZ(t.pos)??0;this._zMax=Math.max(s,this._zMax)}}else this._zMax=0;return this._zMaxDirty=!1,this._zMax}constructor(t,e,s){this._tool=t,this._bounds=e,this._preserveAspectRatioStep=s,this._resizeHandles=[{direction:[1,0]},{direction:[1,1]},{direction:[0,1]},{direction:[-1,1]},{direction:[-1,0]},{direction:[-1,-1]},{direction:[0,-1]},{direction:[1,-1]}],this._displayBoundsStart=p(),this._displayBoundsMarginStart=0,this._zMax=0,this._zMaxDirty=!0;const i=this._tool,a=i.view;this.resizeManipulators=this._resizeHandles.map((t=>{const e=new h(a,t);return i.addHandles([e.events.on("grab-changed",(t=>this._onGrabChanged(t))),this._createResizeDragPipeline(e,t)]),e})),i.manipulators.addMany(this.resizeManipulators),this._operations&&i.addHandles(this._operations.data.on("change",(()=>{"resize"!==i.inputState?.type&&(this._zMaxDirty=!0)})))}destroy(){this.forEachManipulator((t=>{this._tool.manipulators.remove(t),t.destroy()}))}forEachManipulator(t){this.resizeManipulators.forEach((e=>t(e,y.SCALE)))}updateManipulators(t,e){this.resizeManipulators.forEach(((s,i)=>{m(s,this._resizeHandles[i],t,e)}))}getUpdatedTooltipInfo(){if(!this.resizeManipulators.some((t=>t.focused)))return null;const t=this._tooltipInfo??=new j({sketchOptions:this._tool.sketchOptions}),e=g(this._bounds.mapBounds,this.zMax,this._bounds.spatialReference);return e&&(t.xSize=e.xSize,t.ySize=e.ySize),this.resizeManipulators.some((t=>t.dragging))||(t.xScale=1,t.yScale=1),t}_onGrabChanged({action:t,screenPoint:e}){const s=this._tool,i=this._bounds;if("start"!==t||!e)return;const a=x(s.view.state.camera,e);d(i.displayBounds.plane,a,u.get())&&(i.backupMapBounds(),l(i.displayBounds,this._displayBoundsStart),this._displayBoundsMarginStart=i.displayBoundsMargin,s.inputState={type:"resize"})}_createResizeDragPipeline(t,e){const{_tool:s,_object:i}=this;return M(t,((t,a,o)=>{null!=s.inputState&&(a.next((t=>("start"===t.action&&s.events.emit("scale-start",{object:i,xScale:1,yScale:1}),{...t,handle:e}))).next(S(s.view,this._displayBoundsStart.plane)).next(this._renderPlaneToFactors()).next(...this._preserveAspectRatioStep()).next(this._updateGeometry()).next((t=>{const e=this._tooltipInfo;e&&(e.xScale=t.factor1,e.yScale=t.factor2);const a={object:i,xScale:t.factor1,yScale:t.factor2};switch(t.action){case"start":case"update":s.events.emit("scale",a);break;case"end":s.inputState=null,s.events.emit("scale-stop",a)}return t})),o.next((()=>{null!=s.inputState&&s.events.emit("scale-stop",{object:i,xScale:1,yScale:1}),s.cancelDrag()})))}))}_renderPlaneToFactors(){const t=this._bounds;return e=>{const s=this._displayBoundsStart,c=e.handle.direction,p=t.displayBoundsMargin,l=this._displayBoundsMarginStart,d=i(u.get(),s.origin);a(d,d,s.basis1,-c[0]),a(d,d,s.basis2,-c[1]);const h=o(u.get(),e.renderEnd,d),m=o(u.get(),e.renderStart,d),S=_(e.handle),y=f(s),g=f(t.displayBounds)/y,x=(t,e)=>{if(0===t)return 1;let s=r(e),i=.5*t*n(e,h)/s;const a=i<0?-1:1;if(S){i+=(s-.5*t*n(e,m)/s)*a*g}const o=s<1.5*l?1:B;return s=Math.max(s-l,B),a>0&&(i-=p),a*Math.max(a*(i/s),o)};return{...e,factor1:x(c[0],s.basis1),factor2:x(c[1],s.basis2)}}}_updateGeometry(){const o=this._bounds;return r=>{const n=i(c(),o.mapBoundsStart.origin);a(n,n,o.mapBoundsStart.basis1,-r.handle.direction[0]),a(n,n,o.mapBoundsStart.basis2,-r.handle.direction[1]);const p=t(s(),o.mapBoundsStart.basis1[0],o.mapBoundsStart.basis1[1]);e(p,p);const d="start"===r.action?b.NEW_STEP:b.ACCUMULATE_STEPS;if(this._operations){const t=this._operations.scale(n,p,r.factor1,r.factor2,d,z.REPLACE);l(o.mapBoundsStart,o.mapBounds),o.updateMapBoundsFromOperation(t)}return r}}}const B=1e-6;export{v as ExtentScale,B as scaleEpsilon};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{deg2rad as e}from"../../../../core/mathUtils.js";import{fromScaling as t,mul as r,fromTranslation as s,fromRotation as i}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{i as a,c as n,t as l}from"../../../../chunks/vec32.js";import{fromValues as m,create as c}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{viewshedVisualizationConfiguration as h,arcAnglePerSegment as f}from"../../analysis/Viewshed/ViewshedConfiguration.js";import{getViewshedRotationMatrix as u,rotateBy as p}from"../../analysis/Viewshed/viewshedToolUtils.js";import{Object3DVisualElement as d}from"./Object3DVisualElement.js";import{Attribute as w}from"../../webgl-engine/lib/Attribute.js";import{Geometry as b}from"../../webgl-engine/lib/Geometry.js";import{VertexAttribute as
|
|
5
|
+
import{deg2rad as e}from"../../../../core/mathUtils.js";import{fromScaling as t,mul as r,fromTranslation as s,fromRotation as i}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{i as a,c as n,t as l}from"../../../../chunks/vec32.js";import{fromValues as m,create as c}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{viewshedVisualizationConfiguration as h,arcAnglePerSegment as f}from"../../analysis/Viewshed/ViewshedConfiguration.js";import{getViewshedRotationMatrix as u,rotateBy as p}from"../../analysis/Viewshed/viewshedToolUtils.js";import{Object3DVisualElement as d}from"./Object3DVisualElement.js";import{Attribute as w}from"../../webgl-engine/lib/Attribute.js";import{Geometry as b}from"../../webgl-engine/lib/Geometry.js";import{VertexAttribute as v}from"../../webgl-engine/lib/VertexAttribute.js";import{ColorMaterial as g}from"../../webgl-engine/materials/ColorMaterial.js";class j extends d{constructor(e){super(e),this._material=null,this._viewshedComputedData=null,this._material=new g({...h.shapeMaterialParameters,isDecoration:this.isDecoration,writeDepth:!1}),this.applyProperties(e)}get viewshedComputedData(){return this._viewshedComputedData}set viewshedComputedData(e){this._viewshedComputedData=e,this.updateTransform()}updateTransform(){const e=this._viewshedComputedData;if(null==e)return;const i=o(),a=e.farDistanceRenderSpace;t(i,m(a,a,a)),u(e,E),r(i,E,i),s(E,this._viewshedComputedData.observerRenderSpace),r(i,E,i),this.transform=i}createExternalResources(){}destroyExternalResources(){}forEachExternalMaterial(e){null!=this._material&&e(this._material)}createGeometries(e){const{_material:t,viewshedComputedData:r}=this;if(null==r||null==t||!r.valid)return;D(t,r).forEach((t=>e.addGeometry(t)))}}function D(t,r){const{horizontalFieldOfView:s,verticalFieldOfView:o}=r,m=a(_,0,0,1),c=a(x,0,1,0),h=a(V,1,0,0);p(m,m,e(o/2),c),p(m,m,e(s/2),h);const u=e=>Math.ceil(Math.abs(e)/f)+1,d=e(s),g=n(y,h),j=u(d),D=C(-d/(j-1)),O=i(E,D,g),R=e(-o),T=u(R),G=C(R/(T-1)),N=n(x,c),P=i(M,e(s)/2,h);l(N,N,P);const S=M,A=[],F=n(V,m);for(let e=0;e<j;e++){i(S,G,N);for(let t=0;t<T;t++){const r=3*(t*j+e);A[r]=F[0],A[r+1]=F[1],A[r+2]=F[2],l(F,F,S)}l(N,N,O),l(m,m,O),n(F,m)}const I=j*T;A[3*I]=0,A[3*I+1]=0,A[3*I+2]=0;const U=[];for(let e=0;e<j-1;e++)for(let t=0;t<T-1;t++){const r=6*(t*(j-1)+e);U[r]=t*j+e,U[r+1]=(t+1)*j+e,U[r+2]=t*j+e+1,U[r+3]=t*j+e+1,U[r+4]=(t+1)*j+e,U[r+5]=(t+1)*j+e+1}const k=[U];if(360!==s&&0!==o){const e=[],t=[];for(let r=0;r<T-1;r++){const s=3*r;e[s]=I,e[s+1]=(r+1)*j,e[s+2]=r*j,t[s]=I,t[s+1]=r*j+j-1,t[s+2]=(r+1)*j+j-1}k.push(e,t)}if(180!==o&&0!==s){const e=[],t=[];for(let r=0;r<j-1;r++){const s=3*r;e[s]=I,e[s+1]=r,e[s+2]=r+1,t[s]=I,t[s+1]=r+(T-1)*j+1,t[s+2]=r+(T-1)*j}k.push(e,t)}return k.map((e=>{const r=[[v.POSITION,new w(A,e,3,!0)]];return new b(t,r)}))}function C(e){return isNaN(e)?1:e}const _=c(),x=c(),V=c(),y=c(),E=o(),M=o();export{j as ViewshedShapeVisualElement};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../../../chunks/tslib.es6.js";import{invert as t,transpose as r}from"../../../../../../core/libs/gl-matrix-2/math/mat3.js";import{clone as o}from"../../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{p as s,I as i}from"../../../../../../chunks/vec32.js";import{freeze as a,ZEROS as l}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{v as n}from"../../../../../../chunks/vec42.js";import{freeze as h,fromValues as u}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{EmissiveSourceMode as p}from"../../../../../../symbols/support/materialUtils.js";import{ColorMixModeEnum as c}from"../../../../layers/support/symbolColorUtils.js";import{OverlayContent as d}from"../../../../terrain/OverlayContent.js";import{ComponentTechnique as m}from"./ComponentTechnique.js";import{ComponentTechniqueConfiguration as g,IntegratedMeshMode as f}from"./ComponentTechniqueConfiguration.js";import{ComponentDataType as x}from"./shader/ComponentData.glsl.js";import{VertexDiscardMode as v}from"./shader/VertexDiscardMode.js";import{MaterialBase as b,parameter as M,parameterBlock as y,MaterialParameterBlock as T}from"../../../core/material/MaterialBase.js";import{RenderPassIdentifier as w}from"../../../core/renderPasses/RenderPassIdentifier.js";import{ShaderOutput as O}from"../../../core/shaderLibrary/ShaderOutput.js";import{NormalType as C}from"../../../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{EmissionSource as S}from"../../../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as N}from"../../../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as P}from"../../../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{EllipsoidMode as j}from"../../../core/shaderLibrary/util/EllipsoidMode.js";import{TwoVectorPosition as D}from"../../../core/util/TwoVectorPosition.js";import{AlphaDiscardMode as A,CullFaceOptions as q}from"../../../lib/basicInterfaces.js";import{OITPass as R}from"../../../lib/OITPass.js";import{advancedMRRFactors as I}from"../../../materials/pbrUtils.js";import{defaultHighlightName as E}from"../../../../../support/HighlightDefaults.js";import{alphaCutoff as F}from"../../../../../../webscene/support/AlphaCutoff.js";class W extends b{constructor(e,s){super(),this.toMapSpace=s,this.baseColor=h(1,1,1,1),this.usePBR=!1,this.hasParametersFromSource=!1,this.mrrFactors=I,this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.normalTexture=null,this.occlusionTexture=null,this.emissionTexture=null,this.emissiveBaseColor=a(0,0,0),this.emissiveStrength=1,this.emissiveSource=p.Emissive,this.commonMaterialParameters=new L,this.componentParameters=new H,this.objectOpacity=1,this.textureAlphaCutoff=F,this.alphaDiscardMode=A.Opaque,this.isIntegratedMesh=!1,this.polygonOffsetEnabled=!1,this.ellipsoidMode=j.Earth,this.hasOccludees=!1;const i=new D(e.position),l=o(e.rotationScale);t(l,l),r(l,l),this.transformNormalGlobalFromModel=l,this.transformWorldFromModelTL=i.low,this.transformWorldFromModelTH=i.high,this.transformWorldFromModelRS=e.rotationScale}dispose(){this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.emissionTexture=null,this.occlusionTexture=null,this.normalTexture=null}get hasEmissions(){return null!=this.emissionTexture||!s(this.emissiveBaseColor,l)}get texture(){return this.baseColorTexture?.glTexture}get textureMetallicRoughness(){return this.metallicRoughnessTexture?.glTexture}get textureEmissive(){return this.emissionTexture?.glTexture}get textureOcclusion(){return this.occlusionTexture?.glTexture}get textureNormal(){return this.normalTexture?.glTexture}acquireTechnique(e,t,r,o){const s=new g(e.context.spherical);s.hasVertexColors=o.colors,s.hasNormals=o.hasNormals,s.textureCoordinateType=o.textureCoordinates,s.hasMetallicRoughnessTexture=null!=this.metallicRoughnessTexture,s.hasOcclusionTexture=null!=this.occlusionTexture,s.hasNormalTexture=null!=this.normalTexture,s.oitPass=t.identifier===w.Material&&null!=r.oitPass?r.oitPass:R.NONE,s.terrainDepthTest=t.identifier===w.Material&&r.terrainDepthTest,s.cullAboveTerrain=t.identifier===w.Material&&r.cullAboveTerrain,s.ellipsoidMode=this.ellipsoidMode,s.componentData=this.componentParameters.type,s.cullFace=this.commonMaterialParameters.cullFace,s.doubleSidedMode=this.commonMaterialParameters.doubleSided?N.View:N.None,s.hasColorTexture=null!=this.baseColorTexture;const i=this._computeWhichMaterialPass();if(s.blendingEnabled=i===B.Transparent||i===B.OpaqueAndTransparent,s.alphaDiscardMode=this.alphaDiscardMode,s.integratedMeshMode=this.isIntegratedMesh?z(r)?U(r)?f.ColorOverlayWithWater:f.ColorOverlay:f.NoOverlay:f.None,s.hasPolygonOffset=this.polygonOffsetEnabled,s.pbrMode=s.integratedMeshMode===f.ColorOverlayWithWater?P.WaterOnIntegratedMesh:this.usePBR?this.hasParametersFromSource?o.shadeNormals&&this.isIntegratedMesh?P.Disabled:P.Schematic:P.Normal:P.Disabled,s.emissionSource=this.hasEmissions?null!=this.emissionTexture?S.Texture:s.pbrMode===P.Normal?S.SymbolColor:S.None:S.None,s.shadeNormals=o.shadeNormals,s.normalType=s.hasNormals?C.Compressed:C.ScreenDerivative,s.hasSlicePlane=null!=r.slicePlane&&this.commonMaterialParameters.hasSlicePlane,s.receiveAmbientOcclusion=s.hasOccludees=s.receiveShadows=s.screenSpaceReflections=s.cloudReflections=s.hasHighlightMixTexture=!1,t.identifier===w.ShadowMap)s.output=O.Shadow,s.vertexDiscardMode=v.None;else if(t.identifier===w.ViewshedShadowMap)s.output=O.ViewshedShadow,s.vertexDiscardMode=v.None;else if(t.identifier===w.Highlight)s.output=O.Highlight,s.vertexDiscardMode=v.None,s.hasHighlightMixTexture=null!=r.highlightMixTexture;else{switch(i===B.OpaqueAndTransparent?s.vertexDiscardMode=t.transparent?v.Opaque:v.Transparent:s.vertexDiscardMode=v.None,s.output=t.output,t.output){case O.Color:case O.ColorEmission:s.receiveAmbientOcclusion=o.applySSAO&&null!=r.ssao?.getTexture(),s.hasOccludees=r.hasOccludees,s.receiveShadows=r.shadowMap.ready,s.screenSpaceReflections=null!=r.ssr.lastFrameColor,s.cloudReflections=null!=r.clouds.data?.cubeMap?.colorTexture;break;case O.ObjectAndLayerIdColor:s.objectAndLayerIdColor=!0}s.snowCover=this.hasSnowCover(r)}const a=e.get(m,s);return this._setClean(),a}hasSnowCover(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}submit(e,t,r){if(this.objectOpacity<=0)return;const{componentData:o,renderable:s}=r,{geometry:i}=s,a=s.meta.cameraDepthSquared;o.updateHighlights(t.highlights);const{geometryRanges:l,highlightRangesMap:n,shadowmapRanges:h}=o;switch(this._computeWhichMaterialPass()){case B.Opaque:e.opaque.submitDraw(this,i,l,a);break;case B.Transparent:e.transparent.submitDraw(this,i,l,a);break;case B.OpaqueAndTransparent:e.opaque.submitDraw(this,i,l,a),e.transparent.submitDraw(this,i,l,a);break;case B.IntegratedMesh:e.integratedMesh.submitDraw(this,i,l,a),_(t)&&e.highlightIntegratedMesh.submitDraw(this,i,l,a)}if(this.componentParameters.castShadows!==k.None){if(null!=n)for(const t of n)t[0]===E&&e.highlightShadowMap.submitDraw(this,i,t[1],a,t[0]);null!=h&&e.defaultShadowMap.submitDraw(this,i,h,a),e.shadowMap.submitDraw(this,i,l,a)}if(null!=n)for(const u of n)e.highlight.submitDraw(this,i,u[1],a,u[0]);t.viewshedEnabled&&e.viewshedShadowMap.submitDraw(this,i,l,a)}_computeWhichMaterialPass(){if(this.isIntegratedMesh)return B.IntegratedMesh;if(this.objectOpacity<1)return B.Transparent;if(this.componentParameters.opaqueOverride===k.All)return B.Opaque;if(this.baseColor[3]<1||this.alphaDiscardMode===A.Blend||this.alphaDiscardMode===A.MaskBlend)return B.Transparent;switch(this.componentParameters.transparent){case k.None:return B.Opaque;case k.All:return B.Transparent;case k.Some:return B.OpaqueAndTransparent}}}var B,k;e([M({vectorOps:n})],W.prototype,"baseColor",void 0),e([M()],W.prototype,"usePBR",void 0),e([M()],W.prototype,"hasParametersFromSource",void 0),e([M({vectorOps:i})],W.prototype,"mrrFactors",void 0),e([M({dispose:!0})],W.prototype,"baseColorTexture",void 0),e([M({dispose:!0})],W.prototype,"metallicRoughnessTexture",void 0),e([M({dispose:!0})],W.prototype,"normalTexture",void 0),e([M({dispose:!0})],W.prototype,"occlusionTexture",void 0),e([M({dispose:!0})],W.prototype,"emissionTexture",void 0),e([M({vectorOps:i})],W.prototype,"emissiveBaseColor",void 0),e([M()],W.prototype,"emissiveStrength",void 0),e([M()],W.prototype,"emissiveSource",void 0),e([y()],W.prototype,"commonMaterialParameters",void 0),e([y()],W.prototype,"componentParameters",void 0),e([M()],W.prototype,"objectOpacity",void 0),e([M()],W.prototype,"textureAlphaCutoff",void 0),e([M()],W.prototype,"alphaDiscardMode",void 0),e([M()],W.prototype,"isIntegratedMesh",void 0),e([M()],W.prototype,"polygonOffsetEnabled",void 0),e([M()],W.prototype,"ellipsoidMode",void 0),e([M()],W.prototype,"hasOccludees",void 0),function(e){e[e.Opaque=0]="Opaque",e[e.Transparent=1]="Transparent",e[e.OpaqueAndTransparent=2]="OpaqueAndTransparent",e[e.IntegratedMesh=3]="IntegratedMesh"}(B||(B={}));class L extends T{constructor(){super(...arguments),this.doubleSided=!1,this.cullFace=q.Back,this.hasSlicePlane=!0}}e([M()],L.prototype,"doubleSided",void 0),e([M()],L.prototype,"cullFace",void 0),e([M()],L.prototype,"hasSlicePlane",void 0);class H extends T{constructor(){super(...arguments),this.externalColor=u(1,1,1,1),this.externalColorMixMode=c.Multiply,this.castShadows=k.All}get transparent(){return this.externalColor[3]<1?k.All:k.None}get opaqueOverride(){return this.externalColorMixMode===c.Replace&&1===this.externalColor[3]?k.All:k.None}get visible(){return this.externalColor[3]>0?k.All:k.None}get type(){return x.Uniform}}e([M({vectorOps:n})],H.prototype,"externalColor",void 0),e([M()],H.prototype,"externalColorMixMode",void 0),e([M()],H.prototype,"castShadows",void 0),function(e){e[e.All=0]="All",e[e.Some=1]="Some",e[e.None=2]="None"}(k||(k={}));class V extends T{constructor(){super(...arguments),this.texture=null,this.transparent=k.None,this.opaqueOverride=k.None,this.castShadows=k.None}get type(){return x.Varying}}function _(e){return null!=e.overlay?.getTexture(d.Highlight)}function U(e){return null!=e.overlay?.getTexture(d.WaterNormal)}function z(e){return null!=e.overlay?.getTexture(d.ColorNoRasterImage)}e([M()],V.prototype,"texture",void 0),e([M()],V.prototype,"transparent",void 0),e([M()],V.prototype,"opaqueOverride",void 0),e([M()],V.prototype,"castShadows",void 0);export{L as CommonMaterialParameters,W as ComponentMaterial,k as ComponentParameterSummary,H as ComponentParametersUniform,V as ComponentParametersVarying};
|
|
5
|
+
import{_ as e}from"../../../../../../chunks/tslib.es6.js";import{invert as t,transpose as r}from"../../../../../../core/libs/gl-matrix-2/math/mat3.js";import{clone as o}from"../../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{p as s,I as i}from"../../../../../../chunks/vec32.js";import{freeze as a,ZEROS as l}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{v as n}from"../../../../../../chunks/vec42.js";import{freeze as h,fromValues as u}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{EmissiveSourceMode as p}from"../../../../../../symbols/support/materialUtils.js";import{ColorMixModeEnum as c}from"../../../../layers/support/symbolColorUtils.js";import{OverlayContent as d}from"../../../../terrain/OverlayContent.js";import{ComponentTechnique as m}from"./ComponentTechnique.js";import{ComponentTechniqueConfiguration as g,IntegratedMeshMode as f}from"./ComponentTechniqueConfiguration.js";import{ComponentDataType as x}from"./shader/ComponentData.glsl.js";import{VertexDiscardMode as v}from"./shader/VertexDiscardMode.js";import{MaterialBase as b,parameter as M,parameterBlock as y,MaterialParameterBlock as T}from"../../../core/material/MaterialBase.js";import{RenderPassIdentifier as w}from"../../../core/renderPasses/RenderPassIdentifier.js";import{ShaderOutput as O,isColorEmission as C}from"../../../core/shaderLibrary/ShaderOutput.js";import{NormalType as S}from"../../../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{EmissionSource as N}from"../../../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as P}from"../../../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as j}from"../../../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{EllipsoidMode as D}from"../../../core/shaderLibrary/util/EllipsoidMode.js";import{TwoVectorPosition as A}from"../../../core/util/TwoVectorPosition.js";import{AlphaDiscardMode as q,CullFaceOptions as R}from"../../../lib/basicInterfaces.js";import{OITPass as I}from"../../../lib/OITPass.js";import{advancedMRRFactors as E}from"../../../materials/pbrUtils.js";import{defaultHighlightName as F}from"../../../../../support/HighlightDefaults.js";import{alphaCutoff as B}from"../../../../../../webscene/support/AlphaCutoff.js";class W extends b{constructor(e,s){super(),this.toMapSpace=s,this.baseColor=h(1,1,1,1),this.usePBR=!1,this.hasParametersFromSource=!1,this.mrrFactors=E,this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.normalTexture=null,this.occlusionTexture=null,this.emissionTexture=null,this.emissiveBaseColor=a(0,0,0),this.emissiveStrength=1,this.emissiveSource=p.Emissive,this.commonMaterialParameters=new H,this.componentParameters=new V,this.objectOpacity=1,this.textureAlphaCutoff=B,this.alphaDiscardMode=q.Opaque,this.isIntegratedMesh=!1,this.polygonOffsetEnabled=!1,this.ellipsoidMode=D.Earth,this.hasOccludees=!1;const i=new A(e.position),l=o(e.rotationScale);t(l,l),r(l,l),this.transformNormalGlobalFromModel=l,this.transformWorldFromModelTL=i.low,this.transformWorldFromModelTH=i.high,this.transformWorldFromModelRS=e.rotationScale}dispose(){this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.emissionTexture=null,this.occlusionTexture=null,this.normalTexture=null}get hasEmissions(){return null!=this.emissionTexture||!s(this.emissiveBaseColor,l)}get texture(){return this.baseColorTexture?.glTexture}get textureMetallicRoughness(){return this.metallicRoughnessTexture?.glTexture}get textureEmissive(){return this.emissionTexture?.glTexture}get textureOcclusion(){return this.occlusionTexture?.glTexture}get textureNormal(){return this.normalTexture?.glTexture}acquireTechnique(e,t,r,o){const s=new g(e.context.spherical);s.hasVertexColors=o.colors,s.hasNormals=o.hasNormals,s.textureCoordinateType=o.textureCoordinates,s.hasMetallicRoughnessTexture=null!=this.metallicRoughnessTexture,s.hasOcclusionTexture=null!=this.occlusionTexture,s.hasNormalTexture=null!=this.normalTexture,s.oitPass=t.identifier===w.Material&&null!=r.oitPass?r.oitPass:I.NONE,s.terrainDepthTest=t.identifier===w.Material&&r.terrainDepthTest,s.cullAboveTerrain=t.identifier===w.Material&&r.cullAboveTerrain,s.ellipsoidMode=this.ellipsoidMode,s.componentData=this.componentParameters.type,s.cullFace=this.commonMaterialParameters.cullFace,s.doubleSidedMode=this.commonMaterialParameters.doubleSided?P.View:P.None,s.hasColorTexture=null!=this.baseColorTexture;const i=this._computeWhichMaterialPass();if(s.blendingEnabled=i===k.Transparent||i===k.OpaqueAndTransparent,s.alphaDiscardMode=this.alphaDiscardMode,s.integratedMeshMode=this.isIntegratedMesh?G(r)?z(r)?f.ColorOverlayWithWater:f.ColorOverlay:f.NoOverlay:f.None,s.hasPolygonOffset=this.polygonOffsetEnabled,s.pbrMode=s.integratedMeshMode===f.ColorOverlayWithWater?j.WaterOnIntegratedMesh:this.usePBR?this.hasParametersFromSource?o.shadeNormals&&this.isIntegratedMesh?j.Disabled:j.Schematic:j.Normal:j.Disabled,s.emissionSource=this.hasEmissions?null!=this.emissionTexture?N.Texture:s.pbrMode===j.Normal?N.SymbolColor:N.None:N.None,s.shadeNormals=o.shadeNormals,s.normalType=s.hasNormals?S.Compressed:S.ScreenDerivative,s.hasSlicePlane=null!=r.slicePlane&&this.commonMaterialParameters.hasSlicePlane,s.receiveAmbientOcclusion=s.hasOccludees=s.receiveShadows=s.screenSpaceReflections=s.cloudReflections=s.hasHighlightMixTexture=!1,t.identifier===w.ShadowMap)s.output=O.Shadow,s.vertexDiscardMode=v.None;else if(t.identifier===w.ViewshedShadowMap)s.output=O.ViewshedShadow,s.vertexDiscardMode=v.None;else if(t.identifier===w.Highlight)s.output=O.Highlight,s.vertexDiscardMode=v.None,s.hasHighlightMixTexture=null!=r.highlightMixTexture;else{switch(i===k.OpaqueAndTransparent?s.vertexDiscardMode=t.transparent?v.Opaque:v.Transparent:s.vertexDiscardMode=v.None,s.hasBloom=C(t.output),s.output=t.output,t.output){case O.Color:case O.ColorEmission:s.receiveAmbientOcclusion=o.applySSAO&&null!=r.ssao?.getTexture(),s.hasOccludees=r.hasOccludees,s.receiveShadows=r.shadowMap.ready,s.screenSpaceReflections=null!=r.ssr.lastFrameColor,s.cloudReflections=null!=r.clouds.data?.cubeMap?.colorTexture;break;case O.ObjectAndLayerIdColor:s.objectAndLayerIdColor=!0}s.snowCover=this.hasSnowCover(r)}const a=e.get(m,s);return this._setClean(),a}hasSnowCover(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}submit(e,t,r){if(this.objectOpacity<=0)return;const{componentData:o,renderable:s}=r,{geometry:i}=s,a=s.meta.cameraDepthSquared;o.updateHighlights(t.highlights);const{geometryRanges:l,highlightRangesMap:n,shadowmapRanges:h}=o;switch(this._computeWhichMaterialPass()){case k.Opaque:e.opaque.submitDraw(this,i,l,a);break;case k.Transparent:e.transparent.submitDraw(this,i,l,a);break;case k.OpaqueAndTransparent:e.opaque.submitDraw(this,i,l,a),e.transparent.submitDraw(this,i,l,a);break;case k.IntegratedMesh:e.integratedMesh.submitDraw(this,i,l,a),U(t)&&e.highlightIntegratedMesh.submitDraw(this,i,l,a)}if(this.componentParameters.castShadows!==L.None){if(null!=n)for(const t of n)t[0]===F&&e.highlightShadowMap.submitDraw(this,i,t[1],a,t[0]);null!=h&&e.defaultShadowMap.submitDraw(this,i,h,a),e.shadowMap.submitDraw(this,i,l,a)}if(null!=n)for(const u of n)e.highlight.submitDraw(this,i,u[1],a,u[0]);t.viewshedEnabled&&e.viewshedShadowMap.submitDraw(this,i,l,a)}_computeWhichMaterialPass(){if(this.isIntegratedMesh)return k.IntegratedMesh;if(this.objectOpacity<1)return k.Transparent;if(this.componentParameters.opaqueOverride===L.All)return k.Opaque;if(this.baseColor[3]<1||this.alphaDiscardMode===q.Blend||this.alphaDiscardMode===q.MaskBlend)return k.Transparent;switch(this.componentParameters.transparent){case L.None:return k.Opaque;case L.All:return k.Transparent;case L.Some:return k.OpaqueAndTransparent}}}var k,L;e([M({vectorOps:n})],W.prototype,"baseColor",void 0),e([M()],W.prototype,"usePBR",void 0),e([M()],W.prototype,"hasParametersFromSource",void 0),e([M({vectorOps:i})],W.prototype,"mrrFactors",void 0),e([M({dispose:!0})],W.prototype,"baseColorTexture",void 0),e([M({dispose:!0})],W.prototype,"metallicRoughnessTexture",void 0),e([M({dispose:!0})],W.prototype,"normalTexture",void 0),e([M({dispose:!0})],W.prototype,"occlusionTexture",void 0),e([M({dispose:!0})],W.prototype,"emissionTexture",void 0),e([M({vectorOps:i})],W.prototype,"emissiveBaseColor",void 0),e([M()],W.prototype,"emissiveStrength",void 0),e([M()],W.prototype,"emissiveSource",void 0),e([y()],W.prototype,"commonMaterialParameters",void 0),e([y()],W.prototype,"componentParameters",void 0),e([M()],W.prototype,"objectOpacity",void 0),e([M()],W.prototype,"textureAlphaCutoff",void 0),e([M()],W.prototype,"alphaDiscardMode",void 0),e([M()],W.prototype,"isIntegratedMesh",void 0),e([M()],W.prototype,"polygonOffsetEnabled",void 0),e([M()],W.prototype,"ellipsoidMode",void 0),e([M()],W.prototype,"hasOccludees",void 0),function(e){e[e.Opaque=0]="Opaque",e[e.Transparent=1]="Transparent",e[e.OpaqueAndTransparent=2]="OpaqueAndTransparent",e[e.IntegratedMesh=3]="IntegratedMesh"}(k||(k={}));class H extends T{constructor(){super(...arguments),this.doubleSided=!1,this.cullFace=R.Back,this.hasSlicePlane=!0}}e([M()],H.prototype,"doubleSided",void 0),e([M()],H.prototype,"cullFace",void 0),e([M()],H.prototype,"hasSlicePlane",void 0);class V extends T{constructor(){super(...arguments),this.externalColor=u(1,1,1,1),this.externalColorMixMode=c.Multiply,this.castShadows=L.All}get transparent(){return this.externalColor[3]<1?L.All:L.None}get opaqueOverride(){return this.externalColorMixMode===c.Replace&&1===this.externalColor[3]?L.All:L.None}get visible(){return this.externalColor[3]>0?L.All:L.None}get type(){return x.Uniform}}e([M({vectorOps:n})],V.prototype,"externalColor",void 0),e([M()],V.prototype,"externalColorMixMode",void 0),e([M()],V.prototype,"castShadows",void 0),function(e){e[e.All=0]="All",e[e.Some=1]="Some",e[e.None=2]="None"}(L||(L={}));class _ extends T{constructor(){super(...arguments),this.texture=null,this.transparent=L.None,this.opaqueOverride=L.None,this.castShadows=L.None}get type(){return x.Varying}}function U(e){return null!=e.overlay?.getTexture(d.Highlight)}function z(e){return null!=e.overlay?.getTexture(d.WaterNormal)}function G(e){return null!=e.overlay?.getTexture(d.ColorNoRasterImage)}e([M()],_.prototype,"texture",void 0),e([M()],_.prototype,"transparent",void 0),e([M()],_.prototype,"opaqueOverride",void 0),e([M()],_.prototype,"castShadows",void 0);export{H as CommonMaterialParameters,W as ComponentMaterial,L as ComponentParameterSummary,V as ComponentParametersUniform,_ as ComponentParametersVarying};
|
package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as o}from"../../../../../../chunks/tslib.es6.js";import{ComponentDataType as e}from"./shader/ComponentData.glsl.js";import{VertexDiscardMode as t}from"./shader/VertexDiscardMode.js";import{ShaderOutput as r,isColorEmissionHighlightOrOID as i}from"../../../core/shaderLibrary/ShaderOutput.js";import{NormalType as s}from"../../../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateType as a}from"../../../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{EmissionSource as d}from"../../../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as h}from"../../../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as p}from"../../../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{EllipsoidMode as l}from"../../../core/shaderLibrary/util/EllipsoidMode.js";import{parameter as n,ShaderTechniqueConfiguration as c}from"../../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{CullFaceOptions as u,AlphaDiscardMode as y}from"../../../lib/basicInterfaces.js";import{OITPass as m}from"../../../lib/OITPass.js";import{BindType as v}from"../../../../../webgl/BindType.js";var T;!function(o){o[o.None=0]="None",o[o.NoOverlay=1]="NoOverlay",o[o.ColorOverlay=2]="ColorOverlay",o[o.ColorOverlayWithWater=3]="ColorOverlayWithWater",o[o.COUNT=4]="COUNT"}(T||(T={}));class C extends c{constructor(o){super(),this.spherical=o,this.output=r.Color,this.textureCoordinateType=a.None,this.componentData=e.Uniform,this.cullFace=u.Back,this.vertexDiscardMode=t.None,this.doubleSidedMode=h.WindingOrder,this.alphaDiscardMode=y.Opaque,this.integratedMeshMode=T.None,this.oitPass=m.NONE,this.ellipsoidMode=l.Earth,this.pbrMode=p.Disabled,this.normalType=s.Attribute,this.emissionSource=d.None,this.hasVertexColors=!1,this.hasNormals=!1,this.shadeNormals=!0,this.hasSlicePlane=!1,this.hasColorTexture=!1,this.hasHighlightMixTexture=!1,this.receiveAmbientOcclusion=!0,this.receiveShadows=!0,this.blendingEnabled=!0,this.screenSpaceReflections=!1,this.hasPolygonOffset=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.hasNormalTextureTransform=!1,this.cloudReflections=!0,this.snowCover=!1,this.objectAndLayerIdColor=!1,this.discardInvisibleFragments=!1,this.occlusionPass=!1,this.bindType=v.Draw,this.useCustomDTRExponentForWater=!1,this.hasVertexTangents=!1,this.highStepCount=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.useFillLights=!0,this.objectAndLayerIdColorInstanced=!1,this.draped=!1}get overlayEnabled(){return(this.integratedMeshMode===T.ColorOverlay||this.integratedMeshMode===T.ColorOverlayWithWater)&&i(this.output)}}o([n({count:r.COUNT})],C.prototype,"output",void 0),o([n({count:a.COUNT})],C.prototype,"textureCoordinateType",void 0),o([n({count:e.COUNT})],C.prototype,"componentData",void 0),o([n({count:u.COUNT})],C.prototype,"cullFace",void 0),o([n({count:t.COUNT})],C.prototype,"vertexDiscardMode",void 0),o([n({count:h.COUNT})],C.prototype,"doubleSidedMode",void 0),o([n({count:y.COUNT})],C.prototype,"alphaDiscardMode",void 0),o([n({count:T.COUNT})],C.prototype,"integratedMeshMode",void 0),o([n({count:m.COUNT})],C.prototype,"oitPass",void 0),o([n({count:l.COUNT})],C.prototype,"ellipsoidMode",void 0),o([n({count:p.COUNT})],C.prototype,"pbrMode",void 0),o([n({count:s.COUNT})],C.prototype,"normalType",void 0),o([n({count:d.COUNT})],C.prototype,"emissionSource",void 0),o([n()],C.prototype,"hasVertexColors",void 0),o([n()],C.prototype,"hasNormals",void 0),o([n()],C.prototype,"shadeNormals",void 0),o([n()],C.prototype,"hasSlicePlane",void 0),o([n()],C.prototype,"hasColorTexture",void 0),o([n()],C.prototype,"hasHighlightMixTexture",void 0),o([n()],C.prototype,"receiveAmbientOcclusion",void 0),o([n()],C.prototype,"receiveShadows",void 0),o([n()],C.prototype,"blendingEnabled",void 0),o([n()],C.prototype,"screenSpaceReflections",void 0),o([n()],C.prototype,"hasPolygonOffset",void 0),o([n()],C.prototype,"hasMetallicRoughnessTexture",void 0),o([n()],C.prototype,"hasOcclusionTexture",void 0),o([n()],C.prototype,"hasNormalTexture",void 0),o([n()],C.prototype,"hasOccludees",void 0),o([n()],C.prototype,"terrainDepthTest",void 0),o([n()],C.prototype,"cullAboveTerrain",void 0),o([n()],C.prototype,"hasNormalTextureTransform",void 0),o([n()],C.prototype,"cloudReflections",void 0),o([n()],C.prototype,"snowCover",void 0),o([n()],C.prototype,"objectAndLayerIdColor",void 0);export{C as ComponentTechniqueConfiguration,T as IntegratedMeshMode};
|
|
5
|
+
import{_ as o}from"../../../../../../chunks/tslib.es6.js";import{ComponentDataType as e}from"./shader/ComponentData.glsl.js";import{VertexDiscardMode as t}from"./shader/VertexDiscardMode.js";import{ShaderOutput as r,isColorEmissionHighlightOrOID as i}from"../../../core/shaderLibrary/ShaderOutput.js";import{NormalType as s}from"../../../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateType as a}from"../../../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{EmissionSource as d}from"../../../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as h}from"../../../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as p}from"../../../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{EllipsoidMode as l}from"../../../core/shaderLibrary/util/EllipsoidMode.js";import{parameter as n,ShaderTechniqueConfiguration as c}from"../../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{CullFaceOptions as u,AlphaDiscardMode as y}from"../../../lib/basicInterfaces.js";import{OITPass as m}from"../../../lib/OITPass.js";import{BindType as v}from"../../../../../webgl/BindType.js";var T;!function(o){o[o.None=0]="None",o[o.NoOverlay=1]="NoOverlay",o[o.ColorOverlay=2]="ColorOverlay",o[o.ColorOverlayWithWater=3]="ColorOverlayWithWater",o[o.COUNT=4]="COUNT"}(T||(T={}));class C extends c{constructor(o){super(),this.spherical=o,this.output=r.Color,this.textureCoordinateType=a.None,this.componentData=e.Uniform,this.cullFace=u.Back,this.vertexDiscardMode=t.None,this.doubleSidedMode=h.WindingOrder,this.alphaDiscardMode=y.Opaque,this.integratedMeshMode=T.None,this.oitPass=m.NONE,this.ellipsoidMode=l.Earth,this.pbrMode=p.Disabled,this.normalType=s.Attribute,this.emissionSource=d.None,this.hasVertexColors=!1,this.hasNormals=!1,this.shadeNormals=!0,this.hasSlicePlane=!1,this.hasColorTexture=!1,this.hasHighlightMixTexture=!1,this.receiveAmbientOcclusion=!0,this.receiveShadows=!0,this.blendingEnabled=!0,this.screenSpaceReflections=!1,this.hasPolygonOffset=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.hasNormalTextureTransform=!1,this.cloudReflections=!0,this.snowCover=!1,this.objectAndLayerIdColor=!1,this.hasBloom=!1,this.discardInvisibleFragments=!1,this.occlusionPass=!1,this.bindType=v.Draw,this.useCustomDTRExponentForWater=!1,this.hasVertexTangents=!1,this.highStepCount=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.useFillLights=!0,this.objectAndLayerIdColorInstanced=!1,this.draped=!1}get overlayEnabled(){return(this.integratedMeshMode===T.ColorOverlay||this.integratedMeshMode===T.ColorOverlayWithWater)&&i(this.output)}}o([n({count:r.COUNT})],C.prototype,"output",void 0),o([n({count:a.COUNT})],C.prototype,"textureCoordinateType",void 0),o([n({count:e.COUNT})],C.prototype,"componentData",void 0),o([n({count:u.COUNT})],C.prototype,"cullFace",void 0),o([n({count:t.COUNT})],C.prototype,"vertexDiscardMode",void 0),o([n({count:h.COUNT})],C.prototype,"doubleSidedMode",void 0),o([n({count:y.COUNT})],C.prototype,"alphaDiscardMode",void 0),o([n({count:T.COUNT})],C.prototype,"integratedMeshMode",void 0),o([n({count:m.COUNT})],C.prototype,"oitPass",void 0),o([n({count:l.COUNT})],C.prototype,"ellipsoidMode",void 0),o([n({count:p.COUNT})],C.prototype,"pbrMode",void 0),o([n({count:s.COUNT})],C.prototype,"normalType",void 0),o([n({count:d.COUNT})],C.prototype,"emissionSource",void 0),o([n()],C.prototype,"hasVertexColors",void 0),o([n()],C.prototype,"hasNormals",void 0),o([n()],C.prototype,"shadeNormals",void 0),o([n()],C.prototype,"hasSlicePlane",void 0),o([n()],C.prototype,"hasColorTexture",void 0),o([n()],C.prototype,"hasHighlightMixTexture",void 0),o([n()],C.prototype,"receiveAmbientOcclusion",void 0),o([n()],C.prototype,"receiveShadows",void 0),o([n()],C.prototype,"blendingEnabled",void 0),o([n()],C.prototype,"screenSpaceReflections",void 0),o([n()],C.prototype,"hasPolygonOffset",void 0),o([n()],C.prototype,"hasMetallicRoughnessTexture",void 0),o([n()],C.prototype,"hasOcclusionTexture",void 0),o([n()],C.prototype,"hasNormalTexture",void 0),o([n()],C.prototype,"hasOccludees",void 0),o([n()],C.prototype,"terrainDepthTest",void 0),o([n()],C.prototype,"cullAboveTerrain",void 0),o([n()],C.prototype,"hasNormalTextureTransform",void 0),o([n()],C.prototype,"cloudReflections",void 0),o([n()],C.prototype,"snowCover",void 0),o([n()],C.prototype,"objectAndLayerIdColor",void 0),o([n()],C.prototype,"hasBloom",void 0);export{C as ComponentTechniqueConfiguration,T as IntegratedMeshMode};
|
|
@@ -32,7 +32,7 @@ float depthStep = clamp(depth + minStep, 0.0, 1.0);
|
|
|
32
32
|
float linearDepthStep = linearizeDepth(depthStep);
|
|
33
33
|
float depthError = abs(linearDepthStep - linearDepth);
|
|
34
34
|
if (depthError > 0.2) {
|
|
35
|
-
normal = texture(normalMap, uv).xyz * 2.0 - 1.0;
|
|
35
|
+
normal = normalize(texture(normalMap, uv).xyz * 2.0 - 1.0);
|
|
36
36
|
angleCutoffAdjust = 0.004;
|
|
37
37
|
} else {
|
|
38
38
|
normal = normalize(cross(dFdx(pos), dFdy(pos)));
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import{update as t}from"../../../../core/arrayUtils.js";import{createTask as r}from"../../../../core/asyncUtils.js";import{unitRGBAFromColor as i}from"../../../../core/colorUtils.js";import has from"../../../../core/has.js";import{clamp as s,lerp as a}from"../../../../core/mathUtils.js";import{removeMaybe as n,abortMaybe as h,destroyMaybe as o,releaseMaybe as d}from"../../../../core/maybe.js";import{throwIfAborted as l}from"../../../../core/promiseUtils.js";import{watch as _,syncAndInitial as u,initial as p,sync as m}from"../../../../core/reactiveUtils.js";import{signal as c}from"../../../../core/signal.js";import{Milliseconds as g}from"../../../../core/time.js";import{property as f}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import{subclass as b}from"../../../../core/accessorSupport/decorators/subclass.js";import{equals as A,invert as T,multiply as E}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as P,create as R}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{s as S}from"../../../../chunks/vec42.js";import{ZEROS as I}from"../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{fromValues as C,ZEROS as w}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{pruneIndexArrays as O}from"../../../../geometry/support/Indices.js";import{RenderCategory as N,InternalRenderCategory as D}from"../../webgl.js";import{debugFlags as y}from"../../support/debugFlags.js";import{ColorFormat as x,DepthRenderbuffer16f as H}from"../../webgl/formats.js";import{FBOCache as M,defaultWebGLFBO as L}from"../core/FBOCache.js";import{RenderPassManager as F}from"../core/renderPasses/RenderPassManager.js";import{ShaderOutput as U,isColorOrColorEmission as v}from"../core/shaderLibrary/ShaderOutput.js";import{HUDRenderStyle as G}from"../core/shaderLibrary/hud/HUDRenderStyle.js";import{distanceFadeEnd as q}from"../core/shaderLibrary/shading/ScreenSpaceConstants.js";import{RenderNodes as V}from"../effects/RenderNodes.js";import{RenderPluginManager as j}from"../effects/RenderPluginManager.js";import{Blit as B}from"../effects/blit/Blit.js";import{maxHighlightsPerChannel as Q,renderHighlightBuffer as W}from"../effects/highlight/Highlight.js";import{OITBlend as k}from"../effects/transparency/OITBlend.js";import{AnimationTimer as z}from"./AnimationTimer.js";import{AnimationTimeStep as Y}from"./AnimationTimeStep.js";import{RenderRequestType as X}from"./basicInterfaces.js";import{BoundingInfo as K}from"./BoundingInfo.js";import{DepthRange as J}from"./DepthRange.js";import{depthRangeFromScene as Z}from"./depthRangeUtils.js";import{hudFragmentOpacityParameters as $}from"./hudFragmentOpacityParameters.js";import{MainFramebuffer as ee}from"./MainFramebuffer.js";import{RenderOccludedFlag as te}from"./Material.js";import{OITPass as re}from"./OITPass.js";import{RenderContext as ie,defaultRenderOccludedMask as se}from"./RenderContext.js";import{RendererBase as ae}from"./RendererBase.js";import{RendererTarget as ne}from"./rendererUtils.js";import{setupFeatureDefaults as he,RenderFeature as oe}from"./RenderFeature.js";import{RenderPluginInput as de}from"./RenderPluginInput.js";import{RenderSlot as le}from"./RenderSlot.js";import{ShadowAccumulator as _e}from"./ShadowAccumulator.js";import{ShadowMap as ue,SnapshotSlot as pe}from"./ShadowMap.js";import me from"./SliceHelper.js";import{Transparency as ce}from"./edgeRendering/interfaces.js";import{MergedRenderer as ge}from"../materials/renderers/MergedRenderer.js";import{RenderSceneResult as fe}from"../parts/renderUtils.js";import{RendererPerformanceInfo as be,PerformanceCategory as Ae}from"../statistics/RendererPerformanceInfo.js";import{RenderState as Te}from"../../../support/RenderState.js";import{DepthStencilAttachment as Ee,PixelFormat as Pe,PixelType as Re,FramebufferBit as Se,ColorAttachment1 as Ie,ColorAttachment2 as Ce}from"../../../webgl/enums.js";let we=class extends ae{constructor(e,t,r,s,a,n){super({stage:e}),this._techniques=r,this._rctx=s,this._compositingHelper=a,this._requestRender=n,this._pluginsHas={hudElements:!1,water:!1},this.renderPassManager=new F,this._isRendering=!1,this._inGlobeView=!1,this._backgroundColor=C(0,0,0,1),this._sliceHelper=new me,this._blit=null,this._oitblend=null,this._state=c(Te.IDLE),this._highQualityTransparencyEnabled=!0,this._ssrEnabled=!1,this._hasAnimations=!1,this._animationTimestep=new Y,this._loadEdgeViewTask=null,this._edgeViewCallbacks=[],this._reprojectionMatrixVersion=c(0),this._lastFrameTime=g(0),this._renderHiddenTransparentEdges=()=>{},this._pluginInput=new de,this._releaseNormals=e=>{e.some((({name:e})=>"normals"===e))&&this._pluginInput.release("normals")},this._debugNeedsDepth=!1,this.fboCache=new M(s),this._renderStateFeatures=c(he(!has("disable-feature:high-quality-idle"),e.view.qualityProfile)),this._framebuffer=new ee(this.fboCache),this.performanceInfo=new be(this._rctx),this._shadowMap=new ue(this.fboCache,e.viewingMode),this._shadowAccumulator=new _e(this.fboCache,r,e,(e=>{const t=this.shadowsEnabled;this._shadowMap.enabled=!0,this._ensureBindParametersCamera(e.camera,e.contentCamera),this._plugins.prepareRender(),this._shadowMap.enabled=t}),((t,r,i)=>{const s=e.view.qualitySettings.maximumPixelRatio;t.shadowMap.start(t.camera,r,i,!0,s),this._renderShadowCascades(U.Shadow,t.shadowMap),t.shadowMap.finish(),t.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(t.camera,t.contentCamera)}),n),this._renderContext=new ie(this._rctx,this._shadowMap,r),this._nodes=new V(this._renderContext),this._plugins=new j({renderContext:this._renderContext,techniques:r,materials:t,requestRender:n,controller:e,fbos:this.fboCache,isFeatureEnabled:e=>this.isFeatureEnabled(e)}),this._plugins.add(this.renderPassManager),this.addHandles([_((()=>e.view.state.camera),(()=>n()),u),_((()=>y.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES),(e=>{this._renderHiddenTransparentEdges=e?()=>this._renderEdges(ce.TRANSPARENT):()=>{},n()}),p),_((()=>e.view.environment.background?.color),(e=>{const t=e?i(e):w;S(this._backgroundColor,t[0]*t[3],t[1]*t[3],t[2]*t[3],t[3]),n()}),u),_((()=>e.view.state.camera.relativeElevation),(e=>this._inGlobeView=(e??1/0)>=q),u),_((()=>this._bindParameters.clouds.fadeFactor),(()=>this._bindParameters.fadeLighting()),m),_((()=>this._bindParameters.clouds.data?.state),(()=>n()),m),_((()=>e.view.state.highlights),(e=>{this._bindParameters.highlights=e,n()}),p)])}destroy(){this._gpuTimerHandle=n(this._gpuTimerHandle),this._nodes.destroy(),this._framebuffer.dispose(),this._shadowMap.dispose(),this._shadowAccumulator.dispose(),this._loadEdgeViewTask=h(this._loadEdgeViewTask),this._edgeView=o(this._edgeView),this.renderPassManager.dispose(),this._releaseFBOs(),this._disposeOffscreenBuffers(),this.fboCache.destroy(),this._plugins.destroy(),this._blit=null,this._oitblend=null,K.prune(),ge.prune(),O()}get renderContext(){return this._renderContext}get _bindParameters(){return this._renderContext.bind}get _framebufferSize(){return this._framebuffer.size}updateRenderFeatures(e=null,t=!has("disable-feature:high-quality-idle")){this._renderStateFeatures.value=he(t,e),this._requestRender()}isFeatureEnabled(e,t=this._state.value){return this._renderStateFeatures.value.get(t,e)??!1}setFeatureEnabled(e,t,r){this._renderStateFeatures.mutate((i=>i.set(t,e,r))),this._requestRender()}get _highQualityTransparency(){return this._highQualityTransparencyEnabled||this.isFeatureEnabled(oe.HighQualityTransparency)}get hasReflections(){return this._pluginsHas.water&&(this._ssrEnabled||this.isFeatureEnabled(oe.WaterReflection))}get _hasHighlights(){return this._plugins.produces(U.Highlight,le.OPAQUE_MATERIAL,le.TRANSPARENT_MATERIAL,le.DRAPED_MATERIAL,le.HUD_MATERIAL,le.LABEL_MATERIAL)}hasHighlight(e){return this._plugins.hasHighlight(e)}get _hasHUDHighlights(){return this._plugins.produces(U.Highlight,le.HUD_MATERIAL,le.LABEL_MATERIAL)}get hasSSAO(){return(this.stage.view.qualitySettings.ambientOcclusion||this.isFeatureEnabled(oe.SSAO))&&!this._inGlobeView}get hasSMAA(){return this.stage.view.qualitySettings.antialiasingEnabled||this.isFeatureEnabled(oe.Antialiasing)}get fullResolutionAtmosphere(){return this.stage.view.qualitySettings.highResolutionAtmosphere||this.isFeatureEnabled(oe.HighResolutionAtmosphere)}_releaseFBOs(){this._bindParameters.ssr.lastFrameColor=d(this._bindParameters.ssr.lastFrameColor),this._bindParameters.terrainDepth=d(this._bindParameters.terrainDepth),this._bindParameters.geometryDepth=d(this._bindParameters.geometryDepth)}_disposeOffscreenBuffers(){this._framebuffer.dispose(),this._disposeBindBuffers()}_disposeBindBuffers(){this._shadowMap.disposeOffscreenBuffers(),this._bindParameters.depth=d(this._bindParameters.depth),this._bindParameters.hudVisibility=d(this._bindParameters.hudVisibility)}get updating(){return null!=this._edgeView&&this._edgeView.updating||this._shadowAccumulator.running||this._plugins.updating||!this.isCameraFinal}loadEdgeView(){return this._loadEdgeViewTask||(this._loadEdgeViewTask=r((async e=>{const{EdgeView:t}=await import("./edgeRendering/EdgeView.js");l(e);const r=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:Ge(this.stage.view.resourceController)});return this.addHandles(_((()=>r.updating),(()=>this._requestRender()),m)),this._requestRender(),this._edgeViewCallbacks.forEach((e=>e(r))),this._edgeViewCallbacks.length=0,r}))),this._loadEdgeViewTask.promise}withEdgeView(e){this.loadEdgeView(),null==this._edgeView?this._edgeViewCallbacks.push(e):e(this._edgeView)}get edgeView(){return this._edgeView}get isCameraFinal(){return this._reprojectionMatrixVersion.value>=0&&A(this._bindParameters.ssr.reprojectionMatrix,P)}set _reprojectionMatrix(e){t(this._bindParameters.ssr.reprojectionMatrix,e)&&this._reprojectionMatrixVersion.value++}get shadowsEnabled(){return!!this._shadowMap?.enabled}setParameters(e){const{_shadowMap:t,_bindParameters:r}=this;if(void 0!==e.qualitySettings?.reflections&&this._ssrEnabled!==e.qualitySettings.reflections&&(this._ssrEnabled=e.qualitySettings.reflections,this._requestRender()),void 0!==e.shadowMap&&this._shadowMap.enabled!==e.shadowMap&&(this._shadowMap.enabled=e.shadowMap,this._requestRender()),void 0!==e.shadowMapMaxCascades&&t.maxCascades!==e.shadowMapMaxCascades&&(t.maxCascades=e.shadowMapMaxCascades,this._requestRender()),null!=e.environment){null!=e.environment.weather&&(this._bindParameters.weather=e.environment.weather,this._bindParameters.weatherVisible=!!e.weatherVisible);const t="virtual"!==e.environment.lighting.type;r.enableFillLights!==t&&(r.enableFillLights=t,this._requestRender())}void 0!==e.highQualityTransparency&&this._highQualityTransparencyEnabled!==e.highQualityTransparency&&(this._highQualityTransparencyEnabled=e.highQualityTransparency,this._requestRender()),void 0!==e.shadowCast&&this._shadowAccumulator.setOptions(e.shadowCast)}set slicePlane(e){this._sliceHelper.plane!==e&&(this._sliceHelper.plane=e,this._requestRender())}get plugins(){return this._plugins}get _hasOITSupport(){return this._rctx.driverTest.floatBufferBlend.result}get _oitEnabled(){return this._highQualityTransparency&&this._hasOITSupport}commit(e,t){return this._isRendering&&console.warn("Renderer.modify called while rendering"),!!super.commit(e,t,this._plugins.context)&&(this.updateHasFlags(),!0)}rendererAdded(e){this._plugins.add(e)}rendererRemoved(e){this._plugins.remove(e)}updateHasFlags(){const has=this._pluginsHas;has.hudElements=this._plugins.produces(U.Color,...Me),has.water=this._plugins.produces(U.Normal,le.DRAPED_WATER),this._bindParameters.hasOccludees=this._plugins.hasOccludees,this._requestRender()}updateAnimation(e,t){this._animationTimer??=new z(e.camera,t),this._animationTimer.advance(e.camera,t,this._animationTimeDilation);const r=this._hasAnimations;return this._hasAnimations=this._plugins.updateAnimation(this._animationTimer),this._hasAnimations=this._nodes.updateAnimation(this._animationTimer)||this._hasAnimations,this._hasAnimations!==r&&(this._gpuTimerHandle=r?n(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,r=ne.Default,i=!1){try{return this._isRendering=!0,this._render(e,t,r,i)}catch(s){console.error(`Exception during rendering: ${s}`)}finally{this._isRendering=!1}return new fe(this._pluginInput.get(N.FINAL),null)}_updateHUDOccludedFragmentOpacity(e,t){const{idleOpacity:r,navigatingOpacity:i,maxDelta:n,tiltFadeStart:h,tiltFadeEnd:o,altitudeStart:d,altitudeEnd:l}=$,_=this.stage.view,u=_.stateManager.camera,p=_.qualitySettings.fadeDuration,m=e===Te.IDLE?r:i,c=s((u.tilt-h)/(o-h),0,1),g=s(((u.position.z??0)-d)/(l-d),0,1),f=a(a(1,m,c),1,g),b=this._bindParameters.hudOccludedFragmentOpacity;if(p<=0||b===f||0===this._lastFrameTime||this._lastFrameTime>t)return this._bindParameters.hudOccludedFragmentOpacity=f,void(this._lastFrameTime=t);const A=t-this._lastFrameTime;this._lastFrameTime=t;const T=Math.max(1-r,Math.abs(r-i)),E=Math.min(T*A/p,n);E>=Math.abs(f-b)?this._bindParameters.hudOccludedFragmentOpacity=f:(this._bindParameters.hudOccludedFragmentOpacity=b+Math.sign(f-b)*E,this._requestRender())}_render(e,t,r=ne.Default,i){this.performanceInfo.startFrame(),this.fboCache.frameStart(),this.fboCache.interactive=r===ne.Default,this._disposeBindBuffers();const{camera:s,contentCamera:a,mode:n,alignPixelEnabled:h}=e;this._state.value=n;const o=this._nodes.produces("magnifier-color"),l=this._nodes.produces(N.FINAL),_=this._nodes.require("emissive",D.TRANSPARENT_ENVIRONMENT,N.COMPOSITE,N.FINAL)>0&&this._plugins.hasEmissions,u=_?U.ColorEmission:U.Color;this._renderContext.time=t,this._renderContext.output=u,this._bindParameters.oitPass=re.NONE,this._bindParameters.alignPixelEnabled=h,this._bindParameters.decorations=!i,this._bindParameters.mainDepth=null,this._bindParameters.slicePlane=this._sliceHelper.plane,this._bindParameters.viewshedEnabled=this._nodes.produces(D.VIEWSHED),this._renderOverlay(t),s.setGLViewport(this._rctx);const p=this._framebuffer,m=p.initialize(s.fullWidth,s.fullHeight,this._backgroundColor,_);this.hasReflections?(m?.setName("last frame color"),this._bindParameters.ssr.lastFrameColor=m):m?.release(),this._ensureBindParametersCamera(s,a),this._updateHUDOccludedFragmentOpacity(n,t),this._plugins.prepareRender(),this._bindParameters.shadowHighlightsVisible=this._needsShadowHighlight&&!i;const c=this._highQualityTransparency&&this._hasTransparentTerrain,g=this._plugins.produces(U.Color,...xe);this._precompilePrepasses(),this.performanceInfo.advance(Ae.PREPARE);const f=this._computeDepthRange(s);this._renderShadowMap(s,this._bindParameters.lighting.mainLight.direction,f),this._ensureBindParametersCamera(s,a),this._pluginInput.set("normals",this._renderNormals()),this._renderRemainingGeometryDepth(),this._renderShadowAccumulation(f,s,a),this._ensureBindParametersSSR(t),this._precompileShaders(c,g,u),this._renderContext.output=u,p.bind(),this._bindParameters.mainDepth=p.depth.attachment;const b=this.plugins.produces(U.Color,...ye);b&&this._renderOpaqueGeometry(),p.update((e=>this._renderNodes(N.OPAQUE,e,b))),this.fboCache.debugCallback?.(N.OPAQUE,p.color.fbo),p.update((e=>this._renderNodes(D.OPAQUE_ENVIRONMENT,e))),this.fboCache.debugCallback?.(D.OPAQUE_ENVIRONMENT,p.color.fbo),this._renderTerrainDepth(c),this._renderEdges(ce.OPAQUE),p.bind(),this._renderPlugins(le.VOXEL,Ae.VOXEL),this._renderHiddenTransparentEdges(),g&&(this._oitEnabled?this._renderOIT(Oe.Geometry,u):this._renderTransparentGeometry()),p.update((e=>this._renderNodes(N.TRANSPARENT,e,g))),this.fboCache.debugCallback?.(N.TRANSPARENT,p.color.fbo),this._renderGeometryDepth(c),this._renderHUDVisibility(),c||this._plugins.render(this._pluginInput,le.LINE_CALLOUTS),this._renderEdges(ce.TRANSPARENT);const A=this._hasTransparentTerrain?this._renderTransparentTerrain():null;A&&(this.performanceInfo.advance(Ae.TRANSPARENT_TERRAIN),this._bindParameters.hudVisibility&&(c?this._renderLineCallouts(G.Occluded):(this._rctx.bindFramebuffer(this._bindParameters.hudVisibility?.fbo),this._compositingHelper.compositeHUD(this._bindParameters,A.getTexture())),this._renderHUD(G.Occluded,p.color,u))),this._bindParameters.cullAboveTerrain=!1,A&&(p.bind(),this._compositingHelper.compositePreMultipliedAlpha(this._bindParameters,A.getTexture()),A.release(),c&&(this._renderEdges(ce.OPAQUE),g&&(this._oitEnabled?this._renderOIT(Oe.Geometry,u):this._renderTransparentGeometry(),this.performanceInfo.advance(Ae.TRANSPARENT)),this._renderEdges(ce.TRANSPARENT))),this._bindParameters.ssao=d(this._bindParameters.ssao),c&&this._renderLineCallouts(G.NotOccluded),this._bindParameters.terrainDepthTest=!1,this._renderTransparentEnvironment(),this._pluginInput.set(D.FOCUSAREA,this._renderFocusAreaGeometry()),p.update((e=>this._renderNodes(D.TRANSPARENT_ENVIRONMENT,e))),p.update((e=>this._renderNodes(D.VIEWSHED,e))),p.update((e=>this._renderNodes(D.LASERLINES,e))),p.update((e=>this._renderNodes(D.FOCUSAREA_COLOR,e))),p.update((e=>this._renderNodes(D.OCCLUDED,e))),this._pluginInput.set("highlights",this._renderHighlightPrepass());const T=r===ne.ObjectAndLayerID?this._renderObjectAndLayerIdColor():null;p.update((e=>this._renderNodes(N.COMPOSITE,e))),this._pluginInput.release(D.FOCUSAREA);const E=!(r!==ne.Default||l||o&&!i),P=this._pluginInput.get(N.COMPOSITE),R=E?L:this.fboCache.acquire(P.fbo.width,P.fbo.height,D.ANTIALIASING),S=this._nodes.produces(D.ANTIALIASING)?this._renderNodes(D.ANTIALIASING,R):this._blitFBO(P,R,!1);let I;this._pluginInput.set(D.ANTIALIASING,S),this._hasHUDHighlights?(this._renderHUD(G.NotOccluded,S,u),I=this._renderNodes(D.HIGHLIGHTS,S)):(I=this._renderNodes(D.HIGHLIGHTS,S),this._renderHUD(G.NotOccluded,I,u));const C=this._renderNodes(D.MAGNIFIER,I);return o&&!i&&r===ne.Default&&!l&&this._blitFBO(C),l?(C.attachDepth(p.depth),this._blitFBO(this._renderNodes(N.FINAL,C)),C.detachDepth()):this._pluginInput.set(N.FINAL,C),this._pluginInput.release("highlights"),this.onPostRender&&this.onPostRender(),this._releaseFBOs(),p.releaseDepth(),this._renderContext.lastFrameCamera.copyFrom(this._bindParameters.camera),this.fboCache.frameEnd(),this.performanceInfo.finishFrame(),r!==ne.Default&&(this._releaseFBOs(),this._disposeOffscreenBuffers()),new fe(this._pluginInput.get(N.FINAL),T)}_precompileShaders(e,t,r){++this._plugins.context.techniques.precompiling,this._renderContext.output=r,this._precompileOpaqueGeometry(),this._nodes.precompile(D.OPAQUE_ENVIRONMENT),this._bindParameters.terrainDepthTest=e,this._bindParameters.cullAboveTerrain=e,this._renderContext.output=U.Depth,this._plugins.precompile(le.TRANSPARENT_TERRAIN),e&&(this._precompileOpaqueGeometry(),this._precompileTransparentGeometry()),this._renderContext.output=r,this._plugins.precompile(le.TRANSPARENT_TERRAIN),t&&(this._precompileTransparentGeometry(),this._hasTransparentTerrain&&(this._bindParameters.cullAboveTerrain=!1,this._precompileTransparentGeometry(),this._bindParameters.cullAboveTerrain=e)),this._nodes.precompile(D.FOCUSAREA),this._needsHUDVisibility&&this._plugins.precompile(le.OCCLUSION_PIXELS),this._plugins.precompile(le.LINE_CALLOUTS),this._precompileHUD(G.Occluded),this._bindParameters.terrainDepthTest=!1,this._bindParameters.cullAboveTerrain=!1,this._nodes.precompile(D.VIEWSHED,D.LASERLINES,D.FOCUSAREA_COLOR,D.OCCLUDED,D.ANTIALIASING,D.HIGHLIGHTS);const i=this._bindParameters;i.highlightMixTexture=i.highlights.length>1?this._rctx.emptyTexture:null,this._precompileHUD(G.NotOccluded),this._hasHighlights&&(i.highlights.forEach(((e,t)=>{i.highlightLevel=t,this._precompileAllGeometry(U.Highlight)})),i.highlightLevel=null),i.highlightMixTexture=null,this._nodes.precompile(N.COMPOSITE,D.MAGNIFIER),this._shadowAccumulator.precompile(),this._plugins.precompile(le.TRANSPARENT_MATERIAL_WITHOUT_DEPTH),--this._plugins.context.techniques.precompiling}_renderFocusAreaGeometry(){if(!this._nodes.produces(D.FOCUSAREA))return null;const{width:e,height:t}=this._framebufferSize;let r=this.fboCache.acquire(e,t,D.FOCUSAREA);return r=this._nodes.render(r,this._pluginInput),this.performanceInfo.advance(Ae.FOCUS_AREA_MASK),r}_renderObjectAndLayerIdColor(){if(!this._nodes.produces("olid"))return null;const e=this._renderContext.output;++this._techniques.precompiling;const t=this._framebufferSize;let r=this.fboCache.acquire(t.width,t.height,"olid");return r.acquireDepth(Ee),r=this._nodes.render(r,this._pluginInput),--this._techniques.precompiling,this.performanceInfo.advance(Ae.OBJECT_AND_LAYER_ID_COLOR),this._renderContext.output=e,r}finish(e){this._hasAnimations||this._animationTimestep.clear();const t=this.performanceInfo.gpuSamplingEnabled,r=e===X.BACKGROUND;if(r||t){const e=r?this.performanceInfo.elapsedTime:0;let i=0;t?i=this.performanceInfo.totalGPUTimeSampler.last:this._rctx.gl.finish();const s=Math.max(e,i);this._animationTimestep.frame(s,r)}}readMainDepth(e,t){const{mainDepth:r,camera:i}=this._bindParameters;if(!r)return;const s=this.fboCache.acquire(this._framebufferSize.width,this._framebufferSize.height,"linear-depth");this._rctx.bindFramebuffer(s.fbo),i.setGLViewport(this._rctx),this._rctx.setScissorRect(e[0],e[1],e[2],e[3]),this._rctx.setScissorTestEnabled(!0),this._rctx.clearFramebuffer(w),this._compositingHelper.blitDepthToLinearDepth(this._bindParameters,r),this._rctx.setScissorTestEnabled(!1),this._rctx.setScissorRect(0,0,this._rctx.gl.canvas.width,this._rctx.gl.canvas.width),s.fbo?.readPixels(e[0],e[1],e[2],e[3],Pe.RGBA,Re.UNSIGNED_BYTE,t),s.release()}readHUDVisibility(e,t,r,i,s){this._bindParameters.hudVisibility?.fbo?.readPixels(e,t,r,i,Pe.RGBA,Re.UNSIGNED_BYTE,s)}readAccumulatedShadow(e){return this._shadowAccumulator.readAccumulatedShadow(e[0],e[1])}_renderEdges(e){const t=this._edgeView;if(!t?.shouldRender())return;const r=this._framebufferSize,i=this.fboCache.acquire(r.width,r.height,"edges"),s=()=>t.render(this._bindParameters,e),a=this._bindParameters.geometryDepth;this.renderToTargets(s,i,a??this._framebuffer.depth,w),this._framebuffer.bind(),this._compositingHelper.composite(this._bindParameters,i.getTexture()),i.release(),this.performanceInfo.advance(e===ce.OPAQUE?Ae.OPAQUE_EDGES:Ae.TRANSPARENT_EDGES)}_renderOverlay(e){this._bindParameters.overlay=this.overlay?.render(e),this._bindParameters.overlay&&this.performanceInfo.advance(Ae.OVERLAY)}_renderShadowMap(e,t,r){if(!this.shadowsEnabled)return;const i=this._shadowMap;i.start(e,t,r,this.isFeatureEnabled(oe.HighResolutionShadows),this.stage.view.qualitySettings.maximumPixelRatio),this._needsShadowHighlight?(this._renderShadowCascades(U.ShadowHighlight,this._shadowMap),i.moveSnapshot(pe.Highlight),this._renderShadowCascades(U.ShadowExcludeHighlight,this._shadowMap),i.copySnapshot(pe.ExcludeHighlight),this._renderShadowCascades(U.ShadowHighlight,this._shadowMap)):this._renderShadowCascades(U.Shadow),i.finish(),e.setGLViewport(this._rctx),this.performanceInfo.advance(Ae.SHADOW_MAP)}_precompileShadowCascades(e){for(const t of this._shadowMap.cascades)t.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(t.camera,t.camera),this._precompileAllGeometry(e)}_renderShadowCascades(e,t=this._shadowMap){for(const r of t.cascades)r.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(r.camera,r.camera),this.renderAllGeometry(e)}get _needsDepth(){return this._plugins.consumes(U.Depth)||this._nodes.requireGeometryDepth()||this.hasReflections||this._needsShadowHighlight||this._needsShadowAccumulation||this._debugNeedsDepth}_renderRemainingGeometryDepth(){const e=this._pluginInput.get("normals");if(e){const t=this._needsDepth?e.getAttachment(Ee):null;t?.retain(),this._pluginInput.set(D.SSAO,this._renderSSAO()),this._renderGeometryWithoutNormalsDepth(t)}else this._renderAllGeometryDepth()}_renderGeometryWithoutNormalsDepth(e){if(!this._needsDepth||!e)return void(this._bindParameters.depth=d(this._bindParameters.depth));const t=this._framebufferSize,r=this.fboCache.acquire(t.width,t.height,"depth");r.attachDepth(e),e.release(),this._rctx.bindFramebuffer(r.fbo),this._rctx.clear(Se.STENCIL),this._renderGeometryWithoutNormals(U.Depth),d(this._bindParameters.depth),this._bindParameters.depth=r.obtainDepthTexture(),r.release(),this.performanceInfo.advance(Ae.DEPTH)}_renderAllGeometryDepth(){if(!this._needsDepth)return void(this._bindParameters.depth=d(this._bindParameters.depth));const e=this._framebufferSize,t=this.fboCache.acquire(e.width,e.height,"depth").acquireDepth(Ee);this._rctx.bindFramebuffer(t.fbo),this._rctx.clear(Se.DEPTH|Se.STENCIL),this.renderAllGeometry(U.Depth),d(this._bindParameters.depth),this._bindParameters.depth=t.obtainDepthTexture(),t.release(),this.performanceInfo.advance(Ae.DEPTH)}_renderTerrainDepth(e){if(this._bindParameters.terrainDepthTest=e,this._bindParameters.cullAboveTerrain=e,!e)return void(this._bindParameters.terrainDepth=d(this._bindParameters.terrainDepth));const t=this._renderContext.output;this._renderContext.output=U.Depth;const r=this._framebufferSize,i=this.fboCache.acquire(r.width,r.height,"terrain depth").acquireDepth(Ee);this._rctx.bindFramebuffer(i.fbo),this._rctx.clear(Se.DEPTH|Se.STENCIL),this._renderTransparentTerrain(),d(this._bindParameters.terrainDepth),this._bindParameters.terrainDepth=i.obtainDepthTexture(),this._renderContext.output=t,i.release()}_renderGeometryDepth(e){if(!e)return void(this._bindParameters.geometryDepth=d(this._bindParameters.geometryDepth));const t=this._renderContext.output,{width:r,height:i}=this._framebufferSize,s=this.fboCache.acquire(r,i,"geometry depth").acquireDepth(Ee);this._rctx.bindFramebuffer(s.fbo),this._rctx.clear(Se.DEPTH|Se.STENCIL),this._renderOpaqueAndTransparentGeometry(U.Depth),this._renderContext.output=t,d(this._bindParameters.geometryDepth),this._bindParameters.geometryDepth=s.obtainDepthTexture(),s.release()}get _needsDepthRange(){return this._shadowMap.enabled||this._needsShadowAccumulation}_computeDepthRange(e){if(!this._needsDepthRange)return J.zero;const t=Z(e,this._plugins.plugins,this.stage.layers);return t.union(this._plugins.queryDepthRange(e)),t.near=Math.max(e.near,t.near),t.far=Math.min(e.far,t.far),t}get _normalsRequired(){const e=this._nodes.require("normals",N.FINAL,N.COMPOSITE,N.OPAQUE,N.TRANSPARENT,D.VIEWSHED,D.LASERLINES);return(this.hasSSAO?1:0)+e}_precompilePrepasses(){this._normalsRequired&&this._precompileAllGeometry(U.Normal),this._needsDepth&&this._precompileAllGeometry(U.Depth),this.shadowsEnabled&&(this._needsShadowHighlight?(this._precompileShadowCascades(U.ShadowHighlight),this._precompileShadowCascades(U.ShadowExcludeHighlight),this._precompileShadowCascades(U.ShadowHighlight)):this._precompileShadowCascades(U.Shadow)),this._needsShadowAccumulation&&this._precompileAllGeometry(U.Shadow)}_renderNormals(){const e=this._normalsRequired;if(0===e)return;const t=this._framebufferSize,r=this.fboCache.acquire(t.width,t.height,"normals",x.RGBA8);r.acquireDepth(Ee),this._rctx.bindFramebuffer(r.fbo),this._rctx.clearFramebuffer(w,!0,!0),this._renderGeometryWithNormals(U.Normal);const i=this._nodes.optional("normals",N.FINAL,N.COMPOSITE,N.OPAQUE,N.TRANSPARENT,D.VIEWSHED);return r.retain(e+i-1),this.performanceInfo.advance(Ae.NORMALS),r}_renderSSAO(){const e=this._pluginInput.get("normals");if(!this.hasSSAO||!e)return void e?.detachDepth();L.setName(D.SSAO);const t=this._nodes.render(L,this._pluginInput);return this._bindParameters.ssao=t,e.detachDepth(),this._pluginInput.release("normals"),this.performanceInfo.advance(Ae.SSAO),t}_precompileAllGeometry(e){const t=this._renderContext.output;this._renderContext.output=e,this._precompileOpaqueGeometry(),this._precompileTransparentGeometry(),this._plugins.precompile(le.TRANSPARENT_TERRAIN),this._renderContext.output=t}renderAllGeometry(e){this._renderContext.output=e,this._renderOpaqueAndTransparentGeometry(e),this._renderTransparentTerrain()}precompileSlots(e,...t){for(const r of t)this._bindParameters.slot=r,e.precompile(this._renderContext)}precompileOccludedSlots(e,t){for(const r of t)this._renderContext.renderOccludedMask=r,this.precompileSlots(e,...He);this._renderContext.renderOccludedMask=se}renderSlots(e,...t){for(const r of t)this._bindParameters.slot=r,e.forAll((e=>{const t=e.acquireTechniques(this._renderContext);t&&e.render(this._renderContext,t,this._pluginInput)}))}renderOccludedSlots(e,t){this._renderContext.renderOccludedMask=t,this.plugins.renderOccludedFlags>te.Occlude&&this._plugins.render(this._pluginInput,le.OCCLUDED_TERRAIN),this.renderSlots(e,...He),this._renderContext.renderOccludedMask=se}renderHUD(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(this._pluginInput,le.HUD_MATERIAL)}precompileViewshedShadowMap(){this._precompileAllGeometry(U.ViewshedShadow)}renderViewshedShadowMap(e){const{camera:t,contentCamera:r}=this._bindParameters,i=this._renderContext.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this.renderAllGeometry(U.ViewshedShadow),this._ensureBindParametersCamera(t,r),this._bindParameters.camera.setGLViewport(this._rctx),this._renderContext.output=i}_renderOpaqueAndTransparentGeometry(e){this._renderContext.output=e,this._renderOpaqueGeometry(),this._renderTransparentGeometry()}_renderGeometryWithNormals(e){this._renderContext.output=e,this._plugins.render(this._pluginInput,...Ne),this._renderTransparentTerrain()}_renderGeometryWithoutNormals(e){this._renderContext.output=e,this._plugins.render(this._pluginInput,...De)}_precompileOpaqueGeometry(){this._plugins.precompile(...ye)}_renderOpaqueGeometry(){this._plugins.render(this._pluginInput,...ye)}_renderTransparentGeometry(){this._plugins.render(this._pluginInput,...xe)}get _hasTransparentTerrain(){return this._plugins.produces(U.Color,le.TRANSPARENT_TERRAIN)}_renderTransparentTerrain(){const e=()=>this._plugins.render(this._pluginInput,le.TRANSPARENT_TERRAIN);if(!v(this._renderContext.output))return void e();const t=this._framebufferSize,r=this.fboCache.acquire(t.width,t.height,"transparent terrain");return this.renderToTargets(e,r,this._framebuffer.depth,w),r}get _needsHUDVisibility(){return this._plugins.produces(this._renderContext.output,le.OCCLUSION_PIXELS)}_renderHUDVisibility(){if(!this._needsHUDVisibility)return void(this._bindParameters.hudVisibility=d(this._bindParameters.hudVisibility));const{width:e,height:t}=this._framebufferSize;let r=this._bindParameters.hudVisibility;r?.fbo?.width===e&&r?.fbo?.height===t||(r?.release(),r=this.fboCache.acquire(e,t,"hud visibility",x.RGBA4),this._bindParameters.hudVisibility=r);const i=this._bindParameters.geometryDepth;r.attachDepth(i||this._framebuffer.depth),this._rctx.bindFramebuffer(r.fbo),this._rctx.clearFramebuffer([0,1,0,1]),this._plugins.render(this._pluginInput,le.OCCLUSION_PIXELS),r.detachDepth(),this._framebuffer.bind(),this.performanceInfo.advance(Ae.HUD_VISIBILITY)}_renderLineCallouts(e){if(this._bindParameters.hudRenderStyle=e,e===G.Occluded){const e=()=>this._plugins.render(this._pluginInput,le.LINE_CALLOUTS),t=this._framebufferSize,r=this.fboCache.acquireDepth(H,t.width,t.height,"line callouts");this.renderToTargets(e,this._framebuffer.color,r,void 0,!0,!0),r.release()}else this._plugins.render(this._pluginInput,le.LINE_CALLOUTS)}_precompileHUD(e){if(this._precompileHUDOutput(e),this._hasHighlights){const t=this._renderContext.output;this._renderContext.output=U.Highlight,this._precompileHUDOutput(e),this._renderContext.output=t}}_precompileHUDOutput(e){const t=this._bindParameters.hudRenderStyle;this._bindParameters.hudRenderStyle=e,this._oitEnabled&&v(this._renderContext.output)?(this._bindParameters.oitPass=re.ColorAlpha,this._plugins.precompile(...Me),this._bindParameters.oitPass=re.FrontFace,this._plugins.precompile(...Me),this._bindParameters.oitPass=re.NONE):this._plugins.precompile(...Me),this._bindParameters.hudRenderStyle=t}_renderHUD(e,t,r){if(this._pluginsHas.hudElements){if(this._oitEnabled){const i=this._renderOIT(Oe.HUD,r,e);this._rctx.bindFramebuffer(t.fbo),this._compositingHelper.compositePreMultipliedAlpha(this._bindParameters,i.getTexture()),i.release()}else if(this._renderContext.output=r,e===G.Occluded){const t=()=>this._renderHUDElements(e),r=this._framebufferSize,i=this.fboCache.acquireDepth(H,r.width,r.height,"hud");this.renderToTargets(t,this._framebuffer.color,i,void 0,!0,!0),i.release()}else t.acquireDepth(H),this._rctx.bindFramebuffer(t.fbo),this._renderHUDElements(e),t.detachDepth();this.performanceInfo.advance(e===G.Occluded?Ae.HUD_OCCLUDED:Ae.HUD)}}_renderHUDElements(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(this._pluginInput,...Me)}get _needsShadowHighlight(){return this.shadowsEnabled&&this._plugins.produces(U.ShadowHighlight,le.OPAQUE_MATERIAL)}_renderHighlightPrepass(){if(!this._hasHighlights)return;const{fboCache:e,_rctx:t,_bindParameters:r}=this,i=this._framebufferSize,{highlights:s}=r,a=e.acquire(i.width,i.height,"highlights",s.length>Q?x.RG8UI:x.R8UI);a.acquireDepth(Ee),t.bindFramebuffer(a.fbo);const{gl:n}=t;return n.clearBufferuiv(n.COLOR,0,[0,0,0,0]),this._renderContext.output=U.Highlight,t.bindFramebuffer(a.fbo),W(t,e,i,r,(()=>this._renderHighlightGeometries())),this.performanceInfo.advance(Ae.HIGHLIGHTS),a}_renderHighlightGeometries(){this._plugins.render(this._pluginInput,...Le),this._rctx.clear(Se.DEPTH),this._renderHUDElements(G.Both)}get _needsShadowAccumulation(){return this._shadowAccumulator.accumulating}_renderShadowAccumulation(e,t,r){this._needsShadowAccumulation&&this._bindParameters.depth&&this._shadowAccumulator.renderAccumulation(this._bindParameters.depth,e,t,r)&&this.performanceInfo.advance(Ae.ACCUMULATED_SHADOWS)}_precompileTransparentGeometry(){this._oitEnabled&&v(this._renderContext.output)?(this._bindParameters.oitPass=re.ColorAlpha,this._plugins.precompile(...xe),this._bindParameters.oitPass=re.FrontFace,this._plugins.precompile(...xe),this._bindParameters.oitPass=re.NONE):this._plugins.precompile(...xe)}_renderOIT(e,t,r=G.Both){const i=e===Oe.HUD,s=this._framebufferSize,a=i?this.fboCache.acquire(s.width,s.height,"oit hud composite"):null,n=i?()=>this._renderHUDElements(r):()=>this._renderTransparentGeometry(),h=this._bindParameters,o=this._renderContext.output;this._renderContext.output=t,h.oitPass=re.ColorAlpha;const d=a?"oit hud color+alpha":"oit color+alpha",l=t===U.ColorEmission,_=this.fboCache.acquire(s.width,s.height,d,l?x.RGBA16F:x.RGBA16F_NEAREST);l&&_.acquireColor(Ie,x.RGBA16F,"emissive"),_.acquireColor(l?Ce:Ie,x.R16F),a||_.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(_.fbo),this._rctx.clearFramebuffer([0,0,0,1]),l&&this._rctx.clearBuffer(1,I),n(),_.detachDepth(),h.oitPass=re.FrontFace;const u=this.fboCache.acquire(s.width,s.height,a?"oit hud front":"oit front");return l&&u.acquireColor(Ie,x.RGBA16F,"emissive"),a?u.acquireDepth(H):u.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(u.fbo),this._rctx.clearFramebuffer(w,!!a),n(),u.detachDepth(),h.oitPass=re.NONE,a?(this._rctx.bindFramebuffer(a.fbo),this._rctx.setClearColor(0,0,0,1e-13),this._rctx.clear(Se.COLOR)):this._framebuffer.bind(),this._oitblend??=new k(this._techniques),this._oitblend.blend(this._rctx,_,u,h,l),a?.detachDepth(),u.release(),_.release(),this._renderContext.output=o,a}_renderTransparentEnvironment(){this._shadowAccumulator.render(this._bindParameters),this.performanceInfo.advance(Ae.APPLY_ACCUMULATED_SHADOWS),this._framebuffer.bind(),this._plugins.render(this._pluginInput,le.TRANSPARENT_MATERIAL_WITHOUT_DEPTH),this.performanceInfo.advance(Ae.TRANSPARENT_MATERIAL_WITHOUT_DEPTH)}_renderPlugins(e,t){this._plugins.produces(this._renderContext.output,e)&&(this._plugins.render(this._pluginInput,e),this.performanceInfo.advance(t))}_renderNodes(e,t,r=!1){if(t.setName(e),this._pluginInput.set(e,t),!this._nodes.produces(e))return r&&this.performanceInfo.advance(e),t;const i=this._nodes.render(t,this._pluginInput,this._releaseNormals);return this.performanceInfo.advance(e),i}_blitFBO(e,t=L,r=!0){return this._blit??=new B(this._techniques),this._blit.blit(this._rctx,e,t,this._bindParameters),this._pluginInput.set(e.name,t),r&&e.release(),t}_ensureBindParametersCamera(e,t){this._bindParameters.camera=e,this._bindParameters.contentCamera=t}_ensureBindParametersSSR(e){if(this._bindParameters.ssr.lastFrameColor){null==this._ssrEnableTime&&(this._ssrEnableTime=e),this._renderContext.lastFrameCamera.equals(this._bindParameters.camera)?this._reprojectionMatrix=P:(T(Ue,this._bindParameters.camera.viewMatrix),T(Fe,this._bindParameters.camera.projectionMatrix),E(ve,Ue,Fe),E(ve,this._renderContext.lastFrameCamera.viewMatrix,ve),E(ve,this._renderContext.lastFrameCamera.projectionMatrix,ve),this._reprojectionMatrix=ve);const t=this.stage.view.qualitySettings.fadeDuration;this._bindParameters.ssr.fadeFactor=t>0?Math.min(t,e-this._ssrEnableTime)/t:1,this._bindParameters.ssr.fadeFactor<1&&this._requestRender()}else this._reprojectionMatrix=P,this._ssrEnableTime=null}addRenderNode(e){this._nodes.add(e),this._requestRender()}removeRenderNode(e){this._nodes.remove(e),this._requestRender()}updateLighting(e,t,r,i){this._bindParameters.updateLighting(e,t,r,i),this._requestRender(X.UPDATE)}get usedMemory(){return{fbos:this.fboCache.usedMemory,plugins:this._plugins.usedMemory,edges:this.edgeView?.usedMemory??0}}renderToTargets(e,t,r,i,s=!1,a=!1){t.attachDepth(r),this._rctx.bindFramebuffer(t.fbo),this._rctx.clearFramebuffer(i,s,a),e(),t.detachDepth()}get test(){}};var Oe;e([f({readOnly:!0})],we.prototype,"fullResolutionAtmosphere",null),e([f()],we.prototype,"_edgeView",void 0),e([f()],we.prototype,"updating",null),we=e([b("esri.views.3d.webgl-engine.lib.Renderer")],we),function(e){e[e.Geometry=0]="Geometry",e[e.HUD=1]="HUD"}(Oe||(Oe={}));const Ne=[le.INTEGRATED_MESH,le.OPAQUE_TERRAIN,le.OPAQUE_MATERIAL,le.TRANSPARENT_MATERIAL],De=[le.OPAQUE_MATERIAL_WITHOUT_NORMALS,le.TRANSPARENT_MATERIAL_WITHOUT_NORMALS],ye=[le.INTEGRATED_MESH,le.OPAQUE_TERRAIN,le.OPAQUE_MATERIAL,le.OPAQUE_MATERIAL_WITHOUT_NORMALS],xe=[le.TRANSPARENT_MATERIAL,le.TRANSPARENT_MATERIAL_WITHOUT_NORMALS],He=[le.OPAQUE_MATERIAL,le.TRANSPARENT_MATERIAL,le.TRANSPARENT_MATERIAL_WITHOUT_DEPTH],Me=[le.LINE_CALLOUTS_HUD_DEPTH,le.HUD_MATERIAL,le.LABEL_MATERIAL],Le=[le.TRANSPARENT_MATERIAL,le.TRANSPARENT_MATERIAL_WITHOUT_NORMALS,le.OPAQUE_MATERIAL,le.OPAQUE_MATERIAL_WITHOUT_NORMALS,le.TRANSPARENT_TERRAIN,le.INTEGRATED_MESH,le.OPAQUE_TERRAIN],Fe=R(),Ue=R(),ve=R();function Ge(e){return t=>e.immediate.schedule(t)}export{we as Renderer};
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import{update as t}from"../../../../core/arrayUtils.js";import{createTask as r}from"../../../../core/asyncUtils.js";import{unitRGBAFromColor as i}from"../../../../core/colorUtils.js";import has from"../../../../core/has.js";import{clamp as s,lerp as a}from"../../../../core/mathUtils.js";import{removeMaybe as n,abortMaybe as h,destroyMaybe as o,releaseMaybe as d}from"../../../../core/maybe.js";import{throwIfAborted as _}from"../../../../core/promiseUtils.js";import{watch as l,syncAndInitial as p,initial as u,sync as m}from"../../../../core/reactiveUtils.js";import{signal as c}from"../../../../core/signal.js";import{Milliseconds as g}from"../../../../core/time.js";import{property as f}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import{subclass as b}from"../../../../core/accessorSupport/decorators/subclass.js";import{equals as A,invert as T,multiply as E}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as P,create as R}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{s as S}from"../../../../chunks/vec42.js";import{ZEROS as I}from"../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{fromValues as C,ZEROS as w}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{pruneIndexArrays as O}from"../../../../geometry/support/Indices.js";import{RenderCategory as N,InternalRenderCategory as D}from"../../webgl.js";import{debugFlags as y}from"../../support/debugFlags.js";import{ColorFormat as x,DepthRenderbuffer16f as H}from"../../webgl/formats.js";import{FBOCache as M,defaultWebGLFBO as L}from"../core/FBOCache.js";import{RenderPassManager as F}from"../core/renderPasses/RenderPassManager.js";import{ShaderOutput as U,isColorOrColorEmission as v}from"../core/shaderLibrary/ShaderOutput.js";import{HUDRenderStyle as G}from"../core/shaderLibrary/hud/HUDRenderStyle.js";import{distanceFadeEnd as q}from"../core/shaderLibrary/shading/ScreenSpaceConstants.js";import{RenderNodes as V}from"../effects/RenderNodes.js";import{RenderPluginManager as j}from"../effects/RenderPluginManager.js";import{Blit as B}from"../effects/blit/Blit.js";import{maxHighlightsPerChannel as Q,renderHighlightBuffer as W}from"../effects/highlight/Highlight.js";import{OITBlend as k}from"../effects/transparency/OITBlend.js";import{AnimationTimer as z}from"./AnimationTimer.js";import{AnimationTimeStep as Y}from"./AnimationTimeStep.js";import{RenderRequestType as X}from"./basicInterfaces.js";import{BoundingInfo as K}from"./BoundingInfo.js";import{DepthRange as J}from"./DepthRange.js";import{depthRangeFromScene as Z}from"./depthRangeUtils.js";import{hudFragmentOpacityParameters as $}from"./hudFragmentOpacityParameters.js";import{MainFramebuffer as ee}from"./MainFramebuffer.js";import{RenderOccludedFlag as te}from"./Material.js";import{OITPass as re}from"./OITPass.js";import{RenderContext as ie,defaultRenderOccludedMask as se}from"./RenderContext.js";import{RendererBase as ae}from"./RendererBase.js";import{RendererTarget as ne}from"./rendererUtils.js";import{setupFeatureDefaults as he,RenderFeature as oe}from"./RenderFeature.js";import{RenderPluginInput as de}from"./RenderPluginInput.js";import{RenderSlot as _e}from"./RenderSlot.js";import{ShadowAccumulator as le}from"./ShadowAccumulator.js";import{ShadowMap as pe,SnapshotSlot as ue}from"./ShadowMap.js";import me from"./SliceHelper.js";import{Transparency as ce}from"./edgeRendering/interfaces.js";import{MergedRenderer as ge}from"../materials/renderers/MergedRenderer.js";import{RenderSceneResult as fe}from"../parts/renderUtils.js";import{RendererPerformanceInfo as be,PerformanceCategory as Ae}from"../statistics/RendererPerformanceInfo.js";import{RenderState as Te}from"../../../support/RenderState.js";import{DepthStencilAttachment as Ee,PixelFormat as Pe,PixelType as Re,FramebufferBit as Se,ColorAttachment1 as Ie,ColorAttachment2 as Ce}from"../../../webgl/enums.js";let we=class extends ae{constructor(e,t,r,s,a,n){super({stage:e}),this._techniques=r,this._rctx=s,this._compositingHelper=a,this._requestRender=n,this._pluginsHas={hudElements:!1,water:!1},this.renderPassManager=new F,this._isRendering=!1,this._inGlobeView=!1,this._backgroundColor=C(0,0,0,1),this._sliceHelper=new me,this._blit=null,this._oitblend=null,this._state=c(Te.IDLE),this._highQualityTransparencyEnabled=!0,this._ssrEnabled=!1,this._hasAnimations=!1,this._animationTimestep=new Y,this._loadEdgeViewTask=null,this._edgeViewCallbacks=[],this._reprojectionMatrixVersion=c(0),this._lastFrameTime=g(0),this._renderHiddenTransparentEdges=()=>{},this._pluginInput=new de,this._releaseNormals=e=>{e.some((({name:e})=>"normals"===e))&&this._pluginInput.release("normals")},this._debugNeedsDepth=!1,this.fboCache=new M(s),this._renderStateFeatures=c(he(!has("disable-feature:high-quality-idle"),e.view.qualityProfile)),this._framebuffer=new ee(this.fboCache),this.performanceInfo=new be(this._rctx),this._shadowMap=new pe(this.fboCache,e.viewingMode),this._shadowAccumulator=new le(this.fboCache,r,e,(e=>{const t=this.shadowsEnabled;this._shadowMap.enabled=!0,this._ensureBindParametersCamera(e.camera,e.contentCamera),this._plugins.prepareRender(),this._shadowMap.enabled=t}),((t,r,i)=>{const s=e.view.qualitySettings.maximumPixelRatio;t.shadowMap.start(t.camera,r,i,!0,s),this._renderShadowCascades(U.Shadow,t.shadowMap),t.shadowMap.finish(),t.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(t.camera,t.contentCamera)}),n),this._renderContext=new ie(this._rctx,this._shadowMap,r),this._nodes=new V(this._renderContext),this._plugins=new j({renderContext:this._renderContext,techniques:r,materials:t,requestRender:n,controller:e,fbos:this.fboCache,isFeatureEnabled:e=>this.isFeatureEnabled(e)}),this._plugins.add(this.renderPassManager),this.addHandles([l((()=>e.view.state.camera),(()=>n()),p),l((()=>y.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES),(e=>{this._renderHiddenTransparentEdges=e?()=>this._renderEdges(ce.TRANSPARENT):()=>{},n()}),u),l((()=>e.view.environment.background?.color),(e=>{const t=e?i(e):w;S(this._backgroundColor,t[0]*t[3],t[1]*t[3],t[2]*t[3],t[3]),n()}),p),l((()=>e.view.state.camera.relativeElevation),(e=>this._inGlobeView=(e??1/0)>=q),p),l((()=>this._bindParameters.clouds.fadeFactor),(()=>this._bindParameters.fadeLighting()),m),l((()=>this._bindParameters.clouds.data?.state),(()=>n()),m),l((()=>e.view.state.highlights),(e=>{this._bindParameters.highlights=e,n()}),u)])}destroy(){this._gpuTimerHandle=n(this._gpuTimerHandle),this._nodes.destroy(),this._framebuffer.dispose(),this._shadowMap.dispose(),this._shadowAccumulator.dispose(),this._loadEdgeViewTask=h(this._loadEdgeViewTask),this._edgeView=o(this._edgeView),this.renderPassManager.dispose(),this._releaseFBOs(),this._disposeOffscreenBuffers(),this.fboCache.destroy(),this._plugins.destroy(),this._blit=null,this._oitblend=null,K.prune(),ge.prune(),O()}get renderContext(){return this._renderContext}get _bindParameters(){return this._renderContext.bind}get _framebufferSize(){return this._framebuffer.size}updateRenderFeatures(e=null,t=!has("disable-feature:high-quality-idle")){this._renderStateFeatures.value=he(t,e),this._requestRender()}isFeatureEnabled(e,t=this._state.value){return this._renderStateFeatures.value.get(t,e)??!1}setFeatureEnabled(e,t,r){this._renderStateFeatures.mutate((i=>i.set(t,e,r))),this._requestRender()}get _highQualityTransparency(){return this._highQualityTransparencyEnabled||this.isFeatureEnabled(oe.HighQualityTransparency)}get hasReflections(){return this._pluginsHas.water&&(this._ssrEnabled||this.isFeatureEnabled(oe.WaterReflection))}get _hasHighlights(){return this._plugins.produces(U.Highlight,_e.OPAQUE_MATERIAL,_e.TRANSPARENT_MATERIAL,_e.DRAPED_MATERIAL,_e.HUD_MATERIAL,_e.LABEL_MATERIAL)}hasHighlight(e){return this._plugins.hasHighlight(e)}get _hasHUDHighlights(){return this._plugins.produces(U.Highlight,_e.HUD_MATERIAL,_e.LABEL_MATERIAL)}get hasSSAO(){return(this.stage.view.qualitySettings.ambientOcclusion||this.isFeatureEnabled(oe.SSAO))&&!this._inGlobeView}get hasSMAA(){return this.stage.view.qualitySettings.antialiasingEnabled||this.isFeatureEnabled(oe.Antialiasing)}get fullResolutionAtmosphere(){return this.stage.view.qualitySettings.highResolutionAtmosphere||this.isFeatureEnabled(oe.HighResolutionAtmosphere)}_releaseFBOs(){this._bindParameters.ssr.lastFrameColor=d(this._bindParameters.ssr.lastFrameColor),this._bindParameters.terrainDepth=d(this._bindParameters.terrainDepth),this._bindParameters.geometryDepth=d(this._bindParameters.geometryDepth)}_disposeOffscreenBuffers(){this._framebuffer.dispose(),this._disposeBindBuffers()}_disposeBindBuffers(){this._shadowMap.disposeOffscreenBuffers(),this._bindParameters.depth=d(this._bindParameters.depth),this._bindParameters.hudVisibility=d(this._bindParameters.hudVisibility)}get updating(){return this._loadEdgeViewTask&&!this._loadEdgeViewTask.finished||this._edgeView?.updating||this._shadowAccumulator.running||this._plugins.updating||!this.isCameraFinal}loadEdgeView(){return this._loadEdgeViewTask||(this._loadEdgeViewTask=r((async e=>{const{EdgeView:t}=await import("./edgeRendering/EdgeView.js");_(e);const r=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:Ge(this.stage.view.resourceController)});return this.addHandles(l((()=>r.updating),(()=>this._requestRender()),m)),this._requestRender(),this._edgeViewCallbacks.forEach((e=>e(r))),this._edgeViewCallbacks.length=0,r}))),this._loadEdgeViewTask.promise}withEdgeView(e){this.loadEdgeView(),null==this._edgeView?this._edgeViewCallbacks.push(e):e(this._edgeView)}get edgeView(){return this._edgeView}get isCameraFinal(){return this._reprojectionMatrixVersion.value>=0&&A(this._bindParameters.ssr.reprojectionMatrix,P)}set _reprojectionMatrix(e){t(this._bindParameters.ssr.reprojectionMatrix,e)&&this._reprojectionMatrixVersion.value++}get shadowsEnabled(){return!!this._shadowMap?.enabled}setParameters(e){const{_shadowMap:t,_bindParameters:r}=this;if(void 0!==e.qualitySettings?.reflections&&this._ssrEnabled!==e.qualitySettings.reflections&&(this._ssrEnabled=e.qualitySettings.reflections,this._requestRender()),void 0!==e.shadowMap&&this._shadowMap.enabled!==e.shadowMap&&(this._shadowMap.enabled=e.shadowMap,this._requestRender()),void 0!==e.shadowMapMaxCascades&&t.maxCascades!==e.shadowMapMaxCascades&&(t.maxCascades=e.shadowMapMaxCascades,this._requestRender()),null!=e.environment){null!=e.environment.weather&&(this._bindParameters.weather=e.environment.weather,this._bindParameters.weatherVisible=!!e.weatherVisible);const t="virtual"!==e.environment.lighting.type;r.enableFillLights!==t&&(r.enableFillLights=t,this._requestRender())}void 0!==e.highQualityTransparency&&this._highQualityTransparencyEnabled!==e.highQualityTransparency&&(this._highQualityTransparencyEnabled=e.highQualityTransparency,this._requestRender()),void 0!==e.shadowCast&&this._shadowAccumulator.setOptions(e.shadowCast)}set slicePlane(e){this._sliceHelper.plane!==e&&(this._sliceHelper.plane=e,this._requestRender())}get plugins(){return this._plugins}get _hasOITSupport(){return this._rctx.driverTest.floatBufferBlend.result}get _oitEnabled(){return this._highQualityTransparency&&this._hasOITSupport}commit(e,t){return this._isRendering&&console.warn("Renderer.modify called while rendering"),!!super.commit(e,t,this._plugins.context)&&(this.updateHasFlags(),!0)}rendererAdded(e){this._plugins.add(e)}rendererRemoved(e){this._plugins.remove(e)}updateHasFlags(){const has=this._pluginsHas;has.hudElements=this._plugins.produces(U.Color,...Me),has.water=this._plugins.produces(U.Normal,_e.DRAPED_WATER),this._bindParameters.hasOccludees=this._plugins.hasOccludees,this._requestRender()}updateAnimation(e,t){this._animationTimer??=new z(e.camera,t),this._animationTimer.advance(e.camera,t,this._animationTimeDilation);const r=this._hasAnimations;return this._hasAnimations=this._plugins.updateAnimation(this._animationTimer),this._hasAnimations=this._nodes.updateAnimation(this._animationTimer)||this._hasAnimations,this._hasAnimations!==r&&(this._gpuTimerHandle=r?n(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,r=ne.Default,i=!1){try{return this._isRendering=!0,this._render(e,t,r,i)}catch(s){console.error(`Exception during rendering: ${s}`)}finally{this._isRendering=!1}return new fe(this._pluginInput.get(N.FINAL),null)}_updateHUDOccludedFragmentOpacity(e,t){const{idleOpacity:r,navigatingOpacity:i,maxDelta:n,tiltFadeStart:h,tiltFadeEnd:o,altitudeStart:d,altitudeEnd:_}=$,l=this.stage.view,p=l.stateManager.camera,u=l.qualitySettings.fadeDuration,m=e===Te.IDLE?r:i,c=s((p.tilt-h)/(o-h),0,1),g=s(((p.position.z??0)-d)/(_-d),0,1),f=a(a(1,m,c),1,g),b=this._bindParameters.hudOccludedFragmentOpacity;if(u<=0||b===f||0===this._lastFrameTime||this._lastFrameTime>t)return this._bindParameters.hudOccludedFragmentOpacity=f,void(this._lastFrameTime=t);const A=t-this._lastFrameTime;this._lastFrameTime=t;const T=Math.max(1-r,Math.abs(r-i)),E=Math.min(T*A/u,n);E>=Math.abs(f-b)?this._bindParameters.hudOccludedFragmentOpacity=f:(this._bindParameters.hudOccludedFragmentOpacity=b+Math.sign(f-b)*E,this._requestRender())}_render(e,t,r=ne.Default,i){this.performanceInfo.startFrame(),this.fboCache.frameStart(),this.fboCache.interactive=r===ne.Default,this._disposeBindBuffers();const{camera:s,contentCamera:a,mode:n,alignPixelEnabled:h}=e;this._state.value=n;const o=this._nodes.produces("magnifier-color"),_=this._nodes.produces(N.FINAL),l=this._nodes.require("emissive",D.TRANSPARENT_ENVIRONMENT,N.COMPOSITE,N.FINAL)>0&&this._plugins.hasEmissions,p=l?U.ColorEmission:U.Color;this._renderContext.time=t,this._renderContext.output=p,this._bindParameters.oitPass=re.NONE,this._bindParameters.alignPixelEnabled=h,this._bindParameters.decorations=!i,this._bindParameters.mainDepth=null,this._bindParameters.slicePlane=this._sliceHelper.plane,this._bindParameters.viewshedEnabled=this._nodes.produces(D.VIEWSHED),this._renderOverlay(t),s.setGLViewport(this._rctx);const u=this._framebuffer,m=u.initialize(s.fullWidth,s.fullHeight,this._backgroundColor,l);this.hasReflections?(m?.setName("last frame color"),this._bindParameters.ssr.lastFrameColor=m):m?.release(),this._ensureBindParametersCamera(s,a),this._updateHUDOccludedFragmentOpacity(n,t),this._plugins.prepareRender(),this._bindParameters.shadowHighlightsVisible=this._needsShadowHighlight&&!i;const c=this._highQualityTransparency&&this._hasTransparentTerrain,g=this._plugins.produces(U.Color,...xe);this._precompilePrepasses(),this.performanceInfo.advance(Ae.PREPARE);const f=this._computeDepthRange(s);this._renderShadowMap(s,this._bindParameters.lighting.mainLight.direction,f),this._ensureBindParametersCamera(s,a),this._pluginInput.set("normals",this._renderNormals()),this._renderRemainingGeometryDepth(),this._renderShadowAccumulation(f,s,a),this._ensureBindParametersSSR(t),this._precompileShaders(c,g,p),this._renderContext.output=p,u.bind(),this._bindParameters.mainDepth=u.depth.attachment;const b=this.plugins.produces(U.Color,...ye);b&&this._renderOpaqueGeometry(),u.update((e=>this._renderNodes(N.OPAQUE,e,b))),this.fboCache.debugCallback?.(N.OPAQUE,u.color.fbo),u.update((e=>this._renderNodes(D.OPAQUE_ENVIRONMENT,e))),this.fboCache.debugCallback?.(D.OPAQUE_ENVIRONMENT,u.color.fbo),this._renderTerrainDepth(c),this._renderEdges(ce.OPAQUE),u.bind(),this._renderPlugins(_e.VOXEL,Ae.VOXEL),this._renderHiddenTransparentEdges(),g&&(this._oitEnabled?this._renderOIT(Oe.Geometry,p):this._renderTransparentGeometry()),u.update((e=>this._renderNodes(N.TRANSPARENT,e,g))),this.fboCache.debugCallback?.(N.TRANSPARENT,u.color.fbo),this._renderGeometryDepth(c),this._renderHUDVisibility(),c||this._plugins.render(this._pluginInput,_e.LINE_CALLOUTS),this._renderEdges(ce.TRANSPARENT);const A=this._hasTransparentTerrain?this._renderTransparentTerrain():null;A&&(this.performanceInfo.advance(Ae.TRANSPARENT_TERRAIN),this._bindParameters.hudVisibility&&(c?this._renderLineCallouts(G.Occluded):(this._rctx.bindFramebuffer(this._bindParameters.hudVisibility?.fbo),this._compositingHelper.compositeHUD(this._bindParameters,A.getTexture())),this._renderHUD(G.Occluded,u.color,p))),this._bindParameters.cullAboveTerrain=!1,A&&(u.bind(),this._compositingHelper.compositePreMultipliedAlpha(this._bindParameters,A.getTexture()),A.release(),c&&(this._renderEdges(ce.OPAQUE),g&&(this._oitEnabled?this._renderOIT(Oe.Geometry,p):this._renderTransparentGeometry(),this.performanceInfo.advance(Ae.TRANSPARENT)),this._renderEdges(ce.TRANSPARENT))),this._bindParameters.ssao=d(this._bindParameters.ssao),c&&this._renderLineCallouts(G.NotOccluded),this._bindParameters.terrainDepthTest=!1,this._renderTransparentEnvironment(),this._pluginInput.set(D.FOCUSAREA,this._renderFocusAreaGeometry()),u.update((e=>this._renderNodes(D.TRANSPARENT_ENVIRONMENT,e))),u.update((e=>this._renderNodes(D.VIEWSHED,e))),u.update((e=>this._renderNodes(D.LASERLINES,e))),u.update((e=>this._renderNodes(D.FOCUSAREA_COLOR,e))),u.update((e=>this._renderNodes(D.OCCLUDED,e))),this._pluginInput.set("highlights",this._renderHighlightPrepass());const T=r===ne.ObjectAndLayerID?this._renderObjectAndLayerIdColor():null;u.update((e=>this._renderNodes(N.COMPOSITE,e))),this._pluginInput.release(D.FOCUSAREA);const E=!(r!==ne.Default||_||o&&!i),P=this._pluginInput.get(N.COMPOSITE),R=E?L:this.fboCache.acquire(P.fbo.width,P.fbo.height,D.ANTIALIASING),S=this._nodes.produces(D.ANTIALIASING)?this._renderNodes(D.ANTIALIASING,R):this._blitFBO(P,R,!1);let I;this._pluginInput.set(D.ANTIALIASING,S),this._hasHUDHighlights?(this._renderHUD(G.NotOccluded,S,p),I=this._renderNodes(D.HIGHLIGHTS,S)):(I=this._renderNodes(D.HIGHLIGHTS,S),this._renderHUD(G.NotOccluded,I,p));const C=this._renderNodes(D.MAGNIFIER,I);return o&&!i&&r===ne.Default&&!_&&this._blitFBO(C),_?(C.attachDepth(u.depth),this._blitFBO(this._renderNodes(N.FINAL,C)),C.detachDepth()):this._pluginInput.set(N.FINAL,C),this._pluginInput.release("highlights"),this.onPostRender&&this.onPostRender(),this._releaseFBOs(),u.releaseDepth(),this._renderContext.lastFrameCamera.copyFrom(this._bindParameters.camera),this.fboCache.frameEnd(),this.performanceInfo.finishFrame(),r!==ne.Default&&(this._releaseFBOs(),this._disposeOffscreenBuffers()),new fe(this._pluginInput.get(N.FINAL),T)}_precompileShaders(e,t,r){++this._plugins.context.techniques.precompiling,this._renderContext.output=r,this._precompileOpaqueGeometry(),this._nodes.precompile(D.OPAQUE_ENVIRONMENT),this._bindParameters.terrainDepthTest=e,this._bindParameters.cullAboveTerrain=e,this._renderContext.output=U.Depth,this._plugins.precompile(_e.TRANSPARENT_TERRAIN),e&&(this._precompileOpaqueGeometry(),this._precompileTransparentGeometry()),this._renderContext.output=r,this._plugins.precompile(_e.TRANSPARENT_TERRAIN),t&&(this._precompileTransparentGeometry(),this._hasTransparentTerrain&&(this._bindParameters.cullAboveTerrain=!1,this._precompileTransparentGeometry(),this._bindParameters.cullAboveTerrain=e)),this._nodes.precompile(D.FOCUSAREA),this._needsHUDVisibility&&this._plugins.precompile(_e.OCCLUSION_PIXELS),this._plugins.precompile(_e.LINE_CALLOUTS),this._precompileHUD(G.Occluded),this._bindParameters.terrainDepthTest=!1,this._bindParameters.cullAboveTerrain=!1,this._nodes.precompile(D.VIEWSHED,D.LASERLINES,D.FOCUSAREA_COLOR,D.OCCLUDED,D.ANTIALIASING,D.HIGHLIGHTS);const i=this._bindParameters;i.highlightMixTexture=i.highlights.length>1?this._rctx.emptyTexture:null,this._precompileHUD(G.NotOccluded),this._hasHighlights&&(i.highlights.forEach(((e,t)=>{i.highlightLevel=t,this._precompileAllGeometry(U.Highlight)})),i.highlightLevel=null),i.highlightMixTexture=null,this._nodes.precompile(N.COMPOSITE,D.MAGNIFIER),this._shadowAccumulator.precompile(),this._plugins.precompile(_e.TRANSPARENT_MATERIAL_WITHOUT_DEPTH),--this._plugins.context.techniques.precompiling}_renderFocusAreaGeometry(){if(!this._nodes.produces(D.FOCUSAREA))return null;const{width:e,height:t}=this._framebufferSize;let r=this.fboCache.acquire(e,t,D.FOCUSAREA);return r=this._nodes.render(r,this._pluginInput),this.performanceInfo.advance(Ae.FOCUS_AREA_MASK),r}_renderObjectAndLayerIdColor(){if(!this._nodes.produces("olid"))return null;const e=this._renderContext.output;++this._techniques.precompiling;const t=this._framebufferSize;let r=this.fboCache.acquire(t.width,t.height,"olid");return r.acquireDepth(Ee),r=this._nodes.render(r,this._pluginInput),--this._techniques.precompiling,this.performanceInfo.advance(Ae.OBJECT_AND_LAYER_ID_COLOR),this._renderContext.output=e,r}finish(e){this._hasAnimations||this._animationTimestep.clear();const t=this.performanceInfo.gpuSamplingEnabled,r=e===X.BACKGROUND;if(r||t){const e=r?this.performanceInfo.elapsedTime:0;let i=0;t?i=this.performanceInfo.totalGPUTimeSampler.last:this._rctx.gl.finish();const s=Math.max(e,i);this._animationTimestep.frame(s,r)}}readMainDepth(e,t){const{mainDepth:r,camera:i}=this._bindParameters;if(!r)return;const s=this.fboCache.acquire(this._framebufferSize.width,this._framebufferSize.height,"linear-depth");this._rctx.bindFramebuffer(s.fbo),i.setGLViewport(this._rctx),this._rctx.setScissorRect(e[0],e[1],e[2],e[3]),this._rctx.setScissorTestEnabled(!0),this._rctx.clearFramebuffer(w),this._compositingHelper.blitDepthToLinearDepth(this._bindParameters,r),this._rctx.setScissorTestEnabled(!1),this._rctx.setScissorRect(0,0,this._rctx.gl.canvas.width,this._rctx.gl.canvas.width),s.fbo?.readPixels(e[0],e[1],e[2],e[3],Pe.RGBA,Re.UNSIGNED_BYTE,t),s.release()}readHUDVisibility(e,t,r,i,s){this._bindParameters.hudVisibility?.fbo?.readPixels(e,t,r,i,Pe.RGBA,Re.UNSIGNED_BYTE,s)}readAccumulatedShadow(e){return this._shadowAccumulator.readAccumulatedShadow(e[0],e[1])}_renderEdges(e){const t=this._edgeView;if(!t?.shouldRender())return;const r=this._framebufferSize,i=this.fboCache.acquire(r.width,r.height,"edges"),s=()=>t.render(this._bindParameters,e),a=this._bindParameters.geometryDepth;this.renderToTargets(s,i,a??this._framebuffer.depth,w),this._framebuffer.bind(),this._compositingHelper.composite(this._bindParameters,i.getTexture()),i.release(),this.performanceInfo.advance(e===ce.OPAQUE?Ae.OPAQUE_EDGES:Ae.TRANSPARENT_EDGES)}_renderOverlay(e){this._bindParameters.overlay=this.overlay?.render(e),this._bindParameters.overlay&&this.performanceInfo.advance(Ae.OVERLAY)}_renderShadowMap(e,t,r){if(!this.shadowsEnabled)return;const i=this._shadowMap;i.start(e,t,r,this.isFeatureEnabled(oe.HighResolutionShadows),this.stage.view.qualitySettings.maximumPixelRatio),this._needsShadowHighlight?(this._renderShadowCascades(U.ShadowHighlight,this._shadowMap),i.moveSnapshot(ue.Highlight),this._renderShadowCascades(U.ShadowExcludeHighlight,this._shadowMap),i.copySnapshot(ue.ExcludeHighlight),this._renderShadowCascades(U.ShadowHighlight,this._shadowMap)):this._renderShadowCascades(U.Shadow),i.finish(),e.setGLViewport(this._rctx),this.performanceInfo.advance(Ae.SHADOW_MAP)}_precompileShadowCascades(e){for(const t of this._shadowMap.cascades)t.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(t.camera,t.camera),this._precompileAllGeometry(e)}_renderShadowCascades(e,t=this._shadowMap){for(const r of t.cascades)r.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(r.camera,r.camera),this.renderAllGeometry(e)}get _needsDepth(){return this._plugins.consumes(U.Depth)||this._nodes.requireGeometryDepth()||this.hasReflections||this._needsShadowHighlight||this._needsShadowAccumulation||this._debugNeedsDepth}_renderRemainingGeometryDepth(){const e=this._pluginInput.get("normals");if(e){const t=this._needsDepth?e.getAttachment(Ee):null;t?.retain(),this._pluginInput.set(D.SSAO,this._renderSSAO()),this._renderGeometryWithoutNormalsDepth(t)}else this._renderAllGeometryDepth()}_renderGeometryWithoutNormalsDepth(e){if(!this._needsDepth||!e)return void(this._bindParameters.depth=d(this._bindParameters.depth));const t=this._framebufferSize,r=this.fboCache.acquire(t.width,t.height,"depth");r.attachDepth(e),e.release(),this._rctx.bindFramebuffer(r.fbo),this._rctx.clear(Se.STENCIL),this._renderGeometryWithoutNormals(U.Depth),d(this._bindParameters.depth),this._bindParameters.depth=r.obtainDepthTexture(),r.release(),this.performanceInfo.advance(Ae.DEPTH)}_renderAllGeometryDepth(){if(!this._needsDepth)return void(this._bindParameters.depth=d(this._bindParameters.depth));const e=this._framebufferSize,t=this.fboCache.acquire(e.width,e.height,"depth").acquireDepth(Ee);this._rctx.bindFramebuffer(t.fbo),this._rctx.clear(Se.DEPTH|Se.STENCIL),this.renderAllGeometry(U.Depth),d(this._bindParameters.depth),this._bindParameters.depth=t.obtainDepthTexture(),t.release(),this.performanceInfo.advance(Ae.DEPTH)}_renderTerrainDepth(e){if(this._bindParameters.terrainDepthTest=e,this._bindParameters.cullAboveTerrain=e,!e)return void(this._bindParameters.terrainDepth=d(this._bindParameters.terrainDepth));const t=this._renderContext.output;this._renderContext.output=U.Depth;const r=this._framebufferSize,i=this.fboCache.acquire(r.width,r.height,"terrain depth").acquireDepth(Ee);this._rctx.bindFramebuffer(i.fbo),this._rctx.clear(Se.DEPTH|Se.STENCIL),this._renderTransparentTerrain(),d(this._bindParameters.terrainDepth),this._bindParameters.terrainDepth=i.obtainDepthTexture(),this._renderContext.output=t,i.release()}_renderGeometryDepth(e){if(!e)return void(this._bindParameters.geometryDepth=d(this._bindParameters.geometryDepth));const t=this._renderContext.output,{width:r,height:i}=this._framebufferSize,s=this.fboCache.acquire(r,i,"geometry depth").acquireDepth(Ee);this._rctx.bindFramebuffer(s.fbo),this._rctx.clear(Se.DEPTH|Se.STENCIL),this._renderOpaqueAndTransparentGeometry(U.Depth),this._renderContext.output=t,d(this._bindParameters.geometryDepth),this._bindParameters.geometryDepth=s.obtainDepthTexture(),s.release()}get _needsDepthRange(){return this._shadowMap.enabled||this._needsShadowAccumulation}_computeDepthRange(e){if(!this._needsDepthRange)return J.zero;const t=Z(e,this._plugins.plugins,this.stage.layers);return t.union(this._plugins.queryDepthRange(e)),t.near=Math.max(e.near,t.near),t.far=Math.min(e.far,t.far),t}get _normalsRequired(){const e=this._nodes.require("normals",N.FINAL,N.COMPOSITE,N.OPAQUE,N.TRANSPARENT,D.VIEWSHED,D.LASERLINES);return(this.hasSSAO?1:0)+e}_precompilePrepasses(){this._normalsRequired&&this._precompileAllGeometry(U.Normal),this._needsDepth&&this._precompileAllGeometry(U.Depth),this.shadowsEnabled&&(this._needsShadowHighlight?(this._precompileShadowCascades(U.ShadowHighlight),this._precompileShadowCascades(U.ShadowExcludeHighlight),this._precompileShadowCascades(U.ShadowHighlight)):this._precompileShadowCascades(U.Shadow)),this._needsShadowAccumulation&&this._precompileAllGeometry(U.Shadow)}_renderNormals(){const e=this._normalsRequired;if(0===e)return;const t=this._framebufferSize,r=this.fboCache.acquire(t.width,t.height,"normals",x.RGBA8);r.acquireDepth(Ee),this._rctx.bindFramebuffer(r.fbo),this._rctx.clearFramebuffer(w,!0,!0),this._renderGeometryWithNormals(U.Normal);const i=this._nodes.optional("normals",N.FINAL,N.COMPOSITE,N.OPAQUE,N.TRANSPARENT,D.VIEWSHED);return r.retain(e+i-1),this.performanceInfo.advance(Ae.NORMALS),r}_renderSSAO(){const e=this._pluginInput.get("normals");if(!this.hasSSAO||!e)return void e?.detachDepth();L.setName(D.SSAO);const t=this._nodes.render(L,this._pluginInput);return this._bindParameters.ssao=t,e.detachDepth(),this._pluginInput.release("normals"),this.performanceInfo.advance(Ae.SSAO),t}_precompileAllGeometry(e){const t=this._renderContext.output;this._renderContext.output=e,this._precompileOpaqueGeometry(),this._precompileTransparentGeometry(),this._plugins.precompile(_e.TRANSPARENT_TERRAIN),this._renderContext.output=t}renderAllGeometry(e){this._renderContext.output=e,this._renderOpaqueAndTransparentGeometry(e),this._renderTransparentTerrain()}precompileSlots(e,...t){for(const r of t)this._bindParameters.slot=r,e.precompile(this._renderContext)}precompileOccludedSlots(e,t){for(const r of t)this._renderContext.renderOccludedMask=r,this.precompileSlots(e,...He);this._renderContext.renderOccludedMask=se}renderSlots(e,...t){for(const r of t)this._bindParameters.slot=r,e.forAll((e=>{const t=e.acquireTechniques(this._renderContext);t&&e.render(this._renderContext,t,this._pluginInput)}))}renderOccludedSlots(e,t){this._renderContext.renderOccludedMask=t,this.plugins.renderOccludedFlags>te.Occlude&&this._plugins.render(this._pluginInput,_e.OCCLUDED_TERRAIN),this.renderSlots(e,...He),this._renderContext.renderOccludedMask=se}renderHUD(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(this._pluginInput,_e.HUD_MATERIAL)}precompileViewshedShadowMap(){this._precompileAllGeometry(U.ViewshedShadow)}renderViewshedShadowMap(e){const{camera:t,contentCamera:r}=this._bindParameters,i=this._renderContext.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this.renderAllGeometry(U.ViewshedShadow),this._ensureBindParametersCamera(t,r),this._bindParameters.camera.setGLViewport(this._rctx),this._renderContext.output=i}_renderOpaqueAndTransparentGeometry(e){this._renderContext.output=e,this._renderOpaqueGeometry(),this._renderTransparentGeometry()}_renderGeometryWithNormals(e){this._renderContext.output=e,this._plugins.render(this._pluginInput,...Ne),this._renderTransparentTerrain()}_renderGeometryWithoutNormals(e){this._renderContext.output=e,this._plugins.render(this._pluginInput,...De)}_precompileOpaqueGeometry(){this._plugins.precompile(...ye)}_renderOpaqueGeometry(){this._plugins.render(this._pluginInput,...ye)}_renderTransparentGeometry(){this._plugins.render(this._pluginInput,...xe)}get _hasTransparentTerrain(){return this._plugins.produces(U.Color,_e.TRANSPARENT_TERRAIN)}_renderTransparentTerrain(){const e=()=>this._plugins.render(this._pluginInput,_e.TRANSPARENT_TERRAIN);if(!v(this._renderContext.output))return void e();const t=this._framebufferSize,r=this.fboCache.acquire(t.width,t.height,"transparent terrain");return this.renderToTargets(e,r,this._framebuffer.depth,w),r}get _needsHUDVisibility(){return this._plugins.produces(this._renderContext.output,_e.OCCLUSION_PIXELS)}_renderHUDVisibility(){if(!this._needsHUDVisibility)return void(this._bindParameters.hudVisibility=d(this._bindParameters.hudVisibility));const{width:e,height:t}=this._framebufferSize;let r=this._bindParameters.hudVisibility;r?.fbo?.width===e&&r?.fbo?.height===t||(r?.release(),r=this.fboCache.acquire(e,t,"hud visibility",x.RGBA4),this._bindParameters.hudVisibility=r);const i=this._bindParameters.geometryDepth;r.attachDepth(i||this._framebuffer.depth),this._rctx.bindFramebuffer(r.fbo),this._rctx.clearFramebuffer([0,1,0,1]),this._plugins.render(this._pluginInput,_e.OCCLUSION_PIXELS),r.detachDepth(),this._framebuffer.bind(),this.performanceInfo.advance(Ae.HUD_VISIBILITY)}_renderLineCallouts(e){if(this._bindParameters.hudRenderStyle=e,e===G.Occluded){const e=()=>this._plugins.render(this._pluginInput,_e.LINE_CALLOUTS),t=this._framebufferSize,r=this.fboCache.acquireDepth(H,t.width,t.height,"line callouts");this.renderToTargets(e,this._framebuffer.color,r,void 0,!0,!0),r.release()}else this._plugins.render(this._pluginInput,_e.LINE_CALLOUTS)}_precompileHUD(e){if(this._precompileHUDOutput(e),this._hasHighlights){const t=this._renderContext.output;this._renderContext.output=U.Highlight,this._precompileHUDOutput(e),this._renderContext.output=t}}_precompileHUDOutput(e){const t=this._bindParameters.hudRenderStyle;this._bindParameters.hudRenderStyle=e,this._oitEnabled&&v(this._renderContext.output)?(this._bindParameters.oitPass=re.ColorAlpha,this._plugins.precompile(...Me),this._bindParameters.oitPass=re.FrontFace,this._plugins.precompile(...Me),this._bindParameters.oitPass=re.NONE):this._plugins.precompile(...Me),this._bindParameters.hudRenderStyle=t}_renderHUD(e,t,r){if(this._pluginsHas.hudElements){if(this._oitEnabled){const i=this._renderOIT(Oe.HUD,r,e);this._rctx.bindFramebuffer(t.fbo),this._compositingHelper.compositePreMultipliedAlpha(this._bindParameters,i.getTexture()),i.release()}else if(this._renderContext.output=r,e===G.Occluded){const t=()=>this._renderHUDElements(e),r=this._framebufferSize,i=this.fboCache.acquireDepth(H,r.width,r.height,"hud");this.renderToTargets(t,this._framebuffer.color,i,void 0,!0,!0),i.release()}else t.acquireDepth(H),this._rctx.bindFramebuffer(t.fbo),this._renderHUDElements(e),t.detachDepth();this.performanceInfo.advance(e===G.Occluded?Ae.HUD_OCCLUDED:Ae.HUD)}}_renderHUDElements(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(this._pluginInput,...Me)}get _needsShadowHighlight(){return this.shadowsEnabled&&this._plugins.produces(U.ShadowHighlight,_e.OPAQUE_MATERIAL)}_renderHighlightPrepass(){if(!this._hasHighlights)return;const{fboCache:e,_rctx:t,_bindParameters:r}=this,i=this._framebufferSize,{highlights:s}=r,a=e.acquire(i.width,i.height,"highlights",s.length>Q?x.RG8UI:x.R8UI);a.acquireDepth(Ee),t.bindFramebuffer(a.fbo);const{gl:n}=t;return n.clearBufferuiv(n.COLOR,0,[0,0,0,0]),this._renderContext.output=U.Highlight,t.bindFramebuffer(a.fbo),W(t,e,i,r,(()=>this._renderHighlightGeometries())),this.performanceInfo.advance(Ae.HIGHLIGHTS),a}_renderHighlightGeometries(){this._plugins.render(this._pluginInput,...Le),this._rctx.clear(Se.DEPTH),this._renderHUDElements(G.Both)}get _needsShadowAccumulation(){return this._shadowAccumulator.accumulating}_renderShadowAccumulation(e,t,r){this._needsShadowAccumulation&&this._bindParameters.depth&&this._shadowAccumulator.renderAccumulation(this._bindParameters.depth,e,t,r)&&this.performanceInfo.advance(Ae.ACCUMULATED_SHADOWS)}_precompileTransparentGeometry(){this._oitEnabled&&v(this._renderContext.output)?(this._bindParameters.oitPass=re.ColorAlpha,this._plugins.precompile(...xe),this._bindParameters.oitPass=re.FrontFace,this._plugins.precompile(...xe),this._bindParameters.oitPass=re.NONE):this._plugins.precompile(...xe)}_renderOIT(e,t,r=G.Both){const i=e===Oe.HUD,s=this._framebufferSize,a=i?this.fboCache.acquire(s.width,s.height,"oit hud composite"):null,n=i?()=>this._renderHUDElements(r):()=>this._renderTransparentGeometry(),h=this._bindParameters,o=this._renderContext.output;this._renderContext.output=t,h.oitPass=re.ColorAlpha;const d=a?"oit hud color+alpha":"oit color+alpha",_=t===U.ColorEmission,l=this.fboCache.acquire(s.width,s.height,d,_?x.RGBA16F:x.RGBA16F_NEAREST);_&&l.acquireColor(Ie,x.RGBA16F,"emissive"),l.acquireColor(_?Ce:Ie,x.R16F),a||l.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(l.fbo),this._rctx.clearFramebuffer([0,0,0,1]),_&&this._rctx.clearBuffer(1,I),n(),l.detachDepth(),h.oitPass=re.FrontFace;const p=this.fboCache.acquire(s.width,s.height,a?"oit hud front":"oit front");return _&&p.acquireColor(Ie,x.RGBA16F,"emissive"),a?p.acquireDepth(H):p.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(p.fbo),this._rctx.clearFramebuffer(w,!!a),n(),p.detachDepth(),h.oitPass=re.NONE,a?(this._rctx.bindFramebuffer(a.fbo),this._rctx.setClearColor(0,0,0,1e-13),this._rctx.clear(Se.COLOR)):this._framebuffer.bind(),this._oitblend??=new k(this._techniques),this._oitblend.blend(this._rctx,l,p,h,_),a?.detachDepth(),p.release(),l.release(),this._renderContext.output=o,a}_renderTransparentEnvironment(){this._shadowAccumulator.render(this._bindParameters),this.performanceInfo.advance(Ae.APPLY_ACCUMULATED_SHADOWS),this._framebuffer.bind(),this._plugins.render(this._pluginInput,_e.TRANSPARENT_MATERIAL_WITHOUT_DEPTH),this.performanceInfo.advance(Ae.TRANSPARENT_MATERIAL_WITHOUT_DEPTH)}_renderPlugins(e,t){this._plugins.produces(this._renderContext.output,e)&&(this._plugins.render(this._pluginInput,e),this.performanceInfo.advance(t))}_renderNodes(e,t,r=!1){if(t.setName(e),this._pluginInput.set(e,t),!this._nodes.produces(e))return r&&this.performanceInfo.advance(e),t;const i=this._nodes.render(t,this._pluginInput,this._releaseNormals);return this.performanceInfo.advance(e),i}_blitFBO(e,t=L,r=!0){return this._blit??=new B(this._techniques),this._blit.blit(this._rctx,e,t,this._bindParameters),this._pluginInput.set(e.name,t),r&&e.release(),t}_ensureBindParametersCamera(e,t){this._bindParameters.camera=e,this._bindParameters.contentCamera=t}_ensureBindParametersSSR(e){if(this._bindParameters.ssr.lastFrameColor){null==this._ssrEnableTime&&(this._ssrEnableTime=e),this._renderContext.lastFrameCamera.equals(this._bindParameters.camera)?this._reprojectionMatrix=P:(T(Ue,this._bindParameters.camera.viewMatrix),T(Fe,this._bindParameters.camera.projectionMatrix),E(ve,Ue,Fe),E(ve,this._renderContext.lastFrameCamera.viewMatrix,ve),E(ve,this._renderContext.lastFrameCamera.projectionMatrix,ve),this._reprojectionMatrix=ve);const t=this.stage.view.qualitySettings.fadeDuration;this._bindParameters.ssr.fadeFactor=t>0?Math.min(t,e-this._ssrEnableTime)/t:1,this._bindParameters.ssr.fadeFactor<1&&this._requestRender()}else this._reprojectionMatrix=P,this._ssrEnableTime=null}addRenderNode(e){this._nodes.add(e),this._requestRender()}removeRenderNode(e){this._nodes.remove(e),this._requestRender()}updateLighting(e,t,r,i){this._bindParameters.updateLighting(e,t,r,i),this._requestRender(X.UPDATE)}get usedMemory(){return{fbos:this.fboCache.usedMemory,plugins:this._plugins.usedMemory,edges:this.edgeView?.usedMemory??0}}renderToTargets(e,t,r,i,s=!1,a=!1){t.attachDepth(r),this._rctx.bindFramebuffer(t.fbo),this._rctx.clearFramebuffer(i,s,a),e(),t.detachDepth()}get test(){}};var Oe;e([f({readOnly:!0})],we.prototype,"fullResolutionAtmosphere",null),e([f()],we.prototype,"_edgeView",void 0),e([f()],we.prototype,"updating",null),we=e([b("esri.views.3d.webgl-engine.lib.Renderer")],we),function(e){e[e.Geometry=0]="Geometry",e[e.HUD=1]="HUD"}(Oe||(Oe={}));const Ne=[_e.INTEGRATED_MESH,_e.OPAQUE_TERRAIN,_e.OPAQUE_MATERIAL,_e.TRANSPARENT_MATERIAL],De=[_e.OPAQUE_MATERIAL_WITHOUT_NORMALS,_e.TRANSPARENT_MATERIAL_WITHOUT_NORMALS],ye=[_e.INTEGRATED_MESH,_e.OPAQUE_TERRAIN,_e.OPAQUE_MATERIAL,_e.OPAQUE_MATERIAL_WITHOUT_NORMALS],xe=[_e.TRANSPARENT_MATERIAL,_e.TRANSPARENT_MATERIAL_WITHOUT_NORMALS],He=[_e.OPAQUE_MATERIAL,_e.TRANSPARENT_MATERIAL,_e.TRANSPARENT_MATERIAL_WITHOUT_DEPTH],Me=[_e.LINE_CALLOUTS_HUD_DEPTH,_e.HUD_MATERIAL,_e.LABEL_MATERIAL],Le=[_e.TRANSPARENT_MATERIAL,_e.TRANSPARENT_MATERIAL_WITHOUT_NORMALS,_e.OPAQUE_MATERIAL,_e.OPAQUE_MATERIAL_WITHOUT_NORMALS,_e.TRANSPARENT_TERRAIN,_e.INTEGRATED_MESH,_e.OPAQUE_TERRAIN],Fe=R(),Ue=R(),ve=R();function Ge(e){return t=>e.immediate.schedule(t)}export{we as Renderer};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{p as e,i as r,c as t,n as s,d as a,l as i,h as o,f as n,q as l}from"../../../../chunks/vec32.js";import{ZEROS as c,create as m,fromValues as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{EmissiveSourceMode as h}from"../../../../symbols/support/materialUtils.js";import{ViewingMode as p}from"../../../ViewingMode.js";import{newLayout as d}from"../../support/buffer/InterleavedLayout.js";import{is3DGeometryOutputMRT as f,isShadowRelatedOutput as T,is3DGeometryOutput as v,ShaderOutput as x,isColorOrColorEmission as g}from"../core/shaderLibrary/ShaderOutput.js";import{NormalType as
|
|
5
|
+
import{p as e,i as r,c as t,n as s,d as a,l as i,h as o,f as n,q as l}from"../../../../chunks/vec32.js";import{ZEROS as c,create as m,fromValues as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{EmissiveSourceMode as h}from"../../../../symbols/support/materialUtils.js";import{ViewingMode as p}from"../../../ViewingMode.js";import{newLayout as d}from"../../support/buffer/InterleavedLayout.js";import{is3DGeometryOutputMRT as f,isShadowRelatedOutput as T,is3DGeometryOutput as v,ShaderOutput as x,isColorOrColorEmission as g,isColorEmission as b}from"../core/shaderLibrary/ShaderOutput.js";import{NormalType as S}from"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{EmissionSource as O}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as M}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as y}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{olidEnabled as w}from"../effects/geometry/olidUtils.js";import{CullFaceOptions as C,AlphaDiscardMode as R}from"../lib/basicInterfaces.js";import{GLTextureMaterial as A}from"../lib/GLTextureMaterial.js";import{Material as I}from"../lib/Material.js";import{OITPolygonOffsetLimit as P}from"../lib/OrderIndependentTransparency.js";import{intersectTriangleGeometry as j}from"../lib/RayIntersections.js";import{RenderSlot as E}from"../lib/RenderSlot.js";import{VertexAttribute as L}from"../lib/VertexAttribute.js";import{getVerticalOffsetObject3D as D}from"../lib/verticalOffsetUtils.js";import{DefaultBufferWriter as N}from"./DefaultBufferWriter.js";import{verticalOffsetAtDistance as B}from"./internal/MaterialUtil.js";import{DefaultMaterialTechnique as _,DefaultMaterialPassParameters as V}from"../shaders/DefaultMaterialTechnique.js";import{DefaultMaterialTechniqueConfiguration as z}from"../shaders/DefaultMaterialTechniqueConfiguration.js";import{RealisticTreeTechnique as U}from"../shaders/RealisticTreeTechnique.js";import{alphaCutoff as q}from"../../../../webscene/support/AlphaCutoff.js";class k extends I{constructor(e,r){super(e,G),this.materialType="default",this.supportsEdges=!0,this.produces=new Map([[E.OPAQUE_MATERIAL,e=>(f(e)||T(e))&&!this.transparent],[E.TRANSPARENT_MATERIAL,e=>(f(e)||T(e))&&this.transparent&&this.parameters.writeDepth],[E.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>(v(e)||T(e))&&this.transparent&&!this.parameters.writeDepth]]),this._vertexBufferLayout=F(this.parameters),this._configuration=new z(r.spherical)}isVisibleForOutput(e){return e!==x.Shadow&&e!==x.ShadowExcludeHighlight&&e!==x.ShadowHighlight||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:r,opacity:t,externalColor:s}=this.parameters;return e*("replace"===r?1:t)*("ignore"===r?1:s[3])>=q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!e(this.parameters.emissiveBaseColor,c)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(this.parameters.emissiveSource===h.Emissive&&this._hasEmissiveBase||this.parameters.emissiveSource===h.Color)}getConfiguration(e,r){const{parameters:t,_configuration:s}=this,{treeRendering:a,doubleSided:i,doubleSidedType:o}=t;return super.getConfiguration(e,r,this._configuration),s.hasNormalTexture=!a&&!!t.normalTextureId,s.hasColorTexture=!!t.textureId,s.hasVertexTangents=!a&&t.hasVertexTangents,s.instanced=t.isInstanced,s.instancedDoublePrecision=t.instancedDoublePrecision,s.vvSize=!!t.vvSize,s.hasVerticalOffset=null!=t.verticalOffset,s.hasScreenSizePerspective=null!=t.screenSizePerspective,s.hasSlicePlane=t.hasSlicePlane,s.alphaDiscardMode=t.textureAlphaMode,s.normalType=a?S.Attribute:t.normalType,s.transparent=this.transparent,s.writeDepth=t.writeDepth,null!=t.customDepthTest&&(s.customDepthTest=t.customDepthTest),s.hasOccludees=r.hasOccludees,s.cullFace=t.hasSlicePlane?C.None:t.cullFace,s.cullAboveTerrain=r.cullAboveTerrain,s.hasModelTransformation=!a&&null!=t.modelTransformation,s.hasVertexColors=t.hasVertexColors,s.hasSymbolColors=t.hasSymbolColors,s.doubleSidedMode=a?M.WindingOrder:i&&"normal"===o?M.View:i&&"winding-order"===o?M.WindingOrder:M.None,s.instancedColor=t.hasInstancedColor,g(e)?(s.terrainDepthTest=r.terrainDepthTest,s.receiveShadows=t.receiveShadows,s.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=r.ssao):(s.terrainDepthTest=!1,s.receiveShadows=s.receiveAmbientOcclusion=!1),s.vvColor=!!t.vvColor,s.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,s.pbrMode=t.usePBR?t.isSchematic?y.Schematic:y.Normal:y.Disabled,s.hasMetallicRoughnessTexture=!a&&!!t.metallicRoughnessTextureId,s.emissionSource=a?O.None:null!=t.emissiveTextureId&&t.emissiveSource===h.Emissive?O.Texture:t.usePBR?t.emissiveSource===h.Emissive?O.EmissiveColor:O.SymbolColor:O.None,s.hasOcclusionTexture=!a&&!!t.occlusionTextureId,s.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),s.oitPass=r.oitPass,s.enableOffset=r.camera.relativeElevation<P,s.snowCover=H(r),s.hasBloom=b(e),s.hasColorTextureTransform=!!t.colorTextureTransformMatrix,s.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,s.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,s.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,s.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix,s}intersect(e,c,m,u,h,d){if(null!=this.parameters.verticalOffset){const e=m.camera;r(Z,c[12],c[13],c[14]);let d=null;switch(m.viewingMode){case p.Global:d=s(K,Z);break;case p.Local:d=t(K,J)}let f=0;const T=a($,Z,e.eye),v=i(T),x=o(T,T,1/v);let g=null;this.parameters.screenSizePerspective&&(g=n(d,x)),f+=B(e,v,this.parameters.verticalOffset,g??0,this.parameters.screenSizePerspective),o(d,d,f),l(X,d,m.transform.inverseRotation),u=a(Q,u,X),h=a(Y,h,X)}j(e,m,u,h,D(m.verticalOffset),d)}createGLMaterial(e){return new W(e)}createBufferWriter(){return new N(this._vertexBufferLayout)}get transparent(){const{parameters:{drivenOpacity:e,opacity:r,externalColor:[t,s,a,i],layerOpacity:o,texture:n,textureId:l,textureAlphaMode:c,colorMixMode:m}}=this;return e||r<1&&"replace"!==m||i<1&&"ignore"!==m||o<1||(null!=n||null!=l)&&c!==R.Opaque&&c!==R.Mask&&"replace"!==m}}class W extends A{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const s=e.camera.viewInverseTransposeMatrix;return r(t.origin,s[3],s[7],s[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?U:_,e)}}class G extends V{constructor(){super(...arguments),this.treeRendering=!1,this.hasVertexTangents=!1}}function H(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}function F(e){const r=d().vec3f(L.POSITION);e.normalType===S.Compressed?r.vec2i16(L.NORMALCOMPRESSED,{glNormalized:!0}):r.vec3f(L.NORMAL),e.hasVertexTangents&&r.vec4f(L.TANGENT);return(e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId)&&r.vec2f16(L.UV0),e.hasVertexColors&&r.vec4u8(L.COLOR),e.hasSymbolColors&&r.vec4u8(L.SYMBOLCOLOR),w()&&r.vec4u8(L.OLIDCOLOR),r}const Q=m(),Y=m(),J=u(0,0,1),K=m(),X=m(),Z=m(),$=m();export{W as DefaultGLMaterial,k as DefaultMaterial,G as DefaultMaterialParameters};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{clamp as e}from"../../../../core/mathUtils.js";import{clone as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{fromValues as i}from"../../../../geometry/support/aaBoundingBox.js";import{newLayout as r}from"../../support/buffer/InterleavedLayout.js";import{isShadowRelatedOutput as s,is3DGeometryOutputMRT as a,isColorOrColorEmission as o,ShaderOutput as
|
|
5
|
+
import{clamp as e}from"../../../../core/mathUtils.js";import{clone as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{fromValues as i}from"../../../../geometry/support/aaBoundingBox.js";import{newLayout as r}from"../../support/buffer/InterleavedLayout.js";import{isShadowRelatedOutput as s,is3DGeometryOutputMRT as a,isColorOrColorEmission as o,isColorEmission as n,ShaderOutput as h}from"../core/shaderLibrary/ShaderOutput.js";import{EmissionSource as c}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as u}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as m}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{olidEnabled as l}from"../effects/geometry/olidUtils.js";import p from"../lib/GLMaterial.js";import{Material as d}from"../lib/Material.js";import{isPathGeometry as f}from"../lib/PathGeometry.js";import{MeshIntersectionOptions as b,intersectAabbInvDir as g}from"../lib/RayIntersections.js";import{RenderSlot as v}from"../lib/RenderSlot.js";import{VertexAttribute as S}from"../lib/VertexAttribute.js";import{DefaultBufferWriter as T}from"./DefaultBufferWriter.js";import{vertexAttributeLocations as A,PathTechnique as O,PathPassParameters as R}from"./PathTechnique.js";import{PathTechniqueConfiguration as y}from"./PathTechniqueConfiguration.js";import{alphaCutoff as E}from"../../../../webscene/support/AlphaCutoff.js";class _ extends d{constructor(e,t){super(e,w),this.vertexAttributeLocations=A,this.supportsEdges=!0,this.produces=new Map([[v.OPAQUE_MATERIAL,e=>(this.parameters.castShadows&&s(e)||a(e))&&!this.transparent],[v.TRANSPARENT_MATERIAL,e=>(this.parameters.castShadows&&s(e)||a(e))&&this.transparent]]),this._configuration=new y(t.spherical)}get hasEmissions(){return this.parameters.emissiveStrength>0}getConfiguration(e,t){return super.getConfiguration(e,t,this._configuration),this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.transparent,this._configuration.hasOccludees=t.hasOccludees,o(e)?(this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?u.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?u.WindingOrder:u.None,this._configuration.receiveShadows=t.shadowMap.enabled,this._configuration.receiveAmbientOcclusion=null!=t.ssao):this._configuration.receiveShadows=this._configuration.receiveAmbientOcclusion=!1,this._configuration.pbrMode=this.parameters.usePBR?m.Schematic:m.Disabled,this._configuration.emissionSource=this.parameters.usePBR?c.SymbolColor:c.None,this._configuration.hasBloom=n(e),this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}isVisibleForOutput(e){return e!==h.Shadow&&e!==h.ShadowExcludeHighlight&&e!==h.ShadowHighlight||this.parameters.castShadows}get visible(){return this.parameters.opacity>=E}intersect(r,s,a,o,n,h){const c=r;if(!f(c))return;const u=c.path,m=t(this.parameters.size);if(this.parameters.vvSize){const{offset:t,factor:i,minSize:r,maxSize:s,fallback:a}=this.parameters.vvSize,o=u.sizeAttributeValue;Number.isNaN(o)?(m[0]*=a[0],m[1]*=a[2]):(m[0]*=e(t[0]+o*i[0],r[0],s[0]),m[1]*=e(t[2]+o*i[2],r[2],s[2]))}const l=new b(!1,a.options.normalRequired),p=Math.max(m[0],m[1]),d=r.boundingInfo;if(null==d)return void j(u,m,o,n,l,h);const v=i(d.bbMin[0]-p,d.bbMin[1]-p,d.bbMin[2]-p,d.bbMax[0]+p,d.bbMax[1]+p,d.bbMax[2]+p),S=[n[0]-o[0],n[1]-o[1],n[2]-o[2]],T=Math.sqrt(S[0]*S[0]+S[1]*S[1]+S[2]*S[2]),A=[T/S[0],T/S[1],T/S[2]];g(v,o,A,a.tolerance)&&j(u,m,o,n,l,h)}createBufferWriter(){return new T(this._layout)}get _layout(){const e=r().vec3f(S.POSITION).vec4f16(S.PROFILEVERTEXANDNORMAL).vec3f16(S.PROFILEAUXDATA).vec2i16(S.PROFILERIGHT,{glNormalized:!0}).vec2i16(S.PROFILEUP,{glNormalized:!0});return this.parameters.vvSize&&e.f32(S.SIZEFEATUREATTRIBUTE),this.parameters.vvColor&&e.f16(S.COLORFEATUREATTRIBUTE),this.parameters.vvOpacity&&e.f16(S.OPACITYFEATUREATTRIBUTE),l()&&e.vec4u8(S.OLIDCOLOR),e}createGLMaterial(e){return new P(e)}get transparent(){const{parameters:e}=this;return e.drivenOpacity||e.opacity<1}}class P extends p{beginSlot(e){return this.getTechnique(O,e)}}function j(e,t,i,r,s,a){e.baked.size&&e.baked.size[0]===t[0]&&e.baked.size[1]===t[1]||e.baked.bake(t),e.baked.intersect(i,r,s,a)}class w extends R{constructor(){super(...arguments),this.doubleSided=!1,this.doubleSidedType="normal",this.castShadows=!0,this.hasSlicePlane=!1,this.drivenOpacity=!1,this.usePBR=!1}}export{w as Parameters,_ as PathMaterial};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import{TextureCoordinateType as
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import{TextureCoordinateType as o}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{EmissionSource as t}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as r}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as s}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{parameter as i}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as a}from"./DefaultTechniqueConfiguration.js";class h extends a{constructor(e){super(),this.spherical=e,this.pbrMode=s.Disabled,this.doubleSidedMode=r.None,this.emissionSource=t.None,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.vvSize=!1,this.vvColor=!1,this.vvOpacity=!1,this.transparent=!1,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.hasBloom=!1,this.textureCoordinateType=o.None,this.occlusionPass=!1,this.hasVvInstancing=!0,this.useCustomDTRExponentForWater=!1,this.useFillLights=!1,this.hasColorTexture=!1,this.objectAndLayerIdColorInstanced=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.draped=!1,this.overlayEnabled=!1}get discardInvisibleFragments(){return this.transparent}}e([i({count:s.COUNT})],h.prototype,"pbrMode",void 0),e([i({count:r.COUNT})],h.prototype,"doubleSidedMode",void 0),e([i({count:t.COUNT})],h.prototype,"emissionSource",void 0),e([i()],h.prototype,"receiveShadows",void 0),e([i()],h.prototype,"receiveAmbientOcclusion",void 0),e([i()],h.prototype,"vvSize",void 0),e([i()],h.prototype,"vvColor",void 0),e([i()],h.prototype,"vvOpacity",void 0),e([i()],h.prototype,"transparent",void 0),e([i()],h.prototype,"hasOccludees",void 0),e([i()],h.prototype,"terrainDepthTest",void 0),e([i()],h.prototype,"cullAboveTerrain",void 0),e([i()],h.prototype,"hasBloom",void 0);export{h as PathTechniqueConfiguration};
|