@arcgis/core 4.34.0-next.71 → 4.34.0-next.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/11acefc48c0354e675df.js +1 -0
- package/assets/esri/core/workers/chunks/433c4dc666a6b2c99063.js +353 -0
- package/assets/esri/core/workers/chunks/{1f51c94d392826fdbdf4.js → 8ce653c3c5dde10ccbcf.js} +46 -46
- package/assets/esri/core/workers/chunks/8d91e2d185be4a4e8598.js +1 -0
- package/assets/esri/core/workers/chunks/{bcc233a86e01ff1eac16.js → ae7b86bd08a44e26b339.js} +1 -1
- package/assets/esri/core/workers/chunks/be9edd9791a00cab9c2b.js +1 -0
- package/assets/esri/core/workers/chunks/e8d25d4ca9b335883f34.js +1 -0
- package/assets/esri/widgets/Sketch/t9n/Sketch.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_en.json +1 -1
- package/chunks/Fog.glsl.js +5 -10
- package/chunks/GlowComposition.glsl.js +4 -4
- package/chunks/Terrain.glsl.js +29 -43
- package/chunks/boundedPlane.js +1 -1
- package/config.js +1 -1
- package/geometry/support/boundedPlane.js +1 -1
- package/interfaces.d.ts +26 -3
- package/kernel.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/support/gaussianSplatUtils.js +1 -1
- package/package.json +3 -3
- package/support/basemapDefinitions.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/flow/FlowDisplayData.js +1 -1
- package/views/2d/engine/flow/FlowStrategy.js +1 -1
- package/views/2d/engine/flow/dataUtils.js +1 -1
- package/views/2d/engine/flow/utils.js +1 -1
- package/views/2d/interactive/editingTools/TransformTool.js +1 -1
- package/views/2d/interactive/editingTools/manipulations/ScaleManipulation.js +1 -1
- package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementVisualization.js +1 -1
- package/views/3d/analysis/Slice/SliceController.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/environment/Fog.glsl.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentRotate.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/extentUtils.js +1 -1
- package/views/3d/interactive/support/viewUtils.js +1 -1
- package/views/3d/interactive/visualElements/LabelVisualElement.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
- package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
- package/views/3d/state/ScreenSizePerspective.js +5 -0
- package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/support/SharedSymbolResources.js +1 -1
- package/views/3d/support/ViewSlice.js +1 -1
- package/views/3d/support/engineContent/line.js +1 -1
- package/views/3d/support/flow/FlowWorker.js +1 -1
- package/views/3d/support/flow/geometryUtils.js +1 -1
- package/views/3d/support/geometryUtils/ray.js +1 -1
- package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/ScreenSizePerspective.glsl.js +4 -4
- package/views/3d/webgl-engine/effects/glow/GlowComposition.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/raymarching/RayDistanceFalloff.glsl.js +10 -0
- package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
- package/views/3d/webgl-engine/lib/SliceHelper.js +1 -1
- package/views/3d/webgl-engine/lib/screenSizePerspectiveUtils.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/MaterialUtil.js +1 -1
- package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +28 -10
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/draw/support/tooltipUtils.js +1 -1
- package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/tileUtils.js +1 -1
- package/views/support/GroundViewElevationSampler.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch/VisibleElements.js +1 -1
- package/widgets/Sketch/support/OperationHandle.js +1 -1
- package/widgets/Sketch/support/sketchUtils.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/assets/esri/core/workers/chunks/16cfbe7bedf75d3a86e5.js +0 -1
- package/assets/esri/core/workers/chunks/226833d408eb1225e168.js +0 -1
- package/assets/esri/core/workers/chunks/cf69f6afeaf1229e032c.js +0 -1
- package/assets/esri/core/workers/chunks/e21eeb4e78a46fb7e32e.js +0 -1
- package/assets/esri/core/workers/chunks/f87a6b32292c1464b7b7.js +0 -353
- package/views/3d/webgl-engine/materials/ScaleInfo.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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../core/has.js";import"../../core/Logger.js";import"../../core/mathUtils.js";import"../../core/ObjectStack.js";import"../../core/libs/gl-matrix-2/math/mat4.js";import"../../core/libs/gl-matrix-2/factories/mat4f64.js";import"../../chunks/vec32.js";import"../../core/libs/gl-matrix-2/factories/vec3f64.js";import"./aaBoundingRect.js";import"./lineSegment.js";import"./plane.js";import"./ray.js";import"./vector.js";import"./vectorStacks.js";export{B as altitudeAt,A as axisAt,
|
|
5
|
+
import"../../core/has.js";import"../../core/Logger.js";import"../../core/mathUtils.js";import"../../core/ObjectStack.js";import"../../core/libs/gl-matrix-2/math/mat4.js";import"../../core/libs/gl-matrix-2/factories/mat4f64.js";import"../../chunks/vec32.js";import"../../core/libs/gl-matrix-2/factories/vec3f64.js";import"./aaBoundingRect.js";import"./lineSegment.js";import"./plane.js";import"./ray.js";import"./vector.js";import"./vectorStacks.js";export{B as altitudeAt,A as axisAt,c as cameraFrustumCoverage,q as closestPoint,p as closestPointOnSilhouette,d as copy,k as copyWithoutVerify,a as create,j as distance,y as distance2,z as distanceToSilhouette,l as elevate,g as equals,e as extrusionContainsPoint,h as fromAABoundingRect,f as fromValues,m as getExtent,i as intersectRay,o as intersectRayClosestSilhouette,n as normal,v as projectPoint,x as projectPointLocal,r as rotate,C as setAltitudeAt,s as setExtent,t as transform,D as up,u as updateUnboundedPlane,w as wrap}from"../../chunks/boundedPlane.js";
|
package/interfaces.d.ts
CHANGED
|
@@ -96,7 +96,7 @@ declare namespace __esri {
|
|
|
96
96
|
typeMap: HashMap<Constructor<T>>;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
export interface ReadonlyCollection<T = any> extends ReadonlyAccessor {
|
|
99
|
+
export interface ReadonlyCollection<T = any> extends ReadonlyAccessor, Evented, __esriImplementsIteration<T> {
|
|
100
100
|
readonly length: number;
|
|
101
101
|
at(index: number): T | undefined;
|
|
102
102
|
clone(): Collection<T>;
|
|
@@ -132867,6 +132867,7 @@ declare namespace __esri {
|
|
|
132867
132867
|
| "mesh"
|
|
132868
132868
|
| "circle"
|
|
132869
132869
|
| "rectangle"
|
|
132870
|
+
| "text"
|
|
132870
132871
|
| "move"
|
|
132871
132872
|
| "transform"
|
|
132872
132873
|
| "reshape"
|
|
@@ -132897,6 +132898,7 @@ declare namespace __esri {
|
|
|
132897
132898
|
| "freehandPolyline"
|
|
132898
132899
|
| "freehandPolygon"
|
|
132899
132900
|
| "mesh"
|
|
132901
|
+
| "text"
|
|
132900
132902
|
)[]
|
|
132901
132903
|
| nullish;
|
|
132902
132904
|
/**
|
|
@@ -133116,6 +133118,7 @@ declare namespace __esri {
|
|
|
133116
133118
|
| "freehandPolyline"
|
|
133117
133119
|
| "freehandPolygon"
|
|
133118
133120
|
| "mesh"
|
|
133121
|
+
| "text"
|
|
133119
133122
|
)[]
|
|
133120
133123
|
| nullish;
|
|
133121
133124
|
/**
|
|
@@ -133243,6 +133246,7 @@ declare namespace __esri {
|
|
|
133243
133246
|
| "rectangle"
|
|
133244
133247
|
| "freehandPolygon"
|
|
133245
133248
|
| "freehandPolyline"
|
|
133249
|
+
| "text"
|
|
133246
133250
|
| "move"
|
|
133247
133251
|
| "transform"
|
|
133248
133252
|
| "reshape"
|
|
@@ -133373,6 +133377,13 @@ declare namespace __esri {
|
|
|
133373
133377
|
*/
|
|
133374
133378
|
get snappingOptions(): SnappingOptions;
|
|
133375
133379
|
set snappingOptions(value: SnappingOptionsProperties);
|
|
133380
|
+
/**
|
|
133381
|
+
* A {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol.html TextSymbol} used when creating features with the 'text' tool.
|
|
133382
|
+
*
|
|
133383
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#textSymbol Read more...}
|
|
133384
|
+
*/
|
|
133385
|
+
get textSymbol(): TextSymbol;
|
|
133386
|
+
set textSymbol(value: TextSymbolProperties & { type: "text" });
|
|
133376
133387
|
/**
|
|
133377
133388
|
* Options to configure the tooltip shown next to the cursor when creating or updating graphics.
|
|
133378
133389
|
*
|
|
@@ -133429,7 +133440,8 @@ declare namespace __esri {
|
|
|
133429
133440
|
| "circle"
|
|
133430
133441
|
| "mesh"
|
|
133431
133442
|
| "freehandPolygon"
|
|
133432
|
-
| "freehandPolyline"
|
|
133443
|
+
| "freehandPolyline"
|
|
133444
|
+
| "text", createOptions?: SketchViewModelCreateCreateOptions): void;
|
|
133433
133445
|
/**
|
|
133434
133446
|
* Deletes the selected graphics used in the update workflow.
|
|
133435
133447
|
*
|
|
@@ -133570,6 +133582,12 @@ declare namespace __esri {
|
|
|
133570
133582
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#snappingOptions Read more...}
|
|
133571
133583
|
*/
|
|
133572
133584
|
snappingOptions?: SnappingOptionsProperties;
|
|
133585
|
+
/**
|
|
133586
|
+
* A {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-TextSymbol.html TextSymbol} used when creating features with the 'text' tool.
|
|
133587
|
+
*
|
|
133588
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch-SketchViewModel.html#textSymbol Read more...}
|
|
133589
|
+
*/
|
|
133590
|
+
textSymbol?: TextSymbolProperties & { type: "text" };
|
|
133573
133591
|
/**
|
|
133574
133592
|
* Options to configure the tooltip shown next to the cursor when creating or updating graphics.
|
|
133575
133593
|
*
|
|
@@ -133607,7 +133625,8 @@ declare namespace __esri {
|
|
|
133607
133625
|
| "circle"
|
|
133608
133626
|
| "mesh"
|
|
133609
133627
|
| "freehandPolyline"
|
|
133610
|
-
| "freehandPolygon"
|
|
133628
|
+
| "freehandPolygon"
|
|
133629
|
+
| "text";
|
|
133611
133630
|
toolEventInfo: CreateToolEventInfo;
|
|
133612
133631
|
type: "create";
|
|
133613
133632
|
}
|
|
@@ -133629,6 +133648,7 @@ declare namespace __esri {
|
|
|
133629
133648
|
| "mesh"
|
|
133630
133649
|
| "freehandPolyline"
|
|
133631
133650
|
| "freehandPolygon"
|
|
133651
|
+
| "text"
|
|
133632
133652
|
| "move"
|
|
133633
133653
|
| "transform"
|
|
133634
133654
|
| "reshape";
|
|
@@ -133693,6 +133713,7 @@ declare namespace __esri {
|
|
|
133693
133713
|
| "mesh"
|
|
133694
133714
|
| "freehandPolyline"
|
|
133695
133715
|
| "freehandPolygon"
|
|
133716
|
+
| "text"
|
|
133696
133717
|
| "move"
|
|
133697
133718
|
| "transform"
|
|
133698
133719
|
| "reshape";
|
|
@@ -133964,6 +133985,7 @@ declare namespace __esri {
|
|
|
133964
133985
|
circle?: boolean;
|
|
133965
133986
|
freehandPolyline?: boolean;
|
|
133966
133987
|
freehandPolygon?: boolean;
|
|
133988
|
+
text?: boolean;
|
|
133967
133989
|
}
|
|
133968
133990
|
|
|
133969
133991
|
export interface VisibleElementsCreateTools extends AnonymousAccessor {
|
|
@@ -133974,6 +133996,7 @@ declare namespace __esri {
|
|
|
133974
133996
|
circle: boolean;
|
|
133975
133997
|
freehandPolyline: boolean;
|
|
133976
133998
|
freehandPolygon: boolean;
|
|
133999
|
+
text: boolean;
|
|
133977
134000
|
}
|
|
133978
134001
|
|
|
133979
134002
|
export interface VisibleElementsSelectionToolsProperties {
|
package/kernel.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="4.34";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="4.34.0-next.
|
|
5
|
+
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="4.34";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="4.34.0-next.73",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../request.js";import i from"../core/Error.js";import o from"../core/Logger.js";import{MultiOriginJSONMixin as r}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as s}from"../core/promiseUtils.js";import{on as a,sync as n}from"../core/reactiveUtils.js";import{property as l}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{reader as p}from"../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{persistable as c}from"../core/accessorSupport/decorators/persistable.js";import
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../request.js";import i from"../core/Error.js";import o from"../core/Logger.js";import{MultiOriginJSONMixin as r}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as s}from"../core/promiseUtils.js";import{on as a,sync as n}from"../core/reactiveUtils.js";import{property as l}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{reader as p}from"../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{persistable as c}from"../core/accessorSupport/decorators/persistable.js";import h from"../geometry/Extent.js";import d from"../geometry/SpatialReference.js";import u from"./Layer.js";import{APIKeyMixin as f}from"./mixins/APIKeyMixin.js";import{ArcGISService as y}from"./mixins/ArcGISService.js";import{CustomParametersMixin as g}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as S}from"./mixins/OperationalLayer.js";import{PortalLayer as _}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as j}from"./mixins/ScaleRangeLayer.js";import{elevationInfo as v,url as T}from"./support/commonProperties.js";import w from"./support/SceneModifications.js";import{initFullExtent as x}from"./support/tiles3DUtils.js";import L from"../portal/Portal.js";import{logInvalidElevationInfoWarning as I,elevationModeRequiredMessage as P,featureExpressionUnsupportedMessage as b}from"../support/elevationInfoUtils.js";import{f as R}from"../chunks/persistableUrlUtils.js";let k=class extends(y(S(_(j(r(g(f(u)))))))){readModifications(e,t,i){this._modificationsSource={url:R(e,i),context:i}}initialize(){this.addHandles(a(()=>this.modifications,"after-changes",()=>this.modifications=this.modifications,n))}constructor(e){super(e),this.operationalLayerType="IntegratedMesh3DTilesLayer",this.modifications=null,this._modificationsSource=null,this.spatialReference=new d({wkid:4326,vcsWkid:115700}),this.fullExtent=new h(-180,-90,180,90,this.spatialReference),this.url=null,this.type="integrated-mesh-3dtiles",this.path=null,this.minScale=0,this.maxScale=0,this._rootTilesetJSON=null,this._rootTileset=null,this._key=null,this._session=null,this._rootRequestPromise=null}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}get rootTilesetJSON(){return this._rootTilesetJSON}get rootTileset(){return this._rootTileset}get key(){return this._key}get session(){return this._session}_findSessionParameter(e){const t=[e];for(;t?.length>0;){const e=t.pop();if(!e)return;for(const[o,r]of Object.entries(e)){if("uri"===o)try{const e=new URL("https://tmp"+r).searchParams.get("session");if(e)return e}catch(i){}"object"==typeof r&&null!==r&&t.push(r)}}return null}async requestRootAndSession(e){return this._rootRequestPromise||(this._rootRequestPromise=new Promise((i,r)=>{this.url||r(),this._key=this.customParameters?this.customParameters.key:null,this._session=null;const a=new Promise(e=>{if(this.replacesTerrain&&!this._key){const i=this.portalItem?.portal||this.parent?.portalItem?.portal||L.getDefault();i.signIn().then(()=>{t(i.restUrl+"/portals/self/modules/g3dtiles",{responseType:"json",query:{f:"json"}}).then(t=>{this._key=t.data.keyString,e()},()=>r())},()=>r())}else e()});a.then(()=>{t(this.url,{query:this._key?{key:this._key,token:this.apiKey}:{token:this.apiKey},responseType:"array-buffer",signal:e}).then(e=>{if(this._rootTilesetJSON=JSON.parse((new TextDecoder).decode(e.data)),!this._rootTilesetJSON)throw new Error("Error parsing root tile");this._session=this._findSessionParameter(this._rootTilesetJSON),this._rootTileset=e.data,this.fullExtent=x(this._rootTilesetJSON),i(),this._rootRequestPromise=null},e=>{s(e),r(),this._rootRequestPromise=null,o.getLogger("IntegratedMesh3DTilesLayer").error("Layer loading failed",e)})},()=>r())})),this._rootRequestPromise}async _doLoad(e){const t=null!=e?e.signal:null;try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:e=>{if(e.typeKeywords?.includes("IntegratedMesh"))return!0;throw new i("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service containing IntegratedMesh"})}},e)}catch(o){s(o)}if(null!=this._modificationsSource){const t=await w.fromUrl(this._modificationsSource.url,this.spatialReference,e);this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}await this.requestRootAndSession(t)}beforeSave(){if(null!=this._modificationsSource)return this.load().then(()=>{},e=>{o.getLogger("IntegratedMesh3DTilesLayer").error("Layer loading failed",e)})}async fetchAttributionData(){return this.load().then(()=>({}))}_validateElevationInfo(e){const t="Integrated mesh 3d tiles layers";I(o.getLogger(this),P(t,"absolute-height",e)),I(o.getLogger(this),b(t,e))}get replacesTerrain(){return!!this.parent&&"type"in this.parent&&"Basemap"===this.parent.type&&!!this.url?.match(/.+\.googleapis.com/)}};e([l({type:["IntegratedMesh3DTilesLayer"]})],k.prototype,"operationalLayerType",void 0),e([l({type:w,clonable:e=>e.clone()}),c({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],k.prototype,"modifications",void 0),e([p(["web-scene","portal-item"],"modifications")],k.prototype,"readModifications",null),e([l({type:d})],k.prototype,"spatialReference",void 0),e([l({type:h})],k.prototype,"fullExtent",void 0),e([l(v)],k.prototype,"elevationInfo",null),e([l({type:["show","hide"]})],k.prototype,"listMode",void 0),e([l(T)],k.prototype,"url",void 0),e([l({readOnly:!0})],k.prototype,"type",void 0),e([l({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],k.prototype,"path",void 0),e([l({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],k.prototype,"minScale",void 0),e([l({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],k.prototype,"maxScale",void 0),k=e([m("esri.layers.IntegratedMesh3DTilesLayer")],k);const M=k;export{M 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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../request.js";import i from"../core/Accessor.js";import r from"../core/Logger.js";import{isAbortError as s}from"../core/promiseUtils.js";import{watch as a}from"../core/reactiveUtils.js";import{addFrameTask as n}from"../core/scheduling.js";import{property as o}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{wasmFailedToInit as d,invalidLayerView as h}from"./ILyr3DWasmPerSceneView.js";import{Lyr3DWorkerHandle as _}from"./Lyr3DWorkerHandle.js";import{loadLyr3DMainWASM as u}from"../libs/lyr3d/Lyr3DModule.js";import{getElevationOffsetInMeters as y}from"../support/elevationInfoUtils.js";import{makeScheduleFunction as g}from"../views/3d/layers/support/makeScheduleFunction.js";let m=class extends i{constructor(e){super(e),this._lyr3DMainPromise=null,this._lyr3DMain=null,this._layers=new Map,this._debugFlags=new Set,this._debugLevel=0,this._wasmNotLoaded="method requiring WASM was called when WASM isn't loaded",this._pulseTaskHandle=null,this._session=null,this._debugFlags.add(0),this._debugFlags.add(1),this._debugFlags.add(2)}_debugLog(e,t,i,s=!0){if(this._debugFlags.has(e)&&this._debugLevel>=t){const e=s?`[js] ${i}`:`${i}`;0===t||1===t?r.getLogger(this).error(e):2===t&&r.getLogger(this).warn(e),r.getLogger(this).info(e)}}initialize(){this._debugLevel>2&&(r.getLogger(this).level="info"),this._debugLog(0,3,"Lyr3DWasmPerSceneView.initialize()"),this.addHandles([a(()=>this.view.state?.contentCamera,()=>this._updateWasmCamera())]),this._pulseTaskHandle=n({preRender:()=>this._pulseTask()})}destroy(){this._debugLog(0,3,"Lyr3DWasmPerSceneView.destroy()"),this._lyr3DMain&&(this._layers.forEach(e=>{e.abortController.abort()}),this._lyr3DMain.uninitialize_lyr3d_wasm(),this._lyr3DMain=null);const e=this._workerHandle;e&&e.destroyWasm().then(()=>{this._workerHandle?.destroy(),this._workerHandle=null}),this._pulseTaskHandle?.remove(),this._pulseTaskHandle=null}addLayerView(e){return this._lyr3DMain?this._addLayerView(e):(this._debugLog(0,1,"Lyr3DWasmPerSceneView.add3DTilesLayerView() called when WASM wasn't initialized"),{wasmLayerId:d})}removeLayerView(e){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),0;this._doRemoveLayerView(e);const t=this._layers.size;return 0===t&&(this._debugLog(0,3,"Lyr3DWasmPerSceneView.remove3DTilesLayerView() no Lyr3D layers left after removing a layer, destroying"),this.destroy()),t}getValidLayerViewCount(){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),0;let e=0;return this._layers.forEach(t=>{t.layerView.wasmLayerId>=0&&++e}),e}setEnabled(e,t){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);const i=this._layers.get(e.wasmLayerId);i&&(this._lyr3DMain.set_enabled(e.wasmLayerId,t),i.needMemoryUsageUpdate=!0,i.needFrame=!0,i.layerView.updatingFlagChanged())}setLayerOffset(e,t){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);this._layers.get(e.wasmLayerId)&&this._lyr3DMain.set_carto_offset_z(e.wasmLayerId,t)}getAttributionText(){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),[];return this._lyr3DMain.get_current_attribution_text().split("|")}onRenderableEvicted(e,t,i){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);this._layers.get(e.wasmLayerId)&&this._lyr3DMain.on_renderable_evicted(e.wasmLayerId,t,i)}setMeshModifications(e,t,i){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);const r=this._layers.get(e.wasmLayerId);if(r){const s=this._lyr3DMain._malloc(8*t.length),a=new Float64Array(this._lyr3DMain.HEAPF64.buffer,s,t.length);for(let e=0;e<t.length;++e)a[e]=t[e];this._lyr3DMain.set_mesh_modification_polygons(e.wasmLayerId,s,t.length,i),this._lyr3DMain._free(s),r.needFrame=!0,r.layerView.updatingFlagChanged()}}isUpdating(e){if(!this._lyr3DMain&&this._lyr3DMainPromise)return!0;const t=this._layers.get(e);return!!t&&(t.outstandingJobCount>0||t.outstandingRenderableCount>0||t.needFrame)}initializeWasm(e,t){return this._lyr3DMain?Promise.resolve():(this._debugLog(0,3,"Lyr3DWasmPerSceneView.initializeWasm()"),this._lyr3DMainPromise||(this._lyr3DMainPromise=u().then(i=>{this._lyr3DMain=i,this._lyr3DMainPromise=null;const r=this._lyr3DMain.addFunction(this._onNewJob.bind(this),"v"),s=this._lyr3DMain.addFunction(this._onNewRenderable.bind(this),"v"),a=this._lyr3DMain.addFunction(this._freeRenderables.bind(this),"viii"),n=this._lyr3DMain.addFunction(this._setRenderableVisibility.bind(this),"viiii"),o=this._lyr3DMain.addFunction(this._onWasmError.bind(this),"viiii"),l="global"===this.view.viewingMode,d=this.view.renderSpatialReference?.isWebMercator?3857:this.view.renderSpatialReference?.wkid??-1,h=this.view.heightModelInfo?.heightModel,u=!h||"gravity-related-height"===h;return this._lyr3DMain.initialize_lyr3d_wasm(o,r,s,a,n,e,t,l,u,d,Math.max(this._debugLevel,0))?(this._workerHandle=new _(g(this.view.resourceController)),this._workerHandle.promise?this._workerHandle.promise:void 0):(this._lyr3DMain=null,void this._debugLog(0,0,"Lyr3d Main WASM failed to initialize",!1))}).catch(e=>{this._debugLog(0,0,`Lyr3d WASM failed to download error = ${e}`,!1)})),this._lyr3DMainPromise)}_pulseTask(){if(this._lyr3DMain){let e=0,t=0;this._layers.forEach(i=>{e+=i.layerView.usedMemory,t+=i.layerView.cachedMemory}),e/=1048576,t/=1048576;const i=this.view.resourceController.memoryController,r=i.usedMemory*i.maxMemory-e;this._lyr3DMain.frame_pulse(i.memoryFactor,e,t,r,i.maxMemory),this._layers.forEach(e=>{!0===e.needFrame&&(e.needFrame=!1,e.layerView.updatingFlagChanged())})}}_incrementJobCount(e){e.outstandingJobCount+=1,1===e.outstandingJobCount&&e.outstandingRenderableCount<1&&e.layerView.updatingFlagChanged()}_decrementJobCount(e){e.outstandingJobCount-=1,0===e.outstandingJobCount&&e.outstandingRenderableCount<1&&e.layerView.updatingFlagChanged()}_incrementRenderableCount(e){e.outstandingRenderableCount+=1,e.outstandingJobCount<1&&1===e.outstandingRenderableCount&&e.layerView.updatingFlagChanged()}_decrementRenderableCount(e){e.outstandingRenderableCount-=1,e.outstandingJobCount<1&&0===e.outstandingRenderableCount&&e.layerView.updatingFlagChanged()}_onJobFailed(e,t,i){t.error.length&&this._debugLog(1,1,t.error,!1),this._lyr3DMain&&this._lyr3DMain.on_job_failed(i.jobId,i.desc),this._decrementJobCount(e)}_onJobSucceeded(e,t,i){if(this._lyr3DMain){const e=t.data.byteLength,r=this._lyr3DMain._malloc(e);new Uint8Array(this._lyr3DMain.HEAPU8.buffer,r,e).set(t.data),this._lyr3DMain.on_job_completed(i.jobId,t.jobDescJson,r,e),this._lyr3DMain._free(r)}this._decrementJobCount(e)}_getRequestPromises(e,i,r){const s=[];for(const a of e){const e=new URL(a),n=e.searchParams.get("session");n?this._session=n:!this._session||e.origin===r.origin&&e.pathname===r.pathname||e.searchParams.append("session",this._session),s.push(t(e.toString(),i).then(e=>e.data))}return s}_onNewJob(){const e=this._lyr3DMain.get_next_job(),t=this._layers.get(e.layerId);if(!t)return;this._incrementJobCount(t);const i=t.abortController.signal,r={responseType:"array-buffer",signal:i,query:{...t.customParameters,token:t.apiKey}},a={id:e.jobId,inputs:[],jobDescJson:e.desc.slice(),isMissingResourceCase:!1},n=new URL(t.layerView.layer.url),o=this._getRequestPromises(e.urls,r,n);Promise.all(o).then(e=>(a.inputs=e,this._workerHandle.invoke(a,i))).then(e=>e).catch(t=>(s(t)?this._debugLog(1,2,`job ${e.jobId} was cancelled.`):this._debugLog(1,1,`job ${e.jobId} failed with error ${t}.`),{status:1,error:"",jobDescJson:"",data:new Uint8Array(0),missingInputUrls:[],inputs:[]})).then(o=>{if(1===o.status)this._onJobFailed(t,o,e);else if(0===o.status)this._onJobSucceeded(t,o,e);else if(2===o.status){const l=this._getRequestPromises(o.missingInputUrls,r,n);Promise.all(l).then(e=>{a.jobDescJson=o.jobDescJson,o.originalInputs?a.inputs=o.originalInputs:a.inputs=[],a.isMissingResourceCase=!0;for(const t of e)a.inputs.push(t);return this._workerHandle.invoke(a,i)}).then(i=>{1===i.status?this._onJobFailed(t,i,e):0===i.status&&this._onJobSucceeded(t,i,e)}).catch(i=>{this._decrementJobCount(t),s(i)?this._debugLog(1,2,`job ${e.jobId} was cancelled.`):this._debugLog(1,1,`job ${e.jobId} failed with error2 ${i}.`),this._lyr3DMain&&this._lyr3DMain.on_job_failed(e.jobId,e.desc)})}})}_onNewRenderable(){const e=this._lyr3DMain.get_next_renderable(),t=e.meshData;if(t.data&&t.data.byteLength>0){const e=t.data.slice();t.data=e}const i=this._layers.get(e.layerId);i&&(this._incrementRenderableCount(i),i.layerView.createRenderable(e).then(t=>{this._lyr3DMain&&this._lyr3DMain.on_renderable_created(!0,e.layerId,e.handle,t.memUsageBytes),this._decrementRenderableCount(i)}).catch(t=>{s(t)||this._debugLog(2,1,`createRenderable failed with error ${t}.`),this._lyr3DMain&&this._lyr3DMain.on_renderable_created(!1,e.layerId,e.handle,0),this._decrementRenderableCount(i)}))}_freeRenderables(e,t,i){if(i<1)return;const r=this._layers.get(e);if(!r)return;const s=r.layerView,a=[],n=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,t,i);for(let o=0;o<i;++o)a.push(n[o]);for(let o=0;o<i;++o)s.freeRenderable(a[o])}_setRenderableVisibility(e,t,i,r){if(r<1)return;const s=this._layers.get(e);if(!s)return;const a=s.layerView,n=[],o=[],l=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,t,r),d=new Uint8Array(this._lyr3DMain.HEAPU8.buffer,i,r);for(let h=0;h<r;++h)n.push(l[h]),o.push(1===d[h]);a.setRenderableVisibility(n,o,r)}_onWasmError(e,t,i,r){this._lyr3DMain&&this._debugLog(i,r,this._lyr3DMain.UTF8ToString(e,t),!1)}_doRemoveLayerView(e){const t=this._layers.get(e.wasmLayerId);return!!t&&(t.abortController.abort(),this._lyr3DMain.remove_layer(e.wasmLayerId),this._layers.delete(e.wasmLayerId),!0)}_addLayerView(e){const t=e.layer,i="integrated-mesh-3dtiles"===t.type?0:2;if(!t.url)return{wasmLayerId:h};if(0===i){if(!t.rootTilesetJSON)return{wasmLayerId:h};const e=this._lyr3DMain.validate_root_tileset(JSON.stringify(t.rootTilesetJSON),i);if(0!==e.errorCode)return{wasmLayerId:h,check:e}}const r=this._lyr3DMain.get_next_layer_id(),s=new AbortController;this._layers.set(r,{layerView:e,abortController:s,needMemoryUsageUpdate:!1,outstandingJobCount:0,outstandingRenderableCount:0,customParameters:t.customParameters,apiKey:t.apiKey,needFrame:!1});const a=y(t.elevationInfo);return this._lyr3DMain.add_layer(t.url,r,i,a)?(this._updateWasmCamera(),{wasmLayerId:r}):(this._layers.delete(r),{wasmLayerId:h})}_updateWasmCamera(){const e=this.view.state?.contentCamera;if(!e||!this._lyr3DMain)return;const{eye:t,center:i,up:r,near:s,far:a,fovY:n}=e,o=[e.viewport[2],e.viewport[3]],l=e.width/e.height;this._lyr3DMain.set_camera_parameters({eye:t,center:i,up:r,near:s,far:a,fov:n,aspectRatio:l,viewport:o})}};e([o({constructOnly:!0})],m.prototype,"view",void 0),m=e([l("esri.layers.Lyr3DWasmPerSceneView")],m);const c=m;export{c as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../request.js";import i from"../core/Accessor.js";import r from"../core/Logger.js";import{isAbortError as s}from"../core/promiseUtils.js";import{watch as a}from"../core/reactiveUtils.js";import{addFrameTask as n}from"../core/scheduling.js";import{property as o}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{wasmFailedToInit as d,invalidLayerView as h}from"./ILyr3DWasmPerSceneView.js";import{Lyr3DWorkerHandle as _}from"./Lyr3DWorkerHandle.js";import{loadLyr3DMainWASM as u}from"../libs/lyr3d/Lyr3DModule.js";import{getElevationOffsetInMeters as y}from"../support/elevationInfoUtils.js";import{makeScheduleFunction as g}from"../views/3d/layers/support/makeScheduleFunction.js";let m=class extends i{constructor(e){super(e),this._lyr3DMainPromise=null,this._lyr3DMain=null,this._layers=new Map,this._debugFlags=new Set,this._debugLevel=0,this._wasmNotLoaded="method requiring WASM was called when WASM isn't loaded",this._pulseTaskHandle=null,this._debugFlags.add(0),this._debugFlags.add(1),this._debugFlags.add(2)}_debugLog(e,t,i,s=!0){if(this._debugFlags.has(e)&&this._debugLevel>=t){const e=s?`[js] ${i}`:`${i}`;0===t||1===t?r.getLogger(this).error(e):2===t&&r.getLogger(this).warn(e),r.getLogger(this).info(e)}}initialize(){this._debugLevel>2&&(r.getLogger(this).level="info"),this._debugLog(0,3,"Lyr3DWasmPerSceneView.initialize()"),this.addHandles([a(()=>this.view.state?.contentCamera,()=>this._updateWasmCamera())]),this._pulseTaskHandle=n({preRender:()=>this._pulseTask()})}destroy(){this._debugLog(0,3,"Lyr3DWasmPerSceneView.destroy()"),this._lyr3DMain&&(this._layers.forEach(e=>{e.abortController.abort()}),this._lyr3DMain.uninitialize_lyr3d_wasm(),this._lyr3DMain=null);const e=this._workerHandle;e&&e.destroyWasm().then(()=>{this._workerHandle?.destroy(),this._workerHandle=null}),this._pulseTaskHandle?.remove(),this._pulseTaskHandle=null}addLayerView(e){return this._lyr3DMain?this._addLayerView(e):(this._debugLog(0,1,"Lyr3DWasmPerSceneView.add3DTilesLayerView() called when WASM wasn't initialized"),{wasmLayerId:d})}removeLayerView(e){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),0;this._doRemoveLayerView(e);const t=this._layers.size;return 0===t&&(this._debugLog(0,3,"Lyr3DWasmPerSceneView.remove3DTilesLayerView() no Lyr3D layers left after removing a layer, destroying"),this.destroy()),t}getValidLayerViewCount(){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),0;let e=0;return this._layers.forEach(t=>{t.layerView.wasmLayerId>=0&&++e}),e}setEnabled(e,t){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);const i=this._layers.get(e.wasmLayerId);i&&(this._lyr3DMain.set_enabled(e.wasmLayerId,t),i.needMemoryUsageUpdate=!0,i.needFrame=!0,i.layerView.updatingFlagChanged())}setLayerOffset(e,t){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);this._layers.get(e.wasmLayerId)&&this._lyr3DMain.set_carto_offset_z(e.wasmLayerId,t)}getAttributionText(){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),[];return this._lyr3DMain.get_current_attribution_text().split("|")}onRenderableEvicted(e,t,i){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);this._layers.get(e.wasmLayerId)&&this._lyr3DMain.on_renderable_evicted(e.wasmLayerId,t,i)}setMeshModifications(e,t,i){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);const r=this._layers.get(e.wasmLayerId);if(r){const s=this._lyr3DMain._malloc(8*t.length),a=new Float64Array(this._lyr3DMain.HEAPF64.buffer,s,t.length);for(let e=0;e<t.length;++e)a[e]=t[e];this._lyr3DMain.set_mesh_modification_polygons(e.wasmLayerId,s,t.length,i),this._lyr3DMain._free(s),r.needFrame=!0,r.layerView.updatingFlagChanged()}}isUpdating(e){if(!this._lyr3DMain&&this._lyr3DMainPromise)return!0;const t=this._layers.get(e);return!!t&&(t.outstandingJobCount>0||t.outstandingRenderableCount>0||t.needFrame)}initializeWasm(e,t){return this._lyr3DMain?Promise.resolve():(this._debugLog(0,3,"Lyr3DWasmPerSceneView.initializeWasm()"),this._lyr3DMainPromise||(this._lyr3DMainPromise=u().then(i=>{this._lyr3DMain=i,this._lyr3DMainPromise=null;const r=this._lyr3DMain.addFunction(this._onNewJob.bind(this),"v"),s=this._lyr3DMain.addFunction(this._onNewRenderable.bind(this),"v"),a=this._lyr3DMain.addFunction(this._freeRenderables.bind(this),"viii"),n=this._lyr3DMain.addFunction(this._setRenderableVisibility.bind(this),"viiii"),o=this._lyr3DMain.addFunction(this._onWasmError.bind(this),"viiii"),l="global"===this.view.viewingMode,d=this.view.renderSpatialReference?.isWebMercator?3857:this.view.renderSpatialReference?.wkid??-1,h=this.view.heightModelInfo?.heightModel,u=!h||"gravity-related-height"===h;return this._lyr3DMain.initialize_lyr3d_wasm(o,r,s,a,n,e,t,l,u,d,Math.max(this._debugLevel,0))?(this._workerHandle=new _(g(this.view.resourceController)),this._workerHandle.promise?this._workerHandle.promise:void 0):(this._lyr3DMain=null,void this._debugLog(0,0,"Lyr3d Main WASM failed to initialize",!1))}).catch(e=>{this._debugLog(0,0,`Lyr3d WASM failed to download error = ${e}`,!1)})),this._lyr3DMainPromise)}_pulseTask(){if(this._lyr3DMain){let e=0,t=0;this._layers.forEach(i=>{e+=i.layerView.usedMemory,t+=i.layerView.cachedMemory}),e/=1048576,t/=1048576;const i=this.view.resourceController.memoryController,r=i.usedMemory*i.maxMemory-e;this._lyr3DMain.frame_pulse(i.memoryFactor,e,t,r,i.maxMemory),this._layers.forEach(e=>{!0===e.needFrame&&(e.needFrame=!1,e.layerView.updatingFlagChanged())})}}_incrementJobCount(e){e.outstandingJobCount+=1,1===e.outstandingJobCount&&e.outstandingRenderableCount<1&&e.layerView.updatingFlagChanged()}_decrementJobCount(e){e.outstandingJobCount-=1,0===e.outstandingJobCount&&e.outstandingRenderableCount<1&&e.layerView.updatingFlagChanged()}_incrementRenderableCount(e){e.outstandingRenderableCount+=1,e.outstandingJobCount<1&&1===e.outstandingRenderableCount&&e.layerView.updatingFlagChanged()}_decrementRenderableCount(e){e.outstandingRenderableCount-=1,e.outstandingJobCount<1&&0===e.outstandingRenderableCount&&e.layerView.updatingFlagChanged()}_onJobFailed(e,t,i){t.error.length&&this._debugLog(1,1,t.error,!1),this._lyr3DMain&&this._lyr3DMain.on_job_failed(i.jobId,i.desc),this._decrementJobCount(e)}_onJobSucceeded(e,t,i){if(this._lyr3DMain){const e=t.data.byteLength,r=this._lyr3DMain._malloc(e);new Uint8Array(this._lyr3DMain.HEAPU8.buffer,r,e).set(t.data),this._lyr3DMain.on_job_completed(i.jobId,t.jobDescJson,r,e),this._lyr3DMain._free(r)}this._decrementJobCount(e)}_getRequestPromises(e,i,r,s){const a=[];for(const n of e){const e=new URL(n);if("integrated-mesh-3dtiles"===s.type){if(e.origin===r.origin&&e.pathname===r.pathname){if(s.rootTileset){a.push(Promise.resolve(s.rootTileset.slice()));continue}}else s.session&&e.searchParams.append("session",s.session)}a.push(t(e.toString(),i).then(e=>e.data))}return a}_getInitialPromise(e,t,i,r,a,n,o){const l=this._getRequestPromises(e.urls,t,i,r);return Promise.all(l).then(e=>(a.inputs=e,this._workerHandle.invoke(a,n))).then(e=>e).catch(t=>{let i=1;return s(t)?this._debugLog(1,2,`job ${e.jobId} was cancelled.`):o&&400===t.details?.httpStatus?(i=3,this._debugLog(1,2,"Session expired, trying to create new Session.")):this._debugLog(1,1,`job ${e.jobId} failed with error ${t}.`),{status:i,error:"",jobDescJson:"",data:new Uint8Array(0),missingInputUrls:[],inputs:[]}})}async _onNewJob(){const e=this._lyr3DMain.get_next_job(),t=this._layers.get(e.layerId);if(!t)return;this._incrementJobCount(t);const i=t.abortController.signal,r=t.layerView.layer,a="integrated-mesh-3dtiles"===r.type?r.key:null,n="integrated-mesh-3dtiles"===r.type?r.session:null,o={responseType:"array-buffer",signal:i,query:{...t.customParameters,token:t.apiKey,key:a}},l={id:e.jobId,inputs:[],jobDescJson:e.desc.slice(),isMissingResourceCase:!1},d=new URL(r.url),h=a=>{if(1===a.status)this._onJobFailed(t,a,e);else if(0===a.status)this._onJobSucceeded(t,a,e);else if(2===a.status){const n=this._getRequestPromises(a.missingInputUrls,o,d,r);Promise.all(n).then(e=>{l.jobDescJson=a.jobDescJson,a.originalInputs?l.inputs=a.originalInputs:l.inputs=[],l.isMissingResourceCase=!0;for(const t of e)l.inputs.push(t);return this._workerHandle.invoke(l,i)}).then(i=>{1===i.status?this._onJobFailed(t,i,e):0===i.status&&this._onJobSucceeded(t,i,e)}).catch(i=>{this._decrementJobCount(t),s(i)?this._debugLog(1,2,`job ${e.jobId} was cancelled.`):this._debugLog(1,1,`job ${e.jobId} failed with error2 ${i}.`),this._lyr3DMain&&this._lyr3DMain.on_job_failed(e.jobId,e.desc)})}};try{const t=await this._getInitialPromise(e,o,d,r,l,i,n);if(3===t.status&&"integrated-mesh-3dtiles"===r.type&&n===r.session&&null!==r.session){await r.requestRootAndSession(i);h(await this._getInitialPromise(e,o,d,r,l,i,n))}else h(t)}catch(_){_&&this._debugLog(1,1,_.toString(),!1),this._lyr3DMain&&this._lyr3DMain.on_job_failed(e.jobId,e.desc),this._decrementJobCount(t)}}_onNewRenderable(){const e=this._lyr3DMain.get_next_renderable(),t=e.meshData;if(t.data&&t.data.byteLength>0){const e=t.data.slice();t.data=e}const i=this._layers.get(e.layerId);i&&(this._incrementRenderableCount(i),i.layerView.createRenderable(e).then(t=>{this._lyr3DMain&&this._lyr3DMain.on_renderable_created(!0,e.layerId,e.handle,t.memUsageBytes),this._decrementRenderableCount(i)}).catch(t=>{s(t)||this._debugLog(2,1,`createRenderable failed with error ${t}.`),this._lyr3DMain&&this._lyr3DMain.on_renderable_created(!1,e.layerId,e.handle,0),this._decrementRenderableCount(i)}))}_freeRenderables(e,t,i){if(i<1)return;const r=this._layers.get(e);if(!r)return;const s=r.layerView,a=[],n=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,t,i);for(let o=0;o<i;++o)a.push(n[o]);for(let o=0;o<i;++o)s.freeRenderable(a[o])}_setRenderableVisibility(e,t,i,r){if(r<1)return;const s=this._layers.get(e);if(!s)return;const a=s.layerView,n=[],o=[],l=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,t,r),d=new Uint8Array(this._lyr3DMain.HEAPU8.buffer,i,r);for(let h=0;h<r;++h)n.push(l[h]),o.push(1===d[h]);a.setRenderableVisibility(n,o,r)}_onWasmError(e,t,i,r){this._lyr3DMain&&this._debugLog(i,r,this._lyr3DMain.UTF8ToString(e,t),!1)}_doRemoveLayerView(e){const t=this._layers.get(e.wasmLayerId);return!!t&&(t.abortController.abort(),this._lyr3DMain.remove_layer(e.wasmLayerId),this._layers.delete(e.wasmLayerId),!0)}_addLayerView(e){const t=e.layer,i="integrated-mesh-3dtiles"===t.type?0:2;if(!t.url)return{wasmLayerId:h};if(0===i){if(!t.rootTilesetJSON)return{wasmLayerId:h};const e=this._lyr3DMain.validate_root_tileset(JSON.stringify(t.rootTilesetJSON),i);if(0!==e.errorCode)return{wasmLayerId:h,check:e}}const r=this._lyr3DMain.get_next_layer_id(),s=new AbortController;this._layers.set(r,{layerView:e,abortController:s,needMemoryUsageUpdate:!1,outstandingJobCount:0,outstandingRenderableCount:0,customParameters:t.customParameters,apiKey:t.apiKey,needFrame:!1});const a=y(t.elevationInfo);return this._lyr3DMain.add_layer(t.url,r,i,a)?(this._updateWasmCamera(),{wasmLayerId:r}):(this._layers.delete(r),{wasmLayerId:h})}_updateWasmCamera(){const e=this.view.state?.contentCamera;if(!e||!this._lyr3DMain)return;const{eye:t,center:i,up:r,near:s,far:a,fovY:n}=e,o=[e.viewport[2],e.viewport[3]],l=e.width/e.height;this._lyr3DMain.set_camera_parameters({eye:t,center:i,up:r,near:s,far:a,fov:n,aspectRatio:l,viewport:o})}};e([o({constructOnly:!0})],m.prototype,"view",void 0),m=e([l("esri.layers.Lyr3DWasmPerSceneView")],m);const c=m;export{c 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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{splatPageSizeInU32 as s}from"./GaussianSplatAtlasPageAllocator.js";const t=4194304;class i{constructor(
|
|
5
|
+
import{splatPageSizeInU32 as s}from"./GaussianSplatAtlasPageAllocator.js";const t=4194304;class i{constructor(t,i,a,e){this.handle=t,this.gaussianAtlasIndices=i,this.pageIds=a,this.positions=e,this.isVisible=!1,this.usedMemory=4*this.gaussianAtlasIndices.length+8*this.positions.length+this.pageIds.length*s*4}}export{i as GaussianTile,t as maxAllowedVisibleGaussians};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/core",
|
|
3
|
-
"version": "4.34.0-next.
|
|
3
|
+
"version": "4.34.0-next.73",
|
|
4
4
|
"homepage": "https://js.arcgis.com",
|
|
5
5
|
"description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
|
|
6
6
|
"keywords": [
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
],
|
|
19
19
|
"license": "SEE LICENSE IN copyright.txt",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@arcgis/toolkit": "^4.34.0-next.
|
|
21
|
+
"@arcgis/toolkit": "^4.34.0-next.119",
|
|
22
22
|
"@esri/arcgis-html-sanitizer": "~4.1.0",
|
|
23
23
|
"@esri/calcite-components": "^3.2.1",
|
|
24
24
|
"@vaadin/grid": "~24.8.6",
|
|
25
|
-
"@zip.js/zip.js": "~2.7.
|
|
25
|
+
"@zip.js/zip.js": "~2.7.73",
|
|
26
26
|
"luxon": "~3.7.1",
|
|
27
27
|
"marked": "~16.2.1",
|
|
28
28
|
"tslib": "^2.8.1"
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{getAssetUrl as e}from"../assets.js";import{fetchMessageBundle as r}from"../intl/messages.js";async function s(e){if(!e)return;const s=e.includes("-vector")?e.slice(0,e.indexOf("-vector")):e.includes("-3d")?e.slice(0,e.indexOf("-3d")):e,a=await r("esri/t9n/basemaps");return a[e]||a[s]}const a={satellite:{id:"satellite",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/satellite.jpg")},baseMapLayers:[{id:"satellite-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Imagery",showLegend:!1,visibility:!0,opacity:1}]},hybrid:{id:"hybrid",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/hybrid.jpg")},baseMapLayers:[{id:"hybrid-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Imagery",showLegend:!1,visibility:!0,opacity:1},{id:"hybrid-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/30d6b8271e1849cd9c3042060001f425/resources/styles/root.json",layerType:"VectorTileLayer",title:"Hybrid Reference Layer",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},terrain:{id:"terrain",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/terrain.jpg")},baseMapLayers:[{id:"terrain-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Terrain Base",showLegend:!1,visibility:!0,opacity:1},{id:"terrain-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Reference Overlay",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},oceans:{id:"oceans",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/oceans.jpg")},baseMapLayers:[{id:"oceans-base-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Ocean Base",showLegend:!1,visibility:!0,opacity:1},{id:"oceans-reference-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Ocean Reference",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},osm:{id:"osm",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/osm.jpg")},baseMapLayers:[{id:"osm-base-layer",layerType:"OpenStreetMap",title:"Open Street Map",showLegend:!1,visibility:!0,opacity:1}]},"dark-gray-vector":{id:"dark-gray-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/dark-gray-vector.jpg")},baseMapLayers:[{id:"dark-gray-base-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/5e9b3685f4c24d8781073dd928ebda50/resources/styles/root.json",layerType:"VectorTileLayer",title:"Dark Gray Base",visibility:!0,opacity:1},{id:"dark-gray-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/747cb7a5329c478cbe6981076cc879c5/resources/styles/root.json",layerType:"VectorTileLayer",title:"Dark Gray Reference",isReference:!0,visibility:!0,opacity:1}]},get"dark-gray"(){return{...this["dark-gray-vector"],id:"dark-gray"}},"gray-vector":{id:"gray-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/gray-vector.jpg")},baseMapLayers:[{id:"gray-base-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/291da5eab3a0412593b66d384379f89f/resources/styles/root.json",layerType:"VectorTileLayer",title:"Light Gray Base",visibility:!0,opacity:1},{id:"gray-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/1768e8369a214dfab4e2167d5c5f2454/resources/styles/root.json",layerType:"VectorTileLayer",title:"Light Gray Reference",isReference:!0,visibility:!0,opacity:1}]},get gray(){return{...this["gray-vector"],id:"gray"}},"streets-vector":{id:"streets-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/streets-vector.jpg")},baseMapLayers:[{id:"streets-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/de26a3cf4cc9451298ea173c4b324736/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets",visibility:!0,opacity:1}]},get streets(){return{...this["streets-vector"],id:"streets"}},"topo-vector":{id:"topo-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/topo-vector.jpg")},baseMapLayers:[{id:"world-hillshade-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Hillshade",showLegend:!1,visibility:!0,opacity:1},{id:"topo-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/7dc6cea0b1764a1f9af2e679f642f0f5/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Topo",visibility:!0,opacity:1}]},get topo(){return{...this["topo-vector"],id:"topo"}},"streets-night-vector":{id:"streets-night-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/streets-night.jpg")},baseMapLayers:[{id:"streets-night-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/86f556a2d1fd468181855a35e344567f/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets Night",visibility:!0,opacity:1}]},"streets-relief-vector":{id:"streets-relief-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/streets-relief.jpg")},baseMapLayers:[{id:"world-hillshade-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Hillshade",showLegend:!1,visibility:!0,opacity:1},{id:"streets-relief-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/b266e6d17fc345b498345613930fbd76/resources/styles/root.json",title:"World Streets Relief",layerType:"VectorTileLayer",visibility:!0,opacity:1}]},"streets-navigation-vector":{id:"streets-navigation-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/streets-navigation.jpg")},baseMapLayers:[{id:"streets-navigation-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/63c47b7177f946b49902c24129b87252/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets Navigation",visibility:!0,opacity:1}]},"topo-3d":{id:"topo-3d",is3d:!0,get thumbnailUrl(){return e("esri/images/basemap/topo-3d.png")},baseMapLayers:[{id:"topo-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/1e7d1784d1ef4b79ba6764d0bd6c3150/resources/styles/root.json",layerType:"VectorTileLayer",title:"Topographic",visibility:!0,opacity:1},{id:"topo-3d-trees",title:"Trees",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Trees_Thematic_v1/SceneServer",itemId:"f75fef56b2d944fe92ef9f7737b4f953",layerType:"ArcGISSceneServiceLayer"},{id:"topo-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"topo-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer",itemId:"ca0470dbbddb4db28bad74ed39949e25",layerType:"ArcGISSceneServiceLayer"}]},"navigation-3d":{id:"navigation-3d",is3d:!0,get thumbnailUrl(){return e("esri/images/basemap/navigation-3d.jpg")},baseMapLayers:[{id:"navigation-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/ccc904ff872b4144b94934e55e32784b/resources/styles/root.json",layerType:"VectorTileLayer",title:"Navigation",visibility:!0,opacity:1},{id:"navigation-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"navigation-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer",itemId:"ca0470dbbddb4db28bad74ed39949e25",layerType:"ArcGISSceneServiceLayer"}]},"streets-3d":{id:"streets-3d",is3d:!0,get thumbnailUrl(){return e("esri/images/basemap/streets-3d.png")},baseMapLayers:[{id:"streets-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/198298c4c64c4cb19de5b46aa00c198d/resources/styles/root.json",layerType:"VectorTileLayer",title:"Streets",visibility:!0,opacity:1},{id:"streets-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"streets-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer",itemId:"ca0470dbbddb4db28bad74ed39949e25",layerType:"ArcGISSceneServiceLayer"}]},"osm-3d":{id:"osm-3d",is3d:!0,get thumbnailUrl(){return e("esri/images/basemap/osm-3d.png")},baseMapLayers:[{id:"osm-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/8628d259c9d14bdc848771c23c513940/resources/styles/root.json",layerType:"VectorTileLayer",title:"OpenStreetMap",visibility:!0,opacity:1},{id:"osm-3d-trees",title:"Trees",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Trees_Thematic_v1/SceneServer",itemId:"f75fef56b2d944fe92ef9f7737b4f953",layerType:"ArcGISSceneServiceLayer"},{id:"osm-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"osm-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer",itemId:"ca0470dbbddb4db28bad74ed39949e25",layerType:"ArcGISSceneServiceLayer"}]},"gray-3d":{id:"gray-3d",is3d:!0,get thumbnailUrl(){return e("esri/images/basemap/gray-3d.png")},baseMapLayers:[{id:"gray-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/01a14b466345455ba4176d2e6390db92/resources/styles/root.json",layerType:"VectorTileLayer",title:"Streets",visibility:!0,opacity:1},{id:"gray-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"gray-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer",itemId:"ca0470dbbddb4db28bad74ed39949e25",layerType:"ArcGISSceneServiceLayer"}]},"navigation-dark-3d":{id:"navigation-dark-3d",itemId:"5a1365328b4943f09a54cf5fd1205707",is3d:!0,baseMapLayers:[{id:"navigation-dark-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/451a1777ab3f4bf095fae24a117439d9/resources/styles/root.json",layerType:"VectorTileLayer",title:"Navigation Dark"},{id:"navigation-dark-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_LightLabels_v1/SceneServer/layers/0",itemId:"f364b70b012a4da5a4b5921e193eac4a",layerType:"ArcGISSceneServiceLayer"},{id:"navigation-dark-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer",itemId:"ca0470dbbddb4db28bad74ed39949e25",layerType:"ArcGISSceneServiceLayer"}]},"streets-dark-3d":{id:"streets-dark-3d",itemId:"8a4efa2c20484ec9b4557895e65736ff",is3d:!0,baseMapLayers:[{id:"streets-dark-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/bc599b6d741a4ac084b7eea7bf8c5938/resources/styles/root.json",layerType:"VectorTileLayer",title:"OpenStreetMap Streets Night (for 3D)"},{id:"streets-dark-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_LightLabels_v1/SceneServer",itemId:"f364b70b012a4da5a4b5921e193eac4a",layerType:"ArcGISSceneServiceLayer"},{id:"streets-dark-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer",itemId:"ca0470dbbddb4db28bad74ed39949e25",layerType:"ArcGISSceneServiceLayer"}]},"dark-gray-3d":{id:"dark-gray-3d",itemId:"a8b7322a5fe94002bb0f5e0eeb0c5c18",is3d:!0,baseMapLayers:[{id:"dark-gray-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/4178f71acb934fb89f169e7d667c20c6/resources/styles/root.json",layerType:"VectorTileLayer",title:"OpenStreetMap Dark Gray Canvas (for 3D)"},{id:"dark-gray-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_LightLabels_v1/SceneServer/layers/0",itemId:"f364b70b012a4da5a4b5921e193eac4a",layerType:"ArcGISSceneServiceLayer"},{id:"dark-gray-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer",itemId:"ca0470dbbddb4db28bad74ed39949e25",layerType:"ArcGISSceneServiceLayer"}]}};export{a as esriBasemapDefinitions,s as getBasemapTitle};
|
|
5
|
+
import{getAssetUrl as e}from"../assets.js";import{fetchMessageBundle as r}from"../intl/messages.js";async function s(e){if(!e)return;const s=e.includes("-vector")?e.slice(0,e.indexOf("-vector")):e.includes("-3d")?e.slice(0,e.indexOf("-3d")):e,a=await r("esri/t9n/basemaps");return a[e]||a[s]}const a={satellite:{id:"satellite",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/satellite.jpg")},baseMapLayers:[{id:"satellite-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Imagery",showLegend:!1,visibility:!0,opacity:1}]},hybrid:{id:"hybrid",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/hybrid.jpg")},baseMapLayers:[{id:"hybrid-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Imagery",showLegend:!1,visibility:!0,opacity:1},{id:"hybrid-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/30d6b8271e1849cd9c3042060001f425/resources/styles/root.json",layerType:"VectorTileLayer",title:"Hybrid Reference Layer",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},terrain:{id:"terrain",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/terrain.jpg")},baseMapLayers:[{id:"terrain-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Terrain Base",showLegend:!1,visibility:!0,opacity:1},{id:"terrain-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Reference Overlay",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},oceans:{id:"oceans",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/oceans.jpg")},baseMapLayers:[{id:"oceans-base-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Ocean Base",showLegend:!1,visibility:!0,opacity:1},{id:"oceans-reference-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Ocean Reference",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},osm:{id:"osm",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/osm.jpg")},baseMapLayers:[{id:"osm-base-layer",layerType:"OpenStreetMap",title:"Open Street Map",showLegend:!1,visibility:!0,opacity:1}]},"dark-gray-vector":{id:"dark-gray-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/dark-gray-vector.jpg")},baseMapLayers:[{id:"dark-gray-base-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/5e9b3685f4c24d8781073dd928ebda50/resources/styles/root.json",layerType:"VectorTileLayer",title:"Dark Gray Base",visibility:!0,opacity:1},{id:"dark-gray-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/747cb7a5329c478cbe6981076cc879c5/resources/styles/root.json",layerType:"VectorTileLayer",title:"Dark Gray Reference",isReference:!0,visibility:!0,opacity:1}]},get"dark-gray"(){return{...this["dark-gray-vector"],id:"dark-gray"}},"gray-vector":{id:"gray-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/gray-vector.jpg")},baseMapLayers:[{id:"gray-base-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/291da5eab3a0412593b66d384379f89f/resources/styles/root.json",layerType:"VectorTileLayer",title:"Light Gray Base",visibility:!0,opacity:1},{id:"gray-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/1768e8369a214dfab4e2167d5c5f2454/resources/styles/root.json",layerType:"VectorTileLayer",title:"Light Gray Reference",isReference:!0,visibility:!0,opacity:1}]},get gray(){return{...this["gray-vector"],id:"gray"}},"streets-vector":{id:"streets-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/streets-vector.jpg")},baseMapLayers:[{id:"streets-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/de26a3cf4cc9451298ea173c4b324736/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets",visibility:!0,opacity:1}]},get streets(){return{...this["streets-vector"],id:"streets"}},"topo-vector":{id:"topo-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/topo-vector.jpg")},baseMapLayers:[{id:"world-hillshade-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Hillshade",showLegend:!1,visibility:!0,opacity:1},{id:"topo-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/7dc6cea0b1764a1f9af2e679f642f0f5/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Topo",visibility:!0,opacity:1}]},get topo(){return{...this["topo-vector"],id:"topo"}},"streets-night-vector":{id:"streets-night-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/streets-night.jpg")},baseMapLayers:[{id:"streets-night-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/86f556a2d1fd468181855a35e344567f/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets Night",visibility:!0,opacity:1}]},"streets-relief-vector":{id:"streets-relief-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/streets-relief.jpg")},baseMapLayers:[{id:"world-hillshade-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Hillshade",showLegend:!1,visibility:!0,opacity:1},{id:"streets-relief-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/b266e6d17fc345b498345613930fbd76/resources/styles/root.json",title:"World Streets Relief",layerType:"VectorTileLayer",visibility:!0,opacity:1}]},"streets-navigation-vector":{id:"streets-navigation-vector",classic:!0,get thumbnailUrl(){return e("esri/images/basemap/streets-navigation.jpg")},baseMapLayers:[{id:"streets-navigation-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/63c47b7177f946b49902c24129b87252/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets Navigation",visibility:!0,opacity:1}]},"topo-3d":{id:"topo-3d",is3d:!0,get thumbnailUrl(){return e("esri/images/basemap/topo-3d.png")},baseMapLayers:[{id:"topo-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/1e7d1784d1ef4b79ba6764d0bd6c3150/resources/styles/root.json",layerType:"VectorTileLayer",title:"Topographic",visibility:!0,opacity:1},{id:"topo-3d-trees",title:"Trees",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Trees_Thematic_v1/SceneServer",itemId:"f75fef56b2d944fe92ef9f7737b4f953",layerType:"ArcGISSceneServiceLayer"},{id:"topo-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"topo-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Esri3D_Buildings_v1/SceneServer",itemId:"b8fec5af7dfe4866b1b8ac2d2800f282",layerType:"ArcGISSceneServiceLayer"}]},"navigation-3d":{id:"navigation-3d",is3d:!0,get thumbnailUrl(){return e("esri/images/basemap/navigation-3d.jpg")},baseMapLayers:[{id:"navigation-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/ccc904ff872b4144b94934e55e32784b/resources/styles/root.json",layerType:"VectorTileLayer",title:"Navigation",visibility:!0,opacity:1},{id:"navigation-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"navigation-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Esri3D_Buildings_v1/SceneServer",itemId:"b8fec5af7dfe4866b1b8ac2d2800f282",layerType:"ArcGISSceneServiceLayer"}]},"streets-3d":{id:"streets-3d",is3d:!0,get thumbnailUrl(){return e("esri/images/basemap/streets-3d.png")},baseMapLayers:[{id:"streets-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/198298c4c64c4cb19de5b46aa00c198d/resources/styles/root.json",layerType:"VectorTileLayer",title:"Streets",visibility:!0,opacity:1},{id:"streets-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"streets-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Esri3D_Buildings_v1/SceneServer",itemId:"b8fec5af7dfe4866b1b8ac2d2800f282",layerType:"ArcGISSceneServiceLayer"}]},"osm-3d":{id:"osm-3d",is3d:!0,get thumbnailUrl(){return e("esri/images/basemap/osm-3d.png")},baseMapLayers:[{id:"osm-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/8628d259c9d14bdc848771c23c513940/resources/styles/root.json",layerType:"VectorTileLayer",title:"OpenStreetMap",visibility:!0,opacity:1},{id:"osm-3d-trees",title:"Trees",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Trees_Thematic_v1/SceneServer",itemId:"f75fef56b2d944fe92ef9f7737b4f953",layerType:"ArcGISSceneServiceLayer"},{id:"osm-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"osm-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Esri3D_Buildings_v1/SceneServer",itemId:"b8fec5af7dfe4866b1b8ac2d2800f282",layerType:"ArcGISSceneServiceLayer"}]},"gray-3d":{id:"gray-3d",is3d:!0,get thumbnailUrl(){return e("esri/images/basemap/gray-3d.png")},baseMapLayers:[{id:"gray-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/01a14b466345455ba4176d2e6390db92/resources/styles/root.json",layerType:"VectorTileLayer",title:"Streets",visibility:!0,opacity:1},{id:"gray-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"gray-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Esri3D_Buildings_v1/SceneServer",itemId:"b8fec5af7dfe4866b1b8ac2d2800f282",layerType:"ArcGISSceneServiceLayer"}]},"navigation-dark-3d":{id:"navigation-dark-3d",itemId:"5a1365328b4943f09a54cf5fd1205707",is3d:!0,baseMapLayers:[{id:"navigation-dark-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/451a1777ab3f4bf095fae24a117439d9/resources/styles/root.json",layerType:"VectorTileLayer",title:"Navigation Dark"},{id:"navigation-dark-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_LightLabels_v1/SceneServer/layers/0",itemId:"f364b70b012a4da5a4b5921e193eac4a",layerType:"ArcGISSceneServiceLayer"},{id:"navigation-dark-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Esri3D_Buildings_v1/SceneServer",itemId:"b8fec5af7dfe4866b1b8ac2d2800f282",layerType:"ArcGISSceneServiceLayer"}]},"streets-dark-3d":{id:"streets-dark-3d",itemId:"8a4efa2c20484ec9b4557895e65736ff",is3d:!0,baseMapLayers:[{id:"streets-dark-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/bc599b6d741a4ac084b7eea7bf8c5938/resources/styles/root.json",layerType:"VectorTileLayer",title:"OpenStreetMap Streets Night (for 3D)"},{id:"streets-dark-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_LightLabels_v1/SceneServer",itemId:"f364b70b012a4da5a4b5921e193eac4a",layerType:"ArcGISSceneServiceLayer"},{id:"streets-dark-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Esri3D_Buildings_v1/SceneServer",itemId:"b8fec5af7dfe4866b1b8ac2d2800f282",layerType:"ArcGISSceneServiceLayer"}]},"dark-gray-3d":{id:"dark-gray-3d",itemId:"a8b7322a5fe94002bb0f5e0eeb0c5c18",is3d:!0,baseMapLayers:[{id:"dark-gray-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/4178f71acb934fb89f169e7d667c20c6/resources/styles/root.json",layerType:"VectorTileLayer",title:"OpenStreetMap Dark Gray Canvas (for 3D)"},{id:"dark-gray-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_LightLabels_v1/SceneServer/layers/0",itemId:"f364b70b012a4da5a4b5921e193eac4a",layerType:"ArcGISSceneServiceLayer"},{id:"dark-gray-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/Esri3D_Buildings_v1/SceneServer",itemId:"b8fec5af7dfe4866b1b8ac2d2800f282",layerType:"ArcGISSceneServiceLayer"}]}};export{a as esriBasemapDefinitions,s as getBasemapTitle};
|
package/support/revision.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
const
|
|
5
|
+
const f="20250903",e="a7e2e2ac350a059fe0b6fdff3608d83fb8f9c611";export{f as buildDate,e as commitHash};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../../../core/Logger.js";class e{constructor(t,e,s,a){this.state={name:"created"},this.flowStyle=t,this.extent=e,this.size=s,this.pixelRatio=a}async load(){const t=new AbortController;this.state={name:"loading",abortController:t};const e={extent:this.extent,size:this.size,pixelRatio:this.pixelRatio},s=await this.flowStyle.load(e,t.signal);this.state={name:"loaded",resources:s}}attach(e){if("loaded"!==this.state.name)return void t.getLogger("esri.views.2d.engine.flow.FlowDisplayData").error("Only loaded resources can be attached.");const s=this.state.resources;s.attach(e),this.state={name:"attached",resources:s}}detach(){if("loading"===this.state.name)return this.state.abortController.abort(),void(this.state={name:"detached"});"attached"===this.state.name&&(this.state.resources.detach(),this.state={name:"detached"})}update(t){if(!this.flowStyle.isCompatible(t.flowStyle))return!1;return!(!this.extent.equals(t.extent)||this.size[0]!==t.size[0]||this.size[1]!==t.size[1]||this.pixelRatio!==t.pixelRatio)&&(this.flowStyle=t.flowStyle,!0)}}export{e as default};
|
|
5
|
+
import t from"../../../../core/Logger.js";class e{constructor(t,e,s,a,i){this.state={name:"created"},this.flowStyle=t,this.extent=e,this.size=s,this.pixelRatio=a,this.startTime=i}async load(){const t=new AbortController;this.state={name:"loading",abortController:t};const e={extent:this.extent,size:this.size,pixelRatio:this.pixelRatio,time:this.startTime},s=await this.flowStyle.load(e,t.signal);this.state={name:"loaded",resources:s}}attach(e){if("loaded"!==this.state.name)return void t.getLogger("esri.views.2d.engine.flow.FlowDisplayData").error("Only loaded resources can be attached.");const s=this.state.resources;s.attach(e),this.state={name:"attached",resources:s}}detach(){if("loading"===this.state.name)return this.state.abortController.abort(),void(this.state={name:"detached"});"attached"===this.state.name&&(this.state.resources.detach(),this.state={name:"detached"})}update(t){if(!this.flowStyle.isCompatible(t.flowStyle))return!1;return!(!this.extent.equals(t.extent)||this.size[0]!==t.size[0]||this.size[1]!==t.size[1]||this.pixelRatio!==t.pixelRatio)&&(this.flowStyle=t.flowStyle,!0)}}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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import o from"../../../../core/Accessor.js";import i from"../../../../core/Logger.js";import{deg2rad as e}from"../../../../core/mathUtils.js";import{isAbortError as a}from"../../../../core/promiseUtils.js";import{property as
|
|
5
|
+
import{__decorate as t}from"tslib";import o from"../../../../core/Accessor.js";import i from"../../../../core/Logger.js";import{deg2rad as e}from"../../../../core/mathUtils.js";import{isAbortError as a}from"../../../../core/promiseUtils.js";import{property as r}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import{subclass as l}from"../../../../core/accessorSupport/decorators/subclass.js";import s from"../../../../geometry/Extent.js";import n from"../../../../geometry/Point.js";import p from"./FlowDisplayData.js";import{FlowDisplayObject as c}from"./FlowDisplayObject.js";const m=1.15;let d=class extends o{constructor(t){super(t),this._flowDisplayObject=new c,this._loading=null}initialize(){this.flowContainer.addChild(this._flowDisplayObject)}destroy(){this._clear(),this.flowContainer.removeAllChildren()}get updating(){return null!=this._loading}update(t){const{flowStyle:o}=this.flowContainer;if(null==o)return void this._clear();const{extent:e,rotation:r,resolution:l,pixelRatio:s}=t.state,n=h(e,r);n.expand(m);const c=[Math.round((n.xmax-n.xmin)/l),Math.round((n.ymax-n.ymin)/l)],d=performance.now()/1e3,f=new p(o,n,c,s,d);if(null!=this._loading){if(this._loading.update(f))return;this._loading.detach(),this._loading=null}null!=this._flowDisplayObject.displayData&&this._flowDisplayObject.displayData.update(f)||(f.load().then(()=>{this._flowDisplayObject.clear(),this._flowDisplayObject.displayData=this._loading,this._loading=null},t=>{a(t)||(i.getLogger(this).error("A resource failed to load.",t),this._loading=null)}),this._loading=f)}_clear(){this._flowDisplayObject.clear(),null!=this._loading&&(this._loading.detach(),this._loading=null)}};function h(t,o){const i=new n({x:(t.xmax+t.xmin)/2,y:(t.ymax+t.ymin)/2,spatialReference:t.spatialReference}),a=t.xmax-t.xmin,r=t.ymax-t.ymin,l=Math.abs(Math.cos(e(o))),p=Math.abs(Math.sin(e(o))),c=l*a+p*r,m=p*a+l*r,d=new s({xmin:i.x-c/2,ymin:i.y-m/2,xmax:i.x+c/2,ymax:i.y+m/2,spatialReference:t.spatialReference});return d.centerAt(i),d}t([r()],d.prototype,"_loading",void 0),t([r()],d.prototype,"flowContainer",void 0),t([r()],d.prototype,"updating",null),d=t([l("esri.views.2d.engine.flow.FlowStrategy")],d);export{d 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.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import has from"../../../../core/has.js";import t from"../../../../core/Logger.js";import{deg2rad as e}from"../../../../core/mathUtils.js";import{throwIfAborted as n}from"../../../../core/promiseUtils.js";import r from"../../../../core/RandomLCG.js";import o from"../../../../geometry/Extent.js";import{getInfo as
|
|
5
|
+
import has from"../../../../core/has.js";import t from"../../../../core/Logger.js";import{deg2rad as e}from"../../../../core/mathUtils.js";import{throwIfAborted as n}from"../../../../core/promiseUtils.js";import r from"../../../../core/RandomLCG.js";import o from"../../../../geometry/Extent.js";import{getInfo as i}from"../../../../geometry/support/spatialReferenceUtils.js";const s=()=>t.getLogger("esri.views.2d.engine.flow.dataUtils"),l=10;async function a(t,e,r,o){const i=performance.now(),a=c(e,r),f=performance.now(),h=u(e,a,r.width,r.height),d=performance.now(),g=m(h,!0),y=performance.now(),x="Streamlines"===t?w(g,l):p(g),M=performance.now();return has("esri-2d-profiler")&&(s().info("I.1","_createFlowFieldFromData (ms)",Math.round(f-i)),s().info("I.2","_getStreamlines (ms)",Math.round(d-f)),s().info("I.3","createAnimatedLinesData (ms)",Math.round(y-d)),s().info("I.4","create{Streamlines|Particles}Mesh (ms)",Math.round(M-y)),s().info("I.5","createFlowMesh (ms)",Math.round(M-i)),s().info("I.6","Mesh size (bytes)",x.vertexData.buffer.byteLength+x.indexData.buffer.byteLength)),await Promise.resolve(),n(o),x}function c(t,e){const n=d(e.data,e.width,e.height,t.smoothing);if(t.interpolate){return(t,r)=>{const o=Math.floor(t),i=Math.floor(r);if(o<0||o>=e.width)return[0,0];if(i<0||i>=e.height)return[0,0];const s=t-o,l=r-i,a=o,c=i,f=o<e.width-1?o+1:o,h=i<e.height-1?i+1:i,u=n[2*(c*e.width+a)],d=n[2*(c*e.width+f)],m=n[2*(h*e.width+a)],w=n[2*(h*e.width+f)],p=n[2*(c*e.width+a)+1],g=n[2*(c*e.width+f)+1];return[(u*(1-l)+m*l)*(1-s)+(d*(1-l)+w*l)*s,(p*(1-l)+n[2*(h*e.width+a)+1]*l)*(1-s)+(g*(1-l)+n[2*(h*e.width+f)+1]*l)*s]}}return(t,r)=>{const o=Math.round(t),i=Math.round(r);return o<0||o>=e.width||i<0||i>=e.height?[0,0]:[n[2*(i*e.width+o)],n[2*(i*e.width+o)+1]]}}function f(t,e,n,r,o,i,s){const l=[],{raster:a,width:c,height:f,resolutionFactor:h}=s;let u=r,d=o,m=0,[w,p]=n(u,d);w*=e.velocityScale,p*=e.velocityScale;const g=Math.sqrt(w*w+p*p);let y,x;l.push({x:u,y:d,t:m,speed:g});for(let M=0;M<e.verticesPerLine;M++){let[r,o]=n(u,d);r*=e.velocityScale,o*=e.velocityScale;const s=Math.sqrt(r*r+o*o);if(s<e.minSpeedThreshold)return l;const w=t*r/s,p=t*o/s;u+=w*e.segmentLength,d+=p*e.segmentLength;if(m+=t*e.segmentLength/s,Math.acos(w*y+p*x)>e.maxTurnAngle)return l;if(e.collisions){const t=Math.round(u*h),e=Math.round(d*h);if(t<0||t>c-1||e<0||e>f-1)return l;const n=a[e*c+t];if(-1!==n&&n!==i)return l;a[e*c+t]=i}l.push({x:u,y:d,t:m,speed:s}),y=w,x=p}return l}function h(t,e,n,r,o,i,s){const l=Math.round((.2+.8*i.getFloat())*t.verticesPerLine),a=t.verticesPerLine-l,c=f(-1,{...t,verticesPerLine:a},e,n,r,o,s),h=f(1,{...t,verticesPerLine:l},e,n,r,o,s),u=c.reverse();u.splice(-1,1);return u.concat(h)}function u(t,e,n,o,i={positions:[]}){const{positions:s}=i,l=[],a=new r,c=1/Math.max(t.lineCollisionWidth,1),u=Math.round(n*c),d=Math.round(o*c),m=new Int32Array(u*d);for(let r=0;r<m.length;r++)m[r]=-1;const w={raster:m,width:u,height:d,resolutionFactor:c},p={},g=t.lineSpacing/Math.sqrt(t.density),y=Math.floor(o/g),x=Math.floor(n/g);for(let r=0;r<y;r++){const t=r*g;for(let e=0;e<x;e++){const n=e*g;p[`${e}-${r}`]={x:n,y:t,positions:[]}}}for(const{x:r,y:f}of s){const t=p[`${Math.floor(r/g)}-${Math.floor(f/g)}`];t&&t.positions.push([r,f])}const M=[];for(const r in p){const t=p[r];if(0===t.positions.length)M.push({x:t.x,y:t.y,sort:.66+.33*a.getFloat(),stage:0});else{const[e]=t.positions.splice(0,1);M.push({x:e[0],y:e[1],sort:.33*a.getFloat(),stage:1});for(const[n,r]of t.positions)M.push({x:n,y:r,sort:.33+.33*a.getFloat(),stage:2})}}M.sort((t,e)=>t.sort-e.sort);for(const{x:r,y:v,stage:F}of M){const n=t.onlyForwardTracing?f(1,t,e,r,v,l.length,w):h(t,e,r,v,l.length,a,w);n.length<2||l.push({stage:F,vertices:n})}return l}function d(t,e,n,r){if(0===r)return t;const o=Math.round(3*r),i=new Array(2*o+1);let s=0;for(let c=-o;c<=o;c++){const t=Math.exp(-c*c/(r*r));i[c+o]=t,s+=t}for(let c=-o;c<=o;c++)i[c+o]/=s;const l=new Float32Array(t.length);for(let c=0;c<n;c++)for(let n=0;n<e;n++){let r=0,s=0;for(let l=-o;l<=o;l++){if(n+l<0||n+l>=e)continue;const a=i[l+o];r+=a*t[2*(c*e+(n+l))],s+=a*t[2*(c*e+(n+l))+1]}l[2*(c*e+n)]=r,l[2*(c*e+n)+1]=s}const a=new Float32Array(t.length);for(let c=0;c<e;c++)for(let t=0;t<n;t++){let r=0,s=0;for(let a=-o;a<=o;a++){if(t+a<0||t+a>=n)continue;const f=i[a+o];r+=f*l[2*((t+a)*e+c)],s+=f*l[2*((t+a)*e+c)+1]}a[2*(t*e+c)]=r,a[2*(t*e+c)+1]=s}return a}function m(t,e){const n=new r,o=t.reduce((t,e)=>t+e.vertices.length,0),i=new Float32Array(4*o),s=new Array(t.length);let l=0,a=0;for(const{vertices:r}of t){const t=l;for(const e of r)i[4*l]=e.x,i[4*l+1]=e.y,i[4*l+2]=e.t,i[4*l+3]=e.speed,l++;s[a++]={startVertex:t,numberOfVertices:r.length,totalTime:r[r.length-1].t,timeSeed:e?n.getFloat():0}}return{lineVertices:i,lineDescriptors:s}}function w(t,e){const n=9,{lineVertices:r,lineDescriptors:o}=t;let i=0,s=0;for(const d of o){i+=2*d.numberOfVertices;s+=6*(d.numberOfVertices-1)}const l=new Float32Array(i*n),a=new Uint32Array(s);let c=0,f=0;function h(){a[f++]=c-2,a[f++]=c,a[f++]=c-1,a[f++]=c,a[f++]=c+1,a[f++]=c-1}function u(t,e,r,o,i,s,a,f){const h=c*n;let u=0;l[h+u++]=t,l[h+u++]=e,l[h+u++]=1,l[h+u++]=r,l[h+u++]=s,l[h+u++]=a,l[h+u++]=o/2,l[h+u++]=i/2,l[h+u++]=f,c++,l[h+u++]=t,l[h+u++]=e,l[h+u++]=-1,l[h+u++]=r,l[h+u++]=s,l[h+u++]=a,l[h+u++]=-o/2,l[h+u++]=-i/2,l[h+u++]=f,c++}for(const d of o){const{totalTime:t,timeSeed:n}=d;let o=null,i=null,s=null,l=null,a=null,c=null;for(let f=0;f<d.numberOfVertices;f++){const m=r[4*(d.startVertex+f)],w=r[4*(d.startVertex+f)+1],p=r[4*(d.startVertex+f)+2],g=r[4*(d.startVertex+f)+3];let y=null,x=null,M=null,v=null;if(f>0){y=m-o,x=w-i;const r=Math.sqrt(y*y+x*x);if(y/=r,x/=r,f>1){let t=y+a,n=x+c;const r=Math.sqrt(t*t+n*n);t/=r,n/=r;const o=Math.min(1/(t*y+n*x),e);t*=o,n*=o,M=-n,v=t}else M=-x,v=y;null!==M&&null!==v&&(u(o,i,s,M,v,t,n,g),h())}o=m,i=w,s=p,a=y,c=x,l=g}u(o,i,s,-c,a,t,n,l)}return{vertexData:l,indexData:a}}function p(t){const e=16,n=1,r=2,{lineVertices:o,lineDescriptors:i}=t;let s=0,l=0;for(const S of i){const t=S.numberOfVertices-1;s+=4*t*2,l+=6*t*2}const a=new Float32Array(s*e),c=new Uint32Array(l);let f,h,u,d,m,w,p,g,y,x,M,v,F,A,I=0,V=0;function L(){c[V++]=I-8,c[V++]=I-7,c[V++]=I-6,c[V++]=I-7,c[V++]=I-5,c[V++]=I-6,c[V++]=I-4,c[V++]=I-3,c[V++]=I-2,c[V++]=I-3,c[V++]=I-1,c[V++]=I-2}function D(t,o,i,s,l,c,f,h,u,d,m,w,p,g){const y=I*e;let x=0;for(const e of[n,r])for(const n of[1,2,3,4])a[y+x++]=t,a[y+x++]=o,a[y+x++]=i,a[y+x++]=s,a[y+x++]=f,a[y+x++]=h,a[y+x++]=u,a[y+x++]=d,a[y+x++]=e,a[y+x++]=n,a[y+x++]=p,a[y+x++]=g,a[y+x++]=l/2,a[y+x++]=c/2,a[y+x++]=m/2,a[y+x++]=w/2,I++}function b(t,e){let n=y+M,r=x+v;const o=Math.sqrt(n*n+r*r);n/=o,r/=o;const i=y*n+x*r;n/=i,r/=i;let s=M+F,l=v+A;const a=Math.sqrt(s*s+l*l);s/=a,l/=a;const c=M*s+v*l;s/=c,l/=c,D(f,h,u,d,-r,n,m,w,p,g,-l,s,t,e),L()}function P(t,e,n,r,o,i){if(y=M,x=v,M=F,v=A,null==y&&null==x&&(y=M,x=v),null!=m&&null!=w){F=t-m,A=e-w;const n=Math.sqrt(F*F+A*A);F/=n,A/=n}null!=y&&null!=x&&b(o,i),f=m,h=w,u=p,d=g,m=t,w=e,p=n,g=r}function k(t,e){y=M,x=v,M=F,v=A,null==y&&null==x&&(y=M,x=v),null!=y&&null!=x&&b(t,e)}for(const S of i){f=null,h=null,u=null,d=null,m=null,w=null,p=null,g=null,y=null,x=null,M=null,v=null,F=null,A=null;const{totalTime:t,timeSeed:e}=S;for(let n=0;n<S.numberOfVertices;n++){P(o[4*(S.startVertex+n)],o[4*(S.startVertex+n)+1],o[4*(S.startVertex+n)+2],o[4*(S.startVertex+n)+3],t,e)}k(t,e)}return{vertexData:a,indexData:c}}function g(t,n){const r=n.pixels,{width:o,height:i}=n,s=new Float32Array(o*i*2),l=n.mask??new Uint8Array(o*i*2);if(n.mask||l.fill(255),"vector-uv"===t)for(let e=0;e<o*i;e++)s[2*e]=r[0][e],s[2*e+1]=-r[1][e];else if("vector-magdir"===t)for(let a=0;a<o*i;a++){const t=r[0][a],n=e(r[1][a]),o=Math.cos(n-Math.PI/2),i=Math.sin(n-Math.PI/2);s[2*a]=o*t,s[2*a+1]=i*t}return{data:s,mask:l,width:o,height:i}}async function y(t,e,n,r,l,a){const c=performance.now(),f=i(e.spatialReference);if(!f){const o=await x(t,e,n,r,l,a);return has("esri-2d-profiler")&&s().info("I.7","loadImagery, early exit (ms)",Math.round(performance.now()-c)),has("esri-2d-profiler")&&s().info("I.9","Number of parts",1),o}const[h,u]=f.valid,d=u-h,m=Math.ceil(e.width/d),w=e.width/m,p=Math.round(n/m);let g=e.xmin;const y=[],M=performance.now();for(let i=0;i<m;i++){const n=new o({xmin:g,xmax:g+w,ymin:e.ymin,ymax:e.ymax,spatialReference:e.spatialReference});y.push(x(t,n,p,r,l,a)),g+=w}const v=await Promise.all(y);has("esri-2d-profiler")&&s().info("I.8","All calls to _fetchPart (ms)",Math.round(performance.now()-M)),has("esri-2d-profiler")&&s().info("I.9","Number of parts",v.length);const F={data:new Float32Array(n*r*2),mask:new Uint8Array(n*r),width:n,height:r};let A=0;for(const o of v){for(let t=0;t<o.height;t++)for(let e=0;e<o.width;e++)A+e>=n||(F.data[2*(t*n+A+e)]=o.data[2*(t*o.width+e)],F.data[2*(t*n+A+e)+1]=o.data[2*(t*o.width+e)+1],F.mask[t*n+A+e]=o.mask[t*o.width+e]);A+=o.width}return has("esri-2d-profiler")&&s().info("I.10","loadImagery, general exit (ms)",Math.round(performance.now()-c)),F}async function x(t,e,n,r,o,i){const s={requestProjectedLocalDirections:!0,signal:i};if(null!=o&&(s.timeExtent=o),"imagery"===t.type){await t.load({signal:i});const o=await t.internalFetchImage(e,n,r,s);if(null==o?.pixelData?.pixelBlock)return{data:new Float32Array(n*r*2),mask:new Uint8Array(n*r),width:n,height:r};return g(t.rasterInfo.dataType,o.pixelData.pixelBlock)}await t.load({signal:i});const l=await t.fetchPixels(e,n,r,s);if(null==l?.pixelBlock)return{data:new Float32Array(n*r*2),mask:new Uint8Array(n*r),width:n,height:r};return g(t.serviceRasterInfo.dataType,l.pixelBlock)}export{m as createAnimatedLinesData,c as createFlowFieldFromData,a as createFlowMesh,p as createParticlesMesh,w as createStreamlinesMesh,y as loadImagery,g as toFlowData,u as traceFlowPaths};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{pt2px as e}from"../../../../core/screenUtils.js";function
|
|
5
|
+
import{pt2px as e}from"../../../../core/screenUtils.js";function t(t){const i=n(s(t)),o=i,a=!0,r=Math.max(i/2,5),l=Math.round(e(t.maxPathLength)/r)+1,u=10,{density:c}=t;return{smoothing:e(t.smoothing),interpolate:!0,velocityScale:"flow-from"===t.flowRepresentation?1:-1,verticesPerLine:l,minSpeedThreshold:.001,segmentLength:r,maxTurnAngle:1,collisions:a,lineCollisionWidth:o,lineSpacing:u,density:c,onlyForwardTracing:!0}}function n(e){return"constant"===e.kind?e.value[0]:e.values[e.values.length-1]}function i(e){const t=e.toRgba();return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function o(e){return{kind:"constant",value:[.1,.1,.1,1]}}function s(t){if(!t.hasVisualVariables("size"))return{kind:"constant",value:[e(t.trailWidth)]};const n=t.getVisualVariablesForType("size")[0],i=[],o=[];let s;if(n.stops){for(const t of n.stops)i.push(t.value),o.push(e(t.size));s=n.stops.length}else i.push(n.minDataValue,n.maxDataValue),o.push(e(n.minSize),e(n.maxSize)),s=2;return{kind:"ramp",stops:i,values:o,count:s}}function a(e){if(!e.hasVisualVariables("color"))return{kind:"constant",value:i(e.color)};const t=e.getVisualVariablesForType("color")[0],n=[],o=[];for(const s of t.stops)n.push(s.value),Array.prototype.push.apply(o,i(s.color));return{kind:"ramp",stops:n,values:o,count:t.stops.length}}function r(e){if(!e.hasVisualVariables("opacity"))return{kind:"constant",value:[1]};const t=e.getVisualVariablesForType("opacity")[0],n=[],i=[];for(const o of t.stops)n.push(o.value),i.push(o.opacity);return{kind:"ramp",stops:n,values:i,count:t.stops.length}}function l(e,t,n,i){switch(t){case"int":e.setUniform1iv(n,i);break;case"float":e.setUniform1fv(n,i);break;case"vec2":e.setUniform2fv(n,i);break;case"vec3":e.setUniform3fv(n,i);break;case"vec4":e.setUniform4fv(n,i)}}function u(e,t,n,i){"constant"===i.kind?l(e,n,`u_${t}`,i.value):(l(e,"float",`u_${t}_stops`,i.stops),l(e,n,`u_${t}_values`,i.values),e.setUniform1i(`u_${t}_count`,i.count))}function c(e,t){let n=!0;return n=n&&e.collisions===t.collisions,n=n&&e.density===t.density,n=n&&e.interpolate===t.interpolate,n=n&&e.lineCollisionWidth===t.lineCollisionWidth,n=n&&e.lineSpacing===t.lineSpacing,n=n&&e.maxTurnAngle===t.maxTurnAngle,n=n&&e.minSpeedThreshold===t.minSpeedThreshold,n=n&&e.segmentLength===t.segmentLength,n=n&&e.smoothing===t.smoothing,n=n&&e.velocityScale===t.velocityScale,n=n&&e.verticesPerLine===t.verticesPerLine,n}function m(e,t){return e===t||null!=e&&null!=t&&e.equals(t)}function p(e,t){if(!c(e.simulationSettings,t.simulationSettings))return!1;if(!m(e.timeExtent,t.timeExtent))return!1;let n=!0;return n=n&&e.loadImagery===t.loadImagery,n=n&&e.createFlowMesh===t.createFlowMesh,n=n&&e.color.kind===t.color.kind,n=n&&e.opacity.kind===t.opacity.kind,n=n&&e.size.kind===t.size.kind,n}function f(e,t,n,i){return e/=n.size[0],t=1-(t/=n.size[1]),e*=n.extent.xmax-n.extent.xmin,t*=n.extent.ymax-n.extent.ymin,e+=n.extent.xmin,t+=n.extent.ymin,e-=i.extent.xmin,t-=i.extent.ymin,e/=i.extent.xmax-i.extent.xmin,t=1-(t/=i.extent.ymax-i.extent.ymin),{x:e*=i.size[0],y:t*=i.size[1]}}function h(e,t,n,i){const o=[],s=n.time-t.time;for(const{stage:a,vertices:r}of e){if(2===a)continue;const e=r[0].t,l=(s*i-e)%(r[r.length-1].t-e)+e;let u,c=r[0].x,m=r[0].y,p=r[0].t;for(u=1;u<r.length&&p<l;u++){const e=Math.min(r[u].t,l)-p,t=r[u].t-p;c+=(r[u].x-c)*(e/t),m+=(r[u].y-m)*(e/t),p+=e}o.push(f(c,m,t,n))}return o}export{p as areStreamlinesCompatible,f as changeQuery,a as getColor,t as getFlowSimulationSettings,o as getForegroundColor,n as getMax,r as getOpacity,h as getPositions,s as getSize,l as setUniform,u as setUniforms,c as simulationSettingsEqual,m as timeExtentsEqual,i as toRgba};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../../../../Graphic.js";import{getContrast as i}from"../../../../core/colorUtils.js";import{destroyMaybe as s}from"../../../../core/maybe.js";import{watch as o}from"../../../../core/reactiveUtils.js";import{getMetersPerUnitForSR as r}from"../../../../core/unitUtils.js";import{property as a}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as n}from"../../../../core/accessorSupport/decorators/subclass.js";import{subtract as h,normalize as c}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as l,UNIT_X as p}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{g as d,l as _,n as m,f as u,m as y,d as g}from"../../../../chunks/vec32.js";import{create as f}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import v from"../../../../geometry/Point.js";import G from"../../../../geometry/Polygon.js";import{project as w,initializeProjection as R}from"../../../../geometry/projectionUtils.js";import{c as b,a as C}from"../../../../chunks/boundedPlane.js";import{equals as j}from"../../../../geometry/support/spatialReferenceUtils.js";import k from"../../../../layers/GraphicsLayer.js";import T from"../../../../symbols/SimpleFillSymbol.js";import S from"../../../../symbols/SimpleMarkerSymbol.js";import{DragManipulation as A}from"./manipulations/DragManipulation.js";import{RotateManipulation as P}from"./manipulations/RotateManipulation.js";import{ScaleManipulation as M}from"./manipulations/ScaleManipulation.js";import{PreserveAspectRatio as x,SnapRotation as O}from"./manipulations/utils.js";import{InteractiveToolBase as D}from"../../../interactive/InteractiveToolBase.js";import{KeyBindings as U,mediaKeys as L}from"../../../interactive/keybindings.js";import{EditGeometry as B}from"../../../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as E}from"../../../interactive/editGeometry/EditGeometryOperations.js";import{calculateOrientedBounds as H}from"../../../interactive/editGeometry/support/editPlaneUtils.js";import{findFirstGraphicHit as I}from"../../../support/hitTestSelectUtils.js";import{createScreenPointFromEvent as z}from"../../../support/screenUtils.js";const V=80,q=10,F=30,N=[[1,1],[1,-1],[-1,-1],[-1,1],[1,0],[0,-1],[-1,0],[0,1]],J=1,K=10;let Q=class extends D{constructor(e){super(e),this._initialControlPoints=null,this._initialGeometry=null,this._graphic=null,this._planeCache=b(),this._displayPlaneCache=b(),this._mainAxisCache=l(),this._rotationHandleCache=f(),this._cornerA=f(),this._cornerB=f(),this._cornerC=f(),this._cornerD=f(),this._avgAB=f(),this._avgBC=f(),this._avgCD=f(),this._avgDA=f(),this._preserveAspectRatio=new x,this._snapRotation=new O,this._graphicsLayer=new k({internal:!0,listMode:"hide",visible:!1,title:"TransformTool layer"}),this._sharedUndoStack=[],this._sharedRedoStack=[],this._isOpacityToggled=!1,this._factor=J,this.preserveAspectRatio=null,this.snapRotation=null,this.type="transform"}initialize(){this._initialize()}destroy(){const{map:e}=this.view;this._dragManipulation.destroy(),this._rotateManipulation.destroy(),this._scaleManipulations.forEach(e=>e.destroy()),this._editGeometryOperations.destroy(),e.removeMany([this._graphicsLayer]),this._graphicsLayer.removeAll(),this._graphicsLayer=s(this._graphicsLayer),this._initialControlPoints=null,this._initialGeometry=null,this._graphic=null,this._preserveAspectRatio=null,this._snapRotation=null,this._planeCache=null,this._displayPlaneCache=null,this._rotationHandleCache=null,this._mainAxisCache=null,this._cornerA=null,this._cornerB=null,this._cornerC=null,this._cornerD=null,this._avgAB=null,this._avgBC=null,this._avgCD=null,this._avgDA=null,this._sharedUndoStack=null,this._sharedRedoStack=null}get _plane(){const e=this._graphic.geometry;if(null==e)return null;const t=this._editGeometryOperations.data,i=t.parts[0].segments[0],s=h(this._mainAxisCache,i.leftVertex.pos,i.rightVertex.pos);c(s,s);let o=V*this.view.resolution;const a=this.view.spatialReference;return j(a,e.spatialReference)&&(o*=r(a)/r(e.spatialReference)),H(s,t,o,this._planeCache)}get _displayPlane(){const e=this._plane;if(!e)return null;const t=this._displayPlaneCache;C(e,t);const i=q*this.view.resolution;return d(t.basis1,t.basis1,1+i/_(t.basis1)),d(t.basis2,t.basis2,1+i/_(t.basis2)),t}get _backgroundGraphicGeometry(){const e=this._displayPlane;if(!e)return null;const t=this.view.spatialReference;return this._updateDisplayPlaneConrers(e),new G({spatialReference:t,rings:[[this._cornerA,this._cornerB,this._cornerC,this._cornerD,this._cornerA]]})}get _rotateGraphicGeometry(){const e=this._plane;if(!e)return null;const t=this._rotationHandleCache;return m(t,e.basis1),d(t,t,F*this.view.resolution),u(t,t,e.origin),u(t,t,e.basis1),new v({x:t[0],y:t[1],spatialReference:this.view.spatialReference})}get _scaleGraphicGeometries(){const e=this._displayPlane;if(!e)return[];const t=this.view.spatialReference;this._updateDisplayPlaneConrers(e);const{_cornerA:i,_cornerB:s,_cornerC:o,_cornerD:r}=this,a=y(this._avgAB,i,s,.5),n=y(this._avgBC,s,o,.5),h=y(this._avgCD,o,r,.5),c=y(this._avgDA,r,i,.5);return[new v({x:i[0],y:i[1],spatialReference:t}),new v({x:s[0],y:s[1],spatialReference:t}),new v({x:o[0],y:o[1],spatialReference:t}),new v({x:r[0],y:r[1],spatialReference:t}),new v({x:a[0],y:a[1],spatialReference:t}),new v({x:n[0],y:n[1],spatialReference:t}),new v({x:h[0],y:h[1],spatialReference:t}),new v({x:c[0],y:c[1],spatialReference:t})]}onActivate(){this.visible=!0}onDeactivate(){this.visible=!1}onShow(){this._graphicsLayer.visible=!0}onHide(){this._graphicsLayer.visible=!1}canUndo(){return this._editGeometryOperations.canUndo}canRedo(){return this._editGeometryOperations.canRedo}undo(){this._editGeometryOperations.undo(),this.updateGraphics()}redo(){this._editGeometryOperations.redo(),this.updateGraphics()}refresh(){const{view:e,target:t}=this,i="georeference"in t?t.georeference.coords:t.geometry,s=this._editGeometryOperations,o=s.data.parts[0].vertices,r=B.fromGeometry(w(i,e.spatialReference),2).parts[0].vertices;o.forEach((e,t)=>{s.setVertexPosition(e,r[t].pos)}),this.updateGraphics()}reset(){const{target:e}=this;if("georeference"in e){const t=e.georeference;"control-points"===t.type&&(t.controlPoints=this._initialControlPoints)}else e.geometry=this._initialGeometry;this.refresh(),this._sharedUndoStack.length=0,this._sharedRedoStack.length=0}updateGraphics(){const e=this._editGeometryOperations.data.geometry;if("georeference"in this.target){this.target.georeference.coords=e}this._graphic.geometry=e,this._backgroundGraphic.geometry=this._backgroundGraphicGeometry,this._rotateGraphic.geometry=this._rotateGraphicGeometry,this._scaleGraphicGeometries.forEach((e,t)=>{this._scaleGraphics[t].geometry=e})}setSharedUndoStack(e){this._sharedUndoStack=e}setSharedRedoStack(e){this._sharedRedoStack=e}async _initialize(){const{view:e,target:s}=this;if("georeference"in s){const e=s.georeference;this._graphic=new t({geometry:e.coords}),this._initialControlPoints="control-points"===e.type?e.controlPoints:null}else this._graphic=s,this._initialGeometry=s.geometry;e.map.addMany([this._graphicsLayer]),e.focus(),this.visible=!1,this.finishToolCreation(),await this._loadProjectionEngine(),this._editGeometryOperations=E.fromGeometry(w(this._graphic.geometry,e.spatialReference),2),this._backgroundGraphic=new t({symbol:new T({color:"transparent",outline:{type:"simple-line",color:e.effectiveTheme.accentColor,width:2}}),geometry:this._backgroundGraphicGeometry}),this._rotateGraphic=new t({symbol:new S({color:i(e.effectiveTheme.accentColor),outline:{type:"simple-line",color:e.effectiveTheme.accentColor,width:1}}),geometry:this._rotateGraphicGeometry}),this._scaleGraphics=this._scaleGraphicGeometries.map(s=>new t({symbol:new S({size:6,style:"square",color:i(e.effectiveTheme.accentColor),outline:{type:"simple-line",color:e.effectiveTheme.accentColor,width:1}}),geometry:s})),this._graphicsLayer.graphics.addMany([this._backgroundGraphic,this._rotateGraphic,...this._scaleGraphics]),this._dragManipulation=new A({tool:this,view:e,graphic:this._graphic}),this._rotateManipulation=new P({tool:this,view:e,graphic:this._rotateGraphic,snapRotation:this._snapRotation}),this._scaleManipulations=this._scaleGraphics.map((t,i)=>new M({tool:this,view:e,graphic:t,direction:N[i],preserveAspectRatio:this._preserveAspectRatio})),this.addHandles([this._dragManipulation.createDragPipeline(this._getInfo.bind(this),this._updateGraphics.bind(this)),this._rotateManipulation.createDragPipeline(this._getInfo.bind(this),this._updateGraphics.bind(this)),...this._scaleManipulations.map(e=>e.createDragPipeline(this._getInfo.bind(this),this._updateGraphics.bind(this))),o(()=>this.view.scale,()=>this.active?this.updateGraphics():null),e.on("click",async t=>{if(null!=e.activeTool&&e.activeTool!==this)return;const i=z(t),o=[];e.map.allLayers.forEach(e=>{"vector-tile"!==e.type&&"imagery"!==e.type||o.push(e)});const r=await this.view.hitTest(i,{exclude:o}),a=r.results;if(0===a.length)e.activeTool=null;else{const t=I(r.results),i="georeference"in s,o=a.map(e=>"media"===e.type?e.element:null).filter(Boolean),n=new Set([...this._graphicsLayer.graphics,i?null:s].filter(Boolean));i&&o.includes(s)||null!=t&&n.has(t.graphic)?null==e.activeTool&&(e.activeTool=this):e.activeTool=null}})]);const r=e=>{this.addHandles(e.events.on("grab-changed",e=>{"georeference"in s&&("start"===e.action?s.opacity*=.5:"end"===e.action&&(s.opacity*=2))}))};this._dragManipulation.forEachManipulator(r),this._rotateManipulation.forEachManipulator(r),this._scaleManipulations.forEach(e=>e.forEachManipulator(r));const a=new U;a.addToggle(L.preserveAspectRatio,()=>{null==this.preserveAspectRatio&&(this._preserveAspectRatio.enabled=!this._preserveAspectRatio.enabled)}),a.addToggle(L.rotateIncrements,()=>{null==this.snapRotation&&(this._snapRotation.enabled=!this._snapRotation.enabled)}),a.add(L.toggleOpacity,()=>{"georeference"in s&&(s.opacity*=this._isOpacityToggled?2:.5,this._isOpacityToggled=!this._isOpacityToggled)}),a.addToggle(L.factorModifier,e=>this._factor="key-down"===e.type?K:J),a.add(L.scaleUp,()=>this._scale(this._factor)),a.add(L.scaleDown,()=>this._scale(-this._factor)),a.add(L.moveUp,()=>this._move(0,this._factor)),a.add(L.moveDown,()=>this._move(0,-this._factor)),a.add(L.moveLeft,()=>this._move(-this._factor,0)),a.add(L.moveRight,()=>this._move(this._factor,0)),this.addHandles([e.on("key-down",t=>{e.activeTool===this&&a.dispatch(e.inputManager,t)}),e.on("key-up",t=>{e.activeTool===this&&a.dispatch(e.inputManager,t)})])}async _loadProjectionEngine(){const e=this._graphic.geometry;return R(e.spatialReference,this.view.spatialReference)}_updateDisplayPlaneConrers(e){const{basis1:t,basis2:i,origin:s}=e,o=this._cornerA;u(o,s,t),u(o,o,i);const r=this._cornerB;u(r,s,t),g(r,r,i);const a=this._cornerC;g(a,s,t),g(a,a,i);const n=this._cornerD;g(n,s,t),u(n,n,i)}_getInfo(){return{editGeometryOperations:this._editGeometryOperations,plane:this._plane,displayPlane:this._displayPlane}}_updateGraphics(e,t){"start"===e.action&&(this._sharedUndoStack.push({tool:this,operation:t}),this._sharedRedoStack.length=0),this.updateGraphics()}_scale(e){const t=this._editGeometryOperations,i=t.data.geometry.extent?.width,s=(i+e*this.view.resolution)/i,o=t.scale(this._plane.origin,p,s,s,0,1);this._sharedUndoStack.push({tool:this,operation:o}),this._sharedRedoStack.length=0,this.updateGraphics()}_move(e,t){const i=this._editGeometryOperations.move(e*this.view.resolution,t*this.view.resolution,0,0);this._sharedUndoStack.push({tool:this,operation:i}),this._sharedRedoStack.length=0,this.updateGraphics()}};e([a()],Q.prototype,"_plane",null),e([a()],Q.prototype,"_backgroundGraphicGeometry",null),e([a()],Q.prototype,"_rotateGraphicGeometry",null),e([a()],Q.prototype,"_scaleGraphicGeometries",null),e([a()],Q.prototype,"preserveAspectRatio",void 0),e([a()],Q.prototype,"snapRotation",void 0),e([a({constructOnly:!0,nonNullable:!0})],Q.prototype,"target",void 0),e([a({readOnly:!0})],Q.prototype,"type",void 0),e([a({constructOnly:!0})],Q.prototype,"view",void 0),Q=e([n("esri.views.2d.interactive.editingTools.TransformTool")],Q);export{Q as TransformTool};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../../../Graphic.js";import{getContrast as i}from"../../../../core/colorUtils.js";import{destroyMaybe as s}from"../../../../core/maybe.js";import{watch as o}from"../../../../core/reactiveUtils.js";import{getMetersPerUnitForSR as r}from"../../../../core/unitUtils.js";import{property as a}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as n}from"../../../../core/accessorSupport/decorators/subclass.js";import{subtract as h,normalize as c}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as l,UNIT_X as p}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{g as d,l as _,n as m,f as u,m as y,d as g}from"../../../../chunks/vec32.js";import{create as f}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import v from"../../../../geometry/Point.js";import G from"../../../../geometry/Polygon.js";import{project as w,initializeProjection as R}from"../../../../geometry/projectionUtils.js";import{a as b,d as C}from"../../../../chunks/boundedPlane.js";import{equals as j}from"../../../../geometry/support/spatialReferenceUtils.js";import k from"../../../../layers/GraphicsLayer.js";import T from"../../../../symbols/SimpleFillSymbol.js";import S from"../../../../symbols/SimpleMarkerSymbol.js";import{DragManipulation as A}from"./manipulations/DragManipulation.js";import{RotateManipulation as P}from"./manipulations/RotateManipulation.js";import{ScaleManipulation as M}from"./manipulations/ScaleManipulation.js";import{PreserveAspectRatio as x,SnapRotation as O}from"./manipulations/utils.js";import{InteractiveToolBase as D}from"../../../interactive/InteractiveToolBase.js";import{KeyBindings as U,mediaKeys as L}from"../../../interactive/keybindings.js";import{EditGeometry as B}from"../../../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as E}from"../../../interactive/editGeometry/EditGeometryOperations.js";import{calculateOrientedBounds as H}from"../../../interactive/editGeometry/support/editPlaneUtils.js";import{findFirstGraphicHit as I}from"../../../support/hitTestSelectUtils.js";import{createScreenPointFromEvent as z}from"../../../support/screenUtils.js";const V=80,q=10,F=30,N=[[1,1],[1,-1],[-1,-1],[-1,1],[1,0],[0,-1],[-1,0],[0,1]],J=1,K=10;let Q=class extends D{constructor(e){super(e),this._initialControlPoints=null,this._initialGeometry=null,this._graphic=null,this._planeCache=b(),this._displayPlaneCache=b(),this._mainAxisCache=l(),this._rotationHandleCache=f(),this._cornerA=f(),this._cornerB=f(),this._cornerC=f(),this._cornerD=f(),this._avgAB=f(),this._avgBC=f(),this._avgCD=f(),this._avgDA=f(),this._preserveAspectRatio=new x,this._snapRotation=new O,this._graphicsLayer=new k({internal:!0,listMode:"hide",visible:!1,title:"TransformTool layer"}),this._sharedUndoStack=[],this._sharedRedoStack=[],this._isOpacityToggled=!1,this._factor=J,this.preserveAspectRatio=null,this.snapRotation=null,this.type="transform"}initialize(){this._initialize()}destroy(){const{map:e}=this.view;this._dragManipulation.destroy(),this._rotateManipulation.destroy(),this._scaleManipulations.forEach(e=>e.destroy()),this._editGeometryOperations.destroy(),e.removeMany([this._graphicsLayer]),this._graphicsLayer.removeAll(),this._graphicsLayer=s(this._graphicsLayer),this._initialControlPoints=null,this._initialGeometry=null,this._graphic=null,this._preserveAspectRatio=null,this._snapRotation=null,this._planeCache=null,this._displayPlaneCache=null,this._rotationHandleCache=null,this._mainAxisCache=null,this._cornerA=null,this._cornerB=null,this._cornerC=null,this._cornerD=null,this._avgAB=null,this._avgBC=null,this._avgCD=null,this._avgDA=null,this._sharedUndoStack=null,this._sharedRedoStack=null}get _plane(){const e=this._graphic.geometry;if(null==e)return null;const t=this._editGeometryOperations.data,i=t.parts[0].segments[0],s=h(this._mainAxisCache,i.leftVertex.pos,i.rightVertex.pos);c(s,s);let o=V*this.view.resolution;const a=this.view.spatialReference;return j(a,e.spatialReference)&&(o*=r(a)/r(e.spatialReference)),H(s,t,o,this._planeCache)}get _displayPlane(){const e=this._plane;if(!e)return null;const t=this._displayPlaneCache;C(e,t);const i=q*this.view.resolution;return d(t.basis1,t.basis1,1+i/_(t.basis1)),d(t.basis2,t.basis2,1+i/_(t.basis2)),t}get _backgroundGraphicGeometry(){const e=this._displayPlane;if(!e)return null;const t=this.view.spatialReference;return this._updateDisplayPlaneConrers(e),new G({spatialReference:t,rings:[[this._cornerA,this._cornerB,this._cornerC,this._cornerD,this._cornerA]]})}get _rotateGraphicGeometry(){const e=this._plane;if(!e)return null;const t=this._rotationHandleCache;return m(t,e.basis1),d(t,t,F*this.view.resolution),u(t,t,e.origin),u(t,t,e.basis1),new v({x:t[0],y:t[1],spatialReference:this.view.spatialReference})}get _scaleGraphicGeometries(){const e=this._displayPlane;if(!e)return[];const t=this.view.spatialReference;this._updateDisplayPlaneConrers(e);const{_cornerA:i,_cornerB:s,_cornerC:o,_cornerD:r}=this,a=y(this._avgAB,i,s,.5),n=y(this._avgBC,s,o,.5),h=y(this._avgCD,o,r,.5),c=y(this._avgDA,r,i,.5);return[new v({x:i[0],y:i[1],spatialReference:t}),new v({x:s[0],y:s[1],spatialReference:t}),new v({x:o[0],y:o[1],spatialReference:t}),new v({x:r[0],y:r[1],spatialReference:t}),new v({x:a[0],y:a[1],spatialReference:t}),new v({x:n[0],y:n[1],spatialReference:t}),new v({x:h[0],y:h[1],spatialReference:t}),new v({x:c[0],y:c[1],spatialReference:t})]}onActivate(){this.visible=!0}onDeactivate(){this.visible=!1}onShow(){this._graphicsLayer.visible=!0}onHide(){this._graphicsLayer.visible=!1}canUndo(){return this._editGeometryOperations.canUndo}canRedo(){return this._editGeometryOperations.canRedo}undo(){this._editGeometryOperations.undo(),this.updateGraphics()}redo(){this._editGeometryOperations.redo(),this.updateGraphics()}refresh(){const{view:e,target:t}=this,i="georeference"in t?t.georeference.coords:t.geometry,s=this._editGeometryOperations,o=s.data.parts[0].vertices,r=B.fromGeometry(w(i,e.spatialReference),2).parts[0].vertices;o.forEach((e,t)=>{s.setVertexPosition(e,r[t].pos)}),this.updateGraphics()}reset(){const{target:e}=this;if("georeference"in e){const t=e.georeference;"control-points"===t.type&&(t.controlPoints=this._initialControlPoints)}else e.geometry=this._initialGeometry;this.refresh(),this._sharedUndoStack.length=0,this._sharedRedoStack.length=0}updateGraphics(){const e=this._editGeometryOperations.data.geometry;if("georeference"in this.target){this.target.georeference.coords=e}this._graphic.geometry=e,this._backgroundGraphic.geometry=this._backgroundGraphicGeometry,this._rotateGraphic.geometry=this._rotateGraphicGeometry,this._scaleGraphicGeometries.forEach((e,t)=>{this._scaleGraphics[t].geometry=e})}setSharedUndoStack(e){this._sharedUndoStack=e}setSharedRedoStack(e){this._sharedRedoStack=e}async _initialize(){const{view:e,target:s}=this;if("georeference"in s){const e=s.georeference;this._graphic=new t({geometry:e.coords}),this._initialControlPoints="control-points"===e.type?e.controlPoints:null}else this._graphic=s,this._initialGeometry=s.geometry;e.map.addMany([this._graphicsLayer]),e.focus(),this.visible=!1,this.finishToolCreation(),await this._loadProjectionEngine(),this._editGeometryOperations=E.fromGeometry(w(this._graphic.geometry,e.spatialReference),2),this._backgroundGraphic=new t({symbol:new T({color:"transparent",outline:{type:"simple-line",color:e.effectiveTheme.accentColor,width:2}}),geometry:this._backgroundGraphicGeometry}),this._rotateGraphic=new t({symbol:new S({color:i(e.effectiveTheme.accentColor),outline:{type:"simple-line",color:e.effectiveTheme.accentColor,width:1}}),geometry:this._rotateGraphicGeometry}),this._scaleGraphics=this._scaleGraphicGeometries.map(s=>new t({symbol:new S({size:6,style:"square",color:i(e.effectiveTheme.accentColor),outline:{type:"simple-line",color:e.effectiveTheme.accentColor,width:1}}),geometry:s})),this._graphicsLayer.graphics.addMany([this._backgroundGraphic,this._rotateGraphic,...this._scaleGraphics]),this._dragManipulation=new A({tool:this,view:e,graphic:this._graphic}),this._rotateManipulation=new P({tool:this,view:e,graphic:this._rotateGraphic,snapRotation:this._snapRotation}),this._scaleManipulations=this._scaleGraphics.map((t,i)=>new M({tool:this,view:e,graphic:t,direction:N[i],preserveAspectRatio:this._preserveAspectRatio})),this.addHandles([this._dragManipulation.createDragPipeline(this._getInfo.bind(this),this._updateGraphics.bind(this)),this._rotateManipulation.createDragPipeline(this._getInfo.bind(this),this._updateGraphics.bind(this)),...this._scaleManipulations.map(e=>e.createDragPipeline(this._getInfo.bind(this),this._updateGraphics.bind(this))),o(()=>this.view.scale,()=>this.active?this.updateGraphics():null),e.on("click",async t=>{if(null!=e.activeTool&&e.activeTool!==this)return;const i=z(t),o=[];e.map.allLayers.forEach(e=>{"vector-tile"!==e.type&&"imagery"!==e.type||o.push(e)});const r=await this.view.hitTest(i,{exclude:o}),a=r.results;if(0===a.length)e.activeTool=null;else{const t=I(r.results),i="georeference"in s,o=a.map(e=>"media"===e.type?e.element:null).filter(Boolean),n=new Set([...this._graphicsLayer.graphics,i?null:s].filter(Boolean));i&&o.includes(s)||null!=t&&n.has(t.graphic)?null==e.activeTool&&(e.activeTool=this):e.activeTool=null}})]);const r=e=>{this.addHandles(e.events.on("grab-changed",e=>{"georeference"in s&&("start"===e.action?s.opacity*=.5:"end"===e.action&&(s.opacity*=2))}))};this._dragManipulation.forEachManipulator(r),this._rotateManipulation.forEachManipulator(r),this._scaleManipulations.forEach(e=>e.forEachManipulator(r));const a=new U;a.addToggle(L.preserveAspectRatio,()=>{null==this.preserveAspectRatio&&(this._preserveAspectRatio.enabled=!this._preserveAspectRatio.enabled)}),a.addToggle(L.rotateIncrements,()=>{null==this.snapRotation&&(this._snapRotation.enabled=!this._snapRotation.enabled)}),a.add(L.toggleOpacity,()=>{"georeference"in s&&(s.opacity*=this._isOpacityToggled?2:.5,this._isOpacityToggled=!this._isOpacityToggled)}),a.addToggle(L.factorModifier,e=>this._factor="key-down"===e.type?K:J),a.add(L.scaleUp,()=>this._scale(this._factor)),a.add(L.scaleDown,()=>this._scale(-this._factor)),a.add(L.moveUp,()=>this._move(0,this._factor)),a.add(L.moveDown,()=>this._move(0,-this._factor)),a.add(L.moveLeft,()=>this._move(-this._factor,0)),a.add(L.moveRight,()=>this._move(this._factor,0)),this.addHandles([e.on("key-down",t=>{e.activeTool===this&&a.dispatch(e.inputManager,t)}),e.on("key-up",t=>{e.activeTool===this&&a.dispatch(e.inputManager,t)})])}async _loadProjectionEngine(){const e=this._graphic.geometry;return R(e.spatialReference,this.view.spatialReference)}_updateDisplayPlaneConrers(e){const{basis1:t,basis2:i,origin:s}=e,o=this._cornerA;u(o,s,t),u(o,o,i);const r=this._cornerB;u(r,s,t),g(r,r,i);const a=this._cornerC;g(a,s,t),g(a,a,i);const n=this._cornerD;g(n,s,t),u(n,n,i)}_getInfo(){return{editGeometryOperations:this._editGeometryOperations,plane:this._plane,displayPlane:this._displayPlane}}_updateGraphics(e,t){"start"===e.action&&(this._sharedUndoStack.push({tool:this,operation:t}),this._sharedRedoStack.length=0),this.updateGraphics()}_scale(e){const t=this._editGeometryOperations,i=t.data.geometry.extent?.width,s=(i+e*this.view.resolution)/i,o=t.scale(this._plane.origin,p,s,s,0,1);this._sharedUndoStack.push({tool:this,operation:o}),this._sharedRedoStack.length=0,this.updateGraphics()}_move(e,t){const i=this._editGeometryOperations.move(e*this.view.resolution,t*this.view.resolution,0,0);this._sharedUndoStack.push({tool:this,operation:i}),this._sharedRedoStack.length=0,this.updateGraphics()}};e([a()],Q.prototype,"_plane",null),e([a()],Q.prototype,"_backgroundGraphicGeometry",null),e([a()],Q.prototype,"_rotateGraphicGeometry",null),e([a()],Q.prototype,"_scaleGraphicGeometries",null),e([a()],Q.prototype,"preserveAspectRatio",void 0),e([a()],Q.prototype,"snapRotation",void 0),e([a({constructOnly:!0,nonNullable:!0})],Q.prototype,"target",void 0),e([a({readOnly:!0})],Q.prototype,"type",void 0),e([a({constructOnly:!0})],Q.prototype,"view",void 0),Q=e([n("esri.views.2d.interactive.editingTools.TransformTool")],Q);export{Q as TransformTool};
|