@arcgis/core 5.2.0-next.113 → 5.2.0-next.114
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/Ground.d.ts +5 -4
- package/arcgisGlobal.d.ts +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/e164acd876bbd42ed658.js +1 -0
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ar.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.bg.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.bs.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ca.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.cs.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.da.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.de.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.el.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.es.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.et.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.fi.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.fr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.he.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.hr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.hu.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.id.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.it.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ja.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ko.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.lt.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.lv.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.nl.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.no.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.pl.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.pt-BR.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ro.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ru.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sk.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sl.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sv.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.th.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.tr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.uk.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.vi.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.zh-CN.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.zh-HK.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.zh-TW.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/messages.ja.json +1 -1
- package/assets/esri/views/3d/environment/resources/milkyway-band.ktx2 +0 -0
- package/assets/esri/widgets/DistanceMeasurement2D/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/DistanceMeasurement2D/t9n/messages.ro.json +1 -1
- package/assets/esri/widgets/Expand/t9n/messages.id.json +1 -1
- package/assets/esri/widgets/Features/t9n/messages.he.json +1 -1
- package/assets/esri/widgets/Features/t9n/messages.uk.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.bs.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.et.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.fi.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.hr.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.hu.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.id.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.lv.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.nl.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.th.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.tr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/Print/t9n/messages.es.json +1 -1
- package/assets/esri/widgets/Print/t9n/messages.it.json +1 -1
- package/assets/esri/widgets/Print/t9n/messages.lt.json +1 -1
- package/assets/esri/widgets/Print/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/widgets/Print/t9n/messages.sl.json +1 -1
- package/assets/esri/widgets/Print/t9n/messages.sr.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.bs.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.es.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.et.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.fi.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.he.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.hr.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.it.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.lv.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.ar.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.ca.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.cs.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.el.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.es.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.fi.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.he.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.it.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.lt.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.lv.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.pl.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.ro.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.ru.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.sl.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.uk.json +1 -1
- package/assets/esri/widgets/support/GridControls/t9n/messages.pt-BR.json +1 -1
- package/chunks/DeepSky.glsl.js +1 -1
- package/config.js +1 -1
- package/core/Evented.d.ts +1 -1
- package/form/elements/AttachmentElement.d.ts +5 -5
- package/form/elements/inputs/attachments/AttachmentInput.d.ts +1 -1
- package/kernel.js +1 -1
- package/layers/FeatureLayer.d.ts +2 -2
- package/layers/support/FeatureReductionBinning.d.ts +2 -2
- package/layers/support/FeatureReductionCluster.d.ts +2 -2
- package/layers/support/SubtypeSublayer.d.ts +1 -1
- package/package.json +3 -3
- package/popup/FeatureContent.d.ts +7 -7
- package/portal/schemas/definitions.js +1 -1
- package/portal/types.d.ts +1 -1
- package/renderers/DotDensityRenderer.d.ts +2 -2
- package/rest/knowledgeGraph/ReplicaDefinition.d.ts +1 -1
- package/rest/knowledgeGraphService.d.ts +2 -2
- package/rest/support/Query.d.ts +1 -3
- package/rest/support/RelationshipQuery.d.ts +1 -1
- package/support/revision.js +1 -1
- package/symbols/LineSymbol3D.js +1 -1
- package/symbols/cim/types.d.ts +32 -0
- package/views/3d/analysis/ShadowCastAnalysisView3D.d.ts +1 -1
- package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/analysis/Viewshed/placementUtils.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/webgl-engine/effects/glow/BlurEmission.js +1 -1
- package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
- package/views/BreakpointsOwner.d.ts +2 -2
- package/views/SceneView.js +1 -1
- package/views/SelectionManager.d.ts +24 -24
- package/views/View.js +1 -1
- package/views/View2D.js +1 -1
- package/views/interactive/support/types.d.ts +0 -1
- package/views/support/DefaultsFromMap.js +1 -1
- package/widgets/Attachments/support/attachmentUtils.d.ts +8 -0
- package/widgets/BasemapLayerList/BasemapLayerListViewModel.d.ts +1 -0
- package/widgets/BasemapLayerList/BasemapLayerListViewModel.js +1 -1
- package/widgets/BasemapLayerList/BasemapLayerListVisibleElements.d.ts +5 -1
- package/widgets/BasemapLayerList/types.d.ts +15 -2
- package/widgets/BasemapLayerList.d.ts +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +14 -0
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +29 -2
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/MultipleChoiceController.d.ts +1 -5
- package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/types.d.ts +8 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +2 -2
- package/widgets/Editor.d.ts +2 -2
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +6 -6
- package/widgets/FeatureTable/support/FeatureStore.d.ts +2 -2
- package/widgets/FeatureTable.d.ts +5 -5
- package/widgets/LayerList/LayerListVisibleElements.d.ts +4 -1
- package/widgets/support/SelectionList/SelectionListViewModel.d.ts +1 -1
- package/assets/esri/core/workers/chunks/f9b29d2ce1cd31c0fce1.js +0 -1
- package/graphic/graphicOrigins.js +0 -2
package/portal/types.d.ts
CHANGED
|
@@ -204,7 +204,7 @@ export interface FetchResourcesParameters {
|
|
|
204
204
|
*/
|
|
205
205
|
start?: number;
|
|
206
206
|
/**
|
|
207
|
-
* The maximum number of results to be included in the [FetchResourcesResult
|
|
207
|
+
* The maximum number of results to be included in the [FetchResourcesResult](https://developers.arcgis.com/javascript/latest/references/core/portal/types/#FetchResourcesResult-resources) response. The maximum value allowed is
|
|
208
208
|
* `100`. The `start` property combined with the `num` property can be used to paginate the search results.
|
|
209
209
|
*
|
|
210
210
|
* @default 10
|
|
@@ -91,7 +91,7 @@ export interface DotDensityRendererProperties extends RendererProperties, Visual
|
|
|
91
91
|
outline?: SimpleLineSymbolProperties;
|
|
92
92
|
/**
|
|
93
93
|
* An array of [Size Visual Variable](https://developers.arcgis.com/javascript/latest/references/core/renderers/visualVariables/SizeVariable/) objects. Only one
|
|
94
|
-
* should be provided. This visual variable is used to vary the [outline](
|
|
94
|
+
* should be provided. This visual variable is used to vary the [outline](https://developers.arcgis.com/javascript/latest/references/core/renderers/DotDensityRenderer/#outline) width based on the [view.scale](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#scale).
|
|
95
95
|
* See the snippet below for an example of this.
|
|
96
96
|
*
|
|
97
97
|
* @example
|
|
@@ -382,7 +382,7 @@ export default class DotDensityRenderer extends DotDensityRendererSuperclass {
|
|
|
382
382
|
get type(): "dot-density";
|
|
383
383
|
/**
|
|
384
384
|
* An array of [Size Visual Variable](https://developers.arcgis.com/javascript/latest/references/core/renderers/visualVariables/SizeVariable/) objects. Only one
|
|
385
|
-
* should be provided. This visual variable is used to vary the [outline](
|
|
385
|
+
* should be provided. This visual variable is used to vary the [outline](https://developers.arcgis.com/javascript/latest/references/core/renderers/DotDensityRenderer/#outline) width based on the [view.scale](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#scale).
|
|
386
386
|
* See the snippet below for an example of this.
|
|
387
387
|
*
|
|
388
388
|
* @example
|
|
@@ -47,7 +47,7 @@ export type ReplicaDocumentOptions = {
|
|
|
47
47
|
/**
|
|
48
48
|
* Entity type and relationship type definitions included in the replica definition.
|
|
49
49
|
*
|
|
50
|
-
* At least one of [
|
|
50
|
+
* At least one of [ReplicaStaticDefinition](https://developers.arcgis.com/javascript/latest/references/core/rest/knowledgeGraph/ReplicaDefinition/#ReplicaStaticDefinition-entityTypeReplicaDefinitions) or [ReplicaStaticDefinition](https://developers.arcgis.com/javascript/latest/references/core/rest/knowledgeGraph/ReplicaDefinition/#ReplicaStaticDefinition-relationshipTypeReplicaDefinitions)
|
|
51
51
|
* must be provided with at least one definition.
|
|
52
52
|
*/
|
|
53
53
|
export interface ReplicaNamedTypeDefinition {
|
|
@@ -1003,7 +1003,7 @@ export interface DomainOptions {
|
|
|
1003
1003
|
/**
|
|
1004
1004
|
* Add a domain to the knowledge graph service data model. This adds the domain to the service.
|
|
1005
1005
|
* To assign the domain to a property on a named type use
|
|
1006
|
-
* [executeUpdateGraphProperty()](
|
|
1006
|
+
* [executeUpdateGraphProperty()](https://developers.arcgis.com/javascript/latest/references/core/rest/knowledgeGraphService/#executeUpdateGraphProperty).
|
|
1007
1007
|
*
|
|
1008
1008
|
* @param graph - The [knowledge graph](https://developers.arcgis.com/javascript/latest/references/core/rest/knowledgeGraph/KnowledgeGraph/) associated with the service.
|
|
1009
1009
|
* @param domain - The [domain](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Domain/) to add to the graph.
|
|
@@ -1047,7 +1047,7 @@ export function executeUpdateDomain(graph: KnowledgeGraph, updatedDomain: RangeD
|
|
|
1047
1047
|
|
|
1048
1048
|
/**
|
|
1049
1049
|
* Delete a domain from a knowledge graph service. To delete a domain it must not be associated with any named type property in the graph.
|
|
1050
|
-
* To remove a domain from a named type property use [executeUpdateGraphProperty()](
|
|
1050
|
+
* To remove a domain from a named type property use [executeUpdateGraphProperty()](https://developers.arcgis.com/javascript/latest/references/core/rest/knowledgeGraphService/#executeUpdateGraphProperty).
|
|
1051
1051
|
*
|
|
1052
1052
|
* @param graph - The [knowledge graph](https://developers.arcgis.com/javascript/latest/references/core/rest/knowledgeGraph/KnowledgeGraph/).
|
|
1053
1053
|
* @param domainName - The name of the [domain](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Domain/) to delete
|
package/rest/support/Query.d.ts
CHANGED
|
@@ -440,8 +440,6 @@ export default class Query extends JSONSupport {
|
|
|
440
440
|
*
|
|
441
441
|
* If querying a feature service, the [supportsQueryWithDistance](https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service-layer/)
|
|
442
442
|
* capability must be `true`.
|
|
443
|
-
*
|
|
444
|
-
* @see [Query.outDistance](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#outDistance)
|
|
445
443
|
*/
|
|
446
444
|
accessor distance: number | null | undefined;
|
|
447
445
|
/** Specifies the geodatabase version to display for feature service queries. */
|
|
@@ -876,7 +874,7 @@ export default class Query extends JSONSupport {
|
|
|
876
874
|
* When `true` output geometry will include curves. If `false`, curves (if any) will be converted to
|
|
877
875
|
* densified polylines or polygons.
|
|
878
876
|
*
|
|
879
|
-
* This option only applies when [returnGeometry](
|
|
877
|
+
* This option only applies when [returnGeometry](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#returnGeometry) is set to `true` and the output geometry is
|
|
880
878
|
* non-quantized polylines or polygons.
|
|
881
879
|
*
|
|
882
880
|
* @since 5.0
|
|
@@ -120,7 +120,7 @@ export default class RelationshipQuery extends JSONSupport {
|
|
|
120
120
|
* When `true` output geometry will include curves. If `false`, curves (if any) will be converted to
|
|
121
121
|
* densified polylines or polygons.
|
|
122
122
|
*
|
|
123
|
-
* This option only applies when [returnGeometry](
|
|
123
|
+
* This option only applies when [returnGeometry](https://developers.arcgis.com/javascript/latest/references/core/rest/support/RelationshipQuery/#returnGeometry) is set to `true` and the output geometry is
|
|
124
124
|
* non-quantized polylines or polygons.
|
|
125
125
|
*
|
|
126
126
|
* @since 5.0
|
package/support/revision.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
const
|
|
2
|
+
const c="20260917",b="1aa1293cf91e731cdb058c9b99fcddd0033810bb";export{c as buildDate,b as revision};
|
package/symbols/LineSymbol3D.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import o from"../core/Collection.js";import{clone as r}from"../core/lang.js";import{property as t,subclass as s}from"../core/accessorSupport/decorators.js";import i from"./LineSymbol3DLayer.js";import l from"./PathSymbol3DLayer.js";import y from"./Symbol3D.js";import{enumeration as
|
|
2
|
+
import{__decorate as e}from"tslib";import o from"../core/Collection.js";import{clone as r}from"../core/lang.js";import{property as t,subclass as s}from"../core/accessorSupport/decorators.js";import i from"./LineSymbol3DLayer.js";import l from"./PathSymbol3DLayer.js";import y from"./Symbol3D.js";import{enumeration as p}from"../core/accessorSupport/decorators/enumeration.js";var m;const n=o.ofType({base:null,key:"type",typeMap:{line:i,path:l}}),a=o.ofType({base:null,key:"type",typeMap:{line:i,path:l}});let b=m=class extends y{constructor(e){super(e),this.symbolLayers=new n,this.worldSized=!1,this.type="line-3d"}clone(){return new m({styleOrigin:r(this.styleOrigin),symbolLayers:r(this.symbolLayers),thumbnail:r(this.thumbnail),worldSized:this.worldSized})}static fromSimpleLineSymbol(e){return new m({symbolLayers:new o([i.fromSimpleLineSymbol(e)])})}};e([t({type:n,json:{type:a}})],b.prototype,"symbolLayers",void 0),e([t({type:Boolean,nonNullable:!0,json:{write:!0,default:!1}})],b.prototype,"worldSized",void 0),e([p({LineSymbol3D:"line-3d"},{readOnly:!0})],b.prototype,"type",void 0),b=m=e([s("esri.symbols.LineSymbol3D")],b);export{b as default};
|
package/symbols/cim/types.d.ts
CHANGED
|
@@ -2600,6 +2600,38 @@ export interface CIMPointSymbol extends CIMMultiLayerSymbol {
|
|
|
2600
2600
|
* @since 5.0
|
|
2601
2601
|
*/
|
|
2602
2602
|
animations?: CIMSymbolAnimation[];
|
|
2603
|
+
/**
|
|
2604
|
+
* The size of the halo around the symbol. Use with the `haloSymbol` property to define the halo's appearance.
|
|
2605
|
+
*
|
|
2606
|
+
* @since 5.2
|
|
2607
|
+
*/
|
|
2608
|
+
haloSize?: number;
|
|
2609
|
+
/**
|
|
2610
|
+
* The symbol used for the halo around the point symbol. Use with the `haloSize` property to define the halo's appearance.
|
|
2611
|
+
*
|
|
2612
|
+
* @since 5.2
|
|
2613
|
+
* @example
|
|
2614
|
+
* ```js
|
|
2615
|
+
* {
|
|
2616
|
+
* type: "CIMPointSymbol",
|
|
2617
|
+
* symbolLayers: [...],
|
|
2618
|
+
* haloSize: 2,
|
|
2619
|
+
* haloSymbol: {
|
|
2620
|
+
* type: "CIMPolygonSymbol",
|
|
2621
|
+
* symbolLayers: [
|
|
2622
|
+
* {
|
|
2623
|
+
* type: "CIMSolidFill",
|
|
2624
|
+
* enable: true,
|
|
2625
|
+
* color: [0, 169, 230, 255],
|
|
2626
|
+
* },
|
|
2627
|
+
* ],
|
|
2628
|
+
* },
|
|
2629
|
+
* scaleX: 1,
|
|
2630
|
+
* angleAlignment: "Display"
|
|
2631
|
+
* }
|
|
2632
|
+
* ```
|
|
2633
|
+
*/
|
|
2634
|
+
haloSymbol?: CIMPolygonSymbol;
|
|
2603
2635
|
/**
|
|
2604
2636
|
* The primitive name of the symbol. Used when setting a [CIMPrimitiveOverride](https://developers.arcgis.com/javascript/latest/references/core/symbols/cim/types/#CIMPrimitiveOverride).
|
|
2605
2637
|
*
|
|
@@ -9,7 +9,7 @@ import type { ScreenPoint } from "../../../core/types.js";
|
|
|
9
9
|
* The ShadowCastAnalysisView3D is responsible for rendering a [ShadowCastAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCastAnalysis/)
|
|
10
10
|
* using custom visualizations. The [getDurationAtScreen()](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/ShadowCastAnalysisView3D/#getDurationAtScreen) method
|
|
11
11
|
* on the analysis view provides developers with the ability to obtain the specific shadow or sunlight duration at a
|
|
12
|
-
* certain [point](https://developers.arcgis.com/javascript/latest/references/core/core/types/#ScreenPoint) on the screen or to
|
|
12
|
+
* certain [point](https://developers.arcgis.com/javascript/latest/references/core/core/types/#ScreenPoint) on the screen or to disable the tooltip attached to the cursor by setting [interactive](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/ShadowCastAnalysisView3D/#interactive) to `false`.
|
|
13
13
|
*
|
|
14
14
|
* This analysis view controls the shadow or sunlight overlay produced by [ShadowCastAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCastAnalysis/). It does
|
|
15
15
|
* not control the scene's illumination. To change the scene lighting itself, use [SunLighting](https://developers.arcgis.com/javascript/latest/references/core/views/3d/environment/SunLighting/).
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../../core/Collection.js";import"../../../../core/has.js";import{mapCollection as i}from"../../../../core/mapCollectionUtils.js";import{destroyMaybe as o,removeMaybe as s}from"../../../../core/maybe.js";import{watch as n,sync as l,initial as a}from"../../../../core/reactiveUtils.js";import{property as r,subclass as p}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as d}from"../../../../core/support/UpdatingHandles.js";import{ViewshedInteractionVisuals as c}from"./ViewshedInteractionVisuals.js";import{ViewshedSnappingController as u}from"./ViewshedSnappingController.js";import{ViewshedSubTool as h}from"./ViewshedSubTool.js";import{findSubTool as v}from"./viewshedSubToolUtils.js";import{connectTooltipToManipulatedObject as b}from"../../interactive/editingTools/tooltipUtils3D.js";import{InteractiveToolBase as g}from"../../../interactive/InteractiveToolBase.js";import{sketchKeys as _}from"../../../interactive/keybindings.js";import T from"../../../interactive/options/InteractiveToolOptions.js";import{enterInputModeIfAvailable as
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../../core/Collection.js";import"../../../../core/has.js";import{mapCollection as i}from"../../../../core/mapCollectionUtils.js";import{destroyMaybe as o,removeMaybe as s}from"../../../../core/maybe.js";import{watch as n,sync as l,initial as a}from"../../../../core/reactiveUtils.js";import{property as r,subclass as p}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as d}from"../../../../core/support/UpdatingHandles.js";import{ViewshedInteractionVisuals as c}from"./ViewshedInteractionVisuals.js";import{ViewshedSnappingController as u}from"./ViewshedSnappingController.js";import{ViewshedSubTool as h}from"./ViewshedSubTool.js";import{findSubTool as v}from"./viewshedSubToolUtils.js";import{connectTooltipToManipulatedObject as b}from"../../interactive/editingTools/tooltipUtils3D.js";import{InteractiveToolBase as g}from"../../../interactive/InteractiveToolBase.js";import{sketchKeys as _}from"../../../interactive/keybindings.js";import T from"../../../interactive/options/InteractiveToolOptions.js";import{enterInputModeIfAvailable as y,makeTooltip as m}from"../../../interactive/tooltip/tooltipCommonUtils.js";import{MovePointTooltipInfo as V}from"../../../interactive/tooltip/infos/MovePointTooltipInfo.js";let w=class extends g{constructor(e){super(e),this.subToolHandles=new t,this.removeIncompleteOnCancel=!1,this.automaticManipulatorSelection=!1,this.multiTouchEnabled=!1,this._selectedManipulator=null,this._observerToolOptions=new T({tooltips:{enabled:!0}}),this._observerTooltipConnectionHandle=null,this._updatingHandles=new d}initialize(){const{snappingManager:e,view:t}=this;this._interactionVisuals=new c({view:t}),this._snappingController=new u({snappingManager:e,view:t}),this._initializeObserverTooltip(t);const o=this.analysisViewData.viewshedComputedDataHandles;this.subToolHandles=i(()=>o,({viewshedComputedData:e})=>{const t=new h({analysis:this.analysis,analysisViewData:this.analysisViewData,parentTool:this,view:this.view,viewshedComputedData:e});return{subTool:t,remove:()=>{this.selectedViewshed===e.viewshed&&(this.selectedViewshed=null),t.destroy()}}}),this.addHandles([n(()=>this.firstGrabbedManipulator,e=>{if(null!=e){const t=this._findSubTool(e)?.viewshed;this.selectedViewshed=t,this._selectManipulator(e)}else this._selectedSubTool?.onManipulatorSelectionChanged()},l),this._updatingHandles.add(()=>{const e=this.selectedViewshedComputedData;return null==e?null:{subTool:this._selectedSubTool,observer:e.elevationAlignedObserverRenderSpace,target:e.elevationAlignedTargetRenderSpace}},e=>{if(null==e)return;const{subTool:t,observer:i,target:o}=e;t?.moveInteractionState.dragging?this._updateInteractionVisualsLocation(i,!0):t?.scaleOrientInteractionState.dragging&&this._updateInteractionVisualsLocation(o,!1)},a),this._updatingHandles.add(()=>this.analysisViewData.visible,()=>this.updateInteractionVisualsVisibility(),a),this._updatingHandles.add(()=>this.selectedViewshed,e=>{const t=this._selectedManipulator,i=this._selectedSubTool;this._connectObserverTooltip(i),null==e?this._selectManipulator(null):null!=t&&i.hasManipulator(t)||this._selectManipulator(i.observerManipulator)},a)])}destroy(){this._selectManipulator(null),this._disconnectObserverTooltip(),o(this.subToolHandles),o(this._interactionVisuals),o(this._snappingController),o(this._observerTooltip),this._updatingHandles.destroy()}get updating(){return!!this._snappingController?.updating||this._updatingHandles.updating||this.subToolHandles.some(({subTool:e})=>e.updating)}get grabbing(){return this.subToolHandles.some(({subTool:e})=>e.grabbing)}get cursor(){return null}get selectedViewshed(){return this.analysisViewData.selectedViewshed}set selectedViewshed(e){this.analysisViewData.selectedViewshed=e}get selectedViewshedComputedData(){return this._selectedSubTool?.viewshedComputedData}onManipulatorSelectionChanged(){this.subToolHandles.forEach(({subTool:e})=>e.onManipulatorSelectionChanged())}updateInteractionVisualsVisibility(e=!1){const t=this._selectedSubTool,i=this.selectedViewshedComputedData;if(null==t||null==i)return void this._interactionVisuals?.setVisibility(!1);const o=t.moveInteractionState,s=e?o.grabbing:o.dragging,n=t.scaleOrientInteractionState,l=e?n.grabbing:n.dragging;if(!(this.analysisViewData.visible&&(s||l)))return void this._interactionVisuals?.setVisibility(!1);const a=s?i.elevationAlignedObserverRenderSpace:i.elevationAlignedTargetRenderSpace;this._interactionVisuals?.update({location:a,laserlineVisible:!0,verticalLineVisible:s,intersectsWorldUp:s})}createObserverMoveSnappingPipeline(e,t,i,o=!1){return this._snappingController.createObserverMoveSnappingPipeline(e,t,i,o)}onActivate(){this.updateInteractionVisualsVisibility()}onDeactivate(){this.updateInteractionVisualsVisibility()}onInputEvent(e){if(!this.destroyed&&!y(e,this._observerTooltip))switch(e.type){case"key-down":_.cancel===e.key?this._cancelKeyHandler(e):_.delete.includes(e.key)&&this._deleteKeyHandler(e);break;case"hold":this.updateInteractionVisualsVisibility(!0)}}_updateInteractionVisualsLocation(e,t){this._interactionVisuals?.updateLocation(e,t)}_initializeObserverTooltip(e){const t=this._observerToolOptions;this._observerTooltip=m(()=>({view:e,options:t.tooltips})),this._observerTooltipInfo=new V({toolOptions:t,viewType:e.type})}_connectObserverTooltip(e){if(this._disconnectObserverTooltip(),null==e)return void this._observerTooltip.clear();const t=e.observerManipulatedObject;this._observerTooltipConnectionHandle=b(this._observerTooltip,t,()=>({toolOptions:this._observerToolOptions,activeTooltipInfo:this._observerTooltipInfo,callbacks:{onBeforeUpdate:()=>this.updateInteractionVisualsVisibility(),onMoveStart:()=>{},onMove:()=>{},onMoveStop:()=>{},onRotateStart:()=>{},onRotate:()=>{},onRotateStop:()=>{},onScaleStart:()=>{},onScale:()=>{},onScaleStop:()=>{}}}))}_disconnectObserverTooltip(){this._observerTooltipConnectionHandle=s(this._observerTooltipConnectionHandle)}_cancelKeyHandler(e){this.grabbing||(this.selectedViewshed=null,e.stopPropagation())}_deleteKeyHandler(e){const t=this.selectedViewshed;null!=t&&(this.analysis.viewsheds.remove(t),e.stopPropagation())}get _selectedSubTool(){return this._findSubTool(this.selectedViewshed)}_findSubTool(e){return v(this.subToolHandles,e)}_selectManipulator(e){const t=this._selectedManipulator;t!==e&&(this._selectedManipulator=e,null!=t&&(t.selected=!1),null!=e&&(e.selected=!0),this._findSubTool(t)?.onManipulatorSelectionChanged(),this._selectedSubTool?.onManipulatorSelectionChanged())}get test(){}};e([r({constructOnly:!0})],w.prototype,"analysis",void 0),e([r({constructOnly:!0})],w.prototype,"analysisViewData",void 0),e([r({constructOnly:!0})],w.prototype,"intersector",void 0),e([r({constructOnly:!0})],w.prototype,"snappingManager",void 0),e([r({constructOnly:!0})],w.prototype,"view",void 0),e([r()],w.prototype,"subToolHandles",void 0),e([r()],w.prototype,"removeIncompleteOnCancel",void 0),e([r()],w.prototype,"automaticManipulatorSelection",void 0),e([r()],w.prototype,"multiTouchEnabled",void 0),e([r()],w.prototype,"_selectedManipulator",void 0),e([r()],w.prototype,"_interactionVisuals",void 0),e([r()],w.prototype,"_snappingController",void 0),e([r()],w.prototype,"_observerTooltip",void 0),e([r()],w.prototype,"_observerTooltipInfo",void 0),e([r()],w.prototype,"updating",null),e([r()],w.prototype,"grabbing",null),e([r()],w.prototype,"cursor",null),e([r()],w.prototype,"selectedViewshed",null),e([r()],w.prototype,"selectedViewshedComputedData",null),e([r()],w.prototype,"_selectedSubTool",null),w=e([p("esri.views.3d.analysis.Viewshed.ViewshedEditTool")],w);export{w as ViewshedEditTool};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../../analysis/Viewshed.js";import o from"../../../../core/Accessor.js";import"../../../../core/has.js";import{createAbortError as i,throwIfAborted as n,onAbort as a}from"../../../../core/promiseUtils.js";import{watch as s,sync as r}from"../../../../core/reactiveUtils.js";import{property as l,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{absoluteHeightElevationInfo as p}from"../../../../support/elevationInfoUtils.js";import{createDrawTool as d,getFeatureReference as _}from"./placementUtils.js";import{detachToolFromView as v}from"./toolLifecycleUtils.js";import m from"./ViewshedPlacementOperation.js";import{createViewshedPlacementRootPluginConfiguration as u}from"./ViewshedPlacementRootPlugin.js";import{computeParametersFromTargetPoint as w}from"./viewshedToolUtils.js";import{vectorToRender as g}from"../../interactive/support/viewUtils.js";import{DrawManipulator3D as P}from"../../../draw/DrawManipulator3D.js";import{ViewEventPriorities as b}from"../../../input/InputManager.js";import{sketchKeys as f}from"../../../interactive/keybindings.js";import
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../../analysis/Viewshed.js";import o from"../../../../core/Accessor.js";import"../../../../core/has.js";import{createAbortError as i,throwIfAborted as n,onAbort as a}from"../../../../core/promiseUtils.js";import{watch as s,sync as r}from"../../../../core/reactiveUtils.js";import{property as l,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{absoluteHeightElevationInfo as p}from"../../../../support/elevationInfoUtils.js";import{createDrawTool as d,getFeatureReference as _}from"./placementUtils.js";import{detachToolFromView as v}from"./toolLifecycleUtils.js";import m from"./ViewshedPlacementOperation.js";import{createViewshedPlacementRootPluginConfiguration as u}from"./ViewshedPlacementRootPlugin.js";import{computeParametersFromTargetPoint as w}from"./viewshedToolUtils.js";import{vectorToRender as g}from"../../interactive/support/viewUtils.js";import{DrawManipulator3D as P}from"../../../draw/DrawManipulator3D.js";import{ViewEventPriorities as b}from"../../../input/InputManager.js";import{sketchKeys as f}from"../../../interactive/keybindings.js";import y from"../../../interactive/options/InteractiveToolOptions.js";const S="multiple",O=Symbol("hiddenManipulatorHandle");let T=class extends o{constructor(e){super(e),this.placementMode=S,this.observerPlacementElevationInfo=null,this.stagedViewshed=null,this._placeOperation=null,this._drawTool=null,this._renderer=null,this._toolOptions=new y({tooltips:{enabled:!1}}),this._observerScenePoint=h(),this._targetScenePoint=h(),this._mapPointVector=h()}initialize(){this.addHandles([this.view.on("key-down",e=>this._handleKeyDown(e),b.DEFAULT),s(()=>{const{stagedViewshed:e}=this;return{stagedViewshed:e,stagedViewshedInAnalysis:null!=e&&this.analysis.viewsheds.includes(e)}},({stagedViewshed:e,stagedViewshedInAnalysis:t})=>{null==e||t||this.analysis.viewsheds.add(e)},r)])}destroy(){this._cancelPlacementOperation()}get updating(){return!!this._drawTool?.updating}get active(){return!!this._drawTool?.active}get creationState(){return this._get("creationState")}set creationState(e){this._set("creationState",e),this._toolOptions.tooltips.enabled="placing-observer"===e}startPlaceOperation(e,t){this._removeStaged(),this.creationState=null,this._rejectPlaceOperation(i()),n(t);const{resolve:o,reject:s,promise:r}=Promise.withResolvers(),l=a(t,()=>this._cancelPlacementOperation());return this._placeOperation=new m({abortHandle:l,reject:s,resolve:o}),this.placementMode=e,this.observerPlacementElevationInfo=t?.elevationInfo,this.callbacks.setSelectedViewshed(null),this._startObserverPlacement(),r}cancelPlaceOperation(){null==this.creationState&&null==this._placeOperation||(this._cancelPlacementOperation(),this.callbacks.cancelTool())}_handleDeleteDuringCreation(){return null!=this.creationState&&(this._destroyDrawTool(),this._removeStaged(),this.callbacks.setSelectedViewshed(null),this._startObserverPlacement(),!0)}_handleKeyDown(e){null!=this.creationState&&(f.cancel===e.key?(this._handleCancelDuringCreation(),e.stopPropagation(),e.preventDefault()):f.delete.includes(e.key)&&(this._handleDeleteDuringCreation(),e.stopPropagation(),e.preventDefault()))}_handleCancelDuringCreation(){if(this._removeStaged()&&"multiple"===this.placementMode)return this.callbacks.setSelectedViewshed(null),void this._startObserverPlacement();this._destroyDrawTool(),this._abortCreation()}_removeStaged(){const{stagedViewshed:e}=this;return this.stagedViewshed=null,!!e&&(this.analysis.viewsheds.remove(e),!0)}_cancelPlacementOperation(){this._destroyDrawTool(),this._removeStaged(),this.creationState=null,this._finishPlaceOperation()}_abortCreation(){this.callbacks.cancelTool(),this.creationState=null,this._finishPlaceOperation()}_handleObserverPlacementComplete(e,o,i){const n=new t({observer:e,elevationInfo:this.observerPlacementElevationInfo,feature:i});this.analysis.viewsheds.add(n),this.stagedViewshed=n,this.creationState="placing-target",this._updateStagedViewshed(o),this.callbacks.setSelectedViewshed(null)}_onCancel(e){const t=this._removeStaged();return"placing-observer"===this.creationState?t&&"multiple"===this.placementMode?(this.callbacks.setSelectedViewshed(null),void this._startObserverPlacement()):(this._destroyDrawTool(e),void this._abortCreation()):t?(this.creationState="placing-observer",this.callbacks.setSelectedViewshed(null),void("multiple"!==this.placementMode?(this._destroyDrawTool(e),this._abortCreation()):this._startPointPlacement())):(this._destroyDrawTool(e),void this._abortCreation())}_handleTargetPlacementComplete(e){this._updateStagedViewshed(e);const t=this.stagedViewshed;this._placeOperation?.markPlacedViewshed(),this.stagedViewshed=null,this.callbacks.setSelectedViewshed(t)}_resolvePlaceOperation(){this._clearPlaceOperationAndRun(e=>e?.resolve())}_finishPlaceOperation(){this._clearPlaceOperationAndRun(e=>e?.finish())}_rejectPlaceOperation(e){this._clearPlaceOperationAndRun(t=>t?.reject(e))}_clearPlaceOperationAndRun(e){const t=this._placeOperation;this._placeOperation=null,this.observerPlacementElevationInfo=null,e(t)}_startObserverPlacement(){this.creationState="placing-observer",this._startPointPlacement()}_startPointPlacement(){this._drawTool&&this._destroyDrawTool(this._drawTool);const{drawTool:e,renderer:t}=d({analysisViewData:this.analysisViewData,snappingManager:this.snappingManager,view:this.view,toolOptions:this._toolOptions,elevationInfo:this._observerDrawToolElevationInfo,getSnapToSceneEnabled:()=>this._snapToSceneEnabled,onCancel:e=>this._onCancel(e),onComplete:e=>this._onComplete(e),onManipulatorCountChange:e=>this._onManipulatorCountChange(e),isPlacingObserver:()=>"placing-observer"===this.creationState});this._drawTool=e,this._renderer=t;try{this.view.addAndActivateTool(e),e.begin([u({mode:this.placementMode,onObserverComplete:(e,t)=>this._onObserverMapPointComplete(e,t),onTargetComplete:e=>this._onTargetMapPointComplete(e),onObserverPreview:e=>this._onObserverMapPointPreview(e),onTargetPreview:e=>this._onTargetMapPointPreview(e)})])}catch(o){this._destroyDrawTool(e),this._rejectPlaceOperation(o instanceof Error?o:new Error(String(o)))}}_onComplete(e){this._removeStaged(),this._resolvePlaceOperation(),this._destroyDrawTool(e),this.creationState=null}_onObserverMapPointComplete(e,t){const{intersector:o,snappingManager:i,view:n}=this,a=e.clone(),s=this._toScenePoint(e,this._targetScenePoint,this._observerDrawToolElevationInfo),r=_({intersector:o,snappingManager:i,screenPoint:t,view:n});this._renderer?.updatePlacementLocation(s),this._handleObserverPlacementComplete(a,s,r),this._setDrawToolElevationInfo(p)}_onTargetMapPointComplete(e){const t=this._toScenePoint(e,this._targetScenePoint);this._renderer?.updatePlacementLocation(t),this._handleTargetPlacementComplete(t),"multiple"===this.placementMode&&(this.creationState="placing-observer",this._setDrawToolElevationInfo(this._observerDrawToolElevationInfo),this._onObserverMapPointPreview(e))}_onObserverMapPointPreview(e){const t=e.clone(),o=this._toScenePoint(t,this._observerScenePoint,this._observerDrawToolElevationInfo);this._renderer?.updatePlacementLocation(o)}_onTargetMapPointPreview(e){const t=this._toScenePoint(e,this._targetScenePoint);this._renderer?.updatePlacementLocation(t),this._updateStagedViewshed(t)}_setDrawToolElevationInfo(e){const t=this._drawTool;t&&(t.elevationInfo=e)}get _observerDrawToolElevationInfo(){return this.observerPlacementElevationInfo??p}get _snapToSceneEnabled(){const e=this.observerPlacementElevationInfo?.mode;return("placing-observer"!==this.creationState||null==e||"absolute-height"===e)&&null}_onManipulatorCountChange(e){e.removeHandles(O);const t=[];e.manipulators.forEach(({manipulator:e})=>{e instanceof P&&t.push(e.disableDisplay())}),e.addHandles(t,O)}_destroyDrawTool(e=this._drawTool){this._drawTool=null,this._renderer=null,e&&v(this.view,e)}_toScenePoint(e,t,o=p){const{x:i,y:n,z:a,spatialReference:s}=e,r=this._mapPointVector;return r[0]=i,r[1]=n,r[2]=a??0,g(r,s,o,this.view,t)}_updateStagedViewshed(e){const t=this.stagedViewshed;if(!t)return;const o=this.callbacks.findViewshedComputedData(t);if(!o)return;const{heading:i,tilt:n,farDistance:a}=w(this.view,o,e);t.farDistance=a,t.tilt=n,t.heading=i}get test(){}};e([l({constructOnly:!0})],T.prototype,"analysis",void 0),e([l({constructOnly:!0})],T.prototype,"analysisViewData",void 0),e([l({constructOnly:!0})],T.prototype,"intersector",void 0),e([l({constructOnly:!0})],T.prototype,"snappingManager",void 0),e([l({constructOnly:!0})],T.prototype,"view",void 0),e([l({constructOnly:!0})],T.prototype,"callbacks",void 0),e([l()],T.prototype,"placementMode",void 0),e([l()],T.prototype,"observerPlacementElevationInfo",void 0),e([l()],T.prototype,"stagedViewshed",void 0),e([l()],T.prototype,"_placeOperation",void 0),e([l()],T.prototype,"_drawTool",void 0),e([l()],T.prototype,"_renderer",void 0),e([l()],T.prototype,"_toolOptions",void 0),e([l()],T.prototype,"updating",null),e([l()],T.prototype,"active",null),e([l({value:null})],T.prototype,"creationState",null),T=e([c("esri.views.3d.analysis.Viewshed.ViewshedPlacementController")],T);export{T as ViewshedPlacementController};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import i from"../../../../core/Accessor.js";import{isSome as t}from"../../../../core/arrayUtils.js";import{cyclicalDegrees as a,Cyclical as n}from"../../../../core/Cyclical.js";import{handlesGroup as r}from"../../../../core/handleUtils.js";import{deg2rad as o}from"../../../../core/mathUtils.js";import{destroyMaybe as l}from"../../../../core/maybe.js";import{watch as s,syncAndInitial as p,initial as d}from"../../../../core/reactiveUtils.js";import{property as u,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{sub as c,len as v,dot as b}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as M}from"../../../../core/support/UpdatingHandles.js";import{viewshedToolManipulatorConfiguration as m}from"./ViewshedConfiguration.js";import{ViewshedFieldOfViewManipulation as _,isSideHorizontal as f,flipSide as w}from"./ViewshedFieldOfViewManipulation.js";import{ViewshedObserverManipulatedObject3D as O}from"./ViewshedObserverManipulatedObject3D.js";import{ViewshedScaleOrientManipulation as V}from"./ViewshedScaleOrientManipulation.js";import{ViewshedObserverManipulator as D}from"./viewshedToolManipulatorUtils.js";import{screenToMapAtSceneSurface as y}from"../../interactive/editingTools/dragEventPipeline3D.js";import{discRadiusSmall as j}from"../../interactive/editingTools/manipulations/config.js";import{MoveManipulation as S}from"../../interactive/editingTools/manipulations/MoveManipulation.js";import{createManipulatorDragEventPipeline as x,resetManipulatedObject as C,sceneSnappingAtLocation as T,dragManipulatedObject as A,sceneSnappingAtProjectedLocation as F,resetProperties as P}from"../../../interactive/dragEventPipeline.js";const H=Symbol("dragHandles");let z=class extends i{constructor(e){super(e),this._moveManipulation=null,this._observerManipulator=null,this._observerManipulatedObject=null,this._fieldOfViewManipulation=null,this._scaleOrientManipulation=null,this._updatingHandles=new M,this._grabbing=!1,this.viewshedComputedData=null}initialize(){this._moveManipulation=this._createMoveManipulation(),this._fieldOfViewManipulation=new _({view:this.view,tool:this.parentTool}),this._scaleOrientManipulation=new V({view:this.view,tool:this.parentTool}),this._observerManipulator=new D(this.view,this.parentTool),this._observerManipulatedObject=new O({view:this.view,subTool:this}),this.addHandles([s(()=>this.elevationAlignedObserverRenderSpace,e=>{null!=e&&(this._moveManipulation.renderLocation=e,this._observerManipulator.renderLocation=e)},p),this._updatingHandles.add(()=>this.viewshedComputedData?.heading,e=>{e&&(this._moveManipulation.angle=o(90-e))},d),this._updatingHandles.add(()=>{const{viewshedComputedData:e}=this;return{viewshedComputedData:e,observer:this.elevationAlignedObserverRenderSpace,operations:this._observerManipulatedObject.operations}},({viewshedComputedData:e,observer:i,operations:a},n)=>{this._grabbing&&i!==n?.observer||(this.removeHandles(H),e?.valid&&null!=a&&this.addHandles([this._buildObserverManipulatorDragPipeline(e),this._buildMoveManipulationDragPipeline(e),this._buildFOVDragPipeline(e),this._buildScaleOrientDragPipeline(e)].filter(t),H))},d),this._updatingHandles.add(()=>{const e=this.viewshedComputedData;return e?.valid?{viewshedCompData:e,target:e.elevationAlignedTargetRenderSpace,hFOV:e.horizontalFieldOfView,vFOV:e.verticalFieldOfView}:null},e=>{null!=e&&this._fieldOfViewManipulation.updateManipulatorsTransform(e.viewshedCompData)},d),this._updatingHandles.add(()=>{const e=this.viewshedComputedData;return e?.valid?{viewshedCompData:e,hFOV:e.horizontalFieldOfView,vFOV:e.verticalFieldOfView,tilt:e.tilt}:null},e=>{null!=e&&this._fieldOfViewManipulation.updateManipulatorVisuals(e.viewshedCompData)},d),this._updatingHandles.add(()=>{const{viewshedComputedData:e,analysisViewData:i}=this,t=i.visible&&(e?.valid??!1),a=i.selectedViewshed===e?.viewshed,n=t&&a,r=e?.effectiveElevationInfo.mode;return{controlsAvailable:n,selected:a,visibleAndValid:t,zManipulationAvailable:n&&"on-the-ground"!==r}},({controlsAvailable:e,selected:i,visibleAndValid:t,zManipulationAvailable:a})=>{this._moveManipulation.available=e,this._moveManipulation.zManipulation.available=a,this._scaleOrientManipulation.available=e,this._observerManipulator.available=t,this._observerManipulator.collisionPriority=i?2:0,this._fieldOfViewManipulation.available=e},d),this._updatingHandles.add(()=>{const e=this.viewshedComputedData;if(!e?.valid)return null;const{observer:i,target:t,verticalFieldOfView:a,horizontalFieldOfView:n}=e;return{viewshedCompData:e,observer:i,target:t,verticalFieldOfView:a,horizontalFieldOfView:n}},e=>{null!=e&&this._scaleOrientManipulation.updateManipulators(e.viewshedCompData)},d)]);const e=e=>{this.addHandles([e.events.on("grab-changed",i=>{this._grabbing="start"===i.action,"end"===i.action&&this.parentTool.updateInteractionVisualsVisibility(),this.parentTool.subToolHandles.forEach(({subTool:e})=>{e!==this&&e._setInteractive(!this._grabbing)}),this._setInteractive(i=>i===e||!this._grabbing)}),e.events.on("drag",e=>{"start"===e.action&&this.parentTool.updateInteractionVisualsVisibility()})])};this._forEachManipulator(e)}destroy(){this._observerManipulatedObject=l(this._observerManipulatedObject),this._moveManipulation=l(this._moveManipulation),this._fieldOfViewManipulation=l(this._fieldOfViewManipulation),this._scaleOrientManipulation=l(this._scaleOrientManipulation),this.parentTool.manipulators.remove(this._observerManipulator),this._observerManipulator=l(this._observerManipulator),this._updatingHandles.destroy()}get updating(){return this._updatingHandles.updating}get viewshed(){return this.viewshedComputedData?.viewshed}get grabbing(){return this._grabbing}get observer(){return this.viewshed?.observer}set observer(e){const i=this.viewshed;null!=i&&(i.observer=e)}get elevationAlignedObserverRenderSpace(){return this.viewshedComputedData?.elevationAlignedObserverRenderSpace}get discManipulator(){return this._moveManipulation.xyManipulation.discManipulator}get observerManipulator(){return this._observerManipulator}get observerManipulatedObject(){return this._observerManipulatedObject}get moveInteractionState(){const{dragging:e,grabbing:i}=this._moveManipulation;return{dragging:e||this._observerManipulator.dragging,grabbing:i||this._observerManipulator.grabbing}}get scaleOrientInteractionState(){const{dragging:e,grabbing:i}=this._scaleOrientManipulation;return{dragging:e,grabbing:i}}_setInteractive(e){const i="boolean"==typeof e;this._observerManipulator.interactive=i?e:e(this._observerManipulator),this._forEachManipulation(t=>{t.interactive=i?e:t.someManipulator(e)})}onManipulatorSelectionChanged(){if(!this._someManipulatorSelected()){this.analysisViewData.selectedViewshed===this.viewshed&&(this.analysisViewData.selectedViewshed=null)}}hasManipulator(e){let i=!1;return this._forEachManipulator(t=>{i=i||t===e}),i}_someManipulatorSelected(){return this._moveManipulation.selected||this._observerManipulator.selected||this._fieldOfViewManipulation.selected||this._scaleOrientManipulation.selected}_createMoveManipulation(){return new S({view:this.view,tool:this.parentTool,snapToScene:!1,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:!0,radius:j})}_buildObserverManipulatorDragPipeline(e){const{effectiveElevationInfo:i}=e,t=this._observerManipulatedObject,a=t.operations;if(null==a)return null;const n=a.data.spatialReference;return x(this._observerManipulator,(e,r,o,l)=>{const s=a.data.geometry;if("point"!==s.type)return;o=o.next(C(t));const p=this.parentTool.createObserverMoveSnappingPipeline(0,l,i,!0);let d=r.next(y(this.view,s,i,n)).next(T(this.view,i));if(null!=p){const{snappingStep:e,cancelSnapping:i}=p;o.next(i),d=d.next(...e)}d.next(A(t))})}_buildMoveManipulationDragPipeline(e){const{effectiveElevationInfo:i}=e,t=this._observerManipulatedObject,a=t.operations;return null==a?null:this._moveManipulation.createDragPipeline((e,a,n,r,o)=>{r=r.next(C(t));const l=this.parentTool.createObserverMoveSnappingPipeline(e,o,i);if(null!=l){const{snappingStep:e,cancelSnapping:a}=l;return r=r.next(a),{steps:n=n.next(F(this.view,i)).next(...e).next(A(t)),cancel:r}}return{steps:n=n.next(A(t)),cancel:r}},i,a.data.spatialReference,void 0)}_buildFOVDragPipeline(e){let i=0,t=0;return this._fieldOfViewManipulation.createDragPipeline((n,r,o)=>{if(null==e)return{steps:r,cancel:o};const l=e.viewshed;let s=null;o=o.next(P(l,["horizontalFieldOfView","verticalFieldOfView"]));return{steps:r.next(n=>{"start"===n.action&&(s=null,i=e.horizontalFieldOfView,t=e.verticalFieldOfView);const r=n.deltaAngle;if(null==s&&0!==r){const e="bottom"===n.side||"left"===n.side?r>0:r<0;s=f(n.side)?0===i&&e||360===i&&!e:0===t&&e}const o=s?w(n.side):n.side;let p=0;switch(o){case"left":p=i/2-r;break;case"right":p=i/2+r;break;case"top":p=t+2*r;break;case"bottom":p=t-2*r}return f(o)?(p=a.normalize(p),p=p>270?0:p>180?180:p,l.horizontalFieldOfView=2*p):l.verticalFieldOfView=p,n}),cancel:o}},e)}_buildScaleOrientDragPipeline(e){let i=0,t=0;const n=(i,t)=>(a,n,r)=>{if(null==e)return{steps:n,cancel:r};const o=e.viewshed;return r=r.next(P(o,[i])),{steps:n=n.next(t(o,e)),cancel:r}};return r([this._scaleOrientManipulation.createHeadingDragPipeline(n("heading",(i,n)=>n=>("start"===n.action&&(t=e.heading),i.heading=a.normalize(t+n.deltaAngle),n)),e),this._scaleOrientManipulation.createTiltDragPipeline(n("tilt",(t,a)=>a=>{"start"===a.action&&(i=e.tilt);let n=i+a.deltaAngle;return n<-90?n=180:n>270&&(n=0),t.tilt=I.clamp(n),a}),e),this._scaleOrientManipulation.createDistanceDragPipeline(n("farDistance",(e,i)=>t=>{const a=c(E,t.renderEnd,i.elevationAlignedObserverRenderSpace),n=v(a)*i.metersPerUnit,r=b(a,i.targetDirection)<0?m.scaleOrientMinDistance:n;return e.farDistance=r,t}),e)])}_forEachManipulator(e){this._forEachManipulation(i=>{i.forEachManipulator(e)}),e(this._observerManipulator)}_forEachManipulation(e){e(this._moveManipulation),e(this._fieldOfViewManipulation),e(this._scaleOrientManipulation)}get test(){return{observerManipulator:this._observerManipulator,moveManipulation:this._moveManipulation,fieldOfViewManipulation:this._fieldOfViewManipulation,scaleOrientManipulation:this._scaleOrientManipulation,viewshedComputedData:this.viewshedComputedData}}};e([u({constructOnly:!0})],z.prototype,"analysis",void 0),e([u({constructOnly:!0})],z.prototype,"analysisViewData",void 0),e([u({constructOnly:!0})],z.prototype,"parentTool",void 0),e([u({constructOnly:!0,nonNullable:!0})],z.prototype,"view",void 0),e([u()],z.prototype,"updating",null),e([u()],z.prototype,"viewshed",null),e([u()],z.prototype,"_grabbing",void 0),e([u()],z.prototype,"grabbing",null),e([u()],z.prototype,"viewshedComputedData",void 0),e([u()],z.prototype,"observer",null),e([u()],z.prototype,"elevationAlignedObserverRenderSpace",null),z=e([h("esri.views.3d.analysis.Viewshed.ViewshedSubTool")],z);const E=g(),I=new n(0,180);export{z as ViewshedSubTool};
|
|
2
|
+
import{__decorate as e}from"tslib";import i from"../../../../core/Accessor.js";import{isSome as t}from"../../../../core/arrayUtils.js";import{cyclicalDegrees as a,Cyclical as n}from"../../../../core/Cyclical.js";import{handlesGroup as r}from"../../../../core/handleUtils.js";import{deg2rad as o}from"../../../../core/mathUtils.js";import{destroyMaybe as s}from"../../../../core/maybe.js";import{watch as l,syncAndInitial as p,initial as d}from"../../../../core/reactiveUtils.js";import{property as u,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{sub as h,len as v,dot as b}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as M}from"../../../../core/support/UpdatingHandles.js";import{getFeatureReference as m}from"./placementUtils.js";import{viewshedToolManipulatorConfiguration as f}from"./ViewshedConfiguration.js";import{ViewshedFieldOfViewManipulation as _,isSideHorizontal as w,flipSide as O}from"./ViewshedFieldOfViewManipulation.js";import{ViewshedObserverManipulatedObject3D as V}from"./ViewshedObserverManipulatedObject3D.js";import{ViewshedScaleOrientManipulation as D}from"./ViewshedScaleOrientManipulation.js";import{ViewshedObserverManipulator as y}from"./viewshedToolManipulatorUtils.js";import{screenToMapAtSceneSurface as j}from"../../interactive/editingTools/dragEventPipeline3D.js";import{discRadiusSmall as x}from"../../interactive/editingTools/manipulations/config.js";import{MoveManipulation as S}from"../../interactive/editingTools/manipulations/MoveManipulation.js";import{createManipulatorDragEventPipeline as C,resetManipulatedObject as T,sceneSnappingAtLocation as A,dragManipulatedObject as F,sceneSnappingAtProjectedLocation as P,resetProperties as H}from"../../../interactive/dragEventPipeline.js";const E=Symbol("dragHandles");let z=class extends i{constructor(e){super(e),this._moveManipulation=null,this._observerManipulator=null,this._observerManipulatedObject=null,this._fieldOfViewManipulation=null,this._scaleOrientManipulation=null,this._updatingHandles=new M,this._grabbing=!1,this.viewshedComputedData=null}initialize(){this._moveManipulation=this._createMoveManipulation(),this._fieldOfViewManipulation=new _({view:this.view,tool:this.parentTool}),this._scaleOrientManipulation=new D({view:this.view,tool:this.parentTool}),this._observerManipulator=new y(this.view,this.parentTool),this._observerManipulatedObject=new V({view:this.view,subTool:this}),this.addHandles([l(()=>this.elevationAlignedObserverRenderSpace,e=>{null!=e&&(this._moveManipulation.renderLocation=e,this._observerManipulator.renderLocation=e)},p),this._updatingHandles.add(()=>this.viewshedComputedData?.heading,e=>{e&&(this._moveManipulation.angle=o(90-e))},d),this._updatingHandles.add(()=>{const{viewshedComputedData:e}=this;return{viewshedComputedData:e,observer:this.elevationAlignedObserverRenderSpace,operations:this._observerManipulatedObject.operations}},({viewshedComputedData:e,observer:i,operations:a},n)=>{this._grabbing&&i!==n?.observer||(this.removeHandles(E),e?.valid&&null!=a&&this.addHandles([this._buildObserverManipulatorDragPipeline(e),this._buildMoveManipulationDragPipeline(e),this._buildFOVDragPipeline(e),this._buildScaleOrientDragPipeline(e)].filter(t),E))},d),this._updatingHandles.add(()=>{const e=this.viewshedComputedData;return e?.valid?{viewshedCompData:e,target:e.elevationAlignedTargetRenderSpace,hFOV:e.horizontalFieldOfView,vFOV:e.verticalFieldOfView}:null},e=>{null!=e&&this._fieldOfViewManipulation.updateManipulatorsTransform(e.viewshedCompData)},d),this._updatingHandles.add(()=>{const e=this.viewshedComputedData;return e?.valid?{viewshedCompData:e,hFOV:e.horizontalFieldOfView,vFOV:e.verticalFieldOfView,tilt:e.tilt}:null},e=>{null!=e&&this._fieldOfViewManipulation.updateManipulatorVisuals(e.viewshedCompData)},d),this._updatingHandles.add(()=>{const{viewshedComputedData:e,analysisViewData:i}=this,t=i.visible&&(e?.valid??!1),a=i.selectedViewshed===e?.viewshed,n=t&&a,r=e?.effectiveElevationInfo.mode;return{controlsAvailable:n,selected:a,visibleAndValid:t,zManipulationAvailable:n&&"on-the-ground"!==r}},({controlsAvailable:e,selected:i,visibleAndValid:t,zManipulationAvailable:a})=>{this._moveManipulation.available=e,this._moveManipulation.zManipulation.available=a,this._scaleOrientManipulation.available=e,this._observerManipulator.available=t,this._observerManipulator.collisionPriority=i?2:0,this._fieldOfViewManipulation.available=e},d),this._updatingHandles.add(()=>{const e=this.viewshedComputedData;if(!e?.valid)return null;const{observer:i,target:t,verticalFieldOfView:a,horizontalFieldOfView:n}=e;return{viewshedCompData:e,observer:i,target:t,verticalFieldOfView:a,horizontalFieldOfView:n}},e=>{null!=e&&this._scaleOrientManipulation.updateManipulators(e.viewshedCompData)},d)]);const e=e=>{this.addHandles([e.events.on("grab-changed",i=>{this._grabbing="start"===i.action,"end"===i.action&&this.parentTool.updateInteractionVisualsVisibility(),this.parentTool.subToolHandles.forEach(({subTool:e})=>{e!==this&&e._setInteractive(!this._grabbing)}),this._setInteractive(i=>i===e||!this._grabbing)}),e.events.on("drag",e=>{"start"===e.action&&this.parentTool.updateInteractionVisualsVisibility()})])};this._forEachManipulator(e)}destroy(){this._observerManipulatedObject=s(this._observerManipulatedObject),this._moveManipulation=s(this._moveManipulation),this._fieldOfViewManipulation=s(this._fieldOfViewManipulation),this._scaleOrientManipulation=s(this._scaleOrientManipulation),this.parentTool.manipulators.remove(this._observerManipulator),this._observerManipulator=s(this._observerManipulator),this._updatingHandles.destroy()}get updating(){return this._updatingHandles.updating}get viewshed(){return this.viewshedComputedData?.viewshed}get grabbing(){return this._grabbing}get observer(){return this.viewshed?.observer}set observer(e){const i=this.viewshed;null!=i&&(i.observer=e)}get elevationAlignedObserverRenderSpace(){return this.viewshedComputedData?.elevationAlignedObserverRenderSpace}get discManipulator(){return this._moveManipulation.xyManipulation.discManipulator}get observerManipulator(){return this._observerManipulator}get observerManipulatedObject(){return this._observerManipulatedObject}get moveInteractionState(){const{dragging:e,grabbing:i}=this._moveManipulation;return{dragging:e||this._observerManipulator.dragging,grabbing:i||this._observerManipulator.grabbing}}get scaleOrientInteractionState(){const{dragging:e,grabbing:i}=this._scaleOrientManipulation;return{dragging:e,grabbing:i}}_setInteractive(e){const i="boolean"==typeof e;this._observerManipulator.interactive=i?e:e(this._observerManipulator),this._forEachManipulation(t=>{t.interactive=i?e:t.someManipulator(e)})}onManipulatorSelectionChanged(){if(!this._someManipulatorSelected()){this.analysisViewData.selectedViewshed===this.viewshed&&(this.analysisViewData.selectedViewshed=null)}}hasManipulator(e){let i=!1;return this._forEachManipulator(t=>{i=i||t===e}),i}_someManipulatorSelected(){return this._moveManipulation.selected||this._observerManipulator.selected||this._fieldOfViewManipulation.selected||this._scaleOrientManipulation.selected}_createMoveManipulation(){return new S({view:this.view,tool:this.parentTool,snapToScene:!1,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:!0,radius:x})}_buildObserverManipulatorDragPipeline(e){const{effectiveElevationInfo:i,viewshed:t}=e,a=this._observerManipulatedObject,n=a.operations;if(null==n)return null;const r=n.data.spatialReference;return C(this._observerManipulator,(e,o,s,l)=>{const{parentTool:p,view:d}=this,{intersector:u,snappingManager:c}=p,{geometry:h}=n.data;if("point"!==h.type)return;const v=t.feature,b=T(a);s=s.next(e=>(t.feature=v,b(e)));const g=p.createObserverMoveSnappingPipeline(0,l,i,!0);let M=o.next(j(d,h,i,r)).next(A(d,i));if(null!=g){const{snappingStep:e,cancelSnapping:i}=g;s.next(i),M=M.next(...e)}M.next(e=>(t.feature=m({intersector:u,snappingManager:c,screenPoint:e.screenEnd,view:d}),e)).next(F(a))})}_buildMoveManipulationDragPipeline(e){const{effectiveElevationInfo:i}=e,t=this._observerManipulatedObject,a=t.operations;return null==a?null:this._moveManipulation.createDragPipeline((e,a,n,r,o)=>{r=r.next(T(t));const s=this.parentTool.createObserverMoveSnappingPipeline(e,o,i);if(null!=s){const{snappingStep:e,cancelSnapping:a}=s;return r=r.next(a),{steps:n=n.next(P(this.view,i)).next(...e).next(F(t)),cancel:r}}return{steps:n=n.next(F(t)),cancel:r}},i,a.data.spatialReference,void 0)}_buildFOVDragPipeline(e){let i=0,t=0;return this._fieldOfViewManipulation.createDragPipeline((n,r,o)=>{if(null==e)return{steps:r,cancel:o};const s=e.viewshed;let l=null;o=o.next(H(s,["horizontalFieldOfView","verticalFieldOfView"]));return{steps:r.next(n=>{"start"===n.action&&(l=null,i=e.horizontalFieldOfView,t=e.verticalFieldOfView);const r=n.deltaAngle;if(null==l&&0!==r){const e="bottom"===n.side||"left"===n.side?r>0:r<0;l=w(n.side)?0===i&&e||360===i&&!e:0===t&&e}const o=l?O(n.side):n.side;let p=0;switch(o){case"left":p=i/2-r;break;case"right":p=i/2+r;break;case"top":p=t+2*r;break;case"bottom":p=t-2*r}return w(o)?(p=a.normalize(p),p=p>270?0:p>180?180:p,s.horizontalFieldOfView=2*p):s.verticalFieldOfView=p,n}),cancel:o}},e)}_buildScaleOrientDragPipeline(e){let i=0,t=0;const n=(i,t)=>(a,n,r)=>{if(null==e)return{steps:n,cancel:r};const o=e.viewshed;return r=r.next(H(o,[i])),{steps:n=n.next(t(o,e)),cancel:r}};return r([this._scaleOrientManipulation.createHeadingDragPipeline(n("heading",(i,n)=>n=>("start"===n.action&&(t=e.heading),i.heading=a.normalize(t+n.deltaAngle),n)),e),this._scaleOrientManipulation.createTiltDragPipeline(n("tilt",(t,a)=>a=>{"start"===a.action&&(i=e.tilt);let n=i+a.deltaAngle;return n<-90?n=180:n>270&&(n=0),t.tilt=R.clamp(n),a}),e),this._scaleOrientManipulation.createDistanceDragPipeline(n("farDistance",(e,i)=>t=>{const a=h(I,t.renderEnd,i.elevationAlignedObserverRenderSpace),n=v(a)*i.metersPerUnit,r=b(a,i.targetDirection)<0?f.scaleOrientMinDistance:n;return e.farDistance=r,t}),e)])}_forEachManipulator(e){this._forEachManipulation(i=>{i.forEachManipulator(e)}),e(this._observerManipulator)}_forEachManipulation(e){e(this._moveManipulation),e(this._fieldOfViewManipulation),e(this._scaleOrientManipulation)}get test(){return{observerManipulator:this._observerManipulator,moveManipulation:this._moveManipulation,fieldOfViewManipulation:this._fieldOfViewManipulation,scaleOrientManipulation:this._scaleOrientManipulation,viewshedComputedData:this.viewshedComputedData}}};e([u({constructOnly:!0})],z.prototype,"analysis",void 0),e([u({constructOnly:!0})],z.prototype,"analysisViewData",void 0),e([u({constructOnly:!0})],z.prototype,"parentTool",void 0),e([u({constructOnly:!0,nonNullable:!0})],z.prototype,"view",void 0),e([u()],z.prototype,"updating",null),e([u()],z.prototype,"viewshed",null),e([u()],z.prototype,"_grabbing",void 0),e([u()],z.prototype,"grabbing",null),e([u()],z.prototype,"viewshedComputedData",void 0),e([u()],z.prototype,"observer",null),e([u()],z.prototype,"elevationAlignedObserverRenderSpace",null),z=e([c("esri.views.3d.analysis.Viewshed.ViewshedSubTool")],z);const I=g(),R=new n(0,180);export{z as ViewshedSubTool};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import e from"../../../../core/Accessor.js";import"../../../../core/has.js";import{destroyMaybe as i}from"../../../../core/maybe.js";import{watch as s,syncAndInitial as a}from"../../../../core/reactiveUtils.js";import{property as o,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as l}from"../../../../core/support/UpdatingHandles.js";import{detachToolFromView as r}from"./toolLifecycleUtils.js";import{ViewshedEditTool as p}from"./ViewshedEditTool.js";import{ViewshedPlacementController as d}from"./ViewshedPlacementController.js";import{
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../../../core/Accessor.js";import"../../../../core/has.js";import{destroyMaybe as i}from"../../../../core/maybe.js";import{watch as s,syncAndInitial as a}from"../../../../core/reactiveUtils.js";import{property as o,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as l}from"../../../../core/support/UpdatingHandles.js";import{detachToolFromView as r}from"./toolLifecycleUtils.js";import{ViewshedEditTool as p}from"./ViewshedEditTool.js";import{ViewshedPlacementController as d}from"./ViewshedPlacementController.js";import{newToolIntersector as c}from"../../../interactive/ToolIntersector.js";import{acquire as h}from"../../../interactive/snapping/SnappingManagerPool.js";import{setupSnappingToggleHandles as g}from"../../../interactive/snapping/snappingUtils.js";let u=class extends e{constructor(t){super(t),this._editTool=null,this._updatingHandles=new l}initialize(){const{view:t}=this,e=c(t.state.viewingMode);this._snappingManagerResult=h(t),this.addHandles(this._snappingManagerResult),this._placementController=new d({analysis:this.analysis,analysisViewData:this.analysisViewData,intersector:e,snappingManager:this._snappingManager,view:t,callbacks:{cancelTool:()=>{null!=t.activeTool&&(t.activeTool=null)},findViewshedComputedData:t=>this._findViewshedComputedData(t),isToolDestroyed:()=>this.destroyed,setSelectedViewshed:t=>{this.analysisViewData.selectedViewshed=t}}}),g(this),this.addHandles([s(()=>({creationState:this._placementController.creationState,interactive:this.analysisViewData.interactive}),({creationState:i,interactive:s})=>{if(!s)return this._placementController.cancelPlaceOperation(),void this._destroyEditTool();null==i?this._editTool||(this._editTool=new p({analysis:this.analysis,analysisViewData:this.analysisViewData,intersector:e,snappingManager:this._snappingManager,view:t}),t.tools.add(this._editTool)):this._destroyEditTool()},a),this._updatingHandles.add(()=>t.activeTool,t=>{null!=t&&t!==this._editTool&&null==this._placementController.creationState&&(this.analysisViewData.selectedViewshed=null)})])}destroy(){this._destroyEditTool(),i(this._placementController),this._updatingHandles.destroy()}get selectedViewshedComputedData(){return this._editTool?.selectedViewshedComputedData}get stagedViewshed(){return this._placementController.stagedViewshed}get active(){return this._placementController.active||(this._editTool?.active??!1)}get updating(){return this._updatingHandles.updating||this._placementController.updating||!!this._editTool?.updating}get creating(){return null!=this._placementController.creationState}get snappingOptions(){return this._snappingManager.options}set snappingOptions(t){this._snappingManager.options=t}get _snappingManager(){return this._snappingManagerResult.snappingManager}async place(t,e){if(this.analysisViewData.interactive=!0,this._destroyEditTool(),await this._placementController.startPlaceOperation(t,e),"single"===t)return{}}_findViewshedComputedData(t){return this.analysisViewData.viewshedComputedDataHandles?.find(e=>e.viewshedComputedData.viewshed===t)?.viewshedComputedData}_destroyEditTool(){const t=this._editTool;this._editTool=null,null!=t&&(r(this.view,t),i(t))}get test(){}};t([o({constructOnly:!0})],u.prototype,"view",void 0),t([o({constructOnly:!0})],u.prototype,"analysis",void 0),t([o({constructOnly:!0})],u.prototype,"analysisViewData",void 0),t([o()],u.prototype,"_placementController",void 0),t([o()],u.prototype,"_editTool",void 0),t([o()],u.prototype,"_snappingManagerResult",void 0),t([o()],u.prototype,"selectedViewshedComputedData",null),t([o()],u.prototype,"stagedViewshed",null),t([o()],u.prototype,"active",null),t([o()],u.prototype,"updating",null),t([o()],u.prototype,"creating",null),t([o()],u.prototype,"snappingOptions",null),u=t([n("esri.views.3d.analysis.Viewshed.ViewshedTool")],u);const m=u;export{m as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{destroyHandle as e}from"../../../../core/handleUtils.js";import{watch as n,syncAndInitial as r,sync as o,initial as t}from"../../../../core/reactiveUtils.js";import{createScreenPointArray as i}from"../../../../core/screenUtils.js";import{ViewshedDrawToolRenderer as a}from"./ViewshedDrawToolRenderer.js";import{isValidIntersectorResult as s}from"../../webgl-engine/lib/IntersectorResult.js";import{toGraphic as l}from"../../webgl-engine/lib/intersectorUtilsConversions.js";import{DrawTool as c}from"../../../draw/DrawTool.js";
|
|
2
|
+
import{destroyHandle as e}from"../../../../core/handleUtils.js";import{watch as n,syncAndInitial as r,sync as o,initial as t}from"../../../../core/reactiveUtils.js";import{createScreenPointArray as i}from"../../../../core/screenUtils.js";import{ViewshedDrawToolRenderer as a}from"./ViewshedDrawToolRenderer.js";import{isValidIntersectorResult as s}from"../../webgl-engine/lib/IntersectorResult.js";import{toGraphic as l}from"../../webgl-engine/lib/intersectorUtilsConversions.js";import{DrawTool as c}from"../../../draw/DrawTool.js";function d(i){const{analysisViewData:s,snappingManager:l,view:d,toolOptions:p,elevationInfo:u,getSnapToSceneEnabled:b,onCancel:m,onComplete:g,onManipulatorCountChange:j,isPlacingObserver:f}=i,w=new a({view:d,isPlacingObserver:f}),I=new c({elevationInfo:u,enableVertexVisuals:!1,hasZ:!0,renderer:w,toolOptions:p,snappingManager:l,view:d});return I.addHandles([e(w),I.on("cancel",()=>m(I)),I.on("complete",()=>g(I)),n(()=>[I.surfaceManager,b()],([e,n])=>{e&&(e.snapToSceneEnabled=n)},r),n(()=>I.manipulators.length,()=>j(I),o),n(()=>s.visible,e=>w.analysisVisible=e,t)]),{drawTool:I,renderer:w}}function p({intersector:e,snappingManager:n,screenPoint:r,view:o}){const t=n.getMainFeatureCandidate();return t?b(t):r?u(r,o,e):null}function u(e,n,r){n.sceneIntersectionHelper.intersectToolIntersectorScreen(i(e.x,e.y),r);const o=r.results.min;return s(o)?l(o,n):null}function b(e){const n={id:e.layer.id,objectIdField:"objectIdField"in e.layer?e.layer.objectIdField:void 0};return{attributes:{[n.objectIdField??"ObjectId"]:e.objectId},layer:n,objectId:e.objectId,uid:null}}export{d as createDrawTool,p as getFeatureReference};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../../../core/Error.js";import has from"../../../../core/has.js";import{px2pt as t,pt2px as r}from"../../../../core/screenUtils.js";import{fromValues as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{copy as a}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{ZEROS as s,clone as o,ones as l}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as n,fromBuffer as c,intersectsClippingArea as h,empty as p,expandWithAABB as m,expandWithBuffer as d}from"../../../../geometry/support/aaBoundingBox.js";import{getDriverAxisSizeValueAny as u}from"../../../../renderers/support/renderingInfoUtils.js";import{sharedGeometryElevationAligner as _}from"./ElevationAligners.js";import{elevationModeChangeUpdateType as y,needsElevationUpdates2D as f}from"./elevationAlignmentUtils.js";import{Graphics3DDrapedGraphicLayer as g}from"./Graphics3DDrapedGraphicLayer.js";import{Graphics3DObject3DGraphicLayer as b}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as v,nanFallbackColor as C}from"./Graphics3DSymbolLayer.js";import{parseCapType as P,computeSymbolLayerIndex as S,parseLineMarkerStyle as k}from"./lineUtils.js";import{initFastSymbolUpdatesState as w,updateFastSymbolUpdatesState as M,getAttributeValue as z,getSizeAttributeValue as L,ConvertOptions as O}from"../support/FastSymbolUpdates.js";import{debugFlags as x}from"../../support/debugFlags.js";import{createGeometry as U}from"../../support/engineContent/line.js";import{geometryToRenderInfo as E,geometryToRenderInfoDraped as V}from"../../support/renderInfoUtils/line.js";import{Object3D as j}from"../../webgl-engine/lib/Object3D.js";import{RenderGeometry as A}from"../../webgl-engine/lib/RenderGeometry.js";import{LineMarkerMaterial as D}from"../../webgl-engine/materials/LineMarkerMaterial.js";import{getStipplePatternForLinePattern as F,patternHidesLine as G}from"../../webgl-engine/materials/lineStippleUtils.js";import{RibbonLineMaterial as I}from"../../webgl-engine/materials/RibbonLineMaterial.js";const R=["polyline"];class W extends v{static{this.elevationModeChangeTypes={definedChanged:2,staysOnTheGround:0,onTheGroundChanged:2}}constructor(e,t,r,i){super(e,t,r,i,T(t))}async doLoad(){this._fastUpdates=w(this._context.renderer,this._fastVisualVariableConvertOptions());const r=!0;if(this._fastMarkerUpdates=w(this._context.renderer,this._fastVisualVariableConvertOptions(r)),!this._drivenProperties.size){if((null!=this.symbolLayer.size?this.symbolLayer.size:t(1))<0)throw new e("graphics3dlinesymbollayer:invalid-size","Symbol sizes may not be negative values")}}_getMaterialParameters(e,t){const r=this._screenSizePerspective,i=!!has("enable-feature:emissive-on-non-volumetric")&&!this.draped,{symbolLayer:a}=this,s=this._worldSizedEnabled,o={...this._getMaterialColorParameters(t),shadingEnabled:i,width:this._computeMaterialWidth(a?.size,s),worldSized:s,polygonOffset:3,polygonOffsetIndex:S(this._renderPriority,this._renderPriorityStep),join:a.join||"miter",cap:P(a.cap||"butt"),hasSlicePlane:this._context.slicePlaneEnabled,isClosed:e,stipplePattern:F(a.pattern??a.imagePattern),emissiveStrength:this._emissiveStrength,screenSizePerspective:r};return 4===t&&this._fastMarkerUpdates?.visualVariables?{...o,...this._fastMarkerUpdates.materialParameters}:this._fastUpdates?.visualVariables?{...o,...this._fastUpdates.materialParameters}:o}_getMaterialColorParameters(e){const t=4===e,r=this._getCombinedOpacityAndColor(t&&this._markerColor||this._materialColor);return this._patternHidesLine&&!t&&(r[3]=0),{color:r}}get _materialColor(){return this.symbolLayer.material?.color}get _emissiveStrength(){const e=this.symbolLayer.material?.emissive;return("color"===e?.source?e?.strength:void 0)??0}get _markerColor(){return this.symbolLayer.marker?.color}get _lineMaterial(){return null==this._materials[0]&&(this._materials[0]=new I(this._getMaterialParameters(!1,0),this.view.state.isGlobal)),this._materials[0]}get _wireframeLineMaterial(){return null==this._materials[2]&&(this._materials[2]=new I({...this._getMaterialParameters(!1,2),wireframe:!0},this.view.state.isGlobal)),this._materials[2]}get _markerMaterial(){return null==this._materials[4]&&null!=this.symbolLayer.marker&&(this._materials[4]=new D({...this._getMaterialParameters(!1,4),placement:this.symbolLayer.marker.placement,markerPrimitive:k(this.symbolLayer.marker.style)},this.view.state.isGlobal)),this._materials[4]}_getDrivenSize(e){if(this._drivenProperties.size){const t=e.size;if(null==t)return this._getFallbackSize();const r=u(t.output);return this._getWorldOrScreenSize(r)}return 1}_getDrivenColor({color:e,opacity:t}){const r=l();return this._drivenProperties.color&&(a(r,e?.output??this._getFallbackOpacityAndColor(s)),null==t)||this._drivenProperties.opacity&&(e||this._materialColor)&&(r[3]=t?.output??this._getFallbackOpacity()),r}_getDrivenMarkerColor({color:e,opacity:t}){const r=l();return this._drivenProperties.color&&(a(r,e?.output??this._getFallbackMarkerOpacityAndColor(s)),null==t)||this._drivenProperties.opacity&&(e||this._markerColor||this._materialColor)&&(r[3]=t?.output??this._getFallbackMarkerOpacity()),r}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validatePolylineContext(e))return null;const r=this.createElevationContextForGraphic(t),i="on-the-ground"===r.mode;return"line-3d"===this.symbol.type&&this.symbol.worldSized&&!i?(this.logger.warnOnce("World-sized LineSymbol3DLayer can only be displayed in layers with 'on-the-ground' elevation mode; graphic skipped"),null):(this.ensureDrapedStatus(i),this.draped?this._createAsOverlay(e):this._createAs3DShape(e,r,t.uid))}_validatePolylineContext(e){const t=e.graphic.geometry;return this._validateGeometry(t,R,this.symbolLayer.type)&&"polyline"===t.type}applyRendererDiff(e,t){for(const r in e.diff){if("visualVariables"!==r)return 0;{const e=this._fastUpdates;if(!M(e,t,this._fastVisualVariableConvertOptions()))return 0;for(const t of this._materials)t instanceof I&&t.setParameters(e.materialParameters);const r=this._fastMarkerUpdates,i=!0;if(!M(r,t,this._fastVisualVariableConvertOptions(i)))return 0;for(const t of this._materials)t instanceof D&&t.setParameters(r.materialParameters)}}return 2}prepareSymbolLayerPatch(e){if("partial"!==e.diff.type)return;const t=e.diff.diff,r={};"complete"===t.size?.type&&(r.width=this._computeMaterialWidth(t.size.newValue,this._worldSizedEnabled),delete t.size),"complete"===t.cap?.type&&(r.cap=P(t.cap.newValue??"butt"),delete t.cap);const i=this._prepareMarkerPatch(e,t);this._prepareMaterialPatch(e,t,i),e.symbolLayerStatePatches.push(()=>{for(const e of this._materials)e?.setParameters(r)})}layerOpacityChanged(){for(let e=0;e<5;e++)this._materials[e]?.setParameters(this._getMaterialColorParameters(e))}get _screenSizePerspective(){return!this.draped&&this._context.screenSizePerspectiveEnabled?this.view.screenSizePerspective.parameters:null}layerScreenSizePerspectiveChanged(){const e=this._screenSizePerspective;for(const t of this._materials)t?.setParameters({screenSizePerspective:e})}layerElevationInfoChanged(e,t,r){const i=this._elevationContext.mode,a=y(W.elevationModeChangeTypes,r,i);if(1!==a)return a;const s=f(i);return this.updateGraphics3DGraphicElevationInfo(e,t,()=>s)}slicePlaneEnabledChanged(){const e={hasSlicePlane:this._context.slicePlaneEnabled};for(const t of this._materials)t?.setParameters(e);return!0}physicalBasedRenderingChanged(){return!0}_createAs3DShape(e,t,r){const i=H(e.graphic.geometry);if(null==i)return null;const a=new Array,s=n(),o=E(i,this._context.elevationProvider,this._context.renderCoordsHelper,t);this._logGeometryCreationWarnings(o,i.paths,"paths","LineSymbol3DLayer");for(let n=0;n<o.lines.length;n++){const t=o.lines[n],l=t.position,p=t.mapPositions;if(null!=this._context.clippingExtent&&(c(p,s),!h(s,this._context.clippingExtent)))continue;const m=this._createGeometry(this._lineMaterial,e,l,p,i.type,1,r);if(a.push(m),x.LINE_WIREFRAMES&&a.push(m.instantiate({material:this._wireframeLineMaterial})),null!=this._markerMaterial){const t=m.instantiate({material:this._markerMaterial});t.attributes.has("color")&&t.setAttributeData("color",this._getDrivenMarkerColor(e.renderingInfo)),a.push(t)}}if(0===a.length)return null;const l=this._context.layerViewUid,p=new j({geometries:a,castShadow:!1,layerViewUid:l,graphicUid:r}),m=new b(this,p,null,_,t);return m.alignedSampledElevation=o.sampledElevation,m.needsElevationUpdates=f(t.mode),m}_createGeometry(e,t,r,i,a,s,o){const l=0===s?{spatialReference:this._context.overlaySR,renderCoordsHelper:this._context.renderCoordsHelper}:null,n="polygon"===a,c=this._fastUpdates?.visualVariables.color,h=this._fastUpdates?.visualVariables.size,p=this._fastUpdates?.visualVariables.opacity,m=this._context.layerViewUid,d=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:o,layerViewUid:m}),{renderingInfo:u}=t,_={position:r,size:h?null:this._getDrivenSize(u),color:c?null:this._getDrivenColor(u),sizeFeature:h?L(h,u.size):null,colorFeature:c?z(c,u.color):null,opacityFeature:p?z(p,u.opacity):null};return U(e,{overlayInfo:l,removeDuplicateStartEnd:n,mapPositions:i,attributeData:_},d)}_createAsOverlay(e){const t=e.graphic,{geometry:r}=t;this._lineMaterial.renderPriority=this._renderPriority;const i=x.LINE_WIREFRAMES?this._wireframeLineMaterial:null,a=this._markerMaterial;null!=i&&(i.renderPriority=this._renderPriority-.001),null!=a&&(a.renderPriority=this._renderPriority-.002);const s=new Array,o=n(),l=p(),u=V(r,this._context.overlaySR);this._logGeometryCreationWarnings(u,r.paths,"paths","LineSymbol3DLayer");for(const n of u.lines){if(c(n.position,o),!h(o,this._context.clippingExtent))continue;m(l,o);const p=this._createGeometry(this._lineMaterial,e,n.position,void 0,r.type,0,t.uid),u=e=>{const r=this._context.layerViewUid,i=new A(e,{layerViewUid:r,graphicUid:t.uid});s.push(i)};if(null!=a){const t=p.instantiate({material:a});t.attributes.has("color")&&t.setAttributeData("color",this._getDrivenMarkerColor(e.renderingInfo)),u(t);const r=this.symbolLayer.marker.placement;"begin"!==r&&"begin-end"!==r||d(o,n.position,0,1),"end"!==r&&"begin-end"!==r||d(o,n.position,n.position.length-3,1)}u(p),x.LINE_WIREFRAMES&&u(p.instantiate({material:i}))}return new g(this,s,l,this._context.drapeSourceRenderer)}get _patternHidesLine(){return G(this.symbolLayer.pattern)}_computeMaterialWidth(e,i){return i?e??1:(e=e??t(1),this._drivenProperties.size?this._fastUpdates?.visualVariables.size?r(1):1:r(e))}_prepareMaterialPatch(e,t,r){const i=t.material;if(null==i)return void(r.changed&&r.useMaterialColor&&B(this._getCombinedOpacityAndColor(this._materialColor),this._materials[4],e));if("collection"===i.type)return;const a="complete"===i.type?i.newValue?.color:"complete"===i.diff.color?.type?i.diff.color.newValue:null,s=this._getCombinedOpacityAndColor(a);r.useMaterialColor&&B(o(s),this._materials[4],e),this._patternHidesLine&&(s[3]=0),B(s,this._materials[0],e),delete t.material}_prepareMarkerPatch(e,t){const r=t.marker,i=this._markerMaterial;if(null==r||"partial"!==r.type||null==r.diff||null!=r.diff.placement||null!=r.diff.style&&"complete"!==r.diff.style.type||null!=r.diff.color&&"complete"!==r.diff.color.type||null==i)return{changed:!1,useMaterialColor:null==this._markerColor};const a=r.diff.color,s=null!=a,o=s?a.newValue:null,l=null==o&&null==this._markerColor;o&&B(this._getCombinedOpacityAndColor(o),i,e);const n=r.diff.style?.newValue;return n&&e.symbolLayerStatePatches.push(()=>i.setParameters({markerPrimitive:k(n)})),delete t.marker,{changed:s,useMaterialColor:l}}_fastVisualVariableConvertOptions(e=!1){const t=this._getFallbackSize();return new O({supports:{size:!0,color:!0,rotation:!1,opacity:!0},fallbackColor:e?this._getFallbackMarkerOpacityAndColor(C):this._getFallbackOpacityAndColor(C),fallbackSize:i(t,t,t)})}_getFallbackOpacityAndColor(e){return this._materialColor?.toUnitRGBA()??e}_getFallbackOpacity(){return this._materialColor?.a??0}_getFallbackMarkerOpacityAndColor(e){return this.symbolLayer?.marker?.color?.toUnitRGBA()??this._getFallbackOpacityAndColor(e)}_getFallbackMarkerOpacity(){return this.symbolLayer?.marker?.color?.a??this._getFallbackOpacity()}get _worldSizedEnabled(){return"line-3d"===this.symbol.type&&this.symbol.worldSized&&this.draped}_getWorldOrScreenSize(e){return this._worldSizedEnabled?e:r(e)}_getFallbackSize(){const e=this.symbolLayer?.size;return null==e?1:this._getWorldOrScreenSize(e)}}function H(e){return"polyline"===e.type?e:null}function B(e,t,r){null!=t&&r.symbolLayerStatePatches.push(()=>t.setParameters({color:e}))}function T(e){return 1===(e.material?.color?.a??1)&&1===(e.marker?.color?.a??1)}export{W as Graphics3DLineSymbolLayer};
|
|
2
|
+
import e from"../../../../core/Error.js";import has from"../../../../core/has.js";import{px2pt as t,pt2px as r}from"../../../../core/screenUtils.js";import{fromValues as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{copy as a}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{ZEROS as s,clone as o,ones as l}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as n,fromBuffer as c,intersectsClippingArea as h,empty as p,expandWithAABB as m,expandWithBuffer as d}from"../../../../geometry/support/aaBoundingBox.js";import{getDriverAxisSizeValueAny as u}from"../../../../renderers/support/renderingInfoUtils.js";import{sharedGeometryElevationAligner as _}from"./ElevationAligners.js";import{elevationModeChangeUpdateType as y,needsElevationUpdates2D as f}from"./elevationAlignmentUtils.js";import{Graphics3DDrapedGraphicLayer as g}from"./Graphics3DDrapedGraphicLayer.js";import{Graphics3DObject3DGraphicLayer as b}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as v,nanFallbackColor as C}from"./Graphics3DSymbolLayer.js";import{parseCapType as P,computeSymbolLayerIndex as S,parseLineMarkerStyle as k}from"./lineUtils.js";import{initFastSymbolUpdatesState as w,updateFastSymbolUpdatesState as M,getAttributeValue as z,getSizeAttributeValue as L,ConvertOptions as O}from"../support/FastSymbolUpdates.js";import{debugFlags as x}from"../../support/debugFlags.js";import{createGeometry as U}from"../../support/engineContent/line.js";import{geometryToRenderInfo as E,geometryToRenderInfoDraped as V}from"../../support/renderInfoUtils/line.js";import{Object3D as j}from"../../webgl-engine/lib/Object3D.js";import{RenderGeometry as A}from"../../webgl-engine/lib/RenderGeometry.js";import{LineMarkerMaterial as D}from"../../webgl-engine/materials/LineMarkerMaterial.js";import{getStipplePatternForLinePattern as F,patternHidesLine as G}from"../../webgl-engine/materials/lineStippleUtils.js";import{RibbonLineMaterial as I}from"../../webgl-engine/materials/RibbonLineMaterial.js";const R=["polyline"];class W extends v{static{this.elevationModeChangeTypes={definedChanged:2,staysOnTheGround:0,onTheGroundChanged:2}}constructor(e,t,r,i){super(e,t,r,i,T(t))}async doLoad(){this._fastUpdates=w(this._context.renderer,this._fastVisualVariableConvertOptions());const r=!0;if(this._fastMarkerUpdates=w(this._context.renderer,this._fastVisualVariableConvertOptions(r)),!this._drivenProperties.size){if((null!=this.symbolLayer.size?this.symbolLayer.size:t(1))<0)throw new e("graphics3dlinesymbollayer:invalid-size","Symbol sizes may not be negative values")}}_getMaterialParameters(e,t){const r=this._screenSizePerspective,i=!!has("enable-feature:emissive-on-non-volumetric")&&!this.draped,{symbolLayer:a}=this,s=this._worldSizedEnabled,o={...this._getMaterialColorParameters(t),shadingEnabled:i,width:this._computeMaterialWidth(a?.size,s),worldSized:s,polygonOffset:3,polygonOffsetIndex:S(this._renderPriority,this._renderPriorityStep),join:a.join||"miter",cap:P(a.cap||"butt"),hasSlicePlane:this._context.slicePlaneEnabled,isClosed:e,stipplePattern:F(a.pattern??a.imagePattern),emissiveStrength:this._emissiveStrength,screenSizePerspective:r};if(2===t){if(this._fastMarkerUpdates?.visualVariables)return{...o,...this._fastMarkerUpdates.materialParameters}}else if(this._fastUpdates?.visualVariables)return{...o,...this._fastUpdates.materialParameters};return o}_getMaterialColorParameters(e){const t=2===e,r=this._getCombinedOpacityAndColor(t&&this._markerColor||this._materialColor);return this._patternHidesLine&&!t&&(r[3]=0),{color:r}}get _materialColor(){return this.symbolLayer.material?.color}get _emissiveStrength(){const e=this.symbolLayer.material?.emissive;return("color"===e?.source?e?.strength:void 0)??0}get _markerColor(){return this.symbolLayer.marker?.color}get _lineMaterial(){return this._materials[0]??=new I(this._getMaterialParameters(!1,0),this.view.state.isGlobal),this._materials[0]}get _wireframeLineMaterial(){return this._materials[1]??=new I({...this._getMaterialParameters(!1,1),wireframe:!0},this.view.state.isGlobal),this._materials[1]}get _markerMaterial(){return null==this._materials[2]&&null!=this.symbolLayer.marker&&(this._materials[2]=new D({...this._getMaterialParameters(!1,2),placement:this.symbolLayer.marker.placement,markerPrimitive:k(this.symbolLayer.marker.style)},this.view.state.isGlobal)),this._materials[2]}_getDrivenSize(e){if(this._drivenProperties.size){const t=e.size;if(null==t)return this._getFallbackSize();const r=u(t.output);return this._getWorldOrScreenSize(r)}return 1}_getDrivenColor({color:e,opacity:t}){const r=l();return this._drivenProperties.color&&(a(r,e?.output??this._getFallbackOpacityAndColor(s)),null==t)||this._drivenProperties.opacity&&(e||this._materialColor)&&(r[3]=t?.output??this._getFallbackOpacity()),r}_getDrivenMarkerColor({color:e,opacity:t}){const r=l();return this._drivenProperties.color&&(a(r,e?.output??this._getFallbackMarkerOpacityAndColor(s)),null==t)||this._drivenProperties.opacity&&(e||this._markerColor||this._materialColor)&&(r[3]=t?.output??this._getFallbackMarkerOpacity()),r}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validatePolylineContext(e))return null;const r=this.createElevationContextForGraphic(t),i="on-the-ground"===r.mode;return"line-3d"===this.symbol.type&&this.symbol.worldSized&&!i?(this.logger.warnOnce("World-sized LineSymbol3DLayer can only be displayed in layers with 'on-the-ground' elevation mode; graphic skipped"),null):(this.ensureDrapedStatus(i),this.draped?this._createAsOverlay(e):this._createAs3DShape(e,r,t.uid))}_validatePolylineContext(e){const t=e.graphic.geometry;return this._validateGeometry(t,R,this.symbolLayer.type)&&"polyline"===t.type}applyRendererDiff(e,t){for(const r in e.diff){if("visualVariables"!==r)return 0;{const e=this._fastUpdates;if(!M(e,t,this._fastVisualVariableConvertOptions()))return 0;for(const t of this._materials)t instanceof I&&t.setParameters(e.materialParameters);const r=this._fastMarkerUpdates,i=!0;if(!M(r,t,this._fastVisualVariableConvertOptions(i)))return 0;for(const t of this._materials)t instanceof D&&t.setParameters(r.materialParameters)}}return 2}prepareSymbolLayerPatch(e){if("partial"!==e.diff.type)return;const t=e.diff.diff,r={};"complete"===t.size?.type&&(r.width=this._computeMaterialWidth(t.size.newValue,this._worldSizedEnabled),delete t.size),"complete"===t.cap?.type&&(r.cap=P(t.cap.newValue??"butt"),delete t.cap);const i=this._prepareMarkerPatch(e,t);this._prepareMaterialPatch(e,t,i),e.symbolLayerStatePatches.push(()=>{for(const e of this._materials)e?.setParameters(r)})}layerOpacityChanged(){for(let e=0;e<3;e++)this._materials[e]?.setParameters(this._getMaterialColorParameters(e))}get _screenSizePerspective(){return!this.draped&&this._context.screenSizePerspectiveEnabled?this.view.screenSizePerspective.parameters:null}layerScreenSizePerspectiveChanged(){const e=this._screenSizePerspective;for(const t of this._materials)t?.setParameters({screenSizePerspective:e})}layerElevationInfoChanged(e,t,r){const i=this._elevationContext.mode,a=y(W.elevationModeChangeTypes,r,i);if(1!==a)return a;const s=f(i);return this.updateGraphics3DGraphicElevationInfo(e,t,()=>s)}slicePlaneEnabledChanged(){const e={hasSlicePlane:this._context.slicePlaneEnabled};for(const t of this._materials)t?.setParameters(e);return!0}physicalBasedRenderingChanged(){return!0}_createAs3DShape(e,t,r){const i=H(e.graphic.geometry);if(null==i)return null;const a=new Array,s=n(),o=E(i,this._context.elevationProvider,this._context.renderCoordsHelper,t);this._logGeometryCreationWarnings(o,i.paths,"paths","LineSymbol3DLayer");for(let n=0;n<o.lines.length;n++){const t=o.lines[n],l=t.position,p=t.mapPositions;if(null!=this._context.clippingExtent&&(c(p,s),!h(s,this._context.clippingExtent)))continue;const m=this._createGeometry(this._lineMaterial,e,l,p,i.type,1,r);if(a.push(m),x.LINE_WIREFRAMES&&a.push(m.instantiate({material:this._wireframeLineMaterial})),null!=this._markerMaterial){const t=m.instantiate({material:this._markerMaterial});t.attributes.has("color")&&t.setAttributeData("color",this._getDrivenMarkerColor(e.renderingInfo)),a.push(t)}}if(0===a.length)return null;const l=this._context.layerViewUid,p=new j({geometries:a,castShadow:!1,layerViewUid:l,graphicUid:r}),m=new b(this,p,null,_,t);return m.alignedSampledElevation=o.sampledElevation,m.needsElevationUpdates=f(t.mode),m}_createGeometry(e,t,r,i,a,s,o){const l=0===s?{spatialReference:this._context.overlaySR,renderCoordsHelper:this._context.renderCoordsHelper}:null,n="polygon"===a,c=this._fastUpdates?.visualVariables.color,h=this._fastUpdates?.visualVariables.size,p=this._fastUpdates?.visualVariables.opacity,m=this._context.layerViewUid,d=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:o,layerViewUid:m}),{renderingInfo:u}=t,_={position:r,size:h?null:this._getDrivenSize(u),color:c?null:this._getDrivenColor(u),sizeFeature:h?L(h,u.size):null,colorFeature:c?z(c,u.color):null,opacityFeature:p?z(p,u.opacity):null};return U(e,{overlayInfo:l,removeDuplicateStartEnd:n,mapPositions:i,attributeData:_},d)}_createAsOverlay(e){const t=e.graphic,{geometry:r}=t;this._lineMaterial.renderPriority=this._renderPriority;const i=x.LINE_WIREFRAMES?this._wireframeLineMaterial:null,a=this._markerMaterial;null!=i&&(i.renderPriority=this._renderPriority-.001),null!=a&&(a.renderPriority=this._renderPriority-.002);const s=new Array,o=n(),l=p(),u=V(r,this._context.overlaySR);this._logGeometryCreationWarnings(u,r.paths,"paths","LineSymbol3DLayer");for(const n of u.lines){if(c(n.position,o),!h(o,this._context.clippingExtent))continue;m(l,o);const p=this._createGeometry(this._lineMaterial,e,n.position,void 0,r.type,0,t.uid),u=e=>{const r=this._context.layerViewUid,i=new A(e,{layerViewUid:r,graphicUid:t.uid});s.push(i)};if(null!=a){const t=p.instantiate({material:a});t.attributes.has("color")&&t.setAttributeData("color",this._getDrivenMarkerColor(e.renderingInfo)),u(t);const r=this.symbolLayer.marker.placement;"begin"!==r&&"begin-end"!==r||d(o,n.position,0,1),"end"!==r&&"begin-end"!==r||d(o,n.position,n.position.length-3,1)}u(p),x.LINE_WIREFRAMES&&u(p.instantiate({material:i}))}return new g(this,s,l,this._context.drapeSourceRenderer)}get _patternHidesLine(){return G(this.symbolLayer.pattern)}_computeMaterialWidth(e,i){return i?e??1:(e=e??t(1),this._drivenProperties.size?this._fastUpdates?.visualVariables.size?r(1):1:r(e))}_prepareMaterialPatch(e,t,r){const i=t.material;if(null==i)return void(r.changed&&r.useMaterialColor&&B(this._getCombinedOpacityAndColor(this._materialColor),this._materials[2],e));if("collection"===i.type)return;const a="complete"===i.type?i.newValue?.color:"complete"===i.diff.color?.type?i.diff.color.newValue:null,s=this._getCombinedOpacityAndColor(a);r.useMaterialColor&&B(o(s),this._materials[2],e),this._patternHidesLine&&(s[3]=0),B(s,this._materials[0],e),delete t.material}_prepareMarkerPatch(e,t){const r=t.marker,i=this._markerMaterial;if(null==r||"partial"!==r.type||null==r.diff||null!=r.diff.placement||null!=r.diff.style&&"complete"!==r.diff.style.type||null!=r.diff.color&&"complete"!==r.diff.color.type||null==i)return{changed:!1,useMaterialColor:null==this._markerColor};const a=r.diff.color,s=null!=a,o=s?a.newValue:null,l=null==o&&null==this._markerColor;o&&B(this._getCombinedOpacityAndColor(o),i,e);const n=r.diff.style?.newValue;return n&&e.symbolLayerStatePatches.push(()=>i.setParameters({markerPrimitive:k(n)})),delete t.marker,{changed:s,useMaterialColor:l}}_fastVisualVariableConvertOptions(e=!1){const t=this._getFallbackSize();return new O({supports:{size:!0,color:!0,rotation:!1,opacity:!0},fallbackColor:e?this._getFallbackMarkerOpacityAndColor(C):this._getFallbackOpacityAndColor(C),fallbackSize:i(t,t,t)})}_getFallbackOpacityAndColor(e){return this._materialColor?.toUnitRGBA()??e}_getFallbackOpacity(){return this._materialColor?.a??0}_getFallbackMarkerOpacityAndColor(e){return this.symbolLayer?.marker?.color?.toUnitRGBA()??this._getFallbackOpacityAndColor(e)}_getFallbackMarkerOpacity(){return this.symbolLayer?.marker?.color?.a??this._getFallbackOpacity()}get _worldSizedEnabled(){return"line-3d"===this.symbol.type&&this.symbol.worldSized&&this.draped}_getWorldOrScreenSize(e){return this._worldSizedEnabled?e:r(e)}_getFallbackSize(){const e=this.symbolLayer?.size;return null==e?1:this._getWorldOrScreenSize(e)}}function H(e){return"polyline"===e.type?e:null}function B(e,t,r){null!=t&&r.symbolLayerStatePatches.push(()=>t.setParameters({color:e}))}function T(e){return 1===(e.material?.color?.a??1)&&1===(e.marker?.color?.a??1)}export{W as Graphics3DLineSymbolLayer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{lerp as t}from"../../../../../core/mathUtils.js";import{watch as r,initial as s}from"../../../../../core/reactiveUtils.js";import{subclass as i}from"../../../../../core/accessorSupport/decorators.js";import{set as a}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{getReferenceEllipsoid as o}from"../../../../../geometry/ellipsoidUtils.js";import{TransparentEnvironment as h}from"../TransparentEnvironment.js";import{B as n}from"../../../../../chunks/BlurEmission.glsl.js";import{BlurEmissionTechnique as l}from"./BlurEmissionTechnique.js";import{floatBlendReductionFactor as m}from"../../shaders/floatBlendScale.glsl.js";import{noParameters as p}from"../../../../webgl/NoParameters.js";let d=class extends h{constructor(e){super(e),this._glowBoost={realistic:0,cartographicMin:.5,cartographicDefault:
|
|
2
|
+
import{__decorate as e}from"tslib";import{lerp as t}from"../../../../../core/mathUtils.js";import{watch as r,initial as s}from"../../../../../core/reactiveUtils.js";import{subclass as i}from"../../../../../core/accessorSupport/decorators.js";import{set as a}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{getReferenceEllipsoid as o}from"../../../../../geometry/ellipsoidUtils.js";import{TransparentEnvironment as h}from"../TransparentEnvironment.js";import{B as n}from"../../../../../chunks/BlurEmission.glsl.js";import{BlurEmissionTechnique as l}from"./BlurEmissionTechnique.js";import{floatBlendReductionFactor as m}from"../../shaders/floatBlendScale.glsl.js";import{noParameters as p}from"../../../../webgl/NoParameters.js";let d=class extends h{constructor(e){super(e),this._glowBoost={realistic:0,cartographicMin:.5,cartographicDefault:3.5,cartographicMax:10},this._drawParameters=new n,this._ellipsoid=o(e.view.spatialReference)}initialize(){this.addHandles([r(()=>this._boost,e=>{this._passParameters.boost=e,this.requestRender(1)},s),r(()=>this.view.stage.renderView.fog?.strength??0,e=>{this._passParameters.scattering=e,this.requestRender(1)},s)])}precompile(){this._needsEmissionBlur&&this.techniques.precompile(l)}get _atmosphereRadius(){return this._ellipsoid.radius+this._ellipsoid.atmosphereHeight}_renderEmissionMipMap(){const e=this._passParameters.emission?.attachment;if(!e)return;this._drawParameters.input=e,this._drawParameters.inputScale=this.bindParameters.useFloatBlend.value?1:m,this._drawParameters.level=0,a(this._drawParameters.size,1,1);const t=Math.floor(.5*e.descriptor.width),r=Math.floor(.5*e.descriptor.height),s=this.fboCache,i=s.acquire(t,e.descriptor.height,"blur horizontal",8);let o,h=t,n=e.descriptor.height;const d=this.renderingContext,c=this.techniques.get(l),g=d.bindTechnique(c,this.bindParameters,p);for(;h>=1&&n>=1;)this._drawParameters.isHorizontal=!0,this._setupFBO(i,h,n),g.bindDraw(this.bindParameters,p,this._drawParameters),d.screen.draw(),n=Math.floor(.5*n),this._drawParameters.input=i.getTexture(),this._drawParameters.inputScale=1,this._drawParameters.isHorizontal=!1,a(this._drawParameters.size,h/t,n/r),o??=s.acquire(h,n,"blur mipmap",9),this._setupFBO(o,h,n,this._drawParameters.level),g.bindDraw(this.bindParameters,p,this._drawParameters),d.screen.draw(),s.debugCallback?.(o.name,o.fbo),h=Math.floor(.5*h),this._drawParameters.input=o.getTexture(),++this._drawParameters.level;i.release(),o&&(o.fbo.level=0),this._passParameters.mipmapLevels=this._drawParameters.level,this._passParameters.mipmapTexture=o,d.setViewport(0,0,e.descriptor.width,e.descriptor.height)}get _boost(){return 0===this._mode?this._glowBoost.realistic:this._intensity<=.5?t(this._glowBoost.cartographicMin,this._glowBoost.cartographicDefault,2*this._intensity):t(this._glowBoost.cartographicDefault,this._glowBoost.cartographicMax,2*(this._intensity-.5))}get _mode(){return null==this.view.environment.lighting.glow?this.view.environment.atmosphereEnabled?0:2:1}get _hasBlur(){return 2!==this._mode}get _intensity(){return this.view.environment.lighting.glow?.intensity??0}_setupFBO(e,t,r,s=0){e.fbo.level=s;const i=this.renderingContext;i.bindFramebuffer(e.fbo),i.setViewport(0,0,t,r),i.setClearColor(0,0,0,0),i.clear(16384)}};d=e([i("esri.views.3d.webgl-engine.effects.glow.BlurEmission")],d);export{d as BlurEmission};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{fetchAsset as t}from"../../../../../assets.js";import{createTask as s}from"../../../../../core/asyncUtils.js";import r from"../../../../../core/Error.js";import a from"../../../../../core/Logger.js";import{abortMaybe as i,disposeMaybe as n}from"../../../../../core/maybe.js";import{isAbortError as o,throwIfAborted as f}from"../../../../../core/promiseUtils.js";import{watch as d,initial as h,syncAndInitial as m}from"../../../../../core/reactiveUtils.js";import{subclass as c}from"../../../../../core/accessorSupport/decorators.js";import{copy as u,rotateZ as l,multiply as p,invertOrIdentity as b}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{squaredLength as _}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{getReferenceEllipsoid as g}from"../../../../../geometry/ellipsoidUtils.js";import{InternalRenderCategory as T}from"../../../webgl.js";import{
|
|
2
|
+
import{__decorate as e}from"tslib";import{fetchAsset as t}from"../../../../../assets.js";import{createTask as s}from"../../../../../core/asyncUtils.js";import r from"../../../../../core/Error.js";import a from"../../../../../core/Logger.js";import{abortMaybe as i,disposeMaybe as n}from"../../../../../core/maybe.js";import{isAbortError as o,throwIfAborted as f}from"../../../../../core/promiseUtils.js";import{watch as d,initial as h,syncAndInitial as m}from"../../../../../core/reactiveUtils.js";import{subclass as c}from"../../../../../core/accessorSupport/decorators.js";import{copy as u,rotateZ as l,multiply as p,invertOrIdentity as b}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{squaredLength as _}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{getReferenceEllipsoid as g}from"../../../../../geometry/ellipsoidUtils.js";import{InternalRenderCategory as T}from"../../../webgl.js";import{glLayout as w}from"../../../support/buffer/glUtil.js";import{OpaqueEnvironment as y}from"../OpaqueEnvironment.js";import{DeepSkyPassParameters as P,DeepSkyTechnique as x}from"./DeepSkyTechnique.js";import{StarPassParameters as v,StarsTechnique as k,layout as j}from"./StarsTechnique.js";import{getDailyRotationCoefficient as D,computeDayDuration as M,eq2ec as S,ec2eq as q}from"./starsUtils.js";import{createTextureKTX2 as L}from"../../lib/BasisUtil.js";import{VertexArrayObject as U}from"../../lib/VertexArrayObject.js";import{ColorAttachment0 as A,PrimitiveType as B}from"../../../../webgl/enums.js";import{TextureDescriptor as R}from"../../../../webgl/TextureDescriptor.js";import{VertexBuffer as E}from"../../../../webgl/VertexBuffer.js";let I=class extends y{constructor(){super(...arguments),this._numPoints=0,this._passParameters=new v,this._deepSkyPassParameters=new P}initialize(){this.addHandles([d(()=>this.view.environment.starsEnabled,e=>e?this._enable():this._disable(),h),d(()=>"virtual"===this.view.environment.lighting.type?null:this.view.environment.lighting.date,e=>this._update(e),m)])}_enable(){super._enable(),this._bandTextureTask=this._createLoadBandTextureTask(),this._loadDataTask=this._createLoadDataTask()}get loading(){return!!this._loadDataTask&&!this._loadDataTask.finished||!!this._bandTextureTask&&!this._bandTextureTask.finished}destroy(){this._bandTextureTask=i(this._bandTextureTask),this._bandTexture=n(this._bandTexture),this._loadDataTask=i(this._loadDataTask),this._numPoints=0,this._vao=n(this._vao),this._starData=null}render(e){const t=e.find(({name:e})=>e===T.OPAQUE_ENVIRONMENT),s=this.techniques.getCompiled(k),r=this.techniques.getCompiled(x);if(this.loading||!s||!r)return this.requestRender(1),t;const a=this.renderingContext;return this._bandTexture&&(this._deepSkyPassParameters.bandTexture=this._bandTexture,this._deepSkyPassParameters.heightAboveSeaLevelSquared=_(this.bindParameters.camera.eye),a.bindTechnique(r,this.bindParameters,this._deepSkyPassParameters),a.setDrawBuffers([A]),a.screen.draw()),this._starData&&(this._vao??=this._ensureResources(this._starData),a.bindTechnique(s,this.bindParameters,this._passParameters),a.setDrawBuffers([A]),a.bindVAO(this._vao),a.drawArrays(B.POINTS,0,this._numPoints)),t}_ensureResources(e){this._numPoints=e.byteLength/G;const t=new Float32Array(e,0,2*this._numPoints),s=new Uint8Array(e,2*this._numPoints*4,this._numPoints);return C(this.renderingContext,t,s,this._numPoints)}_update(e){const t=g(this.view.spatialReference).radius,s=.05*t,r=.3*t;if(this._deepSkyPassParameters.radiusCloseToGround=(t+r)**2,this._deepSkyPassParameters.radiusBrightnessTransitionEnd=(t+r+s)**2,!e)return;const a=D(e),i=2*M(e),n=u(this._passParameters.modelMatrix,S);l(n,n,-i*Math.PI),p(n,q,n),l(n,n,-a*Math.PI),b(this._deepSkyPassParameters.inverseModelMatrix,n),this.requestRender(1)}_createLoadDataTask(){if(this._starData)return null;const e=s(async e=>{const{data:s}=await t(V,{responseType:"array-buffer",signal:e});O(s),this._starData=s});return e.promise.catch(e=>{o(e)||a.getLogger(this).error(e)}).then(()=>{this.destroyed||this.requestRender(1)}),e}_createLoadBandTextureTask(){if(this._bandTexture)return null;const e=s(async e=>{const{data:s}=await t(z,{responseType:"array-buffer",signal:e});f(e);const a=new R;a.wrapMode=33071,a.maxAnisotropy=8;const i=await L(this.renderingContext,a,s);if(e.aborted&&(i?.dispose(),f(e)),!i)throw new r("stars:invalid-band-texture","Failed to transcode Milky Way band texture.");this._bandTexture=i});return e.promise.catch(e=>{o(e)||a.getLogger(this).warn("Failed to load Milky Way band texture.",e)}).then(()=>{this.destroyed||this.requestRender(1)}),e}};function C(e,t,s,r){const a=j.createBuffer(r),i=a.position,n=a.color,o=a.size;for(let f=0;f<r;f++){const e=t[2*f],r=t[2*f+1];i.set(f,0,-Math.cos(e)*Math.sin(r)),i.set(f,1,-Math.sin(e)*Math.sin(r)),i.set(f,2,-Math.cos(r));const a=N(s[f]),d=F(W[a[1]]);n.set(f,0,d[0]),n.set(f,1,d[1]),n.set(f,2,d[2]),n.set(f,3,255),o.set(f,a[0])}return new U(e,new E(e,w(j),a.buffer))}function O(e){if(!e)throw new r("stars:no-data-received","Failed to create stars because star catalogue is missing");const t=e.byteLength/G;if(t%1!=0||t>5e4||t<5e3)throw new r("stars:invalid-data","Failed to create stars because star catalogue data is invalid")}function F(e){return[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]}function N(e){return e>=192?[2.9,e-192]:e>=160?[2.5,e-160]:e>=128?[2,e-128]:e>=96?[1.5,e-96]:e>=64?[1,e-64]:e>=32?[.7,e-32]:[.4,e]}I=e([c("esri.views.3d.webgl-engine.effects.stars.Stars")],I);const V="esri/views/3d/environment/resources/stars.wsv",z="esri/views/3d/environment/resources/milkyway-band.ktx2",W=["9bb2ff","9eb5ff","aabfff","bbccff","ccd8ff ","dae2ff","e4e9ff","eeefff","f8f6ff","fff9fb","fff5ef","fff1e5","ffeddb","ffe9d2","ffe6ca","ffe3c3","ffe0bb","ffddb4","ffdaad","ffd6a5","ffd29c","ffcc8f","ffc178","ffa94b","ff7b00"],G=9;export{I as Stars};
|
|
@@ -58,8 +58,8 @@ export abstract class BreakpointsOwner {
|
|
|
58
58
|
/**
|
|
59
59
|
* A convenience property indicating the general size of the view's height. This value is
|
|
60
60
|
* determined based on where the view's [height](https://developers.arcgis.com/javascript/latest/references/core/views/View2D/#height) falls in the ranges defined
|
|
61
|
-
* in the [breakpoints](
|
|
62
|
-
* for a list of possible values. Use the [breakpoints](
|
|
61
|
+
* in the [breakpoints](https://developers.arcgis.com/javascript/latest/references/core/views/BreakpointsOwner/#breakpoints) property. See the table below
|
|
62
|
+
* for a list of possible values. Use the [breakpoints](https://developers.arcgis.com/javascript/latest/references/core/views/BreakpointsOwner/#breakpoints) property to
|
|
63
63
|
* override the default thresholds.
|
|
64
64
|
*
|
|
65
65
|
* > [!WARNING]
|