@arcgis/core 5.0.0-next.54 → 5.0.0-next.55
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 +4 -6
- package/Ground.js +1 -1
- package/WebScene.js +1 -1
- package/applications/Components/drawUtils.d.ts +8 -1
- package/applications/SceneViewer/sceneViewerUtils.d.ts +1 -2
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{18cc131fd63d8c15df54.js → 14765f98b8ea447498a1.js} +4 -4
- package/assets/esri/core/workers/chunks/{308fb48d080e01499a26.js → 436f206898306df019ac.js} +1 -1
- package/assets/esri/core/workers/chunks/{f2e8abb556a380cc2941.js → 492d575894c7905bb70c.js} +1 -1
- package/assets/esri/core/workers/chunks/5873c7b65d0fb04998fb.js +1 -0
- package/assets/esri/core/workers/chunks/d9736c783513e9c9b22f.js +1 -0
- package/assets/esri/core/workers/chunks/{cc67f066c3c0c2a1a37c.js → dd99b77a7c0a052507bb.js} +1 -1
- package/chunks/ChapmanAtmosphere.glsl.js +12 -9
- package/chunks/GlowComposition.glsl.js +1 -1
- package/chunks/Haze.glsl.js +4 -4
- package/chunks/RasterColorizer.glsl.js +10 -10
- package/chunks/Viewshed.glsl.js +1 -1
- package/config.js +1 -1
- package/geometry/projection/projectPointToVector.js +1 -1
- package/geometry/types.d.ts +10 -1
- package/interfaces.d.ts +21 -26
- package/kernel.js +1 -1
- package/layers/FeatureLayer.d.ts +6 -3
- package/layers/support/SubtypeSublayer.d.ts +13 -0
- package/package.json +1 -1
- package/smartMapping/labels/clusters.d.ts +1 -1
- package/support/groundUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/types.d.ts +6 -0
- package/views/2d/types.d.ts +3 -1
- package/views/3d/environment/ChapmanApproximation.glsl.js +9 -10
- package/views/3d/environment/ChapmanAtmosphere.glsl.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/environment/ChapmanAtmosphereTechnique.js +1 -1
- package/views/3d/environment/ChapmanRaymarching.glsl.js +1 -2
- package/views/3d/environment/CloudsParameters.js +1 -1
- package/views/3d/environment/EnvironmentManager.js +1 -1
- package/views/3d/environment/SceneViewEnvironment.d.ts +1 -1
- package/views/3d/environment/types.d.ts +13 -0
- package/views/3d/layers/ImageryLayerView3D.js +1 -1
- package/views/3d/webgl/ManagedFBO.d.ts +4 -5
- package/views/3d/webgl/RenderNode.d.ts +1 -1
- package/views/3d/{webgl-engine/lighting/SceneLighting.d.ts → webgl/types.d.ts} +4 -6
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/raster/RasterColorizer.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Float4sPassUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/effects/haze/HazeTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +5 -5
- package/views/SceneView.d.ts +14 -17
- package/views/VideoView.d.ts +1 -2
- package/views/View.d.ts +2 -3
- package/views/View2D.d.ts +1 -2
- package/views/draw/DrawOperation.js +1 -1
- package/views/draw/PolygonDrawAction.d.ts +1 -1
- package/views/draw/PolygonDrawAction.js +1 -1
- package/views/draw/PolylineDrawAction.d.ts +1 -1
- package/views/draw/PolylineDrawAction.js +1 -1
- package/views/draw/support/GraphicMover.js +1 -1
- package/views/draw/types.d.ts +3 -1
- package/views/interactive/sketch/Units.d.ts +5 -1
- package/views/layers/ImageryLayerViewMixin.d.ts +2 -3
- package/views/layers/support/highlightUtils.js +1 -1
- package/views/types.d.ts +69 -1
- package/views/ui/types.d.ts +12 -1
- package/webscene/Environment.d.ts +2 -2
- package/webscene/support/FeatureReference.d.ts +1 -1
- package/webscene/types.d.ts +5 -1
- package/widgets/BasemapGallery.d.ts +1 -1
- package/widgets/BasemapLayerList/BasemapLayerListViewModel.d.ts +1 -1
- package/widgets/BasemapLayerList.d.ts +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +1 -1
- package/widgets/BatchAttributeForm.d.ts +1 -1
- package/widgets/Bookmarks.d.ts +1 -2
- package/widgets/BuildingExplorer.d.ts +1 -1
- package/widgets/CatalogLayerList/CatalogLayerListViewModel.d.ts +1 -1
- package/widgets/CatalogLayerList.d.ts +1 -1
- package/widgets/Compass.d.ts +1 -1
- package/widgets/CoordinateConversion.d.ts +1 -2
- package/widgets/Daylight.d.ts +1 -1
- package/widgets/DirectionalPad/DirectionalPadViewModel.d.ts +1 -2
- package/widgets/DirectionalPad/{utils.d.ts → types.d.ts} +3 -1
- package/widgets/Directions.d.ts +1 -2
- package/widgets/Editor/EditorViewModel.d.ts +1 -2
- package/widgets/Editor/SplitFeatureWorkflow.d.ts +1 -2
- package/widgets/Editor/SplitFeatureWorkflowData.d.ts +1 -1
- package/widgets/Editor/types.d.ts +8 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.d.ts +2 -3
- package/widgets/Feature/types.d.ts +5 -1
- package/widgets/Feature.d.ts +1 -1
- package/widgets/FeatureForm/FieldInput.d.ts +1 -1
- package/widgets/FeatureForm.d.ts +1 -1
- package/widgets/FeatureTemplates.d.ts +1 -1
- package/widgets/Features/FeaturesViewModel.d.ts +1 -1
- package/widgets/Features.d.ts +1 -2
- package/widgets/FloorFilter.d.ts +1 -1
- package/widgets/Home.d.ts +1 -1
- package/widgets/LayerList/ListItemPanel.d.ts +1 -1
- package/widgets/LayerList/types.d.ts +2 -2
- package/widgets/LayerList.d.ts +1 -1
- package/widgets/Legend.d.ts +1 -1
- package/widgets/Locate.d.ts +1 -1
- package/widgets/Popup/types.d.ts +2 -0
- package/widgets/Popup.d.ts +1 -2
- package/widgets/Print.d.ts +1 -1
- package/widgets/Search.d.ts +1 -1
- package/widgets/ShadowCast/DurationOptions.d.ts +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.d.ts +1 -1
- package/widgets/ShadowCast/{ShadowVisualizationType.d.ts → types.d.ts} +4 -1
- package/widgets/ShadowCast.d.ts +1 -1
- package/widgets/Sketch/types.d.ts +1 -1
- package/widgets/Slice.d.ts +1 -1
- package/widgets/TableList.d.ts +1 -1
- package/widgets/Track.d.ts +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.d.ts +1 -1
- package/widgets/UtilityNetworkTrace/{support/ResultAreaHandler.d.ts → types.d.ts} +2 -2
- package/widgets/Weather/WeatherViewModel.d.ts +2 -2
- package/widgets/Weather.d.ts +1 -1
- package/widgets/support/GoTo.d.ts +1 -1
- package/widgets/support/forms/types.d.ts +2 -0
- package/widgets/support/{goToUtils.d.ts → types.d.ts} +8 -1
- package/assets/esri/core/workers/chunks/316f3e93aa0db48ef129.js +0 -1
- package/assets/esri/core/workers/chunks/ec7e6427d99cf3148a61.js +0 -1
- package/views/2d/ViewStateManager.d.ts +0 -2
- package/views/2d/layers/support/clusterUtils.d.ts +0 -6
- package/views/3d/environment/lightingUtils.d.ts +0 -4
- package/views/3d/environment/weather.d.ts +0 -9
- package/views/3d/glTF/internal/resourceUtils.d.ts +0 -10
- package/views/3d/interactive/visualElements/DrapedVisualElementResources.d.ts +0 -2
- package/views/3d/support/QualityProfile.d.ts +0 -2
- package/views/SceneViewHitTestResult.d.ts +0 -64
- package/views/ViewingMode.d.ts +0 -2
- package/views/draw/DrawingMode.d.ts +0 -2
- package/views/draw/support/drawUtils.d.ts +0 -7
- package/views/ui/Padding.d.ts +0 -11
- package/views/viewType.d.ts +0 -2
- package/views/webgl/enums.d.ts +0 -38
- package/webscene/support/featureReferenceUtils.d.ts +0 -4
- package/widgets/DirectionalPad/constants.d.ts +0 -2
- package/widgets/Editor/support/splitFeatureUtils.d.ts +0 -7
- package/widgets/Feature/support/arcadeFeatureUtils.d.ts +0 -4
- package/widgets/Popup/actions.d.ts +0 -4
- package/widgets/ShadowCast/DurationMode.d.ts +0 -3
- package/widgets/support/Heading.d.ts +0 -7
- package/widgets/support/forms/formUtils.d.ts +0 -2
- /package/views/animation/{easing.d.ts → types.d.ts} +0 -0
- /package/views/draw/{DrawingMode.js → drawingModes.js} +0 -0
|
@@ -23,6 +23,7 @@ import type { Loadable, LoadableMixinProperties } from "../../core/Loadable.js";
|
|
|
23
23
|
import type { MultiOriginJSONMixin, MultiOriginJSONMixinProperties } from "../../core/MultiOriginJSONSupport.js";
|
|
24
24
|
import type { FeatureLayerCapabilities } from "../types.js";
|
|
25
25
|
import type { EditOptions, Edits, EditsResult, FeatureEditResult } from "../graphics/editingSupport.js";
|
|
26
|
+
import type { FeatureTitleOptions } from "../mixins/properties/ILayerWithGetFeatureTitle.js";
|
|
26
27
|
import type { RequestOptions } from "../../request/types.js";
|
|
27
28
|
import type { AttachmentQueryProperties } from "../../rest/support/AttachmentQuery.js";
|
|
28
29
|
import type { QueryProperties } from "../../rest/support/Query.js";
|
|
@@ -688,6 +689,18 @@ export default class SubtypeSublayer extends SubtypeSublayerSuperclass {
|
|
|
688
689
|
* @see [capabilities.data.supportsAttachment](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#capabilities)
|
|
689
690
|
*/
|
|
690
691
|
deleteAttachments(feature: Graphic, attachmentIds: number[]): Promise<FeatureEditResult[]>;
|
|
692
|
+
/**
|
|
693
|
+
* Returns the title of a [feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html). The feature title is generated based on the following conditions for a `SubtypeSublayer`.
|
|
694
|
+
* - If the feature has a popup title configured, then the popup title will be returned.
|
|
695
|
+
* - Otherwise, the [objectId](#objectIdField) of the associated feature will be returned.
|
|
696
|
+
*
|
|
697
|
+
* @param graphic - The [graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) for which to generate a title.
|
|
698
|
+
* @param options - Additional options that control how the title is generated.
|
|
699
|
+
* @returns When resolved, returns the feature's title string.
|
|
700
|
+
* @method getFeatureTitle
|
|
701
|
+
* @since 4.34
|
|
702
|
+
*/
|
|
703
|
+
getFeatureTitle(graphic: Graphic, options?: FeatureTitleOptions): Promise<string>;
|
|
691
704
|
/**
|
|
692
705
|
* Returns the [Field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html) instance for a field name (case-insensitive).
|
|
693
706
|
*
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type LabelClass from "../../layers/support/LabelClass.js";
|
|
2
2
|
import type MapView from "../../views/MapView.js";
|
|
3
3
|
import type { SupportedLayer } from "../support/clusterUtils.js";
|
|
4
|
-
import type { ClusterableRenderer } from "../../views/2d/layers/
|
|
4
|
+
import type { ClusterableRenderer } from "../../views/2d/layers/types.js";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Generates default [FeatureReductionCluster#labelingInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureReductionCluster.html#labelingInfo)
|
package/support/groundUtils.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import r from"../Ground.js";import e from"../core/Logger.js";import{ensureType as o}from"../core/accessorSupport/ensureType.js";const i={"world-elevation":{id:"worldElevation",url:"//elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer",layerType:"ArcGISTiledElevationServiceLayer"},"world-topobathymetry":{id:"worldTopoBathymetry",url:"//elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/TopoBathy3D/ImageServer",layerType:"ArcGISTiledElevationServiceLayer"}};function t(t){if("string"!=typeof t)return o(r,t);if(t in i){const e=i[t];return new r({resourceInfo:{data:{layers:[e]}}})}return e.getLogger("esri.support.groundUtils").warn(`Unable to find ground definition for: ${t}. Try "world-elevation"`),null}export{t as ensureType};
|
package/support/revision.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
const c="
|
|
5
|
+
const c="20251205",d="e9cdfd0cda6d324e732cd56769ca3d011031ec3c";export{c as buildDate,d as commitHash};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as i}from"tslib";import t from"../../../Graphic.js";import{isSome as e}from"../../../core/arrayUtils.js";import s from"../../../core/Collection.js";import{makeHandle as r}from"../../../core/handleUtils.js";import has from"../../../core/has.js";import{watch as
|
|
5
|
+
import{__decorate as i}from"tslib";import t from"../../../Graphic.js";import{isSome as e}from"../../../core/arrayUtils.js";import s from"../../../core/Collection.js";import{makeHandle as r}from"../../../core/handleUtils.js";import has from"../../../core/has.js";import{QueueProcessor as h}from"../../../core/QueueProcessor.js";import{watch as a,sync as o}from"../../../core/reactiveUtils.js";import{property as n,subclass as l}from"../../../core/accessorSupport/decorators.js";import{convertGeometryToMask as g}from"../../../layers/raster/functions/clipUtils.js";import{GraphicsCollection as p}from"../../../support/GraphicsCollection.js";import d from"../engine/flow/FlowView2D.js";import{LayerView2DMixin as c}from"./LayerView2D.js";import u from"./graphics/GraphicsView2D.js";import m from"./graphics/HighlightGraphicContainer.js";import w from"./imagery/ImageryView2D.js";import y from"./imagery/VectorFieldView2D.js";import{ImageryLayerViewMixin as f}from"../../layers/ImageryLayerViewMixin.js";import v from"../../layers/LayerView.js";import{RefreshableLayerView as b}from"../../layers/RefreshableLayerView.js";import{isPixelHighlightTarget as _,isEmptyPixelRanges as x}from"../../layers/support/highlightUtils.js";import{defaultColor as V}from"../../support/HighlightDefaults.js";import{getHighlightName as H}from"../../support/highlightOptionsUtils.js";let I=class extends(f(b(c(v)))){constructor(){super(...arguments),this._exportImageVersion=-1,this._highlightGraphics=new p,this._highlightView=void 0,this._pixelHighlights=[],this.layer=null,this.subview=null}get pixelData(){const{subview:i}=this;return this.updating||!i?null:"getPixelData"in i?i.getPixelData():null}update(i){this.subview?.update(i)}attach(){this.layer.increaseRasterJobHandlerUsage(),this._setSubView(),this.view&&(this._highlightView=new u({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new m(this.view.featuresTilingScheme)}),this.container.addChild(this._highlightView.container)),this.addAttachHandles([a(()=>this.layer.exportImageServiceParameters.version,i=>{i&&this._exportImageVersion!==i&&(this._exportImageVersion=i,this.requestUpdate())},o),a(()=>this.timeExtent,i=>{const{subview:t}=this;t&&(t.timeExtent=i,"redraw"in t?this.requestUpdate():t.redrawOrRefetch())},o),this.layer.on("redraw",()=>{const{subview:i}=this;i&&("redraw"in i?i.redraw():i.redrawOrRefetch())}),a(()=>this.layer.renderer,()=>this._setSubView()),a(()=>this.view.highlights.items.map(({name:i,color:t})=>({name:i,color:t})),()=>this._updateHighlightOptions(this.subview))])}detach(){this.layer.decreaseRasterJobHandlerUsage(),this.container.removeAllChildren(),this._detachSubview(this.subview),this.subview?.destroy(),this.subview=null,this._highlightView?.destroy(),this._exportImageVersion=-1}viewChange(){}moveEnd(){this.requestUpdate()}highlight(i,h){if(_(i))return x(i)?r():this._highlightPixels(i,h);if("number"==typeof i||"string"==typeof i)return this._highlightByImageIds([i],h);const a=Array.isArray(i)||s.isCollection(i)?i.at(0):i;if("number"==typeof a||"string"==typeof a)return this._highlightByImageIds(i,h);if(!(a instanceof t))return r();let o=[];Array.isArray(i)||s.isCollection(i)?o=i.map(i=>i.clone()):i instanceof t&&(o=[i.clone()]);const n=o?.filter(e);if(!n?.length)return r();const l=H(h);return this._addHighlightGraphics(o,l),r(()=>!this.destroyed&&this._removeHighlightGraphics(o,l))}_highlightByImageIds(i,t){const e=H(t),s=new AbortController,{signal:a}=s,o=this.layer.sourceJSON.maxRecordCount??1e3,n=Math.ceil(i.length/o),l=[],g=[],p=new h({concurrency:4,process:i=>this.layer.queryFeatures({objectIds:i.ids,returnGeometry:!0,outSpatialReference:this.view.spatialReference},{signal:a}).then(i=>g.push(...i.features)).catch(()=>{})});for(let r=0;r<n;r++)l.push(p.push({ids:i.slice(r*o,(r+1)*o)}));return Promise.allSettled(l).then(()=>{g.length&&!a.aborted&&(this._addHighlightGraphics(g,e),a.addEventListener("abort",()=>{this._removeHighlightGraphics(g,e)}))}),r(()=>s.abort())}_highlightPixels(i,t){const e={target:i,options:t};return this._pixelHighlights.push(e),this._updateHighlightOptions(this.subview),r(()=>{const i=this._pixelHighlights.indexOf(e);i>-1&&(this._pixelHighlights.splice(i,1),this._updateHighlightOptions(this.subview))})}_addHighlightGraphics(i,t){this._highlightGraphics.addMany(i),this._addHighlights(i.map(i=>i.uid),t)}_removeHighlightGraphics(i,t){this._highlightGraphics.removeMany(i),this._removeHighlights(i.map(i=>i.uid),t)}async doRefresh(){this.requestUpdate()}isUpdating(){const i=!this.subview||this.subview.updating||!!this._highlightView?.updating;return has("esri-2d-log-updating")&&console.log(`Updating ImageryLayerView2D (${this.layer.id}): ${i}\n-> subview ${!this.subview||this.subview.updating}\n-> higlightView ${this._highlightView?.updating}\n`),i}_processHighlight(){const i=this._getHighlights();this._highlightView?.setHighlight(i)}_setSubView(){if(!this.view)return;const i=this.layer.renderer?.type;let t="imagery";if("vector-field"===i?t="imageryVF":"flow"===i&&(t="flow"),this.subview){const{type:i}=this.subview;if(i===t)return this._attachSubview(this.subview),void("flow"===i?this.subview.redrawOrRefetch():"imagery"===i&&"lerc"===this.layer.format?this.subview.redraw():this.requestUpdate());this._detachSubview(this.subview),this.subview?.destroy()}"imagery"===t?(this.subview=new w({layer:this.layer,view:this.view,timeExtent:this.timeExtent}),this._updateHighlightOptions(this.subview)):this.subview="imageryVF"===t?new y({layer:this.layer,view:this.view,timeExtent:this.timeExtent}):new d({layer:this.layer,layerView:this}),this._attachSubview(this.subview),this.requestUpdate()}_attachSubview(i){i&&!i.attached&&(i.attach(),i.attached=!0,this.container.addChildAt(i.container,0))}_detachSubview(i){i?.attached&&(this.container.removeChild(i.container),i.detach(),i.attached=!1)}_updateHighlightOptions(i){const t=this.view.highlights;this._pixelHighlights.sort((i,e)=>t.findIndex(({name:i})=>i===H(e.options))-t.findIndex(({name:t})=>t===H(i.options)));const s=this._pixelHighlights.map(({target:i,options:e})=>j(i,t,e)).filter(e);"imagery"===i?.type&&(i.pixelHighlights=s,i.attached&&("lerc"===this.layer.format?i.redraw():this.requestUpdate()))}};function j(i,t,e){const s=H(e),r=(t.find(i=>i.name===s)?.color??V).toArray(),{pixelRanges:h}=i;if(Array.isArray(h))return{ranges:h,bandId:i.bandId??0,color:r};const a="extent"===h.type?h:h.extent;if(!a)return;const o=[a.xmin,a.xmax],n=[a.ymin,a.ymax],{xBandId:l,yBandId:p}=i,d=1024,c=1024;return{xBandId:l,yBandId:p,xBandRange:o,yBandRange:n,color:r,width:d,height:c,xyMask:"polygon"===h.type?g({srcExtent:a,geometry:h,size:[d,c]}):void 0}}i([n()],I.prototype,"pixelData",null),i([n()],I.prototype,"subview",void 0),I=i([l("esri.views.2d.layers.ImageryLayerView2D")],I);const U=I;export{U as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{makeHandle as i}from"../../../core/handleUtils.js";import t from"../../../core/Logger.js";import{isAbortError as s}from"../../../core/promiseUtils.js";import{watch as r,sync as o,initial as a}from"../../../core/reactiveUtils.js";import{property as
|
|
5
|
+
import{__decorate as e}from"tslib";import{makeHandle as i}from"../../../core/handleUtils.js";import t from"../../../core/Logger.js";import{isAbortError as s}from"../../../core/promiseUtils.js";import{watch as r,sync as o,initial as a}from"../../../core/reactiveUtils.js";import{property as h,subclass as n}from"../../../core/accessorSupport/decorators.js";import{hasExcludedVariableOrDimension as u}from"../../../layers/raster/datasets/multidimensionalUtils.js";import l from"../engine/flow/FlowView2D.js";import{LayerView2DMixin as d}from"./LayerView2D.js";import p from"./imagery/ImageryTileView2D.js";import g from"./imagery/VectorFieldTileView2D.js";import{canUseMajorityInterpolationOnDataSource as c}from"./support/util.js";import{ImageryTileLayerViewMixin as v}from"../../layers/ImageryTileLayerViewMixin.js";import m from"../../layers/LayerView.js";import{RefreshableLayerView as w}from"../../layers/RefreshableLayerView.js";import{isEmptyPixelRanges as b}from"../../layers/support/highlightUtils.js";let y=class extends(v(w(d(m)))){constructor(){super(...arguments),this._useWebGLForProcessing=!0,this._useProgressiveUpdate=!0,this._pixelHighlights=[],this.subview=null}get useWebGLForProcessing(){return this._useWebGLForProcessing}set useWebGLForProcessing(e){this._useWebGLForProcessing=e,this.subview&&"useWebGLForProcessing"in this.subview&&(this.subview.useWebGLForProcessing=e)}get useProgressiveUpdate(){return this._useWebGLForProcessing}set useProgressiveUpdate(e){this._useProgressiveUpdate=e,this.subview&&"useProgressiveUpdate"in this.subview&&(this.subview.useProgressiveUpdate=e)}get displayParameters(){const{layer:e}=this,i=this._get("displayParameters");return e.renderer&&e.visible?{bandIds:e.bandIds,renderer:e.renderer,interpolation:e.interpolation,multidimensionalDefinition:e.multidimensionalDefinition,rasterFunction:"imagery-tile"===e.type?e.rasterFunction:null}:i}update(e){this.subview?.update(e),this.notifyChange("updating")}isUpdating(){return!this.subview||this.subview.updating}attach(){this.layer.increaseRasterJobHandlerUsage(),this._updateSubview(),this.addAttachHandles([r(()=>this.displayParameters,(e,i)=>{const r=e.interpolation!==i?.interpolation&&("majority"===e.interpolation||"majority"===i?.interpolation)&&c(this.layer),o=!!this.layer.serviceRasterInfo?.storageInfo?.isBsqTile&&e.bandIds?.join()!==i?.bandIds?.join(),a=e.renderer!==i?.renderer&&this._getSubviewType(i?.renderer)!==this._getSubviewType(e.renderer);a&&this._updateSubview();const h=e.multidimensionalDefinition!==i?.multidimensionalDefinition,n=e.rasterFunction!==i?.rasterFunction,u=n&&!this._useWebGLForProcessing,l=h||r||a||u||o;this.subview.redrawOrRefetch({refetch:l,reprocess:n}).catch(e=>{s(e)||t.getLogger(this).error(e)}),this.notifyChange("updating")}),r(()=>this.layer.multidimensionalSubset??null,(e,i)=>{const{multidimensionalDefinition:r}=this.layer;null!=r&&u(r,e)!==u(r,i)&&(this.subview.redrawOrRefetch({refetch:!0}).catch(e=>{s(e)||t.getLogger(this).error(e)}),this.notifyChange("updating"))},o),r(()=>this.timeExtent,()=>{this.subview.timeExtent=this.timeExtent,this.subview.redrawOrRefetch({refetch:!0}).catch(e=>{s(e)||t.getLogger(this).error(e)})},a),r(()=>this.view.highlights.items.map(({name:e,color:i})=>({name:e,color:i})),()=>this._updateHighlightOptions(this.subview),a)])}detach(){this.layer.decreaseRasterJobHandlerUsage(),this._detachSubview(this.subview),this.subview?.destroy(),this.subview=null}viewChange(){this.requestUpdate()}moveEnd(){this.subview.moveEnd()}highlight(e,t){if(!e.pixelRanges||b(e))return i();const s={target:{...e},options:{...t}};return this._pixelHighlights.push(s),this._updateHighlightOptions(this.subview),i(()=>{const e=this._pixelHighlights.indexOf(s);-1!==e&&(this._pixelHighlights.splice(e,1),this._updateHighlightOptions(this.subview))})}doRefresh(){return this.subview?this.subview.doRefresh():Promise.resolve()}_updateSubview(){const{renderer:e}=this.layer;if(!e)return;const i=this._getSubviewType(e);if(this.subview){if(this.subview.type===i)return void this._attachSubview(this.subview);this._detachSubview(this.subview),this.subview?.destroy(),this.subview=null}const{layer:t}=this;let s;if(s="rasterVF"===i?new g({layer:t,layerView:this,scheduler:this.scheduler}):"flow"===i?new l({layer:t,layerView:this,scheduler:this.scheduler}):new p({layer:t,layerView:this,scheduler:this.scheduler}),"useWebGLForProcessing"in s&&(s.useWebGLForProcessing=this._useWebGLForProcessing),"useProgressiveUpdate"in s&&(s.useProgressiveUpdate=this._useProgressiveUpdate),"previousLOD"in s){const{subview:e}=this;s.previousLOD=e&&"previousLOD"in e?e.previousLOD:null}this._attachSubview(s),this._updateHighlightOptions(s),this.subview=s,this.requestUpdate()}_attachSubview(e){e&&!e.attached&&(e.attach(),e.attached=!0,this.container.addChildAt(e.container,0))}_detachSubview(e){e?.attached&&(this.container.removeChild(e.container),e.detach(),e.attached=!1)}_getSubviewType(e){const i=e?.type;return"vector-field"===i?"rasterVF":"flow"===i?"flow":"raster"}_updateHighlightOptions(e){"raster"===e?.type&&e.updateHighlightOptions(this._pixelHighlights)}};e([h()],y.prototype,"subview",void 0),e([h()],y.prototype,"useWebGLForProcessing",null),e([h()],y.prototype,"useProgressiveUpdate",null),e([h({readOnly:!0})],y.prototype,"displayParameters",null),y=e([n("esri.views.2d.layers.ImageryTileLayerView2D")],y);const f=y;export{f as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type ClassBreaksRenderer from "../../../renderers/ClassBreaksRenderer.js";
|
|
2
|
+
import type PieChartRenderer from "../../../renderers/PieChartRenderer.js";
|
|
3
|
+
import type SimpleRenderer from "../../../renderers/SimpleRenderer.js";
|
|
4
|
+
import type UniqueValueRenderer from "../../../renderers/UniqueValueRenderer.js";
|
|
5
|
+
|
|
6
|
+
export type ClusterableRenderer = SimpleRenderer | ClassBreaksRenderer | UniqueValueRenderer | PieChartRenderer;
|
package/views/2d/types.d.ts
CHANGED
|
@@ -150,4 +150,6 @@ export interface TessellatedMesh {
|
|
|
150
150
|
* Each element is a {@link views/2d/layers/support/types!MeshVertex}.
|
|
151
151
|
*/
|
|
152
152
|
vertices: MeshVertex[];
|
|
153
|
-
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export type ResizeAlign = "bottom" | "bottom-left" | "bottom-right" | "center" | "left" | "right" | "top" | "top-left" | "top-right";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{
|
|
5
|
+
import{clamp as e}from"../../../core/mathUtils.js";import{create as t}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{F as r}from"../../../chunks/vec32.js";import{earth as s}from"../../../geometry/support/Ellipsoid.js";import{Float2PassUniform as a}from"../webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float3BindUniform as o}from"../webgl-engine/core/shaderModules/Float3BindUniform.js";import{FloatsPassUniform as i}from"../webgl-engine/core/shaderModules/FloatsPassUniform.js";import{glsl as n}from"../webgl-engine/core/shaderModules/glsl.js";import{SphereIntersect as c}from"../webgl-engine/shaders/SphereIntersect.glsl.js";import{NoParameters as h}from"../../webgl/NoParameters.js";class l extends h{constructor(){super(...arguments),this.radii=t()}}function m(e){e.code.add(n`float chapmanApproximation(float thickness, float height, float cosZenith) {
|
|
6
6
|
float c = sqrt(thickness + height);
|
|
7
7
|
float cExpH = c * exp(-height);
|
|
8
8
|
if (cosZenith >= 0.0) {
|
|
@@ -12,13 +12,12 @@ float x0 = sqrt(1.0 - cosZenith * cosZenith) * (thickness + height);
|
|
|
12
12
|
float c0 = sqrt(x0);
|
|
13
13
|
return 2.0 * c0 * exp(thickness - x0) - cExpH / (1.0 - c * cosZenith);
|
|
14
14
|
}
|
|
15
|
-
}`),e.constants.add("scaleHeight","float",
|
|
15
|
+
}`),e.constants.add("scaleHeight","float",s.scaleHeight*s.atmosphereHeight).uniforms.add(new a("radii",e=>e.radii)).code.add(n`float getOpticalDepth(vec3 position, vec3 dir, float h) {
|
|
16
16
|
return scaleHeight * chapmanApproximation(radii[0] / scaleHeight, h, dot(normalize(position), dir));
|
|
17
|
-
}`),e.uniforms.add(new i("heightParameters",e=>e
|
|
18
|
-
float
|
|
19
|
-
|
|
20
|
-
vec2
|
|
21
|
-
vec2 rayAtmosphereIntersect = sphereIntersect(cameraPosition, rayDir, heightParameters[2]);
|
|
17
|
+
}`),e.include(c),e.constants.add("planetRadiusReduction","float",p).uniforms.add(new i("heightParameters",5,(e,t)=>d(t,e)),new o("cameraPosition",e=>e.camera.eye)).code.add(n`vec4 planetIntersect(vec3 rayDir) {
|
|
18
|
+
float rayPlanetDistanceReduced = heightParameters[4];
|
|
19
|
+
vec2 rayPlanetIntersect = sphereIntersect(cameraPosition, rayDir, rayPlanetDistanceReduced);
|
|
20
|
+
vec2 rayAtmosphereIntersect = sphereIntersect(cameraPosition, rayDir, heightParameters[1]);
|
|
22
21
|
bool hitsAtmosphere = (rayAtmosphereIntersect.x <= rayAtmosphereIntersect.y) && rayAtmosphereIntersect.x > 0.0;
|
|
23
22
|
bool insideAtmosphere = heightParameters[0] < radii[1];
|
|
24
23
|
if (!hitsAtmosphere && !insideAtmosphere) {
|
|
@@ -26,12 +25,12 @@ return vec4(1.0, 0.0, 0.0, 0.0);
|
|
|
26
25
|
}
|
|
27
26
|
bool hitsPlanet = (rayPlanetIntersect.x <= rayPlanetIntersect.y) && rayPlanetIntersect.x > 0.0;
|
|
28
27
|
float start = insideAtmosphere ? 0.0 : rayAtmosphereIntersect.x;
|
|
29
|
-
if (heightParameters[0] <
|
|
30
|
-
if (dot(rayDir, normalize(cameraPosition)) < -0.
|
|
28
|
+
if (heightParameters[0] < radii[0] - planetRadiusReduction) {
|
|
29
|
+
if (dot(rayDir, normalize(cameraPosition)) < -0.01) {
|
|
31
30
|
return vec4(1.0, 0.0, 0.0, 0.0);
|
|
32
31
|
}
|
|
33
32
|
start = rayPlanetIntersect.y;
|
|
34
33
|
}
|
|
35
34
|
float end = hitsPlanet ? rayPlanetIntersect.x : rayAtmosphereIntersect.y;
|
|
36
35
|
return vec4(0.0, hitsPlanet ? 1.0 : 0.0, start, end);
|
|
37
|
-
}`)}export{
|
|
36
|
+
}`)}function d({camera:t},{radii:a}){const o=r(t.eye),i=Math.sqrt(o);return f[0]=i,f[1]=o-a[1]**2,f[2]=e((o-a[0])/s.atmosphereHeight,0,1),f[3]=o-a[0]**2,f[4]=o-(a[0]-p)**2,f}const p=2e4,f=new Array;export{m as ChapmanApproximation,l as ChapmanApproximationPassParameters,d as getHeightParameters};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"./ChapmanRaymarching.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import"../webgl-engine/core/shaderModules/Float2PassUniform.js";import"../webgl-engine/core/shaderModules/Float3BindUniform.js";import"../webgl-engine/core/shaderModules/Float3PassUniform.js";import"../webgl-engine/core/shaderModules/Float4PassUniform.js";import"../webgl-engine/core/shaderModules/FloatPassUniform.js";import"../webgl-engine/core/shaderModules/glsl.js";import"../webgl-engine/core/shaderModules/Texture2DBindUniform.js";import"../webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import"../webgl-engine/shaders/SphereIntersect.glsl.js";import"../webgl-engine/shaders/ToneMapping.glsl.js";import"../../webgl/ShaderBuilder.js";export{b as build}from"../../../chunks/ChapmanAtmosphere.glsl.js";
|
|
5
|
+
import"./ChapmanApproximation.glsl.js";import"./ChapmanRaymarching.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import"../webgl-engine/core/shaderModules/Float2PassUniform.js";import"../webgl-engine/core/shaderModules/Float3BindUniform.js";import"../webgl-engine/core/shaderModules/Float3PassUniform.js";import"../webgl-engine/core/shaderModules/Float4PassUniform.js";import"../webgl-engine/core/shaderModules/FloatPassUniform.js";import"../webgl-engine/core/shaderModules/FloatsPassUniform.js";import"../webgl-engine/core/shaderModules/glsl.js";import"../webgl-engine/core/shaderModules/Texture2DBindUniform.js";import"../webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import"../webgl-engine/shaders/SphereIntersect.glsl.js";import"../webgl-engine/shaders/ToneMapping.glsl.js";import"../../webgl/ShaderBuilder.js";export{b as build}from"../../../chunks/ChapmanAtmosphere.glsl.js";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{
|
|
5
|
+
import{__decorate as e}from"tslib";import{lerp as t}from"../../../core/mathUtils.js";import{disposeMaybe as r}from"../../../core/maybe.js";import{watch as s,syncAndInitial as i,initial as o}from"../../../core/reactiveUtils.js";import{subclass as a}from"../../../core/accessorSupport/decorators.js";import{set as n}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{h as m,b as h}from"../../../chunks/vec32.js";import{ZEROS as c}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{earth as p}from"../../../geometry/support/Ellipsoid.js";import{InternalRenderCategory as d}from"../webgl.js";import{computeInnerAltitudeFade as u,innerAtmosphereDepth as l}from"./atmosphereUtils.js";import{ChapmanAtmospherePassParameters as f,ChapmanAtmosphereTechnique as g}from"./ChapmanAtmosphereTechnique.js";import{ChapmanAtmosphereTechniqueConfiguration as b}from"./ChapmanAtmosphereTechniqueConfiguration.js";import{OpaqueEnvironment as _}from"../webgl-engine/effects/OpaqueEnvironment.js";import{createQuadVAO as w}from"../webgl-engine/lib/glUtil3D.js";import{applyTextureResizeModulo as P}from"../webgl-engine/lib/textureUtils.js";import{A as v}from"../../../chunks/AtmosphereCompositing.glsl.js";import{AtmosphereCompositingTechnique as j}from"../webgl-engine/shaders/AtmosphereCompositingTechnique.js";import{DepthStencilAttachment as q,PrimitiveType as A}from"../../webgl/enums.js";import T from"../../../webscene/background/ColorBackground.js";let x=class extends _{constructor(){super(...arguments),this.requireGeometryDepth=!0,this._compositingPassParameters=new v,this._vao=null,this._passParameters=new f,this._configuration=new b}initialize(){this.addHandles([s(()=>this.view.environment.background,e=>{const t=e instanceof T?e.color.toUnitRGBA():c;m(this._passParameters.backgroundColor,t[0]*t[3],t[1]*t[3],t[2]*t[3])},i),s(()=>this.view.stage?.renderer?.highResolutionAtmosphere,e=>this._configuration.reduced=!e,i),s(()=>this.view.map.ground.undergroundColor,e=>{this._passParameters.undergroundColor=e?.toUnitRGBA()??c,this.requestRender(1)},o),s(()=>this.view.environment.atmosphereEnabled,e=>e?this._enable():this._disable(),i)])}destroy(){this._vao=r(this._vao)}precompile(){this.techniques.precompile(g,this._configuration),this.techniques.precompile(j)}render(e){const r=e.find(({name:e})=>e===d.OPAQUE_ENVIRONMENT);if(!this.bindParameters.mainDepth)return r;const s=this.renderingContext;this._vao??=w(s,1);const i=r.getAttachment(q);this._update();const o=this.techniques.get(g,this._configuration);if(!o.compiled)return this.requestRender(1),r;if(!this._configuration.reduced)return r.detachDepth(),s.bindFramebuffer(r.fbo),s.bindTechnique(o,this.bindParameters,this._passParameters),s.bindVAO(this._vao),s.drawArrays(A.TRIANGLE_STRIP,0,4),r.attachDepth(i),r;const a=this.techniques.get(j);if(!a.compiled)return this.requestRender(1),r;const n=s.getViewport(),m=this.bindParameters.camera,c=h(m.eye)-p.radius;let u;const l=p.atmosphereHeight;if(c<l){const e=Math.min(1,Math.max(0,c/l));u=t(.2,.3,e)}else{const e=Math.min(1,Math.max(0,(c-l)/(15*l)));u=t(.3,.6,e)}const f=this.renderingContext.parameters.maxTextureSize,b=P(Math.round(u*m.fullViewport[2]),f),_=P(Math.round(u*m.fullViewport[3]),f);s.setViewport(0,0,b,_);const v=this.fboCache.acquire(b,_,"chapman",5);return s.bindFramebuffer(v.fbo),s.clearFramebuffer([0,0,0,1],!0,!0),s.bindTechnique(o,this.bindParameters,this._passParameters),s.bindVAO(this._vao),s.drawArrays(A.TRIANGLE_STRIP,0,4),s.setViewport(n.x,n.y,n.width,n.height),this._compositingPassParameters.color=v.getTexture(),r.detachDepth(),s.bindFramebuffer(r.fbo),s.bindTechnique(a,this.bindParameters,this._compositingPassParameters),s.screen.draw(),r.attachDepth(i),v.release(),r}_update(){const e=this.view.basemapTerrain?.getLowerBoundRadius()??0;n(this._passParameters.radii,e,e+p.atmosphereHeight);const t=h(this.bindParameters.camera.eye);this._passParameters.altitudeFade=u(t-e),this._passParameters.innerFadeDistance=2*Math.sqrt((2*e-l)*l)}};x=e([a("esri.views.3d.environment.ChapmanAtmosphere")],x);export{x as ChapmanAtmosphere};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{subclass as r}from"../../../core/accessorSupport/decorators.js";import{create as o}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{
|
|
5
|
+
import{__decorate as e}from"tslib";import{subclass as r}from"../../../core/accessorSupport/decorators.js";import{create as o}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as s}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{ChapmanApproximationPassParameters as t}from"./ChapmanApproximation.glsl.js";import{C as i}from"../../../chunks/ChapmanAtmosphere.glsl.js";import{ReloadableShader as n}from"../webgl-engine/core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as a}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{Pos2TexF16 as m}from"../webgl-engine/lib/DefaultVertexBufferLayouts.js";import{makePipelineState as c,defaultColorWrite as l,copySource as p,simpleBlendingParams as d}from"../../webgl/renderState.js";class h extends t{constructor(){super(...arguments),this.innerFadeDistance=0,this.altitudeFade=0,this.backgroundColor=o(),this.undergroundColor=s()}}let u=class extends a{constructor(e,r){super(e,r,m),this.shader=new n(i,()=>import("./ChapmanAtmosphere.glsl.js"))}initializePipeline(e){return c({blending:e.reduced?p:d(770,771),depthTest:{func:e.reduced?519:515},colorWrite:l})}};u=e([r("esri.views.3d.environment.ChapmanAtmosphereTechnique")],u);export{h as ChapmanAtmospherePassParameters,u as ChapmanAtmosphereTechnique};
|
|
@@ -8,10 +8,9 @@ import{betaRayleigh as e,betaCombined as t,betaMie as a}from"./atmosphereUtils.j
|
|
|
8
8
|
if(ray.x == 1.0) {
|
|
9
9
|
return vec3(0);
|
|
10
10
|
}
|
|
11
|
-
${r(p,"if (terrainDepth != -1.0)
|
|
11
|
+
${r(p,"\n if (terrainDepth != -1.0) ray.w = terrainDepth;\n float multiplier = ray.y == 1.0 ? -1.0 : 1.0;\n ","\n if (ray.y == 1.0) return vec3(0);\n const float multiplier = 1.0;\n ")}
|
|
12
12
|
|
|
13
13
|
vec3 samplePoint = cameraPosition + rayDir * ray.w;
|
|
14
|
-
float multiplier = ray.y == 1.0 ? -1.0 : 1.0;
|
|
15
14
|
|
|
16
15
|
vec3 scattering = vec3(0);
|
|
17
16
|
float scaleFract = (length(samplePoint) - radii[0]) / scaleHeight;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{neverReached as t}from"../../../core/compilerUtils.js";import{clamp as a}from"../../../core/mathUtils.js";import{signal as e}from"../../../core/signal.js";import{rotate as s}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as i,create as r}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{F as h,n as o,j as n,d as c,b as d,e as l}from"../../../chunks/vec32.js";import{create as _,fromValues as u}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as f,fromPoints as p,axis as m}from"../../../geometry/support/axisAngleDegrees.js";import{earth as F}from"../../../geometry/support/Ellipsoid.js";import{ensureClouds as P}from"./Clouds.js";import{heightLimit as x}from"./weather.js";class v{constructor(){this.startTime=0,this._data=e(null),this.coverage=0,this.absorption=0,this._readChannels=0,this.parallax=new g,this.parallaxNew=new g,this._anchorPoint=_(),this._fadeState=e(0),this._fadeFactor=e(1)}get data(){return this._data.value}set data(t){this._data.value=t}get readChannels(){return this._readChannels}get fadeState(){return this._fadeState.value}get fadeFactor(){return this._fadeFactor.value}get opacity(){switch(this.fadeState){case 0:return 0;case 4:return 1-this.fadeFactor;case 1:return this.fadeFactor;case 2:case 3:return 1}}fade(t,e,s){this.isFading&&this.fadeFactor<1&&(this._fadeFactor.value=s?a((e-this.startTime)/(
|
|
5
|
+
import{neverReached as t}from"../../../core/compilerUtils.js";import{clamp as a}from"../../../core/mathUtils.js";import{signal as e}from"../../../core/signal.js";import{rotate as s}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as i,create as r}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{F as h,n as o,j as n,d as c,b as d,e as l}from"../../../chunks/vec32.js";import{create as _,fromValues as u}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as f,fromPoints as p,axis as m}from"../../../geometry/support/axisAngleDegrees.js";import{earth as F}from"../../../geometry/support/Ellipsoid.js";import{ensureClouds as P}from"./Clouds.js";import{heightLimit as x}from"./weather.js";class v{constructor(){this.startTime=0,this._data=e(null),this.coverage=0,this.absorption=0,this._readChannels=0,this.parallax=new g,this.parallaxNew=new g,this._anchorPoint=_(),this._fadeState=e(0),this._fadeFactor=e(1)}get data(){return this._data.value}set data(t){this._data.value=t}get readChannels(){return this._readChannels}get fadeState(){return this._fadeState.value}get fadeFactor(){return this._fadeFactor.value}get opacity(){switch(this.fadeState){case 0:return 0;case 4:return 1-this.fadeFactor;case 1:return this.fadeFactor;case 2:case 3:return 1}}fade(t,e,s){this.isFading&&this.fadeFactor<1&&(this._fadeFactor.value=s?a((e-this.startTime)/(C*s),0,1):1,1===this.fadeFactor&&this._endFade()),this._evaluateState(t,e),this._updateParallax(t)}_evaluateState(t,a){const e=t.relativeElevation,s=this._updateAnchorPoint(t);(Math.abs(e)>1.7*x||s>k)&&this.opacity>0?this._startFade(0,a):this.isFading||(Math.abs(e)>x||s>j*k?this.opacity>0&&this._startFade(4,a):P(this.data)&&(0===this.opacity?this._startFade(1,a):2===this.data.state&&(2===this.fadeState?this._startFade(3,a):this._startFade(2,a))))}_updateParallax(t){const a=h(t.eye);this.parallax.radiusCurvatureCorrection=.84*Math.sqrt(Math.max(a-F.radius*F.radius,0))/Math.sqrt(a),p(w,this.parallax.anchorPoint,S),s(this.parallax.transform,i,S[3],m(S)),p(w,this.parallaxNew.anchorPoint,S),s(this.parallaxNew.transform,i,S[3],m(S))}_updateAnchorPoint(t){return o(this._anchorPoint,t.eye),n(this._anchorPoint,this._anchorPoint,F.radius),0===this.fadeState&&2===this.data?.state?(c(this.parallax.anchorPoint,this._anchorPoint),0):d(l(b,this.parallax.anchorPoint,this._anchorPoint))}requestFade(){this._fadeFactor.value=0}_startFade(t,a){switch(this._fadeState.value=t,this.startTime=a,t){case 3:this.requestFade(),this._switchReadChannels(),c(this.parallaxNew.anchorPoint,this._anchorPoint);break;case 1:this.requestFade(),this._switchReadChannels(),c(this.parallax.anchorPoint,this._anchorPoint),c(this.parallaxNew.anchorPoint,this._anchorPoint);break;case 4:this.requestFade();break;case 2:this._switchReadChannels(),c(this.parallax.anchorPoint,this._anchorPoint),c(this.parallaxNew.anchorPoint,this._anchorPoint),this._endFade();break;case 0:this._endFade()}}_endFade(){switch(this._fadeFactor.value=1,this.data&&2!==this.data.state&&(this.data.state=0),this.fadeState){case 3:c(this.parallax.anchorPoint,this.parallaxNew.anchorPoint),this._fadeState.value=2;break;case 1:this._fadeState.value=2;break;case 4:this._fadeState.value=0;break;case 2:case 0:break;default:t(this.fadeState)}}_switchReadChannels(){2===this.data?.state&&(this._readChannels=1-this._readChannels,this.data.state=3)}get isFading(){return 4===this.fadeState||1===this.fadeState||3===this.fadeState}}class g{constructor(){this.anchorPoint=_(),this.radiusCurvatureCorrection=0,this.transform=r()}}const w=u(0,0,1),S=f(),b=_(),C=1.25,j=.5,k=2e5;export{v as CloudsParameters};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{EventedAccessor as t}from"../../../core/Evented.js";import"../../../core/has.js";import{destroyMaybe as i}from"../../../core/maybe.js";import{watch as n,when as r,sync as o,syncAndInitial as
|
|
5
|
+
import{__decorate as e}from"tslib";import{EventedAccessor as t}from"../../../core/Evented.js";import"../../../core/has.js";import{destroyMaybe as i}from"../../../core/maybe.js";import{watch as n,when as r,sync as o,syncAndInitial as s}from"../../../core/reactiveUtils.js";import{property as a,subclass as h}from"../../../core/accessorSupport/decorators.js";import{G as l,d as c,j as g,l as p}from"../../../chunks/vec32.js";import{create as d,clone as m,fromValues as _}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isLoadedOrLoadFor as u}from"../../../geometry/projectionUtils.js";import v from"../../../geometry/SpatialReference.js";import{projectPointToVector as f}from"../../../geometry/projection/projectPointToVector.js";import{getGCSForPlanet as w}from"../../../geometry/support/planetGCSUtils.js";import{isEarth as P}from"../../../geometry/support/spatialReferenceUtils.js";import{EnvironmentRenderer as y}from"./EnvironmentRenderer.js";import{positionToTimezoneInfo as b}from"../support/earthUtils.js";import{ColorAndIntensity as T,computeColorAndIntensity as j,computeVirtualLightDirection as L,computeShadowsEnabled as G}from"../support/sunUtils.js";import{MainLight as U,AmbientLight as C,FillLight as H}from"../webgl-engine/lighting/Lightsources.js";let E=class extends t{constructor(e){super(e),this._tmpLightParameters=new T,this._defaultLightParameters=new T,this._tmpDate=new Date,this._tmpTz={hours:0,minutes:0,seconds:0},this._viewHandlesKey="viewHandles",this._trackingEnabled=!1,this._mainLight=new U,this._ambientLight=new C,this._moonLight=new H,this._disableWeather=!1,this._renderer=null,this._resetReferencePosition()}destroy(){this.disconnectView()}get _view(){return this._renderer?.view}get updating(){return!!this._renderer?.updating||!this._canProjectCameraPosition}get weatherEnabled(){return this._view?.environment.atmosphereEnabled&&!this._disableWeather&&1===this._view?.state?.viewingMode&&P(this._view.spatialReference)}get _weatherAvailable(){return this.weatherEnabled&&this._renderer?.weatherAvailable}get referencePositionGeographic(){return this._referencePositionGeographic}get _canProjectCameraPosition(){const e=this._view?.stateManager?.camera?.position?.spatialReference??v.WGS84,t=w(e);return u(e,t)}connectView(e){if(this._renderer)return;this._renderer=new y({view:e});const t=()=>this._updateRenderParameters(),i=()=>this._cameraHandler();this.addHandles([n(()=>e.environment.lighting,e=>this._updateLightingHandler(e),o),n(()=>"virtual"!==e.environment.lighting.type?e.environment.lighting.date:null,e=>this._lightingDateHandler(e),o),n(()=>e.environment.lighting.directShadowsEnabled,t,o),n(()=>e.spatialReference,()=>this._resetReferencePosition(!0),o),n(()=>[e.environment.weather.type,this.weatherEnabled],()=>this._updateLighting(null,1),o),n(()=>"snowy"===e.environment.weather.type&&e.environment.weather.snowCover,t,o),n(()=>e.environment,e=>e.setComputeWeatherAvailable(()=>this._weatherAvailable),s),n(()=>e.viewingMode,()=>this._resetReferencePosition(!0),s),n(()=>"virtual"!==e.environment.lighting.type&&e.environment.lighting.cameraTrackingEnabled,e=>this._updateCameraTracking(e),s),n(()=>e.state.camera,i,s),r(()=>this._canProjectCameraPosition,()=>this._resetReferencePosition(!0),o)],this._viewHandlesKey),this._updateRenderParameters(),this._updateLighting(),this._cameraHandler(),this.notifyChange("updating")}disconnectView(){this.removeHandles(this._viewHandlesKey),this._resetReferencePosition(),this._renderer=i(this._renderer)}_updateLightingHandler(e){this._updateCameraTracking("virtual"!==e.type&&e.cameraTrackingEnabled),this._lightingDateHandler("virtual"!==e.type?e.date:null),this._updateRenderParameters()}_updateCameraTracking(e){if(this._trackingEnabled=e,e)this._cameraHandler();else{const e=this._view.environment.lighting;"virtual"!==e?.type&&(e.positionTimezoneInfo.autoUpdated=!1)}}_lightingDateHandler(e){const t=this._view.environment.lighting;if("virtual"!==t?.type){if(e){if(!t.positionTimezoneInfo.autoUpdated&&(this._preupdateTracking(e),null!=this._referencePositionGeographic)){const e=b(this._referencePositionGeographic,this._tmpTz);null!=e&&(t.autoUpdate(null,e),this._trackingEnabled&&(t.positionTimezoneInfo.autoUpdated=!0))}this._updateLighting(e)}}else this._updateLighting()}_preupdateTracking(e){!this._trackingEnabled&&"virtual"!==this._view.environment.lighting.type&&this._view.environment.lighting.cameraTrackingEnabled&&this._cameraHandler(e)}_cameraHandler(e=null){const t=this._view;if(!t.ready)return;const i=t.stateManager.camera;if(!i)return;const n=i.position,r=n.spatialReference??v.WGS84,o=w(r);if(!f(n,k,o,M)){if(null==this._referencePositionGeographic)return;return this._referencePositionGeographic=null,void this._updateLighting()}this._referencePositionGeographic?l(this._referencePositionGeographic,k)||(c(this._referencePositionGeographic,k),this.notifyChange("referencePositionGeographic")):this._referencePositionGeographic=m(k),this._autoUpdateTimezone(this._referencePositionGeographic,e)||this._updateLighting(e)}_updateLighting(e,t=0){const i=this._view,{lighting:n}=i.environment,r="virtual"===n.type,o=this._referencePositionGeographic,s=null!=o?this._tmpLightParameters:this._defaultLightParameters;if(o){e??=r?null:n.date;const t=this._weatherAvailable?i.environment.weather.type:"disabled";j(e,o,i.state.viewingMode,t,i.state.camera,s)}else r&&L(i.state.camera,i.state.viewingMode,s.direct.directionToLightSource);const a=this._mainLight,h=s.direct;g(a.intensity,h.color,h.intensity*Math.PI),c(a.direction,h.directionToLightSource),a.specularStrength=s.specularStrength,a.environmentStrength=s.environmentStrength;const l=this._ambientLight;g(l.intensity,s.ambient.color,s.ambient.intensity);const d=this._moonLight;p(d.intensity,R,S,s.globalFactor);const m=(1-.5*s.globalFactor)*(1-.4*s.noonFactor*(1-s.globalFactor));g(d.intensity,d.intensity,m),c(d.direction,h.directionToLightSource),this._view.stage?.renderer.updateLighting([a,l,d],s.noonFactor,s.globalFactor,this._weatherAvailable?t:0),this._updateRenderParameters()}_autoUpdateTimezone(e,t=null){if("virtual"===this._view.environment.lighting.type||!this._view.environment.lighting.cameraTrackingEnabled||null==e)return!1;const i=this._tmpDate;i.setTime((t||this._view.environment.lighting.date).getTime());const n=b(e,this._tmpTz);if(null==n)return!1;let r=this._view.environment.lighting.positionTimezoneInfo;if(r.autoUpdated){if(r.hours===n.hours&&r.minutes===n.minutes&&r.seconds===n.seconds)return!1}else r=n;const o=i.getUTCHours()-(n.hours-r.hours),s=i.getUTCMinutes()-(n.minutes-r.minutes),a=i.getUTCSeconds()-(n.seconds-r.seconds);return i.setUTCHours(o),i.setUTCMinutes(s),i.setUTCSeconds(a),!t&&this._view.environment.lighting.autoUpdate(i,n)}_updateRenderParameters(){const e=this._view.stage;if(!e)return;const t=null==this._referencePositionGeographic||G(this._referencePositionGeographic[2],this._view.state.viewingMode);e.renderer.setParameters({shadowMap:this._view.environment.lighting.directShadowsEnabled&&t,environment:this._view.environment,weatherVisible:this._weatherAvailable})}_resetReferencePosition(e=!1){this._referencePositionGeographic=null,e&&this._cameraHandler()}get test(){}};e([a({type:Boolean,readOnly:!0})],E.prototype,"updating",null),e([a()],E.prototype,"_disableWeather",void 0),e([a()],E.prototype,"weatherEnabled",null),e([a()],E.prototype,"_weatherAvailable",null),e([a()],E.prototype,"referencePositionGeographic",null),e([a()],E.prototype,"_referencePositionGeographic",void 0),e([a()],E.prototype,"_renderer",void 0),e([a()],E.prototype,"_canProjectCameraPosition",null),E=e([h("esri.views.3d.environment.EnvironmentManager")],E);const R=_(.22,.22,.33),S=_(.22,.22,.22),k=d(),M={zConversionDisabled:!0};export{E as EnvironmentManager};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type Environment from "../../../webscene/Environment.js";
|
|
2
|
-
import type { LightingUnion } from "./lightingUtils.js";
|
|
3
2
|
import type { SunLightingProperties } from "./SunLighting.js";
|
|
3
|
+
import type { LightingUnion } from "./types.js";
|
|
4
4
|
import type { VirtualLightingProperties } from "./VirtualLighting.js";
|
|
5
5
|
import type { EnvironmentProperties } from "../../../webscene/Environment.js";
|
|
6
6
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type CloudyWeather from "./CloudyWeather.js";
|
|
2
|
+
import type FoggyWeather from "./FoggyWeather.js";
|
|
3
|
+
import type RainyWeather from "./RainyWeather.js";
|
|
4
|
+
import type SnowyWeather from "./SnowyWeather.js";
|
|
5
|
+
import type SunLighting from "./SunLighting.js";
|
|
6
|
+
import type SunnyWeather from "./SunnyWeather.js";
|
|
7
|
+
import type VirtualLighting from "./VirtualLighting.js";
|
|
8
|
+
|
|
9
|
+
export type LightingUnion = SunLighting | VirtualLighting;
|
|
10
|
+
|
|
11
|
+
export type WeatherType = "sunny" | "cloudy" | "rainy" | "snowy" | "foggy";
|
|
12
|
+
|
|
13
|
+
export type WeatherUnion = SunnyWeather | CloudyWeather | RainyWeather | SnowyWeather | FoggyWeather;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{destroyHandle as
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../../core/Collection.js";import{destroyHandle as i,makeHandle as r}from"../../../core/handleUtils.js";import{watch as s,syncAndInitial as l,initial as o}from"../../../core/reactiveUtils.js";import{property as h,subclass as a}from"../../../core/accessorSupport/decorators.js";import n from"./DynamicLayerView3D.js";import p from"./ImagerySubView3D.js";import{ImageHighlightHelper3D as d}from"./support/ImageHighlightHelper3D.js";import g from"../support/flow/FlowSubViewExtent3D.js";import{ImageryLayerViewMixin as u}from"../../layers/ImageryLayerViewMixin.js";import{isPixelHighlightTarget as m}from"../../layers/support/highlightUtils.js";let y=class extends(u(n)){constructor(){super(...arguments),this.type="imagery-3d"}get highlightOptions(){return null}get pixelData(){return null}initialize(){const e=()=>this._updatingHandles.addPromise(this.refreshDebounced());this._updatingHandles.add(()=>this.layer?.exportImageServiceParameters?.version,e),this._updatingHandles.add(()=>this.layer?.renderer,e),this._updatingHandles.add(()=>this.timeExtent,e),this._highlightHelper=new d({view:this.view,layer:this.layer,updatingHandles:this._updatingHandles}),this.addHandles([i(this._highlightHelper),s(()=>this.suspended,e=>this._highlightHelper.suspended=e,l)])}_initSubView(){this.addHandles([s(()=>this.layer.renderer,e=>this._recreateSubView(e),o)])}_recreateSubView(e){const t="flow"===e?.type,i="flow"===this.subView?.type,r=this.subView;r&&t===i||(this.subView=t?new g({layerView:this}):new p({layerView:this}),r?.destroy())}getFetchOptions(){return{timeExtent:this.timeExtent}}highlight(e,i){if("number"==typeof e||"string"==typeof e||m(e))return r();if(Array.isArray(e)||t.isCollection(e)){const t=e.at(0);if(null==t||"number"==typeof t||"string"==typeof t)return r()}return this._highlightHelper.highlight(e,i)}isUpdating(){return super.isUpdating()||this._highlightHelper.updating}};e([h()],y.prototype,"highlightOptions",null),e([h()],y.prototype,"pixelData",null),y=e([a("esri.views.3d.layers.ImageryLayerView3D")],y);const c=y;export{c as default};
|
|
@@ -2,7 +2,6 @@ import type { RenderNodeInput } from "../webgl.js";
|
|
|
2
2
|
import type { ManagedColorAttachment } from "./ManagedColorAttachment.js";
|
|
3
3
|
import type { ManagedDepthAttachment } from "./ManagedDepthAttachment.js";
|
|
4
4
|
import type { ManagedFBOResource } from "./ManagedFBOResource.js";
|
|
5
|
-
import type { ColorAttachment, DepthStencilAttachment } from "../../webgl/enums.js";
|
|
6
5
|
import type { Texture } from "../../webgl/Texture.js";
|
|
7
6
|
|
|
8
7
|
/**
|
|
@@ -40,7 +39,7 @@ export default abstract class ManagedFBO extends ManagedFBOResource {
|
|
|
40
39
|
*
|
|
41
40
|
* @param attachment - the WebGL color attachment point for the texture
|
|
42
41
|
*/
|
|
43
|
-
acquireColor(attachment:
|
|
42
|
+
acquireColor(attachment: number): ManagedFBO;
|
|
44
43
|
/**
|
|
45
44
|
* Acquire and attach a new depth buffer to this framebuffer.
|
|
46
45
|
* The attached texture has a gl.PixelFormat.DEPTH_STENCIL pixel format.
|
|
@@ -55,7 +54,7 @@ export default abstract class ManagedFBO extends ManagedFBOResource {
|
|
|
55
54
|
* @param color - the color texture to attach.
|
|
56
55
|
* @param attachment - the gl.ColorFormat attachment point.
|
|
57
56
|
*/
|
|
58
|
-
attachColor(color: ManagedColorAttachment, attachment:
|
|
57
|
+
attachColor(color: ManagedColorAttachment, attachment: number): ManagedFBO;
|
|
59
58
|
/**
|
|
60
59
|
* Attach a depth buffer texture to this framebuffer. This function will automatically
|
|
61
60
|
* bind the framebuffer of this ManagedFBO if necessary.
|
|
@@ -71,13 +70,13 @@ export default abstract class ManagedFBO extends ManagedFBOResource {
|
|
|
71
70
|
*
|
|
72
71
|
* @param attachment - the WebGL color attachment point.
|
|
73
72
|
*/
|
|
74
|
-
getAttachment(attachment?:
|
|
73
|
+
getAttachment(attachment?: number): ManagedColorAttachment | ManagedDepthAttachment | null | undefined;
|
|
75
74
|
/**
|
|
76
75
|
* Return the texture for a given color or depth attachment.
|
|
77
76
|
*
|
|
78
77
|
* @param attachment - a WebGL color or depth attachment point.
|
|
79
78
|
*/
|
|
80
|
-
getTexture(attachment?:
|
|
79
|
+
getTexture(attachment?: number): Texture | null | undefined;
|
|
81
80
|
/** Detach the attached depth buffer texture and return ownership to the caller. */
|
|
82
81
|
obtainDepthTexture(): any | null | undefined;
|
|
83
82
|
/**
|
|
@@ -3,7 +3,7 @@ import type SceneView from "../../SceneView.js";
|
|
|
3
3
|
import type ManagedFBO from "./ManagedFBO.js";
|
|
4
4
|
import type RenderCamera from "./RenderCamera.js";
|
|
5
5
|
import type { ConsumedNodes, RenderNodeOutput } from "../webgl.js";
|
|
6
|
-
import type { SunLight } from "
|
|
6
|
+
import type { SunLight } from "./types.js";
|
|
7
7
|
|
|
8
8
|
export interface RenderNodeProperties extends Partial<Pick<RenderNode, "produces">> {
|
|
9
9
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
/** Tuple of an RGB color value and an intensity value. */
|
|
3
|
+
export interface ColorAndIntensity {
|
|
3
4
|
/** RGB color with values between 0 and 1. */
|
|
4
5
|
color: [
|
|
5
6
|
number,
|
|
@@ -16,7 +17,7 @@ export interface ReadonlyLightSpec {
|
|
|
16
17
|
* Lambertian (`diffuse`) and a constant (`ambient`) term, which should be treated in the sense of the
|
|
17
18
|
* [Phong Reflection Model](https://en.wikipedia.org/wiki/Phong_reflection_model).
|
|
18
19
|
*/
|
|
19
|
-
export
|
|
20
|
+
export interface SunLight {
|
|
20
21
|
/** The ambient light color and intensity. */
|
|
21
22
|
ambient: ColorAndIntensity;
|
|
22
23
|
/** The diffuse light color and intensity. */
|
|
@@ -27,7 +28,4 @@ export abstract class SunLight {
|
|
|
27
28
|
number,
|
|
28
29
|
number
|
|
29
30
|
];
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/** Tuple of an RGB color value and an intensity value. */
|
|
33
|
-
export type ColorAndIntensity = ReadonlyLightSpec;
|
|
31
|
+
}
|
|
@@ -12,7 +12,7 @@ return vvSizeFallback.xz;
|
|
|
12
12
|
return size * clamp(vvSizeOffset + value * vvSizeFactor, vvSizeMinSize, vvSizeMaxSize).xz;
|
|
13
13
|
}`)):u.code.add(v`vec2 getSize(){
|
|
14
14
|
return size;
|
|
15
|
-
}`),x?(f.add("opacityFeatureAttribute","float"),u.constants.add("vvOpacityNumber","int",p),u.uniforms.add(new l("vvOpacityValues",e=>e.vvOpacity.values
|
|
15
|
+
}`),x?(f.add("opacityFeatureAttribute","float"),u.constants.add("vvOpacityNumber","int",p),u.uniforms.add(new l("vvOpacityValues",p,e=>e.vvOpacity.values),new l("vvOpacityOpacities",p,e=>e.vvOpacity.opacityValues),new t("vvOpacityFallback",e=>e.vvOpacity.fallback,{supportsNaN:!0})),u.code.add(v`
|
|
16
16
|
vec4 applyOpacity(vec4 color) {
|
|
17
17
|
// if we encounter NaN in the color it means the color is in the fallback case where the symbol color
|
|
18
18
|
// is not defined and there is no valid color visual variable override. In this case just return a fully
|
|
@@ -43,7 +43,7 @@ return size;
|
|
|
43
43
|
}
|
|
44
44
|
`)):u.code.add(v`vec4 applyOpacity(vec4 color){
|
|
45
45
|
return color;
|
|
46
|
-
}`),m?(f.add("colorFeatureAttribute","float"),u.constants.add("vvColorNumber","int",n),u.uniforms.add(new l("vvColorValues",e=>e.vvColor.values
|
|
46
|
+
}`),m?(f.add("colorFeatureAttribute","float"),u.constants.add("vvColorNumber","int",n),u.uniforms.add(new l("vvColorValues",n,e=>e.vvColor.values),new i("vvColorColors",n,e=>e.vvColor.colors),new a("vvColorFallback",e=>e.vvColor.fallback)),u.code.add(v`vec4 getColor() {
|
|
47
47
|
float value = colorFeatureAttribute;
|
|
48
48
|
if (isnan(value)) {
|
|
49
49
|
return applyOpacity(vvColorFallback);
|
|
@@ -25,7 +25,7 @@ return size;
|
|
|
25
25
|
float fullSize = intrinsicWidth * size;
|
|
26
26
|
return ${p(y,"applyLineSizeScreenSizePerspective(fullSize, pos)","fullSize")};
|
|
27
27
|
}
|
|
28
|
-
`)),f.hasVVOpacity?(m.add("opacityFeatureAttribute","float"),S.constants.add("vvOpacityNumber","int",8),S.uniforms.add(new v("vvOpacityValues",e=>e.vvOpacity.values
|
|
28
|
+
`)),f.hasVVOpacity?(m.add("opacityFeatureAttribute","float"),S.constants.add("vvOpacityNumber","int",8),S.uniforms.add(new v("vvOpacityValues",u,e=>e.vvOpacity.values),new v("vvOpacityOpacities",u,e=>e.vvOpacity.opacityValues),new s("vvOpacityFallback",e=>e.vvOpacity.fallback,{supportsNaN:!0})),S.code.add(n`
|
|
29
29
|
float interpolateOpacity(float value) {
|
|
30
30
|
if (value <= vvOpacityValues[0]) {
|
|
31
31
|
return vvOpacityOpacities[0];
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"./Colormap.glsl.js";import"./Common.glsl.js";import"../terrain/TileBackground.glsl.js";import"../terrain/TileComposite.glsl.js";import"../util/ColorConversion.glsl.js";import"../../shaderModules/BooleanPassUniform.js";import"../../shaderModules/Float2PassUniform.js";import"../../shaderModules/FloatPassUniform.js";import"../../shaderModules/FloatsPassUniform.js";import"../../shaderModules/glsl.js";import"../../shaderModules/IntegerPassUniform.js";import"../../shaderModules/Texture2DPassUniform.js";import"../../../../../webgl/ShaderBuilder.js";export{b as ColorizerHillshadeUniforms,a as ColorizerStretchUniforms,C as ColorizerUniforms,c as build}from"../../../../../../chunks/RasterColorizer.glsl.js";
|
|
5
|
+
import"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"./Colormap.glsl.js";import"./Common.glsl.js";import"../terrain/TileBackground.glsl.js";import"../terrain/TileComposite.glsl.js";import"../util/ColorConversion.glsl.js";import"../../shaderModules/BooleanPassUniform.js";import"../../shaderModules/Float2PassUniform.js";import"../../shaderModules/Float3PassUniform.js";import"../../shaderModules/FloatPassUniform.js";import"../../shaderModules/FloatsPassUniform.js";import"../../shaderModules/glsl.js";import"../../shaderModules/IntegerPassUniform.js";import"../../shaderModules/Texture2DPassUniform.js";import"../../../../../webgl/ShaderBuilder.js";export{b as ColorizerHillshadeUniforms,a as ColorizerStretchUniforms,C as ColorizerUniforms,c as build}from"../../../../../../chunks/RasterColorizer.glsl.js";
|
|
@@ -26,7 +26,7 @@ return vec4(vvSymbolRotationMatrix * ( vvScale(_featureAttribute) * (position +
|
|
|
26
26
|
return vvTransformPosition(position, instanceFeatureAttribute);
|
|
27
27
|
}`:""}
|
|
28
28
|
`)):m.code.add(i`vec4 localPosition() { return vec4(position, 1.0); }
|
|
29
|
-
vec4 vvLocalNormal(vec3 _normal) { return vec4(_normal, 1.0); }`),u.vertex.include(o),c.hasVVColor?(m.constants.add("vvColorNumber","int",n),m.uniforms.add(new l("vvColorValues",o=>o.vvColor.values
|
|
29
|
+
vec4 vvLocalNormal(vec3 _normal) { return vec4(_normal, 1.0); }`),u.vertex.include(o),c.hasVVColor?(m.constants.add("vvColorNumber","int",n),m.uniforms.add(new l("vvColorValues",n,o=>o.vvColor.values),new v("vvColorColors",n,o=>o.vvColor.colors),new t("vvColorFallback",o=>o.vvColor.fallback,{supportsNaN:!0})),c.hasVVInstancing&&(u.vertex.include(e),u.vertex.include(r)),m.code.add(i`
|
|
30
30
|
vec4 interpolateVVColor(float value) {
|
|
31
31
|
if (isnan(value)) {
|
|
32
32
|
return vvColorFallback;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{Uniform as r}from"../../../../webgl/Uniform.js";class e extends r{constructor(r,e,o,s){super(r,"vec4",1,(
|
|
5
|
+
import{Uniform as r}from"../../../../webgl/Uniform.js";class e extends r{constructor(r,e,o,s){super(r,"vec4",1,(e,t,c)=>e.setUniform4fv(r,o(t,c),s),e)}}export{e as Float4sPassUniform};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{Uniform as o}from"../../../../webgl/Uniform.js";class r extends o{constructor(o,r,s,t){super(o,"float",1,(
|
|
5
|
+
import{Uniform as o}from"../../../../webgl/Uniform.js";class r extends o{constructor(o,r,s,t){super(o,"float",1,(r,e,f)=>r.setUniform1fv(o,s(e,f),t),r)}}export{r as FloatsPassUniform};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import i from"../../../../../core/Accessor.js";import
|
|
5
|
+
import{__decorate as e}from"tslib";import i from"../../../../../core/Accessor.js";import r from"../../../../../core/Logger.js";import{disposeMaybe as t}from"../../../../../core/maybe.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators.js";import{isDepthOrShadowLikeOutput as o}from"../shaderLibrary/ShaderOutput.js";import{Pos2 as a}from"../../lib/DefaultVertexBufferLayouts.js";import{Program as n}from"../../lib/Program.js";import{PrimitiveType as l,DrawBufferNone as h}from"../../../../webgl/enums.js";import{makePipelineState as c,defaultColorWrite as p,premultipliedAlpha as m}from"../../../../webgl/renderState.js";import{fromLayout as u}from"../../../../webgl/VertexAttributeLocations.js";const d=()=>r.getLogger("esri.views.3d.webgl.ShaderTechnique");let g=class extends i{constructor(e,i,r){super({}),this._context=e,this._configuration=i,this.primitiveType=l.TRIANGLES,this.key=i.key,this.locations=u(r??a),this._pipeline=this.initializePipeline(i),this.reload=async r=>{if(r&&await this.shader.reload(),!this.key.equals(i.key))return void d().warn(`Configuration was changed after construction, cannot reload shader for ${this.declaredClass}.`);t(this._program);const s=this.shader.get().build(i);s.debugName=this.declaredClass,this._program=new n(e.rctx,s,this.locations),this._pipeline=this.initializePipeline(i)}}initialize(){const e=this.shader.get().build(this._configuration);e.debugName=this.declaredClass,this._program=new n(this._context.rctx,e,this.locations)}destroy(){this._program=t(this._program),this._pipeline=null}get program(){return this._program}get compiled(){return this.program.compiled}ensureAttributeLocations(e){this.program.assertCompatibleVertexAttributeLocations(e)}getPipeline(e,i){return this._pipeline}initializePipeline(e){return c({blending:m,colorWrite:p})}};function f(e,i){return o(e)?{buffers:[h]}:i??null}g=e([s("esri.views.3d.webgl-engine.core.shaderTechnique.ShaderTechnique")],g);export{g as ShaderTechnique,f as depthOnlyOutputBuffersOr};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../environment/ChapmanRaymarching.glsl.js";import"../../core/shaderLibrary/output/ReadDepth.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderLibrary/shading/MainLighting.glsl.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DBindUniform.js";import"../../shaders/ScreenSpacePassAtmosphere.glsl.js";import"../../shaders/SphereIntersect.glsl.js";import"../../shaders/ToneMapping.glsl.js";import"../../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../../chunks/Haze.glsl.js";
|
|
5
|
+
import"../../../environment/ChapmanApproximation.glsl.js";import"../../../environment/ChapmanRaymarching.glsl.js";import"../../core/shaderLibrary/output/ReadDepth.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderLibrary/shading/MainLighting.glsl.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/FloatsPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DBindUniform.js";import"../../shaders/ScreenSpacePassAtmosphere.glsl.js";import"../../shaders/SphereIntersect.glsl.js";import"../../shaders/ToneMapping.glsl.js";import"../../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../../chunks/Haze.glsl.js";
|