@arcgis/core 4.24.0-next.20220329 → 4.24.0-next.20220401
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/PopupTemplate.js +1 -1
- package/WebMap.js +1 -1
- package/WebScene.js +1 -1
- package/analysis/LineOfSightAnalysisObserver.js +1 -1
- package/analysis/LineOfSightAnalysisTarget.js +1 -1
- package/arcade/featureset/actions/Adapted.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/featureset/support/FeatureSet.js +1 -1
- package/arcade/featureset/support/RecentlyUsedCache.js +1 -1
- package/arcade/featureset/support/shared.js +1 -1
- package/arcade/functions/convertdirection.js +1 -1
- package/arcade/lib/character.js +1 -1
- package/arcade/lib/scanner.js +1 -1
- package/arcade/lib/tokenizer.js +1 -1
- package/arcade/request.js +1 -1
- package/arcade/treeAnalysis.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0bfedb1dbdff8205e468.js +1 -0
- package/assets/esri/core/workers/chunks/{5e472c89a38d6a42b84d.js → 0e29250c24a3a7b1ce13.js} +1 -1
- package/assets/esri/core/workers/chunks/0eb9c9477d36cd212f8b.js +1 -0
- package/assets/esri/core/workers/chunks/10779a256841c37f2429.js +1 -0
- package/assets/esri/core/workers/chunks/10a119889d1ab13402a3.js +1 -0
- package/assets/esri/core/workers/chunks/125b14c2ccd96d7c20c2.js +1 -0
- package/assets/esri/core/workers/chunks/23ec33a30db201e8b2c3.js +1 -0
- package/assets/esri/core/workers/chunks/2530e8ccf6e12787ce76.js +1 -0
- package/assets/esri/core/workers/chunks/2d9e97ba5b50aec4dd01.js +1 -0
- package/assets/esri/core/workers/chunks/365dc146398420f13f82.js +1 -0
- package/assets/esri/core/workers/chunks/3ae2827e8d55d6713d20.js +1 -0
- package/assets/esri/core/workers/chunks/3e3eebaa0844742db2f2.js +1 -0
- package/assets/esri/core/workers/chunks/3fd5b2d6eccd9098d492.js +1 -0
- package/assets/esri/core/workers/chunks/404f1d7bce014c7e6965.js +1 -0
- package/assets/esri/core/workers/chunks/411b7777bb5e943c156f.js +1 -0
- package/assets/esri/core/workers/chunks/{12ca192a5233bb2875d0.js → 4312902ab6e42fbe119b.js} +1 -1
- package/assets/esri/core/workers/chunks/{4ef07f50da39f8607c1c.js → 44e95e87bd9e820aeb53.js} +1 -1
- package/assets/esri/core/workers/chunks/{4d4c5e535d8b9ceb865a.js → 4810edf605838d07e5c5.js} +1 -1
- package/assets/esri/core/workers/chunks/4bce446391176a9d4588.js +1 -0
- package/assets/esri/core/workers/chunks/52a0e387073ea264e194.js +1 -0
- package/assets/esri/core/workers/chunks/560234694f3e53802aff.js +1 -0
- package/assets/esri/core/workers/chunks/5633710daeb3bbb79bcf.js +1 -0
- package/assets/esri/core/workers/chunks/5682039666f874836451.js +1 -0
- package/assets/esri/core/workers/chunks/6f01905936396fe87865.js +1 -0
- package/assets/esri/core/workers/chunks/6f7917da7166e8c6854b.js +1 -0
- package/assets/esri/core/workers/chunks/7388824eac8da01ea03d.js +1 -0
- package/assets/esri/core/workers/chunks/7745efef7d5119d0b087.js +1 -0
- package/assets/esri/core/workers/chunks/794b47764ebb0257ed41.js +1 -0
- package/assets/esri/core/workers/chunks/{da64dedf9270b64f42b2.js → 79bdb26244ec7b4472fe.js} +1 -1
- package/assets/esri/core/workers/chunks/79ec28b3e3c57fe026aa.js +1 -0
- package/assets/esri/core/workers/chunks/81e9d860a044acec74ce.js +1 -0
- package/assets/esri/core/workers/chunks/831dc0187f71e658550c.js +1 -0
- package/assets/esri/core/workers/chunks/86ad6b020c01850d9095.js +1 -0
- package/assets/esri/core/workers/chunks/{fb7397da8d4ec2ae4587.js → 87458fbf395338511662.js} +1 -1
- package/assets/esri/core/workers/chunks/{1a859be598ad96bb4719.js → 8771296b537f366596c4.js} +18 -18
- package/assets/esri/core/workers/chunks/8958cd555f4887526e8b.js +1 -0
- package/assets/esri/core/workers/chunks/{e57b71ba70f088a3a052.js → 90dcd86cdef90099abfa.js} +1 -1
- package/assets/esri/core/workers/chunks/93067e27eea5844edc6c.js +1 -0
- package/assets/esri/core/workers/chunks/{9fbee2d9bf50c4c148c6.js → 9a146c9e9b4bf7fba88f.js} +1 -1
- package/assets/esri/core/workers/chunks/9b9821772b6cbe189fe0.js +1 -0
- package/assets/esri/core/workers/chunks/{6c4ce530b493c6f7c430.js → 9df2f9f7c28b31866be8.js} +1 -1
- package/assets/esri/core/workers/chunks/{d0620ce99b620621d8bc.js → a0552044e123a3c51ddf.js} +1 -1
- package/assets/esri/core/workers/chunks/acc1a4acd57f5657e782.js +1 -0
- package/assets/esri/core/workers/chunks/b055ae7c54796751b64c.js +1 -0
- package/assets/esri/core/workers/chunks/{acc2cfb116fee7f82ae9.js → b26bd8fde2fc65bb67fb.js} +1 -1
- package/assets/esri/core/workers/chunks/{9b45b94c4dbdc8d2c5fd.js → b34ba22c7a5adce8a7a2.js} +1 -1
- package/assets/esri/core/workers/chunks/b75665d0bf417c6ef24a.js +1 -0
- package/assets/esri/core/workers/chunks/bd50ec30688463b821d1.js +1 -0
- package/assets/esri/core/workers/chunks/c28f7ae4756ad1ba94bd.js +1 -0
- package/assets/esri/core/workers/chunks/c4f713959d4115b87c6c.js +1 -0
- package/assets/esri/core/workers/chunks/c58aa209492bd94b7aad.js +1 -0
- package/assets/esri/core/workers/chunks/{9b117097b7be0efd21d4.js → c59b0b58e24e6a60cf3e.js} +1 -1
- package/assets/esri/core/workers/chunks/c7bd5a4d318299388645.js +1 -0
- package/assets/esri/core/workers/chunks/c7cee13a962396b23a5e.js +1 -0
- package/assets/esri/core/workers/chunks/{3bbff5ea1ea0e955c592.js → cd3679fa86129ebabfdf.js} +1 -1
- package/assets/esri/core/workers/chunks/{1a36dc0daffd536ea44d.js → cee7ce362860717713bf.js} +1 -1
- package/assets/esri/core/workers/chunks/cf463d6309f14df2f2fa.js +1 -0
- package/assets/esri/core/workers/chunks/{224c0e64160bdc170051.js → d076627bb7dadea89e89.js} +1 -1
- package/assets/esri/core/workers/chunks/{fff4200bc61b82dd6193.js → d1d1c45243af614f2e74.js} +1 -1
- package/assets/esri/core/workers/chunks/{1e0498dc9836658d9aba.js → d5fd12ea541c1a6b7fce.js} +1 -1
- package/assets/esri/core/workers/chunks/{10322d990cda5aedf2f0.js → d6e32ca237ad9309c76a.js} +1 -1
- package/assets/esri/core/workers/chunks/e06ad3a3d71154fed654.js +1 -0
- package/assets/esri/core/workers/chunks/{7a77d4cd27c30f1a5cae.js → ee3387a43dfbb3df23e1.js} +1 -1
- package/assets/esri/core/workers/chunks/{5d5fa2b1fc48a17eb9ab.js → f4fc165420d449e442b8.js} +1 -1
- package/assets/esri/core/workers/chunks/{3d6d9906a534ddd8fa37.js → f5ee03f3fca7a75192de.js} +1 -1
- package/assets/esri/themes/base/widgets/_Daylight.scss +1 -1
- package/assets/esri/themes/base/widgets/_ElevationProfile.scss +1 -1
- package/assets/esri/themes/base/widgets/_Weather.scss +1 -1
- package/assets/esri/themes/base/widgets/_Widget.scss +12 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/dark-blue/main.css +1 -1
- package/assets/esri/themes/dark-green/main.css +1 -1
- package/assets/esri/themes/dark-purple/main.css +1 -1
- package/assets/esri/themes/dark-red/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/themes/light-blue/main.css +1 -1
- package/assets/esri/themes/light-green/main.css +1 -1
- package/assets/esri/themes/light-purple/main.css +1 -1
- package/assets/esri/themes/light-red/main.css +1 -1
- package/chunks/ComponentShader.glsl.js +25 -25
- package/chunks/HighlightApply.glsl.js +36 -0
- package/chunks/HighlightBlur.glsl.js +26 -0
- package/chunks/HighlightDownsample.glsl.js +12 -0
- package/chunks/ImageMaterial.glsl.js +8 -8
- package/chunks/LineCallout.glsl.js +1 -1
- package/chunks/Pattern.glsl.js +2 -2
- package/chunks/SimpleAtmosphere.glsl.js +7 -7
- package/chunks/Stars.glsl.js +1 -1
- package/chunks/arcade.js +1 -1
- package/chunks/color.js +1 -1
- package/chunks/languageUtils.js +1 -1
- package/chunks/mat3.js +1 -1
- package/copyright.txt +2 -2
- package/core/AsyncUpdate.js +1 -1
- package/core/Evented.js +1 -1
- package/core/PooledArray.js +1 -1
- package/core/accessorSupport/diffUtils.js +1 -1
- package/core/accessorSupport/get.js +1 -1
- package/core/accessorSupport/read.js +1 -1
- package/core/accessorSupport/set.js +1 -1
- package/core/accessorSupport/tracking.js +1 -1
- package/core/accessorSupport/utils.js +1 -1
- package/core/arrayUtils.js +1 -1
- package/core/libs/gl-matrix-2/mat3.js +1 -1
- package/core/libs/gl-matrix-2/math/mat3.js +1 -1
- package/core/number.js +1 -1
- package/core/object.js +1 -1
- package/core/string.js +1 -1
- package/core/unitUtils.js +1 -1
- package/core/watchUtils.js +1 -1
- package/core/workers/RemoteClient.js +1 -1
- package/exports/csv.js +1 -1
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/geometry.js +1 -1
- package/geometry/support/normalizeUtils.js +1 -1
- package/identity/IdentityManagerBase.js +1 -1
- package/interfaces.d.ts +155 -20
- package/layers/ImageryLayer.js +1 -1
- package/layers/MapImageLayer.js +1 -1
- package/layers/RouteLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/SubtypeGroupLayer.js +1 -1
- package/layers/TileLayer.js +1 -1
- package/layers/VectorTileLayer.js +1 -1
- package/layers/WMSLayer.js +1 -1
- package/layers/WMTSLayer.js +1 -1
- package/layers/WebTileLayer.js +1 -1
- package/layers/graphics/data/AttributesBuilder.js +1 -1
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/graphics/editingSupport.js +1 -1
- package/layers/graphics/sources/connections/GeoEventConnection.js +1 -1
- package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
- package/layers/graphics/sources/support/inferenceUtils.js +1 -1
- package/layers/mixins/ArcGISCachedService.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/ogc/ogcFeatureUtils.js +1 -1
- package/layers/support/ExportImageServiceParameters.js +1 -1
- package/layers/support/PixelBlock.js +1 -1
- package/layers/support/RasterJobHandler.js +1 -1
- package/layers/support/SpriteSource.js +1 -1
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/TilemapCache.js +1 -1
- package/layers/support/WMTSSublayer.js +1 -1
- package/layers/support/arcgisLayerUrl.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/layers/support/kmlUtils.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/layers/support/rasterDatasets/ImageAuxRaster.js +1 -1
- package/layers/support/rasterDatasets/ImageServerRaster.js +1 -1
- package/layers/support/rasterDatasets/RasterFactory.js +1 -1
- package/layers/support/rasterDatasets/WCSRaster.js +1 -1
- package/layers/support/rasterDatasets/multipartParser.js +1 -1
- package/layers/support/rasterDatasets/wcsCoverageParser.js +1 -1
- package/layers/support/rasterDatasets/xmlUtilities.js +1 -1
- package/layers/support/rasterFormats/RasterCodec.js +1 -1
- package/layers/support/rasterFormats/TiffDecoder.js +1 -1
- package/layers/support/rasterFunctions/pixelUtils.js +1 -1
- package/layers/support/vectorTileLayerLoader.js +1 -1
- package/layers/support/wmsUtils.js +1 -1
- package/layers/support/wmtsUtils.js +1 -1
- package/libs/i3s/I3SModule.js +1 -1
- package/libs/vxl/VxlModule.js +1 -1
- package/package.json +1 -1
- package/portal/Portal.js +1 -1
- package/portal/PortalItem.js +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/portal/support/layersLoader.js +1 -1
- package/portal/support/portalItemUtils.js +1 -1
- package/portal/support/portalLayers.js +1 -1
- package/renderers/support/AuthoringInfoVisualVariable.js +1 -1
- package/renderers/support/DictionaryLoader.js +1 -1
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/renderers/support/numberUtils.js +1 -1
- package/renderers/support/rasterRendererHelper.js +1 -1
- package/renderers/support/utils.js +1 -1
- package/request.js +1 -1
- package/rest/imageService.js +1 -1
- package/rest/operations/find.js +1 -1
- package/rest/query/operations/query.js +1 -1
- package/rest/query/operations/queryRelatedRecords.js +1 -1
- package/rest/query/operations/queryTopFeatures.js +1 -1
- package/rest/support/DirectionLine.js +1 -1
- package/rest/support/DirectionPoint.js +1 -1
- package/rest/support/PointBarrier.js +1 -1
- package/rest/support/PolygonBarrier.js +1 -1
- package/rest/support/PolylineBarrier.js +1 -1
- package/rest/support/RouteInfo.js +1 -1
- package/rest/support/Stop.js +1 -1
- package/smartMapping/labels/clusters.js +1 -1
- package/smartMapping/popup/dotDensity.js +1 -1
- package/smartMapping/popup/support/clusterUtils.js +1 -1
- package/smartMapping/popup/support/utils.js +1 -1
- package/smartMapping/raster/support/utils.js +1 -1
- package/smartMapping/renderers/color.js +1 -1
- package/smartMapping/renderers/location.js +1 -1
- package/smartMapping/renderers/predominance.js +1 -1
- package/smartMapping/renderers/relationship.js +1 -1
- package/smartMapping/renderers/size.js +1 -1
- package/smartMapping/renderers/support/utils.js +1 -1
- package/smartMapping/renderers/type.js +1 -1
- package/smartMapping/renderers/univariateColorSize.js +1 -1
- package/smartMapping/statistics/summaryStatisticsForAge.js +1 -1
- package/smartMapping/statistics/support/ageUtils.js +1 -1
- package/smartMapping/statistics/support/utils.js +1 -1
- package/smartMapping/support/adapters/SceneLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/support/utils.js +1 -1
- package/smartMapping/support/utils.js +1 -1
- package/smartMapping/symbology/support/Theme.js +1 -1
- package/smartMapping/symbology/support/colorRamps.js +1 -1
- package/smartMapping/symbology/support/symbologyUtils.js +1 -1
- package/smartMapping/symbology/support/utils.js +1 -1
- package/statistics/utils.js +1 -1
- package/support/basemapDefinitions.js +1 -1
- package/support/basemapUtils.js +1 -1
- package/support/elevationInfoUtils.js +1 -1
- package/support/popupUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolRasterizer.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/utils.js +1 -1
- package/symbols/support/previewSymbol3D.js +1 -1
- package/symbols/support/renderUtils.js +1 -1
- package/symbols/support/symbolLayerUtils.js +1 -1
- package/views/2d/engine/Bitmap.js +1 -1
- package/views/2d/engine/flow/FlowDisplayObject.js +1 -1
- package/views/2d/engine/imagery/RasterBitmap.js +1 -1
- package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
- package/views/2d/engine/vectorTiles/TextShaping.js +1 -1
- package/views/2d/engine/vectorTiles/TileParser.js +1 -1
- package/views/2d/engine/vectorTiles/buckets/SymbolBucket.js +1 -1
- package/views/2d/engine/vectorTiles/expression/expression.js +1 -1
- package/views/2d/engine/vectorTiles/shaders/VTLMaterial.js +1 -1
- package/views/2d/engine/webgl/Profiler.js +1 -1
- package/views/2d/engine/webgl/Utils.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLGeometryBrush.js +1 -1
- package/views/2d/engine/webgl/definitions.js +1 -1
- package/views/2d/engine/webgl/effects/HittestEffect.js +1 -1
- package/views/2d/engine/webgl/effects/HittestEffectVTL.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLTemplateStore.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/util/Lock.js +1 -1
- package/views/2d/layers/RouteLayerView2D.js +1 -1
- package/views/2d/layers/features/schemaUtils.js +1 -1
- package/views/2d/layers/features/sources/SnapshotFeatureSource.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/2d/layers/features/tileRenderers/SymbolTileRenderer.js +1 -1
- package/views/2d/layers/support/webStyleUtils.js +1 -1
- package/views/2d/support/Timeline.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
- package/views/3d/analysis/Slice/SliceController.js +1 -1
- package/views/3d/environment/PanoramicAtmosphere.js +1 -1
- package/views/3d/environment/SceneViewAtmosphere.js +1 -1
- package/views/3d/environment/StarsTechnique.js +1 -1
- package/views/3d/externalRenderers/ExternalRendererStore.js +1 -1
- package/views/3d/glTF/loader.js +1 -1
- package/views/3d/interactive/analysisTools/lineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/interactive/analysisTools/slice/SliceTool.js +1 -1
- package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/ImageryLayerView3D.js +1 -1
- package/views/3d/layers/LayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/RouteLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/VectorTileLayerView3D.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
- package/views/3d/layers/i3s/I3SNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SUtil.js +1 -1
- package/views/3d/layers/i3s/IDBMockCache.js +5 -0
- package/views/3d/layers/i3s/PointCloudWorkerUtil.js +1 -1
- package/views/3d/layers/support/PopupSceneLayerView.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/state/controllers/RotateController.js +1 -1
- package/views/3d/state/controllers/global/PinchAndPanController.js +1 -1
- package/views/3d/state/controllers/global/ZoomController.js +1 -1
- package/views/3d/state/controllers/global/ZoomStepController.js +1 -1
- package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
- package/views/3d/state/controllers/local/ZoomController.js +1 -1
- package/views/3d/support/HighlightOptions.js +1 -1
- package/views/3d/support/buffer/InterleavedLayout.js +1 -1
- package/views/3d/support/debugFlags.js +1 -1
- package/views/3d/support/orientedBoundingBox.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/Stage.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +5 -5
- package/views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js +1 -1
- package/views/3d/webgl-engine/lib/HighlightHelper.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderParameters.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
- package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
- package/views/3d/webgl-engine/shaders/HighlightApply.glsl.js +5 -0
- package/views/3d/webgl-engine/shaders/HighlightApplyTechnique.js +5 -0
- package/views/3d/webgl-engine/shaders/HighlightBlur.glsl.js +5 -0
- package/views/3d/webgl-engine/shaders/HighlightBlurTechnique.js +5 -0
- package/views/3d/webgl-engine/shaders/HighlightDownsample.glsl.js +5 -0
- package/views/3d/webgl-engine/shaders/HighlightDownsampleTechnique.js +5 -0
- package/views/3d/webgl-engine/shaders/HighlightOptions.js +4 -0
- package/views/3d/webgl-engine/shaders/HighlightPassParameters.js +5 -0
- package/views/3d/webgl-engine/shaders/ImageMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/AdjustProjectedPosition.glsl.js +5 -7
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +14 -14
- package/views/SceneView.js +1 -1
- package/views/draw/support/GraphicMover.js +1 -1
- package/views/input/InputHandler.js +1 -1
- package/views/input/InputManager.js +1 -1
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/views/layers/MapImageLayerView.js +1 -1
- package/views/layers/TileLayerView.js +1 -1
- package/views/layers/support/popupUtils.js +1 -1
- package/views/support/DefaultsFromMap.js +1 -1
- package/views/support/Scheduler.js +1 -1
- package/views/support/screenshotUtils.js +1 -1
- package/views/ui/DefaultUI.js +1 -1
- package/views/webgl/ShaderTranspiler.js +1 -1
- package/webscene/Slide.js +1 -1
- package/webscene/spec-certification/spec.js +1 -1
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
- package/widgets/Attachments/support/attachmentUtils.js +1 -1
- package/widgets/Attachments.js +1 -1
- package/widgets/Attribution.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/Bookmarks/BookmarksViewModel.js +1 -1
- package/widgets/Bookmarks.js +1 -1
- package/widgets/BuildingExplorer/support/filterUtils.js +1 -1
- package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
- package/widgets/CoordinateConversion/support/coordinateConversionUtils.js +1 -1
- package/widgets/CoordinateConversion/support/formatUtils.js +1 -1
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
- package/widgets/Directions/DirectionsViewModel.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileViewModel.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/Feature/support/featureUtils.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/InputField.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/FeatureTemplates.js +1 -1
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/widgets/LayerList/ListItemPanel.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/Legend/LegendViewModel.js +1 -1
- package/widgets/Legend/styles/Card.js +1 -1
- package/widgets/Legend/styles/Classic.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Legend/support/colorRampUtils.js +1 -1
- package/widgets/Legend/support/relationshipRampUtils.js +1 -1
- package/widgets/Legend/support/sizeRampUtils.js +1 -1
- package/widgets/Popup/PopupViewModel.js +1 -1
- package/widgets/Popup/actionUtils.js +1 -1
- package/widgets/Print/PrintViewModel.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/ScaleBar/ScaleBarViewModel.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/Search/support/layerSearchUtils.js +1 -1
- package/widgets/Slider.js +1 -1
- package/widgets/Swipe.js +1 -1
- package/widgets/TableList.js +1 -1
- package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/support/DatePicker.js +1 -1
- package/widgets/support/Popover.js +1 -1
- package/widgets/support/SnappingControls.js +1 -1
- package/widgets/support/TimePicker.js +1 -1
- package/widgets/support/timeWidgetUtils.js +1 -1
- package/assets/esri/core/workers/chunks/083a5d10f8e243641cb9.js +0 -1
- package/assets/esri/core/workers/chunks/0872812ce4d0ec8faf8f.js +0 -1
- package/assets/esri/core/workers/chunks/0bc26899780c33637746.js +0 -1
- package/assets/esri/core/workers/chunks/113362697da1b69deaed.js +0 -1
- package/assets/esri/core/workers/chunks/11a2f9708938eac98815.js +0 -1
- package/assets/esri/core/workers/chunks/11a45709b703be84caaf.js +0 -1
- package/assets/esri/core/workers/chunks/1c1294ff1ebbd8f774f7.js +0 -1
- package/assets/esri/core/workers/chunks/1c915cc9a9d5729b6f17.js +0 -1
- package/assets/esri/core/workers/chunks/31786756b3d44540f8c0.js +0 -1
- package/assets/esri/core/workers/chunks/36a6f34fe40785beff5d.js +0 -1
- package/assets/esri/core/workers/chunks/373c16f8b8093d001064.js +0 -1
- package/assets/esri/core/workers/chunks/382a331a592abb61267f.js +0 -1
- package/assets/esri/core/workers/chunks/3bf106fe34e3992032c4.js +0 -1
- package/assets/esri/core/workers/chunks/3dcec610f1c1497d87bc.js +0 -1
- package/assets/esri/core/workers/chunks/46495e726d8739260d44.js +0 -1
- package/assets/esri/core/workers/chunks/4a82a6a473b3d540d0be.js +0 -1
- package/assets/esri/core/workers/chunks/4b6719377a95ac10fa43.js +0 -1
- package/assets/esri/core/workers/chunks/4d2ef57ff3a5cfc1313f.js +0 -1
- package/assets/esri/core/workers/chunks/4fd2b8153d62592210a2.js +0 -1
- package/assets/esri/core/workers/chunks/56e6a1079269e2964b02.js +0 -1
- package/assets/esri/core/workers/chunks/5b4d9786c010d265346c.js +0 -1
- package/assets/esri/core/workers/chunks/604637e1c3937b376a0d.js +0 -1
- package/assets/esri/core/workers/chunks/60f83257e361f87fa6fd.js +0 -1
- package/assets/esri/core/workers/chunks/6d3f80be6fceb2c18b5d.js +0 -1
- package/assets/esri/core/workers/chunks/6f827a32646bab0a8777.js +0 -1
- package/assets/esri/core/workers/chunks/70bd2ab42e3801ef5974.js +0 -1
- package/assets/esri/core/workers/chunks/746222184b361b50d6ba.js +0 -1
- package/assets/esri/core/workers/chunks/7fb72b2d11e8d840f982.js +0 -1
- package/assets/esri/core/workers/chunks/85bb6a1a7704fcdcbec2.js +0 -1
- package/assets/esri/core/workers/chunks/8b4c76cebb100e6c06f8.js +0 -1
- package/assets/esri/core/workers/chunks/9586a6b320edb1922926.js +0 -1
- package/assets/esri/core/workers/chunks/99638697ffda9022ce92.js +0 -1
- package/assets/esri/core/workers/chunks/a9da1cb118ca62a9581d.js +0 -1
- package/assets/esri/core/workers/chunks/aaa41a5013eef713c032.js +0 -1
- package/assets/esri/core/workers/chunks/ac321f939dd488ff6ce4.js +0 -1
- package/assets/esri/core/workers/chunks/add6027a96398ecf69de.js +0 -1
- package/assets/esri/core/workers/chunks/b75206b46ba81606087c.js +0 -1
- package/assets/esri/core/workers/chunks/bf8456828e38a768eba3.js +0 -1
- package/assets/esri/core/workers/chunks/c0720d0d8adcba6738d4.js +0 -1
- package/assets/esri/core/workers/chunks/c5bb712d5cf8c05a4e13.js +0 -1
- package/assets/esri/core/workers/chunks/d343f05a3366f95e0494.js +0 -1
- package/assets/esri/core/workers/chunks/d8b1f00075983d769985.js +0 -1
- package/chunks/Highlight.glsl.js +0 -88
- package/views/3d/webgl-engine/shaders/Highlight.glsl.js +0 -5
- package/views/3d/webgl-engine/shaders/HighlightTechnique.js +0 -5
- package/views/3d/webgl-engine/shaders/HighlightTechniqueConfiguration.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.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../../request.js";import{binaryIndexOf as t,flatten as r,splitIntoChunks as o}from"../../../../core/arrayUtils.js";import n from"../../../../core/Error.js";import a from"../../../../core/has.js";import{isSome as i,isNone as s}from"../../../../core/maybe.js";import{eachAlways as c}from"../../../../core/promiseUtils.js";import{isInt16Array as l,isInt32Array as u}from"../../../../core/typedArrayUtil.js";import{h as f}from"../../../../chunks/mat3.js";import{c as p}from"../../../../chunks/mat3f64.js";import{a as m}from"../../../../chunks/mat4.js";import{c as h}from"../../../../chunks/mat4f64.js";import{a as d,m as y,c as S}from"../../../../chunks/quat.js";import{b}from"../../../../chunks/quatf32.js";import{s as g,c as w,v as E,q as T,g as I,a as M,m as v}from"../../../../chunks/vec3.js";import{c as R}from"../../../../chunks/vec3f64.js";import{c as x}from"../../../../chunks/vec4f64.js";import{projectBoundingSphere as j,canProjectWithoutEngine as C,projectBuffer as N,computeTranslationToOriginAndRotation as q,projectVectorToVector as k}from"../../../../geometry/projection.js";import{getSphericalPCPF as U,getReferenceEllipsoid as D}from"../../../../geometry/projectionEllipsoid.js";import _ from"../../../../geometry/SpatialReference.js";import{create as W,empty as z,expandPointInPlace as O,intersects as F}from"../../../../geometry/support/aaBoundingRect.js";import{isPlateCarree as A}from"../../../../geometry/support/spatialReferenceUtils.js";import G from"../../../../rest/support/Query.js";import{readBinaryAttribute as K}from"./I3SBinaryReader.js";import{computeGlobalTransformation as L}from"./I3SProjectionUtil.js";import{createSolidEdgeMaterial as B,createMaterialFromEdges as P}from"../support/edgeUtils.js";import{parseColorMixMode as $,ColorMixModeEnum as Q}from"../support/symbolColorUtils.js";import{create as Z,compute as H,corners as J}from"../../support/orientedBoundingBox.js";function V(e){return e&&parseInt(e.substring(e.lastIndexOf("/")+1,e.length),10)}function X(e){if(a("disable-feature:i3s-draco")||!e)return!1;for(const r of e)for(const e of r.geometryBuffers){var t;if("draco"===(null==(t=e.compressedAttributes)?void 0:t.encoding))return!0}return!1}function Y(e,t,r,o,n,a){n.traverse(r,(r=>{let n=r.mbs;t!==o&&(n=ne,j(r.mbs,o,n,t));const i=ie(e,n);return i!==ae.OUTSIDE&&(a(r,i),!0)}))}function ee(e,t,r){let o=0,n=0;for(let a=0;a<t.length&&o<e.length;a++)e[o]===t[a]&&(r(a)&&(e[n]=e[o],n++),o++);e.length=n}function te(e,r,o){let n=0,a=0;for(;n<o.length;){t(e,o[n])>=0===r&&(o[a]=o[n],a++),n++}o.length=a}const re=W();function oe(e,t){if(0===t.rotationScale[1]&&0===t.rotationScale[2]&&0===t.rotationScale[3]&&0===t.rotationScale[5]&&0===t.rotationScale[6]&&0===t.rotationScale[7])return re[0]=(e[0]-t.position[0])/t.rotationScale[0],re[1]=(e[1]-t.position[1])/t.rotationScale[4],re[2]=(e[2]-t.position[0])/t.rotationScale[0],re[3]=(e[3]-t.position[1])/t.rotationScale[4],re}const ne=x();var ae;function ie(e,t){const r=t[0],o=t[1],n=t[3],a=e[0]-r,i=r-e[2],s=e[1]-o,c=o-e[3],l=Math.max(a,i,0),u=Math.max(s,c,0),f=l*l+u*u;if(f>n*n)return ae.OUTSIDE;if(f>0)return ae.INTERSECTS_CENTER_OUTSIDE;return-Math.max(a,i,s,c)>n?ae.INSIDE:ae.INTERSECTS_CENTER_INSIDE}function se(e,t){const r=t[0],o=t[1],n=t[2],a=t[3],i=e[0]-r,s=r-e[3],c=e[1]-o,l=o-e[4],u=e[2]-n,f=n-e[5],p=Math.max(i,s,0),m=Math.max(c,l,0),h=Math.max(u,f,0),d=p*p+m*m+h*h;if(d>a*a)return ae.OUTSIDE;if(d>0)return ae.INTERSECTS_CENTER_OUTSIDE;return-Math.max(i,s,c,l,u,f)>a?ae.INSIDE:ae.INTERSECTS_CENTER_INSIDE}function ce(e,t,r){const o=[],n=r&&r.missingFields,a=r&&r.originalFields;for(const i of e){const e=i.toLowerCase();let r=!1;for(const n of t)if(e===n.name.toLowerCase()){o.push(n.name),r=!0,a&&a.push(i);break}!r&&n&&n.push(i)}return o}async function le(e,t,o,a,c){if(0===t.length)return[];const l=e.attributeStorageInfo;if(i(e.associatedLayer))try{return await fe(e.associatedLayer,t,o,a)}catch(u){if(e.associatedLayer.loaded)throw u}if(l){const i=ue(t,o,c);if(s(i))throw new n("scenelayer:features-not-loaded","Tried to query attributes for unloaded features");const u=e.parsedUrl.path,f=await Promise.all(i.map((e=>me(u,l,e.node,e.indices,a).then((t=>{for(let r=0;r<e.graphics.length;r++){const o=e.graphics[r],n=t[r];if(o.attributes)for(const e in o.attributes)e in n||(n[e]=o.attributes[e]);o.attributes=n}return e.graphics})))));return r(f)}throw new n("scenelayer:no-attribute-source","This scene layer does not have a source for attributes available")}function ue(e,t,r){const o=new Map,n=[],a=r();for(const i of e){const e=i.attributes[t];for(let t=0;t<a.length;t++){const r=a[t],s=r.featureIds.indexOf(e);if(s>=0){let e=o.get(r.node);e||(e={node:r.node,indices:[],graphics:[]},n.push(e),o.set(r.node,e)),e.indices.push(s),e.graphics.push(i);for(let r=t;r>0;r--)a[r]=a[r-1];a[0]=r;break}}}return n}async function fe(e,t,r,o){t.sort(((e,t)=>e.attributes[r]-t.attributes[r]));const n=t.map((e=>e.attributes[r])),a=[],i=ce(o,e.fields,{originalFields:a}),s=await pe(e,n,i);for(let c=0;c<t.length;c++){const e=t[c],r=s[c],o={};if(e.attributes)for(const t in e.attributes)o[t]=e.attributes[t];for(let t=0;t<a.length;t++)o[a[t]]=r[i[t]];e.attributes=o}return t}function pe(e,t,a){const i=e.capabilities.query.maxRecordCount;if(null!=i&&t.length>i){const n=o(t,i);return Promise.all(n.map((t=>pe(e,t,a)))).then(r)}const s=new G({objectIds:t,outFields:a,orderByFields:[e.objectIdField]});return e.queryFeatures(s).then((e=>{if(e&&e.features&&e.features.length===t.length)return e.features.map((e=>e.attributes));throw new n("scenelayer:feature-not-in-associated-layer","Feature not found in associated feature layer")}))}function me(t,r,o,n,a){const i=[];for(const e of r)if(e&&-1!==a.indexOf(e.name)){const r=`${t}/nodes/${o.resources.attributes}/attributes/${e.key}/0`;i.push({url:r,storageInfo:e})}return c(i.map((t=>e(t.url,{responseType:"array-buffer"}).then((e=>K(t.storageInfo,e.data)))))).then((e=>{const t=[];for(const r of n){const o={};for(let t=0;t<e.length;t++)null!=e[t].value&&(o[i[t].storageInfo.name]=ye(e[t].value,r));t.push(o)}return t}))}!function(e){e[e.OUTSIDE=0]="OUTSIDE",e[e.INTERSECTS_CENTER_OUTSIDE=1]="INTERSECTS_CENTER_OUTSIDE",e[e.INTERSECTS_CENTER_INSIDE=2]="INTERSECTS_CENTER_INSIDE",e[e.INSIDE=3]="INSIDE"}(ae||(ae={}));const he=-32768,de=-(2**31);function ye(e,t){if(!e)return null;const r=e[t];if(l(e))return r===he?null:r;if(u(e))return r===de?null:r;return r!=r?null:r}function Se(e){const t=e.store.indexCRS||e.store.geographicCRS,r=void 0===t?e.store.indexWKT:void 0;if(r){if(!e.spatialReference)throw new n("layerview:no-store-spatial-reference-wkt-index-and-no-layer-spatial-reference","Found indeWKT in the scene layer store but no layer spatial reference",{});if(r!==e.spatialReference.wkt)throw new n("layerview:store-spatial-reference-wkt-index-incompatible","The indeWKT of the scene layer store does not match the WKT of the layer spatial reference",{})}const o=t?new _(V(t)):e.spatialReference;return o.equals(e.spatialReference)?e.spatialReference:o}function be(e){const t=e.store.vertexCRS||e.store.projectedCRS,r=void 0===t?e.store.vertexWKT:void 0;if(r){if(!e.spatialReference)throw new n("layerview:no-store-spatial-reference-wkt-vertex-and-no-layer-spatial-reference","Found vertexWKT in the scene layer store but no layer spatial reference",{});if(r!==e.spatialReference.wkt)throw new n("layerview:store-spatial-reference-wkt-vertex-incompatible","The vertexWKT of the scene layer store does not match the WKT of the layer spatial reference",{})}const o=t?new _(V(t)):e.spatialReference;return o.equals(e.spatialReference)?e.spatialReference:o}function ge(e,t){return s(t)?"@null":t===U(t)?"@ECEF":e.equals(t)?"":null!=t.wkid?"@"+t.wkid:null}function we(e,t,r){if(!C(e,t))throw new n("layerview:spatial-reference-incompatible","The spatial reference of this scene layer is incompatible with the spatial reference of the view",{});if("local"===r&&!Ee(e,t))throw new n("layerview:spatial-reference-incompatible","The spatial reference of this scene layer is incompatible with the spatial reference of the view",{})}function Ee(e,t){return e.equals(t)||e.isWGS84&&t.isWebMercator||e.isWebMercator&&t.isWGS84}function Te(e,t,r){const o=Se(e),n=be(e);we(o,t,r),we(n,t,r)}function Ie(e){return(null==e.geometryType||"triangles"===e.geometryType)&&((null==e.topology||"PerAttributeArray"===e.topology)&&(null!=e.vertexAttributes&&null!=e.vertexAttributes.position))}function Me(e){if(null==e.store||null==e.store.defaultGeometrySchema||!Ie(e.store.defaultGeometrySchema))throw new n("scenelayer:unsupported-geometry-schema","The geometry schema of this scene layer is not supported.",{url:e.parsedUrl.path})}function ve(e,t){Te(e,t.spatialReference,t.viewingMode)}function Re(e){return null!=e.geometryType&&"points"===e.geometryType&&((null==e.topology||"PerAttributeArray"===e.topology)&&((null==e.encoding||""===e.encoding||"lepcc-xyz"===e.encoding)&&(null!=e.vertexAttributes&&null!=e.vertexAttributes.position)))}function xe(e){if(null==e.store||null==e.store.defaultGeometrySchema||!Re(e.store.defaultGeometrySchema))throw new n("pointcloud:unsupported-geometry-schema","The geometry schema of this point cloud scene layer is not supported.",{})}function je(e,t){we(e.spatialReference,t.spatialReference,t.viewingMode)}function Ce(e){return"simple"===e.type||"class-breaks"===e.type||"unique-value"===e.type}function Ne(e){return"mesh-3d"===e.type}function qe(e){if(null==e||!Ce(e))return!0;if(("unique-value"===e.type||"class-breaks"===e.type)&&null==e.defaultSymbol)return!0;const t=e.getSymbols();if(0===t.length)return!0;for(const r of t){if(!Ne(r)||0===r.symbolLayers.length)return!0;for(const e of r.symbolLayers.items)if("fill"!==e.type||s(e.material)||s(e.material.color)||"replace"!==e.material.colorMixMode)return!0}return!1}const ke=B({color:[0,0,0,0],opacity:0});class Ue{constructor(){this.edgeMaterial=null,this.material=null,this.castShadows=!0}}function De(e){const t=new Ue;let r=!1,o=!1;for(const n of e.symbolLayers.items)if("fill"===n.type&&n.enabled){const e=n.material,a=n.edges;if(i(e)&&!r){const o=e.color,a=$(e.colorMixMode);i(o)?t.material={color:[o.r/255,o.g/255,o.b/255],alpha:o.a,colorMixMode:a}:t.material={color:[1,1,1],alpha:1,colorMixMode:Q.Multiply},t.castShadows=n.castShadows,r=!0}i(a)&&!o&&(t.edgeMaterial=P(a,{}),o=!0)}return t.material||(t.material={color:[1,1,1],alpha:1,colorMixMode:Q.Multiply}),t}function _e(e,t){return(0|e)+(0|t)|0}function We(e,t,r,o,n=0){o===U(o)?t.isGeographic?$e(e,r,t,n):Pe(e,r,t,n):t.isWGS84&&(o.isWebMercator||A(o))?ze(t,e,o,r,n):t.isWebMercator&&A(o)?Le(t,e,o,r,n):e===r?(r.center[2]+=n,N(r.center,t,0,r.center,o,0,1)):(g(r.center,e.center[0],e.center[1],e.center[2]+n),N(r.center,t,0,r.center,o,0,1),d(r.quaternion,e.quaternion),w(r.halfSize,e.halfSize))}function ze(e,t,r,o,n){w(Ge,t.center),Ge[2]+=n;const a=U(r);N(Ge,e,0,Ge,a,0,1),Be(a,t,Ge,r,o)}const Oe=new Float64Array(24),Fe={data:Oe,size:3},Ae=R(),Ge=R(),Ke=p();function Le(e,t,r,o,n){w(Ge,t.center),Ge[2]+=n,Be(e,t,Ge,r,o)}function Be(e,t,r,o,n){const a=f(Ke,t.quaternion);for(let i=0;i<8;++i){for(let e=0;e<3;++e)Ae[e]=t.halfSize[e]*(0!=(i&1<<e)?-1:1);for(let e=0;e<3;++e){let t=r[e];for(let r=0;r<3;++r)t+=Ae[r]*a[3*r+e];Oe[3*i+e]=t}}N(Oe,e,0,Oe,o,0,8),H(Fe,n)}function Pe(e,t,r,o){J(e,Je),g(t.center,e.center[0],e.center[1],e.center[2]+o),q(r,t.center,Ze,U(r)),g(t.center,Ze[12],Ze[13],Ze[14]);const n=2*Math.sqrt(1+Ze[0]+Ze[5]+Ze[10]);He[0]=(Ze[6]-Ze[9])/n,He[1]=(Ze[8]-Ze[2])/n,He[2]=(Ze[1]-Ze[4])/n,He[3]=.25*n,y(t.quaternion,He,e.quaternion),S(He,t.quaternion);let a=0,i=0,s=0;for(const c of Je)c[2]+=o,N(c,r,0,c,U(r),0,1),E(et,c,t.center),T(et,et,He),a=Math.max(a,Math.abs(et[0])),i=Math.max(i,Math.abs(et[1])),s=Math.max(s,Math.abs(et[2]));g(t.halfSize,a,i,s)}function $e(e,t,r,o){const n=D(r),a=1+Math.max(0,o)/(n.radius+e.center[2]);g(t.center,e.center[0],e.center[1],e.center[2]+o),N(t.center,r,0,t.center,U(r),0,1),d(t.quaternion,e.quaternion),S(He,e.quaternion),g(et,0,0,1),T(et,et,He),g(et,e.halfSize[0]*Math.abs(et[0]),e.halfSize[1]*Math.abs(et[1]),e.halfSize[2]*Math.abs(et[2])),I(et,et,n.inverseFlattening),M(t.halfSize,e.halfSize,et),I(t.halfSize,t.halfSize,a)}function Qe(e,t,r,o,n,a){if(!a||0===a.length||s(t))return null;const c=L(e.mbs,n,r,t);let l;m(rt,c);const u=()=>{if(!l)if(l=Je,z(Xe),i(e.serviceObb)){We(e.serviceObb,r,Ye,t,n),J(Ye,l);for(const e of l)v(e,e,rt),O(Xe,e)}else{const o=e.mbs,a=o[3];k(o,r,et,t),v(et,et,rt),et[2]+=n;for(let e=0;e<8;++e){const t=1&e?a:-a,r=2&e?a:-a,o=4&e?a:-a,n=l[e];w(n,[et[0]+t,et[1]+r,et[2]+o]),O(Xe,n)}}};let f=1/0,p=-1/0;const h=e=>{if("replace"!==e.type)return;const r=e.geometry;if(!r.hasZ)return;z(Ve);const n=r.spatialReference||o,a=r.rings.reduce(((e,r)=>r.reduce(((e,r)=>(k(r,n,et,t),v(et,et,rt),O(Ve,et),Math.min(et[2],e))),e)),1/0);u(),F(Xe,Ve)&&(f=Math.min(f,a),p=Math.max(p,a))};if(a.forEach((e=>h(e))),f===1/0)return null;const d=(e,t,r)=>{v(et,r,c),e[t+0]=et[0],e[t+1]=et[1],e[t+2]=et[2],t+=24,r[2]=f,v(et,r,c),e[t+0]=et[0],e[t+1]=et[1],e[t+2]=et[2],t+=24,r[2]=p,v(et,r,c),e[t+0]=et[0],e[t+1]=et[1],e[t+2]=et[2]};for(let i=0;i<8;++i)d(tt.data,3*i,l[i]);return H(tt)}const Ze=h(),He=b(),Je=[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],Ve=W(),Xe=W(),Ye=Z(),et=[0,0,0],tt={data:new Array(72),size:3},rt=h();export{ae as MbsIntersectResult,Ue as SymbolInfo,_e as addWraparound,je as checkPointCloudLayerCompatibleWithView,xe as checkPointCloudLayerValid,ve as checkSceneLayerCompatibleWithView,Me as checkSceneLayerValid,we as checkSpatialReference,Te as checkSpatialReferences,Qe as computeVisibilityObb,X as containsDraco,V as extractWkid,ee as filterInPlace,ce as findFieldsCaseInsensitive,Y as findIntersectingNodes,ge as getCacheKeySuffix,ye as getCachedAttributeValue,oe as getClipRect,Se as getIndexCrs,De as getSymbolInfo,be as getVertexCrs,se as intersectBoundingBoxWithMbs,ie as intersectBoundingRectWithMbs,Ee as isSupportedLocalModeProjection,te as objectIdFilter,qe as rendererNeedsTextures,We as transformObb,ke as transparentEdgeMaterial,le as whenGraphicAttributes};
|
|
5
|
+
import e from"../../../../request.js";import{binaryIndexOf as t,flatten as r,splitIntoChunks as o}from"../../../../core/arrayUtils.js";import n from"../../../../core/Error.js";import a from"../../../../core/has.js";import{isSome as i,isNone as s}from"../../../../core/maybe.js";import{eachAlways as c}from"../../../../core/promiseUtils.js";import{isInt16Array as l,isInt32Array as u}from"../../../../core/typedArrayUtil.js";import{g as f}from"../../../../chunks/mat3.js";import{c as p}from"../../../../chunks/mat3f64.js";import{a as m}from"../../../../chunks/mat4.js";import{c as h}from"../../../../chunks/mat4f64.js";import{a as d,m as y,c as S}from"../../../../chunks/quat.js";import{b}from"../../../../chunks/quatf32.js";import{s as g,c as w,v as E,q as T,g as I,a as M,m as v}from"../../../../chunks/vec3.js";import{c as R}from"../../../../chunks/vec3f64.js";import{c as x}from"../../../../chunks/vec4f64.js";import{projectBoundingSphere as j,canProjectWithoutEngine as C,projectBuffer as N,computeTranslationToOriginAndRotation as q,projectVectorToVector as k}from"../../../../geometry/projection.js";import{getSphericalPCPF as U,getReferenceEllipsoid as D}from"../../../../geometry/projectionEllipsoid.js";import _ from"../../../../geometry/SpatialReference.js";import{create as W,empty as z,expandPointInPlace as F,intersects as O}from"../../../../geometry/support/aaBoundingRect.js";import{isPlateCarree as A}from"../../../../geometry/support/spatialReferenceUtils.js";import G from"../../../../rest/support/Query.js";import{readBinaryAttribute as K}from"./I3SBinaryReader.js";import{computeGlobalTransformation as L}from"./I3SProjectionUtil.js";import{createSolidEdgeMaterial as B,createMaterialFromEdges as P}from"../support/edgeUtils.js";import{parseColorMixMode as $,ColorMixModeEnum as Q}from"../support/symbolColorUtils.js";import{create as Z,compute as H,corners as J}from"../../support/orientedBoundingBox.js";function V(e){return e&&parseInt(e.substring(e.lastIndexOf("/")+1,e.length),10)}function X(e){if(a("disable-feature:i3s-draco")||!e)return!1;for(const r of e)for(const e of r.geometryBuffers){var t;if("draco"===(null==(t=e.compressedAttributes)?void 0:t.encoding))return!0}return!1}function Y(e,t,r,o,n,a){n.traverse(r,(r=>{let n=r.mbs;t!==o&&(n=ne,j(r.mbs,o,n,t));const i=ie(e,n);return i!==ae.OUTSIDE&&(a(r,i),!0)}))}function ee(e,t,r){let o=0,n=0;for(let a=0;a<t.length&&o<e.length;a++)e[o]===t[a]&&(r(a)&&(e[n]=e[o],n++),o++);e.length=n}function te(e,r,o){let n=0,a=0;for(;n<o.length;){t(e,o[n])>=0===r&&(o[a]=o[n],a++),n++}o.length=a}const re=W();function oe(e,t){if(0===t.rotationScale[1]&&0===t.rotationScale[2]&&0===t.rotationScale[3]&&0===t.rotationScale[5]&&0===t.rotationScale[6]&&0===t.rotationScale[7])return re[0]=(e[0]-t.position[0])/t.rotationScale[0],re[1]=(e[1]-t.position[1])/t.rotationScale[4],re[2]=(e[2]-t.position[0])/t.rotationScale[0],re[3]=(e[3]-t.position[1])/t.rotationScale[4],re}const ne=x();var ae;function ie(e,t){const r=t[0],o=t[1],n=t[3],a=e[0]-r,i=r-e[2],s=e[1]-o,c=o-e[3],l=Math.max(a,i,0),u=Math.max(s,c,0),f=l*l+u*u;if(f>n*n)return ae.OUTSIDE;if(f>0)return ae.INTERSECTS_CENTER_OUTSIDE;return-Math.max(a,i,s,c)>n?ae.INSIDE:ae.INTERSECTS_CENTER_INSIDE}function se(e,t){const r=t[0],o=t[1],n=t[2],a=t[3],i=e[0]-r,s=r-e[3],c=e[1]-o,l=o-e[4],u=e[2]-n,f=n-e[5],p=Math.max(i,s,0),m=Math.max(c,l,0),h=Math.max(u,f,0),d=p*p+m*m+h*h;if(d>a*a)return ae.OUTSIDE;if(d>0)return ae.INTERSECTS_CENTER_OUTSIDE;return-Math.max(i,s,c,l,u,f)>a?ae.INSIDE:ae.INTERSECTS_CENTER_INSIDE}function ce(e,t,r){const o=[],n=r&&r.missingFields,a=r&&r.originalFields;for(const i of e){const e=i.toLowerCase();let r=!1;for(const n of t)if(e===n.name.toLowerCase()){o.push(n.name),r=!0,a&&a.push(i);break}!r&&n&&n.push(i)}return o}async function le(e,t,o,a,c){if(0===t.length)return[];const l=e.attributeStorageInfo;if(i(e.associatedLayer))try{return await fe(e.associatedLayer,t,o,a)}catch(u){if(e.associatedLayer.loaded)throw u}if(l){const i=ue(t,o,c);if(s(i))throw new n("scenelayer:features-not-loaded","Tried to query attributes for unloaded features");const u=e.parsedUrl.path,f=await Promise.all(i.map((e=>me(u,l,e.node,e.indices,a).then((t=>{for(let r=0;r<e.graphics.length;r++){const o=e.graphics[r],n=t[r];if(o.attributes)for(const e in o.attributes)e in n||(n[e]=o.attributes[e]);o.attributes=n}return e.graphics})))));return r(f)}throw new n("scenelayer:no-attribute-source","This scene layer does not have a source for attributes available")}function ue(e,t,r){const o=new Map,n=[],a=r();for(const i of e){const e=i.attributes[t];for(let t=0;t<a.length;t++){const r=a[t],s=r.featureIds.indexOf(e);if(s>=0){let e=o.get(r.node);e||(e={node:r.node,indices:[],graphics:[]},n.push(e),o.set(r.node,e)),e.indices.push(s),e.graphics.push(i);for(let r=t;r>0;r--)a[r]=a[r-1];a[0]=r;break}}}return n}async function fe(e,t,r,o){t.sort(((e,t)=>e.attributes[r]-t.attributes[r]));const n=t.map((e=>e.attributes[r])),a=[],i=ce(o,e.fields,{originalFields:a}),s=await pe(e,n,i);for(let c=0;c<t.length;c++){const e=t[c],r=s[c],o={};if(e.attributes)for(const t in e.attributes)o[t]=e.attributes[t];for(let t=0;t<a.length;t++)o[a[t]]=r[i[t]];e.attributes=o}return t}function pe(e,t,a){const i=e.capabilities.query.maxRecordCount;if(null!=i&&t.length>i){const n=o(t,i);return Promise.all(n.map((t=>pe(e,t,a)))).then(r)}const s=new G({objectIds:t,outFields:a,orderByFields:[e.objectIdField]});return e.queryFeatures(s).then((e=>{if(e&&e.features&&e.features.length===t.length)return e.features.map((e=>e.attributes));throw new n("scenelayer:feature-not-in-associated-layer","Feature not found in associated feature layer")}))}function me(t,r,o,n,a){const i=[];for(const e of r)if(e&&a.includes(e.name)){const r=`${t}/nodes/${o.resources.attributes}/attributes/${e.key}/0`;i.push({url:r,storageInfo:e})}return c(i.map((t=>e(t.url,{responseType:"array-buffer"}).then((e=>K(t.storageInfo,e.data)))))).then((e=>{const t=[];for(const r of n){const o={};for(let t=0;t<e.length;t++)null!=e[t].value&&(o[i[t].storageInfo.name]=ye(e[t].value,r));t.push(o)}return t}))}!function(e){e[e.OUTSIDE=0]="OUTSIDE",e[e.INTERSECTS_CENTER_OUTSIDE=1]="INTERSECTS_CENTER_OUTSIDE",e[e.INTERSECTS_CENTER_INSIDE=2]="INTERSECTS_CENTER_INSIDE",e[e.INSIDE=3]="INSIDE"}(ae||(ae={}));const he=-32768,de=-(2**31);function ye(e,t){if(!e)return null;const r=e[t];if(l(e))return r===he?null:r;if(u(e))return r===de?null:r;return r!=r?null:r}function Se(e){const t=e.store.indexCRS||e.store.geographicCRS,r=void 0===t?e.store.indexWKT:void 0;if(r){if(!e.spatialReference)throw new n("layerview:no-store-spatial-reference-wkt-index-and-no-layer-spatial-reference","Found indeWKT in the scene layer store but no layer spatial reference",{});if(r!==e.spatialReference.wkt)throw new n("layerview:store-spatial-reference-wkt-index-incompatible","The indeWKT of the scene layer store does not match the WKT of the layer spatial reference",{})}const o=t?new _(V(t)):e.spatialReference;return o.equals(e.spatialReference)?e.spatialReference:o}function be(e){const t=e.store.vertexCRS||e.store.projectedCRS,r=void 0===t?e.store.vertexWKT:void 0;if(r){if(!e.spatialReference)throw new n("layerview:no-store-spatial-reference-wkt-vertex-and-no-layer-spatial-reference","Found vertexWKT in the scene layer store but no layer spatial reference",{});if(r!==e.spatialReference.wkt)throw new n("layerview:store-spatial-reference-wkt-vertex-incompatible","The vertexWKT of the scene layer store does not match the WKT of the layer spatial reference",{})}const o=t?new _(V(t)):e.spatialReference;return o.equals(e.spatialReference)?e.spatialReference:o}function ge(e,t){return s(t)?"@null":t===U(t)?"@ECEF":e.equals(t)?"":null!=t.wkid?"@"+t.wkid:null}function we(e,t,r){if(!C(e,t))throw new n("layerview:spatial-reference-incompatible","The spatial reference of this scene layer is incompatible with the spatial reference of the view",{});if("local"===r&&!Ee(e,t))throw new n("layerview:spatial-reference-incompatible","The spatial reference of this scene layer is incompatible with the spatial reference of the view",{})}function Ee(e,t){return e.equals(t)||e.isWGS84&&t.isWebMercator||e.isWebMercator&&t.isWGS84}function Te(e,t,r){const o=Se(e),n=be(e);we(o,t,r),we(n,t,r)}function Ie(e){return(null==e.geometryType||"triangles"===e.geometryType)&&((null==e.topology||"PerAttributeArray"===e.topology)&&(null!=e.vertexAttributes&&null!=e.vertexAttributes.position))}function Me(e){if(null==e.store||null==e.store.defaultGeometrySchema||!Ie(e.store.defaultGeometrySchema))throw new n("scenelayer:unsupported-geometry-schema","The geometry schema of this scene layer is not supported.",{url:e.parsedUrl.path})}function ve(e,t){Te(e,t.spatialReference,t.viewingMode)}function Re(e){return null!=e.geometryType&&"points"===e.geometryType&&((null==e.topology||"PerAttributeArray"===e.topology)&&((null==e.encoding||""===e.encoding||"lepcc-xyz"===e.encoding)&&(null!=e.vertexAttributes&&null!=e.vertexAttributes.position)))}function xe(e){if(null==e.store||null==e.store.defaultGeometrySchema||!Re(e.store.defaultGeometrySchema))throw new n("pointcloud:unsupported-geometry-schema","The geometry schema of this point cloud scene layer is not supported.",{})}function je(e,t){we(e.spatialReference,t.spatialReference,t.viewingMode)}function Ce(e){return"simple"===e.type||"class-breaks"===e.type||"unique-value"===e.type}function Ne(e){return"mesh-3d"===e.type}function qe(e){if(null==e||!Ce(e))return!0;if(("unique-value"===e.type||"class-breaks"===e.type)&&null==e.defaultSymbol)return!0;const t=e.getSymbols();if(0===t.length)return!0;for(const r of t){if(!Ne(r)||0===r.symbolLayers.length)return!0;for(const e of r.symbolLayers.items)if("fill"!==e.type||s(e.material)||s(e.material.color)||"replace"!==e.material.colorMixMode)return!0}return!1}const ke=B({color:[0,0,0,0],opacity:0});class Ue{constructor(){this.edgeMaterial=null,this.material=null,this.castShadows=!0}}function De(e){const t=new Ue;let r=!1,o=!1;for(const n of e.symbolLayers.items)if("fill"===n.type&&n.enabled){const e=n.material,a=n.edges;if(i(e)&&!r){const o=e.color,a=$(e.colorMixMode);i(o)?t.material={color:[o.r/255,o.g/255,o.b/255],alpha:o.a,colorMixMode:a}:t.material={color:[1,1,1],alpha:1,colorMixMode:Q.Multiply},t.castShadows=n.castShadows,r=!0}i(a)&&!o&&(t.edgeMaterial=P(a,{}),o=!0)}return t.material||(t.material={color:[1,1,1],alpha:1,colorMixMode:Q.Multiply}),t}function _e(e,t){return(0|e)+(0|t)|0}function We(e,t,r,o,n=0){o===U(o)?t.isGeographic?$e(e,r,t,n):Pe(e,r,t,n):t.isWGS84&&(o.isWebMercator||A(o))?ze(t,e,o,r,n):t.isWebMercator&&A(o)?Le(t,e,o,r,n):e===r?(r.center[2]+=n,N(r.center,t,0,r.center,o,0,1)):(g(r.center,e.center[0],e.center[1],e.center[2]+n),N(r.center,t,0,r.center,o,0,1),d(r.quaternion,e.quaternion),w(r.halfSize,e.halfSize))}function ze(e,t,r,o,n){w(Ge,t.center),Ge[2]+=n;const a=U(r);N(Ge,e,0,Ge,a,0,1),Be(a,t,Ge,r,o)}const Fe=new Float64Array(24),Oe={data:Fe,size:3},Ae=R(),Ge=R(),Ke=p();function Le(e,t,r,o,n){w(Ge,t.center),Ge[2]+=n,Be(e,t,Ge,r,o)}function Be(e,t,r,o,n){const a=f(Ke,t.quaternion);for(let i=0;i<8;++i){for(let e=0;e<3;++e)Ae[e]=t.halfSize[e]*(0!=(i&1<<e)?-1:1);for(let e=0;e<3;++e){let t=r[e];for(let r=0;r<3;++r)t+=Ae[r]*a[3*r+e];Fe[3*i+e]=t}}N(Fe,e,0,Fe,o,0,8),H(Oe,n)}function Pe(e,t,r,o){J(e,Je),g(t.center,e.center[0],e.center[1],e.center[2]+o),q(r,t.center,Ze,U(r)),g(t.center,Ze[12],Ze[13],Ze[14]);const n=2*Math.sqrt(1+Ze[0]+Ze[5]+Ze[10]);He[0]=(Ze[6]-Ze[9])/n,He[1]=(Ze[8]-Ze[2])/n,He[2]=(Ze[1]-Ze[4])/n,He[3]=.25*n,y(t.quaternion,He,e.quaternion),S(He,t.quaternion);let a=0,i=0,s=0;for(const c of Je)c[2]+=o,N(c,r,0,c,U(r),0,1),E(et,c,t.center),T(et,et,He),a=Math.max(a,Math.abs(et[0])),i=Math.max(i,Math.abs(et[1])),s=Math.max(s,Math.abs(et[2]));g(t.halfSize,a,i,s)}function $e(e,t,r,o){const n=D(r),a=1+Math.max(0,o)/(n.radius+e.center[2]);g(t.center,e.center[0],e.center[1],e.center[2]+o),N(t.center,r,0,t.center,U(r),0,1),d(t.quaternion,e.quaternion),S(He,e.quaternion),g(et,0,0,1),T(et,et,He),g(et,e.halfSize[0]*Math.abs(et[0]),e.halfSize[1]*Math.abs(et[1]),e.halfSize[2]*Math.abs(et[2])),I(et,et,n.inverseFlattening),M(t.halfSize,e.halfSize,et),I(t.halfSize,t.halfSize,a)}function Qe(e,t,r,o,n,a){if(!a||0===a.length||s(t))return null;const c=L(e.mbs,n,r,t);let l;m(rt,c);const u=()=>{if(!l)if(l=Je,z(Xe),i(e.serviceObb)){We(e.serviceObb,r,Ye,t,n),J(Ye,l);for(const e of l)v(e,e,rt),F(Xe,e)}else{const o=e.mbs,a=o[3];k(o,r,et,t),v(et,et,rt),et[2]+=n;for(let e=0;e<8;++e){const t=1&e?a:-a,r=2&e?a:-a,o=4&e?a:-a,n=l[e];w(n,[et[0]+t,et[1]+r,et[2]+o]),F(Xe,n)}}};let f=1/0,p=-1/0;const h=e=>{if("replace"!==e.type)return;const r=e.geometry;if(!r.hasZ)return;z(Ve);const n=r.spatialReference||o,a=r.rings.reduce(((e,r)=>r.reduce(((e,r)=>(k(r,n,et,t),v(et,et,rt),F(Ve,et),Math.min(et[2],e))),e)),1/0);u(),O(Xe,Ve)&&(f=Math.min(f,a),p=Math.max(p,a))};if(a.forEach((e=>h(e))),f===1/0)return null;const d=(e,t,r)=>{v(et,r,c),e[t+0]=et[0],e[t+1]=et[1],e[t+2]=et[2],t+=24,r[2]=f,v(et,r,c),e[t+0]=et[0],e[t+1]=et[1],e[t+2]=et[2],t+=24,r[2]=p,v(et,r,c),e[t+0]=et[0],e[t+1]=et[1],e[t+2]=et[2]};for(let i=0;i<8;++i)d(tt.data,3*i,l[i]);return H(tt)}const Ze=h(),He=b(),Je=[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],Ve=W(),Xe=W(),Ye=Z(),et=[0,0,0],tt={data:new Array(72),size:3},rt=h();export{ae as MbsIntersectResult,Ue as SymbolInfo,_e as addWraparound,je as checkPointCloudLayerCompatibleWithView,xe as checkPointCloudLayerValid,ve as checkSceneLayerCompatibleWithView,Me as checkSceneLayerValid,we as checkSpatialReference,Te as checkSpatialReferences,Qe as computeVisibilityObb,X as containsDraco,V as extractWkid,ee as filterInPlace,ce as findFieldsCaseInsensitive,Y as findIntersectingNodes,ge as getCacheKeySuffix,ye as getCachedAttributeValue,oe as getClipRect,Se as getIndexCrs,De as getSymbolInfo,be as getVertexCrs,se as intersectBoundingBoxWithMbs,ie as intersectBoundingRectWithMbs,Ee as isSupportedLocalModeProjection,te as objectIdFilter,qe as rendererNeedsTextures,We as transformObb,ke as transparentEdgeMaterial,le as whenGraphicAttributes};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
class t{constructor(){this._data=new Map,this._miss=0,this._hit=0,this.initialized=!0}init(){return Promise.resolve()}async get(t,s){return this._data.has(t)?(this._hit++,this._data.get(t)):(this._miss++,null)}destroy(){}put(t,s){return this._data.set(t,s),Promise.resolve()}remove(t){return this._data.delete(t),Promise.resolve()}getHitRate(){return this._hit/(this._hit+this._miss)}}export{t as IDBMockCache};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isNone as e,isSome as o}from"../../../../core/maybe.js";import r from"../../../../renderers/PointCloudClassBreaksRenderer.js";import t from"../../../../renderers/PointCloudStretchRenderer.js";import
|
|
5
|
+
import{isNone as e,isSome as o}from"../../../../core/maybe.js";import r from"../../../../renderers/PointCloudClassBreaksRenderer.js";import t from"../../../../renderers/PointCloudStretchRenderer.js";import l from"../../../../renderers/PointCloudUniqueValueRenderer.js";import{createGeometryIndexFromSchema as n,createTypedView as s,readBinaryAttribute as i}from"./I3SBinaryReader.js";import{decodeXYZ as u}from"./LEPCC.js";function f(e,o,n,s){const{rendererJSON:i,isRGBRenderer:u}=e;let f=null,c=null;if(o&&u)f=o;else if(o&&"pointCloudUniqueValueRenderer"===i.type){c=l.fromJSON(i);const e=c.colorUniqueValueInfos;f=new Uint8Array(3*s);const r=p(c.fieldTransformType);for(let t=0;t<s;t++){const l=(r?r(o[t]):o[t])+"";for(let o=0;o<e.length;o++)if(e[o].values.includes(l)){f[3*t]=e[o].color.r,f[3*t+1]=e[o].color.g,f[3*t+2]=e[o].color.b;break}}}else if(o&&"pointCloudStretchRenderer"===i.type){c=t.fromJSON(i);const e=c.stops;f=new Uint8Array(3*s);const r=p(c.fieldTransformType);for(let t=0;t<s;t++){const l=r?r(o[t]):o[t],n=e.length-1;if(l<e[0].value)f[3*t]=e[0].color.r,f[3*t+1]=e[0].color.g,f[3*t+2]=e[0].color.b;else if(l>=e[n].value)f[3*t]=e[n].color.r,f[3*t+1]=e[n].color.g,f[3*t+2]=e[n].color.b;else for(let o=1;o<e.length;o++)if(l<e[o].value){const r=(l-e[o-1].value)/(e[o].value-e[o-1].value);f[3*t]=e[o].color.r*r+e[o-1].color.r*(1-r),f[3*t+1]=e[o].color.g*r+e[o-1].color.g*(1-r),f[3*t+2]=e[o].color.b*r+e[o-1].color.b*(1-r);break}}}else if(o&&"pointCloudClassBreaksRenderer"===i.type){c=r.fromJSON(i);const e=c.colorClassBreakInfos;f=new Uint8Array(3*s);const t=p(c.fieldTransformType);for(let r=0;r<s;r++){const l=t?t(o[r]):o[r];for(let o=0;o<e.length;o++)if(l>=e[o].minValue&&l<=e[o].maxValue){f[3*r]=e[o].color.r,f[3*r+1]=e[o].color.g,f[3*r+2]=e[o].color.b;break}}}else{f=new Uint8Array(3*s);for(let e=0;e<f.length;e++)f[e]=255}if(n&&c&&c.colorModulation){const e=c.colorModulation.minValue,o=c.colorModulation.maxValue,r=.3;for(let t=0;t<s;t++){const l=n[t],s=l>=o?1:l<=e?r:r+(1-r)*(l-e)/(o-e);f[3*t]=s*f[3*t],f[3*t+1]=s*f[3*t+1],f[3*t+2]=s*f[3*t+2]}}return f}function c(o,r){if(null==o.encoding||""===o.encoding){const t=n(r,o);if(e(t.vertexAttributes.position))return;const l=s(r,t.vertexAttributes.position),i=t.header.fields,u=[i.offsetX,i.offsetY,i.offsetZ],f=[i.scaleX,i.scaleY,i.scaleZ],c=l.length/3,a=new Float64Array(3*c);for(let e=0;e<c;e++)a[3*e]=l[3*e]*f[0]+u[0],a[3*e+1]=l[3*e+1]*f[1]+u[1],a[3*e+2]=l[3*e+2]*f[2]+u[2];return a}if("lepcc-xyz"===o.encoding)return u(r).result}function a(e,r,t){return o(e)&&e.attributeInfo.useElevation?d(r,t):o(e)?i(e.attributeInfo.storageInfo,e.buffer,t):null}function d(e,o){const r=new Float64Array(o);for(let t=0;t<o;t++)r[t]=e[3*t+2];return r}function m(e,o,r,t,l){const n=e.length/3;let s=0;for(let i=0;i<n;i++){let n=!0;for(let e=0;e<t.length&&n;e++){const{filterJSON:o}=t[e],r=l[e].values[i];switch(o.type){case"pointCloudValueFilter":{const e="exclude"===o.mode;o.values.includes(r)===e&&(n=!1);break}case"pointCloudBitfieldFilter":{const e=b(o.requiredSetBits),t=b(o.requiredClearBits);(r&e)===e&&0==(r&t)||(n=!1);break}case"pointCloudReturnFilter":{const e=15&r,t=r>>>4&15,l=t>1,s=1===e,i=e===t;let u=!1;for(const r of o.includedReturns)if("last"===r&&i||"firstOfMany"===r&&s&&l||"lastOfMany"===r&&i&&l||"single"===r&&!l){u=!0;break}u||(n=!1);break}}}n&&(r[s]=i,e[3*s]=e[3*i],e[3*s+1]=e[3*i+1],e[3*s+2]=e[3*i+2],o[3*s]=o[3*i],o[3*s+1]=o[3*i+1],o[3*s+2]=o[3*i+2],s++)}return s}function p(e){return null==e||"none"===e?null:"low-four-bit"===e?e=>15&e:"high-four-bit"===e?e=>(240&e)>>4:"absolute-value"===e?e=>Math.abs(e):"modulo-ten"===e?e=>e%10:null}function b(e){let o=0;for(const r of e||[])o|=1<<r;return o}export{d as elevationFromPositions,f as evaluateRenderer,m as filterInPlace,a as getAttributeValues,c as readGeometry};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import r from"../../../../core/Error.js";import{isSome as s}from"../../../../core/maybe.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/set.js";import{subclass as t}from"../../../../core/accessorSupport/decorators/subclass.js";import{unpackFieldNames as o,populateMissingFields as p}from"../../../../layers/support/fieldUtils.js";import{getFetchPopupTemplate as a,getRequiredFields as i}from"../../../layers/support/popupUtils.js";const c=c=>{let u=class extends c{_validateFetchPopupFeatures(e){const{layer:s}=this,{popupEnabled:t}=s;if(!t)return new r("scenelayerview3d:fetchPopupFeatures","Popups are disabled",{layer:s});return a(s,e)?void 0:new r("scenelayerview3d:fetchPopupFeatures","Layer does not define a popup template",{layer:s})}async prepareFetchPopupFeatures(e){}async fetchPopupFeatures(e,r){const t=this._validateFetchPopupFeatures(r);if(t)
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import r from"../../../../core/Error.js";import{isSome as s}from"../../../../core/maybe.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/set.js";import{subclass as t}from"../../../../core/accessorSupport/decorators/subclass.js";import{unpackFieldNames as o,populateMissingFields as p}from"../../../../layers/support/fieldUtils.js";import{getFetchPopupTemplate as a,getRequiredFields as i}from"../../../layers/support/popupUtils.js";const c=c=>{let u=class extends c{_validateFetchPopupFeatures(e){const{layer:s}=this,{popupEnabled:t}=s;if(!t)return new r("scenelayerview3d:fetchPopupFeatures","Popups are disabled",{layer:s});return a(s,e)?void 0:new r("scenelayerview3d:fetchPopupFeatures","Layer does not define a popup template",{layer:s})}async prepareFetchPopupFeatures(e){}async fetchPopupFeatures(e,r){const t=this._validateFetchPopupFeatures(r);if(t)throw t;const c=s(r)?r.clientGraphics:null;if(!c||0===c.length)return[];const u="scene"===this.layer.type&&s(this.layer.associatedLayer)?this.layer.associatedLayer:this.layer,n=o(this.layer.fieldsIndex,await i(u,a(this.layer,r)));await this.prepareFetchPopupFeatures(n);const l=new Set,h=[],y=[];for(const s of c)p(n,s,l)?y.push(s):h.push(s);return 0===y.length?h:this.whenGraphicAttributes(y,[...l]).catch((()=>y)).then((e=>h.concat(e)))}};return u=e([t("esri.views.3d.layers.support.PopupSceneLayerView")],u),u};export{c as PopupSceneLayerView};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Camera.js";import i from"../../../Viewpoint.js";import r from"../../../core/Accessor.js";import a from"../../../core/Handles.js";import s from"../../../core/Logger.js";import{isNone as o,isSome as n}from"../../../core/maybe.js";import{addFrameTask as h}from"../../../core/scheduling.js";import{createScreenPoint as p}from"../../../core/screenUtils.js";import{on as l,once as c,whenOnce as m}from"../../../core/watchUtils.js";import{property as d}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as v}from"../../../core/accessorSupport/decorators/subclass.js";import{d as u}from"../../../chunks/vec3.js";import{d as w}from"../../../chunks/vec3f64.js";import{s as y}from"../../../chunks/vec4.js";import{c as C}from"../../../chunks/vec4f64.js";import f from"../../../geometry/Extent.js";import g from"../../../geometry/Point.js";import{canProject as _}from"../../../geometry/support/webMercatorUtils.js";import{ViewingMode as x}from"../../ViewingMode.js";import{applyAll as R}from"../camera/constraintUtils.js";import{cameraOnContentAlongViewDirection as O,surfaceElevationBelowRenderLocation as P}from"../camera/intersectionUtils.js";import{ConstraintsManager as T}from"./ConstraintsManager.js";import{Frustum as b}from"./Frustum.js";import{GoToOperation as S}from"./GoToOperation.js";import{SurfaceCollisionCorrectionController as j}from"./controllers/SurfaceCollisionCorrectionController.js";import{internalToExternal as M,externalToInternal as I,toExtent as B,distanceToScale as U,scaleToZoom as k,fromExtent as z,OrientationMode as E,getObserverForPointAtDistance as V,scaleToDistance as A,zoomToScale as D}from"../support/cameraUtils.js";import{PropertiesPool as H}from"../support/PropertiesPool.js";import{fromCamera as N,toCamera as F}from"../support/viewpointUtils.js";import{Camera as G,PaddingSide as L}from"../webgl-engine/lib/Camera.js";const q=s.getLogger("esri.views.3d.state.ViewStateManager");let W=class extends r{constructor(e){super(e),this.propertiesPool=new H({frustum:b},this),this.handles=new a,this.cameraSetByUser=!1,this.gotoOperation=null,this.ready=!1,this._windowDevicePixelRatio=1,this._devicePixelRatioOverride=null,this._maximumPixelRatioOverride=null,this.test={contentCameraResetState:new Map,setDevicePixelRatio:e=>this._devicePixelRatioOverride=e,setMaximumPixelRatio:e=>this._maximumPixelRatioOverride=e}}get camera(){const e=this._get("camera");if(!this.ready)return e;const t=M(this.view,this.view.state.camera);return t&&e&&t.equals(e)?e:t}set camera(e){this._updatePropertyBeforeReady("camera",e)||(this.view.elevationProvider.enableElevationCache(!0),this.setStateCamera(I(this.view,e),{applyConstraints:!1})||q.error("#camera=","Invalid camera",e),this.view.elevationProvider.enableElevationCache(!1))}get contentCamera(){const e=this._get("contentCamera");if(!this.ready)return e;const t=M(this.view,this.view.state.contentCamera);return t&&e&&t.equals(e)?e:t}set contentCamera(e){if(this._updatePropertyBeforeReady("contentCamera",e))return;const t=I(this.view,e);o(t)?this.view.state.contentCamera=null:(this._updateElevation(t),this.view.state.contentCamera=t)}installContentCameraReset(e){if(this.handles.remove("contentCameraReset"),this.test.contentCameraResetState.clear(),!this.view.state.fixedContentCamera)return!1;const t=this.zoom,i=this.view.state.camera.distance**2,r=w(this.view.state.camera.center),a=e.sticky?this.contentCamera.clone():null;return this.handles.add([this.watch("contentCamera",(()=>{e.sticky||(this.handles.remove("contentCameraReset"),this.test.contentCameraResetState.clear())})),this.watch("zoom",(e=>{this.test.contentCameraResetState.set("view.zoom",Math.abs(e-t)/2),Math.abs(e-t)>2?this.contentCamera=null:this.view.state.fixedContentCamera||(this.contentCamera=a)})),this.view.state.watch("camera",(e=>{const t=u(r,e.center);this.test.contentCameraResetState.set("camera.center",t/i),t>i?this.contentCamera=null:this.view.state.fixedContentCamera||(this.contentCamera=a)}))],"contentCameraReset"),!0}get center(){return this.ready?this.view.pointsOfInterest.centerOnContent.location:this._get("center")}set center(e){this._updatePropertyBeforeReady("center",e)||(e?this.isCompatible(e)?this.setStateCamera(this._centerToCamera(e),{applyConstraints:!0})?this.view.pointsOfInterest.centerOnContent.runTask():q.error("#center=","Invalid center",e):q.error("#center=","Center has an incompatible spatial reference (center: "+(e.spatialReference?e.spatialReference.wkid:"none")+", view: "+this.view.spatialReference.wkid+")",e):q.error("#center=","Center may not be null or undefined"))}get extent(){if(!this.ready)return this._get("extent");const e=this.view,t=B(e,e.state.camera,e.pointsOfInterest.centerOnContent.renderLocation);return n(t)?t:this._get("extent")}set extent(e){this._updatePropertyBeforeReady("extent",e)||(e?this.isCompatible(e)?this.setStateCamera(this._extentToCamera(e),{applyConstraints:!0})||q.error("#extent=","Invalid extent",e):q.error("#extent=","Extent has an incompatible spatial reference (extent: "+(e.spatialReference?e.spatialReference.wkid:"none")+", view: "+this.view.spatialReference.wkid+")",e):q.error("#extent=","Extent may not be null or undefined"))}get frustum(){const e=this.propertiesPool.get("frustum");return e.renderCoordsHelper=this.view.renderCoordsHelper,e.update(this.view.state.camera),e}get hasInitialView(){return!!this.view.get("map.initialViewProperties.viewpoint")}get scale(){if(this.ready){const e=this.view.pointsOfInterest.centerOnContent;return U(this.view,e.distance,e.location.latitude)}return this._get("scale")}set scale(e){this._updatePropertyBeforeReady("scale",e)||this.setStateCamera(this._scaleToCamera(e),{applyConstraints:!0})||q.error("#scale=","Invalid scale",e)}get padding(){if(!this.ready)return this._get("padding");const e=this.view.state.camera,t=e.padding,i=e.pixelRatio,r=this._get("padding"),a=Math.round(t[L.TOP]/i),s=Math.round(t[L.RIGHT]/i),o=Math.round(t[L.BOTTOM]/i),n=Math.round(t[L.LEFT]/i);return null!=r&&r.top===a&&r.right===s&&r.bottom===o&&r.left===n?r:{top:a,right:s,bottom:o,left:n}}set padding(e){this._updatePropertyBeforeReady("padding",e)||(this._paddingToArray(e,this.view.state.camera.pixelRatio,$),this.view.state.updateCamera((e=>e.padding=$)))}_paddingToArray(e,t,i){e?y(i,e.top||0,e.right||0,e.bottom||0,e.left||0):y(i,0,0,0,0);for(let r=0;r<4;r++)i[r]=Math.round(i[r]*t)}get screenCenter(){const e=this.padding;return p((this.view.width-(e.left+e.right))/2+e.left,(this.view.height-(e.top+e.bottom))/2+e.top)}get viewpoint(){return this.ready?N(this.view,this.camera):this._get("viewpoint")}set viewpoint(e){if(!this._updatePropertyBeforeReady("viewpoint",e))if(e)if(this.isCompatible(e))this.setStateCamera(this._viewpointToCamera(e),{applyConstraints:!e.camera})||q.error("#viewpoint=","Invalid viewpoint",e);else{const t=n(e.camera)?e.camera.position:e.targetGeometry,i=n(t)&&t.spatialReference;q.error("#viewpoint=","Viewpoint has an incompatible spatial reference (viewpoint: "+(i?i.wkid:"none")+", view: "+this.view.spatialReference.wkid+")",e)}else q.error("#viewpoint=","Viewpoint may not be null or undefined")}get zoom(){return this.ready?k(this.view,this.scale):this._get("zoom")}set zoom(e){this._updatePropertyBeforeReady("zoom",e)||this.setStateCamera(this._zoomToCamera(e),{applyConstraints:!0})||q.error("#zoom=","Invalid zoom",e)}get maximumPixelRatio(){if(n(this._maximumPixelRatioOverride))return this._maximumPixelRatioOverride;let e=1/0;const{maximumPixelRatio:t,maximumRenderResolution:i}=this.view.qualitySettings;if(null!=t&&(e=Math.min(e,t)),null!=i){const t=i/Math.max(this.view.width,this.view.height);e=Math.min(e,t)}return e}get _devicePixelRatio(){return o(this._devicePixelRatioOverride)?Math.min(this._windowDevicePixelRatio,this.maximumPixelRatio):this._devicePixelRatioOverride}initialize(){this.handles.add([l(this.view,"state.events","before-camera-change",(e=>this._updateElevation(e.camera)))]),c(this.view.state,"camera",(e=>this._updateElevation(e)),!0),this.handles.add(h({prepare:()=>this._prepareFrame()})),this.handles.add(this.view.state.watch("cameraController",(()=>{this.cameraSetByUser=!0,this.handles.remove(ee)}))),this.handles.add(l(this.view,"state.events","camera-projection-changed",(()=>this.notifyChange("scale"))))}destroy(){this.deinit(),this.handles&&(this.handles.destroy(),this.handles=null),this.propertiesPool&&(this.propertiesPool.destroy(),this.propertiesPool=null)}init(){this.constraintsManager=new T({view:this.view}),this._prepareFrame();const e=this._getInitialProperties();this.cameraSetByUser=!1,this._set("ready",!0);for(const t of e)this.set(t.name,t.value);if(!this.cameraSetByUser){const e=this.view.get("map.initialViewProperties.viewpoint")||this.view.initialExtent;e&&this.isCompatible(e)?this._setInitialView(e):this.view.state.viewingMode===x.Local&&this.handles.add(m(this.view.basemapTerrain,"ready",(()=>{this.handles.remove(ee),this._setInitialView(this.view.dataExtent)})),ee)}}deinit(){this._cancelGoToOperation(),this.ready&&(this._override("padding",this.padding),this._set("ready",!1),this._clearOverride("hasInitialView"),this.cameraSetByUser=!1,this.handles.remove(ee),this.constraintsManager&&(this.constraintsManager.destroy(),this.constraintsManager=null))}async goTo(e,t){const i={animate:!0,...t};return n(this.gotoOperation)&&this.gotoOperation.abort(i.animate),this.gotoOperation=new S(e,i,this.view),this.view.resourceController.scheduler.stopFrame(),this.gotoOperation}debugSetCameraOnContent(){this.setStateCamera(O(this.view),{applyConstraints:!1})}step(e){const t=this.view.state,i=t&&this.view.state.cameraController;i&&(t.updateCamera((t=>{i.stepController(e,t)})),i.steppingFinished&&i.finishController())}_cancelGoToOperation(){n(this.gotoOperation)&&(this.gotoOperation.abort(),this.gotoOperation=null)}_getInitialProperties(){const e=new Set,t=[];for(const{propertyName:i,overrides:r}of Q){const a=e.has(i),s=this._isOverridden(i);!a&&s&&t.push({name:i,value:this._get(i)}),this._clearOverride(i),(a||s)&&r.forEach((t=>e.add(t)))}return t}_setInitialView(e){if(o(e)||this.cameraSetByUser)return;if(e instanceof t)return void this.setStateCamera(I(this.view,e),{applyConstraints:!1});if(e instanceof i){if(e.targetGeometry instanceof f){const t=z(this.view,e.targetGeometry,0,.5,E.LOCKED);return void(n(t)&&this.setStateCamera(I(this.view,t),{applyConstraints:!0}))}const t={applyConstraints:!e.camera},i=this._viewpointToCamera(e);return void this.setStateCamera(i,t)}const r=z(this.view,e,0,.5,E.LOCKED);n(r)&&this.setStateCamera(I(this.view,r),{applyConstraints:!0})}_updatePropertyBeforeReady(e,t){return!this.ready&&(this._override(e,t),t&&-1!==K.indexOf(e)&&this._override("hasInitialView",!0),!0)}isCompatible(e){return!o(e)&&(e instanceof i?e.camera?this.isCompatible(e.camera):this.isCompatible(e.targetGeometry):e instanceof t?this.isCompatible(e.position):e.spatialReference&&_(e.spatialReference,this.view.spatialReference))}_getPreservingHeadingTilt(e=X){return this.cameraSetByUser?(e.heading=this.camera.heading,e.tilt=this.camera.tilt):(e.heading=0,e.tilt=.5),e}_centerPointAtDistanceToCamera(e,t,i=Z){const{heading:r,tilt:a}=this._getPreservingHeadingTilt(),s=V(this.view,r,a,e,t,E.ADJUST);return o(s)?null:(i.copyFrom(this.view.state.camera),i.eye=s.eye,i.center=s.center,i.up=s.up,i)}_centerToCamera(e){const t=this.view.pointsOfInterest.centerOnContent;t.runTask();const i=t.distance;return this._centerPointAtDistanceToCamera(e,i)}_extentToCamera(e){const{heading:t,tilt:i}=this._getPreservingHeadingTilt(),r=z(this.view,e,t,i,E.ADJUST,Y);return n(r)?I(this.view,r):null}_scaleToCamera(e){if(null==e)return null;const t=this.view.pointsOfInterest.centerOnContent;t.runTask();const i=t.renderLocation,r=t.location.latitude,a=A(this.view,e,r);return this._centerPointAtDistanceToCamera(i,a)}_zoomToCamera(e){return this._scaleToCamera(D(this.view,e))}_viewpointToCamera(e){return I(this.view,F(this.view,e))}setStateCamera(e,t){return!(o(e)||!this.view.state.stopActiveCameraController())&&(this.cameraSetByUser=!0,t.doNotCancelGoToOperation||this._cancelGoToOperation(),this.view.state.updateCamera((i=>{t.positionAndOrientationOnly?(i.eye=e.eye,i.center=e.center,i.up=e.up):i.copyFrom(e),t.applyConstraints&&R(this.view,i)})),t.applyConstraints||(this.view.state.cameraController=new j({view:this.view,desiredCamera:e})),!0)}_prepareFrame(){const{container:e,canvas:t}=this.view;if(!e||!t)return;this._windowDevicePixelRatio=window.devicePixelRatio;const i=this._devicePixelRatio,r=Math.round(e.clientWidth*i),a=Math.round(e.clientHeight*i);if(0!==r&&0!==a&&(t.width===r&&t.height===a||(t.width=r,t.height=a),this.view.state)){const e=this.view.state.camera;e.fullWidth===r&&e.fullHeight===a&&e.pixelRatio===i||(Z.copyFrom(e),Z.pixelRatio!==i&&(this._paddingToArray(this.padding,i,$),Z.padding=$),Z.fullWidth=r,Z.fullHeight=a,Z.pixelRatio=i,this.view.state.camera=Z)}}_updateElevation(e){const t=this.view.basemapTerrain&&this.view.basemapTerrain.spatialReference,i=this.view.renderCoordsHelper.getAltitude(e.eye),r=t?P(this.view,e.eye):0;e.relativeElevation=i-r}};e([d({type:t,dependsOn:["view.state.camera","ready"]})],W.prototype,"camera",null),e([d({type:t,dependsOn:["view.state.contentCamera","ready"]})],W.prototype,"contentCamera",null),e([d({type:g})],W.prototype,"center",null),e([d({type:f})],W.prototype,"extent",null),e([d({readOnly:!0})],W.prototype,"frustum",null),e([d({readOnly:!0})],W.prototype,"hasInitialView",null),e([d({readOnly:!0,type:Boolean})],W.prototype,"ready",void 0),e([d({type:Number})],W.prototype,"scale",null),e([d()],W.prototype,"padding",null),e([d({readOnly:!0})],W.prototype,"screenCenter",null),e([d({constructOnly:!0})],W.prototype,"view",void 0),e([d({type:i})],W.prototype,"viewpoint",null),e([d({type:Number})],W.prototype,"zoom",null),e([d()],W.prototype,"maximumPixelRatio",null),e([d()],W.prototype,"_devicePixelRatio",null),e([d()],W.prototype,"_windowDevicePixelRatio",void 0),e([d()],W.prototype,"_devicePixelRatioOverride",void 0),e([d()],W.prototype,"_maximumPixelRatioOverride",void 0),W=e([v("esri.views.3d.state.ViewStateManager")],W);const J=W,K=["camera","viewpoint","extent","scale","center","zoom"],Q=[{propertyName:"camera",overrides:["viewpoint"]},{propertyName:"viewpoint",overrides:["extent"]},{propertyName:"extent",overrides:["center","scale"]},{propertyName:"center",overrides:[]},{propertyName:"scale",overrides:["zoom"]},{propertyName:"zoom",overrides:[]},{propertyName:"padding",overrides:[]}],X={heading:0,tilt:0},Y=new t,Z=new G,$=C(),ee="pending-initial-view";export{J as default};
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Camera.js";import i from"../../../Viewpoint.js";import r from"../../../core/Accessor.js";import a from"../../../core/Handles.js";import s from"../../../core/Logger.js";import{isNone as o,isSome as n}from"../../../core/maybe.js";import{addFrameTask as h}from"../../../core/scheduling.js";import{createScreenPoint as p}from"../../../core/screenUtils.js";import{on as l,once as c,whenOnce as m}from"../../../core/watchUtils.js";import{property as d}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as v}from"../../../core/accessorSupport/decorators/subclass.js";import{d as u}from"../../../chunks/vec3.js";import{d as w}from"../../../chunks/vec3f64.js";import{s as y}from"../../../chunks/vec4.js";import{c as C}from"../../../chunks/vec4f64.js";import f from"../../../geometry/Extent.js";import g from"../../../geometry/Point.js";import{canProject as _}from"../../../geometry/support/webMercatorUtils.js";import{ViewingMode as x}from"../../ViewingMode.js";import{applyAll as R}from"../camera/constraintUtils.js";import{cameraOnContentAlongViewDirection as P,surfaceElevationBelowRenderLocation as O}from"../camera/intersectionUtils.js";import{ConstraintsManager as T}from"./ConstraintsManager.js";import{Frustum as b}from"./Frustum.js";import{GoToOperation as S}from"./GoToOperation.js";import{SurfaceCollisionCorrectionController as j}from"./controllers/SurfaceCollisionCorrectionController.js";import{internalToExternal as M,externalToInternal as I,toExtent as B,distanceToScale as U,scaleToZoom as k,fromExtent as z,OrientationMode as E,getObserverForPointAtDistance as V,scaleToDistance as A,zoomToScale as D}from"../support/cameraUtils.js";import{PropertiesPool as H}from"../support/PropertiesPool.js";import{fromCamera as N,toCamera as F}from"../support/viewpointUtils.js";import{Camera as G,PaddingSide as L}from"../webgl-engine/lib/Camera.js";const q=s.getLogger("esri.views.3d.state.ViewStateManager");let W=class extends r{constructor(e){super(e),this.propertiesPool=new H({frustum:b},this),this.handles=new a,this.cameraSetByUser=!1,this.gotoOperation=null,this.ready=!1,this._windowDevicePixelRatio=1,this._devicePixelRatioOverride=null,this._maximumPixelRatioOverride=null,this.test={contentCameraResetState:new Map,setDevicePixelRatio:e=>this._devicePixelRatioOverride=e,setMaximumPixelRatio:e=>this._maximumPixelRatioOverride=e}}get camera(){const e=this._get("camera");if(!this.ready)return e;const t=M(this.view,this.view.state.camera);return t&&e&&t.equals(e)?e:t}set camera(e){this._updatePropertyBeforeReady("camera",e)||(this.view.elevationProvider.enableElevationCache(!0),this.setStateCamera(I(this.view,e),{applyConstraints:!1})||q.error("#camera=","Invalid camera",e),this.view.elevationProvider.enableElevationCache(!1))}get contentCamera(){const e=this._get("contentCamera");if(!this.ready)return e;const t=M(this.view,this.view.state.contentCamera);return t&&e&&t.equals(e)?e:t}set contentCamera(e){if(this._updatePropertyBeforeReady("contentCamera",e))return;const t=I(this.view,e);o(t)?this.view.state.contentCamera=null:(this._updateElevation(t),this.view.state.contentCamera=t)}installContentCameraReset(e){if(this.handles.remove("contentCameraReset"),this.test.contentCameraResetState.clear(),!this.view.state.fixedContentCamera)return!1;const t=this.zoom,i=this.view.state.camera.distance**2,r=w(this.view.state.camera.center),a=e.sticky?this.contentCamera.clone():null;return this.handles.add([this.watch("contentCamera",(()=>{e.sticky||(this.handles.remove("contentCameraReset"),this.test.contentCameraResetState.clear())})),this.watch("zoom",(e=>{this.test.contentCameraResetState.set("view.zoom",Math.abs(e-t)/2),Math.abs(e-t)>2?this.contentCamera=null:this.view.state.fixedContentCamera||(this.contentCamera=a)})),this.view.state.watch("camera",(e=>{const t=u(r,e.center);this.test.contentCameraResetState.set("camera.center",t/i),t>i?this.contentCamera=null:this.view.state.fixedContentCamera||(this.contentCamera=a)}))],"contentCameraReset"),!0}get center(){return this.ready?this.view.pointsOfInterest.centerOnContent.location:this._get("center")}set center(e){this._updatePropertyBeforeReady("center",e)||(e?this.isCompatible(e)?this.setStateCamera(this._centerToCamera(e),{applyConstraints:!0})?this.view.pointsOfInterest.centerOnContent.runTask():q.error("#center=","Invalid center",e):q.error("#center=","Center has an incompatible spatial reference (center: "+(e.spatialReference?e.spatialReference.wkid:"none")+", view: "+this.view.spatialReference.wkid+")",e):q.error("#center=","Center may not be null or undefined"))}get extent(){if(!this.ready)return this._get("extent");const e=this.view,t=B(e,e.state.camera,e.pointsOfInterest.centerOnContent.renderLocation);return n(t)?t:this._get("extent")}set extent(e){this._updatePropertyBeforeReady("extent",e)||(e?this.isCompatible(e)?this.setStateCamera(this._extentToCamera(e),{applyConstraints:!0})||q.error("#extent=","Invalid extent",e):q.error("#extent=","Extent has an incompatible spatial reference (extent: "+(e.spatialReference?e.spatialReference.wkid:"none")+", view: "+this.view.spatialReference.wkid+")",e):q.error("#extent=","Extent may not be null or undefined"))}get frustum(){const e=this.propertiesPool.get("frustum");return e.renderCoordsHelper=this.view.renderCoordsHelper,e.update(this.view.state.camera),e}get hasInitialView(){return!!this.view.get("map.initialViewProperties.viewpoint")}get scale(){if(this.ready){const e=this.view.pointsOfInterest.centerOnContent;return U(this.view,e.distance,e.location.latitude)}return this._get("scale")}set scale(e){this._updatePropertyBeforeReady("scale",e)||this.setStateCamera(this._scaleToCamera(e),{applyConstraints:!0})||q.error("#scale=","Invalid scale",e)}get padding(){if(!this.ready)return this._get("padding");const e=this.view.state.camera,t=e.padding,i=e.pixelRatio,r=this._get("padding"),a=Math.round(t[L.TOP]/i),s=Math.round(t[L.RIGHT]/i),o=Math.round(t[L.BOTTOM]/i),n=Math.round(t[L.LEFT]/i);return null!=r&&r.top===a&&r.right===s&&r.bottom===o&&r.left===n?r:{top:a,right:s,bottom:o,left:n}}set padding(e){this._updatePropertyBeforeReady("padding",e)||(this._paddingToArray(e,this.view.state.camera.pixelRatio,$),this.view.state.updateCamera((e=>e.padding=$)))}_paddingToArray(e,t,i){e?y(i,e.top||0,e.right||0,e.bottom||0,e.left||0):y(i,0,0,0,0);for(let r=0;r<4;r++)i[r]=Math.round(i[r]*t)}get screenCenter(){const e=this.padding;return p((this.view.width-(e.left+e.right))/2+e.left,(this.view.height-(e.top+e.bottom))/2+e.top)}get viewpoint(){return this.ready?N(this.view,this.camera):this._get("viewpoint")}set viewpoint(e){if(!this._updatePropertyBeforeReady("viewpoint",e))if(e)if(this.isCompatible(e))this.setStateCamera(this._viewpointToCamera(e),{applyConstraints:!e.camera})||q.error("#viewpoint=","Invalid viewpoint",e);else{const t=n(e.camera)?e.camera.position:e.targetGeometry,i=n(t)&&t.spatialReference;q.error("#viewpoint=","Viewpoint has an incompatible spatial reference (viewpoint: "+(i?i.wkid:"none")+", view: "+this.view.spatialReference.wkid+")",e)}else q.error("#viewpoint=","Viewpoint may not be null or undefined")}get zoom(){return this.ready?k(this.view,this.scale):this._get("zoom")}set zoom(e){this._updatePropertyBeforeReady("zoom",e)||this.setStateCamera(this._zoomToCamera(e),{applyConstraints:!0})||q.error("#zoom=","Invalid zoom",e)}get maximumPixelRatio(){if(n(this._maximumPixelRatioOverride))return this._maximumPixelRatioOverride;let e=1/0;const{maximumPixelRatio:t,maximumRenderResolution:i}=this.view.qualitySettings;if(null!=t&&(e=Math.min(e,t)),null!=i){const t=i/Math.max(this.view.width,this.view.height);e=Math.min(e,t)}return e}get _devicePixelRatio(){return o(this._devicePixelRatioOverride)?Math.min(this._windowDevicePixelRatio,this.maximumPixelRatio):this._devicePixelRatioOverride}initialize(){this.handles.add([l(this.view,"state.events","before-camera-change",(e=>this._updateElevation(e.camera)))]),c(this.view.state,"camera",(e=>this._updateElevation(e)),!0),this.handles.add(h({prepare:()=>this._prepareFrame()})),this.handles.add(this.view.state.watch("cameraController",(()=>{this.cameraSetByUser=!0,this.handles.remove(ee)}))),this.handles.add(l(this.view,"state.events","camera-projection-changed",(()=>this.notifyChange("scale"))))}destroy(){this.deinit(),this.handles&&(this.handles.destroy(),this.handles=null),this.propertiesPool&&(this.propertiesPool.destroy(),this.propertiesPool=null)}init(){this.constraintsManager=new T({view:this.view}),this._prepareFrame();const e=this._getInitialProperties();this.cameraSetByUser=!1,this._set("ready",!0);for(const t of e)this.set(t.name,t.value);if(!this.cameraSetByUser){const e=this.view.get("map.initialViewProperties.viewpoint")||this.view.initialExtent;e&&this.isCompatible(e)?this._setInitialView(e):this.view.state.viewingMode===x.Local&&this.handles.add(m(this.view.basemapTerrain,"ready",(()=>{this.handles.remove(ee),this._setInitialView(this.view.dataExtent)})),ee)}}deinit(){this._cancelGoToOperation(),this.ready&&(this._override("padding",this.padding),this._set("ready",!1),this._clearOverride("hasInitialView"),this.cameraSetByUser=!1,this.handles.remove(ee),this.constraintsManager&&(this.constraintsManager.destroy(),this.constraintsManager=null))}async goTo(e,t){const i={animate:!0,...t};return n(this.gotoOperation)&&this.gotoOperation.abort(i.animate),this.gotoOperation=new S(e,i,this.view),this.view.resourceController.scheduler.stopFrame(),this.gotoOperation}debugSetCameraOnContent(){this.setStateCamera(P(this.view),{applyConstraints:!1})}step(e){const t=this.view.state,i=t&&this.view.state.cameraController;i&&(t.updateCamera((t=>{i.stepController(e,t)})),i.steppingFinished&&i.finishController())}_cancelGoToOperation(){n(this.gotoOperation)&&(this.gotoOperation.abort(),this.gotoOperation=null)}_getInitialProperties(){const e=new Set,t=[];for(const{propertyName:i,overrides:r}of Q){const a=e.has(i),s=this._isOverridden(i);!a&&s&&t.push({name:i,value:this._get(i)}),this._clearOverride(i),(a||s)&&r.forEach((t=>e.add(t)))}return t}_setInitialView(e){if(o(e)||this.cameraSetByUser)return;if(e instanceof t)return void this.setStateCamera(I(this.view,e),{applyConstraints:!1});if(e instanceof i){if(e.targetGeometry instanceof f){const t=z(this.view,e.targetGeometry,0,.5,E.LOCKED);return void(n(t)&&this.setStateCamera(I(this.view,t),{applyConstraints:!0}))}const t={applyConstraints:!e.camera},i=this._viewpointToCamera(e);return void this.setStateCamera(i,t)}const r=z(this.view,e,0,.5,E.LOCKED);n(r)&&this.setStateCamera(I(this.view,r),{applyConstraints:!0})}_updatePropertyBeforeReady(e,t){return!this.ready&&(this._override(e,t),t&&K.includes(e)&&this._override("hasInitialView",!0),!0)}isCompatible(e){return!o(e)&&(e instanceof i?e.camera?this.isCompatible(e.camera):this.isCompatible(e.targetGeometry):e instanceof t?this.isCompatible(e.position):e.spatialReference&&_(e.spatialReference,this.view.spatialReference))}_getPreservingHeadingTilt(e=X){return this.cameraSetByUser?(e.heading=this.camera.heading,e.tilt=this.camera.tilt):(e.heading=0,e.tilt=.5),e}_centerPointAtDistanceToCamera(e,t,i=Z){const{heading:r,tilt:a}=this._getPreservingHeadingTilt(),s=V(this.view,r,a,e,t,E.ADJUST);return o(s)?null:(i.copyFrom(this.view.state.camera),i.eye=s.eye,i.center=s.center,i.up=s.up,i)}_centerToCamera(e){const t=this.view.pointsOfInterest.centerOnContent;t.runTask();const i=t.distance;return this._centerPointAtDistanceToCamera(e,i)}_extentToCamera(e){const{heading:t,tilt:i}=this._getPreservingHeadingTilt(),r=z(this.view,e,t,i,E.ADJUST,Y);return n(r)?I(this.view,r):null}_scaleToCamera(e){if(null==e)return null;const t=this.view.pointsOfInterest.centerOnContent;t.runTask();const i=t.renderLocation,r=t.location.latitude,a=A(this.view,e,r);return this._centerPointAtDistanceToCamera(i,a)}_zoomToCamera(e){return this._scaleToCamera(D(this.view,e))}_viewpointToCamera(e){return I(this.view,F(this.view,e))}setStateCamera(e,t){return!(o(e)||!this.view.state.stopActiveCameraController())&&(this.cameraSetByUser=!0,t.doNotCancelGoToOperation||this._cancelGoToOperation(),this.view.state.updateCamera((i=>{t.positionAndOrientationOnly?(i.eye=e.eye,i.center=e.center,i.up=e.up):i.copyFrom(e),t.applyConstraints&&R(this.view,i)})),t.applyConstraints||(this.view.state.cameraController=new j({view:this.view,desiredCamera:e})),!0)}_prepareFrame(){const{container:e,canvas:t}=this.view;if(!e||!t)return;this._windowDevicePixelRatio=window.devicePixelRatio;const i=this._devicePixelRatio,r=Math.round(e.clientWidth*i),a=Math.round(e.clientHeight*i);if(0!==r&&0!==a&&(t.width===r&&t.height===a||(t.width=r,t.height=a),this.view.state)){const e=this.view.state.camera;e.fullWidth===r&&e.fullHeight===a&&e.pixelRatio===i||(Z.copyFrom(e),Z.pixelRatio!==i&&(this._paddingToArray(this.padding,i,$),Z.padding=$),Z.fullWidth=r,Z.fullHeight=a,Z.pixelRatio=i,this.view.state.camera=Z)}}_updateElevation(e){const t=this.view.basemapTerrain&&this.view.basemapTerrain.spatialReference,i=this.view.renderCoordsHelper.getAltitude(e.eye),r=t?O(this.view,e.eye):0;e.relativeElevation=i-r}};e([d({type:t,dependsOn:["view.state.camera","ready"]})],W.prototype,"camera",null),e([d({type:t,dependsOn:["view.state.contentCamera","ready"]})],W.prototype,"contentCamera",null),e([d({type:g})],W.prototype,"center",null),e([d({type:f})],W.prototype,"extent",null),e([d({readOnly:!0})],W.prototype,"frustum",null),e([d({readOnly:!0})],W.prototype,"hasInitialView",null),e([d({readOnly:!0,type:Boolean})],W.prototype,"ready",void 0),e([d({type:Number})],W.prototype,"scale",null),e([d()],W.prototype,"padding",null),e([d({readOnly:!0})],W.prototype,"screenCenter",null),e([d({constructOnly:!0})],W.prototype,"view",void 0),e([d({type:i})],W.prototype,"viewpoint",null),e([d({type:Number})],W.prototype,"zoom",null),e([d()],W.prototype,"maximumPixelRatio",null),e([d()],W.prototype,"_devicePixelRatio",null),e([d()],W.prototype,"_windowDevicePixelRatio",void 0),e([d()],W.prototype,"_devicePixelRatioOverride",void 0),e([d()],W.prototype,"_maximumPixelRatioOverride",void 0),W=e([v("esri.views.3d.state.ViewStateManager")],W);const J=W,K=["camera","viewpoint","extent","scale","center","zoom"],Q=[{propertyName:"camera",overrides:["viewpoint"]},{propertyName:"viewpoint",overrides:["extent"]},{propertyName:"extent",overrides:["center","scale"]},{propertyName:"center",overrides:[]},{propertyName:"scale",overrides:["zoom"]},{propertyName:"zoom",overrides:[]},{propertyName:"padding",overrides:[]}],X={heading:0,tilt:0},Y=new t,Z=new G,$=C(),ee="pending-initial-view";export{J 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.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../chunks/tslib.es6.js";import{acosClamped as i,clamp as s}from"../../../../core/mathUtils.js";import{createScreenPointArray as o}from"../../../../core/screenUtils.js";import{property as e}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as r}from"../../../../core/accessorSupport/decorators/subclass.js";import{d as a,e as n}from"../../../../chunks/mat4.js";import{c as h}from"../../../../chunks/mat4f64.js";import{c as p}from"../../../../chunks/vec2.js";import{a as c}from"../../../../chunks/vec2f64.js";import{c as m,b as l,l as v,n as u,a as C,g as P,e as f,f as E,m as
|
|
5
|
+
import{_ as t}from"../../../../chunks/tslib.es6.js";import{acosClamped as i,clamp as s}from"../../../../core/mathUtils.js";import{createScreenPointArray as o}from"../../../../core/screenUtils.js";import{property as e}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as r}from"../../../../core/accessorSupport/decorators/subclass.js";import{d as a,e as n}from"../../../../chunks/mat4.js";import{c as h}from"../../../../chunks/mat4f64.js";import{c as p}from"../../../../chunks/vec2.js";import{a as c}from"../../../../chunks/vec2f64.js";import{c as m,b as l,l as v,n as u,a as C,g as P,e as f,f as E,m as d}from"../../../../chunks/vec3.js";import{c as w}from"../../../../chunks/vec3f64.js";import{getReferenceEllipsoid as R}from"../../../../geometry/projectionEllipsoid.js";import{applyAll as T}from"../../camera/constraintUtils.js";import{ConstraintTypes as j,InteractionType as y,TiltMode as O}from"../../camera/constraintUtils/common.js";import{TiltDefault as U}from"../Constraints.js";import{InteractiveController as M}from"./InteractiveController.js";import{normalizeCoordinate as D,decideNavigationMode as V,NavigationMode as g}from"../utils/navigationUtils.js";var x;!function(t){t[t.CENTER=0]="CENTER",t[t.EYE=1]="EYE"}(x||(x={}));const N=7,k=90;let A=class extends M{constructor(t){super(t),this.view=null,this.pivot=x.CENTER,this.lastPoint=c(),this.tmpWorldUp=w(),this.tmpViewDir=w(),this.tmpRotCurPoint=c(),this.tmpTransf=h(),this.tmpAxis=w(),this.tmpPivotPoint=w(),this.pivotPos=w(),this.constraintOptions={selection:j.ALL,interactionType:y.TUMBLE,interactionFactor:0,interactionStartCamera:null,interactionDirection:null,tiltMode:O.TUMBLE}}get intersectionHelper(){return this.view.sceneIntersectionHelper}initialize(){this.rotScale=this.pivot===x.CENTER?3:1.5}begin(t){if(this.active){switch(this.pivot){case x.EYE:m(this.pivotPos,this.startCamera.eye),this.constraintOptions.interactionType=y.LOOK_AROUND,this.constraintOptions.tiltMode=O.LOOK_AROUND,this.constraintOptions.selection=j.NONE;break;case x.CENTER:{const i=this.intersectionHelper.intersectRayFreePointFallback(this.startCamera.ray,this.pivotPos);i||m(this.pivotPos,this.startCamera.center),this._constrainPivotPoint(t,i),this.startCamera.center=this.pivotPos,this.constraintOptions.interactionType=y.TUMBLE,this.constraintOptions.tiltMode=O.TUMBLE,this.constraintOptions.selection=j.ALL&~j.DISTANCE;break}}this.constraintOptions.interactionStartCamera=this.startCamera,D(this.startCamera,t,this.lastPoint)}}_constrainPivotPoint(t,i){const s=this.startCamera,e=w();l(e,this.pivotPos,s.eye);const r=v(e);let a=Math.min(r,N*Math.abs(this.view.camera.position.z));const n=R(this.view.spatialReference),h=o(s.width/s.pixelRatio*.5,s.height/s.pixelRatio*.5),p=V(this.startCamera,h,!0,n);let c=this.view._stage.renderView.getMinimalDepthForArea(this.view.getVoxelWasmPerSceneView(),s.fullWidth/s.pixelRatio*.5,s.fullHeight/s.pixelRatio*.5,s,2.5*k,k),f=this.view._stage.renderView.getMinimalDepthForArea(this.view.getVoxelWasmPerSceneView(),t[0],t[1],s,k);void 0===c&&void 0===f||(c=void 0===c?f:c,f=void 0===f||p===g.Horizontal?c:f,a=c>f?f:c,a=i?Math.min(a,r):a),u(e,e),m(this.pivotPos,C(this.tmpPivotPoint,s.eye,P(this.tmpPivotPoint,e,a)))}update(t){if(this.active){switch(this.pivot){case x.EYE:this.currentCamera.center=this._applyRotation(this.currentCamera,t,this.currentCamera.center,this.pivotPos);break;case x.CENTER:this.currentCamera.center=this.pivotPos,this.currentCamera.eye=this._applyRotation(this.currentCamera,t,this.currentCamera.eye,this.pivotPos)}T(this.view,this.currentCamera,this.constraintOptions)}}end(){this.active&&this.finishController()}_applyRotation(t,o,e,r){this.view.renderCoordsHelper.worldUpAtPosition(r,this.tmpWorldUp),D(t,o,this.tmpRotCurPoint);let h=(this.lastPoint[1]-this.tmpRotCurPoint[1])*this.rotScale,c=(this.tmpRotCurPoint[0]-this.lastPoint[0])*this.rotScale;l(this.tmpViewDir,e,r);const m=v(this.tmpViewDir),u=i(f(this.tmpViewDir,this.tmpWorldUp)/m);if(this.pivot===x.EYE){h*=-.5;const t=.5*Math.PI-u,i=.5*Math.PI*.99;h=t-Math.max(-i,Math.min(i,t+h))}return h=s(h+u,U.min,U.max)-u,E(this.tmpAxis,t.up,this.tmpViewDir),this.pivot===x.CENTER&&(c=-c),a(this.tmpTransf,c,this.tmpWorldUp),n(this.tmpTransf,this.tmpTransf,h,this.tmpAxis),d(this.tmpViewDir,this.tmpViewDir,this.tmpTransf),t.up=d(S,t.up,this.tmpTransf),C(S,r,this.tmpViewDir),p(this.lastPoint,this.tmpRotCurPoint),S}};t([e({constructOnly:!0})],A.prototype,"view",void 0),t([e()],A.prototype,"pivot",void 0),A=t([r("esri.views.3d.state.controllers.RotateController")],A);const S=w();export{x as PivotPoint,A as RotateController};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../../chunks/tslib.es6.js";import{cyclicalPI as i}from"../../../../../core/Cyclical.js";import{deg2rad as e}from"../../../../../core/mathUtils.js";import{createScreenPointArray as n,screenPointObjectToArray as s,createRenderScreenPointArray3 as o}from"../../../../../core/screenUtils.js";import{property as r}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import"../../../../../core/accessorSupport/ensureType.js";import{subclass as a}from"../../../../../core/accessorSupport/decorators/subclass.js";import{c as m}from"../../../../../chunks/vec2.js";import{c as h,o as c,l as p,b as l,n as u,a as P,g as d,e as g}from"../../../../../chunks/vec3.js";import{c as v}from"../../../../../chunks/vec3f64.js";import{getReferenceEllipsoid as M}from"../../../../../geometry/projectionEllipsoid.js";import{wrapAxisAngle as C}from"../../../../../geometry/support/axisAngle.js";import{create as S,fromPositionAndNormal as w,normal as b}from"../../../../../geometry/support/plane.js";import{c as f}from"../../../../../chunks/sphere.js";import{pixelDistanceToInteractionFactor as j,applyAll as E}from"../../../camera/constraintUtils.js";import{ConstraintTypes as y,InteractionType as O,TiltMode as k}from"../../../camera/constraintUtils/common.js";import{ExponentialFalloff as A}from"../../../input/util.js";import{InteractiveController as z}from"../InteractiveController.js";import{PanPlanarMomentumController as R}from"../momentum/PanPlanarMomentumController.js";import{PanSphericalMomentumController as x}from"../momentum/PanSphericalMomentumController.js";import{RotationMomentumController as _}from"../momentum/RotationMomentumController.js";import{ZoomPlanarMomentumController as H}from"../momentum/ZoomPlanarMomentumController.js";import{ZoomSphericalMomentumController as F}from"../momentum/ZoomSphericalMomentumController.js";import{NavigationMode as T,pickPointAndInitSphere as U,decideNavigationMode as D,sphereOrPlanePointFromScreenPoint as I,intersectPlaneFromScreenPointAtEye as L,applyZoomOnSphere as Z,preserveHeadingThreshold as N,applyPanSphericalPreserveHeading as B,applyPanSphericalDirectRotation as G,normalizeRotationDelta as V,applyRotation as q,applyPanPlanar as J,applyZoomToPoint as K}from"../../utils/navigationUtils.js";import{Camera as Q}from"../../../webgl-engine/lib/Camera.js";import{PanPlanarMomentumEstimator as W}from"../../../../navigation/PanPlanarMomentumEstimator.js";import{PanSphericalMomentumEstimator as X}from"../../../../navigation/PanSphericalMomentumEstimator.js";import{RotationMomentumEstimator as Y}from"../../../../navigation/RotationMomentumEstimator.js";import{ZoomMomentumEstimator as $}from"../../../../navigation/ZoomMomentumEstimator.js";let tt=class extends z{constructor(t){super(t),this.view=null,this.smoothRotation=new A(.05),this.rotationAxis=v(),this.panningPlane=S(),this.smoothScaling=new A(.05),this.zoomCenterScreen=n(),this.zoomMomentumEstimator=new $,this.rotationMomentumEstimator=new Y,this.panSphericalMomentumEstimator=new X,this.panPlanarMomentumEstimator=new W,this.adjustedSphere=f(),this.tmp3d=v(),this.tmpScreenPointArray=n(),this.beginScreenPoint=n(),this.beginScenePoint=v(),this.screenPickPoint=n(),this.navMode=T.Horizontal,this.tmpInteractionDirection=v(),this.constraintOptions={selection:y.ALL,interactionType:O.NONE,interactionFactor:0,interactionStartCamera:new Q,interactionDirection:null,tiltMode:k.TUMBLE}}get intersectionHelper(){return this.view.sceneIntersectionHelper}begin(t){if(!this.active)return;const n=this.view.navigation.momentumEnabled;this.zoomMomentumEstimator.enabled=n,this.rotationMomentumEstimator.enabled=n,this.panPlanarMomentumEstimator.enabled=n,this.panSphericalMomentumEstimator.enabled=n,this.beginHeading=-i.normalize(e(this.view.camera.heading)),this.beginRadius=t.radius,this.pointerCount=t.pointers.size,this.beginAngle=t.angle,this.smoothRotation.reset(),s(t.center,this.screenPickPoint),m(this.beginScreenPoint,this.screenPickPoint);const o=M(this.view.spatialReference),r=U(this.intersectionHelper,this.startCamera,this.screenPickPoint,!0,o);this.scenePickPoint=r.scenePickPoint,this.sphere=r.sphere,h(this.beginScenePoint,this.scenePickPoint),this.navMode=D(this.startCamera,this.screenPickPoint,r.hasGeometryIntersection,o),this.navMode===T.Vertical&&this._preparePlanarPanMode(t),this.constraintOptions.interactionStartCamera.copyFrom(this.startCamera)}_preparePlanarPanMode(t){const i=c(this.tmp3d,this.startCamera.viewForward);w(this.scenePickPoint,i,this.panningPlane);const e=n(this.screenPickPoint[0],0),r=v(),a=p(this.startCamera.eye);this.adjustedSphere[3]=a<this.sphere[3]?a-100:this.sphere[3],I(this.adjustedSphere,this.startCamera,e,r);const m=o();this.startCamera.projectToRenderScreen(r,m);const M=.9*m[1];this.screenPickPoint[1]=Math.min(this.screenPickPoint[1],M),this.intersectionHelper.intersectScreen(this.screenPickPoint,this.scenePickPoint)&&w(this.scenePickPoint,b(this.panningPlane),this.panningPlane);const C=v(),S=v(),f=v(),j=80,E=5,y=50;l(C,this.scenePickPoint,this.currentCamera.eye),u(C,C);const O=E*Math.max(Math.abs(this.view.camera.position.z),y),k=this.view._stage.renderView.getMinimalDepthForArea(null,this.screenPickPoint[0],this.screenPickPoint[1],this.view.state.camera,j),A=k?Math.min(k,O):O;h(f,P(S,this.currentCamera.eye,d(S,C,A))),this.panningPlane[3]=-g(this.panningPlane,f),this.startCamera.center=P(S,this.startCamera.eye,d(S,this.startCamera.viewForward,A));const z=s(t.center,this.tmpScreenPointArray);L(this.panningPlane,this.startCamera,z,this.beginScenePoint)}update(t){if(!this.active)return;this.currentCamera.copyFrom(this.startCamera);const i=t.pointers.size>1;this.navMode===T.Horizontal?(i&&this._zoomSpherical(t),this._panningSpherical(t),i&&this._rotateSpherical(t)):(i&&this._zoomPlanar(t),this._panningPlanar(t),i&&this._rotatePlanar(t))}end(t){t.pointers.size===this.pointerCount&&this.update(t),this.finishController();const i=this.zoomMomentumEstimator.evaluateMomentum();if(i)return this.navMode===T.Horizontal?new F({view:this.view,momentum:i,screenCenter:this.zoomCenterScreen,sceneCenter:this.beginScenePoint,radius:this.sphere[3]}):new H({view:this.view,momentum:i,zoomCenter:this.beginScenePoint});const e=this.rotationMomentumEstimator.evaluateMomentum();if(e)return new _({view:this.view,momentum:e,center:this.sphere,axis:this.rotationAxis});if(this.navMode===T.Horizontal){const t=this.panSphericalMomentumEstimator.evaluateMomentum();if(t)return new x({view:this.view,momentum:t})}else{const t=this.panPlanarMomentumEstimator.evaluateMomentum();if(t)return new R({view:this.view,momentum:t})}return null}_zoomSpherical(t){const i=this.beginRadius/t.radius,e=.001875*Math.min(Math.max(t.radius,40),120);this.smoothScaling.gain=e,this.smoothScaling.update(i),Z(this.sphere,this.currentCamera,this.smoothScaling.value),s(t.center,this.zoomCenterScreen),this.zoomMomentumEstimator.add(this.smoothScaling.value,.001*t.timestamp),this.constraintOptions.interactionType=O.ZOOM,this.constraintOptions.interactionFactor=j(t.radius-this.beginRadius),E(this.view,this.currentCamera,this.constraintOptions)}_panningSpherical(t){const i=s(t.center,this.tmpScreenPointArray);I(this.sphere,this.currentCamera,i,this.tmp3d),N(this.beginScenePoint,g(this.currentCamera.up,this.beginScenePoint),this.sphere[3],this.beginHeading,this.view.camera.tilt,this.startCamera)?(B(this.sphere,this.currentCamera,this.beginScenePoint,this.tmp3d,this.beginHeading,this.view.camera.tilt,!1),this.panSphericalMomentumEstimator.addMomentumPreserveHeading(i,this.tmp3d,.001*t.timestamp,this.startCamera,this.sphere,this.beginHeading,this.view.camera.tilt)):(G(this.sphere,this.currentCamera,this.beginScenePoint,this.tmp3d,this.view.camera.tilt,!1),this.panSphericalMomentumEstimator.addMomentumDirectRotation(i,this.tmp3d,.001*t.timestamp,this.startCamera,this.sphere[3],this.view.camera.tilt)),this.constraintOptions.interactionType=O.PAN,this.constraintOptions.interactionFactor=j(this.screenPickPoint,i),E(this.view,this.currentCamera,this.constraintOptions)}_rotateSpherical(t){u(this.rotationAxis,this.scenePickPoint),this.currentCamera.aboveGround||c(this.rotationAxis,this.rotationAxis);const i=this.smoothRotation.value,e=i+V(t.angle-i),n=.00125*Math.min(Math.max(t.radius,40),120);this.smoothRotation.gain=n,this.smoothRotation.update(e);const s=this.smoothRotation.value-this.beginAngle;this.rotationMomentumEstimator.add(s,.001*t.timestamp),q(this.currentCamera,this.sphere,C(this.rotationAxis,s)),this.constraintOptions.interactionType=O.TUMBLE,this.constraintOptions.interactionFactor=j(t.radius*e),E(this.view,this.currentCamera,this.constraintOptions)}_panningPlanar(t){const i=s(t.center,this.tmpScreenPointArray);L(this.panningPlane,this.currentCamera,i,this.tmp3d)&&(J(this.currentCamera,this.beginScenePoint,this.tmp3d),this.panPlanarMomentumEstimator.add(i,this.tmp3d,.001*t.timestamp),this.constraintOptions.interactionType=O.PAN,this.constraintOptions.interactionFactor=j(this.beginScreenPoint,i),this.constraintOptions.interactionDirection=this.view.renderCoordsHelper.worldUpAtPosition(this.currentCamera.eye,this.tmpInteractionDirection),E(this.view,this.currentCamera,this.constraintOptions),this.constraintOptions.interactionDirection=null)}_zoomPlanar(t){const i=this.beginRadius/t.radius,e=.001875*Math.min(Math.max(t.radius,40),120);this.smoothScaling.gain=e,this.smoothScaling.update(i),this.zoomMomentumEstimator.add(this.smoothScaling.value,.001*t.timestamp),K(this.currentCamera,this.beginScenePoint,this.smoothScaling.value,this.view.state.constraints.minimumPoiDistance),this.constraintOptions.interactionType=O.ZOOM,this.constraintOptions.interactionFactor=j(t.radius-this.beginRadius),E(this.view,this.currentCamera,this.constraintOptions)}_rotatePlanar(t){h(this.rotationAxis,this.beginScenePoint),this.currentCamera.aboveGround||c(this.rotationAxis,this.rotationAxis);const i=this.smoothRotation.value;let e=t.angle-i;e=V(e);const n=i+e,s=.00125*Math.min(Math.max(t.radius,40),120);this.smoothRotation.gain=s,this.smoothRotation.update(n);const o=this.smoothRotation.value-this.beginAngle;this.rotationMomentumEstimator.add(o,.001*t.timestamp),q(this.currentCamera,this.sphere,C(this.rotationAxis,o)),this.constraintOptions.interactionType=O.TUMBLE,this.constraintOptions.interactionFactor=j(t.radius*o),E(this.view,this.currentCamera,this.constraintOptions)}};t([r({constructOnly:!0})],tt.prototype,"view",void 0),tt=t([a("esri.views.3d.state.controllers.global.PinchAndPanController")],tt);export{tt as PinchAndPanController};
|
|
5
|
+
import{_ as t}from"../../../../../chunks/tslib.es6.js";import{cyclicalPI as i}from"../../../../../core/Cyclical.js";import{deg2rad as e}from"../../../../../core/mathUtils.js";import{createScreenPointArray as n,screenPointObjectToArray as s,createRenderScreenPointArray3 as o}from"../../../../../core/screenUtils.js";import{property as r}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import"../../../../../core/accessorSupport/ensureType.js";import{subclass as a}from"../../../../../core/accessorSupport/decorators/subclass.js";import{c as m}from"../../../../../chunks/vec2.js";import{c as h,o as c,l as p,b as l,n as u,a as P,g as d,e as g}from"../../../../../chunks/vec3.js";import{c as v}from"../../../../../chunks/vec3f64.js";import{getReferenceEllipsoid as M}from"../../../../../geometry/projectionEllipsoid.js";import{wrapAxisAngle as C}from"../../../../../geometry/support/axisAngle.js";import{create as S,fromPositionAndNormal as w,normal as b}from"../../../../../geometry/support/plane.js";import{c as f}from"../../../../../chunks/sphere.js";import{pixelDistanceToInteractionFactor as j,applyAll as E}from"../../../camera/constraintUtils.js";import{ConstraintTypes as y,InteractionType as O,TiltMode as k}from"../../../camera/constraintUtils/common.js";import{ExponentialFalloff as A}from"../../../input/util.js";import{InteractiveController as z}from"../InteractiveController.js";import{PanPlanarMomentumController as R}from"../momentum/PanPlanarMomentumController.js";import{PanSphericalMomentumController as x}from"../momentum/PanSphericalMomentumController.js";import{RotationMomentumController as _}from"../momentum/RotationMomentumController.js";import{ZoomPlanarMomentumController as H}from"../momentum/ZoomPlanarMomentumController.js";import{ZoomSphericalMomentumController as F}from"../momentum/ZoomSphericalMomentumController.js";import{NavigationMode as T,pickPointAndInitSphere as U,decideNavigationMode as D,sphereOrPlanePointFromScreenPoint as I,intersectPlaneFromScreenPointAtEye as L,applyZoomOnSphere as Z,preserveHeadingThreshold as N,applyPanSphericalPreserveHeading as B,applyPanSphericalDirectRotation as G,normalizeRotationDelta as V,applyRotation as q,applyPanPlanar as J,applyZoomToPoint as K}from"../../utils/navigationUtils.js";import{Camera as Q}from"../../../webgl-engine/lib/Camera.js";import{PanPlanarMomentumEstimator as W}from"../../../../navigation/PanPlanarMomentumEstimator.js";import{PanSphericalMomentumEstimator as X}from"../../../../navigation/PanSphericalMomentumEstimator.js";import{RotationMomentumEstimator as Y}from"../../../../navigation/RotationMomentumEstimator.js";import{ZoomMomentumEstimator as $}from"../../../../navigation/ZoomMomentumEstimator.js";let tt=class extends z{constructor(t){super(t),this.view=null,this.smoothRotation=new A(.05),this.rotationAxis=v(),this.panningPlane=S(),this.smoothScaling=new A(.05),this.zoomCenterScreen=n(),this.zoomMomentumEstimator=new $,this.rotationMomentumEstimator=new Y,this.panSphericalMomentumEstimator=new X,this.panPlanarMomentumEstimator=new W,this.adjustedSphere=f(),this.tmp3d=v(),this.tmpScreenPointArray=n(),this.beginScreenPoint=n(),this.beginScenePoint=v(),this.screenPickPoint=n(),this.navMode=T.Horizontal,this.tmpInteractionDirection=v(),this.constraintOptions={selection:y.ALL,interactionType:O.NONE,interactionFactor:0,interactionStartCamera:new Q,interactionDirection:null,tiltMode:k.TUMBLE}}get intersectionHelper(){return this.view.sceneIntersectionHelper}begin(t){if(!this.active)return;const n=this.view.navigation.momentumEnabled;this.zoomMomentumEstimator.enabled=n,this.rotationMomentumEstimator.enabled=n,this.panPlanarMomentumEstimator.enabled=n,this.panSphericalMomentumEstimator.enabled=n,this.beginHeading=-i.normalize(e(this.view.camera.heading)),this.beginRadius=t.radius,this.pointerCount=t.pointers.size,this.beginAngle=t.angle,this.smoothRotation.reset(),s(t.center,this.screenPickPoint),m(this.beginScreenPoint,this.screenPickPoint);const o=M(this.view.spatialReference),r=U(this.intersectionHelper,this.startCamera,this.screenPickPoint,!0,o);this.scenePickPoint=r.scenePickPoint,this.sphere=r.sphere,h(this.beginScenePoint,this.scenePickPoint),this.navMode=D(this.startCamera,this.screenPickPoint,r.hasGeometryIntersection,o),this.navMode===T.Vertical&&this._preparePlanarPanMode(t),this.constraintOptions.interactionStartCamera.copyFrom(this.startCamera)}_preparePlanarPanMode(t){const i=c(this.tmp3d,this.startCamera.viewForward);w(this.scenePickPoint,i,this.panningPlane);const e=n(this.screenPickPoint[0],0),r=v(),a=p(this.startCamera.eye);this.adjustedSphere[3]=a<this.sphere[3]?a-100:this.sphere[3],I(this.adjustedSphere,this.startCamera,e,r);const m=o();this.startCamera.projectToRenderScreen(r,m);const M=.9*m[1];this.screenPickPoint[1]=Math.min(this.screenPickPoint[1],M);const C=this.intersectionHelper.intersectScreen(this.screenPickPoint,this.scenePickPoint);C&&w(this.scenePickPoint,b(this.panningPlane),this.panningPlane);const S=v(),f=v(),j=v(),E=80,y=5,O=50;l(S,this.scenePickPoint,this.currentCamera.eye);const k=p(S);u(S,S);const A=y*Math.max(Math.abs(this.view.camera.position.z),O),z=this.view._stage.renderView.getMinimalDepthForArea(null,this.screenPickPoint[0],this.screenPickPoint[1],this.view.state.camera,E);let R=z?Math.min(z,A):A;R=C?Math.min(R,k):R,h(j,P(f,this.currentCamera.eye,d(f,S,R))),this.panningPlane[3]=-g(this.panningPlane,j),this.startCamera.center=P(f,this.startCamera.eye,d(f,this.startCamera.viewForward,R));const x=s(t.center,this.tmpScreenPointArray);L(this.panningPlane,this.startCamera,x,this.beginScenePoint)}update(t){if(!this.active)return;this.currentCamera.copyFrom(this.startCamera);const i=t.pointers.size>1;this.navMode===T.Horizontal?(i&&this._zoomSpherical(t),this._panningSpherical(t),i&&this._rotateSpherical(t)):(i&&this._zoomPlanar(t),this._panningPlanar(t),i&&this._rotatePlanar(t))}end(t){t.pointers.size===this.pointerCount&&this.update(t),this.finishController();const i=this.zoomMomentumEstimator.evaluateMomentum();if(i)return this.navMode===T.Horizontal?new F({view:this.view,momentum:i,screenCenter:this.zoomCenterScreen,sceneCenter:this.beginScenePoint,radius:this.sphere[3]}):new H({view:this.view,momentum:i,zoomCenter:this.beginScenePoint});const e=this.rotationMomentumEstimator.evaluateMomentum();if(e)return new _({view:this.view,momentum:e,center:this.sphere,axis:this.rotationAxis});if(this.navMode===T.Horizontal){const t=this.panSphericalMomentumEstimator.evaluateMomentum();if(t)return new x({view:this.view,momentum:t})}else{const t=this.panPlanarMomentumEstimator.evaluateMomentum();if(t)return new R({view:this.view,momentum:t})}return null}_zoomSpherical(t){const i=this.beginRadius/t.radius,e=.001875*Math.min(Math.max(t.radius,40),120);this.smoothScaling.gain=e,this.smoothScaling.update(i),Z(this.sphere,this.currentCamera,this.smoothScaling.value),s(t.center,this.zoomCenterScreen),this.zoomMomentumEstimator.add(this.smoothScaling.value,.001*t.timestamp),this.constraintOptions.interactionType=O.ZOOM,this.constraintOptions.interactionFactor=j(t.radius-this.beginRadius),E(this.view,this.currentCamera,this.constraintOptions)}_panningSpherical(t){const i=s(t.center,this.tmpScreenPointArray);I(this.sphere,this.currentCamera,i,this.tmp3d),N(this.beginScenePoint,g(this.currentCamera.up,this.beginScenePoint),this.sphere[3],this.beginHeading,this.view.camera.tilt,this.startCamera)?(B(this.sphere,this.currentCamera,this.beginScenePoint,this.tmp3d,this.beginHeading,this.view.camera.tilt,!1),this.panSphericalMomentumEstimator.addMomentumPreserveHeading(i,this.tmp3d,.001*t.timestamp,this.startCamera,this.sphere,this.beginHeading,this.view.camera.tilt)):(G(this.sphere,this.currentCamera,this.beginScenePoint,this.tmp3d,this.view.camera.tilt,!1),this.panSphericalMomentumEstimator.addMomentumDirectRotation(i,this.tmp3d,.001*t.timestamp,this.startCamera,this.sphere[3],this.view.camera.tilt)),this.constraintOptions.interactionType=O.PAN,this.constraintOptions.interactionFactor=j(this.screenPickPoint,i),E(this.view,this.currentCamera,this.constraintOptions)}_rotateSpherical(t){u(this.rotationAxis,this.scenePickPoint),this.currentCamera.aboveGround||c(this.rotationAxis,this.rotationAxis);const i=this.smoothRotation.value,e=i+V(t.angle-i),n=.00125*Math.min(Math.max(t.radius,40),120);this.smoothRotation.gain=n,this.smoothRotation.update(e);const s=this.smoothRotation.value-this.beginAngle;this.rotationMomentumEstimator.add(s,.001*t.timestamp),q(this.currentCamera,this.sphere,C(this.rotationAxis,s)),this.constraintOptions.interactionType=O.TUMBLE,this.constraintOptions.interactionFactor=j(t.radius*e),E(this.view,this.currentCamera,this.constraintOptions)}_panningPlanar(t){const i=s(t.center,this.tmpScreenPointArray);L(this.panningPlane,this.currentCamera,i,this.tmp3d)&&(J(this.currentCamera,this.beginScenePoint,this.tmp3d),this.panPlanarMomentumEstimator.add(i,this.tmp3d,.001*t.timestamp),this.constraintOptions.interactionType=O.PAN,this.constraintOptions.interactionFactor=j(this.beginScreenPoint,i),this.constraintOptions.interactionDirection=this.view.renderCoordsHelper.worldUpAtPosition(this.currentCamera.eye,this.tmpInteractionDirection),E(this.view,this.currentCamera,this.constraintOptions),this.constraintOptions.interactionDirection=null)}_zoomPlanar(t){const i=this.beginRadius/t.radius,e=.001875*Math.min(Math.max(t.radius,40),120);this.smoothScaling.gain=e,this.smoothScaling.update(i),this.zoomMomentumEstimator.add(this.smoothScaling.value,.001*t.timestamp),K(this.currentCamera,this.beginScenePoint,this.smoothScaling.value,this.view.state.constraints.minimumPoiDistance),this.constraintOptions.interactionType=O.ZOOM,this.constraintOptions.interactionFactor=j(t.radius-this.beginRadius),E(this.view,this.currentCamera,this.constraintOptions)}_rotatePlanar(t){h(this.rotationAxis,this.beginScenePoint),this.currentCamera.aboveGround||c(this.rotationAxis,this.rotationAxis);const i=this.smoothRotation.value;let e=t.angle-i;e=V(e);const n=i+e,s=.00125*Math.min(Math.max(t.radius,40),120);this.smoothRotation.gain=s,this.smoothRotation.update(n);const o=this.smoothRotation.value-this.beginAngle;this.rotationMomentumEstimator.add(o,.001*t.timestamp),q(this.currentCamera,this.sphere,C(this.rotationAxis,o)),this.constraintOptions.interactionType=O.TUMBLE,this.constraintOptions.interactionFactor=j(t.radius*o),E(this.view,this.currentCamera,this.constraintOptions)}};t([r({constructOnly:!0})],tt.prototype,"view",void 0),tt=t([a("esri.views.3d.state.controllers.global.PinchAndPanController")],tt);export{tt as PinchAndPanController};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../../chunks/tslib.es6.js";import{clamp as i}from"../../../../../core/mathUtils.js";import{createScreenPointArray as r}from"../../../../../core/screenUtils.js";import{property as e}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import"../../../../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{c as a}from"../../../../../chunks/vec2.js";import{a as n}from"../../../../../chunks/vec2f64.js";import{n as o,
|
|
5
|
+
import{_ as t}from"../../../../../chunks/tslib.es6.js";import{clamp as i}from"../../../../../core/mathUtils.js";import{createScreenPointArray as r}from"../../../../../core/screenUtils.js";import{property as e}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import"../../../../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{c as a}from"../../../../../chunks/vec2.js";import{a as n}from"../../../../../chunks/vec2f64.js";import{n as o,b as c,l as h,g as m,a as p}from"../../../../../chunks/vec3.js";import{c as l}from"../../../../../chunks/vec3f64.js";import{getReferenceEllipsoid as u}from"../../../../../geometry/projectionEllipsoid.js";import{create as P,fromPoints as y}from"../../../../../geometry/support/axisAngle.js";import{c as C}from"../../../../../chunks/sphere.js";import{pixelDistanceToInteractionFactor as f,applyAll as d}from"../../../camera/constraintUtils.js";import{ConstraintTypes as g,InteractionType as v,TiltMode as R}from"../../../camera/constraintUtils/common.js";import{InteractiveController as j}from"../InteractiveController.js";import{normalizeCoordinate as k,pickPointAndInitSphere as D,decideNavigationMode as w,NavigationMode as A,DISTANCE_CLAMP_VALUES as M,PIVOT_DISTANCE_MODIFIER as O,SCREEN_PIXEL_AREA as S,sphereOrPlanePointFromScreenPoint as U,applyRotation as b}from"../../utils/navigationUtils.js";import{fromScreenAtEye as z}from"../../../support/geometryUtils/ray.js";import{applySurfaceCollisionConstraint as x}from"../../../camera/constraintUtils/surfaceCollision.js";let B=class extends j{constructor(t){super(t),this.view=null,this.pickPoint=l(),this.tmpP0=n(),this.panAxisAngle=P(),this.tmpRayDir=l(),this.tmpRayDirPick=l(),this.targetOnSphere=l(),this.tmpRay={origin:l(),direction:l()},this.dragBeginPoint=r(),this.normalizedAnchorPoint=n(),this.constraintOptions={selection:g.ALL_EXCEPT_COLLISION,interactionType:v.ZOOM,interactionFactor:0,interactionStartCamera:null,interactionDirection:null,tiltMode:R.TUMBLE},this.sphere=C(),this.hasPickPoint=!1}get intersectionHelper(){return this.view.sceneIntersectionHelper}begin(t){if(!this.active)return;a(this.dragBeginPoint,t),k(this.startCamera,t,this.normalizedAnchorPoint);const r=u(this.view.spatialReference),e=D(this.intersectionHelper,this.startCamera,t,!1,r);if(this.navMode=w(this.startCamera,t,e.hasGeometryIntersection,r),this.navMode===A.Horizontal)this.hasPickPoint=!!e.scenePickPoint,this.pickPoint=e.scenePickPoint,this.sphere=e.sphere;else{let r;z(this.startCamera,t,this.tmpRay),o(this.tmpRay.direction,this.tmpRay.direction),c(this.tmpRayDirPick,this.startCamera.eye,e.scenePickPoint);const s=h(this.tmpRayDirPick);this.view.camera.position.hasZ&&(r=Math.abs(this.view.camera.position.z));let a=i(O*r,M[0],M[1]);const n=this.view._stage.renderView.getMinimalDepthForArea(null,t[0],t[1],this.view.state.camera,S);a=n?Math.min(a,n):a,a=e.scenePickPoint?Math.min(a,s):a,this.hasPickPoint=!0,m(this.tmpRay.direction,this.tmpRay.direction,a),p(this.pickPoint,this.tmpRay.origin,this.tmpRay.direction)}this.constraintOptions.interactionStartCamera=this.startCamera}update(t){if(this.active){if(this.currentCamera.eye=this.startCamera.eye,this.currentCamera.center=this.startCamera.center,this.currentCamera.up=this.startCamera.up,this.navMode===A.Horizontal){c(this.tmpRayDir,this.currentCamera.center,this.currentCamera.eye);const i=h(this.tmpRayDir);k(this.currentCamera,t,this.tmpP0);const r=12*(this.normalizedAnchorPoint[1]-this.tmpP0[1]);let e=i*2**r;const s=this.view.state.constraints.minimumPoiDistance;if(r<0&&e<s&&(e=s),Math.abs(i-e)<1e-6)return;if(this.hasPickPoint&&e<i){const t=1-(1-e/i)*(1-this.sphere[3]/h(this.currentCamera.center));this.currentCamera.center=m(H,this.currentCamera.center,t)}m(this.tmpRayDir,this.tmpRayDir,-e/i),this.currentCamera.eye=p(H,this.currentCamera.center,this.tmpRayDir),this.constraintOptions.interactionFactor=f(this.dragBeginPoint,t),d(this.view,this.currentCamera,this.constraintOptions),this.hasPickPoint&&(U(this.sphere,this.currentCamera,this.dragBeginPoint,this.targetOnSphere),y(this.pickPoint,this.targetOnSphere,this.panAxisAngle),b(this.currentCamera,this.sphere,this.panAxisAngle))}else{const i=h(this.tmpRay.direction);k(this.currentCamera,t,this.tmpP0);const r=12*(this.normalizedAnchorPoint[1]-this.tmpP0[1]);let e=i*2**r;const s=this.view.state.constraints.minimumPoiDistance;if(r<0&&e<s&&(e=s),Math.abs(i-e)<1e-6)return;m(this.tmpRayDir,this.tmpRay.direction,1-e/i),this.currentCamera.eye=p(H,this.currentCamera.eye,this.tmpRayDir),this.currentCamera.center=p(H,this.currentCamera.center,this.tmpRayDir)}x(this.view,this.currentCamera)}}end(){this.active&&this.finishController()}};t([e({constructOnly:!0})],B.prototype,"view",void 0),B=t([s("esri.views.3d.state.controllers.global.ZoomController")],B);const H=l();export{B as ZoomController};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../../chunks/tslib.es6.js";import{Milliseconds as i}from"../../../../../core/time.js";import"../../../../../core/Logger.js";import"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import"../../../../../core/accessorSupport/set.js";import{subclass as e}from"../../../../../core/accessorSupport/decorators/subclass.js";import{c as r,l as s,b as o,g as a,a as n,d as m,n as c}from"../../../../../chunks/vec3.js";import{c as h}from"../../../../../chunks/vec3f64.js";import{getReferenceEllipsoid as p}from"../../../../../geometry/projectionEllipsoid.js";import{c as l}from"../../../../../chunks/sphere.js";import{applyAll as y}from"../../../camera/constraintUtils.js";import{ConstraintTypes as f,InteractionType as u,TiltMode as
|
|
5
|
+
import{_ as t}from"../../../../../chunks/tslib.es6.js";import{Milliseconds as i}from"../../../../../core/time.js";import"../../../../../core/Logger.js";import"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import"../../../../../core/accessorSupport/set.js";import{subclass as e}from"../../../../../core/accessorSupport/decorators/subclass.js";import{c as r,l as s,b as o,g as a,a as n,d as m,n as c}from"../../../../../chunks/vec3.js";import{c as h}from"../../../../../chunks/vec3f64.js";import{getReferenceEllipsoid as p}from"../../../../../geometry/projectionEllipsoid.js";import{c as l}from"../../../../../chunks/sphere.js";import{applyAll as y}from"../../../camera/constraintUtils.js";import{ConstraintTypes as f,InteractionType as u,TiltMode as w}from"../../../camera/constraintUtils/common.js";import{PointToPointAnimationController as g}from"../PointToPointAnimationController.js";import{decideNavigationMode as d,NavigationMode as j,panToPosition as C}from"../../utils/navigationUtils.js";import{fromScreenAtEye as D}from"../../../support/geometryUtils/ray.js";import{intersectScreen as v}from"../../../support/geometryUtils/sphere.js";import{Camera as R}from"../../../webgl-engine/lib/Camera.js";import{newIntersector as b}from"../../../webgl-engine/lib/Intersector.js";import{outExpo as M}from"../../../../animation/easing.js";import{applySurfaceCollisionConstraint as S}from"../../../camera/constraintUtils/surfaceCollision.js";const L=.6,z=4,O=12,V=60,U=20;let _=class extends g{constructor(){super(...arguments),this.zoomLocation=h(),this.tmpCamera=new R,this.tmpViewDir=h(),this.tmpRayDir={origin:h(),direction:h()},this.targetOnSphere=h(),this.tmpCenter=h(),this.constraintOptions={selection:f.ALL_EXCEPT_COLLISION,interactionType:u.ZOOM,interactionFactor:null,interactionStartCamera:new R,interactionDirection:null,tiltMode:w.TUMBLE},this.sphere=l()}initialize(){this.intersector=b(this.view.state.viewingMode)}zoomStep(t,i){if(!this.active)return;const e=this.view.state,{interactionStartCamera:s}=this.constraintOptions;this.animation.finished?s.copyFrom(e.camera):this.animation.cameraAt(1,s);let o=!1,a=!1;this.intersectionHelper.intersectScreen(i,this.zoomLocation)&&(o=t>0,a=!0),this.tmpCamera.copyFrom(e.camera),o?this.intersectionHelper.intersectRay(this.tmpCamera.ray,this.intersector,this.tmpCenter)&&(this.tmpCamera.center=this.tmpCenter):this.intersectionHelper.intersectRay(this.tmpCamera.ray,this.intersector,this.zoomLocation)?this.tmpCamera.center=this.zoomLocation:r(this.zoomLocation,this.tmpCamera.center),this._updateCamera(this.tmpCamera,t,this.zoomLocation,i,a),this.begin(this.tmpCamera)}animationSettings(){return{apex:null,duration:i(600),easing:M}}_updateCamera(t,i,e,r,h){const l=p(this.view.spatialReference);if(d(t,r,h,l)===j.Horizontal){let c=L**i;this.sphere[3]=s(e),o(this.tmpViewDir,t.center,t.eye);const h=s(this.tmpViewDir);let p=h*c;if(c<=1&&p<z&&(p=z,c=p/h),Math.abs(h-p)<1e-6)return;const l=s(t.center);if(this.sphere[3]!==l){const i=this.sphere[3]+c*(l-this.sphere[3]);t.center=a(x,t.center,i/l)}a(this.tmpViewDir,this.tmpViewDir,-c),t.eye=n(x,t.center,this.tmpViewDir),y(this.view,t,this.constraintOptions),m(e,t.center)>1e-12&&v(this.sphere,t,r,this.targetOnSphere)&&C(this.sphere,t,e,this.targetOnSphere,this.view.camera.heading,this.view.camera.tilt,!0)}else{let m=L**Math.abs(i);const p=i>0?1:-1;o(this.tmpViewDir,e,t.eye);const l=s(this.tmpViewDir);let y;D(t,r,this.tmpRayDir),c(this.tmpRayDir.direction,this.tmpRayDir.direction),this.view.camera.position.hasZ&&(y=Math.abs(this.view.camera.position.z));let f=Math.max(O*y,U);const u=this.view._stage.renderView.getMinimalDepthForArea(null,r[0],r[1],this.view.state.camera,V);f=u?Math.min(f,u):f,f=h?Math.min(f,l):f,a(this.tmpRayDir.direction,this.tmpRayDir.direction,f),n(e,this.tmpRayDir.origin,this.tmpRayDir.direction);let w=f*m;const g=Math.max(z,1.01*t.nearFar[0]);if(i>0&&w<g&&(w=g,m=w/f),Math.abs(f-w)<1e-6)return;a(this.tmpRayDir.direction,this.tmpRayDir.direction,p*(1-m)),t.eye=n(x,t.eye,this.tmpRayDir.direction),t.center=n(x,t.center,this.tmpRayDir.direction)}S(this.view,t)}};_=t([e("esri.views.3d.state.controllers.global.ZoomStepController")],_);const x=h();export{_ as ZoomStepController};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../../chunks/tslib.es6.js";import{asinClamped as i}from"../../../../../core/mathUtils.js";import{createScreenPointArray as e,screenPointObjectToArray as n}from"../../../../../core/screenUtils.js";import{property as o}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import"../../../../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{o as r,c as a,e as m,g as h,b as c,n as l,a as
|
|
5
|
+
import{_ as t}from"../../../../../chunks/tslib.es6.js";import{asinClamped as i}from"../../../../../core/mathUtils.js";import{createScreenPointArray as e,screenPointObjectToArray as n}from"../../../../../core/screenUtils.js";import{property as o}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import"../../../../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{o as r,c as a,e as m,g as h,b as c,n as l,l as p,a as u}from"../../../../../chunks/vec3.js";import{c as d,f as C}from"../../../../../chunks/vec3f64.js";import{wrapAxisAngle as g}from"../../../../../geometry/support/axisAngle.js";import{create as v,fromNormalAndOffset as M,setOffsetFromPoint as w,negate as b,normal as f}from"../../../../../geometry/support/plane.js";import{pixelDistanceToInteractionFactor as S,applyAll as V}from"../../../camera/constraintUtils.js";import{ConstraintTypes as E,InteractionType as P,TiltMode as j}from"../../../camera/constraintUtils/common.js";import{ExponentialFalloff as z}from"../../../input/util.js";import{InteractiveController as H}from"../InteractiveController.js";import{PanPlanarMomentumController as O}from"../momentum/PanPlanarMomentumController.js";import{RotationMomentumController as y}from"../momentum/RotationMomentumController.js";import{ZoomPlanarMomentumController as T}from"../momentum/ZoomPlanarMomentumController.js";import{NavigationMode as A,centroid as F,applyZoomToPoint as L,applyPanPlanar as x,normalizeRotationDelta as R,applyRotation as U,intersectPlaneFromScreenPointAtEye as D}from"../../utils/navigationUtils.js";import{Camera as N}from"../../../webgl-engine/lib/Camera.js";import{PanPlanarMomentumEstimator as _}from"../../../../navigation/PanPlanarMomentumEstimator.js";import{RotationMomentumEstimator as k}from"../../../../navigation/RotationMomentumEstimator.js";import{ZoomMomentumEstimator as I}from"../../../../navigation/ZoomMomentumEstimator.js";const G=C(0,0,1),Z={ELEVATION_THRESHOLD:3e4,ANGLE_THRESHOLD:16/180*Math.PI},B=80;let W=class extends H{constructor(t){super(t),this.view=null,this.rotationValueSmooth=new z(.05),this.scalingValueSmooth=new z(.05),this.planeHorizontal=v(),this.planeVertical=v(),this.rotationMomentumEstimator=new k,this.panMomentumEstimator=new _(300,12,.9),this.zoomMomentumEstimator=new I,this.beginCenter=d(),this.tmpPoints=[],this.beginCenterScreen=e(),this.tmpCentroid3d=d(),this.tmpCentroid2d=e(),this.tmp2d=e(),this.constraintOptions={selection:E.ALL,interactionType:P.NONE,interactionFactor:0,interactionStartCamera:new N,interactionDirection:null,tiltMode:j.TUMBLE}}get intersectionHelper(){return this.view.sceneIntersectionHelper}begin(t){if(!this.active)return;const e=this.view.navigation.momentumEnabled;this.zoomMomentumEstimator.enabled=e,this.rotationMomentumEstimator.enabled=e,this.panMomentumEstimator.enabled=e,this.beginRadius=t.radius,this.pointerCount=t.pointers.size,this.beginAngle=t.angle,this.rotationValueSmooth.reset(),this.scalingValueSmooth.reset(),n(t.center,this.beginCenterScreen),M(G,0,this.planeHorizontal);const o=d(),s=this.intersectionHelper.intersectScreenFreePointFallback(this.beginCenterScreen,o),C=d();r(C,this.startCamera.viewForward);const g=d();a(g,G);const v=m(C,g),f=i(v<0?-v:v);if(this.panMode=f>=Z.ANGLE_THRESHOLD?A.Horizontal:A.Vertical,w(this.planeHorizontal,this.planeHorizontal,o),this.startCamera.aboveGround||b(this.planeHorizontal,this.planeHorizontal),this.panMode===A.Vertical){h(g,g,v),c(this.planeVertical,C,g),l(this.planeVertical,this.planeVertical),w(this.planeVertical,this.planeVertical,o);const i=d(),e=d(),n=d();c(i,o,this.currentCamera.eye);const r=p(i);l(i,i);const M=5*Math.max(Math.abs(this.view.camera.position.z),50),b=this.view._stage.renderView.getMinimalDepthForArea(this.view.getVoxelWasmPerSceneView(),this.beginCenterScreen[0],this.beginCenterScreen[1],this.view.state.camera,B);let f=b?Math.min(b,M):M;f=s?Math.min(f,r):f,a(n,u(e,this.currentCamera.eye,h(e,i,f))),this.planeVertical[3]=-m(this.planeVertical,n),this.computePlanePoints(t.pointers,this.planeVertical,this.startCamera,this.tmpPoints),F(this.tmpPoints,this.beginCenter)}else this.computePlanePoints(t.pointers,this.planeHorizontal,this.startCamera,this.tmpPoints),F(this.tmpPoints,this.beginCenter);this.constraintOptions.interactionStartCamera.copyFrom(this.startCamera)}update(t){if(!this.active)return;this.currentCamera.copyFrom(this.startCamera);const i=t.pointers.size>1,e=this.panMode===A.Horizontal?this.planeHorizontal:this.planeVertical,o=this.beginCenter;if(i){const i=this.beginRadius/t.radius,e=.001875*Math.min(Math.max(t.radius,40),120);this.scalingValueSmooth.gain=e,this.scalingValueSmooth.update(i),L(this.currentCamera,o,this.scalingValueSmooth.value,this.view.state.constraints.minimumPoiDistance),this.zoomMomentumEstimator.add(this.scalingValueSmooth.value,.001*t.timestamp),this.constraintOptions.interactionType=P.ZOOM,this.constraintOptions.interactionFactor=S(Math.abs(t.radius-this.beginRadius)),V(this.view,this.currentCamera,this.constraintOptions)}if(this.computePlanePoints(t.pointers,e,this.currentCamera,this.tmpPoints),F(this.tmpPoints,this.tmpCentroid3d),n(t.center,this.tmpCentroid2d),x(this.currentCamera,o,this.tmpCentroid3d),this.panMomentumEstimator.add(this.tmpCentroid2d,this.tmpCentroid3d,.001*t.timestamp),this.constraintOptions.interactionType=P.PAN,this.constraintOptions.interactionFactor=S(this.beginCenterScreen,this.tmpCentroid2d),V(this.view,this.currentCamera,this.constraintOptions),i){const i=this.planeHorizontal,e=o,n=this.rotationValueSmooth.value,s=n+R(t.angle-n),r=.00125*Math.min(Math.max(t.radius,40),120);this.rotationValueSmooth.gain=r,this.rotationValueSmooth.update(s);const a=this.rotationValueSmooth.value-this.beginAngle;this.rotationMomentumEstimator.add(a,.001*t.timestamp),U(this.currentCamera,e,g(i,a)),this.constraintOptions.interactionType=P.TUMBLE,this.constraintOptions.interactionFactor=S(Math.abs(t.radius*a)),V(this.view,this.currentCamera,this.constraintOptions)}}end(t){t.pointers.size===this.pointerCount&&this.update(t),this.finishController();const i=this.zoomMomentumEstimator.evaluateMomentum();if(i)return new T({view:this.view,momentum:i,zoomCenter:this.beginCenter});const e=this.rotationMomentumEstimator.evaluateMomentum();if(e)return new y({view:this.view,momentum:e,center:this.beginCenter,axis:f(this.planeHorizontal)});const n=this.panMomentumEstimator.evaluateMomentum();return n?new O({view:this.view,momentum:n}):null}computePlanePoints(t,i,e,n){n.length=t.size;const o=this.tmp2d;let s=0;return t.forEach((t=>{o[0]=t.x,o[1]=t.y,void 0===n[s]&&(n[s]=d()),D(i,e,o,n[s]),s+=1})),n}};t([o({constructOnly:!0})],W.prototype,"view",void 0),W=t([s("esri.views.3d.state.controllers.local.PinchAndPanController")],W);export{W as PinchAndPanController};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../../chunks/tslib.es6.js";import{clamp as i}from"../../../../../core/mathUtils.js";import{createScreenPointArray as
|
|
5
|
+
import{_ as t}from"../../../../../chunks/tslib.es6.js";import{clamp as i}from"../../../../../core/mathUtils.js";import{createScreenPointArray as s}from"../../../../../core/screenUtils.js";import{property as r}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import"../../../../../core/accessorSupport/ensureType.js";import{subclass as e}from"../../../../../core/accessorSupport/decorators/subclass.js";import{c as a}from"../../../../../chunks/vec2.js";import{a as o}from"../../../../../chunks/vec2f64.js";import{b as n,l as m,n as h,g as c,a as p,o as l,c as u,h as P}from"../../../../../chunks/vec3.js";import{c as C}from"../../../../../chunks/vec3f64.js";import{create as v,fromPositionAndNormal as D}from"../../../../../geometry/support/plane.js";import{pixelDistanceToInteractionFactor as y,applyAll as f}from"../../../camera/constraintUtils.js";import{ConstraintTypes as d,InteractionType as g,TiltMode as j}from"../../../camera/constraintUtils/common.js";import{InteractiveController as w}from"../InteractiveController.js";import{normalizeCoordinate as M,DISTANCE_CLAMP_VALUES as O,PIVOT_DISTANCE_MODIFIER as N,SCREEN_PIXEL_AREA as b,intersectPlaneFromScreenPoint as R}from"../../utils/navigationUtils.js";let S=class extends w{constructor(t){super(t),this.view=null,this.tmpP=C(),this.tmpDir=C(),this.tmpN=C(),this.tmpP0=o(),this.tmpPoi=C(),this.tmpRayDir=C(),this.dragBeginPoint=s(),this.normalizedAnchorPoint=o(),this.constraintOptions={selection:d.ALL,interactionType:g.ZOOM,interactionFactor:0,interactionStartCamera:null,interactionDirection:C(),tiltMode:j.TUMBLE},this.plane=v()}get intersectionHelper(){return this.view.sceneIntersectionHelper}begin(t){if(!this.active)return;a(this.dragBeginPoint,t),M(this.startCamera,t,this.normalizedAnchorPoint);const s=this.intersectionHelper.intersectScreenFreePointFallback(t,this.tmpP);n(this.tmpDir,this.tmpP,this.startCamera.eye);const r=m(this.tmpDir);let e;h(this.tmpDir,this.tmpDir),this.view.camera.position.hasZ&&(e=Math.abs(this.view.camera.position.z));let o=i(N*e,O[0],O[1]);const u=this.view._stage.renderView.getMinimalDepthForArea(this.view.getVoxelWasmPerSceneView(),t[0],t[1],this.view.state.camera,b);o=u?Math.min(o,u):o,o=s?Math.min(o,r):o,c(this.tmpDir,this.tmpDir,o),p(this.tmpP,this.startCamera.eye,this.tmpDir),n(this.tmpN,this.startCamera.eye,this.startCamera.center),h(this.tmpN,this.tmpN),this.tmpN[1]<0&&l(this.tmpN,this.tmpN),D(this.tmpP,this.tmpN,this.plane),this.constraintOptions.interactionStartCamera=this.startCamera}update(t){if(!this.active)return;R(this.plane,this.currentCamera,this.dragBeginPoint,this.tmpPoi)||u(this.tmpPoi,this.currentCamera.center),M(this.currentCamera,t,this.tmpP0);let i=4*(this.tmpP0[1]-this.normalizedAnchorPoint[1]);a(this.normalizedAnchorPoint,this.tmpP0),n(this.tmpRayDir,this.tmpPoi,this.currentCamera.eye);const s=m(this.tmpRayDir);let r=s*(1-i);u(this.constraintOptions.interactionDirection,this.tmpRayDir),c(this.constraintOptions.interactionDirection,this.constraintOptions.interactionDirection,Math.sign(i)/s);const e=this.view.state.constraints.minimumPoiDistance;i>=0&&r<e&&(r=e,i=-(r-s)/s),Math.abs(s-r)<1e-6||(c(this.tmpRayDir,this.tmpRayDir,i),this.currentCamera.eye=p(U,this.currentCamera.eye,this.tmpRayDir),P(U,this.currentCamera.center,this.tmpPoi,i),this.tmpPoi[2]>this.startCamera.center[2]?U[2]=Math.max(this.startCamera.center[2],U[2]):U[2]=Math.min(this.startCamera.center[2],U[2]),this.currentCamera.center=U,this.constraintOptions.interactionFactor=y(this.dragBeginPoint,t),f(this.view,this.currentCamera,this.constraintOptions))}end(){this.active&&this.finishController()}};t([r({constructOnly:!0})],S.prototype,"view",void 0),S=t([e("esri.views.3d.state.controllers.local.ZoomController")],S);const U=C();export{S as ZoomController};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as o}from"../../../chunks/tslib.es6.js";import t from"../../../Color.js";import r from"../../../core/Accessor.js";import{isSome as s}from"../../../core/maybe.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as
|
|
5
|
+
import{_ as o}from"../../../chunks/tslib.es6.js";import t from"../../../Color.js";import r from"../../../core/Accessor.js";import{isSome as s}from"../../../core/maybe.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import{f as a}from"../../../chunks/vec4f32.js";let c=class extends r{constructor(){super(...arguments),this.color=new t([0,255,255]),this.haloColor=null,this.haloOpacity=1,this.fillOpacity=.25,this.shadowOpacity=.4,this.shadowColor=new t([0,0,0]),this.shadowDifference=.2}static toEngineOptions(o){const r=t.toUnitRGBA(o.color),i=s(o.haloColor)?t.toUnitRGBA(o.haloColor):r,p=t.toUnitRGBA(o.shadowColor);return{color:a(r[0],r[1],r[2],r[3]),haloColor:a(i[0],i[1],i[2],i[3]),haloOpacity:o.haloOpacity,haloOpacityOccluded:.25*o.haloOpacity,fillOpacity:o.fillOpacity,fillOpacityOccluded:.25*o.fillOpacity,shadowOpacity:o.shadowOpacity,shadowColor:a(p[0],p[1],p[2],p[3]),occludedShadowOpacity:o.shadowOpacity*(1-o.shadowDifference)}}};o([i({type:t})],c.prototype,"color",void 0),o([i({type:t})],c.prototype,"haloColor",void 0),o([i()],c.prototype,"haloOpacity",void 0),o([i()],c.prototype,"fillOpacity",void 0),o([i()],c.prototype,"shadowOpacity",void 0),o([i({type:t})],c.prototype,"shadowColor",void 0),o([i()],c.prototype,"shadowDifference",void 0),c=o([p("esri.views.3d.support.HighlightOptions")],c);const e=c;export{e 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.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{BufferViewVec2f as e,BufferViewVec2f64 as t,BufferViewVec3f as i,BufferViewVec3f64 as s,BufferViewVec4f as r,BufferViewVec4f64 as n,BufferViewMat3f as h,BufferViewMat3f64 as d,BufferViewMat4f as u,BufferViewMat4f64 as f,BufferViewVec4u8 as p,BufferViewFloat as l,BufferViewFloat64 as a,BufferViewUint8 as o,BufferViewUint16 as c,BufferViewInt8 as F,BufferViewVec2i8 as m,BufferViewVec2i16 as _,BufferViewVec2u8 as y,BufferViewVec4u16 as b,BufferViewUint32 as w}from"../../../../geometry/support/buffer/BufferView.js";import{elementTypeSize as g}from"../../../../geometry/support/buffer/types.js";class v{constructor(e,t){this.layout=e,this.buffer="number"==typeof t?new ArrayBuffer(t*e.stride):t;for(const i of e.fieldNames){const t=e.fields.get(i);this[i]=new t.constructor(this.buffer,t.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.buffer.byteLength/this.stride}get byteLength(){return this.buffer.byteLength}getField(e,t){const i=this[e];return i&&i.elementCount===t.ElementCount&&i.elementType===t.ElementType?i:null}slice(e,t){return new v(this.layout,this.buffer.slice(e*this.stride,t*this.stride))}copyFrom(e,t,i,s){const r=this.stride;if(r%4==0){const n=new Uint32Array(e.buffer,t*r,s*r/4);new Uint32Array(this.buffer,i*r,s*r/4).set(n)}else{const n=new Uint8Array(e.buffer,t*r,s*r);new Uint8Array(this.buffer,i*r,s*r).set(n)}}}class N{constructor(){this.stride=0,this.fields=new Map,this.fieldNames=[]}vec2f(t,i){return this._appendField(t,e,i),this}vec2f64(e,i){return this._appendField(e,t,i),this}vec3f(e,t){return this._appendField(e,i,t),this}vec3f64(e,t){return this._appendField(e,s,t),this}vec4f(e,t){return this._appendField(e,r,t),this}vec4f64(e,t){return this._appendField(e,n,t),this}mat3f(e,t){return this._appendField(e,h,t),this}mat3f64(e,t){return this._appendField(e,d,t),this}mat4f(e,t){return this._appendField(e,u,t),this}mat4f64(e,t){return this._appendField(e,f,t),this}vec4u8(e,t){return this._appendField(e,p,t),this}f32(e,t){return this._appendField(e,l,t),this}f64(e,t){return this._appendField(e,a,t),this}u8(e,t){return this._appendField(e,o,t),this}u16(e,t){return this._appendField(e,c,t),this}i8(e,t){return this._appendField(e,F,t),this}vec2i8(e,t){return this._appendField(e,m,t),this}vec2i16(e,t){return this._appendField(e,_,t),this}vec2u8(e,t){return this._appendField(e,y,t),this}vec4u16(e,t){return this._appendField(e,b,t),this}u32(e,t){return this._appendField(e,w,t),this}_appendField(e,t,i){const s=t.ElementCount*g(t.ElementType),r=this.stride;this.fields.set(e,{size:s,constructor:t,offset:r,optional:i}),this.stride+=s,this.fieldNames.push(e)}alignTo(e){return this.stride=Math.floor((this.stride+e-1)/e)*e,this}hasField(e){return this.fieldNames.
|
|
5
|
+
import{BufferViewVec2f as e,BufferViewVec2f64 as t,BufferViewVec3f as i,BufferViewVec3f64 as s,BufferViewVec4f as r,BufferViewVec4f64 as n,BufferViewMat3f as h,BufferViewMat3f64 as d,BufferViewMat4f as u,BufferViewMat4f64 as f,BufferViewVec4u8 as p,BufferViewFloat as l,BufferViewFloat64 as a,BufferViewUint8 as o,BufferViewUint16 as c,BufferViewInt8 as F,BufferViewVec2i8 as m,BufferViewVec2i16 as _,BufferViewVec2u8 as y,BufferViewVec4u16 as b,BufferViewUint32 as w}from"../../../../geometry/support/buffer/BufferView.js";import{elementTypeSize as g}from"../../../../geometry/support/buffer/types.js";class v{constructor(e,t){this.layout=e,this.buffer="number"==typeof t?new ArrayBuffer(t*e.stride):t;for(const i of e.fieldNames){const t=e.fields.get(i);this[i]=new t.constructor(this.buffer,t.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.buffer.byteLength/this.stride}get byteLength(){return this.buffer.byteLength}getField(e,t){const i=this[e];return i&&i.elementCount===t.ElementCount&&i.elementType===t.ElementType?i:null}slice(e,t){return new v(this.layout,this.buffer.slice(e*this.stride,t*this.stride))}copyFrom(e,t,i,s){const r=this.stride;if(r%4==0){const n=new Uint32Array(e.buffer,t*r,s*r/4);new Uint32Array(this.buffer,i*r,s*r/4).set(n)}else{const n=new Uint8Array(e.buffer,t*r,s*r);new Uint8Array(this.buffer,i*r,s*r).set(n)}}}class N{constructor(){this.stride=0,this.fields=new Map,this.fieldNames=[]}vec2f(t,i){return this._appendField(t,e,i),this}vec2f64(e,i){return this._appendField(e,t,i),this}vec3f(e,t){return this._appendField(e,i,t),this}vec3f64(e,t){return this._appendField(e,s,t),this}vec4f(e,t){return this._appendField(e,r,t),this}vec4f64(e,t){return this._appendField(e,n,t),this}mat3f(e,t){return this._appendField(e,h,t),this}mat3f64(e,t){return this._appendField(e,d,t),this}mat4f(e,t){return this._appendField(e,u,t),this}mat4f64(e,t){return this._appendField(e,f,t),this}vec4u8(e,t){return this._appendField(e,p,t),this}f32(e,t){return this._appendField(e,l,t),this}f64(e,t){return this._appendField(e,a,t),this}u8(e,t){return this._appendField(e,o,t),this}u16(e,t){return this._appendField(e,c,t),this}i8(e,t){return this._appendField(e,F,t),this}vec2i8(e,t){return this._appendField(e,m,t),this}vec2i16(e,t){return this._appendField(e,_,t),this}vec2u8(e,t){return this._appendField(e,y,t),this}vec4u16(e,t){return this._appendField(e,b,t),this}u32(e,t){return this._appendField(e,w,t),this}_appendField(e,t,i){const s=t.ElementCount*g(t.ElementType),r=this.stride;this.fields.set(e,{size:s,constructor:t,offset:r,optional:i}),this.stride+=s,this.fieldNames.push(e)}alignTo(e){return this.stride=Math.floor((this.stride+e-1)/e)*e,this}hasField(e){return this.fieldNames.includes(e)}createBuffer(e){return new v(this,e)}createView(e){return new v(this,e)}clone(){const e=new N;return e.stride=this.stride,e.fields=new Map,this.fields.forEach(((t,i)=>e.fields.set(i,t))),e.fieldNames=this.fieldNames.slice(),e.BufferType=this.BufferType,e}}function T(){return new N}export{v as InterleavedBuffer,N as InterleavedLayout,T as newLayout};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as E}from"../../../chunks/tslib.es6.js";import _ from"../../../core/Accessor.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as S}from"../../../core/accessorSupport/decorators/subclass.js";let T=class extends _{constructor(){super(...arguments),this.SCENEVIEW_HITTEST_RETURN_INTERSECTOR=!1,this.
|
|
5
|
+
import{_ as E}from"../../../chunks/tslib.es6.js";import _ from"../../../core/Accessor.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as S}from"../../../core/accessorSupport/decorators/subclass.js";let T=class extends _{constructor(){super(...arguments),this.SCENEVIEW_HITTEST_RETURN_INTERSECTOR=!1,this.DECONFLICTOR_SHOW_VISIBLE=!1,this.DECONFLICTOR_SHOW_INVISIBLE=!1,this.DECONFLICTOR_SHOW_GRID=!1,this.LABELS_SHOW_BORDER=!1,this.TEXT_SHOW_BASELINE=!1,this.TEXT_SHOW_BORDER=!1,this.OVERLAY_DRAW_DEBUG_TEXTURE=!1,this.OVERLAY_SHOW_CENTER=!1,this.SHOW_POI=!1,this.TESTS_DISABLE_OPTIMIZATIONS=!1,this.TESTS_DISABLE_FAST_UPDATES=!1,this.DRAW_MESH_GEOMETRY_NORMALS=!1,this.FEATURE_TILE_FETCH_SHOW_TILES=!1,this.FEATURE_TILE_TREE_SHOW_TILES=!1,this.TERRAIN_TILE_TREE_SHOW_TILES=!1,this.I3S_TREE_SHOW_TILES=!1,this.I3S_SHOW_MODIFICATIONS=!1,this.LOD_INSTANCE_RENDERER_DISABLE_UPDATES=!1,this.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL=!1,this.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES=!1,this.LINE_WIREFRAMES=!1}};E([o()],T.prototype,"SCENEVIEW_HITTEST_RETURN_INTERSECTOR",void 0),E([o()],T.prototype,"DECONFLICTOR_SHOW_VISIBLE",void 0),E([o()],T.prototype,"DECONFLICTOR_SHOW_INVISIBLE",void 0),E([o()],T.prototype,"DECONFLICTOR_SHOW_GRID",void 0),E([o()],T.prototype,"LABELS_SHOW_BORDER",void 0),E([o()],T.prototype,"TEXT_SHOW_BASELINE",void 0),E([o()],T.prototype,"TEXT_SHOW_BORDER",void 0),E([o()],T.prototype,"OVERLAY_DRAW_DEBUG_TEXTURE",void 0),E([o()],T.prototype,"OVERLAY_SHOW_CENTER",void 0),E([o()],T.prototype,"SHOW_POI",void 0),E([o()],T.prototype,"TESTS_DISABLE_OPTIMIZATIONS",void 0),E([o()],T.prototype,"TESTS_DISABLE_FAST_UPDATES",void 0),E([o()],T.prototype,"DRAW_MESH_GEOMETRY_NORMALS",void 0),E([o()],T.prototype,"FEATURE_TILE_FETCH_SHOW_TILES",void 0),E([o()],T.prototype,"FEATURE_TILE_TREE_SHOW_TILES",void 0),E([o()],T.prototype,"TERRAIN_TILE_TREE_SHOW_TILES",void 0),E([o()],T.prototype,"I3S_TREE_SHOW_TILES",void 0),E([o()],T.prototype,"I3S_SHOW_MODIFICATIONS",void 0),E([o()],T.prototype,"LOD_INSTANCE_RENDERER_DISABLE_UPDATES",void 0),E([o()],T.prototype,"LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL",void 0),E([o()],T.prototype,"EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES",void 0),E([o()],T.prototype,"LINE_WIREFRAMES",void 0),T=E([S("esri.views.3d.support.DebugFlags")],T);const t=new T;export{t 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.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{
|
|
5
|
+
import{g as t,d as e}from"../../../chunks/mat3.js";import{c as a}from"../../../chunks/mat3f64.js";import{a as n,c as r}from"../../../chunks/quat.js";import{c as s,a as f}from"../../../chunks/quatf32.js";import{a as o}from"../../../chunks/quatf64.js";import{c as i,b as c,q as h,v as u,s as l,t as m,a as z,u as S}from"../../../chunks/vec3.js";import{a as b,b as M}from"../../../chunks/vec3f32.js";import{a as p,b as q,c as j}from"../../../chunks/vec3f64.js";import{t as k}from"../../../chunks/vec4.js";import{c as v}from"../../../chunks/vec4f64.js";import{create as g}from"../../../geometry/support/aaBoundingBox.js";import{signedDistance as x,normal as y}from"../../../geometry/support/plane.js";import{computeOBB as d}from"./dito.js";const w=o(),A=j(),B=j(),I=v(),C=a();class D{constructor(t){const e=56,a=0,n=24,r=36,s=t*e;this.buffer=new ArrayBuffer(s),this.obbs=new Array(t);for(let o=0;o<t;o++)this.obbs[o]={center:q(this.buffer,e*o+a),halfSize:M(this.buffer,e*o+n),quaternion:f(this.buffer,e*o+r)}}}function E(t=[0,0,0],e=[-1,-1,-1],a=[0,0,0,1]){return{center:p(t),halfSize:b(e),quaternion:s(a)}}function F(t){return E(t.center,t.halfSize,t.quaternion)}function G(t,e){i(e.center,t.center),i(e.halfSize,t.halfSize),n(e.quaternion,t.quaternion)}function H(t,e){return e=e||E(),d(t,e),e}function J(t,e){const a=x(e,t.center),n=U(t,y(e));return a>n?1:a<-n?-1:0}function K(e,a){a||(a=g());const n=t(C,e.quaternion),r=e.halfSize[0]*Math.abs(n[0])+e.halfSize[1]*Math.abs(n[3])+e.halfSize[2]*Math.abs(n[6]),s=e.halfSize[0]*Math.abs(n[1])+e.halfSize[1]*Math.abs(n[4])+e.halfSize[2]*Math.abs(n[7]),f=e.halfSize[0]*Math.abs(n[2])+e.halfSize[1]*Math.abs(n[5])+e.halfSize[2]*Math.abs(n[8]);return a[0]=e.center[0]-r,a[1]=e.center[1]-s,a[2]=e.center[2]-f,a[3]=e.center[0]+r,a[4]=e.center[1]+s,a[5]=e.center[2]+f,a}function L(t,e){return x(e,t.center)-U(t,y(e))}function N(t,e){return x(e,t.center)+U(t,y(e))}function O(t,e){return J(t,e[0])<=0&&J(t,e[1])<=0&&J(t,e[2])<=0&&J(t,e[3])<=0&&J(t,e[4])<=0&&J(t,e[5])<=0}function P(t,e,a,n=0){r(w,t.quaternion),c(A,e,t.center);const s=h(A,A,w),f=h(B,a,w);let o=-1/0,i=1/0;for(let r=0;r<3;r++)if(Math.abs(f[r])>1e-6){const e=(n+t.halfSize[r]-s[r])/f[r],a=(-n-t.halfSize[r]-s[r])/f[r];o=Math.max(o,Math.min(e,a)),i=Math.min(i,Math.max(e,a))}else if(s[r]>t.halfSize[r]+n||s[r]<-t.halfSize[r]-n)return!1;return o<=i}function Q(a,n,s,f,o){r(w,a.quaternion),u(A,n,a.center),h(A,A,w);const i=A[0]<-a.halfSize[0]?-1:A[0]>a.halfSize[0]?1:0,c=A[1]<-a.halfSize[1]?-1:A[1]>a.halfSize[1]?1:0,S=A[2]<-a.halfSize[2]?-1:A[2]>a.halfSize[2]?1:0,b=Math.abs(i)+Math.abs(c)+Math.abs(S);if(0===b)return 1/0;const M=1===b?4:6,p=6*(i+3*c+9*S+13);t(C,a.quaternion),e(C,C,a.halfSize);for(let t=0;t<M;t++){const e=T[p+t];l(A,((1&e)<<1)-1,(2&e)-1,((4&e)>>1)-1),m(A,A,C),z(I,a.center,A),I[3]=1,k(I,I,s);const n=1/Math.max(1e-6,I[3]);R[2*t]=I[0]*n,R[2*t+1]=I[1]*n}const q=2*M-2;let j=R[0]*(R[3]-R[q+1])+R[q]*(R[1]-R[q-1]);for(let t=2;t<q;t+=2)j+=R[t]*(R[t+3]-R[t-1]);return Math.abs(j)*f*o*.125}const R=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1,1.1,1.2],T=(()=>{const t=new Int8Array(162);let e=0;const a=a=>{for(let n=0;n<a.length;n++)t[e+n]=a[n];e+=6};return a([6,2,3,1,5,4]),a([0,2,3,1,5,4]),a([0,2,3,7,5,4]),a([0,1,3,2,6,4]),a([0,1,3,2,0,0]),a([0,1,5,7,3,2]),a([0,1,3,7,6,4]),a([0,1,3,7,6,2]),a([0,1,5,7,6,2]),a([0,1,5,4,6,2]),a([0,1,5,4,0,0]),a([0,1,3,7,5,4]),a([0,2,6,4,0,0]),a([0,0,0,0,0,0]),a([1,3,7,5,0,0]),a([2,3,7,6,4,0]),a([2,3,7,6,0,0]),a([2,3,1,5,7,6]),a([0,1,5,7,6,2]),a([0,1,5,7,6,4]),a([0,1,3,7,6,4]),a([4,5,7,6,2,0]),a([4,5,7,6,0,0]),a([4,5,1,3,7,6]),a([0,2,3,7,5,4]),a([6,2,3,7,5,4]),a([6,2,3,1,5,4]),t})();function U(t,e){r(w,t.quaternion),h(A,e,w);const a=t.halfSize;return Math.abs(A[0]*a[0])+Math.abs(A[1]*a[1])+Math.abs(A[2]*a[2])}function V(t,e){for(let a=0;a<8;++a){const n=e[a];n[0]=1&a?-t.halfSize[0]:t.halfSize[0],n[1]=2&a?-t.halfSize[1]:t.halfSize[1],n[2]=4&a?-t.halfSize[2]:t.halfSize[2],h(n,n,t.quaternion),z(n,n,t.center)}}function W(t){return S(t.halfSize)}export{D as ObbArray,F as clone,H as compute,V as corners,E as create,P as intersectLine,J as intersectPlane,O as isVisible,N as maximumDistancePlane,L as minimumDistancePlane,Q as projectedArea,U as projectedRadius,W as radius,G as set,K as toAaBoundingBox};
|