@arcgis/core 4.27.0-next.20230521 → 4.27.0-next.20230523
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/Graphic.js +1 -1
- package/WebMap.js +1 -1
- package/arcade/featureset/actions/SpatialFilter.js +1 -1
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
- package/arcade/featureset/sources/FeatureLayerRelated.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/030b43764f945cb1f8b0.js +1 -0
- package/assets/esri/core/workers/chunks/0d02856e55d20b99fc8b.js +1 -0
- package/assets/esri/core/workers/chunks/{69242c66492717c7388c.js → 0fcb8d408696075338e2.js} +1 -1
- package/assets/esri/core/workers/chunks/{b91c155de9a89e4e6971.js → 187c3b971ed0fc4363ef.js} +1 -1
- package/assets/esri/core/workers/chunks/{85c6ce93aa41e6b65997.js → 18db07d739a713cc0465.js} +1 -1
- package/assets/esri/core/workers/chunks/1b6177e23327be645c8c.js +1 -0
- package/assets/esri/core/workers/chunks/28286014a575042619ee.js +1 -0
- package/assets/esri/core/workers/chunks/{692dfeb2e255fdc0ade2.js → 39288fa69561d21f04f8.js} +1 -1
- package/assets/esri/core/workers/chunks/{2b9d3e60977934a6d471.js → 3bc6b5f0643364749ef8.js} +1 -1
- package/assets/esri/core/workers/chunks/45e5ad704d18dd0857ce.js +1 -0
- package/assets/esri/core/workers/chunks/4d24efa01d1accc5a5f0.js +1 -0
- package/assets/esri/core/workers/chunks/{6312783626bacf52df7a.js → 55486c644e8b01326a0d.js} +1 -1
- package/assets/esri/core/workers/chunks/5576858f56314afcb4d5.js +1 -0
- package/assets/esri/core/workers/chunks/{62d9d15f0d00a75da42c.js → 571dac507622948ac03e.js} +1 -1
- package/assets/esri/core/workers/chunks/59063d6abf70f6598425.js +1 -0
- package/assets/esri/core/workers/chunks/5a4c04bf4f57e74457c5.js +1 -0
- package/assets/esri/core/workers/chunks/5bf04c32e0ac89dcbf9f.js +1 -0
- package/assets/esri/core/workers/chunks/6a3d611e8842afbb50ab.js +2 -0
- package/assets/esri/core/workers/chunks/{55ca6ba8b40921025181.js.LICENSE.txt → 6a3d611e8842afbb50ab.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/70d6e5edf05ef7079fa8.js +1 -0
- package/assets/esri/core/workers/chunks/71bdf8f10aee0077f681.js +1 -0
- package/assets/esri/core/workers/chunks/72b2c3c8e76da699690c.js +1 -0
- package/assets/esri/core/workers/chunks/78ce0b1af62435d8ebf4.js +1 -0
- package/assets/esri/core/workers/chunks/791f529e90135398b3d5.js +1 -0
- package/assets/esri/core/workers/chunks/8d3abfe6fdc5ac8d6cb7.js +1 -0
- package/assets/esri/core/workers/chunks/{1edc5c06874cb12c5478.js → 924e4a18d8403d1caea3.js} +1 -1
- package/assets/esri/core/workers/chunks/96d339abcd917f1f0ae1.js +1 -0
- package/assets/esri/core/workers/chunks/97cdbec7532cfcdf9ad2.js +1 -0
- package/assets/esri/core/workers/chunks/{f3f6035a17f7dcd19675.js → 9ab400a89dd701778d2c.js} +1 -1
- package/assets/esri/core/workers/chunks/{1488b3d48232844b8bb4.js → 9fe349f43d5ff5a4ac2d.js} +1 -1
- package/assets/esri/core/workers/chunks/{22396dd3717d17a5d235.js → a1c31bb8c12831539328.js} +1 -1
- package/assets/esri/core/workers/chunks/b0571b9e602218cdc7aa.js +1 -0
- package/assets/esri/core/workers/chunks/b1d88f8e528bf7092f35.js +1 -0
- package/assets/esri/core/workers/chunks/b4e2dc6b3d06b426e596.js +1 -0
- package/assets/esri/core/workers/chunks/{48abcb2d88f22e6e9fde.js → c2cb9fa18c77f0c5104e.js} +1 -1
- package/assets/esri/core/workers/chunks/cad7a2092ea7f51dbd8b.js +1 -0
- package/assets/esri/core/workers/chunks/d08800a30b1227591986.js +1 -0
- package/assets/esri/core/workers/chunks/d725dbbdeb05322e6d88.js +1 -0
- package/assets/esri/core/workers/chunks/df3e497d12ed77bae168.js +1 -0
- package/assets/esri/core/workers/chunks/fb080339bfaf32731ca6.js +1 -0
- package/assets/esri/core/workers/chunks/{56fc7924b4fb30239c19.js → fdf58386a67e54c09bfb.js} +1 -1
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
- package/assets/esri/themes/base/_core.scss +2 -0
- package/assets/esri/themes/base/widgets/_BasemapGallery.scss +86 -96
- package/assets/esri/themes/base/widgets/_FloorFilter.scss +6 -0
- package/assets/esri/themes/base/widgets/_UtilityNetworkValidateTopology.scss +40 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_en.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_en.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_nb.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ar.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_bg.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_bs.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ca.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_cs.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_da.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_de.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_el.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_en.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_es.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_et.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_fi.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_fr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_he.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_hr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_hu.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_id.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_it.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ja.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ko.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_lt.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_lv.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_nb.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_nl.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_pl.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_pt-BR.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_pt-PT.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ro.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ru.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sk.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sl.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sv.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_th.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_tr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_uk.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_vi.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_zh-CN.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_zh-HK.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_zh-TW.json +1 -1
- package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
- package/chunks/arcgis-knowledge-client-core.js +1 -1
- package/chunks/mat4.js +1 -1
- package/core/accessorSupport/write.js +1 -1
- package/core/fontUtils.js +1 -1
- package/core/libs/gl-matrix-2/math/mat4.js +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/support/MeshGeoreferencedRelativeVertexSpace.d.ts +4 -0
- package/geometry/support/MeshGeoreferencedRelativeVertexSpace.js +5 -0
- package/geometry/support/MeshGeoreferencedVertexSpace.d.ts +4 -0
- package/geometry/support/MeshGeoreferencedVertexSpace.js +5 -0
- package/geometry/support/MeshLocalVertexSpace.d.ts +4 -0
- package/geometry/support/MeshLocalVertexSpace.js +5 -0
- package/geometry/support/MeshTransform.d.ts +4 -0
- package/geometry/support/MeshTransform.js +1 -1
- package/geometry/support/meshUtils/ElevationSamplerWorker.js +1 -1
- package/geometry/support/meshUtils/centerAt.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/geometry.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
- package/geometry/support/meshUtils/geographicUtils.js +1 -1
- package/geometry/support/meshUtils/georeference.js +1 -1
- package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
- package/geometry/support/meshUtils/merge.js +1 -1
- package/geometry/support/meshUtils/offset.js +1 -1
- package/geometry/support/meshUtils/primitives.js +1 -1
- package/geometry/support/meshUtils/rotate.js +1 -1
- package/geometry/support/meshUtils/scale.js +1 -1
- package/interfaces.d.ts +227 -25
- package/layers/LinkChartLayer.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/graphics/data/attributeSupport.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
- package/layers/knowledgeGraph/SessionMemoryStorage.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/rasterFunctions/BandArithmeticFunction.js +1 -1
- package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
- package/layers/support/rasterFunctions/CompositeBandFunction.js +1 -1
- package/layers/support/rasterFunctions/ExtractBandFunction.js +1 -1
- package/layers/support/rasterFunctions/ExtractBandFunctionArguments.js +1 -1
- package/layers/support/rasterFunctions/NDVIFunction.js +1 -1
- package/networks/support/TopologyValidationJobInfo.js +1 -1
- package/package.json +2 -2
- package/popup/FieldInfo.js +1 -1
- package/portal/Portal.js +1 -1
- package/rest/support/FeatureSet.js +1 -1
- package/rest/support/meshFeatureSet.js +1 -1
- package/smartMapping/symbology/color.js +1 -1
- package/smartMapping/symbology/support/colors.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/support/utils.js +1 -1
- package/views/2d/layers/StreamLayerView2D.js +1 -1
- package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
- package/views/3d/interactive/editingTools/meshFastUpdateUtils.js +1 -1
- package/views/3d/interactive/editingTools/moveGraphic/GraphicMoveTool.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/GraphicTransformTool.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateMeshAdapter.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/undoRecords.js +1 -1
- package/views/3d/layers/StreamLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshObject3DGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/symbolComplexity.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/support/DisplayQualityProfile.js +1 -1
- package/views/3d/support/QualitySettings.js +1 -1
- package/views/3d/webgl-engine/lib/Camera.js +1 -1
- package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
- package/views/3d/webgl-engine/lib/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/draw/support/helpMessageUtils.js +1 -1
- package/views/interactive/dragEventPipeline.js +1 -1
- package/views/layers/StreamLayerView.js +1 -1
- package/widgets/BasemapGallery/css.js +1 -1
- package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
- package/widgets/BasemapGallery.js +1 -1
- package/widgets/CoordinateConversion.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/Edits.js +1 -1
- package/widgets/Editor/Upload.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/Feature/support/featureUtils.js +1 -1
- package/widgets/FeatureForm/featureFormUtils.js +1 -1
- package/widgets/FeatureTable/FieldColumn.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/Locate.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +5 -0
- package/widgets/UtilityNetworkValidateTopology.js +5 -0
- package/widgets/support/widgetUtils.js +1 -1
- package/assets/esri/core/workers/chunks/163bf2e13abbdd298374.js +0 -1
- package/assets/esri/core/workers/chunks/23f73f81aea461c0c6e6.js +0 -1
- package/assets/esri/core/workers/chunks/2640204c4655aa535ccb.js +0 -1
- package/assets/esri/core/workers/chunks/2bf42d060f877566b989.js +0 -1
- package/assets/esri/core/workers/chunks/34ec9623a1bece86a82b.js +0 -1
- package/assets/esri/core/workers/chunks/3bf52139340827794c3b.js +0 -1
- package/assets/esri/core/workers/chunks/3cebdd77a8401495097f.js +0 -1
- package/assets/esri/core/workers/chunks/48cb634255e39711a720.js +0 -1
- package/assets/esri/core/workers/chunks/4d5f71d84c85f45c97ea.js +0 -1
- package/assets/esri/core/workers/chunks/52d02021e858820bc4fa.js +0 -1
- package/assets/esri/core/workers/chunks/55ca6ba8b40921025181.js +0 -2
- package/assets/esri/core/workers/chunks/64b8f65e2ef6cbf08380.js +0 -1
- package/assets/esri/core/workers/chunks/662e479c370c11bcb8a7.js +0 -1
- package/assets/esri/core/workers/chunks/78aede1e114deefacb54.js +0 -1
- package/assets/esri/core/workers/chunks/7ef100158ca28631fcaf.js +0 -1
- package/assets/esri/core/workers/chunks/93ad67930aa7d4a4b0ac.js +0 -1
- package/assets/esri/core/workers/chunks/964795dfb57f0d0635d0.js +0 -1
- package/assets/esri/core/workers/chunks/99ce0a202dcd3d7dc290.js +0 -1
- package/assets/esri/core/workers/chunks/abe6c99a1a719543dbe8.js +0 -1
- package/assets/esri/core/workers/chunks/c3bf44146fddfe8990f7.js +0 -1
- package/assets/esri/core/workers/chunks/cbe817e966b57599bafd.js +0 -1
- package/assets/esri/core/workers/chunks/e15b5d7e46a834eacc57.js +0 -1
- package/assets/esri/core/workers/chunks/e1e0b3580e2c3098c9f4.js +0 -1
- package/assets/esri/core/workers/chunks/e305d20e4424451cab5b.js +0 -1
- package/assets/esri/core/workers/chunks/e6836c84470fb6bd25bf.js +0 -1
- package/assets/esri/core/workers/chunks/f924732902703233655e.js +0 -1
- package/assets/esri/core/workers/chunks/ff1c005eede0cf964332.js +0 -1
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../chunks/tslib.es6.js";import{JSONSupport as
|
|
5
|
+
import{_ as t}from"../../chunks/tslib.es6.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{g as a,a as e,h as i}from"../../chunks/mat4.js";import{c as n}from"../../chunks/mat4f64.js";import{s as l}from"../../chunks/quat.js";import{a as p}from"../../chunks/quatf64.js";import{m as c}from"../../chunks/vec3.js";import{c as u,g as m,f as h,a as j}from"../../chunks/vec3f64.js";import{UP as x,fromAxisAndAngle as f,axis as y,angle as g,angleRad as A}from"./axisAngleDegrees.js";var v;let b=v=class extends o{constructor(t){super(t),this.translation=u(),this.rotationAxis=m(x),this.rotationAngle=0,this.scale=h(1,1,1)}get rotation(){return f(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=j(y(t)),this.rotationAngle=g(t)}get localMatrix(){const t=n();return l(M,y(this.rotation),A(this.rotation)),a(t,M,this.translation,this.scale),t}get localMatrixInverse(){return e(n(),this.localMatrix)}applyLocal(t,o){return c(o,t,this.localMatrix)}applyLocalInverse(t,o){return c(o,t,this.localMatrixInverse)}equals(t){return this===t||null!=t&&i(this.localMatrix,t.localMatrix)}clone(){const t={translation:j(this.translation),rotationAxis:j(this.rotationAxis),rotationAngle:this.rotationAngle,scale:j(this.scale)};return new v(t)}};t([r({type:[Number],nonNullable:!0,json:{write:!0}})],b.prototype,"translation",void 0),t([r({type:[Number],nonNullable:!0,json:{write:!0}})],b.prototype,"rotationAxis",void 0),t([r({type:Number,nonNullable:!0,json:{write:!0}})],b.prototype,"rotationAngle",void 0),t([r({type:[Number],nonNullable:!0,json:{write:!0}})],b.prototype,"scale",void 0),t([r()],b.prototype,"rotation",null),t([r()],b.prototype,"localMatrix",null),t([r()],b.prototype,"localMatrixInverse",null),b=v=t([s("esri.geometry.support.MeshTransform")],b);const M=p(),N=b;export{N as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import has from"../../../core/has.js";import{PooledRBush as e}from"../../../core/libs/rbush/PooledRBush.js";import{georeferenceApplyTransform as t}from"./georeference.js";class r{async createIndex(t,r){const n=new Array;if(!t.vertexAttributes||!t.vertexAttributes.position)return new e;const o=this._createMeshData(t),s=null!=r?await r.invoke("createIndexThread",o,{transferList:n}):this.createIndexThread(o).result;return this._createPooledRBush().fromJSON(s)}createIndexThread(e){const t=new Float64Array(e.position),r=this._createPooledRBush();return e.components?this._createIndexComponentsThread(r,t,e.components.map((e=>new Uint32Array(e)))):this._createIndexAllThread(r,t)}_createIndexAllThread(e,t){const r=new Array(t.length/9);let o=0;for(let s=0;s<t.length;s+=9)r[o++]=n(t,s,s+3,s+6);return e.load(r),{result:e.toJSON()}}_createIndexComponentsThread(e,t,r){let o=0;for(const n of r)o+=n.length/3;const s=new Array(o);let a=0;for(const i of r)for(let e=0;e<i.length;e+=3)s[a++]=n(t,3*i[e],3*i[e+1],3*i[e+2]);return e.load(s),{result:e.toJSON()}}_createMeshData(e){const r=(e.
|
|
5
|
+
import has from"../../../core/has.js";import{PooledRBush as e}from"../../../core/libs/rbush/PooledRBush.js";import{georeferenceApplyTransform as t}from"./georeference.js";class r{async createIndex(t,r){const n=new Array;if(!t.vertexAttributes||!t.vertexAttributes.position)return new e;const o=this._createMeshData(t),s=null!=r?await r.invoke("createIndexThread",o,{transferList:n}):this.createIndexThread(o).result;return this._createPooledRBush().fromJSON(s)}createIndexThread(e){const t=new Float64Array(e.position),r=this._createPooledRBush();return e.components?this._createIndexComponentsThread(r,t,e.components.map((e=>new Uint32Array(e)))):this._createIndexAllThread(r,t)}_createIndexAllThread(e,t){const r=new Array(t.length/9);let o=0;for(let s=0;s<t.length;s+=9)r[o++]=n(t,s,s+3,s+6);return e.load(r),{result:e.toJSON()}}_createIndexComponentsThread(e,t,r){let o=0;for(const n of r)o+=n.length/3;const s=new Array(o);let a=0;for(const i of r)for(let e=0;e<i.length;e+=3)s[a++]=n(t,3*i[e],3*i[e+1],3*i[e+2]);return e.load(s),{result:e.toJSON()}}_createMeshData(e){const r=(e.vertexSpace.isRelative?t({position:e.vertexAttributes.position,normal:null,tangent:null},e.vertexSpace,e.transform,e.spatialReference).position:e.vertexAttributes.position).buffer;return!e.components||e.components.some((e=>!e.faces))?{position:r}:{position:r,components:e.components.map((e=>e.faces))}}_createPooledRBush(){return new e(9,has("esri-csp-restrictions")?e=>e:[".minX",".minY",".maxX",".maxY"])}}function n(e,t,r,n){return{minX:Math.min(e[t],e[r],e[n]),maxX:Math.max(e[t],e[r],e[n]),minY:Math.min(e[t+1],e[r+1],e[n+1]),maxY:Math.max(e[t+1],e[r+1],e[n+1]),p0:[e[t],e[t+1],e[t+2]],p1:[e[r],e[r+1],e[r+2]],p2:[e[n],e[n+1],e[n+2]]}}export{r as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../core/Logger.js";import{
|
|
5
|
+
import e from"../../../core/Logger.js";import{s as t,a as r}from"../../../chunks/vec3.js";import{c as i}from"../../../chunks/vec3f64.js";import{projectPointToVector as o}from"../../projection.js";import{validateGeographicFlag as n,isGeographicMesh as s}from"./geographicUtils.js";import{ungeoreference as c,georeference as a}from"./georeference.js";const f="esri.geometry.support.meshUtils.centerAt";function p(e,t,r){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{vertexSpace:i}=e,o=r?.origin??e.origin;if(i.isRelative)n(i,f,r),g(i,t,o);else{s(e.spatialReference,r)?l(e,t,o):m(e,t,o)}}function g(e,o,n){const s=t(v,o.x-n.x,o.y-n.y,(o.z??0)-(n.z??0)),c=e.origin;e.origin=r(i(),c,s)}function l(e,t,r){const i=c(e.vertexAttributes,r,{geographic:!0}),{position:o,normal:n,tangent:s}=a(i,t,{geographic:!0});e.vertexAttributes.position=o,e.vertexAttributes.normal=n,e.vertexAttributes.tangent=s,e.vertexAttributesChanged()}function m(t,r,i){const n=d,s=x;if(o(r,s,t.spatialReference)){if(!o(i,n,t.spatialReference)){const r=t.origin;n[0]=r.x,n[1]=r.y,n[2]=r.z,e.getLogger(f).error(`Failed to project specified origin (wkid:${i.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}).`)}u(t.vertexAttributes.position,s,n),t.vertexAttributesChanged()}else e.getLogger(f).error(`Failed to project centerAt location (wkid:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid})`)}function u(e,t,r){if(e)for(let i=0;i<e.length;i+=3)for(let o=0;o<3;o++)e[i+o]+=t[o]-r[o]}const x=i(),d=i(),v=i();export{p as centerAt};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{s as n,b as t,f as e,n as o}from"../../../../../chunks/vec3.js";import{c as s}from"../../../../../chunks/vec3f64.js";import
|
|
5
|
+
import{s as n,b as t,f as e,n as o}from"../../../../../chunks/vec3.js";import{c as s}from"../../../../../chunks/vec3f64.js";import i from"../../../../Point.js";function r(n,t){if(n.components)for(const e of n.components)e.faces&&"smooth"===e.shading&&a(e,t)}function a(s,i){null==i.normal&&(i.normal=new Float32Array(i.position.length));const r=s.faces,{position:a,normal:c}=i,h=r.length/3;for(let o=0;o<h;++o){const s=3*r[3*o],i=3*r[3*o+1],p=3*r[3*o+2],h=n(f,a[s],a[s+1],a[s+2]),u=n(l,a[i],a[i+1],a[i+2]),g=n(m,a[p],a[p+1],a[p+2]),x=t(u,u,h),v=t(g,g,h),R=e(x,x,v);c[s]+=R[0],c[s+1]+=R[1],c[s+2]+=R[2],c[i]+=R[0],c[i+1]+=R[1],c[i+2]+=R[2],c[p]+=R[0],c[p+1]+=R[1],c[p+2]+=R[2]}for(let t=0;t<c.length;t+=3)n(p,c[t],c[t+1],c[t+2]),o(p,p),c[t]=p[0],c[t+1]=p[1],c[t+2]=p[2]}function c(n){const{vertexSpace:t}=n;if(t.isRelative)return t.getOriginPoint(n.spatialReference);const{extent:e}=n,o=e.xmax-e.width/2,s=e.ymax-e.height/2,r=e.zmin;return new i({x:o,y:s,z:r,spatialReference:e.spatialReference})}const f=s(),l=s(),m=s(),p=s();export{c as computeOrigin,r as smoothNormals};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../../../core/Logger.js";import{getOrCreateMapValue as t}from"../../../../../core/MapUtils.js";import{deg2rad as s}from"../../../../../core/mathUtils.js";import{j as r}from"../../../../../chunks/quat.js";import{I as i,b as a}from"../../../../../chunks/quatf64.js";import{k as o}from"../../../../../chunks/vec3.js";import{Z as n,a as l,O as c}from"../../../../../chunks/vec3f64.js";import h from"../../../
|
|
5
|
+
import e from"../../../../../core/Logger.js";import{getOrCreateMapValue as t}from"../../../../../core/MapUtils.js";import{deg2rad as s}from"../../../../../core/mathUtils.js";import{j as r}from"../../../../../chunks/quat.js";import{I as i,b as a}from"../../../../../chunks/quatf64.js";import{k as o}from"../../../../../chunks/vec3.js";import{Z as n,a as l,O as c}from"../../../../../chunks/vec3f64.js";import h from"../../../MeshGeoreferencedRelativeVertexSpace.js";import u from"../../../MeshGeoreferencedVertexSpace.js";import f from"../../../MeshMaterialMetallicRoughness.js";import{ungeoreferenceByTransform as m}from"../../georeference.js";import{Buffer as p}from"./buffer.js";import{computeOrigin as d,smoothNormals as g}from"./geometry.js";import{BufferOutputType as _,ImageOutputType as x,AttributeType as T,TargetBuffer as R,AlphaMode as A}from"./types.js";import{imageToArrayBuffer as b,imageToDataURI as E}from"./imageutils.js";import{isEncodedMeshTexture as M}from"../../../../../views/3d/glTF/internal/resourceUtils.js";import{DataType as O,TextureWrapMode as w}from"../../../../../views/webgl/enums.js";const I=e.getLogger("gltf");class N{constructor(e,t,s){this.params={},this._materialMap=new Array,this._imageMap=new Map,this._textureMap=new Map,this.gltf={asset:{version:"2.0",copyright:e.copyright,generator:e.generator},extras:{options:t,binChunkBuffer:null,promises:[]}},s&&(this.params=s),this._addScenes(e)}_addScenes(e){this.gltf.scene=e.defaultScene;const t=this.gltf.extras,s=t.options.bufferOutputType===_.GLB||t.options.imageOutputType===x.GLB;s&&(t.binChunkBuffer=new p(this.gltf)),e.forEachScene((e=>{this._addScene(e)})),s&&t.binChunkBuffer.finalize()}_addScene(e){this.gltf.scenes||(this.gltf.scenes=[]);const t={};e.name&&(t.name=e.name),e.forEachNode((e=>{t.nodes||(t.nodes=[]);const s=this._addNode(e);t.nodes.push(s)})),this.gltf.scenes.push(t)}_addNode(e){this.gltf.nodes||(this.gltf.nodes=[]);const t={};e.name&&(t.name=e.name);const s=e.translation;o(s,n)||(t.translation=l(s));const h=e.rotation;r(h,i)||(t.rotation=a(h));const u=e.scale;o(u,c)||(t.scale=l(u)),e.mesh&&e.mesh.vertexAttributes.position?t.mesh=this._addMesh(e.mesh):e.forEachNode((e=>{t.children||(t.children=[]);const s=this._addNode(e);t.children.push(s)}));const f=this.gltf.nodes.length;return this.gltf.nodes.push(t),f}_addMesh(e){this.gltf.meshes||(this.gltf.meshes=[]);const t={primitives:[]},s=this.gltf.extras,r=s.options.bufferOutputType===_.GLB;let i;i=r?s.binChunkBuffer:new p(this.gltf),this.params.origin||(this.params.origin=d(e));const{ignoreLocalTransform:a}=this.params,o=a?null:e.transform,{vertexSpace:n}=e,c=a?n.isRelative?new h({origin:l(n.origin)}):new u:n,f=m(e.vertexAttributes,c,o,this.params.origin,{geographic:this.params.geographic,unit:"meters"});g(e,f),this._flipYZAxis(f);const x=i.addBufferView(O.FLOAT,T.VEC3,R.ARRAY_BUFFER);let A,b,E,M;f.normal&&(A=i.addBufferView(O.FLOAT,T.VEC3,R.ARRAY_BUFFER)),e.vertexAttributes.uv&&(b=i.addBufferView(O.FLOAT,T.VEC2,R.ARRAY_BUFFER)),f.tangent&&(E=i.addBufferView(O.FLOAT,T.VEC4,R.ARRAY_BUFFER)),e.vertexAttributes.color&&(M=i.addBufferView(O.UNSIGNED_BYTE,T.VEC4,R.ARRAY_BUFFER)),x.startAccessor("POSITION"),A&&A.startAccessor("NORMAL"),b&&b.startAccessor("TEXCOORD_0"),E&&E.startAccessor("TANGENT"),M&&M.startAccessor("COLOR_0");const w=f.position.length/3,{position:I,normal:N,tangent:B}=f,{color:C,uv:v}=e.vertexAttributes;for(let l=0;l<w;++l)x.push(I[3*l]),x.push(I[3*l+1]),x.push(I[3*l+2]),A&&null!=N&&(A.push(N[3*l]),A.push(N[3*l+1]),A.push(N[3*l+2])),b&&null!=v&&(b.push(v[2*l]),b.push(v[2*l+1])),E&&null!=B&&(E.push(B[4*l]),E.push(B[4*l+1]),E.push(B[4*l+2]),E.push(B[4*l+3])),M&&null!=C&&(M.push(C[4*l]),M.push(C[4*l+1]),M.push(C[4*l+2]),M.push(C[4*l+3]));const S=x.endAccessor(),L=this._addAccessor(x.index,S);let F,y,k,V,j;if(A){const e=A.endAccessor();F=this._addAccessor(A.index,e)}if(b){const e=b.endAccessor();y=this._addAccessor(b.index,e)}if(E){const e=E.endAccessor();k=this._addAccessor(E.index,e)}if(M){const e=M.endAccessor();V=this._addAccessor(M.index,e)}e.components&&e.components.length>0&&e.components[0].faces?(j=i.addBufferView(O.UNSIGNED_INT,T.SCALAR,R.ELEMENT_ARRAY_BUFFER),this._addMeshVertexIndexed(j,e.components,t,L,F,y,k,V)):this._addMeshVertexNonIndexed(e.components,t,L,F,y,k,V),x.finalize(),A&&A.finalize(),b&&b.finalize(),E&&E.finalize(),j&&j.finalize(),M&&M.finalize(),r||i.finalize();const D=this.gltf.meshes.length;return this.gltf.meshes.push(t),D}_flipYZAxis({position:e,normal:t,tangent:s}){this._flipYZBuffer(e,3),this._flipYZBuffer(t,3),this._flipYZBuffer(s,4)}_flipYZBuffer(e,t){if(null!=e)for(let s=1,r=2;s<e.length;s+=t,r+=t){const t=e[s],i=e[r];e[s]=i,e[r]=-t}}_addMaterial(e){if(null===e)return;const t=this._materialMap.indexOf(e);if(-1!==t)return t;this.gltf.materials||(this.gltf.materials=[]);const s={};switch(e.alphaMode){case"mask":s.alphaMode=A.MASK;break;case"auto":case"blend":s.alphaMode=A.BLEND}.5!==e.alphaCutoff&&(s.alphaCutoff=e.alphaCutoff),e.doubleSided&&(s.doubleSided=e.doubleSided),s.pbrMetallicRoughness={};const r=e=>e**2.1,i=e=>{const t=e.toRgba();return t[0]=r(t[0]/255),t[1]=r(t[1]/255),t[2]=r(t[2]/255),t};if(null!=e.color&&(s.pbrMetallicRoughness.baseColorFactor=i(e.color)),null!=e.colorTexture&&(s.pbrMetallicRoughness.baseColorTexture=this._createTextureInfo(e.colorTexture,e.colorTextureTransform)),null!=e.normalTexture&&(s.normalTexture=this._createTextureInfo(e.normalTexture,e.normalTextureTransform)),e instanceof f){if(null!=e.emissiveTexture&&(s.emissiveTexture=this._createTextureInfo(e.emissiveTexture,e.emissiveTextureTransform)),null!=e.emissiveColor){const t=i(e.emissiveColor);s.emissiveFactor=[t[0],t[1],t[2]]}null!=e.occlusionTexture&&(s.occlusionTexture=this._createTextureInfo(e.occlusionTexture,e.occlusionTextureTransform)),null!=e.metallicRoughnessTexture&&(s.pbrMetallicRoughness.metallicRoughnessTexture=this._createTextureInfo(e.metallicRoughnessTexture,e.metallicRoughnessTextureTransform)),s.pbrMetallicRoughness.metallicFactor=e.metallic,s.pbrMetallicRoughness.roughnessFactor=e.roughness}else s.pbrMetallicRoughness.metallicFactor=1,s.pbrMetallicRoughness.roughnessFactor=1,I.warnOnce("Meshes exported to GLTF without MeshMaterialMetallicRoughness material will appear different when imported back.");const a=this.gltf.materials.length;return this.gltf.materials.push(s),this._materialMap.push(e),a}_createTextureInfo(e,t){const r={index:this._addTexture(e)};return t?(r.extensions||(r.extensions={}),r.extensions.KHR_texture_transform={scale:t.scale,offset:t.offset,rotation:s(t.rotation)},r):r}_addTexture(e){const s=this.gltf.textures??[];return this.gltf.textures=s,t(this._textureMap,e,(()=>{const t={sampler:this._addSampler(e),source:this._addImage(e)},r=s.length;return s.push(t),r}))}_addImage(e){const t=this._imageMap.get(e);if(null!=t)return t;this.gltf.images||(this.gltf.images=[]);const s={};if(e.url)s.uri=e.url;else{const t=e.data;s.extras=t;for(let e=0;e<this.gltf.images.length;++e)if(t===this.gltf.images[e].extras)return e;const r=this.gltf.extras;switch(r.options.imageOutputType){case x.GLB:{const e=r.binChunkBuffer.addBufferView(O.UNSIGNED_BYTE,T.SCALAR);if(M(t))null!=t.data&&e.writeOutToBuffer(t.data,0);else{const r=b(t).then((({data:e,type:t})=>(s.mimeType=t,e)));e.writeAsync(r).then((()=>{e.finalize()}))}s.bufferView=e.index;break}case x.DataURI:if(M(t)){I.warnOnce("Image export for basis compressed textures not available.");break}s.uri=E(t);break;default:if(M(t)){I.warnOnce("Image export for basis compressed textures not available.");break}r.promises.push(b(t).then((({data:e,type:t})=>{s.uri=e,s.mimeType=t})))}}const r=this.gltf.images.length;return this.gltf.images.push(s),this._imageMap.set(e,r),r}_addSampler(e){this.gltf.samplers||(this.gltf.samplers=[]);let t=w.REPEAT,s=w.REPEAT;if("string"==typeof e.wrap)switch(e.wrap){case"clamp":t=w.CLAMP_TO_EDGE,s=w.CLAMP_TO_EDGE;break;case"mirror":t=w.MIRRORED_REPEAT,s=w.MIRRORED_REPEAT}else{switch(e.wrap.vertical){case"clamp":s=w.CLAMP_TO_EDGE;break;case"mirror":s=w.MIRRORED_REPEAT}switch(e.wrap.horizontal){case"clamp":t=w.CLAMP_TO_EDGE;break;case"mirror":t=w.MIRRORED_REPEAT}}const r={wrapS:t,wrapT:s};for(let a=0;a<this.gltf.samplers.length;++a)if(JSON.stringify(r)===JSON.stringify(this.gltf.samplers[a]))return a;const i=this.gltf.samplers.length;return this.gltf.samplers.push(r),i}_addAccessor(e,t){this.gltf.accessors||(this.gltf.accessors=[]);const s={bufferView:e,byteOffset:t.byteOffset,componentType:t.componentType,count:t.count,type:t.type,min:t.min,max:t.max,name:t.name};t.normalized&&(s.normalized=!0);const r=this.gltf.accessors.length;return this.gltf.accessors.push(s),r}_addMeshVertexIndexed(e,t,s,r,i,a,o,n){for(const l of t){e.startAccessor("INDICES");for(let s=0;s<l.faces.length;++s)e.push(l.faces[s]);const t=e.endAccessor(),c={attributes:{POSITION:r},indices:this._addAccessor(e.index,t),material:this._addMaterial(l.material)};i&&"flat"!==l.shading&&(c.attributes.NORMAL=i),a&&(c.attributes.TEXCOORD_0=a),o&&"flat"!==l.shading&&(c.attributes.TANGENT=o),n&&(c.attributes.COLOR_0=n),s.primitives.push(c)}}_addMeshVertexNonIndexed(e,t,s,r,i,a,o){const n={attributes:{POSITION:s}};r&&(n.attributes.NORMAL=r),i&&(n.attributes.TEXCOORD_0=i),a&&(n.attributes.TANGENT=a),o&&(n.attributes.COLOR_0=o),e&&(n.material=this._addMaterial(e[0].material)),t.primitives.push(n)}}export{N as GLTF};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
function r(r
|
|
5
|
+
import e from"../../../core/Logger.js";function r(e,r){return e.isGeographic||e.isWebMercator&&(r?.geographic??!0)}function o(r,o,g){const i=!r.isGeoreferenced;null!=g?.geographic&&g.geographic!==i&&e.getLogger(o).warnOnce(`Specifying the 'geographic' parameter (${g.geographic}) for a Mesh vertex space of type "${r.type}" is not supported. This parameter will be ignored.`)}export{r as isGeographicMesh,o as validateGeographicFlag};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{getMetersPerUnitForSR as n,getMetersPerVerticalUnitForSR as t,convertUnit as
|
|
5
|
+
import{getMetersPerUnitForSR as n,getMetersPerVerticalUnitForSR as t,convertUnit as e}from"../../../core/unitUtils.js";import{c as r}from"../../../chunks/mat3f64.js";import{m as o,j as i,a,k as l}from"../../../chunks/mat4.js";import{I as s,c}from"../../../chunks/mat4f64.js";import{Z as u,f}from"../../../chunks/vec3f64.js";import{b as p}from"../../../chunks/mat3.js";import{computeTranslationToOriginAndRotation as m,projectBuffer as g}from"../../projection.js";import{getSphericalPCPF as h}from"../../spatialReferenceEllipsoidUtils.js";import{newDoubleArray as j,doubleArrayFrom as y}from"../DoubleArray.js";import w from"../MeshGeoreferencedRelativeVertexSpace.js";import v from"../MeshGeoreferencedVertexSpace.js";import A from"../MeshLocalVertexSpace.js";import R from"../MeshTransform.js";import{t as x,a as F}from"../../../chunks/vec32.js";import{isGeographicMesh as z}from"./geographicUtils.js";import{transformNormal as k,transformTangent as G,projectFromPCPF as M,projectNormalFromPCPF as d,projectTangentFromPCPF as S,projectToPCPF as b,projectNormalToPCPF as U,projectTangentToPCPF as V}from"./projection.js";function O(n,t,e){return z(t.spatialReference,e)?L(n,t,e):I(n,t,e)}function P(n,t,e,r){const{position:o,normal:i,tangent:a}=n;if(!t.isRelative)return{position:o,normal:i,tangent:a};const l=e?.localMatrix??s;return O({position:x(new Float64Array(o.length),o,l),normal:null!=i?k(i,new Float32Array(i.length),l):null,tangent:null!=a?G(a,new Float32Array(a.length),l):null},t.getOriginPoint(r),{geographic:!t.isGeoreferenced})}function T(n,t,e){if(e?.useTransform){const{position:r,normal:o,tangent:i}=n,{x:a,y:l,z:s}=t,c=f(a,l,s??0);return{vertexAttributes:{position:r,normal:o,tangent:i},vertexSpace:e.geographic??1?new A({origin:c}):new w({origin:c}),transform:new R}}return{vertexAttributes:O(n,t,e),vertexSpace:new v,transform:null}}function q(n,t,e){return z(t.spatialReference,e)?J(n,t,e):H(n,t,e)}function D(n,t,e,r,o){if(!t.isRelative)return q(n,r,o);const{spatialReference:i}=r,a=P(n,t,e,i);return r.equals(t.getOriginPoint(i))?H(a,r,o):q(a,r,o)}function E(n,t,e,r){const a=t.isRelative?t.origin:u,l=t.isRelative?n?.localMatrix??s:s;if(!t.isGeoreferenced){const n=r,t=h(n);m(n,a,Y,t),o(Y,Y,l);const i=j(e.length);return x(i,e,Y),g(i,t,0,i,n,0,i.length/3),i}const c=i(l,s)?y(e):x(j(e.length),e,l);for(let o=0;o<c.length;o+=3)c[o]+=a[0],c[o+1]+=a[1],c[o+2]+=a[2];return c}function I(n,t,e){const r=new Float64Array(n.position.length),o=n.position,i=t.x,a=t.y,l=t.z??0,{horizontal:s,vertical:c}=X(e?e.unit:null,t.spatialReference);for(let u=0;u<o.length;u+=3)r[u]=o[u]*s+i,r[u+1]=o[u+1]*s+a,r[u+2]=o[u+2]*c+l;return{position:r,normal:n.normal,tangent:n.tangent}}function L(n,t,e){const r=t.spatialReference,o=K(t,e,Y),i=new Float64Array(n.position.length),a=Z(n.position,o,r,i),l=p(_,o);return{position:a,normal:B(a,i,n.normal,l,r),tangent:C(a,i,n.tangent,l,r)}}function Z(n,t,e,r){x(r,n,t);const o=new Float64Array(n.length);return M(r,o,e)}function B(n,t,e,r,o){if(null==e)return null;const i=new Float32Array(e.length);return F(i,e,r),d(i,n,t,o,i),i}function C(n,t,e,r,o){if(null==e)return null;const i=new Float32Array(e.length);F(i,e,r,4);for(let a=3;a<i.length;a+=4)i[a]=e[a];return S(i,n,t,o,i),i}function H(n,t,e){const r=new Float64Array(n.position.length),o=n.position,i=t.x,a=t.y,l=t.z??0,{horizontal:s,vertical:c}=X(e?e.unit:null,t.spatialReference);for(let u=0;u<o.length;u+=3)r[u]=(o[u]-i)/s,r[u+1]=(o[u+1]-a)/s,r[u+2]=(o[u+2]-l)/c;return{position:r,normal:n.normal,tangent:n.tangent}}function J(n,t,e){const r=t.spatialReference;K(t,e,Y);const o=a($,Y),i=new Float64Array(n.position.length),l=N(n.position,r,o,i),s=p(_,o);return{position:l,normal:Q(n.normal,n.position,i,r,s),tangent:W(n.tangent,n.position,i,r,s)}}function K(n,t,e){m(n.spatialReference,[n.x,n.y,n.z??0],e,h(n.spatialReference));const{horizontal:r,vertical:o}=X(t?t.unit:null,n.spatialReference);return l(e,e,[r,r,o]),e}function N(n,t,e,r){const o=b(n,t,r),i=new Float64Array(o.length);return x(i,o,e),i}function Q(n,t,e,r,o){if(null==n)return null;const i=U(n,t,e,r,new Float32Array(n.length));return F(i,i,o),i}function W(n,t,e,r,o){if(null==n)return null;const i=V(n,t,e,r,new Float32Array(n.length));return F(i,i,o,4),i}function X(r,o){if(null==r)return nn;const i=o.isGeographic?1:n(o),a=o.isGeographic?1:t(o),l=e(1,r,"meters");return{horizontal:l*i,vertical:l*a}}const Y=c(),$=c(),_=r(),nn={horizontal:1,vertical:1};export{O as georeference,P as georeferenceApplyTransform,T as georeferenceByTransform,E as project,q as ungeoreference,D as ungeoreferenceByTransform};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../Color.js";import t from"../../../request.js";import{getOrCreateMapValue as r}from"../../../core/MapUtils.js";import{hasScaling as o,rad2deg as n}from"../../../core/mathUtils.js";import{b as s}from"../../../chunks/mat3.js";import{c as
|
|
5
|
+
import e from"../../../Color.js";import t from"../../../request.js";import{getOrCreateMapValue as r}from"../../../core/MapUtils.js";import{hasScaling as o,rad2deg as n}from"../../../core/mathUtils.js";import{b as s}from"../../../chunks/mat3.js";import{c as a}from"../../../chunks/mat3f64.js";import{f as l}from"../../../chunks/vec3f64.js";import{f as i}from"../../../chunks/vec4f64.js";import u from"../MeshComponent.js";import c from"../MeshMaterialMetallicRoughness.js";import f from"../MeshTexture.js";import m from"../MeshTextureTransform.js";import{MeshVertexAttributes as p}from"../MeshVertexAttributes.js";import{BufferViewVec4f as d,BufferViewVec4u8 as g,BufferViewVec4u16 as x,BufferViewVec3u8 as T,BufferViewVec3f as h,BufferViewVec3u16 as v,BufferViewVec3f64 as w,BufferViewVec2f as j}from"../buffer/BufferView.js";import{c as b,b as y,d as M,e as C}from"../../../chunks/vec32.js";import{a as A,n as R,b as E}from"../../../chunks/vec42.js";import{createBuffer as k}from"../buffer/utils.js";import{georeferenceByTransform as B}from"./georeference.js";import{DefaultLoadingContext as F}from"../../../views/3d/glTF/DefaultLoadingContext.js";import{loadGLTF as $}from"../../../views/3d/glTF/loader.js";import{convertPrimitiveToTriangles as S}from"../../../views/3d/glTF/internal/indexUtils.js";import{isEncodedMeshTexture as O}from"../../../views/3d/glTF/internal/resourceUtils.js";import{COLOR_GAMMA as U}from"../../../views/3d/webgl-engine/materials/DefaultMaterial_COLOR_GAMMA.js";import{TextureWrapMode as D}from"../../../views/webgl/enums.js";import{f as L,a as _}from"../../../chunks/vec33.js";import{f as I,a as P}from"../../../chunks/vec43.js";import{a as V,f as q}from"../../../chunks/vec22.js";async function N(e,t,r){const o={...r,useTransform:r?.useTransform??!0},n=new F(z(o)),s=(await $(n,t,o,!0)).model,a=s.lods.shift(),l=new Map,i=new Map;s.textures.forEach(((e,t)=>l.set(t,H(e)))),s.materials.forEach(((e,t)=>i.set(t,J(e,l))));const u=Q(a);for(const p of u.parts)W(u,p,i);const{position:c,normal:f,tangent:m,color:d,texCoord0:g}=u.vertexAttributes,x={position:c.typedBuffer,normal:null!=f?f.typedBuffer:null,tangent:null!=m?m.typedBuffer:null,uv:null!=g?g.typedBuffer:null,color:null!=d?d.typedBuffer:null},T=B(x,e,o);return{transform:T.transform,vertexSpace:T.vertexSpace,components:u.components,spatialReference:e.spatialReference,vertexAttributes:new p({position:T.vertexAttributes.position,normal:T.vertexAttributes.normal,tangent:T.vertexAttributes.tangent,color:x.color,uv:x.uv})}}function z(e){const r=e?.resolveFile;return r?{busy:!1,request:async(e,o,n)=>{const s=r(e),a="image"===o?"image":"binary"===o?"array-buffer":"json";return(await t(s,{responseType:a,signal:null!=n?n.signal:null})).data}}:null}function G(e,t){if(null==e)return"-";const o=e.typedBuffer;return`${r(t,o.buffer,(()=>t.size))}/${o.byteOffset}/${o.byteLength}`}function K(e){return null!=e?e.toString():"-"}function Q(e){let t=0;const has={color:!1,tangent:!1,normal:!1,texCoord0:!1},o=new Map,n=new Map,s=[];for(const a of e.parts){const{attributes:{position:e,normal:l,color:i,tangent:u,texCoord0:c}}=a,f=`\n ${G(e,o)}/\n ${G(l,o)}/\n ${G(i,o)}/\n ${G(u,o)}/\n ${G(c,o)}/\n ${K(a.transform)}\n `;let m=!1;const p=r(n,f,(()=>(m=!0,{start:t,length:e.count})));m&&(t+=e.count),l&&(has.normal=!0),i&&(has.color=!0),u&&(has.tangent=!0),c&&(has.texCoord0=!0),s.push({gltf:a,writeVertices:m,region:p})}return{vertexAttributes:{position:k(w,t),normal:has.normal?k(h,t):null,tangent:has.tangent?k(d,t):null,color:has.color?k(g,t):null,texCoord0:has.texCoord0?k(j,t):null},parts:s,components:[]}}function H(e){return new f({data:(O(e.data),e.data),wrap:Z(e.parameters.wrap)})}function J(t,r){const o=new e(re(t.color,t.opacity)),s=t.emissiveFactor?new e(oe(t.emissiveFactor)):null,a=e=>e?new m({scale:e.scale?[e.scale[0],e.scale[1]]:[1,1],rotation:n(e.rotation??0),offset:e.offset?[e.offset[0],e.offset[1]]:[0,0]}):null;return new c({color:o,colorTexture:r.get(t.textureColor),normalTexture:r.get(t.textureNormal),emissiveColor:s,emissiveTexture:r.get(t.textureEmissive),occlusionTexture:r.get(t.textureOcclusion),alphaMode:Y(t.alphaMode),alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,metallic:t.metallicFactor,roughness:t.roughnessFactor,metallicRoughnessTexture:r.get(t.textureMetallicRoughness),colorTextureTransform:a(t.colorTextureTransform),normalTextureTransform:a(t.normalTextureTransform),occlusionTextureTransform:a(t.occlusionTextureTransform),emissiveTextureTransform:a(t.emissiveTextureTransform),metallicRoughnessTextureTransform:a(t.metallicRoughnessTextureTransform)})}function W(e,t,r){t.writeVertices&&X(e,t);const{indices:o,attributes:n,primitiveType:s,material:a}=t.gltf;let l=S(o||n.position.count,s);const i=t.region.start;if(i){const e=new Uint32Array(l);for(let t=0;t<l.length;t++)e[t]+=i;l=e}e.components.push(new u({faces:l,material:r.get(a),trustSourceNormals:!0}))}function X(e,t){const{position:r,normal:n,tangent:l,color:i,texCoord0:u}=e.vertexAttributes,c=t.region.start,{attributes:f,transform:m}=t.gltf,p=f.position.count;if(b(r.slice(c,p),f.position,m),null!=f.normal&&null!=n){const e=s(a(),m),t=n.slice(c,p);y(t,f.normal,e),o(e)&&M(t,t)}else null!=n&&L(n,0,0,1,{dstIndex:c,count:p});if(null!=f.tangent&&null!=l){const e=s(a(),m),t=l.slice(c,p);A(t,f.tangent,e),o(e)&&R(t,t)}else null!=l&&I(l,0,0,1,1,{dstIndex:c,count:p});if(null!=f.texCoord0&&null!=u?V(u.slice(c,p),f.texCoord0):null!=u&&q(u,0,0,{dstIndex:c,count:p}),null!=f.color&&null!=i){const e=f.color,t=i.slice(c,p);if(4===e.elementCount)e instanceof d?E(t,e,255):e instanceof g?P(t,e):e instanceof x&&E(t,e,1/256);else{I(t,255,255,255,255);const r=T.fromTypedArray(t.typedBuffer,t.typedBufferStride);e instanceof h?C(r,e,255):e instanceof T?_(r,e):e instanceof v&&C(r,e,1/256)}}else null!=i&&I(i.slice(c,p),255,255,255,255)}function Y(e){switch(e){case"OPAQUE":return"opaque";case"MASK":return"mask";case"BLEND":return"blend"}}function Z(e){return{horizontal:ee(e.s),vertical:ee(e.t)}}function ee(e){switch(e){case D.CLAMP_TO_EDGE:return"clamp";case D.MIRRORED_REPEAT:return"mirror";case D.REPEAT:return"repeat"}}function te(e){return e**(1/U)*255}function re(e,t){return i(te(e[0]),te(e[1]),te(e[2]),t)}function oe(e){return l(te(e[0]),te(e[1]),te(e[2]))}export{N as loadGLTFMesh};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../core/Logger.js";import{
|
|
5
|
+
import e from"../../../core/Logger.js";import{F as t,a as n,g as r}from"../../../chunks/vec3.js";import{c as o}from"../../../chunks/vec3f64.js";import i from"../MeshComponent.js";import s from"../MeshTransform.js";import{MeshVertexAttributes as l}from"../MeshVertexAttributes.js";import{georeferenceApplyTransform as a,ungeoreference as c}from"./georeference.js";const f=e.getLogger("esri.geometry.support.triangleMeshMerge");function u(e,t){if(0===e.length)return f.error("merge()","Must specify one more geometries to merge"),null;const n=e[0].spatialReference;for(const c of e){if(!c.spatialReference.equals(n))return f.error("merge()","Geometries must all be in the same spatial reference"),null;if(!c.loaded)return f.error("merge()","Geometries must all be loaded before merging"),null}const r=p(e);if(null==r)return null;const o=w(e),i=[],s={position:0,uv:0,normal:0,tangent:0,color:0},l=new Map,a=new Map;for(const c of e){const e=m(c,r);if(t&&t.reuseMaterials&&c.components)for(const t of c.components)t.material&&l.set(t.material,t.material);h(c,s,l,a,i),x("position",e,o,s,0),x("normal",e,o,s,0),x("tangent",e,o,s,0),x("uv",c.vertexAttributes,o,s,0),x("color",c.vertexAttributes,o,s,255)}return{vertexAttributes:o,components:i,vertexSpace:r.vertexSpace,transform:r.transform,spatialReference:n}}function p(e){let i=null,l=null,a=!0,c=!0,u=null;const p=o();let m=0;for(const r of e){const{vertexSpace:e,transform:o}=r;if(null==l&&(l=e,l.isRelative&&(u=l.origin)),l.type!==e.type)return f.error("merge()",`Inconsistent mesh vertex space for provided geometries. One was ${l.type} while another is ${e.type}. Unable to merge geometries.`),null;if(null==i||null!=o&&o.equals(i)||(a=!1),null!=o&&null==i&&(i=o),e.isRelative){const{origin:r}=e;u&&!t(r,u)&&(c=!1),m++,n(p,p,e.origin)}}if(null==l)throw new Error;const g=l.clone();if(!g.isRelative)return{transform:null,vertexSpace:g,rebake:!1};if(c&&a)return{transform:i?.clone(),vertexSpace:g,rebake:!1};const v=r(p,p,1/m);return g.origin=v,{transform:new s,vertexSpace:g,rebake:!0}}function m(e,t){if(!t.rebake)return e.vertexAttributes;const n=e.vertexSpace,r=t.vertexSpace;if(n.type!==r.type)throw new Error;const o=a(e.vertexAttributes,n,e.transform,e.spatialReference);return c(o,r.getOriginPoint(e.spatialReference),{geographic:!r.isGeoreferenced})}function g(e,t){return t.normal>0&&!e.vertexAttributes.normal}function v(e,t,n){g(e,t)&&"source"===n.shading&&(n.shading="flat")}function h(e,t,n,r,o){if(e.components)for(const i of e.components){const s=i.cloneWithDeduplication(n,r),l=t.position/3;if(s.faces)for(let e=0;e<s.faces.length;e++)s.faces[e]+=l;else{s.faces=new Uint32Array(e.vertexAttributes.position.length/3);for(let e=0;e<s.faces.length;e++)s.faces[e]=e+l}v(e,t,s),o.push(s)}else if(e.vertexAttributes&&e.vertexAttributes.position){const n=e.vertexAttributes.position.length/3,r=new Uint32Array(n),s=t.position/3;for(let e=0;e<n;e++)r[e]=e+s;const l=new i({faces:r});v(e,t,l),o.push(l)}}function x(e,t,n,r,o){if(!t)return;const i=t.position;if(!i)return;const s=t[e],l=n[e];if(null==s){let t=r[e];const n=y[e];if(null!=l){for(let e=0;e<i.length;e+=3)for(let r=0;r<n;r++)l[t++]=o;r[e]=t}}else null!=l&&null!=s&&(b(s,0,l,r[e],s.length),r[e]+=s.length)}function b(e,t,n,r,o){for(let i=0;i<o;i++)n[r++]=e[t++];return n}function A(e){let t=!1,n=!1,r=!1,o=!1;for(const i of e){const e=i.vertexAttributes;if(e&&e.position&&(e.uv&&(t=!0),e.normal&&(n=!0),e.tangent&&(o=!0),e.color&&(r=!0),n&&t&&r&&o))break}return{normal:n,uv:t,color:r,tangent:o}}function w(e){let t=0,n=0,r=0,o=0,i=0;const s=A(e);for(const l of e){const e=l.vertexAttributes;e&&e.position&&(t+=e.position.length,s.uv&&(n+=e.position.length/y.position*y.uv),s.normal&&(r+=e.position.length/y.position*y.normal),s.color&&(o+=e.position.length/y.position*y.color),s.tangent&&(i+=e.position.length/y.position*y.tangent))}return new l({position:new Float64Array(t),uv:n?new Float32Array(n):null,normal:r?new Float32Array(r):null,tangent:i?new Float32Array(i):null,color:o?new Uint8Array(o):null})}const y={position:3,normal:3,tangent:4,uv:2,color:4};export{u as merge};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import{f as t}from"../../../chunks/mat3.js";import{c as e}from"../../../chunks/mat3f64.js";import{c as r}from"../../../chunks/mat4f64.js";import{a as n,t as o}from"../../../chunks/vec3.js";import{c as i}from"../../../chunks/vec3f64.js";import{computeTranslationToOriginAndRotation as s}from"../../projection.js";import{getSphericalPCPF as l}from"../../spatialReferenceEllipsoidUtils.js";import{validateGeographicFlag as u,isGeographicMesh as a}from"./geographicUtils.js";import{projectToPCPF as c,projectNormalToPCPF as f,projectTangentToPCPF as m,projectFromPCPF as p,projectNormalFromPCPF as h,projectTangentFromPCPF as g}from"./projection.js";const v="esri.geometry.support.meshUtils.offset";function x(t,e,r){if(!t.vertexAttributes||!t.vertexAttributes.position)return;const{vertexSpace:n}=t;if(n.isRelative)u(n,v,r),j(n,e);else{a(t.spatialReference,r)?A(t,e):b(t,e)}}function j(t,e){const r=t.origin;t.origin=n(i(),r,e)}function A(e,r){const n=e.spatialReference,i=e.vertexAttributes.position,u=e.vertexAttributes.normal,a=e.vertexAttributes.tangent,v=new Float64Array(i.length),x=null!=u?new Float32Array(u.length):null,j=null!=a?new Float32Array(a.length):null,A=e.extent.center,b=y;s(n,[A.x,A.y,A.z],R,l(n)),t(d,R),o(b,r,d),c(i,n,v),null!=u&&null!=x&&f(u,i,v,n,x),null!=a&&null!=j&&m(a,i,v,n,j),k(v,b),p(v,i,n),null!=u&&null!=x&&h(x,i,v,n,u),null!=a&&null!=j&&g(j,i,v,n,a),e.vertexAttributesChanged()}function b(t,e){k(t.vertexAttributes.position,e),t.vertexAttributesChanged()}function k(t,e){if(t)for(let r=0;r<t.length;r+=3)for(let n=0;n<3;n++)t[r+n]+=e[n]}const y=i(),R=r(),d=e();export{x as offset};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{c as t}from"../../../chunks/mat3f64.js";import{t as e,n}from"../../../chunks/vec3.js";import{c as r}from"../../../chunks/vec3f64.js";import o from"../MeshComponent.js";import{MeshVertexAttributes as s}from"../MeshVertexAttributes.js";import{georeferenceByTransform as a}from"./georeference.js";function i(){const{faceDescriptions:t,faceVertexOffsets:e,uvScales:n}=
|
|
5
|
+
import{c as t}from"../../../chunks/mat3f64.js";import{t as e,n}from"../../../chunks/vec3.js";import{c as r}from"../../../chunks/vec3f64.js";import o from"../MeshComponent.js";import{MeshVertexAttributes as s}from"../MeshVertexAttributes.js";import{georeferenceByTransform as a}from"./georeference.js";function i(){const{faceDescriptions:t,faceVertexOffsets:e,uvScales:n}=y,r=4*t.length,o=new Float64Array(3*r),s=new Float32Array(3*r),a=new Float32Array(2*r),i=new Uint32Array(2*t.length*3);let l=0,c=0,f=0,u=0;for(let h=0;h<t.length;h++){const r=t[h],p=l/3;for(const t of e)i[u++]=p+t;const w=r.corners;for(let t=0;t<4;t++){const e=w[t];let i=0;a[f++]=.25*n[t][0]+r.uvOrigin[0],a[f++]=r.uvOrigin[1]-.25*n[t][1];for(let t=0;t<3;t++)0!==r.axis[t]?(o[l++]=.5*r.axis[t],s[c++]=r.axis[t]):(o[l++]=.5*e[i++],s[c++]=0)}}return{position:o,normal:s,uv:a,faces:i}}function l(t,e){const n=t.components[0],r=n.faces,s=d[e],a=6*s,i=new Array(6),l=new Array(r.length-6);let c=0,f=0;for(let o=0;o<r.length;o++)o>=a&&o<a+6?i[c++]=r[o]:l[f++]=r[o];if(null!=t.vertexAttributes.uv){const e=new Float32Array(t.vertexAttributes.uv),n=4*s*2,r=[0,1,1,1,1,0,0,0];for(let t=0;t<r.length;t++)e[n+t]=r[t];t.vertexAttributes.uv=e}return t.components=[new o({faces:i,material:n.material}),new o({faces:l})],t}function c(t=0){const e=Math.round(8*2**t),n=2*e,r=(e-1)*(n+1)+2*n,o=new Float64Array(3*r),s=new Float32Array(3*r),a=new Float32Array(2*r),i=new Uint32Array(3*((e-1)*n*2));let l=0,c=0,f=0,u=0;for(let h=0;h<=e;h++){const t=h/e*Math.PI+.5*Math.PI,r=Math.cos(t),p=Math.sin(t);M[2]=p;const w=0===h||h===e,m=w?n-1:n;for(let v=0;v<=m;v++){const t=v/m*2*Math.PI;M[0]=-Math.sin(t)*r,M[1]=Math.cos(t)*r;for(let e=0;e<3;e++)o[l]=.5*M[e],s[l]=M[e],++l;a[c++]=(v+(w?.5:0))/n,a[c++]=h/e,0!==h&&v!==n&&(h!==e&&(i[f++]=u,i[f++]=u+1,i[f++]=u-n),1!==h&&(i[f++]=u,i[f++]=u-n,i[f++]=u-n-1)),u++}}return{position:o,normal:s,uv:a,faces:i}}function f(t=0){const e=5,n=Math.round(16*2**t),r=(e-1)*(n+1)+2*n,o=new Float64Array(3*r),s=new Float32Array(3*r),a=new Float32Array(2*r),i=new Uint32Array(3*(4*n));let l=0,c=0,f=0,u=0,h=0;for(let p=0;p<=e;p++){const t=0===p||p===e,r=p<=1||p>=e-1,w=2===p||4===p,m=t?n-1:n;for(let v=0;v<=m;v++){const g=v/m*2*Math.PI,A=t?0:.5;M[0]=A*Math.sin(g),M[1]=A*-Math.cos(g),M[2]=p<=2?.5:-.5;for(let t=0;t<3;t++)o[l++]=M[t],s[c++]=r?2===t?p<=1?1:-1:0:2===t?0:M[t]/A;a[f++]=(v+(t?.5:0))/n,a[f++]=p<=1?1*p/3:p<=3?1*(p-2)/3+1/3:1*(p-4)/3+2/3,w||0===p||v===n||(p!==e&&(i[u++]=h,i[u++]=h+1,i[u++]=h-n),1!==p&&(i[u++]=h,i[u++]=h-n,i[u++]=h-n-1)),h++}}return{position:o,normal:s,uv:a,faces:i}}function u(t,e){const n="number"==typeof e?e:null!=e?e.width:1,r="number"==typeof e?e:null!=e?e.height:1;switch(t){case"up":case"down":return{width:n,depth:r};case"north":case"south":return{width:n,height:r};case"east":case"west":return{depth:n,height:r}}}function h(t){const e=v.facingAxisOrderSwap[t],n=v.position,r=v.normal,o=new Float64Array(n.length),s=new Float32Array(r.length);let a=0;for(let i=0;i<4;i++){const t=a;for(let i=0;i<3;i++){const l=e[i],c=Math.abs(l)-1,f=l>=0?1:-1;o[a]=n[t+c]*f,s[a]=r[t+c]*f,a++}}return{position:o,normal:s,uv:new Float32Array(v.uv),faces:new Uint32Array(v.faces),isPlane:!0}}const p=1,w=2,m=3,v={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[m,p,w],west:[-m,-p,w],north:[-p,m,w],south:[p,-m,w],up:[p,w,m],down:[p,-w,-m]}};function g(t,e,n){t.isPlane||A(t),x(t,n?.size);const{vertexAttributes:r,vertexSpace:i,transform:l}=a(t,e,n);return{vertexAttributes:new s({...r,uv:t.uv}),vertexSpace:i,transform:l,components:[new o({faces:t.faces,material:n&&n.material||null})],spatialReference:e.spatialReference}}function A(t){for(let e=0;e<t.position.length;e+=3)t.position[e+2]+=.5}function x(t,r){if(null==r)return;const o="number"==typeof r?[r,r,r]:[null!=r.width?r.width:1,null!=r.depth?r.depth:1,null!=r.height?r.height:1];F[0]=o[0],F[4]=o[1],F[8]=o[2];for(let n=0;n<t.position.length;n+=3){for(let e=0;e<3;e++)M[e]=t.position[n+e];e(M,M,F);for(let e=0;e<3;e++)t.position[n+e]=M[e]}if(o[0]!==o[1]||o[1]!==o[2]){F[0]=1/o[0],F[4]=1/o[1],F[8]=1/o[2];for(let r=0;r<t.normal.length;r+=3){for(let e=0;e<3;e++)M[e]=t.normal[r+e];e(M,M,F),n(M,M);for(let e=0;e<3;e++)t.normal[r+e]=M[e]}}}const y={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},d={south:0,east:1,north:2,west:3,up:4,down:5},M=r(),F=t();export{d as boxFaceOrder,u as convertPlaneSizeParameter,g as convertUnitGeometry,i as createUnitSizeBox,f as createUnitSizeCylinder,h as createUnitSizePlane,c as createUnitSizeSphere,l as extractSingleFaceOfBox};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../../core/Logger.js";import{f as e}from"../../../chunks/mat3.js";import{c as r}from"../../../chunks/mat3f64.js";import{d as o}from"../../../chunks/mat4.js";import{c as n}from"../../../chunks/mat4f64.js";import{s as i,b as s,a,t as l,m as c}from"../../../chunks/vec3.js";import{c as f,Z as
|
|
5
|
+
import t from"../../../core/Logger.js";import{f as e}from"../../../chunks/mat3.js";import{c as r}from"../../../chunks/mat3f64.js";import{d as o}from"../../../chunks/mat4.js";import{c as n}from"../../../chunks/mat4f64.js";import{s as i,b as s,a,t as l,m as c}from"../../../chunks/vec3.js";import{c as f,Z as m}from"../../../chunks/vec3f64.js";import{projectPointToVector as p,computeTranslationToOriginAndRotation as u}from"../../projection.js";import{getSphericalPCPF as g}from"../../spatialReferenceEllipsoidUtils.js";import{create as h,compose as j,axis as v,angleRad as x}from"../axisAngleDegrees.js";import A from"../MeshTransform.js";import{validateGeographicFlag as b,isGeographicMesh as d}from"./geographicUtils.js";import{projectToPCPF as k,projectNormalToPCPF as w,projectTangentToPCPF as y,projectFromPCPF as R,projectNormalFromPCPF as F,projectTangentFromPCPF as L}from"./projection.js";const U="esri.geometry.support.meshUtils.rotate";function z(t,e,r){if(!t.vertexAttributes||!t.vertexAttributes.position||0===e[3])return;const{spatialReference:o,vertexSpace:n}=t;if(n.isRelative){b(n,U,r);const o=r?.origin??t.origin;t.transform??=new A,C(t.transform,n,e,o)}else{const n=r?.origin??t.origin;d(o,r)?I(t,e,n):$(t,e,n)}}function C(t,e,r,o){const n=e.origin,l=i(E,o.x,o.y,o.z??0),c=s(E,l,n);t.applyLocalInverse(c,M),t.rotation=j(t.rotation,r,h()),t.applyLocalInverse(c,c),s(c,c,M),t.translation=a(f(),t.translation,c)}function I(t,r,o){const n=t.spatialReference,i=g(n),s=q;p(o,s,i)||p(t.origin,s,i);const a=t.vertexAttributes.position,c=t.vertexAttributes.normal,f=t.vertexAttributes.tangent,m=new Float64Array(a.length),h=null!=c?new Float32Array(c.length):null,j=null!=f?new Float32Array(f.length):null;u(i,s,T,i),e(Z,T);const x=S;l(v(S),v(r),Z),x[3]=r[3],k(a,n,m),null!=c&&null!=h&&w(c,a,m,n,h),null!=f&&null!=j&&y(f,a,m,n,j),D(m,x,3,s),R(m,a,n),null!=c&&null!=h&&(D(h,x,3),F(h,a,m,n,c)),null!=f&&null!=j&&(D(j,x,4),L(j,a,m,n,f)),t.vertexAttributesChanged()}function $(e,r,o){const n=q;if(!p(o,n,e.spatialReference)){const r=e.origin;n[0]=r.x,n[1]=r.y,n[2]=r.z,t.getLogger(U).error(`Failed to project specified origin (wkid:${o.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}).`)}D(e.vertexAttributes.position,r,3,n),D(e.vertexAttributes.normal,r,3),D(e.vertexAttributes.tangent,r,4),e.vertexAttributesChanged()}function D(t,e,r,n=m){if(null!=t){o(T,x(e),v(e));for(let e=0;e<t.length;e+=r){for(let r=0;r<3;r++)E[r]=t[e+r]-n[r];c(E,E,T);for(let r=0;r<3;r++)t[e+r]=E[r]+n[r]}}}const E=f(),M=f(),S=h(),T=n(),Z=r(),q=f();export{z as rotate};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../core/Logger.js";import{s as t,b as r,g as n,a as o}from"../../../chunks/vec3.js";import{c as i,Z as s}from"../../../chunks/vec3f64.js";import{projectPointToVector as l}from"../../projection.js";import{getSphericalPCPF as a}from"../../spatialReferenceEllipsoidUtils.js";import{isGeographicMesh as
|
|
5
|
+
import e from"../../../core/Logger.js";import{s as t,b as r,g as n,a as o}from"../../../chunks/vec3.js";import{c as i,Z as s}from"../../../chunks/vec3f64.js";import{projectPointToVector as l}from"../../projection.js";import{getSphericalPCPF as a}from"../../spatialReferenceEllipsoidUtils.js";import c from"../MeshTransform.js";import{validateGeographicFlag as f,isGeographicMesh as p}from"./geographicUtils.js";import{projectToPCPF as u,projectNormalToPCPF as g,projectTangentToPCPF as m,projectFromPCPF as v,projectNormalFromPCPF as h,projectTangentFromPCPF as x}from"./projection.js";const j="esri.geometry.support.meshUtils.scale";function A(e,t,r){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{spatialReference:n,vertexSpace:o}=e;if(o.isRelative){f(o,j,r);const n=r?.origin??e.origin;e.transform??=new c,b(e.transform,o,t,n)}else{const o=p(n,r),i=r?.origin??e.origin;o?d(e,t,i):w(e,t,i)}}function b(e,s,l,a){const c=s.origin,f=t(R,a.x,a.y,a.z),p=r(R,f,c);e.applyLocalInverse(p,k);const u=n(i(),e.scale,l);e.scale=u,e.applyLocalInverse(p,p),r(p,p,k),e.translation=o(i(),e.translation,p)}function d(e,t,r){const n=e.spatialReference,o=a(n),i=F;l(r,i,o)||l(e.origin,i,o);const s=e.vertexAttributes.position,c=e.vertexAttributes.normal,f=e.vertexAttributes.tangent,p=new Float64Array(s.length),j=null!=c?new Float32Array(c.length):null,A=null!=f?new Float32Array(f.length):null;u(s,n,p),null!=c&&null!=j&&g(c,s,p,n,j),null!=f&&null!=A&&m(f,s,p,n,A),y(p,t,i),v(p,s,n),null!=c&&null!=j&&h(j,s,p,n,c),null!=f&&null!=A&&x(A,s,p,n,f),e.vertexAttributesChanged()}function w(t,r,n){const o=F;if(!l(n,o,t.spatialReference)){const r=t.origin;o[0]=r.x,o[1]=r.y,o[2]=r.z,e.getLogger(j).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}).`)}y(t.vertexAttributes.position,r,o),t.vertexAttributesChanged()}function y(e,t,r=s){if(e)for(let o=0;o<e.length;o+=3){for(let t=0;t<3;t++)R[t]=e[o+t]-r[t];n(R,R,t);for(let t=0;t<3;t++)e[o+t]=R[t]+r[t]}}const R=i(),k=i(),F=i();export{A as scale};
|