import type Color from "../../Color.js"; import type ColorStop from "../../renderers/visualVariables/support/ColorStop.js"; import type { ColorLike } from "../../Color.js"; import type { Clonable } from "../../core/Clonable.js"; import type { ColorStopProperties } from "../../renderers/visualVariables/support/ColorStop.js"; /** * Properties that can be used to construct a [DiscreteOptions](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCast/DiscreteOptions/) instance. * * @since 5.0 */ export interface DiscreteOptionsProperties extends Partial> { /** * Defines the color used by the default color ramp for the visualization. The opacity is mapped to the number of * overlapping shadows. When [ShadowCastAnalysis.visualizeSunlight](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCastAnalysis/#visualizeSunlight) is `true`, the opacity is mapped * to the number of overlapping sunlight samples instead. Areas with no shadow or sunlight are displayed with zero * opacity and areas with the maximum overlap are displayed with the opacity specified in this color. * * When [colorStops](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCast/DiscreteOptions/#colorStops) is not specified, the visualization uses a default ramp between transparent and this color. When specified, those stops are used instead. * * @default [50, 50, 50, 0.7] * @since 5.0 */ color?: ColorLike; /** * The color stops for the visualization. * * - Each stop defines a color and the corresponding number of overlapping shadows. When * [ShadowCastAnalysis.visualizeSunlight](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCastAnalysis/#visualizeSunlight) is `true`, each stop defines the corresponding number of * overlapping sunlight samples instead. These are sample-count values, not duration values. * - Colors are interpolated between adjacent stops. * - If omitted, the visualization uses a default ramp between transparent and [color](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCast/DiscreteOptions/#color). If specified, these stops are used. * * > [!WARNING] * > * > **Known Limitations** * > * > In a [3D SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/), a maximum of 8 color stops is supported. * * @since 5.1 */ colorStops?: ColorStopProperties[] | null; } /** * Configuration for the "discrete" mode of the [ShadowCastAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCastAnalysis/). * * @since 5.0 * @see [ShadowCastAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCastAnalysis/) * @see [ShadowCastAnalysisView3D](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/ShadowCastAnalysisView3D/) * @see [Sample - Shadow Cast analysis](https://developers.arcgis.com/javascript/latest/sample-code/shadow-cast/) * @see [Shadow Cast component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-shadow-cast/) */ export default class DiscreteOptions extends Clonable { /** @since 5.0 */ constructor(properties?: DiscreteOptionsProperties); /** * Defines the color used by the default color ramp for the visualization. The opacity is mapped to the number of * overlapping shadows. When [ShadowCastAnalysis.visualizeSunlight](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCastAnalysis/#visualizeSunlight) is `true`, the opacity is mapped * to the number of overlapping sunlight samples instead. Areas with no shadow or sunlight are displayed with zero * opacity and areas with the maximum overlap are displayed with the opacity specified in this color. * * When [colorStops](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCast/DiscreteOptions/#colorStops) is not specified, the visualization uses a default ramp between transparent and this color. When specified, those stops are used instead. * * @default [50, 50, 50, 0.7] * @since 5.0 */ get color(): Color; set color(value: ColorLike); /** * The color stops for the visualization. * * - Each stop defines a color and the corresponding number of overlapping shadows. When * [ShadowCastAnalysis.visualizeSunlight](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCastAnalysis/#visualizeSunlight) is `true`, each stop defines the corresponding number of * overlapping sunlight samples instead. These are sample-count values, not duration values. * - Colors are interpolated between adjacent stops. * - If omitted, the visualization uses a default ramp between transparent and [color](https://developers.arcgis.com/javascript/latest/references/core/analysis/ShadowCast/DiscreteOptions/#color). If specified, these stops are used. * * > [!WARNING] * > * > **Known Limitations** * > * > In a [3D SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/), a maximum of 8 color stops is supported. * * @since 5.1 */ get colorStops(): ColorStop[] | null | undefined; set colorStops(value: ColorStopProperties[] | null | undefined); /** * Individual shadows are displayed at this time interval, starting with the start time of day. * The interval is expressed in milliseconds. If set to 0, we'll use the smallest possible interval, up to a * maximum of 255 samples. * * @default 1 * 3600 * 1000 * @since 5.0 */ accessor interval: number; }