@vesium/plot 1.0.1-beta.50 → 1.0.1-beta.52
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/dist/index.cjs +3017 -1431
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +603 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +603 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.iife.js +3065 -1475
- package/dist/index.iife.js.map +1 -1
- package/dist/index.iife.min.js +2 -2
- package/dist/index.iife.min.js.map +1 -1
- package/dist/index.min.cjs +2 -2
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.mjs +2 -2
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +2973 -1444
- package/dist/index.mjs.map +1 -1
- package/package.json +17 -16
- package/dist/index.d.ts +0 -551
package/dist/index.min.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.min.cjs","sources":["../usePlot/PlotScheme.ts","../usePlot/SampledPlotProperty.ts","../usePlot/PlotFeature.ts","../usePlot/PlotSkeleton.ts","../usePlot/useRender.ts","../usePlot/useSampled.ts","../usePlot/useSkeleton.ts","../usePlot/usePlot.ts","../skeleton/control.ts","../skeleton/interval.ts","../skeleton/intervalNonclosed.ts","../skeleton/moved.ts","../measure/utils/tesselate.ts","../measure/utils/area.ts","../measure/measureArea.ts","../scheme/billboard.ts","../scheme/label.ts","../scheme/polygon.ts","../scheme/polyline.ts","../scheme/rectangle.ts"],"sourcesContent":["import type { Cartesian3, Entity } from 'cesium';\nimport type { Nullable } from 'vesium';\nimport type { CSSProperties } from 'vue';\nimport type { PlotSkeleton } from './PlotSkeleton';\nimport type { SampledPlotPackable } from './SampledPlotProperty';\nimport { assert } from '@vueuse/core';\nimport { assertError } from 'vesium';\n\nexport interface PlotRenderResult {\n entities?: Entity[];\n primitives?: any[];\n groundPrimitives?: any[];\n}\n\nexport interface PlotRenderOptions<D = any> {\n /**\n * 当前标绘点位数据\n */\n packable: SampledPlotPackable<D>;\n\n /**\n * 当前是否处于定义态\n */\n defining: boolean;\n\n /**\n * 当前鼠标位置,若当前标绘不处于定义态时,`mouse`为`undefined`\n */\n mouse?: Cartesian3;\n\n /**\n * 上一次的渲染结果\n */\n previous: PlotRenderResult;\n}\n\nexport interface PlotSchemeConstructorOptions {\n /**\n * 标绘类型。应当是全局唯一的字符串,会作为键名缓存\n */\n type: string;\n\n /**\n * 判断是否立即完成标绘.\n * 每次控制点发生变变化时,执行该回调函数,返回`true`则完成标绘\n */\n complete?: (packable: SampledPlotPackable) => boolean;\n\n /**\n * 判断是否允许手动完成标绘。\n * 每次控制点发生变变化时,执行该回调函数,返回`true`则后续左键双击即完成标绘\n */\n allowManualComplete?: (packable: SampledPlotPackable) => boolean;\n\n /**\n * 处于定义态时鼠标的样式\n * @default 'crosshair'\n */\n definingCursor?: Nullable<CSSProperties['cursor']> | ((packable: SampledPlotPackable) => Nullable<CSSProperties['cursor']>);\n\n /**\n * 当前标绘的框架点数据\n */\n skeletons?: (() => PlotSkeleton) [];\n\n /**\n * 初始化时创建`Entity`的函数,创建后的`Entity`会作为配置项传入`render`中\n */\n initEntites?: () =>(Entity[] | undefined);\n\n /**\n * 初始化时创建贴地`Primitive`的函数,创建后的`Primitive`会作为配置项传入`render`中\n */\n initPrimitives?: () =>(any[] | undefined);\n\n /**\n * 初始化时创建贴地`Primitive`的函数,创建后的`Primitive`会作为配置项传入`render`中\n */\n initGroundPrimitives?: () =>(any[] | undefined);\n\n /**\n * 当标绘数据变化时,会触发`render`回调,返回的数据会被添加到cesium中\n */\n render?: (options: PlotRenderOptions) => PlotRenderResult | Promise<PlotRenderResult>;\n}\n\nexport class PlotScheme {\n constructor(options: PlotSchemeConstructorOptions) {\n this.type = options.type;\n this.complete = options.complete;\n this.allowManualComplete = options.allowManualComplete;\n this.definingCursor = options.definingCursor ?? 'crosshair';\n this.skeletons = options.skeletons?.map(item => item()) ?? [];\n this.initEntites = options.initEntites;\n this.initPrimitives = options.initPrimitives;\n this.initGroundPrimitives = options.initGroundPrimitives;\n this.render = options.render;\n }\n\n /**\n * 标绘类型。应当是全局唯一的字符串,会作为键名缓存\n */\n type: string;\n\n /**\n * 判断是否立即完成标绘.\n * 每次控制点发生变变化时,执行该回调函数,返回`true`则完成标绘\n */\n complete?: (packable: SampledPlotPackable) => boolean;\n\n /**\n * 判断是否允许手动完成标绘。\n * 每次控制点发生变变化时,执行该回调函数,返回`true`则后续左键双击即完成标绘\n */\n allowManualComplete?: (packable: SampledPlotPackable) => boolean;\n\n /**\n * 处于定义态时鼠标的样式\n * @default 'crosshair'\n */\n definingCursor?: Nullable<CSSProperties['cursor']> | ((packable: SampledPlotPackable) => Nullable<CSSProperties['cursor']>);\n\n /**\n * 当前标绘的框架点数据\n */\n skeletons: PlotSkeleton[];\n\n /**\n * 初始化时创建`Entity`的函数,创建后的`Entity`会作为配置项传入`render`中\n */\n initEntites?: () =>(Entity[] | undefined);\n\n /**\n * 初始化时创建`Primitive`的函数,创建后的`Primitive`会作为配置项传入`render`中\n */\n initPrimitives?: () =>(any[] | undefined);\n\n /**\n * 初始化时创建贴地`Primitive`的函数,创建后的`Primitive`会作为配置项传入`render`中\n */\n initGroundPrimitives?: () =>(any[] | undefined);\n\n /**\n * 当标绘数据变化时,会触发`render`回调,返回的数据会被添加到cesium中\n */\n render?: (options: PlotRenderOptions) => PlotRenderResult | Promise<PlotRenderResult>;\n\n private static _record = new Map<string, PlotScheme>();\n\n /**\n * 标绘方案缓存。\n * 每次标绘时都会将`PlotScheme.type`作为键名缓存,\n * 后续可用过`PlotScheme.getCache(type)`获取完整的`PlotScheme`配置。\n */\n static getCacheTypes(): string[] {\n return [...this._record.keys()];\n }\n\n /**\n * 通过`PlotScheme.type`获取缓存中的`PlotScheme`配置。\n */\n static getCache(type: string): PlotScheme | undefined {\n return PlotScheme._record.get(type);\n }\n\n /**\n * 缓存标绘方案。\n */\n static setCache(scheme: PlotScheme): void {\n assertError(!scheme.type, '`scheme.type` is required');\n PlotScheme._record.set(scheme.type, scheme);\n }\n\n /**\n * 解析传入的maybeScheme,maybeScheme可能是一个完整的PlotScheme,也可能是缓存中的`PlotScheme.type`,并返回 PlotScheme 实例。\n * 若传入的是`PlotScheme.type`字符串,并且缓存中不存在该标绘方案,则抛出错误。\n */\n static resolve(maybeScheme: string | PlotScheme | PlotSchemeConstructorOptions): PlotScheme {\n if (typeof maybeScheme === 'string') {\n const _scheme = PlotScheme.getCache(maybeScheme);\n assert(!!_scheme, `scheme ${maybeScheme} not found`);\n return _scheme!;\n }\n else if (!(maybeScheme instanceof PlotScheme)) {\n return new PlotScheme(maybeScheme);\n }\n else {\n return maybeScheme;\n }\n }\n}\n","import type { Property } from 'cesium';\nimport { Cartesian3, Event, JulianDate, TimeInterval } from 'cesium';\n\n/**\n * 标绘采集到的数据\n */\nexport interface SampledPlotPackable<D = any> {\n\n /**\n * 当前标绘所属于的时间节点\n */\n time?: JulianDate;\n\n /**\n * 采样点位数据\n */\n positions?: Cartesian3[];\n\n /**\n * 附带的额外自定义数据\n */\n derivative?: D;\n}\n\nexport enum SampledPlotStrategy {\n NEAR = 0,\n CYCLE = 1,\n STRICT = 2,\n}\n\nexport type SampledPlotInterpolationAlgorithm<D = any> = (\n time: JulianDate,\n previous: SampledPlotPackable<D>,\n next: SampledPlotPackable<D>,\n proportion: number\n) => SampledPlotPackable;\n\n/**\n * 默认插值算法\n *\n * @param time 时间\n * @param previous 前一个数据点\n * @param next 后一个数据点\n * @param proportion 比例\n * @returns 插值结果\n */\nconst defaultInterpolationAlgorithm: SampledPlotInterpolationAlgorithm = (time, previous, next, proportion) => {\n if (proportion === 0) {\n return {\n time,\n positions: previous.positions?.map(item => item.clone()),\n derivative: previous.derivative,\n };\n }\n else if (proportion === 1) {\n return {\n time,\n positions: next.positions?.map(item => item.clone()),\n derivative: previous.derivative,\n };\n }\n\n return {\n time,\n positions: next.positions?.map((right, index) => {\n const left = previous.positions?.[index];\n return !left ? right : Cartesian3.lerp(left, right, proportion, new Cartesian3());\n }),\n derivative: previous.derivative,\n };\n};\n\nexport interface SampledPlotPropertyConstructorOptions<D = any> {\n interpolationAlgorithm?: SampledPlotInterpolationAlgorithm<D>;\n strategy?: SampledPlotStrategy;\n packables?: SampledPlotPackable<D>[];\n}\n\n/**\n * 标绘采样点数据。\n * 标绘采样点数据是一个时间序列数据,包含时间、位置和附带的额外数据。\n * 具体用法可参考 [Cesium.SampledProperty](https://cesium.com/learn/cesiumjs/ref-doc/SampledProperty.html)\n */\nexport class SampledPlotProperty<D = any> {\n constructor(options?: SampledPlotPropertyConstructorOptions<D>) {\n this.interpolationAlgorithm = options?.interpolationAlgorithm;\n this.strategy = options?.strategy ?? SampledPlotStrategy.NEAR;\n options?.packables?.forEach(packable => this.setSample(packable));\n // 默认将初始化一项数据\n if (!this._times.length) {\n this.setSample({\n time: new JulianDate(0, 0),\n positions: [],\n derivative: undefined,\n });\n }\n }\n\n static defaultInterpolationAlgorithm: SampledPlotInterpolationAlgorithm<any> = defaultInterpolationAlgorithm;\n\n strategy: SampledPlotStrategy;\n\n interpolationAlgorithm?: SampledPlotInterpolationAlgorithm;\n\n /**\n * @internal\n */\n private _times: JulianDate[] = [];\n\n /**\n * @internal\n */\n private _sampleds: Cartesian3[][] = [];\n\n /**\n * @internal\n */\n private _derivatives: (D | undefined)[] = [];\n\n get isConstant(): boolean {\n return this._times.length === 0;\n };\n\n /**\n * @internal\n */\n private _definitionChanged = new Event<(...args: any[]) => void>();\n\n get definitionChanged(): Event<(...args: any[]) => void> {\n return this._definitionChanged;\n };\n\n /**\n * 获取时间数组\n *\n * @returns 返回包含所有时间的 JulianDate 数组\n */\n getTimes(): JulianDate[] {\n return this._times.map(t => t.clone());\n }\n\n /**\n * 根据给定的儒略日期获取时间索引范围及比例\n *\n * @param time 给定的儒略日期\n * @returns 返回包含前一个索引、后一个索引及时间比例的对象,若不符合条件则返回undefined\n * @internal\n */\n private getIndexScope(time: JulianDate): { prevIndex: number; nextIndex: number; proportion: number } | undefined {\n if (!this._times.length) {\n return;\n }\n const start = this._times[0];\n const end = this._times[this._times.length - 1];\n if (JulianDate.lessThan(time, start) || JulianDate.greaterThan(time, end)) {\n switch (this.strategy) {\n case SampledPlotStrategy.STRICT: {\n return;\n }\n case SampledPlotStrategy.NEAR: {\n time = JulianDate.lessThan(time, this._times[0])\n ? this._times[0].clone()\n : this._times[this._times.length - 1].clone();\n break;\n }\n case SampledPlotStrategy.CYCLE: {\n const startMS = JulianDate.toDate(this._times[0]).getTime();\n const endMS = JulianDate.toDate(this._times[this._times.length - 1]).getTime();\n const duration = endMS - startMS;\n const timeMS = JulianDate.toDate(time).getTime();\n const diff = (timeMS - startMS) % duration;\n const dete = new Date(startMS + diff);\n time = JulianDate.fromDate(dete);\n break;\n }\n }\n }\n\n const prevIndex = this._times.findIndex(t => JulianDate.lessThanOrEquals(time, t));\n const nextIndex = Math.min(prevIndex, this._times.length - 1);\n const prevMs = JulianDate.toDate(this._times[prevIndex]).getTime();\n const nextMs = JulianDate.toDate(this._times[nextIndex]).getTime();\n const ms = JulianDate.toDate(time).getTime();\n\n return {\n prevIndex,\n nextIndex,\n proportion: ((ms - prevMs) / (nextMs - prevMs)) || 0,\n };\n }\n\n /**\n * 根据给定的儒略日期(JulianDate)获取插值后的样本点数据。\n *\n * @param time 指定的儒略日期(JulianDate)。\n * @param result 可选参数,用于存储结果的容器。如果未提供,则创建一个新的容器。\n * @returns 插值后的样本点数据,存储在提供的或新创建的result容器中。\n * @template D 数据类型。\n */\n getValue(time?: JulianDate, result?: SampledPlotPackable): SampledPlotPackable<D> {\n result ??= { time };\n Object.assign(result, {\n time: time?.clone(),\n positions: undefined,\n derivative: undefined,\n });\n\n if (!time) {\n result.time = this._times[0]!.clone();\n result.positions = this._sampleds[0]?.map(c => c.clone(c));\n result.derivative = this._derivatives[0];\n return result;\n }\n const scope = this.getIndexScope(time);\n if (!scope) {\n return result;\n }\n\n result.time = time;\n const { prevIndex, nextIndex, proportion } = scope;\n const previous: SampledPlotPackable<D> = {\n time: this._times[prevIndex],\n positions: this._sampleds[prevIndex],\n derivative: this._derivatives[prevIndex],\n };\n const next: SampledPlotPackable<D> = {\n time: this._times[nextIndex],\n positions: this._sampleds[nextIndex],\n derivative: this._derivatives[nextIndex],\n };\n const packable = (this.interpolationAlgorithm || SampledPlotProperty.defaultInterpolationAlgorithm)(time, previous, next, proportion);\n Object.assign(result, packable);\n return result;\n }\n\n /**\n * 设置样本数据,如果传入的数据不含时间,则会存入时间最早的集合中\n * @param value 样本数据对象,包含时间、位置和导数信息\n */\n setSample(value: SampledPlotPackable<D>): void {\n const time = value.time?.clone() ?? this._times[0]!.clone();\n const positions = value.positions?.map(item => item.clone()) ?? [];\n const derivative = value.derivative;\n const index = this._times.findIndex(t => JulianDate.equals(time, t));\n\n if (index !== -1) {\n this._times[index] = time;\n this._sampleds[index] = positions;\n this._derivatives[index] = value.derivative;\n }\n else if (this._times.length === 0) {\n this._times[0] = time;\n this._sampleds[0] = positions;\n this._derivatives[0] = value.derivative;\n }\n else if (JulianDate.lessThan(time, this._times[0])) {\n this._times.splice(0, 0, time);\n this._sampleds.splice(0, 0, positions);\n this._derivatives.splice(0, 0, derivative);\n }\n else if (JulianDate.greaterThan(time, this._times[this._times.length - 1])) {\n this._times.push(time);\n this._sampleds.push(positions);\n this._derivatives.push(derivative);\n }\n\n this.definitionChanged.raiseEvent(this);\n }\n\n /**\n * 设置样本数据\n *\n * @param values 样本数据数组,每个元素都是类型为SampledPlotPackable<D>的对象\n */\n setSamples(values: SampledPlotPackable<D>[]): void {\n values.forEach(value => this.setSample(value));\n }\n\n /**\n * 从样本中移除指定时间点的数据\n *\n * @param time 需要移除的时间点,使用儒略日期表示\n * @returns 如果成功移除,则返回 true;否则返回 false\n */\n removeSample(time: JulianDate): boolean {\n const index = this._times.findIndex(t => t.equals(time));\n if (index !== -1) {\n this._sampleds.splice(index, 1);\n this._derivatives.splice(index, 1);\n const removed = this._times.splice(index, 1);\n if (removed.length) {\n this._definitionChanged.raiseEvent(this);\n return true;\n }\n }\n return false;\n }\n\n /**\n * 从样本中移除指定时间间隔内的样本。\n *\n * @param interval 要移除样本的时间间隔\n */\n removeSamples(interval: TimeInterval): void {\n for (let i = 0; i < this._times.length; i++) {\n const time = this._times[i];\n TimeInterval.contains(interval, time) && this.removeSample(time);\n }\n }\n\n /**\n * 判断两个property是否相等\n */\n equals(other?: Property): boolean {\n return other === this;\n }\n}\n","import type { Entity } from 'cesium';\nimport type { PlotSchemeConstructorOptions } from './PlotScheme';\nimport type { PlotSkeletonEntity } from './PlotSkeleton';\nimport type { SampledPlotPropertyConstructorOptions } from './SampledPlotProperty';\nimport { createGuid, Event } from 'cesium';\nimport { PlotScheme } from './PlotScheme';\nimport { SampledPlotProperty } from './SampledPlotProperty';\n\nexport type PlotDefinitionChangedCallback = (\n scope: PlotFeature,\n key: keyof PlotFeature,\n newValue: PlotFeature[typeof key],\n oldValue: PlotFeature[typeof key],\n) => void;\n\n/**\n * 标绘实例构造参数\n */\nexport interface PlotFeatureConstructorOptions {\n /**\n * 唯一标识符\n *\n * 未指定时将自动生成GUID\n */\n id?: string;\n\n /**\n * 标绘方案配置\n *\n * 支持直接传入字符串方案名称、方案实例或构造参数\n */\n scheme: string | PlotScheme | PlotSchemeConstructorOptions;\n\n /**\n * 采样属性配置\n *\n * 控制标绘对象的动态属性采样行为\n */\n sampled?: SampledPlotProperty | SampledPlotPropertyConstructorOptions;\n\n /**\n * 禁用状态标志\n *\n * @default false\n */\n disabled?: boolean;\n}\n\n/**\n * 标绘实例\n */\nexport class PlotFeature {\n constructor(options: PlotFeatureConstructorOptions) {\n const { id, disabled = false, sampled } = options;\n this._id = id || createGuid();\n this._scheme = PlotScheme.resolve(options.scheme);\n\n this._definitionChanged = new Event();\n this._defining = true;\n this._disabled = disabled;\n this._sampled = sampled instanceof SampledPlotProperty ? sampled : new SampledPlotProperty(sampled);\n this._sampled.definitionChanged.addEventListener(property => this._definitionChanged.raiseEvent(this, 'sampled', property, property), this);\n\n this._entities = [...this._scheme.initEntites?.() ?? []];\n this._primitives = [...this._scheme.initPrimitives?.() ?? []];\n this._groundPrimitives = [...this._scheme.initGroundPrimitives?.() ?? []];\n this._skeletons = [];\n }\n\n /**\n * @internal\n */\n private _id: string;\n\n get id(): string {\n return this._id;\n }\n\n /**\n * @internal\n */\n private _scheme: PlotScheme;\n\n get scheme(): PlotScheme {\n return this._scheme;\n }\n\n /**\n * @internal\n */\n private _definitionChanged: Event<PlotDefinitionChangedCallback>;\n\n get definitionChanged(): Event<PlotDefinitionChangedCallback> {\n return this._definitionChanged;\n }\n\n /**\n * @internal\n */\n private _defining: boolean;\n\n get defining(): boolean {\n return this._defining;\n }\n\n /**\n * @internal\n */\n static setDefining(plot: PlotFeature, value: boolean): void {\n if (plot._defining !== value) {\n plot._definitionChanged.raiseEvent(plot, 'defining', value, plot._defining);\n plot._defining = value;\n }\n }\n\n /**\n * @internal\n */\n private _disabled: boolean;\n\n /**\n * 获取禁用状态\n *\n * 当为 `true` 时,标绘实例将停止响应交互和更新;\n * 为 `false` 时恢复正常功能。\n */\n get disabled(): boolean {\n return this._disabled;\n }\n\n set disabled(value: string) {\n this.disabled = value;\n }\n\n /**\n * @internal\n */\n private _sampled: SampledPlotProperty;\n\n get sampled(): SampledPlotProperty {\n return this._sampled;\n }\n\n /**\n * @internal\n */\n private _entities: Entity[];\n\n get entities(): Entity[] {\n return this._entities;\n }\n\n set entities(value: Entity[]) {\n this._definitionChanged.raiseEvent(this, 'entities', value, this._entities);\n this._entities = value;\n }\n\n /**\n * @internal\n */\n private _primitives: any[];\n\n get primitives(): any[] {\n return this._primitives;\n }\n\n /**\n * @internal\n */\n set primitives(value: any[]) {\n this._definitionChanged.raiseEvent(this, 'primitives', value, this._primitives);\n this._primitives = value;\n }\n\n /**\n * @internal\n */\n private _groundPrimitives: any[];\n\n get groundPrimitives(): any[] {\n return this._groundPrimitives;\n }\n\n /**\n * @internal\n */\n set groundPrimitives(value: any[]) {\n this._definitionChanged.raiseEvent(this, 'groundPrimitives', value, this._groundPrimitives);\n this._groundPrimitives = value;\n }\n\n /**\n * @internal\n */\n private _skeletons: PlotSkeletonEntity[];\n\n get skeletons(): PlotSkeletonEntity[] {\n return this._skeletons;\n }\n\n /**\n * @internal\n */\n set skeletons(value: PlotSkeletonEntity[]) {\n this._definitionChanged.raiseEvent(this, 'skeletons', value, this._skeletons);\n this._skeletons = value;\n }\n}\n","import type { Cartesian3, ScreenSpaceEventHandler, Viewer } from 'cesium';\nimport type { Nullable } from 'vesium';\nimport type { CSSProperties, MaybeRef, VNode } from 'vue';\nimport type { PlotFeature } from './PlotFeature';\nimport type { SampledPlotPackable, SampledPlotProperty } from './SampledPlotProperty';\nimport { Entity } from 'cesium';\n\nexport interface SkeletonDisabledOptions {\n\n /**\n * 当前标绘是否是否正在激活,即正在编辑状态\n */\n active: boolean;\n\n /**\n * 当前标绘是否还在定义态,即还未完成采集\n */\n defining: boolean;\n}\n\nexport interface OnSkeletonClickOptions {\n viewer: Viewer;\n\n /**\n * 当前标绘属性数据\n */\n sampled: SampledPlotProperty;\n\n /**\n * 标绘采集到的数据,通过该数据可以获取到当前标绘的所有点位信息\n */\n packable: SampledPlotPackable<any>;\n\n /**\n * 当前标绘是否是否正在激活,即正在编辑状态\n */\n active: boolean;\n\n /**\n * 当前标绘是否还在定义态,即还未完成采集\n */\n defining: boolean;\n\n /**\n * 当前被点击的控制点索引\n */\n index: number;\n\n /**\n * 鼠标点击事件上下文信息\n */\n event: ScreenSpaceEventHandler.PositionedEvent;\n}\n\nexport interface OnSkeletonDragOptions {\n viewer: Viewer;\n\n /***\n * 当前标绘属性数据\n */\n sampled: SampledPlotProperty;\n\n /**\n * 标绘采集到的数据,通过该数据可以获取到当前标绘的所有点位信息\n */\n packable: SampledPlotPackable<any>;\n\n /**\n * 当前标绘是否是否正在激活,即正在编辑状态\n */\n active: boolean;\n\n /**\n * 当前被拖拽的控制点索引\n */\n index: number;\n\n /**\n * 鼠标拖拽事件上下文信息\n */\n event: ScreenSpaceEventHandler.MotionEvent;\n\n /**\n * 当前的拖拽状态\n */\n dragging: boolean;\n\n /**\n * 执行是否锁定相机视角\n */\n lockCamera: () => void;\n}\n\nexport interface OnKeyPressedOptions {\n viewer: Viewer;\n\n /**\n * 当前标绘属性数据\n */\n sampled: SampledPlotProperty;\n\n /**\n * 标绘采集到的数据,通过该数据可以获取到当前标绘的所有点位信息\n */\n packable: SampledPlotPackable<any>;\n\n /**\n * 当前被点击的控制点索引\n */\n index: number;\n\n /**\n * 被按压的按键事件回调\n */\n keyEvent: KeyboardEvent;\n}\n\n/**\n * 框架点执行状态枚举\n * - IDLE 空闲状态\n * - HOVER 悬停状态\n * - ACTIVE 激活状态\n */\nexport enum PlotAction {\n IDLE = 0,\n HOVER = 1,\n ACTIVE = 2,\n}\n\nexport interface SkeletonRenderOptions {\n /**\n * 标绘采集到的数据,通过该数据可以获取到当前标绘的所有点位信息\n */\n packable: SampledPlotPackable;\n\n /**\n * 所有框架点位集合\n */\n positions: Cartesian3[];\n\n /**\n * 当前渲染的框架点索引\n */\n index: number;\n /**\n * 当前应当渲染的位置\n */\n position: Cartesian3;\n\n /**\n * 当前标绘是否是否正在激活,即正在编辑状态\n */\n active: boolean;\n\n /**\n * 当前标绘是否还在定义态,即还未完成采集\n */\n defining: boolean;\n\n /**\n * 当前框架点执行状态\n */\n action: PlotAction;\n}\n\n/**\n * 控制点配置项\n */\nexport interface PlotSkeleton {\n /**\n * 是否禁用控制点\n */\n disabled?: boolean | ((options: SkeletonDisabledOptions) => boolean);\n /**\n * 实际情况中,并非所有采集都都要渲染对应框架点,通过`format`函数可以过滤掉不需要渲染的点位,另外还可以自定义点位的偏移、增加框架点\n * @param packable 标绘采集到的数据\n */\n format?: (packable: SampledPlotPackable<any>) => Cartesian3[];\n\n /**\n * 点位渲染函数,返回Entity的构造参数,如果不返回任何值则不渲染该点位\n */\n render?: (options: SkeletonRenderOptions) => Entity.ConstructorOptions | undefined;\n\n /**\n * Cursor style when hovering.\n */\n cursor?: MaybeRef<Nullable<CSSProperties['cursor']>> | ((pick: any) => Nullable<CSSProperties['cursor']>);\n\n /**\n * Cursor style when dragging.\n */\n dragCursor?: MaybeRef<Nullable<CSSProperties['cursor']>> | ((pick: any) => Nullable<CSSProperties['cursor']>);\n\n /**\n * 鼠标悬停在框架点时显示的提示信息\n */\n tip?: (options: SkeletonRenderOptions) => string | VNode | string | undefined;\n\n /**\n * 框架点鼠标左键点击时的处理逻辑\n */\n onLeftClick?: (options: OnSkeletonClickOptions) => void;\n\n /**\n * 框架点被拖拽时的处理逻辑\n */\n onDrag?: (options: OnSkeletonDragOptions) => void;\n\n /**\n * 键盘按键按下时的处理逻辑\n */\n onKeyPressed?: (options: OnKeyPressedOptions) => void;\n}\n\n/**\n * 标绘框架点 Entity\n */\nexport class PlotSkeletonEntity extends Entity {\n constructor(options: Entity.ConstructorOptions) {\n super(options);\n }\n\n /**\n * @internal\n */\n declare plot: PlotFeature;\n\n /**\n * @internal\n */\n declare skeleton: PlotSkeleton;\n\n /**\n * @internal\n */\n declare index: number;\n}\n","import type { Cartesian3, Entity, JulianDate } from 'cesium';\nimport type { ComputedRef, ShallowRef } from 'vue';\nimport type { PlotFeature } from './PlotFeature';\nimport { watchArray } from '@vueuse/core';\nimport { CustomDataSource, PrimitiveCollection, ScreenSpaceEventType } from 'cesium';\nimport { arrayDiff, canvasCoordToCartesian, useCesiumEventListener, useDataSource, useEntityScope, usePrimitive, usePrimitiveScope, useScreenSpaceEventHandler, useViewer } from 'vesium';\nimport { computed, shallowRef, watch } from 'vue';\n\nexport interface UseProductRetrun {\n primitives: ComputedRef<any[]>;\n entities: ComputedRef<Entity[]>;\n groundPrimitives: ComputedRef<any[]>;\n}\n\nexport function useRender(\n plots: ComputedRef<PlotFeature[]>,\n current: ShallowRef<PlotFeature | undefined>,\n getCurrentTime: () => JulianDate,\n): UseProductRetrun {\n const viewer = useViewer();\n\n const primitiveCollection = usePrimitive(new PrimitiveCollection());\n const groundPrimitiveCollection = usePrimitive(new PrimitiveCollection(), { collection: 'ground' });\n const dataSource = useDataSource(new CustomDataSource());\n\n const entityScope = useEntityScope({ collection: () => dataSource.value!.entities! });\n const primitiveScope = usePrimitiveScope({ collection: () => primitiveCollection.value! });\n const groundPrimitiveScope = usePrimitiveScope({ collection: () => groundPrimitiveCollection.value! });\n\n const mouseCartesian = shallowRef<Cartesian3>();\n\n useScreenSpaceEventHandler(\n ScreenSpaceEventType.MOUSE_MOVE,\n (event) => {\n mouseCartesian.value = canvasCoordToCartesian(event?.endPosition, viewer.value!.scene);\n },\n );\n\n watchArray(plots, (_value, _oldValue, added, removed = []) => {\n removed.forEach((plot) => {\n entityScope.removeWhere(item => plot.entities.includes(item));\n primitiveScope.removeWhere(item => plot.primitives.includes(item));\n groundPrimitiveScope.removeWhere(item => plot.groundPrimitives.includes(item));\n });\n\n added.forEach((plot) => {\n plot.entities.forEach(item => entityScope.add(item));\n plot.primitives.forEach(item => primitiveScope.add(item));\n plot.groundPrimitives.forEach(item => groundPrimitiveScope.add(item));\n });\n }, {\n immediate: true,\n flush: 'post',\n });\n\n useCesiumEventListener(\n () => plots.value.map(item => item.definitionChanged),\n (_scope, key, newValue, oldValue) => {\n if (key === 'entities') {\n const { added, removed } = arrayDiff(newValue as Entity[], oldValue as Entity[]);\n added.forEach(item => entityScope.add(item));\n removed.forEach(item => entityScope.remove(item));\n }\n else if (key === 'primitives') {\n const { added, removed } = arrayDiff(newValue as Entity[], oldValue as Entity[]);\n added.forEach(item => primitiveScope.add(item));\n removed.forEach(item => primitiveScope.remove(item));\n }\n else if (key === 'groundPrimitives') {\n const { added, removed } = arrayDiff(newValue as Entity[], oldValue as Entity[]);\n added.forEach(item => groundPrimitiveScope.add(item));\n removed.forEach(item => groundPrimitiveScope.remove(item));\n }\n },\n );\n\n const update = async (plot: PlotFeature) => {\n const reslut = await plot.scheme.render?.({\n packable: plot.sampled.getValue(getCurrentTime()),\n mouse: plot.defining ? mouseCartesian.value : undefined,\n defining: plot.defining,\n previous: {\n entities: plot.entities,\n primitives: plot.primitives,\n groundPrimitives: plot.groundPrimitives,\n },\n });\n\n plot.entities = reslut?.entities ?? [];\n plot.primitives = reslut?.primitives ?? [];\n plot.groundPrimitives = reslut?.groundPrimitives ?? [];\n };\n\n watch(current, (plot, previous) => {\n previous && update(previous);\n });\n\n useCesiumEventListener(\n () => plots.value.map(item => item.definitionChanged),\n (plot, key) => {\n if (['disabled', 'defining', 'scheme', 'sampled', 'time'].includes(key)) {\n update(plot);\n }\n },\n );\n\n watch(mouseCartesian, () => {\n plots.value.forEach(plot => plot.defining && update(plot));\n });\n\n return {\n primitives: computed(() => Array.from(primitiveScope.scope)),\n groundPrimitives: computed(() => Array.from(primitiveScope.scope)),\n entities: computed(() => Array.from(entityScope.scope)),\n };\n}\n","import type { JulianDate } from 'cesium';\nimport type { Nullable } from 'vesium';\nimport type { CSSProperties, ShallowRef } from 'vue';\nimport { promiseTimeout } from '@vueuse/core';\nimport { ScreenSpaceEventType } from 'cesium';\nimport { canvasCoordToCartesian, isFunction, useCesiumEventListener, useScreenSpaceEventHandler, useViewer } from 'vesium';\nimport { computed, ref, watch } from 'vue';\nimport { PlotFeature } from './PlotFeature';\n\nexport function useSampled(\n current: ShallowRef<PlotFeature | undefined>,\n getCurrentTime: () => JulianDate,\n): void {\n const viewer = useViewer();\n const doubleClicking = ref(false);\n\n const packable = computed(() => {\n return current.value?.sampled.getValue(getCurrentTime());\n });\n\n // 左键点击添加点\n useScreenSpaceEventHandler(\n ScreenSpaceEventType.LEFT_CLICK,\n async (ctx) => {\n await promiseTimeout(1);\n if (!current.value || !packable.value) {\n return;\n }\n // 双击会触发两次事件, 这里做一个防抖处理,只需触发一次事件\n if (doubleClicking.value) {\n return;\n }\n const { scheme, defining, sampled } = current.value;\n if (!defining) {\n return;\n }\n const position = canvasCoordToCartesian(ctx.position, viewer.value!.scene);\n if (!position) {\n return;\n }\n packable.value.positions ??= [];\n packable.value.positions.push(position);\n sampled.setSample(packable.value);\n const completed = scheme.complete?.(packable.value);\n completed && PlotFeature.setDefining(current.value, false); ;\n },\n );\n\n // 双击结束定义态,进入激活态\n useScreenSpaceEventHandler(\n ScreenSpaceEventType.LEFT_DOUBLE_CLICK,\n async (ctx) => {\n if (!current.value || !packable.value) {\n return;\n }\n doubleClicking.value = true;\n await promiseTimeout(2);\n doubleClicking.value = false;\n\n const { scheme, defining } = current.value;\n if (!defining) {\n return;\n }\n const position = canvasCoordToCartesian(ctx.position, viewer.value!.scene);\n if (!position) {\n return;\n }\n\n const completed = scheme.allowManualComplete?.(packable.value);\n completed && PlotFeature.setDefining(current.value, false);\n },\n );\n\n // 右键回退到上一个点\n useScreenSpaceEventHandler(\n ScreenSpaceEventType.RIGHT_CLICK,\n async () => {\n if (!current.value || !packable.value) {\n return;\n }\n const { defining, sampled } = current.value;\n\n if (!defining) {\n return;\n }\n packable.value.positions ??= [];\n if (packable.value.positions.length === 0) {\n return;\n }\n packable.value.positions.splice(packable.value.positions.length - 1, 1);\n sampled.setSample(packable.value);\n },\n );\n\n // 定义态时的鼠标样式\n const definingCursorCss = ref<Nullable<CSSProperties['cursor']>>();\n\n const setDefiningCursorCss = () => {\n if (!current.value?.defining) {\n if (definingCursorCss.value) {\n definingCursorCss.value = undefined;\n viewer.value!.container.parentElement!.style.removeProperty('cursor');\n }\n }\n else {\n const definingCursor = current.value!.scheme.definingCursor;\n definingCursorCss.value = isFunction(definingCursor) ? definingCursor(packable.value!) : definingCursor;\n if (definingCursorCss.value) {\n viewer.value?.container.parentElement!.style.setProperty('cursor', definingCursorCss.value);\n }\n }\n };\n\n useCesiumEventListener(() => current.value?.definitionChanged, (plot, key) => {\n if (key === 'defining' || key === 'sampled') {\n setDefiningCursorCss();\n }\n });\n watch(current, () => setDefiningCursorCss());\n}\n","import type { JulianDate } from 'cesium';\nimport type { ComputedRef, ShallowRef } from 'vue';\nimport type { PlotFeature } from './PlotFeature';\nimport type { PlotSkeleton } from './PlotSkeleton';\nimport { onKeyStroke, watchArray } from '@vueuse/core';\nimport { CustomDataSource } from 'cesium';\nimport { arrayDiff, isFunction, useCesiumEventListener, useDataSource, useEntityScope, useGraphicEvent, useViewer } from 'vesium';\nimport { nextTick, shallowRef, toValue, watch, watchEffect } from 'vue';\nimport { PlotAction, PlotSkeletonEntity } from './PlotSkeleton';\n\nexport function useSkeleton(\n plots: ComputedRef<PlotFeature[]>,\n current: ShallowRef<PlotFeature | undefined>,\n getCurrentTime: () => JulianDate,\n) {\n const viewer = useViewer();\n\n const dataSource = useDataSource(new CustomDataSource());\n const entityScope = useEntityScope({ collection: () => dataSource.value!.entities });\n\n const hoverEntity = shallowRef<PlotSkeletonEntity>();\n const activeEntity = shallowRef<PlotSkeletonEntity>();\n\n // 获取当前点位的状态\n const getPointAction = (entity?: PlotSkeletonEntity) => {\n if (!entity) {\n return PlotAction.IDLE;\n }\n return activeEntity.value?.id === entity.id\n ? PlotAction.ACTIVE\n : hoverEntity.value?.id === entity.id\n ? PlotAction.HOVER\n : PlotAction.IDLE;\n };\n\n const update = (plot: PlotFeature, destroyed?: boolean) => {\n const oldEntities = plot.skeletons;\n const entities: PlotSkeletonEntity[] = [];\n\n if (destroyed || plot.disabled) {\n plot.skeletons = [];\n }\n else {\n const packable = plot.sampled.getValue(getCurrentTime());\n const defining = plot.defining;\n const active = current.value === plot;\n const skeletons = plot.scheme.skeletons;\n\n skeletons.forEach((skeleton) => {\n const disabled = isFunction(skeleton.disabled) ? skeleton.disabled({ active, defining }) : skeleton.disabled;\n if (disabled) {\n return;\n }\n const positions = skeleton.format?.(packable!) ?? packable?.positions ?? [];\n\n positions.forEach((position, index) => {\n let entity = oldEntities.find(item => item.index === index && item.skeleton === skeleton);\n const options = skeleton.render?.({\n defining,\n active,\n index,\n packable,\n positions,\n position,\n action: getPointAction(entity),\n });\n\n const merge = new PlotSkeletonEntity(options ?? {});\n if (entity) {\n merge.propertyNames.forEach((key) => {\n if (key !== 'id') {\n // @ts-expect-error ignore\n entity[key] = merge[key];\n }\n });\n }\n else {\n entity = merge;\n }\n entity.plot = plot;\n entity.skeleton = skeleton;\n entity.index = index;\n entities.push(entity);\n });\n });\n }\n plot.skeletons = entities;\n };\n\n const { addGraphicEvent } = useGraphicEvent();\n\n watchEffect((onCleanup) => {\n // cursor 仅在不存在定义态的标绘时才生效\n const remove = addGraphicEvent('global', 'DRAG', ({ event, pick, dragging, lockCamera }) => {\n if (pick.id instanceof PlotSkeletonEntity && entityScope.scope.has(pick.id)) {\n const entity = pick.id as PlotSkeletonEntity;\n\n const plot = entity.plot as PlotFeature;\n // 仅在非定义态时才可拖拽\n if (plot.defining) {\n return;\n }\n activeEntity.value = entity;\n const skeleton = entity.skeleton as PlotSkeleton;\n const index = entity.index as number;\n const packable = plot.sampled.getValue(getCurrentTime());\n skeleton.onDrag?.({\n viewer: viewer.value!,\n sampled: plot.sampled,\n packable,\n active: current.value === plot,\n index,\n event,\n dragging,\n lockCamera,\n });\n }\n else {\n activeEntity.value = undefined;\n }\n }, {\n cursor: ({ pick }) => {\n if (!current.value?.defining && entityScope.scope.has(pick.id)) {\n const skeleton = pick.id.skeleton as PlotSkeleton;\n return isFunction(skeleton?.cursor) ? skeleton.cursor(pick) : toValue(skeleton?.cursor);\n }\n },\n dragCursor: ({ pick }) => {\n if (!current.value?.defining && entityScope.scope.has(pick.id)) {\n const skeleton = pick.id.skeleton as PlotSkeleton;\n return isFunction(skeleton?.dragCursor) ? skeleton.dragCursor(pick) : toValue(skeleton?.dragCursor);\n }\n },\n });\n onCleanup(remove);\n });\n\n // 键盘控制当前激活的点位\n onKeyStroke((keyEvent) => {\n if (activeEntity.value) {\n const entity = activeEntity.value;\n const plot = entity.plot as PlotFeature;\n const skeleton = entity.skeleton as PlotSkeleton;\n const index = entity.index as number;\n const packable = plot.sampled.getValue(getCurrentTime());\n\n skeleton.onKeyPressed?.({\n viewer: viewer.value!,\n sampled: plot.sampled,\n packable,\n index,\n keyEvent,\n });\n }\n });\n\n watchEffect((onCleanup) => {\n const remove = addGraphicEvent('global', 'HOVER', ({ hovering, pick }) => {\n if (hovering && pick.id instanceof PlotSkeletonEntity && entityScope.scope.has(pick.id)) {\n const entity = pick.id as PlotSkeletonEntity;\n hoverEntity.value = entity;\n }\n else {\n hoverEntity.value = undefined;\n }\n });\n onCleanup(remove);\n });\n\n watchEffect((onCleanup) => {\n const remove = addGraphicEvent('global', 'LEFT_CLICK', ({ event, pick }) => {\n if (pick.id instanceof PlotSkeletonEntity && entityScope.scope.has(pick.id)) {\n const entity = pick.id as PlotSkeletonEntity;\n activeEntity.value = entity;\n const plot = entity.plot as PlotFeature;\n const skeleton = entity.skeleton as PlotSkeleton;\n const index = entity.index as number;\n const packable = plot.sampled.getValue(getCurrentTime());\n\n skeleton.onLeftClick?.({\n viewer: viewer.value!,\n sampled: plot.sampled,\n packable: packable!,\n active: current.value === plot,\n defining: plot.defining,\n index,\n event,\n });\n }\n else {\n activeEntity.value = undefined;\n }\n });\n onCleanup(remove);\n });\n\n watchArray(plots, (value, oldValue, added, removed = []) => {\n added.forEach(plot => update(plot));\n removed.forEach(plot => update(plot, true));\n });\n\n useCesiumEventListener(\n () => plots.value.map(plot => plot.definitionChanged),\n (plot, key, newValue, oldValue) => {\n if (['disabled', 'defining', 'scheme', 'sampled', 'time'].includes(key)) {\n nextTick(() => update(plot));\n }\n else if (key === 'skeletons') {\n const { added, removed } = arrayDiff(newValue as PlotSkeletonEntity[], oldValue as PlotSkeletonEntity[]);\n added.forEach(item => entityScope.add(item));\n removed.forEach(item => entityScope.remove(item));\n }\n },\n );\n\n // 当前激活的标绘变化时,更新渲染\n watch(current, (plot, previous) => {\n plot && update(plot);\n previous && update(previous);\n });\n\n return {\n dataSource,\n };\n}\n","import type { ShallowRef } from 'vue';\nimport type { PlotFeatureConstructorOptions } from './PlotFeature';\nimport type { SampledPlotPackable } from './SampledPlotProperty';\nimport { JulianDate, ScreenSpaceEventType } from 'cesium';\nimport { pickHitGraphic, useCesiumEventListener, useScreenSpaceEventHandler, useViewer } from 'vesium';\nimport { computed, shallowReactive, shallowRef, watch } from 'vue';\nimport { PlotFeature } from './PlotFeature';\nimport { useRender } from './useRender';\nimport { useSampled } from './useSampled';\nimport { useSkeleton } from './useSkeleton';\n\nexport interface UsePlotOptions {\n time?: ShallowRef<JulianDate | undefined>;\n}\n\nexport type UsePlotOperate = (plot: PlotFeature | PlotFeatureConstructorOptions) => Promise<PlotFeature>;\n\nexport interface UsePlotRetrun {\n\n time: ShallowRef<JulianDate | undefined>;\n\n data?: ShallowRef<PlotFeature[]>;\n\n current?: ShallowRef<PlotFeature | undefined>;\n /**\n * 触发标绘\n */\n operate: UsePlotOperate;\n\n /**\n * 强制终止当前进行中的标绘\n */\n cancel: VoidFunction;\n}\n\nexport function usePlot(options?: UsePlotOptions) {\n const time = options?.time || shallowRef<JulianDate>();\n\n const viewer = useViewer();\n\n const getCurrentTime = () => {\n return time.value?.clone() || new JulianDate(0, 0);\n };\n\n const collection = shallowReactive(new Set<PlotFeature>());\n const plots = computed(() => Array.from(collection));\n const current = shallowRef<PlotFeature>();\n const packable = shallowRef<SampledPlotPackable>();\n\n useCesiumEventListener([\n () => current.value?.sampled.definitionChanged,\n ], () => {\n packable.value = current.value?.sampled.getValue(getCurrentTime());\n });\n\n useSampled(current, getCurrentTime);\n useRender(plots, current, getCurrentTime);\n useSkeleton(plots, current, getCurrentTime);\n\n // 单击激活\n useScreenSpaceEventHandler(ScreenSpaceEventType.LEFT_CLICK, (data) => {\n if (current.value?.defining) {\n return;\n }\n\n const pick = viewer.value?.scene.pick(data.position.clone());\n // 点击到了骨架点则不处理\n if (pick?.id?.plot instanceof PlotFeature) {\n return;\n }\n\n if (!pick) {\n current.value = undefined;\n return;\n }\n\n current.value = plots.value.find(plot => pickHitGraphic(pick, [...plot.entities, ...plot.primitives, ...plot.groundPrimitives]));\n });\n\n let operateResolve: ((plot: PlotFeature) => void) | undefined;\n let operateReject: (() => void) | undefined;\n\n // 当前激活的标绘发生变动时,上一个标绘取消激活。若上一标绘仍处于定义态时,应立即强制完成,若无法完成则删除。\n watch(current, (plot, previous) => {\n if (previous) {\n if (previous.defining) {\n const packable = previous.sampled.getValue(getCurrentTime());\n const completed = previous.scheme.allowManualComplete?.(packable);\n if (completed) {\n PlotFeature.setDefining(previous, false);\n operateResolve?.(previous);\n }\n else {\n collection.delete(previous);\n }\n }\n }\n });\n\n const operate: UsePlotOperate = async (plot) => {\n return new Promise((resolve, reject) => {\n operateResolve = resolve;\n operateReject = reject;\n const _plot = plot instanceof PlotFeature ? plot : new PlotFeature(plot);\n\n if (!collection.has(_plot)) {\n collection.add(_plot);\n }\n current.value = _plot;\n return resolve(_plot);\n });\n };\n\n const remove = (plot: PlotFeature): boolean => {\n if (plot === current.value) {\n current.value = undefined;\n }\n if (collection.has(plot)) {\n collection.delete(plot);\n return true;\n }\n return false;\n };\n\n return {\n plots,\n time,\n operate,\n remove,\n cancel: operateReject,\n };\n}\n","import type { PlotSkeleton } from '../usePlot';\nimport { Color } from 'cesium';\nimport { canvasCoordToCartesian, toCartesian3, toCartographic } from 'vesium';\nimport { PlotAction } from '../usePlot';\n\n/**\n * 绘制控制的框架点,拖拽时,将更新该控制点的实时位置\n */\nexport function control(): PlotSkeleton {\n return {\n disabled: ({ active }) => !active,\n cursor: 'pointer',\n dragCursor: 'crosshair',\n onDrag({ viewer, sampled, packable, event, index, lockCamera }) {\n lockCamera();\n const position = canvasCoordToCartesian(event.endPosition, viewer.scene);\n if (position) {\n const positions = [...packable.positions ?? []];\n positions[index] = position;\n sampled.setSample({\n time: packable.time,\n derivative: packable.derivative,\n positions,\n });\n }\n },\n\n onKeyPressed({ viewer, keyEvent, sampled, packable, index }) {\n const height = toCartographic(viewer!.camera.position)?.height;\n if (!height || !['ArrowUp', 'ArrowRight', 'ArrowDown', 'ArrowLeft'].includes(keyEvent.key))\n return;\n\n keyEvent.preventDefault();\n let headingAdjust = 0;\n switch (keyEvent.key) {\n case 'ArrowRight':\n headingAdjust = Math.PI / 2;\n break;\n case 'ArrowDown':\n headingAdjust = Math.PI;\n break;\n case 'ArrowLeft':\n headingAdjust = -Math.PI / 2;\n break;\n case 'ArrowUp':\n headingAdjust = 0;\n break;\n }\n const newHeading = (viewer.camera.heading + headingAdjust) % (2 * Math.PI);\n const positions = [...packable.positions ?? []];\n const cartographic = toCartographic(positions[index])!;\n const r = height / 100000;\n const distance = r * Math.PI / 180 / 1000;\n\n cartographic.latitude += distance * Math.cos(newHeading);\n cartographic.longitude += distance * Math.sin(newHeading);\n\n positions[index] = toCartesian3(cartographic)!;\n sampled.setSample({\n time: packable.time,\n derivative: packable.derivative,\n positions,\n });\n },\n render: ({ position, action }) => {\n const colors = {\n [PlotAction.IDLE]: Color.BLUE.withAlpha(0.4),\n [PlotAction.HOVER]: Color.BLUE.withAlpha(0.6),\n [PlotAction.ACTIVE]: Color.AQUA.withAlpha(1),\n };\n return {\n position,\n point: {\n pixelSize: 8,\n color: colors[action],\n disableDepthTestDistance: Number.POSITIVE_INFINITY,\n outlineWidth: 1,\n outlineColor: Color.WHITE.withAlpha(0.4),\n },\n };\n },\n };\n}\n","import type { PlotSkeleton } from '../usePlot';\nimport { Cartesian3, Color } from 'cesium';\nimport { canvasCoordToCartesian } from 'vesium';\nimport { PlotAction } from '../usePlot';\n\n/**\n * 绘制封闭的间隔框架点,如多边形。拖拽时,会在两点之间插入一个控制点,并持续拖拽该点。\n */\nexport function interval(): PlotSkeleton {\n let dragIndex = -1;\n return {\n disabled: ({ active, defining }) => !active || defining,\n cursor: 'pointer',\n dragCursor: 'crosshair',\n format(packable) {\n const _positions = packable.positions ?? [];\n if (_positions.length < 2) {\n return [];\n }\n return _positions.map((position, i) => {\n const next = i === _positions.length - 1 ? _positions[0] : _positions[i + 1];\n return Cartesian3.midpoint(position, next, new Cartesian3());\n });\n },\n onDrag({ viewer, sampled, packable, event, index, lockCamera, dragging }) {\n lockCamera();\n\n const position = canvasCoordToCartesian(event.endPosition, viewer.scene);\n if (!position) {\n return;\n }\n const positions = [...packable.positions ?? []];\n if (dragIndex === -1) {\n dragIndex = index;\n positions.splice(index + 1, 0, position);\n }\n else {\n positions[dragIndex + 1] = position;\n }\n if (!dragging) {\n dragIndex = -1;\n }\n sampled.setSample({\n time: packable.time,\n derivative: packable.derivative,\n positions,\n });\n },\n render: ({ position, action, active }) => {\n if (!active) {\n return;\n }\n const colors = {\n [PlotAction.IDLE]: Color.GREEN.withAlpha(0.4),\n [PlotAction.HOVER]: Color.GREEN.withAlpha(0.6),\n [PlotAction.ACTIVE]: Color.GREEN.withAlpha(1.0),\n };\n return {\n position,\n point: {\n pixelSize: 6,\n color: colors[action],\n disableDepthTestDistance: Number.POSITIVE_INFINITY,\n outlineWidth: 1,\n outlineColor: Color.WHITE.withAlpha(0.4),\n },\n };\n },\n };\n}\n","import type { PlotSkeleton } from '../usePlot';\nimport { Cartesian3, Color } from 'cesium';\nimport { canvasCoordToCartesian } from 'vesium';\nimport { PlotAction } from '../usePlot';\n\n/**\n * 绘制非封闭的间隔框架点,如线段。拖拽时,会在两点之间插入一个控制点,并持续拖拽该点。\n */\nexport function intervalNonclosed(): PlotSkeleton {\n let dragIndex = -1;\n return {\n disabled: ({ active, defining }) => !active || defining,\n cursor: 'pointer',\n dragCursor: 'crosshair',\n format(packable) {\n const _positions = packable.positions ?? [];\n if (_positions.length < 2) {\n return [];\n }\n const midpoints: Cartesian3[] = [];\n for (let i = 0; i < _positions.length - 1; i++) {\n midpoints.push(Cartesian3.midpoint(_positions[i], _positions[i + 1], new Cartesian3()));\n }\n return midpoints;\n },\n onDrag({ viewer, sampled, packable, event, index, lockCamera, dragging }) {\n lockCamera();\n const position = canvasCoordToCartesian(event.endPosition, viewer.scene);\n if (!position) {\n return;\n }\n const positions = [...packable.positions ?? []];\n if (dragIndex === -1) {\n dragIndex = index;\n positions.splice(index + 1, 0, position);\n }\n else {\n positions[dragIndex + 1] = position;\n }\n if (!dragging) {\n dragIndex = -1;\n }\n sampled.setSample({\n time: packable.time,\n derivative: packable.derivative,\n positions,\n });\n },\n render: ({ position, action }) => {\n const colors = {\n [PlotAction.IDLE]: Color.GREEN.withAlpha(0.4),\n [PlotAction.HOVER]: Color.GREEN.withAlpha(0.6),\n [PlotAction.ACTIVE]: Color.GREEN.withAlpha(1.0),\n };\n return {\n position,\n point: {\n pixelSize: 6,\n color: colors[action],\n disableDepthTestDistance: Number.POSITIVE_INFINITY,\n outlineWidth: 1,\n outlineColor: Color.WHITE.withAlpha(0.4),\n },\n };\n },\n };\n}\n","import type { PlotSkeleton } from '../usePlot';\nimport { Cartesian3, Color, HorizontalOrigin, Rectangle, VerticalOrigin } from 'cesium';\nimport { canvasCoordToCartesian, toCartesian3 } from 'vesium';\nimport { PlotAction } from '../usePlot';\n\n// see https://icones.js.org/collection/tabler?s=move&icon=tabler:arrows-move\nconst svg = `data:image/svg+xml;utf8,${encodeURIComponent(\n '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" viewBox=\"0 0 24 24\"><path stroke=\"#ffffff\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m18 9l3 3l-3 3m-3-3h6M6 9l-3 3l3 3m-3-3h6m0 6l3 3l3-3m-3-3v6m3-15l-3-3l-3 3m3-3v6\"/></svg>',\n)}`;\n\n/**\n * 绘制非封闭的间隔框架点,如线段。拖拽时,会在两点之间插入一个控制点,并持续拖拽该点。\n */\nexport function moved(): PlotSkeleton {\n return {\n disabled: ({ active, defining }) => !active || defining,\n cursor: 'pointer',\n dragCursor: 'crosshair',\n format(packable) {\n const positions = packable.positions ?? [];\n if (positions.length === 0) {\n return [];\n }\n else if (positions.length === 1) {\n return [positions[0]];\n }\n else {\n const center = Rectangle.center(Rectangle.fromCartesianArray(positions));\n return [toCartesian3(center)!];\n }\n },\n onDrag({ viewer, sampled, packable, event, lockCamera, dragging }) {\n dragging && lockCamera();\n const startPosition = canvasCoordToCartesian(event.startPosition, viewer.scene);\n const endPosition = canvasCoordToCartesian(event.endPosition, viewer.scene);\n\n if (!startPosition || !endPosition) {\n return;\n }\n const offset = Cartesian3.subtract(endPosition, startPosition, new Cartesian3());\n const positions = [...packable.positions ?? []];\n\n sampled.setSample({\n time: packable.time,\n derivative: packable.derivative,\n positions: positions.map(position => Cartesian3.add(position, offset, new Cartesian3())),\n });\n },\n render: ({ position, action }) => {\n const colors = {\n [PlotAction.IDLE]: Color.WHITE,\n [PlotAction.HOVER]: Color.WHITE,\n [PlotAction.ACTIVE]: Color.AQUA.withAlpha(1.0),\n };\n return {\n position,\n billboard: {\n image: svg,\n width: 20,\n height: 20,\n color: colors[action],\n pixelOffset: new Cartesian3(0, -20),\n horizontalOrigin: HorizontalOrigin.CENTER,\n verticalOrigin: VerticalOrigin.BOTTOM,\n disableDepthTestDistance: Number.POSITIVE_INFINITY,\n },\n };\n },\n };\n}\n","import { Cartesian3, CoplanarPolygonGeometry, VertexFormat } from 'cesium';\n\n/**\n * 将多个边界点组成的面切割成多个三角形返回参数,为三角形三点的数组\n */\nexport type TesselateReturn = Array<[p0: Cartesian3, p1: Cartesian3, p2: Cartesian3]>;\n\n/**\n * 将多个边界点组成的面切割成多个三角形\n * @param positions\n */\nexport function tesselate(positions: Cartesian3[]): TesselateReturn {\n if (positions.length < 3) {\n throw new Error('positions must >= 3');\n }\n\n if (positions.length === 3) {\n return [[positions[0].clone(), positions[1].clone(), positions[2].clone()]];\n }\n\n const geometry = CoplanarPolygonGeometry.createGeometry(\n CoplanarPolygonGeometry.fromPositions({\n positions,\n vertexFormat: VertexFormat.POSITION_ONLY,\n }),\n )!;\n\n if (!geometry) {\n throw new Error('positions无法组成有效的geometry,检查点位是否错误');\n }\n const values = geometry.attributes.position!.values as number[];\n const indices = geometry.indices;\n const result: TesselateReturn = [];\n for (let i = 0; i < indices!.length; i += 3) {\n const a = Cartesian3.unpack(values, indices![i] * 3, new Cartesian3());\n const b = Cartesian3.unpack(values, indices![i + 1] * 3, new Cartesian3());\n const c = Cartesian3.unpack(values, indices![i + 2] * 3, new Cartesian3());\n result.push([a, b, c]);\n }\n return result;\n}\n","import type { Scene, TerrainProvider } from 'cesium';\nimport { Cartesian3, ClassificationType } from 'cesium';\n\nimport { tesselate } from './tesselate';\nimport { triangleGrid } from './triangleGrid';\n\n/**\n * 计算三维坐标系下三角形面积\n * @param p0 - 三角形第一个点\n * @param p1 - 三角形第二个点\n * @param p2 - 三角形第三个点\n */\nfunction triangleArea(p0: Cartesian3, p1: Cartesian3, p2: Cartesian3) {\n const v0 = Cartesian3.subtract(p0, p1, new Cartesian3());\n const v1 = Cartesian3.subtract(p2, p1, new Cartesian3());\n const cross = Cartesian3.cross(v0, v1, v0);\n return Cartesian3.magnitude(cross) * 0.5;\n}\n\nexport interface AreaOptions {\n scene?: Scene;\n\n /**\n * 是否贴地\n */\n clampToGround?: boolean;\n\n /**\n * 贴地类型\n * @defaultValue ClassificationType.BOTH\n */\n classificationType?: ClassificationType;\n\n /**\n * 地形数据\n * @defaultValue scene.terrainProvider\n */\n terrainProvider?: TerrainProvider;\n\n /**\n * 插值密度\n * @defaultValue 10\n */\n density?: number;\n}\n\nfunction defaultOptions(original?: AreaOptions): AreaOptions {\n const clampToGround = original?.clampToGround ?? false;\n const classificationType = original?.classificationType ?? ClassificationType.BOTH;\n const density = Math.floor(original?.density ?? 10);\n return {\n scene: original?.scene,\n clampToGround,\n classificationType,\n terrainProvider: original?.terrainProvider,\n density,\n };\n}\n\n/**\n * 计算三维坐标系下图形面积\n * @param positions - 图形各点的笛卡尔数组\n */\nexport async function area(positions: Cartesian3[], options?: AreaOptions): Promise<number> {\n if (positions.length < 2) {\n throw new Error('positions.length must >= 2');\n }\n\n const { density, scene, clampToGround, classificationType, terrainProvider } = defaultOptions(options);\n if (density! <= 0) {\n throw new Error('options.density must > 0');\n }\n\n if (!clampToGround) {\n const triangles = tesselate(positions);\n return triangles.reduce((count, current) => (count += triangleArea(...current)), 0);\n }\n\n const triangles = await triangleGrid(positions, {\n density: density!,\n scene,\n clampToGround,\n classificationType,\n terrainProvider,\n });\n return triangles.reduce((count, current) => (count += triangleArea(...current)), 0);\n}\n","import { CallbackProperty, Color, ConstantPositionProperty, ConstantProperty, Entity, PolygonHierarchy, Rectangle } from 'cesium';\nimport { toCartesian3 } from 'vesium';\nimport { control, interval } from '../skeleton';\nimport { PlotScheme } from '../usePlot';\nimport { area } from './utils';\n\nexport const schemeMeasureArea = new PlotScheme({\n type: 'measureArea',\n allowManualComplete: packable => packable.positions!.length >= 3,\n skeletons: [\n control,\n interval,\n ],\n initEntites: () => [\n new Entity({\n label: {\n font: '14pt',\n },\n polyline: {\n material: Color.YELLOW.withAlpha(0.5),\n },\n polygon: {\n material: Color.YELLOW.withAlpha(0.5),\n },\n }),\n ],\n render(options) {\n const { mouse, packable } = options;\n const entity = options.previous.entities?.[0]\n ?? new Entity({\n label: {\n font: '14pt',\n },\n polyline: {\n material: Color.YELLOW.withAlpha(0.5),\n },\n polygon: {\n material: Color.YELLOW.withAlpha(0.5),\n },\n });\n\n const positions = [...packable.positions ?? []];\n mouse && positions.push(mouse);\n\n if (positions.length === 2) {\n entity.position = undefined;\n entity.label!.text = undefined;\n entity.polygon!.hierarchy = undefined;\n entity.polyline!.positions = new CallbackProperty(() => positions, false);\n }\n else if (positions.length >= 3) {\n positions.push(positions[0]);\n entity.position = new ConstantPositionProperty(\n toCartesian3(\n Rectangle.center(Rectangle.fromCartesianArray(positions)),\n ),\n );\n entity.label!.text = new ConstantProperty('');\n\n area(positions).then((e) => {\n let text: string = '';\n if (e / 1000 / 1000 > 10) {\n text = `${(e / 1000 / 1000).toFixed(2)}km²`;\n }\n else {\n text = `${(+e).toFixed(2)}m²`;\n }\n entity.label!.text = new ConstantProperty(text);\n });\n entity.polyline!.positions = undefined;\n entity.polygon!.hierarchy = new CallbackProperty(() => {\n return positions.length >= 3 ? new PolygonHierarchy([...positions]) : undefined;\n }, false);\n }\n else {\n entity.position = undefined;\n entity.polygon!.hierarchy = undefined;\n entity.polyline!.positions = undefined;\n }\n\n return {\n entities: [entity],\n };\n },\n});\n","import { CallbackPositionProperty, Entity } from 'cesium';\nimport { moved } from '../skeleton';\nimport { PlotScheme } from '../usePlot';\n\n/**\n * 广告牌标绘方案\n */\nexport const schemeBillboard = new PlotScheme({\n type: 'billboard',\n complete: packable => packable.positions!.length >= 1,\n skeletons: [\n moved,\n ],\n initEntites: () => [\n new Entity({ billboard: { image: '/favicon.svg', width: 32, height: 32 } }),\n ],\n render(options) {\n const { mouse, packable } = options;\n const entity = options.previous.entities?.[0] ?? new Entity({ billboard: { } });\n const position = packable.positions?.[0] ?? mouse;\n entity.position = new CallbackPositionProperty(() => position, true);\n\n return {\n entities: [entity],\n };\n },\n});\n","import { CallbackPositionProperty, Entity } from 'cesium';\nimport { moved } from '../skeleton';\nimport { PlotScheme } from '../usePlot';\n\n/**\n * 标签文字标绘方案\n */\nexport const schemeLabel = new PlotScheme({\n type: 'label',\n complete: packable => packable.positions!.length >= 1,\n skeletons: [\n moved,\n ],\n initEntites: () => [\n new Entity({ label: { text: 'Label' } }),\n ],\n render(options) {\n const { mouse, packable } = options;\n const entity = options.previous.entities?.[0] ?? new Entity({ label: {} });\n const position = packable.positions?.[0] ?? mouse;\n entity.position = new CallbackPositionProperty(() => position, true);\n\n return {\n entities: [entity],\n };\n },\n});\n","import { CallbackProperty, Color, Entity, PolygonHierarchy } from 'cesium';\nimport { control, interval, moved } from '../skeleton';\nimport { PlotScheme } from '../usePlot';\n\n/**\n * 内置的多边形标绘方案\n */\nexport const schemePolygon = new PlotScheme({\n type: 'polygon',\n allowManualComplete: packable => packable.positions!.length >= 3,\n skeletons: [\n control,\n interval,\n moved,\n ],\n\n initEntites: () => [\n new Entity({\n polyline: {\n material: Color.YELLOW.withAlpha(0.5),\n },\n polygon: {\n material: Color.YELLOW.withAlpha(0.5),\n },\n }),\n ],\n render(options) {\n const { mouse, packable } = options;\n const entity = options.previous.entities?.[0]\n ?? new Entity({\n polyline: {\n material: Color.YELLOW.withAlpha(0.5),\n },\n polygon: {\n material: Color.YELLOW.withAlpha(0.5),\n },\n });\n\n const positions = [...packable.positions ?? []];\n mouse && positions.push(mouse);\n\n if (positions.length === 2) {\n entity.polygon!.hierarchy = undefined;\n entity.polyline!.positions = new CallbackProperty(() => positions, false);\n }\n else if (positions.length >= 3) {\n entity.polyline!.positions = undefined;\n entity.polygon!.hierarchy = new CallbackProperty(() => {\n positions.push(positions[0]);\n return positions.length >= 3 ? new PolygonHierarchy([...positions]) : undefined;\n }, false);\n }\n else {\n entity.polygon!.hierarchy = undefined;\n entity.polyline!.positions = undefined;\n }\n\n return {\n entities: [entity],\n };\n },\n});\n","import { CallbackProperty, Entity } from 'cesium';\nimport { control, intervalNonclosed, moved } from '../skeleton';\nimport { PlotScheme } from '../usePlot';\n\n/**\n * 内置的线段标绘方案\n */\nexport const schemePolyline = new PlotScheme({\n type: 'polyline',\n allowManualComplete: packable => packable.positions!.length >= 2,\n skeletons: [\n control,\n intervalNonclosed,\n moved,\n ],\n initEntites: () => [\n new Entity({ polyline: { width: 1 } }),\n ],\n render(options) {\n const { mouse, packable } = options;\n const entity = options.previous.entities?.[0] ?? new Entity({ polyline: { } });\n entity.polyline!.positions = new CallbackProperty(() => {\n const positions = [...packable.positions ?? []].concat(mouse ? [mouse] : []);\n return positions.length >= 2 ? positions : [];\n }, false);\n\n return {\n entities: [entity],\n };\n },\n},\n);\n","import { CallbackProperty, Color, Entity, Rectangle } from 'cesium';\nimport { control, interval, moved } from '../skeleton';\nimport { PlotScheme } from '../usePlot';\n\n/**\n * 内置的多边形标绘方案\n */\nexport const schemeRectangle = new PlotScheme({\n type: 'rectangle',\n complete: packable => packable.positions!.length >= 2,\n skeletons: [\n control,\n interval,\n moved,\n ],\n initEntites: () => [\n new Entity({\n rectangle: {\n material: Color.YELLOW.withAlpha(0.5),\n },\n }),\n ],\n render(options) {\n const { mouse, packable } = options;\n const entity = options.previous.entities?.[0]\n ?? new Entity({\n rectangle: {\n material: Color.YELLOW.withAlpha(0.5),\n },\n });\n\n const positions = [...packable.positions ?? []];\n mouse && positions.push(mouse);\n\n if (positions.length >= 2) {\n entity.rectangle!.coordinates = new CallbackProperty(() => Rectangle.fromCartesianArray(positions), false);\n }\n else {\n entity.rectangle!.coordinates = undefined;\n }\n\n return {\n entities: [entity],\n };\n },\n});\n"],"names":["cesium","vesium","core","vue","_PlotScheme","options","__publicField","_a","item","type","scheme","assertError","maybeScheme","_scheme","assert","PlotScheme","SampledPlotStrategy","defaultInterpolationAlgorithm","time","previous","next","proportion","_b","_c","right","index","left","Cartesian3","_SampledPlotProperty","Event","packable","JulianDate","t","start","end","startMS","duration","diff","dete","prevIndex","nextIndex","prevMs","nextMs","ms","result","c","scope","value","positions","derivative","values","interval","TimeInterval","other","SampledPlotProperty","PlotFeature","_d","_e","_f","id","disabled","sampled","createGuid","property","plot","PlotAction","PlotSkeletonEntity","Entity","useRender","plots","current","getCurrentTime","viewer","useViewer","primitiveCollection","usePrimitive","PrimitiveCollection","groundPrimitiveCollection","dataSource","useDataSource","CustomDataSource","entityScope","useEntityScope","primitiveScope","usePrimitiveScope","groundPrimitiveScope","mouseCartesian","shallowRef","ScreenSpaceEventType","event","canvasCoordToCartesian","_value","_oldValue","added","removed","_scope","key","newValue","oldValue","arrayDiff","update","reslut","watch","computed","useSampled","doubleClicking","ref","ctx","promiseTimeout","defining","position","definingCursorCss","setDefiningCursorCss","definingCursor","isFunction","useCesiumEventListener","useSkeleton","hoverEntity","activeEntity","getPointAction","entity","destroyed","oldEntities","entities","active","skeleton","merge","addGraphicEvent","useGraphicEvent","onCleanup","remove","pick","dragging","lockCamera","toValue","keyEvent","hovering","nextTick","usePlot","collection","shallowReactive","useScreenSpaceEventHandler","data","pickHitGraphic","operateResolve","operateReject","resolve","reject","_plot","control","height","toCartographic","headingAdjust","newHeading","cartographic","distance","toCartesian3","action","colors","Color","dragIndex","_positions","i","intervalNonclosed","midpoints","svg","moved","center","Rectangle","startPosition","endPosition","offset","HorizontalOrigin","VerticalOrigin","tesselate","geometry","CoplanarPolygonGeometry","VertexFormat","indices","a","b","triangleArea","p0","p1","p2","v0","v1","cross","defaultOptions","original","classificationType","ClassificationType","density","area","triangles","count","schemeMeasureArea","mouse","CallbackProperty","ConstantPositionProperty","ConstantProperty","e","text","PolygonHierarchy","schemeBillboard","CallbackPositionProperty","schemeLabel","schemePolygon","schemePolyline","schemeRectangle"],"mappings":"yKAsFO,OAAA,eAAA,QAAA,OAAA,YAAA,CAAA,MAAA,QAAA,CAAA,EAAA,MAAAA,EAAA,QAAA,QAAA,EAAAC,EAAA,QAAA,QAAA,EAAAC,EAAA,QAAA,cAAA,EAAAC,EAAA,QAAA,KAAA,EAAMC,EAAN,MAAMA,CAAW,CACtB,YAAYC,EAAuC,CAenDC,EAAA,KAAA,MAAA,EAMAA,EAAA,KAAA,UAAA,EAMAA,EAAA,KAAA,qBAAA,EAMAA,EAAA,KAAA,gBAAA,EAKAA,EAAA,KAAA,WAAA,EAKAA,EAAA,KAAA,aAAA,EAKAA,EAAA,KAAA,gBAAA,EAKAA,EAAA,KAAA,sBAAA,EAKAA,EAAA,KAAA,QAAA,EA3DK,IAAAC,EAEH,KAAK,KAAOF,EAAQ,KACpB,KAAK,SAAWA,EAAQ,SACxB,KAAK,oBAAsBA,EAAQ,oBAC9B,KAAA,eAAiBA,EAAQ,gBAAkB,YAC3C,KAAA,YAAYE,IAAQ,YAAR,KAAA,OAAAA,EAAmB,OAAYC,EAAM,CAAA,IAAK,CAAC,EAC5D,KAAK,YAAcH,EAAQ,YAC3B,KAAK,eAAiBA,EAAQ,eAC9B,KAAK,qBAAuBA,EAAQ,qBACpC,KAAK,OAASA,EAAQ,MAAA,CA0DxB,OAAO,eAA0B,CAC/B,MAAO,CAAC,GAAG,KAAK,QAAQ,MAAM,CAAA,CAMhC,OAAO,SAASI,EAAsC,CAC7C,OAAAL,EAAW,QAAQ,IAAIK,CAAI,CAAA,CAMpC,OAAO,SAASC,EAA0B,CAC5B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AAU,EACfwE,EAAA,UAAW,YAAc,IAAI8E,EAAA,iBAAiB,IAAM9B,EAAAA,UAAU,mBAAmBxH,CAAS,EAAG,EAAK,EAGzGwE,EAAO,UAAW,YAAc,OAG3B,CACL,SAAU,CAACA,CAAM,CACnB,CAAA,CAEJ,CAAC,EAAA,QAAA,WAAAvD,EAAA,QAAA,YAAAV,EAAA,QAAA,WAAAxC,EAAA,QAAA,mBAAAmD,EAAA,QAAA,oBAAAZ,EAAA,QAAA,oBAAAtC,EAAA,QAAA,QAAAqI,EAAA,QAAA,SAAAlG,EAAA,QAAA,kBAAAgH,EAAA,QAAA,MAAAG,EAAA,QAAA,gBAAAsC,GAAA,QAAA,YAAAE,GAAA,QAAA,kBAAAV,GAAA,QAAA,cAAAW,GAAA,QAAA,eAAAC,GAAA,QAAA,gBAAAC,GAAA,QAAA,QAAAvE"}
|
|
1
|
+
{"version":3,"file":"index.min.cjs","names":["options: PlotSchemeConstructorOptions","type: string","scheme: PlotScheme","maybeScheme: string | PlotScheme | PlotSchemeConstructorOptions","defaultInterpolationAlgorithm: SampledPlotInterpolationAlgorithm","Cartesian3","options?: SampledPlotPropertyConstructorOptions<D>","JulianDate","Event","time: JulianDate","time?: JulianDate","result?: SampledPlotPackable","previous: SampledPlotPackable<D>","next: SampledPlotPackable<D>","value: SampledPlotPackable<D>","values: SampledPlotPackable<D>[]","interval: TimeInterval","interval","other?: Property","options: PlotFeatureConstructorOptions","Event","plot: PlotFeature","value: boolean","value: string","value: Entity[]","value: any[]","value: PlotSkeletonEntity[]","Entity","options: Entity.ConstructorOptions","plots: ComputedRef<PlotFeature[]>","current: ShallowRef<PlotFeature | undefined>","getCurrentTime: () => JulianDate","PrimitiveCollection","CustomDataSource","ScreenSpaceEventType","plot: PlotFeature","current: ShallowRef<PlotFeature | undefined>","getCurrentTime: () => JulianDate","ScreenSpaceEventType","plots: ComputedRef<PlotFeature[]>","current: ShallowRef<PlotFeature | undefined>","getCurrentTime: () => JulianDate","CustomDataSource","entity?: PlotSkeletonEntity","plot: PlotFeature","destroyed?: boolean","entities: PlotSkeletonEntity[]","options?: UsePlotOptions","JulianDate","ScreenSpaceEventType","operateResolve: ((plot: PlotFeature) => void) | undefined","operateReject: (() => void) | undefined","packable","operate: UsePlotOperate","plot: PlotFeature","distance","Cartesian3","midpoints: Cartesian3[]","Cartesian3","Cartesian3","Color","HorizontalOrigin","VerticalOrigin","positions: Cartesian3[]","VertexFormat","result: TesselateReturn","Cartesian3","options: ClampToHeightMostDetailedByTilesetOrTerrainOptions","ClassificationType","resluts: Cartesian3[]","defaultOptions","original?: TriangleGridOptions","ClassificationType","positions: Cartesian3[]","options?: TriangleGridOptions","PerInstanceColorAppearance","cartesian3List: Cartesian3[]","Cartesian3","grid: TriangleGridReturn","p0: Cartesian3","p1: Cartesian3","p2: Cartesian3","Cartesian3","defaultOptions","original?: AreaOptions","ClassificationType","positions: Cartesian3[]","options?: AreaOptions","triangles","options: LerpArrayOptions","result: Cartesian3[]","Cartesian3","original?: DistanceOptions","ClassificationType","positions: Cartesian3[]","options?: DistanceOptions","stages: number[]","distance","count","density","positions","Entity","CallbackProperty","ConstantPositionProperty","ConstantProperty","text: string","PolygonHierarchy","Entity","PolylineGraphics","CallbackProperty","LabelGraphics","CallbackPositionProperty","Cartesian3","Entity","CallbackPositionProperty","Entity","CallbackPositionProperty","Entity","ConstantPositionProperty","CallbackProperty","Entity","ConstantPositionProperty","CallbackProperty","Entity","CallbackPositionProperty","Entity","Color","CallbackPositionProperty","Entity","CallbackProperty","PolygonHierarchy","coord1: CoordArray","coord2: CoordArray","points: CoordArray[]","distance","coord3: CoordArray","coordA: CoordArray","coordB: CoordArray","coordC: CoordArray","coordD: CoordArray","f","x","y","e","startCoord: CoordArray","endCoord: CoordArray","t: number","angle: number","distance: number","clockWise?: boolean","center: CoordArray","radius: number","startAngle: number","endAngle: number","bezierCoords: CoordArray[]","n: number","index: number","k: number","coords: CoordArray[]","coords: CoordArray[]","options: AttackArrowOptions","points: CoordArray[]","options: GetArrowHeadCoordsOptions","neckLeft: CoordArray","neckRight: CoordArray","tailWidthFactor: number","leftBodyCoords: CoordArray[]","rightBodyCoords: CoordArray[]","coords: CoordArray[]","options: TailedAttackArrowOptions","coords: CoordArray[]","tempCoord4: CoordArray","connCoord: CoordArray","leftArrowCoords: CoordArray[]","rightArrowCoords: CoordArray[]","coord1: CoordArray","coord2: CoordArray","coord3: CoordArray","clockWise: boolean","options: GetArrowHeadCoordsOptions","getArrowHeadCoords","getArrowBodyCoords","neckLeft: CoordArray","neckRight: CoordArray","tailWidthFactor: number","leftBodyCoords: CoordArray[]","rightBodyCoords: CoordArray[]","lineCoord1: CoordArray","lineCoord2: CoordArray","coord: CoordArray","mid","coords: CoordArray[]","options: FineArrowOptions","coords: CoordArray[]","coords: CoordArray[]","options: SquadCombatOptions","coordlength","coords: CoordArray[]","options: TailedSquadCombatOptions","coordlength","coords: CoordArray[]","normals: CoordArray[]","pList: CoordArray[]","t","coords: CoordArray[]","components: CoordArray[]","coord11: CoordArray","coords: CoordArray[]","coords: CoordArray[]","coord1: CoordArray","coord2: CoordArray","coord3: CoordArray","Entity","PolygonHierarchy","CallbackProperty","Entity","PolygonHierarchy","CallbackProperty","Entity","PolygonHierarchy","CallbackProperty","Entity","PolygonHierarchy","CallbackProperty","Entity","PolygonHierarchy","CallbackProperty","Entity","PolygonHierarchy","CallbackProperty","Entity","PolygonHierarchy","CallbackProperty","Entity","PolygonHierarchy","CallbackProperty","Entity","PolygonHierarchy","CallbackProperty","Entity","PolygonHierarchy","CallbackProperty","Entity","PolygonHierarchy","CallbackProperty","Entity","PolygonHierarchy","CallbackProperty","Entity","PolygonHierarchy","CallbackProperty","Entity","Color","CallbackProperty","Entity","Color","CallbackProperty","toCartesian3","Entity","CallbackProperty"],"sources":["../usePlot/PlotScheme.ts","../usePlot/SampledPlotProperty.ts","../usePlot/PlotFeature.ts","../usePlot/PlotSkeleton.ts","../usePlot/useRender.ts","../usePlot/useSampled.ts","../usePlot/useSkeleton.ts","../usePlot/usePlot.ts","../skeleton/control.ts","../skeleton/interval.ts","../skeleton/intervalNonclosed.ts","../skeleton/moved.ts","../measure/utils/tesselate.ts","../measure/utils/clampToGround.ts","../measure/utils/triangleGrid.ts","../measure/utils/area.ts","../measure/utils/lerpArray.ts","../measure/utils/distance.ts","../measure/measureArea.ts","../measure/measureDistance.ts","../scheme/Billboard.ts","../scheme/BillboardPinBuilder.ts","../scheme/Cylinder.ts","../scheme/Ellipse.ts","../scheme/Label.ts","../scheme/Point.ts","../scheme/Polygon.ts","../geom/helper.ts","../geom/arc.ts","../geom/arrowAttackDirection.ts","../geom/arrowAttackDirectionTailed.ts","../geom/arrowClamped.ts","../geom/arrowStraightSharp.ts","../geom/arrowStraight.ts","../geom/arrowUnitCombatOperation.ts","../geom/arrowUnitCombatOperationTailed.ts","../geom/assemblingPlace.ts","../geom/flagCurve.ts","../geom/flagRect.ts","../geom/flagTriangle.ts","../scheme/PolygonArc.ts","../scheme/PolygonArrowAttackDirection.ts","../scheme/PolygonArrowAttackDirectionTailed.ts","../scheme/PolygonArrowClamped.ts","../scheme/PolygonArrowStraight.ts","../scheme/PolygonArrowStraightSharp.ts","../scheme/PolygonArrowUnitCombatOperation.ts","../scheme/PolygonArrowUnitCombatOperationTailed.ts","../scheme/PolygonAssemblingPlace.ts","../scheme/PolygonFlagCurve.ts","../scheme/PolygonFlagRect.ts","../scheme/PolygonFlagTriangle.ts","../scheme/PolygonSmooth.ts","../scheme/Polyline.ts","../scheme/PolylineCurve.ts","../scheme/Rectangle.ts"],"sourcesContent":["import type { Cartesian3, Entity } from 'cesium';\nimport type { Nullable } from 'vesium';\nimport type { CSSProperties } from 'vue';\nimport type { PlotSkeleton } from './PlotSkeleton';\nimport type { SampledPlotPackable } from './SampledPlotProperty';\nimport { assert } from '@vueuse/core';\nimport { assertError } from 'vesium';\n\nexport interface PlotRenderResult {\n entities?: Entity[];\n primitives?: any[];\n groundPrimitives?: any[];\n}\n\nexport interface PlotRenderContext<D = any> {\n /**\n * 当前标绘点位数据\n */\n packable: SampledPlotPackable<D>;\n\n /**\n * 当前是否处于定义态\n */\n defining: boolean;\n\n /**\n * 当前鼠标位置,若当前标绘不处于定义态时,`mouse`为`undefined`\n */\n mouse?: Cartesian3;\n\n /**\n * 上一次的渲染结果\n */\n previous: PlotRenderResult;\n}\n\nexport interface PlotSchemeConstructorOptions {\n /**\n * 标绘类型。应当是全局唯一的字符串,会作为键名缓存\n */\n type: string;\n\n /**\n * 判断是否立即完成标绘.\n * 每次控制点发生变变化时,执行该回调函数,返回`true`则完成标绘\n */\n complete?: (packable: SampledPlotPackable) => boolean;\n\n /**\n * 判断是否允许手动完成标绘。\n * 每次控制点发生变变化时,执行该回调函数,返回`true`则后续左键双击即完成标绘\n */\n allowManualComplete?: (packable: SampledPlotPackable) => boolean;\n\n /**\n * 处于定义态时鼠标的样式\n * @default 'crosshair'\n */\n definingCursor?: Nullable<CSSProperties['cursor']> | ((packable: SampledPlotPackable) => Nullable<CSSProperties['cursor']>);\n\n /**\n * 当前标绘的框架点数据\n */\n skeletons?: (() => PlotSkeleton) [];\n\n /**\n * 初始化时创建的render,创建后会作为配置项传入`render`中\n */\n initRender: () => PlotRenderResult;\n\n /**\n * 当标绘数据变化时,会触发`render`回调,返回的数据会被添加到cesium中\n */\n render?: (context: PlotRenderContext) => PlotRenderResult | Promise<PlotRenderResult>;\n}\n\nexport class PlotScheme {\n constructor(options: PlotSchemeConstructorOptions) {\n this.type = options.type;\n this.complete = options.complete;\n this.allowManualComplete = options.allowManualComplete;\n this.definingCursor = options.definingCursor ?? 'crosshair';\n this.skeletons = options.skeletons?.map(item => item()) ?? [];\n this.initRender = options.initRender;\n this.render = options.render;\n }\n\n /**\n * 标绘类型。应当是全局唯一的字符串,会作为键名缓存\n */\n type: string;\n\n /**\n * 判断是否立即完成标绘.\n * 每次控制点发生变变化时,执行该回调函数,返回`true`则完成标绘\n */\n complete?: (packable: SampledPlotPackable) => boolean;\n\n /**\n * 判断是否允许手动完成标绘。\n * 每次控制点发生变变化时,执行该回调函数,返回`true`则后续左键双击即完成标绘\n */\n allowManualComplete?: (packable: SampledPlotPackable) => boolean;\n\n /**\n * 处于定义态时鼠标的样式\n * @default 'crosshair'\n */\n definingCursor?: Nullable<CSSProperties['cursor']> | ((packable: SampledPlotPackable) => Nullable<CSSProperties['cursor']>);\n\n /**\n * 当前标绘的框架点数据\n */\n skeletons: PlotSkeleton[];\n\n /**\n * 初始化时创建贴地`Primitive`的函数,创建后的`Primitive`会作为配置项传入`render`中\n */\n initRender?: () => PlotRenderResult;\n\n /**\n * 当标绘数据变化时,会触发`render`回调,返回的数据会被添加到cesium中\n */\n render?: (options: PlotRenderContext) => PlotRenderResult | Promise<PlotRenderResult>;\n\n private static _record = new Map<string, PlotScheme>();\n\n /**\n * 标绘方案缓存。\n * 每次标绘时都会将`PlotScheme.type`作为键名缓存,\n * 后续可用过`PlotScheme.getCache(type)`获取完整的`PlotScheme`配置。\n */\n static getCacheTypes(): string[] {\n return [...this._record.keys()];\n }\n\n /**\n * 通过`PlotScheme.type`获取缓存中的`PlotScheme`配置。\n */\n static getCache(type: string): PlotScheme | undefined {\n return PlotScheme._record.get(type);\n }\n\n /**\n * 缓存标绘方案。\n */\n static setCache(scheme: PlotScheme): void {\n assertError(!scheme.type, '`scheme.type` is required');\n PlotScheme._record.set(scheme.type, scheme);\n }\n\n /**\n * 解析传入的maybeScheme,maybeScheme可能是一个完整的PlotScheme,也可能是缓存中的`PlotScheme.type`,并返回 PlotScheme 实例。\n * 若传入的是`PlotScheme.type`字符串,并且缓存中不存在该标绘方案,则抛出错误。\n */\n static resolve(maybeScheme: string | PlotScheme | PlotSchemeConstructorOptions): PlotScheme {\n if (typeof maybeScheme === 'string') {\n const _scheme = PlotScheme.getCache(maybeScheme);\n assert(!!_scheme, `scheme ${maybeScheme} not found`);\n return _scheme!;\n }\n else if (!(maybeScheme instanceof PlotScheme)) {\n return new PlotScheme(maybeScheme);\n }\n else {\n return maybeScheme;\n }\n }\n}\n","import type { Property } from 'cesium';\nimport { Cartesian3, Event, JulianDate, TimeInterval } from 'cesium';\n\n/**\n * 标绘采集到的数据\n */\nexport interface SampledPlotPackable<D = any> {\n\n /**\n * 当前标绘所属于的时间节点\n */\n time?: JulianDate;\n\n /**\n * 采样点位数据\n */\n positions: Cartesian3[];\n\n /**\n * 附带的额外自定义数据\n */\n derivative?: D;\n}\n\nexport enum SampledPlotStrategy {\n NEAR = 0,\n CYCLE = 1,\n STRICT = 2,\n}\n\nexport type SampledPlotInterpolationAlgorithm<D = any> = (\n time: JulianDate,\n previous: SampledPlotPackable<D>,\n next: SampledPlotPackable<D>,\n proportion: number\n) => SampledPlotPackable;\n\n/**\n * 默认插值算法\n *\n * @param time 时间\n * @param previous 前一个数据点\n * @param next 后一个数据点\n * @param proportion 比例\n * @returns 插值结果\n */\nconst defaultInterpolationAlgorithm: SampledPlotInterpolationAlgorithm = (time, previous, next, proportion) => {\n if (proportion === 0) {\n return {\n time,\n positions: previous.positions?.map(item => item.clone()),\n derivative: previous.derivative,\n };\n }\n else if (proportion === 1) {\n return {\n time,\n positions: next.positions?.map(item => item.clone()),\n derivative: previous.derivative,\n };\n }\n\n return {\n time,\n positions: next.positions?.map((right, index) => {\n const left = previous.positions?.[index];\n return !left ? right : Cartesian3.lerp(left, right, proportion, new Cartesian3());\n }),\n derivative: previous.derivative,\n };\n};\n\nexport interface SampledPlotPropertyConstructorOptions<D = any> {\n interpolationAlgorithm?: SampledPlotInterpolationAlgorithm<D>;\n strategy?: SampledPlotStrategy;\n packables?: SampledPlotPackable<D>[];\n}\n\n/**\n * 标绘采样点数据。\n * 标绘采样点数据是一个时间序列数据,包含时间、位置和附带的额外数据。\n * 具体用法可参考 [Cesium.SampledProperty](https://cesium.com/learn/cesiumjs/ref-doc/SampledProperty.html)\n */\nexport class SampledPlotProperty<D = any> {\n constructor(options?: SampledPlotPropertyConstructorOptions<D>) {\n this.interpolationAlgorithm = options?.interpolationAlgorithm;\n this.strategy = options?.strategy ?? SampledPlotStrategy.NEAR;\n options?.packables?.forEach(packable => this.setSample(packable));\n // 默认将初始化一项数据\n if (!this._times.length) {\n this.setSample({\n time: new JulianDate(0, 0),\n positions: [],\n derivative: undefined,\n });\n }\n }\n\n static defaultInterpolationAlgorithm: SampledPlotInterpolationAlgorithm<any> = defaultInterpolationAlgorithm;\n\n strategy: SampledPlotStrategy;\n\n interpolationAlgorithm?: SampledPlotInterpolationAlgorithm;\n\n /**\n * @internal\n */\n private _times: JulianDate[] = [];\n\n /**\n * @internal\n */\n private _sampleds: Cartesian3[][] = [];\n\n /**\n * @internal\n */\n private _derivatives: (D | undefined)[] = [];\n\n get isConstant(): boolean {\n return this._times.length === 0;\n };\n\n /**\n * @internal\n */\n private _definitionChanged = new Event<(...args: any[]) => void>();\n\n get definitionChanged(): Event<(...args: any[]) => void> {\n return this._definitionChanged;\n };\n\n /**\n * 获取时间数组\n *\n * @returns 返回包含所有时间的 JulianDate 数组\n */\n getTimes(): JulianDate[] {\n return this._times.map(t => t.clone());\n }\n\n /**\n * 根据给定的儒略日期获取时间索引范围及比例\n *\n * @param time 给定的儒略日期\n * @returns 返回包含前一个索引、后一个索引及时间比例的对象,若不符合条件则返回undefined\n * @internal\n */\n private getIndexScope(time: JulianDate): { prevIndex: number; nextIndex: number; proportion: number } | undefined {\n if (!this._times.length) {\n return;\n }\n const start = this._times[0];\n const end = this._times[this._times.length - 1];\n if (JulianDate.lessThan(time, start) || JulianDate.greaterThan(time, end)) {\n switch (this.strategy) {\n case SampledPlotStrategy.STRICT: {\n return;\n }\n case SampledPlotStrategy.NEAR: {\n time = JulianDate.lessThan(time, this._times[0])\n ? this._times[0].clone()\n : this._times[this._times.length - 1].clone();\n break;\n }\n case SampledPlotStrategy.CYCLE: {\n const startMS = JulianDate.toDate(this._times[0]).getTime();\n const endMS = JulianDate.toDate(this._times[this._times.length - 1]).getTime();\n const duration = endMS - startMS;\n const timeMS = JulianDate.toDate(time).getTime();\n const diff = (timeMS - startMS) % duration;\n const dete = new Date(startMS + diff);\n time = JulianDate.fromDate(dete);\n break;\n }\n }\n }\n\n const prevIndex = this._times.findIndex(t => JulianDate.lessThanOrEquals(time, t));\n const nextIndex = Math.min(prevIndex, this._times.length - 1);\n const prevMs = JulianDate.toDate(this._times[prevIndex]).getTime();\n const nextMs = JulianDate.toDate(this._times[nextIndex]).getTime();\n const ms = JulianDate.toDate(time).getTime();\n\n return {\n prevIndex,\n nextIndex,\n proportion: ((ms - prevMs) / (nextMs - prevMs)) || 0,\n };\n }\n\n /**\n * 根据给定的儒略日期(JulianDate)获取插值后的样本点数据。\n *\n * @param time 指定的儒略日期(JulianDate)。\n * @param result 可选参数,用于存储结果的容器。如果未提供,则创建一个新的容器。\n * @returns 插值后的样本点数据,存储在提供的或新创建的result容器中。\n * @template D 数据类型。\n */\n getValue(time?: JulianDate, result?: SampledPlotPackable): SampledPlotPackable<D> {\n result ??= { time, positions: [] };\n Object.assign(result, {\n time: time?.clone(),\n positions: [],\n derivative: undefined,\n });\n\n if (!time) {\n result.time = this._times[0]!.clone();\n result.positions = this._sampleds[0]?.map(c => c.clone(c));\n result.derivative = this._derivatives[0];\n return result;\n }\n const scope = this.getIndexScope(time);\n if (!scope) {\n return result;\n }\n\n result.time = time;\n const { prevIndex, nextIndex, proportion } = scope;\n const previous: SampledPlotPackable<D> = {\n time: this._times[prevIndex],\n positions: this._sampleds[prevIndex],\n derivative: this._derivatives[prevIndex],\n };\n const next: SampledPlotPackable<D> = {\n time: this._times[nextIndex],\n positions: this._sampleds[nextIndex],\n derivative: this._derivatives[nextIndex],\n };\n const packable = (this.interpolationAlgorithm || SampledPlotProperty.defaultInterpolationAlgorithm)(time, previous, next, proportion);\n Object.assign(result, packable);\n return result;\n }\n\n /**\n * 设置样本数据,如果传入的数据不含时间,则会存入时间最早的集合中\n * @param value 样本数据对象,包含时间、位置和导数信息\n */\n setSample(value: SampledPlotPackable<D>): void {\n const time = value.time?.clone() ?? this._times[0]!.clone();\n const positions = value.positions?.map(item => item.clone()) ?? [];\n const derivative = value.derivative;\n const index = this._times.findIndex(t => JulianDate.equals(time, t));\n\n if (index !== -1) {\n this._times[index] = time;\n this._sampleds[index] = positions;\n this._derivatives[index] = value.derivative;\n }\n else if (this._times.length === 0) {\n this._times[0] = time;\n this._sampleds[0] = positions;\n this._derivatives[0] = value.derivative;\n }\n else if (JulianDate.lessThan(time, this._times[0])) {\n this._times.splice(0, 0, time);\n this._sampleds.splice(0, 0, positions);\n this._derivatives.splice(0, 0, derivative);\n }\n else if (JulianDate.greaterThan(time, this._times[this._times.length - 1])) {\n this._times.push(time);\n this._sampleds.push(positions);\n this._derivatives.push(derivative);\n }\n\n this.definitionChanged.raiseEvent(this);\n }\n\n /**\n * 设置样本数据\n *\n * @param values 样本数据数组,每个元素都是类型为SampledPlotPackable<D>的对象\n */\n setSamples(values: SampledPlotPackable<D>[]): void {\n values.forEach(value => this.setSample(value));\n }\n\n /**\n * 从样本中移除指定时间点的数据\n *\n * @param time 需要移除的时间点,使用儒略日期表示\n * @returns 如果成功移除,则返回 true;否则返回 false\n */\n removeSample(time: JulianDate): boolean {\n const index = this._times.findIndex(t => t.equals(time));\n if (index !== -1) {\n this._sampleds.splice(index, 1);\n this._derivatives.splice(index, 1);\n const removed = this._times.splice(index, 1);\n if (removed.length) {\n this._definitionChanged.raiseEvent(this);\n return true;\n }\n }\n return false;\n }\n\n /**\n * 从样本中移除指定时间间隔内的样本。\n *\n * @param interval 要移除样本的时间间隔\n */\n removeSamples(interval: TimeInterval): void {\n for (let i = 0; i < this._times.length; i++) {\n const time = this._times[i];\n TimeInterval.contains(interval, time) && this.removeSample(time);\n }\n }\n\n /**\n * 判断两个property是否相等\n */\n equals(other?: Property): boolean {\n return other === this;\n }\n}\n","import type { Entity } from 'cesium';\nimport type { PlotSchemeConstructorOptions } from './PlotScheme';\nimport type { PlotSkeletonEntity } from './PlotSkeleton';\nimport type { SampledPlotPropertyConstructorOptions } from './SampledPlotProperty';\nimport { createGuid, Event } from 'cesium';\nimport { PlotScheme } from './PlotScheme';\nimport { SampledPlotProperty } from './SampledPlotProperty';\n\nexport type PlotDefinitionChangedCallback = (\n scope: PlotFeature,\n key: keyof PlotFeature,\n newValue: PlotFeature[typeof key],\n oldValue: PlotFeature[typeof key],\n) => void;\n\n/**\n * 标绘实例构造参数\n */\nexport interface PlotFeatureConstructorOptions {\n /**\n * 唯一标识符\n *\n * 未指定时将自动生成GUID\n */\n id?: string;\n\n /**\n * 标绘方案配置\n *\n * 支持直接传入字符串方案名称、方案实例或构造参数\n */\n scheme: string | PlotScheme | PlotSchemeConstructorOptions;\n\n /**\n * 采样属性配置\n *\n * 控制标绘对象的动态属性采样行为\n */\n sampled?: SampledPlotProperty | SampledPlotPropertyConstructorOptions;\n\n /**\n * 禁用状态标志\n *\n * @default false\n */\n disabled?: boolean;\n}\n\n/**\n * 标绘实例\n */\nexport class PlotFeature {\n constructor(options: PlotFeatureConstructorOptions) {\n const { id, disabled = false, sampled } = options;\n this._id = id || createGuid();\n this._scheme = PlotScheme.resolve(options.scheme);\n\n this._definitionChanged = new Event();\n this._defining = true;\n this._disabled = disabled;\n this._sampled = sampled instanceof SampledPlotProperty ? sampled : new SampledPlotProperty(sampled);\n this._sampled.definitionChanged.addEventListener(property => this._definitionChanged.raiseEvent(this, 'sampled', property, property), this);\n\n const init = this._scheme.initRender?.() ?? {};\n this._entities = [...init.entities ?? []];\n this._primitives = [...init.primitives ?? []];\n this._groundPrimitives = [...init.groundPrimitives ?? []];\n this._skeletons = [];\n }\n\n /**\n * @internal\n */\n private _id: string;\n\n get id(): string {\n return this._id;\n }\n\n /**\n * @internal\n */\n private _scheme: PlotScheme;\n\n get scheme(): PlotScheme {\n return this._scheme;\n }\n\n /**\n * @internal\n */\n private _definitionChanged: Event<PlotDefinitionChangedCallback>;\n\n get definitionChanged(): Event<PlotDefinitionChangedCallback> {\n return this._definitionChanged;\n }\n\n /**\n * @internal\n */\n private _defining: boolean;\n\n get defining(): boolean {\n return this._defining;\n }\n\n /**\n * @internal\n */\n static setDefining(plot: PlotFeature, value: boolean): void {\n if (plot._defining !== value) {\n plot._definitionChanged.raiseEvent(plot, 'defining', value, plot._defining);\n plot._defining = value;\n }\n }\n\n /**\n * @internal\n */\n private _disabled: boolean;\n\n /**\n * 获取禁用状态\n *\n * 当为 `true` 时,标绘实例将停止响应交互和更新;\n * 为 `false` 时恢复正常功能。\n */\n get disabled(): boolean {\n return this._disabled;\n }\n\n set disabled(value: string) {\n this.disabled = value;\n }\n\n /**\n * @internal\n */\n private _sampled: SampledPlotProperty;\n\n get sampled(): SampledPlotProperty {\n return this._sampled;\n }\n\n /**\n * @internal\n */\n private _entities: Entity[];\n\n get entities(): Entity[] {\n return this._entities;\n }\n\n set entities(value: Entity[]) {\n this._definitionChanged.raiseEvent(this, 'entities', value, this._entities);\n this._entities = value;\n }\n\n /**\n * @internal\n */\n private _primitives: any[];\n\n get primitives(): any[] {\n return this._primitives;\n }\n\n /**\n * @internal\n */\n set primitives(value: any[]) {\n this._definitionChanged.raiseEvent(this, 'primitives', value, this._primitives);\n this._primitives = value;\n }\n\n /**\n * @internal\n */\n private _groundPrimitives: any[];\n\n get groundPrimitives(): any[] {\n return this._groundPrimitives;\n }\n\n /**\n * @internal\n */\n set groundPrimitives(value: any[]) {\n this._definitionChanged.raiseEvent(this, 'groundPrimitives', value, this._groundPrimitives);\n this._groundPrimitives = value;\n }\n\n /**\n * @internal\n */\n private _skeletons: PlotSkeletonEntity[];\n\n get skeletons(): PlotSkeletonEntity[] {\n return this._skeletons;\n }\n\n /**\n * @internal\n */\n set skeletons(value: PlotSkeletonEntity[]) {\n this._definitionChanged.raiseEvent(this, 'skeletons', value, this._skeletons);\n this._skeletons = value;\n }\n}\n","import type { Cartesian3, ScreenSpaceEventHandler, Viewer } from 'cesium';\nimport type { Nullable } from 'vesium';\nimport type { CSSProperties, MaybeRef, VNode } from 'vue';\nimport type { PlotFeature } from './PlotFeature';\nimport type { SampledPlotPackable, SampledPlotProperty } from './SampledPlotProperty';\nimport { Entity } from 'cesium';\n\nexport interface SkeletonDisabledOptions {\n\n /**\n * 当前标绘是否是否正在激活,即正在编辑状态\n */\n active: boolean;\n\n /**\n * 当前标绘是否还在定义态,即还未完成采集\n */\n defining: boolean;\n}\n\nexport interface OnSkeletonClickOptions {\n viewer: Viewer;\n\n /**\n * 当前标绘属性数据\n */\n sampled: SampledPlotProperty;\n\n /**\n * 标绘采集到的数据,通过该数据可以获取到当前标绘的所有点位信息\n */\n packable: SampledPlotPackable<any>;\n\n /**\n * 当前标绘是否是否正在激活,即正在编辑状态\n */\n active: boolean;\n\n /**\n * 当前标绘是否还在定义态,即还未完成采集\n */\n defining: boolean;\n\n /**\n * 当前被点击的控制点索引\n */\n index: number;\n\n /**\n * 鼠标点击事件上下文信息\n */\n event: ScreenSpaceEventHandler.PositionedEvent;\n}\n\nexport interface OnSkeletonDragOptions {\n viewer: Viewer;\n\n /***\n * 当前标绘属性数据\n */\n sampled: SampledPlotProperty;\n\n /**\n * 标绘采集到的数据,通过该数据可以获取到当前标绘的所有点位信息\n */\n packable: SampledPlotPackable<any>;\n\n /**\n * 当前标绘是否是否正在激活,即正在编辑状态\n */\n active: boolean;\n\n /**\n * 当前被拖拽的控制点索引\n */\n index: number;\n\n /**\n * 鼠标拖拽事件上下文信息\n */\n event: ScreenSpaceEventHandler.MotionEvent;\n\n /**\n * 当前的拖拽状态\n */\n dragging: boolean;\n\n /**\n * 执行是否锁定相机视角\n */\n lockCamera: () => void;\n}\n\nexport interface OnKeyPressedOptions {\n viewer: Viewer;\n\n /**\n * 当前标绘属性数据\n */\n sampled: SampledPlotProperty;\n\n /**\n * 标绘采集到的数据,通过该数据可以获取到当前标绘的所有点位信息\n */\n packable: SampledPlotPackable<any>;\n\n /**\n * 当前被点击的控制点索引\n */\n index: number;\n\n /**\n * 被按压的按键事件回调\n */\n keyEvent: KeyboardEvent;\n}\n\n/**\n * 框架点执行状态枚举\n * - IDLE 空闲状态\n * - HOVER 悬停状态\n * - ACTIVE 激活状态\n */\nexport enum PlotAction {\n IDLE = 0,\n HOVER = 1,\n ACTIVE = 2,\n}\n\nexport interface SkeletonRenderOptions {\n /**\n * 标绘采集到的数据,通过该数据可以获取到当前标绘的所有点位信息\n */\n packable: SampledPlotPackable;\n\n /**\n * 所有框架点位集合\n */\n positions: Cartesian3[];\n\n /**\n * 当前渲染的框架点索引\n */\n index: number;\n /**\n * 当前应当渲染的位置\n */\n position: Cartesian3;\n\n /**\n * 当前标绘是否是否正在激活,即正在编辑状态\n */\n active: boolean;\n\n /**\n * 当前标绘是否还在定义态,即还未完成采集\n */\n defining: boolean;\n\n /**\n * 当前框架点执行状态\n */\n action: PlotAction;\n}\n\n/**\n * 控制点配置项\n */\nexport interface PlotSkeleton {\n /**\n * 是否禁用控制点\n */\n disabled?: boolean | ((options: SkeletonDisabledOptions) => boolean);\n /**\n * 实际情况中,并非所有采集都都要渲染对应框架点,通过`format`函数可以过滤掉不需要渲染的点位,另外还可以自定义点位的偏移、增加框架点\n * @param packable 标绘采集到的数据\n */\n format?: (packable: SampledPlotPackable<any>) => Cartesian3[];\n\n /**\n * 点位渲染函数,返回Entity的构造参数,如果不返回任何值则不渲染该点位\n */\n render?: (options: SkeletonRenderOptions) => Entity.ConstructorOptions | undefined;\n\n /**\n * Cursor style when hovering.\n */\n cursor?: MaybeRef<Nullable<CSSProperties['cursor']>> | ((pick: any) => Nullable<CSSProperties['cursor']>);\n\n /**\n * Cursor style when dragging.\n */\n dragCursor?: MaybeRef<Nullable<CSSProperties['cursor']>> | ((pick: any) => Nullable<CSSProperties['cursor']>);\n\n /**\n * 鼠标悬停在框架点时显示的提示信息\n */\n tip?: (options: SkeletonRenderOptions) => string | VNode | string | undefined;\n\n /**\n * 框架点鼠标左键点击时的处理逻辑\n */\n onLeftClick?: (options: OnSkeletonClickOptions) => void;\n\n /**\n * 框架点被拖拽时的处理逻辑\n */\n onDrag?: (options: OnSkeletonDragOptions) => void;\n\n /**\n * 键盘按键按下时的处理逻辑\n */\n onKeyPressed?: (options: OnKeyPressedOptions) => void;\n}\n\n/**\n * 标绘框架点 Entity\n */\nexport class PlotSkeletonEntity extends Entity {\n constructor(options: Entity.ConstructorOptions) {\n super(options);\n }\n\n /**\n * @internal\n */\n declare plot: PlotFeature;\n\n /**\n * @internal\n */\n declare skeleton: PlotSkeleton;\n\n /**\n * @internal\n */\n declare index: number;\n}\n","import type { Cartesian3, Entity, JulianDate } from 'cesium';\nimport type { ComputedRef, ShallowRef } from 'vue';\nimport type { PlotFeature } from './PlotFeature';\nimport { watchArray } from '@vueuse/core';\nimport { CustomDataSource, PrimitiveCollection, ScreenSpaceEventType } from 'cesium';\nimport { arrayDiff, canvasCoordToCartesian, useCesiumEventListener, useDataSource, useEntityScope, usePrimitive, usePrimitiveScope, useScreenSpaceEventHandler, useViewer } from 'vesium';\nimport { computed, shallowRef, watch } from 'vue';\n\nexport interface UseProductRetrun {\n primitives: ComputedRef<any[]>;\n entities: ComputedRef<Entity[]>;\n groundPrimitives: ComputedRef<any[]>;\n}\n\nexport function useRender(\n plots: ComputedRef<PlotFeature[]>,\n current: ShallowRef<PlotFeature | undefined>,\n getCurrentTime: () => JulianDate,\n): UseProductRetrun {\n const viewer = useViewer();\n\n const primitiveCollection = usePrimitive(new PrimitiveCollection());\n const groundPrimitiveCollection = usePrimitive(new PrimitiveCollection(), { collection: 'ground' });\n const dataSource = useDataSource(new CustomDataSource());\n\n const entityScope = useEntityScope({ collection: () => dataSource.value!.entities! });\n const primitiveScope = usePrimitiveScope({ collection: () => primitiveCollection.value! });\n const groundPrimitiveScope = usePrimitiveScope({ collection: () => groundPrimitiveCollection.value! });\n\n const mouseCartesian = shallowRef<Cartesian3>();\n\n useScreenSpaceEventHandler(\n ScreenSpaceEventType.MOUSE_MOVE,\n (event) => {\n mouseCartesian.value = canvasCoordToCartesian(event?.endPosition, viewer.value!.scene);\n },\n );\n\n watchArray(plots, (_value, _oldValue, added, removed = []) => {\n removed.forEach((plot) => {\n entityScope.removeWhere(item => plot.entities.includes(item));\n primitiveScope.removeWhere(item => plot.primitives.includes(item));\n groundPrimitiveScope.removeWhere(item => plot.groundPrimitives.includes(item));\n });\n\n added.forEach((plot) => {\n plot.entities.forEach(item => entityScope.add(item));\n plot.primitives.forEach(item => primitiveScope.add(item));\n plot.groundPrimitives.forEach(item => groundPrimitiveScope.add(item));\n });\n }, {\n immediate: true,\n flush: 'post',\n });\n\n useCesiumEventListener(\n () => plots.value.map(item => item.definitionChanged),\n (_scope, key, newValue, oldValue) => {\n if (key === 'entities') {\n const { added, removed } = arrayDiff(newValue as Entity[], oldValue as Entity[]);\n added.forEach(item => entityScope.add(item));\n removed.forEach(item => entityScope.remove(item));\n }\n else if (key === 'primitives') {\n const { added, removed } = arrayDiff(newValue as Entity[], oldValue as Entity[]);\n added.forEach(item => primitiveScope.add(item));\n removed.forEach(item => primitiveScope.remove(item));\n }\n else if (key === 'groundPrimitives') {\n const { added, removed } = arrayDiff(newValue as Entity[], oldValue as Entity[]);\n added.forEach(item => groundPrimitiveScope.add(item));\n removed.forEach(item => groundPrimitiveScope.remove(item));\n }\n },\n );\n\n const update = async (plot: PlotFeature) => {\n const reslut = await plot.scheme.render?.({\n packable: plot.sampled.getValue(getCurrentTime()),\n mouse: plot.defining ? mouseCartesian.value : undefined,\n defining: plot.defining,\n previous: {\n entities: plot.entities,\n primitives: plot.primitives,\n groundPrimitives: plot.groundPrimitives,\n },\n });\n\n plot.entities = reslut?.entities ?? [];\n plot.primitives = reslut?.primitives ?? [];\n plot.groundPrimitives = reslut?.groundPrimitives ?? [];\n };\n\n watch(current, (plot, previous) => {\n previous && update(previous);\n });\n\n useCesiumEventListener(\n () => plots.value.map(item => item.definitionChanged),\n (plot, key) => {\n if (['disabled', 'defining', 'scheme', 'sampled', 'time'].includes(key)) {\n update(plot);\n }\n },\n );\n\n watch(mouseCartesian, () => {\n plots.value.forEach(plot => plot.defining && update(plot));\n });\n\n return {\n primitives: computed(() => Array.from(primitiveScope.scope)),\n groundPrimitives: computed(() => Array.from(primitiveScope.scope)),\n entities: computed(() => Array.from(entityScope.scope)),\n };\n}\n","import type { JulianDate } from 'cesium';\nimport type { Nullable } from 'vesium';\nimport type { CSSProperties, ShallowRef } from 'vue';\nimport { promiseTimeout } from '@vueuse/core';\nimport { ScreenSpaceEventType } from 'cesium';\nimport { canvasCoordToCartesian, isFunction, useCesiumEventListener, useScreenSpaceEventHandler, useViewer } from 'vesium';\nimport { computed, ref, watch } from 'vue';\nimport { PlotFeature } from './PlotFeature';\n\nexport function useSampled(\n current: ShallowRef<PlotFeature | undefined>,\n getCurrentTime: () => JulianDate,\n): void {\n const viewer = useViewer();\n const doubleClicking = ref(false);\n\n const packable = computed(() => {\n return current.value?.sampled.getValue(getCurrentTime());\n });\n\n // 左键点击添加点\n useScreenSpaceEventHandler(\n ScreenSpaceEventType.LEFT_CLICK,\n async (ctx) => {\n await promiseTimeout(1);\n if (!current.value || !packable.value) {\n return;\n }\n // 双击会触发两次事件, 这里做一个防抖处理,只需触发一次事件\n if (doubleClicking.value) {\n return;\n }\n const { scheme, defining, sampled } = current.value;\n if (!defining) {\n return;\n }\n const position = canvasCoordToCartesian(ctx.position, viewer.value!.scene);\n if (!position) {\n return;\n }\n packable.value.positions ??= [];\n packable.value.positions.push(position);\n sampled.setSample(packable.value);\n const completed = scheme.complete?.(packable.value);\n completed && PlotFeature.setDefining(current.value, false);\n },\n );\n\n // 双击结束定义态,进入激活态\n useScreenSpaceEventHandler(\n ScreenSpaceEventType.LEFT_DOUBLE_CLICK,\n async (ctx) => {\n if (!current.value || !packable.value) {\n return;\n }\n doubleClicking.value = true;\n await promiseTimeout(2);\n doubleClicking.value = false;\n\n const { scheme, defining } = current.value;\n if (!defining) {\n return;\n }\n const position = canvasCoordToCartesian(ctx.position, viewer.value!.scene);\n if (!position) {\n return;\n }\n\n const completed = scheme.allowManualComplete?.(packable.value);\n completed && PlotFeature.setDefining(current.value, false);\n },\n );\n\n // 右键回退到上一个点\n useScreenSpaceEventHandler(\n ScreenSpaceEventType.RIGHT_CLICK,\n async () => {\n if (!current.value || !packable.value) {\n return;\n }\n const { defining, sampled } = current.value;\n\n if (!defining) {\n return;\n }\n packable.value.positions ??= [];\n if (packable.value.positions.length === 0) {\n return;\n }\n packable.value.positions.splice(packable.value.positions.length - 1, 1);\n sampled.setSample(packable.value);\n },\n );\n\n // 定义态时的鼠标样式\n const definingCursorCss = ref<Nullable<CSSProperties['cursor']>>();\n\n const setDefiningCursorCss = () => {\n if (!current.value?.defining) {\n if (definingCursorCss.value) {\n definingCursorCss.value = undefined;\n viewer.value!.container.parentElement!.style.removeProperty('cursor');\n }\n }\n else {\n const definingCursor = current.value!.scheme.definingCursor;\n definingCursorCss.value = isFunction(definingCursor) ? definingCursor(packable.value!) : definingCursor;\n if (definingCursorCss.value) {\n viewer.value?.container.parentElement!.style.setProperty('cursor', definingCursorCss.value);\n }\n }\n };\n\n useCesiumEventListener(() => current.value?.definitionChanged, (plot, key) => {\n if (key === 'defining' || key === 'sampled') {\n setDefiningCursorCss();\n }\n });\n watch(current, () => setDefiningCursorCss());\n}\n","import type { JulianDate } from 'cesium';\nimport type { ComputedRef, ShallowRef } from 'vue';\nimport type { PlotFeature } from './PlotFeature';\nimport type { PlotSkeleton } from './PlotSkeleton';\nimport { onKeyStroke, watchArray } from '@vueuse/core';\nimport { CustomDataSource } from 'cesium';\nimport { arrayDiff, isFunction, useCesiumEventListener, useDataSource, useEntityScope, useGraphicEvent, useViewer } from 'vesium';\nimport { nextTick, shallowRef, toValue, watch, watchEffect } from 'vue';\nimport { PlotAction, PlotSkeletonEntity } from './PlotSkeleton';\n\nexport function useSkeleton(\n plots: ComputedRef<PlotFeature[]>,\n current: ShallowRef<PlotFeature | undefined>,\n getCurrentTime: () => JulianDate,\n) {\n const viewer = useViewer();\n\n const dataSource = useDataSource(new CustomDataSource());\n const entityScope = useEntityScope({ collection: () => dataSource.value!.entities });\n\n const hoverEntity = shallowRef<PlotSkeletonEntity>();\n const activeEntity = shallowRef<PlotSkeletonEntity>();\n\n // 获取当前点位的状态\n const getPointAction = (entity?: PlotSkeletonEntity) => {\n if (!entity) {\n return PlotAction.IDLE;\n }\n return activeEntity.value?.id === entity.id\n ? PlotAction.ACTIVE\n : hoverEntity.value?.id === entity.id\n ? PlotAction.HOVER\n : PlotAction.IDLE;\n };\n\n const update = (plot: PlotFeature, destroyed?: boolean) => {\n const oldEntities = plot.skeletons;\n const entities: PlotSkeletonEntity[] = [];\n\n if (destroyed || plot.disabled) {\n plot.skeletons = [];\n }\n else {\n const packable = plot.sampled.getValue(getCurrentTime());\n const defining = plot.defining;\n const active = current.value === plot;\n const skeletons = plot.scheme.skeletons;\n\n skeletons.forEach((skeleton) => {\n const disabled = isFunction(skeleton.disabled) ? skeleton.disabled({ active, defining }) : skeleton.disabled;\n if (disabled) {\n return;\n }\n const positions = skeleton.format?.(packable!) ?? packable?.positions ?? [];\n\n positions.forEach((position, index) => {\n let entity = oldEntities.find(item => item.index === index && item.skeleton === skeleton);\n const options = skeleton.render?.({\n defining,\n active,\n index,\n packable,\n positions,\n position,\n action: getPointAction(entity),\n });\n\n const merge = new PlotSkeletonEntity(options ?? {});\n if (entity) {\n merge.propertyNames.forEach((key) => {\n if (key !== 'id') {\n // @ts-expect-error ignore\n entity[key] = merge[key];\n }\n });\n }\n else {\n entity = merge;\n }\n entity.plot = plot;\n entity.skeleton = skeleton;\n entity.index = index;\n entities.push(entity);\n });\n });\n }\n plot.skeletons = entities;\n };\n\n const { addGraphicEvent } = useGraphicEvent();\n\n watchEffect((onCleanup) => {\n // cursor 仅在不存在定义态的标绘时才生效\n const remove = addGraphicEvent('global', 'DRAG', ({ event, pick, dragging, lockCamera }) => {\n if (pick.id instanceof PlotSkeletonEntity && entityScope.scope.has(pick.id)) {\n const entity = pick.id as PlotSkeletonEntity;\n\n const plot = entity.plot as PlotFeature;\n // 仅在非定义态时才可拖拽\n if (plot.defining) {\n return;\n }\n activeEntity.value = entity;\n const skeleton = entity.skeleton as PlotSkeleton;\n const index = entity.index as number;\n const packable = plot.sampled.getValue(getCurrentTime());\n skeleton.onDrag?.({\n viewer: viewer.value!,\n sampled: plot.sampled,\n packable,\n active: current.value === plot,\n index,\n event,\n dragging,\n lockCamera,\n });\n }\n else {\n activeEntity.value = undefined;\n }\n }, {\n cursor: ({ pick }) => {\n if (!current.value?.defining && entityScope.scope.has(pick.id)) {\n const skeleton = pick.id.skeleton as PlotSkeleton;\n return isFunction(skeleton?.cursor) ? skeleton.cursor(pick) : toValue(skeleton?.cursor);\n }\n },\n dragCursor: ({ pick }) => {\n if (!current.value?.defining && entityScope.scope.has(pick.id)) {\n const skeleton = pick.id.skeleton as PlotSkeleton;\n return isFunction(skeleton?.dragCursor) ? skeleton.dragCursor(pick) : toValue(skeleton?.dragCursor);\n }\n },\n });\n onCleanup(remove);\n });\n\n // 键盘控制当前激活的点位\n onKeyStroke((keyEvent) => {\n if (activeEntity.value) {\n const entity = activeEntity.value;\n const plot = entity.plot as PlotFeature;\n const skeleton = entity.skeleton as PlotSkeleton;\n const index = entity.index as number;\n const packable = plot.sampled.getValue(getCurrentTime());\n\n skeleton.onKeyPressed?.({\n viewer: viewer.value!,\n sampled: plot.sampled,\n packable,\n index,\n keyEvent,\n });\n }\n });\n\n watchEffect((onCleanup) => {\n const remove = addGraphicEvent('global', 'HOVER', ({ hovering, pick }) => {\n if (hovering && pick.id instanceof PlotSkeletonEntity && entityScope.scope.has(pick.id)) {\n const entity = pick.id as PlotSkeletonEntity;\n hoverEntity.value = entity;\n }\n else {\n hoverEntity.value = undefined;\n }\n });\n onCleanup(remove);\n });\n\n watchEffect((onCleanup) => {\n const remove = addGraphicEvent('global', 'LEFT_CLICK', ({ event, pick }) => {\n if (pick.id instanceof PlotSkeletonEntity && entityScope.scope.has(pick.id)) {\n const entity = pick.id as PlotSkeletonEntity;\n activeEntity.value = entity;\n const plot = entity.plot as PlotFeature;\n const skeleton = entity.skeleton as PlotSkeleton;\n const index = entity.index as number;\n const packable = plot.sampled.getValue(getCurrentTime());\n\n skeleton.onLeftClick?.({\n viewer: viewer.value!,\n sampled: plot.sampled,\n packable: packable!,\n active: current.value === plot,\n defining: plot.defining,\n index,\n event,\n });\n }\n else {\n activeEntity.value = undefined;\n }\n });\n onCleanup(remove);\n });\n\n watchArray(plots, (value, oldValue, added, removed = []) => {\n added.forEach(plot => update(plot));\n removed.forEach(plot => update(plot, true));\n });\n\n useCesiumEventListener(\n () => plots.value.map(plot => plot.definitionChanged),\n (plot, key, newValue, oldValue) => {\n if (['disabled', 'defining', 'scheme', 'sampled', 'time'].includes(key)) {\n nextTick(() => update(plot));\n }\n else if (key === 'skeletons') {\n const { added, removed } = arrayDiff(newValue as PlotSkeletonEntity[], oldValue as PlotSkeletonEntity[]);\n added.forEach(item => entityScope.add(item));\n removed.forEach(item => entityScope.remove(item));\n }\n },\n );\n\n // 当前激活的标绘变化时,更新渲染\n watch(current, (plot, previous) => {\n plot && update(plot);\n previous && update(previous);\n });\n\n return {\n dataSource,\n };\n}\n","import type { ShallowRef } from 'vue';\nimport type { PlotFeatureConstructorOptions } from './PlotFeature';\nimport type { SampledPlotPackable } from './SampledPlotProperty';\nimport { JulianDate, ScreenSpaceEventType } from 'cesium';\nimport { pickHitGraphic, useCesiumEventListener, useScreenSpaceEventHandler, useViewer } from 'vesium';\nimport { computed, shallowReactive, shallowRef, watch } from 'vue';\nimport { PlotFeature } from './PlotFeature';\nimport { useRender } from './useRender';\nimport { useSampled } from './useSampled';\nimport { useSkeleton } from './useSkeleton';\n\nexport interface UsePlotOptions {\n time?: ShallowRef<JulianDate | undefined>;\n}\n\nexport type UsePlotOperate = (plot: PlotFeature | PlotFeatureConstructorOptions) => Promise<PlotFeature>;\n\nexport interface UsePlotRetrun {\n\n time: ShallowRef<JulianDate | undefined>;\n\n data?: ShallowRef<PlotFeature[]>;\n\n current?: ShallowRef<PlotFeature | undefined>;\n /**\n * 触发标绘\n */\n operate: UsePlotOperate;\n\n /**\n * 强制终止当前进行中的标绘\n */\n cancel: VoidFunction;\n}\n\nexport function usePlot(options?: UsePlotOptions) {\n const time = options?.time || shallowRef<JulianDate>();\n\n const viewer = useViewer();\n\n const getCurrentTime = () => {\n return time.value?.clone() || new JulianDate(0, 0);\n };\n\n const collection = shallowReactive(new Set<PlotFeature>());\n const plots = computed(() => Array.from(collection));\n const current = shallowRef<PlotFeature>();\n const packable = shallowRef<SampledPlotPackable>();\n\n useCesiumEventListener([\n () => current.value?.sampled.definitionChanged,\n ], () => {\n packable.value = current.value?.sampled.getValue(getCurrentTime());\n });\n\n useSampled(current, getCurrentTime);\n useRender(plots, current, getCurrentTime);\n useSkeleton(plots, current, getCurrentTime);\n\n // 单击激活\n useScreenSpaceEventHandler(ScreenSpaceEventType.LEFT_CLICK, (data) => {\n if (current.value?.defining) {\n return;\n }\n\n const pick = viewer.value?.scene.pick(data.position.clone());\n // 点击到了骨架点则不处理\n if (pick?.id?.plot instanceof PlotFeature) {\n return;\n }\n\n if (!pick) {\n current.value = undefined;\n return;\n }\n\n current.value = plots.value.find(plot => pickHitGraphic(pick, [...plot.entities, ...plot.primitives, ...plot.groundPrimitives]));\n });\n\n let operateResolve: ((plot: PlotFeature) => void) | undefined;\n let operateReject: (() => void) | undefined;\n\n // 当前激活的标绘发生变动时,上一个标绘取消激活。若上一标绘仍处于定义态时,应立即强制完成,若无法完成则删除。\n watch(current, (plot, previous) => {\n if (previous) {\n if (previous.defining) {\n const packable = previous.sampled.getValue(getCurrentTime());\n const completed = previous.scheme.allowManualComplete?.(packable);\n if (completed) {\n PlotFeature.setDefining(previous, false);\n operateResolve?.(previous);\n }\n else {\n collection.delete(previous);\n }\n }\n }\n });\n\n const operate: UsePlotOperate = async (plot) => {\n return new Promise((resolve, reject) => {\n operateResolve = resolve;\n operateReject = reject;\n const _plot = plot instanceof PlotFeature ? plot : new PlotFeature(plot);\n\n if (!collection.has(_plot)) {\n collection.add(_plot);\n }\n current.value = _plot;\n return resolve(_plot);\n });\n };\n\n const remove = (plot: PlotFeature): boolean => {\n if (plot === current.value) {\n current.value = undefined;\n }\n if (collection.has(plot)) {\n collection.delete(plot);\n return true;\n }\n return false;\n };\n\n return {\n plots,\n time,\n operate,\n remove,\n cancel: operateReject,\n };\n}\n","import type { PlotSkeleton } from '../usePlot';\nimport { Color } from 'cesium';\nimport { canvasCoordToCartesian, toCartesian3, toCartographic } from 'vesium';\nimport { PlotAction } from '../usePlot';\n\n/**\n * 绘制控制的框架点,拖拽时,将更新该控制点的实时位置\n */\nexport function control(): PlotSkeleton {\n return {\n disabled: ({ active }) => !active,\n cursor: 'pointer',\n dragCursor: 'crosshair',\n onDrag({ viewer, sampled, packable, event, index, lockCamera }) {\n lockCamera();\n const position = canvasCoordToCartesian(event.endPosition, viewer.scene);\n if (position) {\n const positions = [...packable.positions ?? []];\n positions[index] = position;\n sampled.setSample({\n time: packable.time,\n derivative: packable.derivative,\n positions,\n });\n }\n },\n\n onKeyPressed({ viewer, keyEvent, sampled, packable, index }) {\n const height = toCartographic(viewer!.camera.position)?.height;\n if (!height || !['ArrowUp', 'ArrowRight', 'ArrowDown', 'ArrowLeft'].includes(keyEvent.key))\n return;\n\n keyEvent.preventDefault();\n let headingAdjust = 0;\n switch (keyEvent.key) {\n case 'ArrowRight':\n headingAdjust = Math.PI / 2;\n break;\n case 'ArrowDown':\n headingAdjust = Math.PI;\n break;\n case 'ArrowLeft':\n headingAdjust = -Math.PI / 2;\n break;\n case 'ArrowUp':\n headingAdjust = 0;\n break;\n }\n const newHeading = (viewer.camera.heading + headingAdjust) % (2 * Math.PI);\n const positions = [...packable.positions ?? []];\n const cartographic = toCartographic(positions[index])!;\n const r = height / 100000;\n const distance = r * Math.PI / 180 / 1000;\n\n cartographic.latitude += distance * Math.cos(newHeading);\n cartographic.longitude += distance * Math.sin(newHeading);\n\n positions[index] = toCartesian3(cartographic)!;\n sampled.setSample({\n time: packable.time,\n derivative: packable.derivative,\n positions,\n });\n },\n render: ({ position, action }) => {\n const colors = {\n [PlotAction.IDLE]: Color.BLUE.withAlpha(0.4),\n [PlotAction.HOVER]: Color.BLUE.withAlpha(0.6),\n [PlotAction.ACTIVE]: Color.AQUA.withAlpha(1),\n };\n return {\n position,\n point: {\n pixelSize: 8,\n color: colors[action],\n disableDepthTestDistance: Number.POSITIVE_INFINITY,\n outlineWidth: 1,\n outlineColor: Color.WHITE.withAlpha(0.4),\n },\n };\n },\n };\n}\n","import type { PlotSkeleton } from '../usePlot';\nimport { Cartesian3, Color } from 'cesium';\nimport { canvasCoordToCartesian } from 'vesium';\nimport { PlotAction } from '../usePlot';\n\n/**\n * 绘制封闭的间隔框架点,如多边形。拖拽时,会在两点之间插入一个控制点,并持续拖拽该点。\n */\nexport function interval(): PlotSkeleton {\n let dragIndex = -1;\n return {\n disabled: ({ active, defining }) => !active || defining,\n cursor: 'pointer',\n dragCursor: 'crosshair',\n format(packable) {\n const _positions = packable.positions ?? [];\n if (_positions.length < 2) {\n return [];\n }\n return _positions.map((position, i) => {\n const next = i === _positions.length - 1 ? _positions[0] : _positions[i + 1];\n return Cartesian3.midpoint(position, next, new Cartesian3());\n });\n },\n onDrag({ viewer, sampled, packable, event, index, lockCamera, dragging }) {\n lockCamera();\n\n const position = canvasCoordToCartesian(event.endPosition, viewer.scene);\n if (!position) {\n return;\n }\n const positions = [...packable.positions ?? []];\n if (dragIndex === -1) {\n dragIndex = index;\n positions.splice(index + 1, 0, position);\n }\n else {\n positions[dragIndex + 1] = position;\n }\n if (!dragging) {\n dragIndex = -1;\n }\n sampled.setSample({\n time: packable.time,\n derivative: packable.derivative,\n positions,\n });\n },\n render: ({ position, action, active }) => {\n if (!active) {\n return;\n }\n const colors = {\n [PlotAction.IDLE]: Color.GREEN.withAlpha(0.4),\n [PlotAction.HOVER]: Color.GREEN.withAlpha(0.6),\n [PlotAction.ACTIVE]: Color.GREEN.withAlpha(1.0),\n };\n return {\n position,\n point: {\n pixelSize: 6,\n color: colors[action],\n disableDepthTestDistance: Number.POSITIVE_INFINITY,\n outlineWidth: 1,\n outlineColor: Color.WHITE.withAlpha(0.4),\n },\n };\n },\n };\n}\n","import type { PlotSkeleton } from '../usePlot';\nimport { Cartesian3, Color } from 'cesium';\nimport { canvasCoordToCartesian } from 'vesium';\nimport { PlotAction } from '../usePlot';\n\n/**\n * 绘制非封闭的间隔框架点,如线段。拖拽时,会在两点之间插入一个控制点,并持续拖拽该点。\n */\nexport function intervalNonclosed(): PlotSkeleton {\n let dragIndex = -1;\n return {\n disabled: ({ active, defining }) => !active || defining,\n cursor: 'pointer',\n dragCursor: 'crosshair',\n format(packable) {\n const _positions = packable.positions ?? [];\n if (_positions.length < 2) {\n return [];\n }\n const midpoints: Cartesian3[] = [];\n for (let i = 0; i < _positions.length - 1; i++) {\n midpoints.push(Cartesian3.midpoint(_positions[i], _positions[i + 1], new Cartesian3()));\n }\n return midpoints;\n },\n onDrag({ viewer, sampled, packable, event, index, lockCamera, dragging }) {\n lockCamera();\n const position = canvasCoordToCartesian(event.endPosition, viewer.scene);\n if (!position) {\n return;\n }\n const positions = [...packable.positions ?? []];\n if (dragIndex === -1) {\n dragIndex = index;\n positions.splice(index + 1, 0, position);\n }\n else {\n positions[dragIndex + 1] = position;\n }\n if (!dragging) {\n dragIndex = -1;\n }\n sampled.setSample({\n time: packable.time,\n derivative: packable.derivative,\n positions,\n });\n },\n render: ({ position, action }) => {\n const colors = {\n [PlotAction.IDLE]: Color.GREEN.withAlpha(0.4),\n [PlotAction.HOVER]: Color.GREEN.withAlpha(0.6),\n [PlotAction.ACTIVE]: Color.GREEN.withAlpha(1.0),\n };\n return {\n position,\n point: {\n pixelSize: 6,\n color: colors[action],\n disableDepthTestDistance: Number.POSITIVE_INFINITY,\n outlineWidth: 1,\n outlineColor: Color.WHITE.withAlpha(0.4),\n },\n };\n },\n };\n}\n","import type { PlotSkeleton } from '../usePlot';\nimport { Cartesian3, Color, HorizontalOrigin, Rectangle, VerticalOrigin } from 'cesium';\nimport { canvasCoordToCartesian, toCartesian3 } from 'vesium';\nimport { PlotAction } from '../usePlot';\n\n// see https://icones.js.org/collection/tabler?s=move&icon=tabler:arrows-move\nconst svg = `data:image/svg+xml;utf8,${encodeURIComponent(\n '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" viewBox=\"0 0 24 24\"><path stroke=\"#ffffff\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m18 9l3 3l-3 3m-3-3h6M6 9l-3 3l3 3m-3-3h6m0 6l3 3l3-3m-3-3v6m3-15l-3-3l-3 3m3-3v6\"/></svg>',\n)}`;\n\n/**\n * 绘制非封闭的间隔框架点,如线段。拖拽时,会在两点之间插入一个控制点,并持续拖拽该点。\n */\nexport function moved(): PlotSkeleton {\n return {\n disabled: ({ active, defining }) => !active || defining,\n cursor: 'pointer',\n dragCursor: 'crosshair',\n format(packable) {\n const positions = packable.positions ?? [];\n if (positions.length === 0) {\n return [];\n }\n else if (positions.length === 1) {\n return [positions[0]];\n }\n else {\n const center = Rectangle.center(Rectangle.fromCartesianArray(positions));\n return [toCartesian3(center)!];\n }\n },\n onDrag({ viewer, sampled, packable, event, lockCamera, dragging }) {\n dragging && lockCamera();\n const startPosition = canvasCoordToCartesian(event.startPosition, viewer.scene);\n const endPosition = canvasCoordToCartesian(event.endPosition, viewer.scene);\n\n if (!startPosition || !endPosition) {\n return;\n }\n const offset = Cartesian3.subtract(endPosition, startPosition, new Cartesian3());\n const positions = [...packable.positions ?? []];\n\n sampled.setSample({\n time: packable.time,\n derivative: packable.derivative,\n positions: positions.map(position => Cartesian3.add(position, offset, new Cartesian3())),\n });\n },\n render: ({ position, action }) => {\n const colors = {\n [PlotAction.IDLE]: Color.WHITE,\n [PlotAction.HOVER]: Color.WHITE,\n [PlotAction.ACTIVE]: Color.AQUA.withAlpha(1.0),\n };\n return {\n position,\n billboard: {\n image: svg,\n width: 20,\n height: 20,\n color: colors[action],\n pixelOffset: new Cartesian3(0, -20),\n horizontalOrigin: HorizontalOrigin.CENTER,\n verticalOrigin: VerticalOrigin.BOTTOM,\n disableDepthTestDistance: Number.POSITIVE_INFINITY,\n },\n };\n },\n };\n}\n","import { Cartesian3, CoplanarPolygonGeometry, VertexFormat } from 'cesium';\n\n/**\n * 将多个边界点组成的面切割成多个三角形返回参数,为三角形三点的数组\n */\nexport type TesselateReturn = Array<[p0: Cartesian3, p1: Cartesian3, p2: Cartesian3]>;\n\n/**\n * 将多个边界点组成的面切割成多个三角形\n * @param positions\n */\nexport function tesselate(positions: Cartesian3[]): TesselateReturn {\n if (positions.length < 3) {\n throw new Error('positions must >= 3');\n }\n\n if (positions.length === 3) {\n return [[positions[0].clone(), positions[1].clone(), positions[2].clone()]];\n }\n\n const geometry = CoplanarPolygonGeometry.createGeometry(\n CoplanarPolygonGeometry.fromPositions({\n positions,\n vertexFormat: VertexFormat.POSITION_ONLY,\n }),\n )!;\n\n if (!geometry) {\n throw new Error('positions无法组成有效的geometry,检查点位是否错误');\n }\n const values = geometry.attributes.position!.values as number[];\n const indices = geometry.indices;\n const result: TesselateReturn = [];\n for (let i = 0; i < indices!.length; i += 3) {\n const a = Cartesian3.unpack(values, indices![i] * 3, new Cartesian3());\n const b = Cartesian3.unpack(values, indices![i + 1] * 3, new Cartesian3());\n const c = Cartesian3.unpack(values, indices![i + 2] * 3, new Cartesian3());\n result.push([a, b, c]);\n }\n return result;\n}\n","import type { Cartesian3, Scene, TerrainProvider } from 'cesium';\nimport { Cartographic, ClassificationType, Ellipsoid, sampleTerrainMostDetailed } from 'cesium';\n\nexport interface ClampToHeightMostDetailedByTilesetOrTerrainOptions {\n /**\n * 待贴地的点位\n */\n positions: Cartesian3[];\n\n scene: Scene;\n\n /**\n * 贴地类型\n * @defaultValue ClassificationType.BOTH\n */\n classificationType?: ClassificationType;\n\n /**\n * 地形数据\n * @defaultValue scene.terrainProvider\n */\n terrainProvider?: TerrainProvider;\n}\n\n/**\n * 将传入的点位列表进行贴地处理,若某个点位获取高程失败则将此进行克隆返回\n * @param options - 配置项\n */\nexport async function clampToHeightMostDetailedByTilesetOrTerrain(\n options: ClampToHeightMostDetailedByTilesetOrTerrainOptions,\n): Promise<Cartesian3[]> {\n const {\n positions,\n scene,\n classificationType = ClassificationType.BOTH,\n terrainProvider = scene.terrainProvider,\n } = options;\n\n const tileset = [ClassificationType.BOTH, ClassificationType.CESIUM_3D_TILE].includes(classificationType);\n const terrain = [ClassificationType.BOTH, ClassificationType.TERRAIN].includes(classificationType);\n\n const tilesetPromise = new Promise<Cartesian3[]>((resolve) => {\n if (tileset) {\n scene\n .clampToHeightMostDetailed(positions.map(e => e.clone()))\n .then(resolve)\n .catch((error) => {\n console.warn(error);\n resolve([]);\n });\n }\n else {\n resolve([]);\n }\n });\n const terrainPromise = new Promise<Cartographic[]>((resolve) => {\n if (terrain && terrainProvider) {\n sampleTerrainMostDetailed(\n terrainProvider,\n positions.map(e => Cartographic.fromCartesian(e)),\n )\n .then(e => resolve(e))\n .catch((error) => {\n console.warn(error);\n resolve([]);\n });\n }\n else {\n resolve([]);\n }\n });\n const [tilesetPositions, terrainPositions] = await Promise.all([tilesetPromise, terrainPromise]);\n const resluts: Cartesian3[] = [];\n\n positions.forEach((item, index) => {\n const position\n = tilesetPositions[index] || terrainPositions[index]\n ? Ellipsoid.WGS84.cartographicToCartesian(terrainPositions[index])\n : item.clone();\n resluts.push(position);\n });\n\n return resluts;\n}\n","import type { Scene, TerrainProvider } from 'cesium';\nimport { Cartesian3, ClassificationType, PerInstanceColorAppearance, PolygonGeometry, Rectangle } from 'cesium';\n\nimport { clampToHeightMostDetailedByTilesetOrTerrain } from './clampToGround';\n\n/**\n * 三角网配置\n */\nexport interface TriangleGridOptions {\n /**\n * 三角网粒度(点位间隔约为边界Rectangle生成的经纬最大值去除以密度)\n * @defaultValue 10\n */\n density: number;\n\n scene?: Scene;\n\n /**\n * 是否贴地\n */\n clampToGround?: boolean;\n\n /**\n * 贴地类型\n * @defaultValue ClassificationType.BOTH\n */\n classificationType?: ClassificationType;\n\n /**\n * 地形数据\n * @defaultValue scene.terrainProvider\n */\n terrainProvider?: TerrainProvider;\n}\n\n/**\n * 生成三角网返回参数,为三角形三点的数组\n */\nexport type TriangleGridReturn = Array<[p0: Cartesian3, p1: Cartesian3, p2: Cartesian3]>;\n\nfunction defaultOptions(original?: TriangleGridOptions): TriangleGridOptions {\n const clampToGround = original?.clampToGround ?? false;\n const classificationType = original?.classificationType ?? ClassificationType.BOTH;\n const density = Math.floor(original?.density ?? 10);\n return {\n scene: original?.scene,\n clampToGround,\n classificationType,\n terrainProvider: original?.terrainProvider,\n density,\n };\n}\n\n/**\n * 生成三角网数组\n * @param positions - 边界点数组\n * @param options - 配置项\n */\nexport async function triangleGrid(\n positions: Cartesian3[],\n options?: TriangleGridOptions,\n): Promise<TriangleGridReturn> {\n if (positions.length < 3) {\n throw new Error('positions must >= 3');\n }\n const { density, scene, clampToGround, classificationType, terrainProvider } = defaultOptions(options);\n\n if (density <= 0) {\n throw new Error('options.density must > 0');\n }\n\n // 取经纬最大值,根据此最大值计算粒度\n const bbox = Rectangle.fromCartesianArray(positions);\n const vertical = bbox.north - bbox.south;\n const horizontal = bbox.east - bbox.west;\n const max = Math.max(horizontal, vertical);\n const granularity = max / density; // 弧度粒度\n\n const polygonGeometry = PolygonGeometry.fromPositions({\n positions,\n vertexFormat: PerInstanceColorAppearance.FLAT_VERTEX_FORMAT,\n granularity,\n });\n\n const geometry = PolygonGeometry.createGeometry(polygonGeometry)!;\n const values = geometry.attributes.position!.values as number[];\n if (!geometry || !values) {\n throw new Error('positions无法组成有效的geometry,检查点位是否错误');\n }\n const indices = geometry.indices;\n\n let cartesian3List: Cartesian3[] = [];\n for (let i = 0; i < indices!.length; i += 3) {\n const a = Cartesian3.unpack(values, indices![i] * 3, new Cartesian3());\n const b = Cartesian3.unpack(values, indices![i + 1] * 3, new Cartesian3());\n const c = Cartesian3.unpack(values, indices![i + 2] * 3, new Cartesian3());\n cartesian3List.push(a, b, c);\n }\n\n if (clampToGround) {\n if (!scene) {\n throw new Error('scene is required on `clampToGround == true`.');\n }\n const detaileds = await clampToHeightMostDetailedByTilesetOrTerrain({\n scene,\n terrainProvider,\n positions: cartesian3List,\n classificationType,\n });\n cartesian3List = detaileds;\n }\n const grid: TriangleGridReturn = [];\n while (cartesian3List?.length) {\n const [a, b, c] = cartesian3List.splice(0, 3);\n grid.push([a, b, c]);\n }\n\n return grid;\n}\n","import type { Scene, TerrainProvider } from 'cesium';\nimport { Cartesian3, ClassificationType } from 'cesium';\n\nimport { tesselate } from './tesselate';\nimport { triangleGrid } from './triangleGrid';\n\n/**\n * 计算三维坐标系下三角形面积\n * @param p0 - 三角形第一个点\n * @param p1 - 三角形第二个点\n * @param p2 - 三角形第三个点\n */\nfunction triangleArea(p0: Cartesian3, p1: Cartesian3, p2: Cartesian3) {\n const v0 = Cartesian3.subtract(p0, p1, new Cartesian3());\n const v1 = Cartesian3.subtract(p2, p1, new Cartesian3());\n const cross = Cartesian3.cross(v0, v1, v0);\n return Cartesian3.magnitude(cross) * 0.5;\n}\n\nexport interface AreaOptions {\n scene?: Scene;\n\n /**\n * 是否贴地\n */\n clampToGround?: boolean;\n\n /**\n * 贴地类型\n * @defaultValue ClassificationType.BOTH\n */\n classificationType?: ClassificationType;\n\n /**\n * 地形数据\n * @defaultValue scene.terrainProvider\n */\n terrainProvider?: TerrainProvider;\n\n /**\n * 插值密度\n * @defaultValue 10\n */\n density?: number;\n}\n\nfunction defaultOptions(original?: AreaOptions): AreaOptions {\n const clampToGround = original?.clampToGround ?? false;\n const classificationType = original?.classificationType ?? ClassificationType.BOTH;\n const density = Math.floor(original?.density ?? 10);\n return {\n scene: original?.scene,\n clampToGround,\n classificationType,\n terrainProvider: original?.terrainProvider,\n density,\n };\n}\n\n/**\n * 计算三维坐标系下图形面积\n * @param positions - 图形各点的笛卡尔数组\n */\nexport async function area(positions: Cartesian3[], options?: AreaOptions): Promise<number> {\n if (positions.length < 2) {\n throw new Error('positions.length must >= 2');\n }\n\n const { density, scene, clampToGround, classificationType, terrainProvider } = defaultOptions(options);\n if (density! <= 0) {\n throw new Error('options.density must > 0');\n }\n\n if (!clampToGround) {\n const triangles = tesselate(positions);\n return triangles.reduce((count, current) => (count += triangleArea(...current)), 0);\n }\n\n const triangles = await triangleGrid(positions, {\n density: density!,\n scene,\n clampToGround,\n classificationType,\n terrainProvider,\n });\n return triangles.reduce((count, current) => (count += triangleArea(...current)), 0);\n}\n","import type { ClassificationType, Scene, TerrainProvider } from 'cesium';\nimport { Cartesian3 } from 'cesium';\n\nimport { clampToHeightMostDetailedByTilesetOrTerrain } from './clampToGround';\n\nexport interface LerpArrayOptions {\n /**\n * 起点\n */\n start: Cartesian3;\n /**\n * 终点\n */\n end: Cartesian3;\n\n /**\n * 内插值数量\n */\n count: number;\n\n scene?: Scene;\n\n /**\n * 是否贴地\n */\n clampToGround?: boolean;\n\n /**\n * 贴地类型\n * @defaultValue ClassificationType.BOTH\n */\n classificationType?: ClassificationType;\n\n /**\n * 地形数据\n * @defaultValue scene.terrainProvider\n */\n terrainProvider?: TerrainProvider;\n}\n\n/**\n * 在起点和终点间进行插值, 返回的数组包括起点和终点,数组长度为 count+1\n */\nexport async function lerpArray(options: LerpArrayOptions): Promise<Cartesian3[]> {\n const { start, end, count, scene, clampToGround, classificationType, terrainProvider } = options;\n const result: Cartesian3[] = [];\n\n for (let i = 0; i < count; i++) {\n const position = Cartesian3.lerp(start, end, 1 / count, new Cartesian3());\n result.push(position);\n }\n result.push(end.clone());\n if (!clampToGround) {\n return result;\n }\n if (!scene) {\n throw new Error('scene is required on `clampToGround == true`.');\n }\n const detaileds = await clampToHeightMostDetailedByTilesetOrTerrain({\n scene,\n terrainProvider,\n positions: result,\n classificationType,\n });\n\n return detaileds;\n}\n","import type { Scene, TerrainProvider } from 'cesium';\nimport { Cartesian3, ClassificationType } from 'cesium';\n\nimport { lerpArray } from './lerpArray';\n\n/**\n * 计算多点位之间的距离入参\n */\nexport interface DistanceOptions {\n scene?: Scene;\n\n /**\n * 是否贴地\n */\n clampToGround?: boolean;\n\n /**\n * 贴地类型\n * @defaultValue ClassificationType.BOTH\n */\n classificationType?: ClassificationType;\n\n /**\n * 地形数据\n * @defaultValue scene.terrainProvider\n */\n terrainProvider?: TerrainProvider;\n\n /**\n * 插值密度\n * @defaultValue 50\n */\n density?: number;\n}\n\n/**\n * 计算多点位之间的距离返回参数\n */\nexport interface DistanceReturn {\n /**\n * 当前点位与下一点位之间的距离(米)\n */\n stages: number[];\n\n /**\n * 所有点位之间相加的总距离(米)\n */\n count: number;\n}\n\nfunction defaultOptions(original?: DistanceOptions): DistanceOptions {\n const clampToGround = original?.clampToGround ?? false;\n const classificationType = original?.classificationType ?? ClassificationType.BOTH;\n const density = Math.floor(original?.density ?? 50);\n return {\n scene: original?.scene,\n clampToGround,\n classificationType,\n terrainProvider: original?.terrainProvider,\n density,\n };\n}\n\n/**\n * 计算多点位之间的距离\n * @param positions\n */\nexport async function distance(positions: Cartesian3[], options?: DistanceOptions): Promise<DistanceReturn> {\n if (positions.length < 2) {\n throw new Error('positions.length must >= 2');\n }\n const _options = defaultOptions(options);\n\n const stages: number[] = [];\n let count = 0;\n positions.forEach((position, index) => {\n if (index !== positions.length - 1) {\n const next = positions[index + 1];\n const distance = Cartesian3.distance(position, next);\n stages.push(distance);\n count += distance;\n }\n });\n\n // 不贴地\n if (!_options.clampToGround) {\n return {\n stages,\n count,\n };\n }\n\n // 贴地\n const density = _options.density!;\n if (density <= 0) {\n throw new Error('options.density must > 0');\n }\n\n // 按每段长度占总长度的比例分配插值数量\n const densities = stages.map((stage) => {\n return Math.floor((stage / count) * density);\n });\n // 出现未分配的插值数量则分配给最后一项\n const diff = density - densities.reduce((count, current) => (count += current), 0);\n if (diff) {\n densities[densities.length - 1] += diff;\n }\n\n const positionListPromises = densities.map((density, i) => {\n return lerpArray({\n scene: _options.scene,\n start: positions[i],\n end: positions[i + 1],\n count: density,\n clampToGround: true,\n classificationType: _options.classificationType,\n terrainProvider: _options.terrainProvider,\n });\n });\n const detaileds = await Promise.all(positionListPromises);\n\n const stagePromises = detaileds.map(async (positions) => {\n const { count } = await distance(positions);\n return count;\n });\n\n const groundStages = await Promise.all(stagePromises);\n\n return {\n stages: groundStages,\n count: groundStages.reduce((count, current) => (count += current), 0),\n };\n}\n","import { CallbackProperty, Color, ConstantPositionProperty, ConstantProperty, Entity, PolygonHierarchy, Rectangle } from 'cesium';\nimport { toCartesian3 } from 'vesium';\nimport { control, interval } from '../skeleton';\nimport { PlotScheme } from '../usePlot';\nimport { area } from './utils';\n\nexport const schemeMeasureArea = new PlotScheme({\n type: 'MeasureArea',\n allowManualComplete: packable => packable.positions!.length >= 3,\n skeletons: [\n control,\n interval,\n ],\n\n initRender() {\n return {\n entities: [\n new Entity({\n label: {\n font: '14pt',\n },\n polyline: {\n material: Color.YELLOW.withAlpha(0.5),\n },\n polygon: {\n material: Color.YELLOW.withAlpha(0.5),\n },\n }),\n ],\n };\n },\n render(context) {\n const entity = context.previous.entities![0]!;\n const { mouse, packable } = context;\n\n const positions = [...packable.positions ?? []];\n mouse && positions.push(mouse);\n\n if (positions.length === 2) {\n entity.position = undefined;\n entity.label!.text = undefined;\n entity.polygon!.hierarchy = undefined;\n entity.polyline!.positions = new CallbackProperty(() => positions, false);\n }\n else if (positions.length >= 3) {\n positions.push(positions[0]);\n entity.position = new ConstantPositionProperty(\n toCartesian3(Rectangle.center(Rectangle.fromCartesianArray(positions))),\n );\n entity.label!.text = new ConstantProperty('');\n\n area(positions).then((e) => {\n let text: string = '';\n if (e / 1000 / 1000 > 10) {\n text = `${(e / 1000 / 1000).toFixed(2)}km²`;\n }\n else {\n text = `${(+e).toFixed(2)}m²`;\n }\n entity.label!.text = new ConstantProperty(text);\n });\n entity.polyline!.positions = undefined;\n entity.polygon!.hierarchy = new CallbackProperty(() => {\n return positions.length >= 3 ? new PolygonHierarchy([...positions]) : undefined;\n }, false);\n }\n else {\n entity.position = undefined;\n entity.polygon!.hierarchy = undefined;\n entity.polyline!.positions = undefined;\n }\n return {\n entities: [entity],\n };\n },\n});\n","import { CallbackPositionProperty, CallbackProperty, Cartesian3, Color, Entity, LabelGraphics, PolylineGraphics } from 'cesium';\nimport { control } from '../skeleton';\nimport { PlotScheme } from '../usePlot';\nimport { distance } from './utils';\n\nexport const schemeMeasureDistance = new PlotScheme({\n type: 'MeasureDistance',\n allowManualComplete: packable => packable.positions!.length >= 2,\n skeletons: [\n control,\n ],\n initRender() {\n return {\n entities: [\n new Entity({\n polyline: {\n width: 2,\n material: Color.YELLOW.withAlpha(0.5),\n },\n }),\n ],\n };\n },\n render(context) {\n const entity = context.previous.entities![0]!;\n const { mouse, packable, previous } = context;\n\n const entities = previous.entities!;\n\n const positions = [...packable.positions ?? []];\n mouse && positions.push(mouse);\n\n if (positions.length < 2) {\n return {\n entities,\n };\n }\n\n const pl = entities[0]!;\n\n pl.polyline ??= new PolylineGraphics();\n pl.polyline!.positions = new CallbackProperty(() => positions, false);\n\n positions.forEach((item, index) => {\n if (!entities[index + 1]) {\n entities[index + 1] = new Entity({\n position: item,\n label: new LabelGraphics({\n backgroundColor: Color.fromCssColorString('#fff'),\n font: '12pt sans-serif',\n\n }),\n });\n }\n });\n\n entities.splice(positions.length, entities.length - positions.length - 1);\n\n distance(positions).then(({ count, stages }) => {\n stages.forEach((stage, index) => {\n entities[index + 1]!.position = new CallbackPositionProperty(() => Cartesian3.midpoint(positions[index], positions[index + 1], new Cartesian3()), false);\n entities[index + 1]!.label!.text = new CallbackProperty(() => `${stage.toFixed(2)} m`, false);\n });\n if (stages.length > 1) {\n entities[entities.length - 1]!.position = new CallbackPositionProperty(() => positions[positions.length - 1], false);\n entities[entities.length - 1]!.label!.text = new CallbackProperty(() => `${count.toFixed(2)} m`, false);\n }\n else {\n entities[entities.length - 1]!.position = undefined;\n entities[entities.length - 1]!.label!.text = undefined;\n }\n });\n\n return {\n entities,\n };\n return {\n entities: [entity],\n };\n },\n});\n","import { CallbackPositionProperty, Entity } from 'cesium';\nimport { moved } from '../skeleton';\n\n/**\n * billboard标绘配置\n */\nimport { PlotScheme } from '../usePlot';\n\nexport const PlotSchemeBillboard = new PlotScheme({\n type: 'Billboard',\n complete: packable => packable.positions!.length >= 1,\n skeletons: [\n moved,\n ],\n initRender: () => {\n return { entities: [new Entity({ billboard: { image: '/favicon.svg', width: 32, height: 32 } })] };\n },\n render(options) {\n const { mouse, packable } = options;\n const entity = options.previous.entities?.[0] ?? new Entity({ billboard: { } });\n const position = packable.positions?.[0] ?? mouse;\n entity.position = new CallbackPositionProperty(() => position, true);\n\n return {\n entities: [entity],\n };\n },\n});\n","import { CallbackPositionProperty, Entity } from 'cesium';\nimport { moved } from '../skeleton';\n\n/**\n * billboard-pin-builder标绘配置\n */\nimport { PlotScheme } from '../usePlot';\n\nexport const PlotSchemeBillboardPinBuilder = new PlotScheme({\n type: 'BillboardPinBuilder',\n complete: packable => packable.positions!.length >= 1,\n skeletons: [\n moved,\n ],\n initRender() {\n return {\n entities: [new Entity({ billboard: {} })],\n };\n },\n render(context) {\n const entity = context.previous.entities![0]!;\n const position = context.packable.positions[0] ?? context.mouse!;\n entity.position = new CallbackPositionProperty(() => position, true);\n return {\n entities: [entity],\n };\n },\n});\n","import { CallbackProperty, Cartesian3, ConstantPositionProperty, Entity } from 'cesium';\n\n/**\n * cylinder标绘配置\n */\nimport { toProperty, toPropertyValue } from 'vesium';\n\nimport { control, moved } from '../skeleton';\nimport { PlotScheme } from '../usePlot';\n\nexport const PlotSchemeCylinder = new PlotScheme({\n type: 'Cylinder',\n complete: packable => packable.positions!.length >= 2,\n skeletons: [\n moved,\n control,\n ],\n initRender() {\n return {\n entities: [\n new Entity({\n cylinder: {},\n }),\n ],\n };\n },\n render(context) {\n const entity = context.previous.entities![0]!;\n const positions = [...context.packable.positions];\n if (positions.length === 0) {\n return context.previous;\n }\n\n if (positions.length === 1) {\n const position = context.mouse;\n position && positions.push(position);\n }\n if (positions.length < 2) {\n return context.previous;\n }\n entity.position = new ConstantPositionProperty(positions[0]);\n const radius = Cartesian3.distance(positions[0], positions[1]);\n entity.cylinder!.bottomRadius = new CallbackProperty(() => radius, false);\n if (context.defining || !toPropertyValue(entity.cylinder!.length)) {\n entity.cylinder!.length = toProperty(radius * 2);\n }\n return {\n entities: [entity],\n };\n },\n});\n","/**\n * ellipse标绘配置 圆形扩散波\n */\nimport { CallbackProperty, Cartesian3, ConstantPositionProperty, Entity } from 'cesium';\n\nimport { control, moved } from '../skeleton';\nimport { PlotScheme } from '../usePlot';\n\nexport const PlotSchemeEllipse = new PlotScheme({\n type: 'Ellipse',\n complete: packable => packable.positions!.length >= 2,\n skeletons: [\n moved,\n control,\n ],\n initRender() {\n return {\n entities: [new Entity({ ellipse: {} })],\n };\n },\n render(context) {\n const entity = context.previous.entities![0]!;\n const positions = [...context.packable.positions];\n if (positions.length === 0) {\n return context.previous;\n }\n if (positions.length === 1) {\n const position = context.mouse;\n position && positions.push(position);\n }\n if (positions.length < 2) {\n return context.previous;\n }\n entity.position = new ConstantPositionProperty(positions[0]);\n const radius = Cartesian3.distance(positions[0], positions[1]);\n entity.ellipse!.semiMinorAxis = new CallbackProperty(() => radius || 1, false);\n entity.ellipse!.semiMajorAxis = entity.ellipse!.semiMinorAxis;\n\n return {\n entities: [entity],\n };\n },\n});\n","import { CallbackPositionProperty, Entity } from 'cesium';\nimport { moved } from '../skeleton';\n\n/**\n * 基础label标绘配置\n */\nimport { PlotScheme } from '../usePlot';\n\nexport const PlotSchemeLabel = new PlotScheme({\n type: 'Label',\n complete: packable => packable.positions!.length >= 1,\n skeletons: [\n moved,\n ],\n initRender() {\n return {\n entities: [new Entity({ label: { text: 'Label' } })],\n };\n },\n render(context) {\n const entity = context.previous.entities![0]!;\n const position = context.packable.positions[0] ?? context.mouse!;\n entity.position = new CallbackPositionProperty(() => position, true);\n return {\n entities: [entity],\n };\n },\n});\n","import { CallbackPositionProperty, Color, Entity } from 'cesium';\nimport { moved } from '../skeleton';\n\n/**\n * 基础point标绘配置\n */\nimport { PlotScheme } from '../usePlot';\n\nexport const PlotSchemePoint = new PlotScheme({\n type: 'Point',\n complete: packable => packable.positions!.length >= 1,\n skeletons: [\n moved,\n ],\n initRender() {\n return {\n entities: [new Entity({ point: { pixelSize: 10, color: Color.RED } })],\n };\n },\n render(context) {\n const entity = context.previous.entities![0]!;\n const position = context.packable.positions[0] ?? context.mouse!;\n entity.position = new CallbackPositionProperty(() => position, true);\n return {\n entities: [entity],\n };\n },\n});\n","import { CallbackProperty, Entity, PolygonHierarchy } from 'cesium';\n\nimport { control, interval, moved } from '../skeleton';\n/**\n * 基础Polygon标绘配置\n */\nimport { PlotScheme } from '../usePlot';\n\nexport const PlotSchemePolygon = new PlotScheme({\n type: 'Polygon',\n allowManualComplete: packable => packable.positions!.length >= 2,\n skeletons: [\n moved,\n control,\n interval,\n ],\n initRender: () => {\n return {\n entities: [new Entity({ polyline: {}, polygon: {} })],\n };\n },\n render(options) {\n const { mouse, packable } = options;\n const entity = options.previous.entities![0];\n const positions = [...packable.positions ?? []];\n mouse && positions.push(mouse);\n\n if (positions.length === 2) {\n entity.polygon!.hierarchy = undefined;\n entity.polyline!.positions = new CallbackProperty(() => positions, false);\n }\n else if (positions.length >= 3) {\n entity.polyline!.positions = undefined;\n entity.polygon!.hierarchy = new CallbackProperty(() => {\n positions.push(positions[0]);\n return positions.length >= 3 ? new PolygonHierarchy([...positions]) : undefined;\n }, false);\n }\n else {\n entity.polygon!.hierarchy = undefined;\n entity.polyline!.positions = undefined;\n }\n\n return {\n entities: [entity],\n };\n },\n});\n","import type { CoordArray } from 'vesium';\n\nexport const FITTING_COUNT = 100;\nexport const HALF_PI = Math.PI / 2;\nexport const ZERO_TOLERANCE = 0.0001;\nexport const TWO_PI = Math.PI * 2;\n\n/**\n * 计算两个坐标之间的距离\n * @param coord1\n * @param coord2\n */\nexport function mathDistance(coord1: CoordArray, coord2: CoordArray): number {\n return Math.hypot(coord1[0] - coord2[0], coord1[1] - coord2[1]);\n}\n\n/**\n * 计算点集合的总距离\n * @param points\n */\nexport function wholeDistance(points: CoordArray[]): number {\n let distance = 0;\n if (points && Array.isArray(points) && points.length > 0) {\n points.forEach((item, index) => {\n if (index < points.length - 1) {\n distance += mathDistance(item, points[index + 1]);\n }\n });\n }\n return distance;\n}\n/**\n * 获取基础长度\n * @param points\n */\nexport const getBaseLength = (points: CoordArray[]): number => wholeDistance(points) ** 0.99;\n\n/**\n * 求取两个坐标的中间坐标\n * @param coord1\n * @param coord2\n */\nexport function mid(coord1: CoordArray, coord2: CoordArray): CoordArray {\n return [\n (coord1[0] + coord2[0]) / 2,\n (coord1[1] + coord2[1]) / 2,\n ];\n}\n\n/**\n * 通过三个点确定一个圆的中心点\n * @param coord1\n * @param coord2\n * @param coord3\n */\nexport function getCircleCenterOfThreeCoords(coord1: CoordArray, coord2: CoordArray, coord3: CoordArray): CoordArray {\n const coordA = [(coord1[0] + coord2[0]) / 2, (coord1[1] + coord2[1]) / 2] as CoordArray;\n const coordB = [coordA[0] - coord1[1] + coord2[1], coordA[1] + coord1[0] - coord2[0]] as CoordArray;\n const coordC = [(coord1[0] + coord3[0]) / 2, (coord1[1] + coord3[1]) / 2] as CoordArray;\n const coordD = [coordC[0] - coord1[1] + coord3[1], coordC[1] + coord1[0] - coord3[0]] as CoordArray;\n return getIntersectCoord(coordA, coordB, coordC, coordD);\n}\n\n/**\n * 获取交集的点\n * @param coordA\n * @param coordB\n * @param coordC\n * @param coordD\n */\nexport function getIntersectCoord(coordA: CoordArray, coordB: CoordArray, coordC: CoordArray, coordD: CoordArray): CoordArray {\n if (coordA[1] === coordB[1]) {\n const f = (coordD[0] - coordC[0]) / (coordD[1] - coordC[1]);\n const x = f * (coordA[1] - coordC[1]) + coordC[0];\n const y = coordA[1];\n return [x, y];\n }\n if (coordC[1] === coordD[1]) {\n const e = (coordB[0] - coordA[0]) / (coordB[1] - coordA[1]);\n const x = e * (coordC[1] - coordA[1]) + coordA[0];\n const y = coordC[1];\n return [x, y];\n }\n const e = (coordB[0] - coordA[0]) / (coordB[1] - coordA[1]);\n const f = (coordD[0] - coordC[0]) / (coordD[1] - coordC[1]);\n const y = (e * coordA[1] - coordA[0] - f * coordC[1] + coordC[0]) / (e - f);\n const x = e * y - e * coordA[1] + coordA[0];\n return [x, y];\n}\n\n/**\n * 获取方位角(地平经度)\n * @param startCoord\n * @param endCoord\n */\nexport function getAzimuth(startCoord: CoordArray, endCoord: CoordArray): number {\n let azimuth = 0;\n const angle = Math.asin(Math.abs(endCoord[1] - startCoord[1]) / mathDistance(startCoord, endCoord));\n if (endCoord[1] >= startCoord[1] && endCoord[0] >= startCoord[0]) {\n azimuth = angle + Math.PI;\n }\n else if (endCoord[1] >= startCoord[1] && endCoord[0] < startCoord[0]) {\n azimuth = Math.PI * 2 - angle;\n }\n else if (endCoord[1] < startCoord[1] && endCoord[0] < startCoord[0]) {\n azimuth = angle;\n }\n else if (endCoord[1] < startCoord[1] && endCoord[0] >= startCoord[0]) {\n azimuth = Math.PI - angle;\n }\n return azimuth;\n}\n\n/**\n * 通过三个点获取方位角\n * @param coordA\n * @param coordB\n * @param coordC\n */\nexport function getAngleOfThreeCoords(coordA: CoordArray, coordB: CoordArray, coordC: CoordArray): number {\n const angle = getAzimuth(coordB, coordA) - getAzimuth(coordB, coordC);\n return angle < 0 ? angle + Math.PI * 2 : angle;\n}\n\n/**\n * 判断是否是顺时针\n * @param coord1\n * @param coord2\n * @param coord3\n */\nexport function isClockWise(coord1: CoordArray, coord2: CoordArray, coord3: CoordArray): boolean {\n return (coord3[1] - coord1[1]) * (coord2[0] - coord1[0]) > (coord2[1] - coord1[1]) * (coord3[0] - coord1[0]);\n}\n\n/**\n * 获取线上的点\n * @param t\n * @param startCoord\n * @param endCoord\n */\nexport function getCoordOnLine(t: number, startCoord: CoordArray, endCoord: CoordArray): CoordArray {\n const x = startCoord[0] + t * (endCoord[0] - startCoord[0]);\n const y = startCoord[1] + t * (endCoord[1] - startCoord[1]);\n return [x, y];\n}\n\n/**\n * 获取立方值\n */\nexport function getCubicValue(\n t: number,\n startCoord: CoordArray,\n coord1: CoordArray,\n coord2: CoordArray,\n endCoord: CoordArray,\n): CoordArray {\n t = Math.max(Math.min(t, 1), 0);\n const [tp, t2] = [1 - t, t * t];\n const t3 = t2 * t;\n const tp2 = tp * tp;\n const tp3 = tp2 * tp;\n const x = tp3 * startCoord[0] + 3 * tp2 * t * coord1[0] + 3 * tp * t2 * coord2[0] + t3 * endCoord[0];\n const y = tp3 * startCoord[1] + 3 * tp2 * t * coord1[1] + 3 * tp * t2 * coord2[1] + t3 * endCoord[1];\n return [x, y];\n}\n\n/**\n * 根据起止点和旋转方向求取第三个点\n * @param startCoord\n * @param endCoord\n * @param angle\n * @param distance\n * @param clockWise\n */\nexport function getThirdCoord(startCoord: CoordArray, endCoord: CoordArray, angle: number, distance: number, clockWise?: boolean): CoordArray {\n const azimuth = getAzimuth(startCoord, endCoord);\n const alpha = clockWise ? azimuth + angle : azimuth - angle;\n const dx = distance * Math.cos(alpha);\n const dy = distance * Math.sin(alpha);\n return [endCoord[0] + dx, endCoord[1] + dy];\n}\n\n/**\n * 插值弓形线段点\n * @param center\n * @param radius\n * @param startAngle\n * @param endAngle\n */\nexport function getArcCoords(center: CoordArray, radius: number, startAngle: number, endAngle: number): CoordArray[] {\n let [x, y, coords, angleDiff]: [number, number, CoordArray[], number] = [0, 0, [], endAngle - startAngle];\n angleDiff = angleDiff < 0 ? angleDiff + Math.PI * 2 : angleDiff;\n for (let i = 0; i <= 100; i++) {\n const angle = startAngle + (angleDiff * i) / 100;\n x = center[0] + radius * Math.cos(angle);\n y = center[1] + radius * Math.sin(angle);\n coords.push([x, y]);\n }\n return coords;\n}\n\n/**\n * getBisectorNormals\n * @param t\n * @param coord1\n * @param coord2\n * @param coord3\n */\nexport function getBisectorNormals(t: number, coord1: CoordArray, coord2: CoordArray, coord3: CoordArray): CoordArray[] {\n const normal = getNormal(coord1, coord2, coord3);\n let [bisectorNormalRight, bisectorNormalLeft, dt, x, y]: [CoordArray, CoordArray, number, number, number] = [\n [0, 0],\n [0, 0],\n 0,\n 0,\n 0,\n ];\n const dist = Math.hypot(normal[0], normal[1]);\n const uX = normal[0] / dist;\n const uY = normal[1] / dist;\n const d1 = mathDistance(coord1, coord2);\n const d2 = mathDistance(coord2, coord3);\n if (dist > ZERO_TOLERANCE) {\n if (isClockWise(coord1, coord2, coord3)) {\n dt = t * d1;\n x = coord2[0] - dt * uY;\n y = coord2[1] + dt * uX;\n bisectorNormalRight = [x, y];\n dt = t * d2;\n x = coord2[0] + dt * uY;\n y = coord2[1] - dt * uX;\n bisectorNormalLeft = [x, y];\n }\n else {\n dt = t * d1;\n x = coord2[0] + dt * uY;\n y = coord2[1] - dt * uX;\n bisectorNormalRight = [x, y];\n dt = t * d2;\n x = coord2[0] - dt * uY;\n y = coord2[1] + dt * uX;\n bisectorNormalLeft = [x, y];\n }\n }\n else {\n x = coord2[0] + t * (coord1[0] - coord2[0]);\n y = coord2[1] + t * (coord1[1] - coord2[1]);\n bisectorNormalRight = [x, y];\n x = coord2[0] + t * (coord3[0] - coord2[0]);\n y = coord2[1] + t * (coord3[1] - coord2[1]);\n bisectorNormalLeft = [x, y];\n }\n return [bisectorNormalRight, bisectorNormalLeft];\n}\n\n/**\n * 获取默认三点的内切圆\n * @param coord1\n * @param coord2\n * @param coord3\n */\nexport function getNormal(coord1: CoordArray, coord2: CoordArray, coord3: CoordArray): CoordArray {\n let dX1 = coord1[0] - coord2[0];\n let dY1 = coord1[1] - coord2[1];\n const d1 = Math.hypot(dX1, dY1);\n dX1 /= d1;\n dY1 /= d1;\n let dX2 = coord3[0] - coord2[0];\n let dY2 = coord3[1] - coord2[1];\n const d2 = Math.hypot(dX2, dY2);\n dX2 /= d2;\n dY2 /= d2;\n const uX = dX1 + dX2;\n const uY = dY1 + dY2;\n return [uX, uY];\n}\n\n/**\n * 获取左边控制点\n * @param controlCoords\n * @param t\n */\nexport function getLeftMostControlCoord(controlCoords: CoordArray[], t: number): CoordArray {\n let [coord1, coord2, coord3, controlX, controlY]: [CoordArray, CoordArray, CoordArray, number, number] = [\n controlCoords[0],\n controlCoords[1],\n controlCoords[2],\n 0,\n 0,\n ];\n const coords = getBisectorNormals(0, coord1, coord2, coord3);\n const normalRight = coords[0];\n const normal = getNormal(coord1, coord2, coord3);\n const dist = Math.hypot(normal[0], normal[1]);\n if (dist > ZERO_TOLERANCE) {\n const midCoord = mid(coord1, coord2);\n const pX = coord1[0] - midCoord[0];\n const pY = coord1[1] - midCoord[1];\n const d1 = mathDistance(coord1, coord2);\n const n = 2 / d1;\n const nX = -n * pY;\n const nY = n * pX;\n const a11 = nX * nX - nY * nY;\n const a12 = 2 * nX * nY;\n const a22 = nY * nY - nX * nX;\n const dX = normalRight[0] - midCoord[0];\n const dY = normalRight[1] - midCoord[1];\n controlX = midCoord[0] + a11 * dX + a12 * dY;\n controlY = midCoord[1] + a12 * dX + a22 * dY;\n }\n else {\n controlX = coord1[0] + t * (coord2[0] - coord1[0]);\n controlY = coord1[1] + t * (coord2[1] - coord1[1]);\n }\n return [controlX, controlY];\n}\n\n/**\n * 获取右边控制点\n * @param controlCoords\n * @param t\n */\nexport function getRightMostControlCoord(controlCoords: CoordArray[], t: number): CoordArray {\n const coordlength = controlCoords.length;\n const coord1 = controlCoords[coordlength - 3];\n const coord2 = controlCoords[coordlength - 2];\n const coord3 = controlCoords[coordlength - 1];\n const coords = getBisectorNormals(0, coord1, coord2, coord3);\n const normalLeft = coords[1];\n const normal = getNormal(coord1, coord2, coord3);\n const dist = Math.hypot(normal[0], normal[1]);\n let [controlX, controlY] = [0, 0];\n if (dist > ZERO_TOLERANCE) {\n const midCoord = mid(coord2, coord3);\n const pX = coord3[0] - midCoord[0];\n const pY = coord3[1] - midCoord[1];\n const d1 = mathDistance(coord2, coord3);\n const n = 2 / d1;\n const nX = -n * pY;\n const nY = n * pX;\n const a11 = nX * nX - nY * nY;\n const a12 = 2 * nX * nY;\n const a22 = nY * nY - nX * nX;\n const dX = normalLeft[0] - midCoord[0];\n const dY = normalLeft[1] - midCoord[1];\n controlX = midCoord[0] + a11 * dX + a12 * dY;\n controlY = midCoord[1] + a12 * dX + a22 * dY;\n }\n else {\n controlX = coord3[0] + t * (coord2[0] - coord3[0]);\n controlY = coord3[1] + t * (coord2[1] - coord3[1]);\n }\n return [controlX, controlY];\n}\n\n/**\n * 插值曲线点\n * @param t\n * @param controlCoords\n */\nexport function getCurveCoords(t: number, controlCoords: CoordArray[]): CoordArray[] {\n let normals = [getLeftMostControlCoord(controlCoords, t)];\n const coords: CoordArray[] = [];\n let coord1: CoordArray, coord2: CoordArray, coord3: CoordArray;\n\n for (let i = 0; i < controlCoords.length - 2; i++) {\n [coord1, coord2, coord3] = [controlCoords[i], controlCoords[i + 1], controlCoords[i + 2]];\n const normalCoords = getBisectorNormals(t, coord1, coord2, coord3);\n normals = normals.concat(normalCoords);\n }\n const rightControl = getRightMostControlCoord(controlCoords, t);\n if (rightControl) {\n normals.push(rightControl);\n }\n for (let i = 0; i < controlCoords.length - 1; i++) {\n coord1 = controlCoords[i];\n coord2 = controlCoords[i + 1];\n coords.push(coord1);\n for (let j = 0; j < FITTING_COUNT; j++) {\n const coord = getCubicValue(j / FITTING_COUNT, coord1, normals[i * 2], normals[i * 2 + 1], coord2);\n coords.push(coord);\n }\n coords.push(coord2);\n }\n return coords;\n}\n\n/**\n * 贝塞尔曲线\n * @param points\n */\nexport function getBezierCoords(points: CoordArray[]): CoordArray[] {\n if (points.length <= 2) {\n return points;\n }\n const bezierCoords: CoordArray[] = [];\n const n = points.length - 1;\n for (let t = 0; t <= 1; t += 0.01) {\n let [x, y] = [0, 0];\n for (let index = 0; index <= n; index++) {\n const factor = getBinomialFactor(n, index);\n const a = t ** index;\n const b = (1 - t) ** (n - index);\n x += factor * a * b * points[index][0];\n y += factor * a * b * points[index][1];\n }\n bezierCoords.push([x, y]);\n }\n bezierCoords.push(points[n]);\n return bezierCoords;\n}\n\n/**\n * 获取阶乘数据\n * @param n\n */\nexport function getFactorial(n: number): number {\n let result = 1;\n switch (true) {\n case n <= 1:\n result = 1;\n break;\n case n === 2:\n result = 2;\n break;\n case n === 3:\n result = 6;\n break;\n case n === 24:\n result = 24;\n break;\n case n === 5:\n result = 120;\n break;\n default:\n for (let i = 1; i <= n; i++) {\n result *= i;\n }\n break;\n }\n return result;\n}\n\n/**\n * 获取二项分布\n * @param n\n * @param index\n */\nexport function getBinomialFactor(n: number, index: number): number {\n return getFactorial(n) / (getFactorial(index) * getFactorial(n - index));\n}\n\n/**\n * 插值线性点\n * @param points\n */\nexport function getQBSplineCoords(points: CoordArray[]): CoordArray[] {\n if (points.length <= 2) {\n return points;\n }\n const [n, bSplineCoords]: [number, CoordArray[]] = [2, []];\n const m = points.length - n - 1;\n bSplineCoords.push(points[0]);\n for (let i = 0; i <= m; i++) {\n for (let t = 0; t <= 1; t += 0.05) {\n let [x, y] = [0, 0];\n for (let k = 0; k <= n; k++) {\n const factor = getQuadricBSplineFactor(k, t);\n x += factor * points[i + k][0];\n y += factor * points[i + k][1];\n }\n bSplineCoords.push([x, y]);\n }\n }\n bSplineCoords.push(points.at(-1)!);\n return bSplineCoords;\n}\n\n/**\n * 得到二次线性因子\n * @param k\n * @param t\n */\nexport function getQuadricBSplineFactor(k: number, t: number): number {\n let res = 0;\n if (k === 0) {\n res = (t - 1) ** 2 / 2;\n }\n else if (k === 1) {\n res = (-2 * t ** 2 + 2 * t + 1) / 2;\n }\n else if (k === 2) {\n res = t ** 2 / 2;\n }\n return res;\n}\n","import type { CoordArray } from 'vesium';\n\nimport { getArcCoords, getAzimuth, getCircleCenterOfThreeCoords, isClockWise, mathDistance } from './helper';\n\n/**\n * 标绘画弓形算法,继承线要素相关方法和属性\n */\nexport function arc(coords: CoordArray[]): CoordArray[] {\n const coordlength = coords.length;\n\n if (coordlength <= 2) {\n throw new Error('coords.length must >= 3');\n }\n else {\n let [coord1, coord2, coord3, startAngle, endAngle] = [coords[0], coords[1], coords[2], 0, 0];\n const center = getCircleCenterOfThreeCoords(coord1, coord2, coord3);\n const radius = mathDistance(coord1, center);\n const angle1 = getAzimuth(coord1, center);\n const angle2 = getAzimuth(coord2, center);\n if (isClockWise(coord1, coord2, coord3)) {\n startAngle = angle2;\n endAngle = angle1;\n }\n else {\n startAngle = angle1;\n endAngle = angle2;\n }\n return getArcCoords(center, radius, startAngle, endAngle);\n }\n}\n","import type { CoordArray } from 'vesium';\n\nimport {\n getAngleOfThreeCoords,\n getBaseLength,\n getQBSplineCoords,\n getThirdCoord,\n HALF_PI,\n isClockWise,\n mathDistance,\n mid,\n wholeDistance,\n} from './helper';\n\nexport interface AttackArrowOptions {\n headWidthFactor?: number;\n headHeightFactor?: number;\n neckWidthFactor?: number;\n neckHeightFactor?: number;\n tailWidthFactor?: number;\n headTailFactor?: number;\n swallowTailFactor?: number;\n swallowTailCoord?: CoordArray;\n}\n/**\n * 尖曲箭头\n */\nexport function arrowAttackDirection(coords: CoordArray[], options: AttackArrowOptions = {}): CoordArray[] {\n const coordLength = coords.length;\n if (coordLength < 3) {\n throw new Error('coords.length must >= 3');\n }\n else {\n let [tailLeft, tailRight] = [coords[0], coords[1]];\n if (isClockWise(coords[0], coords[1], coords[2])) {\n tailLeft = coords[1];\n tailRight = coords[0];\n }\n const midTail = mid(tailLeft, tailRight);\n const boneCoords = [midTail].concat(coords.slice(2));\n const headCoords = getArrowHeadCoords(boneCoords, {\n tailLeft,\n tailRight,\n ...options,\n });\n if (headCoords && headCoords.length > 4) {\n const [neckLeft, neckRight] = [headCoords[0], headCoords[4]];\n const tailWidthFactor = mathDistance(tailLeft, tailRight) / getBaseLength(boneCoords);\n const bodyCoords = getArrowBodyCoords(boneCoords, neckLeft, neckRight, tailWidthFactor);\n const coordlength = bodyCoords.length;\n let leftCoords = [tailLeft].concat(bodyCoords.slice(0, coordlength / 2));\n leftCoords.push(neckLeft);\n let rightCoords = [tailRight].concat(bodyCoords.slice(coordlength / 2, coordlength));\n rightCoords.push(neckRight);\n leftCoords = getQBSplineCoords(leftCoords);\n rightCoords = getQBSplineCoords(rightCoords);\n return leftCoords.concat(headCoords, rightCoords.reverse());\n }\n else {\n return [];\n }\n }\n}\n\nexport interface GetArrowCoordsOptions {\n tailLeft?: CoordArray;\n tailRight?: CoordArray;\n headHeightFactor?: number;\n headTailFactor?: number;\n headWidthFactor?: number;\n neckWidthFactor?: number;\n neckHeightFactor?: number;\n}\n\n/**\n * 插值箭形上的点\n * @param coord1\n * @param coord2\n * @param coord3\n * @param clockWise\n */\nexport function getArrowCoords(\n coord1: CoordArray,\n coord2: CoordArray,\n coord3: CoordArray,\n clockWise: boolean,\n options: GetArrowCoordsOptions = {},\n): CoordArray[] | undefined {\n const midCoord = mid(coord1, coord2);\n const len = mathDistance(midCoord, coord3);\n let midCoord1 = getThirdCoord(coord3, midCoord, 0, len * 0.3, true);\n let midCoord2 = getThirdCoord(coord3, midCoord, 0, len * 0.5, true);\n midCoord1 = getThirdCoord(midCoord, midCoord1, HALF_PI, len / 5, clockWise);\n midCoord2 = getThirdCoord(midCoord, midCoord2, HALF_PI, len / 4, clockWise);\n const points = [midCoord, midCoord1, midCoord2, coord3];\n const arrowCoords = getArrowHeadCoords(points, options);\n if (arrowCoords && Array.isArray(arrowCoords) && arrowCoords.length > 0) {\n const [neckLeftCoord, neckRightCoord] = [arrowCoords[0], arrowCoords[4]];\n const tailWidthFactor = mathDistance(coord1, coord2) / getBaseLength(points) / 2;\n const bodyCoords = getArrowBodyCoords(points, neckLeftCoord, neckRightCoord, tailWidthFactor);\n if (bodyCoords) {\n const n = bodyCoords.length;\n let lCoords = bodyCoords.slice(0, n / 2);\n let rCoords = bodyCoords.slice(n / 2, n);\n lCoords.push(neckLeftCoord);\n rCoords.push(neckRightCoord);\n lCoords = lCoords.reverse();\n lCoords.push(coord2);\n rCoords = rCoords.reverse();\n rCoords.push(coord1);\n return lCoords.reverse().concat(arrowCoords, rCoords);\n }\n }\n else {\n throw new Error('插值出错');\n }\n}\n\nexport interface GetArrowHeadCoordsOptions {\n tailLeft?: CoordArray;\n tailRight?: CoordArray;\n headHeightFactor?: number;\n headTailFactor?: number;\n headWidthFactor?: number;\n neckWidthFactor?: number;\n neckHeightFactor?: number;\n}\n\n/**\n * 插值头部点\n */\nexport function getArrowHeadCoords(points: CoordArray[], options: GetArrowHeadCoordsOptions): CoordArray[] {\n const {\n tailLeft,\n tailRight,\n headHeightFactor = 0.18,\n headWidthFactor = 0.3,\n neckHeightFactor = 0.85,\n neckWidthFactor = 0.15,\n headTailFactor = 0.8,\n } = options;\n\n let len = getBaseLength(points);\n let headHeight = len * headHeightFactor;\n const headCoord = points.at(-1)!;\n len = mathDistance(headCoord, points.at(-2)!);\n let tailWidth = 0;\n if (tailLeft && tailRight) {\n tailWidth = mathDistance(tailLeft, tailRight);\n }\n if (headHeight > tailWidth * headTailFactor) {\n headHeight = tailWidth * headTailFactor;\n }\n const headWidth = headHeight * headWidthFactor;\n const neckWidth = headHeight * neckWidthFactor;\n headHeight = Math.min(headHeight, len);\n const neckHeight = headHeight * neckHeightFactor;\n const headEndCoord = getThirdCoord(points.at(-2)!, headCoord, 0, headHeight, true);\n const neckEndCoord = getThirdCoord(points.at(-2)!, headCoord, 0, neckHeight, true);\n const headLeft = getThirdCoord(headCoord, headEndCoord, HALF_PI, headWidth, false);\n const headRight = getThirdCoord(headCoord, headEndCoord, HALF_PI, headWidth, true);\n const neckLeft = getThirdCoord(headCoord, neckEndCoord, HALF_PI, neckWidth, false);\n const neckRight = getThirdCoord(headCoord, neckEndCoord, HALF_PI, neckWidth, true);\n return [neckLeft, headLeft, headCoord, headRight, neckRight];\n}\n\n/**\n * 插值面部分数据\n * @param points\n * @param neckLeft\n * @param neckRight\n * @param tailWidthFactor\n */\nexport function getArrowBodyCoords(points: CoordArray[], neckLeft: CoordArray, neckRight: CoordArray, tailWidthFactor: number): Array<CoordArray> {\n const allLen = wholeDistance(points);\n const len = getBaseLength(points);\n const tailWidth = len * tailWidthFactor;\n const neckWidth = mathDistance(neckLeft, neckRight);\n const widthDif = (tailWidth - neckWidth) / 2;\n\n let tempLen = 0;\n const leftBodyCoords: CoordArray[] = [];\n const rightBodyCoords: CoordArray[] = [];\n for (let i = 1; i < points.length - 1; i++) {\n const angle = getAngleOfThreeCoords(points[i - 1], points[i], points[i + 1]) / 2;\n tempLen += mathDistance(points[i - 1], points[i]);\n const w = (tailWidth / 2 - (tempLen / allLen) * widthDif) / Math.sin(angle);\n const left = getThirdCoord(points[i - 1], points[i], Math.PI - angle, w, true);\n const right = getThirdCoord(points[i - 1], points[i], angle, w, false);\n leftBodyCoords.push(left);\n rightBodyCoords.push(right);\n }\n return leftBodyCoords.concat(rightBodyCoords);\n}\n\n/**\n * 获取对称点\n * @param lineCoord1\n * @param lineCoord2\n * @param coord\n */\nexport function getTempCoord4(lineCoord1: CoordArray, lineCoord2: CoordArray, coord: CoordArray): CoordArray {\n const midCoord = mid(lineCoord1, lineCoord2);\n const len = mathDistance(midCoord, coord);\n const angle = getAngleOfThreeCoords(lineCoord1, midCoord, coord);\n let symCoord;\n let distance1 = 0;\n let distance2 = 0;\n let midCoord2: CoordArray;\n if (angle < HALF_PI) {\n distance1 = len * Math.sin(angle);\n distance2 = len * Math.cos(angle);\n midCoord2 = getThirdCoord(lineCoord1, midCoord, HALF_PI, distance1, false);\n symCoord = getThirdCoord(midCoord, midCoord2, HALF_PI, distance2, true);\n }\n else if (angle >= HALF_PI && angle < Math.PI) {\n distance1 = len * Math.sin(Math.PI - angle);\n distance2 = len * Math.cos(Math.PI - angle);\n midCoord2 = getThirdCoord(lineCoord1, midCoord, HALF_PI, distance1, false);\n symCoord = getThirdCoord(midCoord, midCoord2, HALF_PI, distance2, false);\n }\n else if (angle >= Math.PI && angle < Math.PI * 1.5) {\n distance1 = len * Math.sin(angle - Math.PI);\n distance2 = len * Math.cos(angle - Math.PI);\n midCoord2 = getThirdCoord(lineCoord1, midCoord, HALF_PI, distance1, true);\n symCoord = getThirdCoord(midCoord, midCoord2, HALF_PI, distance2, true);\n }\n else {\n distance1 = len * Math.sin(Math.PI * 2 - angle);\n distance2 = len * Math.cos(Math.PI * 2 - angle);\n midCoord2 = getThirdCoord(lineCoord1, midCoord, HALF_PI, distance1, true);\n symCoord = getThirdCoord(midCoord, midCoord2, HALF_PI, distance2, false);\n }\n return symCoord;\n}\n","import type { CoordArray } from 'vesium';\n\nimport { getArrowBodyCoords, getArrowHeadCoords } from './arrowAttackDirection';\nimport { getBaseLength, getQBSplineCoords, getThirdCoord, isClockWise, mathDistance, mid } from './helper';\n\nexport interface TailedAttackArrowOptions {\n headHeightFactor?: number;\n headWidthFactor?: number;\n neckHeightFactor?: number;\n neckWidthFactor?: number;\n tailWidthFactor?: number;\n swallowTailFactor?: number;\n}\n\n/**\n * 燕尾尖曲箭头\n */\nexport function arrowAttackDirectionTailed(coords: CoordArray[], options: TailedAttackArrowOptions = {}): CoordArray[] {\n const {\n headHeightFactor = 0.18,\n headWidthFactor = 0.3,\n neckHeightFactor = 0.85,\n neckWidthFactor = 0.15,\n tailWidthFactor = 0.1,\n swallowTailFactor = 1,\n } = options;\n\n const coordLength = coords.length;\n if (coordLength < 3) {\n throw new Error('coords.length must >= 3');\n }\n\n let [tailLeft, tailRight] = [coords[0], coords[1]];\n if (isClockWise(coords[0], coords[1], coords[2])) {\n tailLeft = coords[1];\n tailRight = coords[0];\n }\n const midTail = mid(tailLeft, tailRight);\n const boneCoords = [midTail].concat(coords.slice(2));\n const headCoords = getArrowHeadCoords(boneCoords, {\n tailLeft,\n tailRight,\n headHeightFactor,\n headWidthFactor,\n neckWidthFactor,\n neckHeightFactor,\n });\n if (headCoords && headCoords.length > 4) {\n const [neckLeft, neckRight] = [headCoords[0], headCoords[4]];\n const tailWidth = mathDistance(tailLeft, tailRight);\n const allLen = getBaseLength(boneCoords);\n const len = allLen * tailWidthFactor * swallowTailFactor;\n const swallowTailCoord = getThirdCoord(boneCoords[1], boneCoords[0], 0, len, true);\n const factor = tailWidth / allLen;\n const bodyCoords = getArrowBodyCoords(boneCoords, neckLeft, neckRight, factor);\n const coordlength = bodyCoords.length;\n let leftCoords = [tailLeft].concat(bodyCoords.slice(0, coordlength / 2));\n leftCoords.push(neckLeft);\n let rightCoords = [tailRight].concat(bodyCoords.slice(coordlength / 2, coordlength));\n rightCoords.push(neckRight);\n leftCoords = getQBSplineCoords(leftCoords);\n rightCoords = getQBSplineCoords(rightCoords);\n return leftCoords.concat(headCoords, rightCoords.reverse(), [swallowTailCoord, leftCoords[0]]);\n }\n else {\n return [];\n }\n}\n","import type { CoordArray } from 'vesium';\n\nimport {\n getAngleOfThreeCoords,\n getBaseLength,\n getBezierCoords,\n getThirdCoord,\n HALF_PI,\n isClockWise,\n mathDistance,\n mid,\n wholeDistance,\n} from './helper';\n\n/**\n * 钳击箭头 有效点位长度3,4,5\n */\nexport function arrowClamped(coords: CoordArray[]): CoordArray[] {\n const options = {\n headHeightFactor: 0.25,\n headWidthFactor: 0.3,\n neckHeightFactor: 0.85,\n neckWidthFactor: 0.15,\n };\n\n if (coords.length < 3) {\n throw new Error(`coords.length must >= 3`);\n }\n const [coord1, coord2, coord3] = coords;\n let tempCoord4: CoordArray, connCoord: CoordArray;\n if (coords.length === 3) {\n tempCoord4 = getTempCoord4(coord1, coord2, coord3);\n connCoord = mid(coord1, coord2);\n }\n else if (coords.length === 4) {\n tempCoord4 = coords[3];\n connCoord = mid(coord1, coord2);\n }\n else {\n tempCoord4 = coords[3];\n connCoord = coords[4];\n }\n let leftArrowCoords: CoordArray[];\n let rightArrowCoords: CoordArray[];\n if (isClockWise(coord1, coord2, coord3)) {\n leftArrowCoords = getArrowCoords(coord1, connCoord, tempCoord4, false, options);\n rightArrowCoords = getArrowCoords(connCoord, coord2, coord3, true, options);\n }\n else {\n leftArrowCoords = getArrowCoords(coord2, connCoord, coord3, false, options);\n rightArrowCoords = getArrowCoords(connCoord, coord1, tempCoord4, true, options);\n }\n const m = leftArrowCoords.length;\n const t = (m - 5) / 2;\n const llBodyCoords = leftArrowCoords.slice(0, t);\n const lArrowCoords = leftArrowCoords.slice(t, t + 5);\n let lrBodyCoords = leftArrowCoords.slice(t + 5, m);\n let rlBodyCoords = rightArrowCoords.slice(0, t);\n const rArrowCoords = rightArrowCoords.slice(t, t + 5);\n const rrBodyCoords = rightArrowCoords.slice(t + 5, m);\n rlBodyCoords = getBezierCoords(rlBodyCoords);\n const bodyCoords = getBezierCoords(rrBodyCoords.concat(llBodyCoords.slice(1)));\n lrBodyCoords = getBezierCoords(lrBodyCoords);\n return rlBodyCoords.concat(rArrowCoords, bodyCoords, lArrowCoords, lrBodyCoords);\n}\n\n/**\n * 插值箭形上的点\n * @param coord1 - Wgs84坐标\n * @param coord2 - Wgs84坐标\n * @param coord3 - Wgs84坐标\n * @param clockWise - 是否顺时针\n */\nfunction getArrowCoords(\n coord1: CoordArray,\n coord2: CoordArray,\n coord3: CoordArray,\n clockWise: boolean,\n options: GetArrowHeadCoordsOptions,\n): CoordArray[] {\n const midCoord = mid(coord1, coord2);\n const len = mathDistance(midCoord, coord3);\n let midCoord1 = getThirdCoord(coord3, midCoord, 0, len * 0.3, true);\n let midCoord2 = getThirdCoord(coord3, midCoord, 0, len * 0.5, true);\n midCoord1 = getThirdCoord(midCoord, midCoord1, HALF_PI, len / 5, clockWise);\n midCoord2 = getThirdCoord(midCoord, midCoord2, HALF_PI, len / 4, clockWise);\n const coords = [midCoord, midCoord1, midCoord2, coord3];\n const arrowCoords = getArrowHeadCoords(coords, options);\n if (arrowCoords && Array.isArray(arrowCoords) && arrowCoords.length > 0) {\n const [neckLeftCoord, neckRightCoord] = [arrowCoords[0], arrowCoords[4]];\n const tailWidthFactor = mathDistance(coord1, coord2) / getBaseLength(coords) / 2;\n const bodyCoords = getArrowBodyCoords(coords, neckLeftCoord, neckRightCoord, tailWidthFactor);\n const n = bodyCoords.length;\n let lCoords = bodyCoords.slice(0, n / 2);\n let rCoords = bodyCoords.slice(n / 2, n);\n lCoords.push(neckLeftCoord);\n rCoords.push(neckRightCoord);\n lCoords = lCoords.reverse();\n lCoords.push(coord2);\n rCoords = rCoords.reverse();\n rCoords.push(coord1);\n return lCoords.reverse().concat(arrowCoords, rCoords);\n }\n else {\n throw new Error('插值出错');\n }\n}\ninterface GetArrowHeadCoordsOptions {\n headHeightFactor: number;\n headWidthFactor: number;\n neckWidthFactor: number;\n neckHeightFactor: number;\n}\n\n/**\n * 插值头部点\n * @param coords\n */\nfunction getArrowHeadCoords(coords: CoordArray[], options: GetArrowHeadCoordsOptions): CoordArray[] {\n const { headHeightFactor, headWidthFactor, neckWidthFactor, neckHeightFactor } = options;\n\n const len = getBaseLength(coords);\n const headHeight = len * headHeightFactor;\n const headCoord = coords.at(-1)!;\n const headWidth = headHeight * headWidthFactor;\n const neckWidth = headHeight * neckWidthFactor;\n const neckHeight = headHeight * neckHeightFactor;\n const headEndCoord = getThirdCoord(coords.at(-2)!, headCoord, 0, headHeight, true);\n const neckEndCoord = getThirdCoord(coords.at(-2)!, headCoord, 0, neckHeight, true);\n const headLeft = getThirdCoord(headCoord, headEndCoord, HALF_PI, headWidth, false);\n const headRight = getThirdCoord(headCoord, headEndCoord, HALF_PI, headWidth, true);\n const neckLeft = getThirdCoord(headCoord, neckEndCoord, HALF_PI, neckWidth, false);\n const neckRight = getThirdCoord(headCoord, neckEndCoord, HALF_PI, neckWidth, true);\n return [neckLeft, headLeft, headCoord, headRight, neckRight];\n}\n\n/**\n * 插值面部分数据\n * @param coords\n * @param neckLeft\n * @param neckRight\n * @param tailWidthFactor\n */\nfunction getArrowBodyCoords(\n coords: CoordArray[],\n neckLeft: CoordArray,\n neckRight: CoordArray,\n tailWidthFactor: number,\n): CoordArray[] {\n const allLen = wholeDistance(coords);\n const len = getBaseLength(coords);\n const tailWidth = len * tailWidthFactor;\n const neckWidth = mathDistance(neckLeft, neckRight);\n const widthDif = (tailWidth - neckWidth) / 2;\n let tempLen = 0;\n const leftBodyCoords: CoordArray[] = [];\n const rightBodyCoords: CoordArray[] = [];\n for (let i = 1; i < coords.length - 1; i++) {\n const angle = getAngleOfThreeCoords(coords[i - 1], coords[i], coords[i + 1]) / 2;\n tempLen += mathDistance(coords[i - 1], coords[i]);\n const w = (tailWidth / 2 - (tempLen / allLen) * widthDif) / Math.sin(angle);\n const left = getThirdCoord(coords[i - 1], coords[i], Math.PI - angle, w, true);\n const right = getThirdCoord(coords[i - 1], coords[i], angle, w, false);\n leftBodyCoords.push(left);\n rightBodyCoords.push(right);\n }\n return leftBodyCoords.concat(rightBodyCoords);\n}\n\n/**\n * 获取对称点\n * @param lineCoord1\n * @param lineCoord2\n * @param coord\n */\nfunction getTempCoord4(lineCoord1: CoordArray, lineCoord2: CoordArray, coord: CoordArray): CoordArray {\n const midCoord = mid(lineCoord1, lineCoord2);\n const len = mathDistance(midCoord, coord);\n const angle = getAngleOfThreeCoords(lineCoord1, midCoord, coord);\n if (angle < HALF_PI) {\n const distance1 = len * Math.sin(angle);\n const distance2 = len * Math.cos(angle);\n const mid = getThirdCoord(lineCoord1, midCoord, HALF_PI, distance1, false);\n return getThirdCoord(midCoord, mid, HALF_PI, distance2, true);\n }\n else if (angle >= HALF_PI && angle < Math.PI) {\n const distance1 = len * Math.sin(Math.PI - angle);\n const distance2 = len * Math.cos(Math.PI - angle);\n const mid = getThirdCoord(lineCoord1, midCoord, HALF_PI, distance1, false);\n return getThirdCoord(midCoord, mid, HALF_PI, distance2, false);\n }\n else if (angle >= Math.PI && angle < Math.PI * 1.5) {\n const distance1 = len * Math.sin(angle - Math.PI);\n const distance2 = len * Math.cos(angle - Math.PI);\n const mid = getThirdCoord(lineCoord1, midCoord, HALF_PI, distance1, true);\n return getThirdCoord(midCoord, mid, HALF_PI, distance2, true);\n }\n else {\n const distance1 = len * Math.sin(Math.PI * 2 - angle);\n const distance2 = len * Math.cos(Math.PI * 2 - angle);\n const mid = getThirdCoord(lineCoord1, midCoord, HALF_PI, distance1, true);\n return getThirdCoord(midCoord, mid, HALF_PI, distance2, false);\n }\n}\n","import type { CoordArray } from 'vesium';\n\nimport { getBaseLength, getThirdCoord, HALF_PI } from './helper';\n\nexport interface FineArrowOptions {\n neckAngle?: number;\n headAngle?: number;\n headWidthFactor?: number;\n neckWidthFactor?: number;\n tailWidthFactor?: number;\n}\n\n/**\n * 尖箭头\n *\n */\nexport function arrowStraightSharp(coords: CoordArray[], options: FineArrowOptions = {}): CoordArray[] {\n const {\n tailWidthFactor = 0.1,\n neckWidthFactor = 0.2,\n headWidthFactor = 0.25,\n headAngle = Math.PI / 8.5,\n neckAngle = Math.PI / 13,\n } = options;\n\n const coordlength = coords.length;\n\n if (coordlength < 2) {\n throw new Error('coords.length must >= 2');\n }\n\n const [coord1, coord2] = [coords[0], coords[1]];\n const len = getBaseLength(coords);\n const tailWidth = len * tailWidthFactor;\n const neckWidth = len * neckWidthFactor;\n const headWidth = len * headWidthFactor;\n const tailLeft = getThirdCoord(coord2, coord1, HALF_PI, tailWidth, true);\n const tailRight = getThirdCoord(coord2, coord1, HALF_PI, tailWidth, false);\n const headLeft = getThirdCoord(coord1, coord2, headAngle, headWidth, false);\n const headRight = getThirdCoord(coord1, coord2, headAngle, headWidth, true);\n const neckLeft = getThirdCoord(coord1, coord2, neckAngle, neckWidth, false);\n const neckRight = getThirdCoord(coord1, coord2, neckAngle, neckWidth, true);\n const pList = [tailLeft, neckLeft, headLeft, coord2, headRight, neckRight, tailRight];\n return pList;\n}\n","import type { CoordArray } from 'vesium';\n\nimport { arrowStraightSharp } from './arrowStraightSharp';\n\n/**\n * 直箭头\n */\nexport function arrowStraight(coords: CoordArray[]): CoordArray[] {\n const tailWidthFactor = 0.05;\n const neckWidthFactor = 0.1;\n const headWidthFactor = 0.15;\n\n const headAngle = Math.PI / 4;\n const neckAngle = Math.PI * 0.17741;\n return arrowStraightSharp(coords, {\n tailWidthFactor,\n neckWidthFactor,\n headWidthFactor,\n headAngle,\n neckAngle,\n });\n}\n","import type { CoordArray } from 'vesium';\n\nimport { getArrowBodyCoords, getArrowHeadCoords } from './arrowAttackDirection';\nimport { getBaseLength, getQBSplineCoords, getThirdCoord, HALF_PI } from './helper';\n\nexport interface SquadCombatOptions {\n headHeightFactor?: number;\n headWidthFactor?: number;\n neckHeightFactor?: number;\n neckWidthFactor?: number;\n tailWidthFactor?: number;\n}\n\n/**\n * 分队战斗行动(尖曲箭头)\n */\nexport function arrowUnitCombatOperation(coords: CoordArray[], options: SquadCombatOptions = {}): CoordArray[] {\n const {\n headHeightFactor = 0.18,\n headWidthFactor = 0.3,\n neckHeightFactor = 0.85,\n neckWidthFactor = 0.15,\n tailWidthFactor = 0.1,\n } = options;\n\n const coordlength = coords.length;\n if (coordlength < 2) {\n throw new Error('coords.length must >= 2');\n }\n else {\n const allLen = getBaseLength(coords);\n const tailWidth = allLen * tailWidthFactor;\n const tailLeft = getThirdCoord(coords[1], coords[0], HALF_PI, tailWidth, false);\n const tailRight = getThirdCoord(coords[1], coords[0], HALF_PI, tailWidth, true);\n const headCoords = getArrowHeadCoords(coords, {\n tailLeft,\n tailRight,\n headHeightFactor,\n headWidthFactor,\n neckWidthFactor,\n neckHeightFactor,\n });\n if (headCoords && headCoords.length > 4) {\n const neckLeft = headCoords[0];\n const neckRight = headCoords[4];\n const bodyCoords = getArrowBodyCoords(coords, neckLeft, neckRight, tailWidthFactor);\n\n const coordlength = bodyCoords.length;\n let leftCoords = [tailLeft].concat(bodyCoords.slice(0, coordlength / 2));\n leftCoords.push(neckLeft);\n let rightCoords = [tailRight].concat(bodyCoords.slice(coordlength / 2, coordlength));\n rightCoords.push(neckRight);\n leftCoords = getQBSplineCoords(leftCoords);\n rightCoords = getQBSplineCoords(rightCoords);\n return leftCoords.concat(headCoords, rightCoords.reverse());\n }\n else {\n return [];\n }\n }\n}\n","import type { CoordArray } from 'vesium';\n\nimport { getArrowBodyCoords, getArrowHeadCoords } from './arrowAttackDirection';\nimport { getBaseLength, getQBSplineCoords, getThirdCoord, HALF_PI } from './helper';\n\nexport interface TailedSquadCombatOptions {\n headHeightFactor?: number;\n headWidthFactor?: number;\n neckHeightFactor?: number;\n neckWidthFactor?: number;\n tailWidthFactor?: number;\n headTailFactor?: number;\n swallowTailFactor?: number;\n swallowTailCoord?: CoordArray;\n}\n\n/**\n * 燕尾尖箭头\n */\nexport function arrowUnitCombatOperationTailed(coords: CoordArray[], options: TailedSquadCombatOptions = {}): CoordArray[] {\n const {\n headHeightFactor = 0.18,\n headWidthFactor = 0.3,\n neckHeightFactor = 0.85,\n neckWidthFactor = 0.15,\n tailWidthFactor = 0.1,\n swallowTailFactor = 1,\n } = options;\n const coordlength = coords.length;\n if (coordlength < 2) {\n throw new Error('coords.length must >= 2');\n }\n const allLen = getBaseLength(coords);\n const tailWidth = allLen * tailWidthFactor;\n const tailLeft = getThirdCoord(coords[1], coords[0], HALF_PI, tailWidth, false);\n const tailRight = getThirdCoord(coords[1], coords[0], HALF_PI, tailWidth, true);\n const len = tailWidth * swallowTailFactor;\n const swallowTailCoord = getThirdCoord(coords[1], coords[0], 0, len, true);\n const tailCoords = [tailLeft, swallowTailCoord, tailRight];\n\n const headCoords = getArrowHeadCoords(coords, {\n tailLeft: tailCoords[0],\n tailRight: tailCoords[2],\n headHeightFactor,\n headWidthFactor,\n neckWidthFactor,\n neckHeightFactor,\n });\n if (headCoords && headCoords.length > 4) {\n const neckLeft = headCoords[0];\n const neckRight = headCoords[4];\n const bodyCoords = getArrowBodyCoords(coords, neckLeft, neckRight, tailWidthFactor);\n\n const coordlength = bodyCoords.length;\n let leftCoords = [tailCoords[0]].concat(bodyCoords.slice(0, coordlength / 2));\n leftCoords.push(neckLeft);\n let rightCoords = [tailCoords[2]].concat(bodyCoords.slice(coordlength / 2, coordlength));\n rightCoords.push(neckRight);\n leftCoords = getQBSplineCoords(leftCoords);\n rightCoords = getQBSplineCoords(rightCoords);\n return leftCoords.concat(headCoords, rightCoords.reverse(), [tailCoords[1], leftCoords[0]]);\n }\n return [];\n}\n","import type { CoordArray } from 'vesium';\n\nimport { FITTING_COUNT, getBisectorNormals, getCubicValue, mid } from './helper';\n\n/**\n * 集结地\n *\n */\nexport function assemblingPlace(coords: CoordArray[]): CoordArray[] {\n if (coords.length < 3) {\n throw new Error(`coords.length must >= 3`);\n }\n const t = 0.4;\n\n const midCoord = mid(coords[0], coords[2]);\n coords.push(midCoord, coords[0], coords[1]);\n let normals: CoordArray[] = [];\n const pList: CoordArray[] = [];\n for (let i = 0; i < coords.length - 2; i++) {\n const coord1 = coords[i];\n const coord2 = coords[i + 1];\n const coord3 = coords[i + 2];\n const normalCoords = getBisectorNormals(t, coord1, coord2, coord3);\n normals = normals.concat(normalCoords);\n }\n const count = normals.length;\n normals = [normals[count - 1]].concat(normals.slice(0, count - 1));\n for (let i = 0; i < coords.length - 2; i++) {\n const coord1 = coords[i];\n const coord2 = coords[i + 1];\n pList.push(coord1);\n for (let t = 0; t <= FITTING_COUNT; t++) {\n const coord = getCubicValue(t / FITTING_COUNT, coord1, normals[i * 2], normals[i * 2 + 1], coord2);\n pList.push(coord);\n }\n pList.push(coord2);\n }\n return pList;\n}\n","import type { CoordArray } from 'vesium';\n\nimport { getBezierCoords } from './helper';\n\n/**\n * 曲线旗标\n */\nexport function flagCurve(coords: CoordArray[]): CoordArray[] {\n const coordlength = coords.length;\n if (coordlength < 2) {\n throw new Error('coords.length must >= 2');\n }\n return calculatePonits(coords);\n}\n\n/**\n * 插值点数据\n * @param coords\n */\nexport function calculatePonits(coords: CoordArray[]): CoordArray[] {\n let components: CoordArray[] = [];\n // 至少需要两个控制点\n if (coords.length > 1) {\n // 取第一个\n const startCoord = coords[0];\n // 取最后一个\n const endCoord = coords.at(-1)!;\n // 上曲线起始点\n const coord1 = startCoord;\n // 上曲线第一控制点\n const coord2 = [\n (endCoord[0] - startCoord[0]) / 4 + startCoord[0],\n (endCoord[1] - startCoord[1]) / 8 + startCoord[1],\n ];\n // 上曲线第二个点\n const coord3 = [(startCoord[0] + endCoord[0]) / 2, startCoord[1]];\n // 上曲线第二控制点\n const coord4 = [\n ((endCoord[0] - startCoord[0]) * 3) / 4 + startCoord[0],\n -(endCoord[1] - startCoord[1]) / 8 + startCoord[1],\n ];\n // 上曲线结束点\n const coord5 = [endCoord[0], startCoord[1]];\n // 下曲线结束点\n const coord6 = [endCoord[0], (startCoord[1] + endCoord[1]) / 2];\n // 下曲线第二控制点\n const coord7 = [\n ((endCoord[0] - startCoord[0]) * 3) / 4 + startCoord[0],\n ((endCoord[1] - startCoord[1]) * 3) / 8 + startCoord[1],\n ];\n // 下曲线第二个点\n const coord8 = [(startCoord[0] + endCoord[0]) / 2, (startCoord[1] + endCoord[1]) / 2];\n // 下曲线第一控制点\n const coord9 = [\n (endCoord[0] - startCoord[0]) / 4 + startCoord[0],\n ((endCoord[1] - startCoord[1]) * 5) / 8 + startCoord[1],\n ];\n // 下曲线起始点\n const coord10 = [startCoord[0], (startCoord[1] + endCoord[1]) / 2];\n // 旗杆底部点\n const coord11: CoordArray = [startCoord[0], endCoord[1]];\n // 计算上曲线\n const curve1 = getBezierCoords([coord1, coord2, coord3, coord4, coord5]);\n // 计算下曲线\n const curve2 = getBezierCoords([coord6, coord7, coord8, coord9, coord10] as CoordArray[]);\n // 合并\n components = curve1.concat(curve2);\n components.push(coord11);\n }\n return components;\n}\n","import type { CoordArray } from 'vesium';\n\n/**\n * 直角旗标(使用两个控制点直接创建直角旗标)\n */\nexport function flagRect(coords: CoordArray[]): CoordArray[] {\n if (coords.length < 2) {\n throw new Error('coords.length must >= 2');\n }\n const [startCoord, endCoord] = coords;\n const coord1 = [endCoord[0], startCoord[1]];\n const coord2 = [endCoord[0], (startCoord[1] + endCoord[1]) / 2];\n const coord3 = [startCoord[0], (startCoord[1] + endCoord[1]) / 2];\n const coord4 = [startCoord[0], endCoord[1]];\n return [startCoord, coord1, coord2, coord3, coord4];\n}\n","import type { CoordArray } from 'vesium';\n\n/**\n * 三角旗标(使用两个控制点直接创建三角旗标)\n */\nexport function flagTriangle(coords: CoordArray[]): CoordArray[] {\n const coordlength = coords.length;\n if (coordlength < 2) {\n throw new Error('coords.length must >= 2');\n }\n const [startCoord, endCoord] = coords;\n const coord1: CoordArray = [endCoord[0], (startCoord[1] + endCoord[1]) / 2];\n const coord2: CoordArray = [startCoord[0], (startCoord[1] + endCoord[1]) / 2];\n const coord3: CoordArray = [startCoord[0], endCoord[1]];\n return [startCoord, coord1, coord2, coord3];\n}\n","import { CallbackProperty, Entity, PolygonHierarchy } from 'cesium';\nimport { toCartesian3, toCoord } from 'vesium';\n\nimport { arc } from '../geom';\n\nimport { control, moved } from '../skeleton';\n/**\n * 弓形\n */\nimport { PlotScheme } from '../usePlot';\n\nexport const PlotSchemePolygonArc = new PlotScheme({\n type: 'PolygonArc',\n complete: packable => packable.positions!.length >= 3,\n skeletons: [\n moved,\n control,\n ],\n initRender() {\n return {\n entities: [new Entity({ polygon: {} })],\n };\n },\n render(context) {\n const entity = context.previous.entities![0]!;\n\n const points = context.packable.positions;\n if (points.length < 3) {\n context.mouse && points.push(context.mouse.clone());\n }\n const coords = points.map(e => toCoord(e)!);\n if (coords.length < 3) {\n entity.polygon!.hierarchy = undefined;\n return context.previous;\n }\n const positions = arc(coords).map(item => toCartesian3(item)!);\n const hierarchy = new PolygonHierarchy(positions);\n entity.polygon!.hierarchy = new CallbackProperty(() => hierarchy, false);\n return {\n entities: [entity],\n };\n },\n});\n","import { CallbackProperty, Entity, PolygonHierarchy } from 'cesium';\nimport { toCartesian3, toCoord } from 'vesium';\n\nimport { arrowAttackDirection } from '../geom';\n\nimport { control, intervalNonclosed, moved } from '../skeleton';\nimport { PlotScheme } from '../usePlot';\n\nexport const PlotSchemePolygonArrowAttackDirection = new PlotScheme({\n type: 'PolygonArrowAttackDirection',\n allowManualComplete: packable => packable.positions!.length >= 3,\n skeletons: [\n moved,\n control,\n intervalNonclosed,\n ],\n initRender() {\n return {\n entities: [new Entity({ polygon: {} })],\n };\n },\n render(context) {\n const entity = context.previous.entities![0]!;\n\n const points = context.packable.positions;\n context.mouse && points.push(context.mouse.clone());\n const coords = points.map(e => toCoord(e)!);\n\n if (coords.length < 3) {\n entity.polygon!.hierarchy = undefined;\n return context.previous;\n }\n const positions = arrowAttackDirection(coords).map(item => toCartesian3(item)!);\n const hierarchy = new PolygonHierarchy(positions);\n entity.polygon!.hierarchy = new CallbackProperty(() => hierarchy, false);\n return {\n entities: [entity],\n };\n },\n});\n","import { CallbackProperty, Entity, PolygonHierarchy } from 'cesium';\nimport { toCartesian3, toCoord } from 'vesium';\n\nimport { arrowAttackDirectionTailed } from '../geom';\n\nimport { control, intervalNonclosed, moved } from '../skeleton';\nimport { PlotScheme } from '../usePlot';\n\nexport const PlotSchemePolygonArrowAttackDirectionTailed = new PlotScheme({\n type: 'PolygonArrowAttackDirectionTailed',\n allowManualComplete: packable => packable.positions!.length >= 3,\n skeletons: [\n moved,\n control,\n intervalNonclosed,\n ],\n initRender() {\n return {\n entities: [new Entity({ polygon: {} })],\n };\n },\n render(context) {\n const entity = context.previous.entities![0]!;\n\n const points = context.packable.positions;\n context.mouse && points.push(context.mouse.clone());\n const coords = points.map(e => toCoord(e)!);\n\n if (coords.length < 3) {\n entity.polygon!.hierarchy = undefined;\n return context.previous;\n }\n const positions = arrowAttackDirectionTailed(coords).map(item => toCartesian3(item)!);\n const hierarchy = new PolygonHierarchy(positions);\n entity.polygon!.hierarchy = new CallbackProperty(() => hierarchy, false);\n return {\n entities: [entity],\n };\n },\n});\n","import { CallbackProperty, Entity, PolygonHierarchy } from 'cesium';\n\nimport { toCartesian3, toCoord } from 'vesium';\n\nimport { arrowClamped } from '../geom';\nimport { control, moved } from '../skeleton';\nimport { PlotScheme } from '../usePlot';\n\nexport const PlotSchemePolygonArrowClamped = new PlotScheme({\n type: 'PolygonArrowClamped',\n complete: packable => packable.positions!.length >= 5,\n skeletons: [\n moved,\n control,\n ],\n initRender() {\n return {\n entities: [new Entity({ polygon: {} })],\n };\n },\n render(context) {\n const entity = context.previous.entities![0]!;\n\n const points = context.packable.positions;\n if (points.length < 5) {\n const mouse = context.mouse;\n mouse && points.push(mouse.clone());\n }\n\n const coords = points.map(e => toCoord(e)!);\n\n if (coords.length >= 3) {\n const positions = arrowClamped(coords);\n const hierarchy = new PolygonHierarchy(positions.map(item => toCartesian3(item)!));\n entity.polygon!.hierarchy = new CallbackProperty(() => hierarchy, false);\n }\n else {\n entity.polygon!.hierarchy = undefined;\n }\n return {\n entities: [entity],\n };\n },\n});\n","import { CallbackProperty, Entity, PolygonHierarchy } from 'cesium';\n\nimport { toCartesian3, toCoord } from 'vesium';\n\nimport { arrowStraight } from '../geom';\nimport { control, moved } from '../skeleton';\nimport { PlotScheme } from '../usePlot';\n\nexport const PlotSchemePolygonArrowStraight = new PlotScheme({\n type: 'PolygonArrowStraight',\n complete: packable => packable.positions!.length >= 2,\n skeletons: [\n moved,\n control,\n ],\n initRender() {\n return {\n entities: [new Entity({ polygon: {} })],\n };\n },\n render(context) {\n const entity = context.previous.entities![0]!;\n\n const points = context.packable.positions;\n if (points.length < 2) {\n const mouse = context.mouse;\n mouse && points.push(mouse.clone());\n }\n\n const coords = points.map(e => toCoord(e)!);\n\n if (coords.length >= 2) {\n const positions = arrowStraight(coords);\n const hierarchy = new PolygonHierarchy(positions.map(item => toCartesian3(item)!));\n entity.polygon!.hierarchy = new CallbackProperty(() => hierarchy, false);\n }\n else {\n entity.polygon!.hierarchy = undefined;\n }\n return {\n entities: [entity],\n };\n },\n});\n","import { CallbackProperty, Entity, PolygonHierarchy } from 'cesium';\nimport { toCartesian3, toCoord } from 'vesium';\n\nimport { arrowStraightSharp } from '../geom';\n\nimport { control, moved } from '../skeleton';\nimport { PlotScheme } from '../usePlot';\n\nexport const PlotSchemePolygonArrowStraightSharp = new PlotScheme({\n type: 'PolygonArrowStraightSharp',\n complete: packable => packable.positions!.length >= 2,\n skeletons: [\n moved,\n control,\n ],\n initRender() {\n return {\n entities: [new Entity({ polygon: {} })],\n };\n },\n render(context) {\n const entity = context.previous.entities![0]!;\n\n const points = context.packable.positions;\n if (points.length < 2) {\n const mouse = context.mouse;\n mouse && points.push(mouse.clone());\n }\n\n const coords = points.map(e => toCoord(e)!);\n\n if (coords.length >= 2) {\n const positions = arrowStraightSharp(coords);\n const hierarchy = new PolygonHierarchy(positions.map(item => toCartesian3(item)!));\n entity.polygon!.hierarchy = new CallbackProperty(() => hierarchy, false);\n }\n else {\n entity.polygon!.hierarchy = undefined;\n }\n return {\n entities: [entity],\n };\n },\n});\n","import { CallbackProperty, Entity, PolygonHierarchy } from 'cesium';\nimport { toCartesian3, toCoord } from 'vesium';\n\nimport { arrowUnitCombatOperation } from '../geom';\n\nimport { control, intervalNonclosed, moved } from '../skeleton';\nimport { PlotScheme } from '../usePlot';\n\nexport const PlotSchemePolygonArrowUnitCombatOperation = new PlotScheme({\n type: 'PolygonArrowUnitCombatOperation',\n allowManualComplete: packable => packable.positions!.length >= 2,\n skeletons: [\n moved,\n control,\n intervalNonclosed,\n ],\n initRender() {\n return {\n entities: [new Entity({ polygon: {} })],\n };\n },\n render(context) {\n const entity = context.previous.entities![0]!;\n\n const points = context.packable.positions;\n context.mouse && points.push(context.mouse.clone());\n const coords = points.map(e => toCoord(e)!);\n\n if (coords.length < 2) {\n entity.polygon!.hierarchy = undefined;\n return context.previous;\n }\n const positions = arrowUnitCombatOperation(coords).map(item => toCartesian3(item)!);\n const hierarchy = new PolygonHierarchy(positions);\n entity.polygon!.hierarchy = new CallbackProperty(() => hierarchy, false);\n return {\n entities: [entity],\n };\n },\n});\n","import { CallbackProperty, Entity, PolygonHierarchy } from 'cesium';\nimport { toCartesian3, toCoord } from 'vesium';\n\nimport { arrowUnitCombatOperationTailed } from '../geom';\n\nimport { control, interval, moved } from '../skeleton';\nimport { PlotScheme } from '../usePlot';\n\nexport const PlotSchemePolygonArrowUnitCombatOperationTailed = new PlotScheme({\n type: 'PolygonArrowUnitCombatOperationTailed',\n allowManualComplete: packable => packable.positions!.length >= 2,\n skeletons: [\n moved,\n control,\n interval,\n ],\n initRender() {\n return {\n entities: [new Entity({ polygon: {} })],\n };\n },\n render(context) {\n const entity = context.previous.entities![0]!;\n\n const points = context.packable.positions;\n context.mouse && points.push(context.mouse.clone());\n const coords = points.map(e => toCoord(e)!);\n\n if (coords.length < 2) {\n entity.polygon!.hierarchy = undefined;\n return context.previous;\n }\n const positions = arrowUnitCombatOperationTailed(coords).map(item => toCartesian3(item)!);\n const hierarchy = new PolygonHierarchy(positions);\n entity.polygon!.hierarchy = new CallbackProperty(() => hierarchy, false);\n return {\n entities: [entity],\n };\n },\n});\n","import { CallbackProperty, Entity, PolygonHierarchy } from 'cesium';\nimport { toCartesian3, toCoord } from 'vesium';\n\nimport { assemblingPlace } from '../geom';\n\nimport { control, interval, moved } from '../skeleton';\nimport { PlotScheme } from '../usePlot';\n\nexport const PlotSchemePolygonAssemblingPlace = new PlotScheme({\n type: 'PolygonAssemblingPlace',\n complete: packable => packable.positions!.length >= 3,\n skeletons: [\n moved,\n control,\n interval,\n ],\n initRender() {\n return {\n entities: [new Entity({ polygon: {} })],\n };\n },\n render(context) {\n const entity = context.previous.entities![0]!;\n\n const points = context.packable.positions;\n context.mouse && points.push(context.mouse.clone());\n const coords = points.map(e => toCoord(e)!);\n\n if (coords.length < 2) {\n entity.polygon!.hierarchy = undefined;\n return context.previous;\n }\n const positions = assemblingPlace(coords).map(item => toCartesian3(item)!);\n const hierarchy = new PolygonHierarchy(positions);\n entity.polygon!.hierarchy = new CallbackProperty(() => hierarchy, false);\n return {\n entities: [entity],\n };\n },\n});\n","import { CallbackProperty, Entity, PolygonHierarchy } from 'cesium';\nimport { toCartesian3, toCoord } from 'vesium';\n\nimport { flagCurve } from '../geom';\n\nimport { control, moved } from '../skeleton';\nimport { PlotScheme } from '../usePlot';\n\nexport const PlotSchemePolygonFlagCurve = new PlotScheme({\n type: 'PolygonFlagCurve',\n complete: packable => packable.positions!.length >= 2,\n skeletons: [\n moved,\n control,\n ],\n initRender() {\n return {\n entities: [new Entity({ polygon: {} })],\n };\n },\n render(context) {\n const entity = context.previous.entities![0]!;\n\n const points = context.packable.positions;\n context.mouse && points.push(context.mouse.clone());\n const coords = points.map(e => toCoord(e)!);\n\n if (coords.length < 2) {\n entity.polygon!.hierarchy = undefined;\n return context.previous;\n }\n const positions = flagCurve(coords).map(item => toCartesian3(item)!);\n const hierarchy = new PolygonHierarchy(positions);\n entity.polygon!.hierarchy = new CallbackProperty(() => hierarchy, false);\n return {\n entities: [entity],\n };\n },\n});\n","import { CallbackProperty, Entity, PolygonHierarchy } from 'cesium';\nimport { toCartesian3, toCoord } from 'vesium';\n\nimport { flagRect } from '../geom';\n\nimport { control, moved } from '../skeleton';\nimport { PlotScheme } from '../usePlot';\n\nexport const PlotSchemePolygonFlagRect = new PlotScheme({\n type: 'PolygonFlagRect',\n complete: packable => packable.positions!.length >= 2,\n skeletons: [\n moved,\n control,\n ],\n initRender() {\n return {\n entities: [new Entity({ polygon: {} })],\n };\n },\n render(context) {\n const entity = context.previous.entities![0]!;\n\n const points = context.packable.positions;\n context.mouse && points.push(context.mouse.clone());\n const coords = points.map(e => toCoord(e)!);\n\n if (coords.length < 2) {\n entity.polygon!.hierarchy = undefined;\n return context.previous;\n }\n const positions = flagRect(coords).map(item => toCartesian3(item)!);\n const hierarchy = new PolygonHierarchy(positions);\n entity.polygon!.hierarchy = new CallbackProperty(() => hierarchy, false);\n return {\n entities: [entity],\n };\n },\n});\n","import { CallbackProperty, Entity, PolygonHierarchy } from 'cesium';\nimport { toCartesian3, toCoord } from 'vesium';\n\nimport { flagTriangle } from '../geom';\n\nimport { control, moved } from '../skeleton';\nimport { PlotScheme } from '../usePlot';\n\nexport const PlotSchemePolygonFlagTriangle = new PlotScheme({\n type: 'PolygonFlagTriangle',\n complete: packable => packable.positions!.length >= 2,\n skeletons: [\n moved,\n control,\n ],\n initRender() {\n return {\n entities: [new Entity({ polygon: {} })],\n };\n },\n render(context) {\n const entity = context.previous.entities![0]!;\n\n const points = context.packable.positions;\n context.mouse && points.push(context.mouse.clone());\n const coords = points.map(e => toCoord(e)!);\n\n if (coords.length < 2) {\n entity.polygon!.hierarchy = undefined;\n return context.previous;\n }\n const positions = flagTriangle(coords).map(item => toCartesian3(item)!);\n const hierarchy = new PolygonHierarchy(positions);\n entity.polygon!.hierarchy = new CallbackProperty(() => hierarchy, false);\n return {\n entities: [entity],\n };\n },\n});\n","import * as turf from '@turf/turf';\nimport { CallbackProperty, Entity, PolygonHierarchy } from 'cesium';\n\nimport { toCartesian3, toCoord } from 'vesium';\nimport { control, intervalNonclosed, moved } from '../skeleton';\n/**\n * polygon-smooth 标绘配置 平滑闭合面\n */\nimport { PlotScheme } from '../usePlot';\n\nexport const PlotSchemePolygonSmooth = new PlotScheme({\n type: 'PolygonSmooth',\n allowManualComplete: packable => packable.positions!.length >= 3,\n skeletons: [\n moved,\n control,\n intervalNonclosed,\n ],\n initRender() {\n return {\n entities: [new Entity({ polygon: {} })],\n };\n },\n render(context) {\n const entity = context.previous.entities![0]!;\n const positions = context.packable.positions;\n const mousePosition = context.mouse;\n mousePosition && positions.push(mousePosition.clone());\n if (positions.length <= 2) {\n entity.polygon!.hierarchy = undefined;\n return context.previous;\n }\n const wgs84s = positions.map(e => toCoord(e)!);\n wgs84s.push(wgs84s[0]);\n const { features } = turf.polygonSmooth(turf.polygon([wgs84s]), {\n iterations: 3,\n });\n const cartesians = features[0].geometry.coordinates[0].map(item => toCartesian3(item as any)).filter(e => !!e);\n const hierarchy = new PolygonHierarchy(cartesians);\n entity.polygon!.hierarchy = new CallbackProperty(() => hierarchy, false);\n return {\n entities: [entity],\n };\n },\n});\n","/**\n * polyline\n */\nimport { CallbackProperty, Color, Entity } from 'cesium';\n\nimport { control, intervalNonclosed, moved } from '../skeleton';\nimport { PlotScheme } from '../usePlot';\n\nexport const PlotSchemePolyline = new PlotScheme({\n type: 'Polyline',\n allowManualComplete: packable => packable.positions!.length > 1,\n skeletons: [\n moved,\n control,\n intervalNonclosed,\n ],\n initRender() {\n return {\n entities: [new Entity({ polyline: { material: Color.RED, width: 2 } })],\n };\n },\n render(context) {\n const entity = context.previous.entities![0]!;\n const positions = [...context.packable.positions];\n const mouse = context.mouse;\n mouse && positions.push(mouse.clone());\n const cache = positions.length >= 2 ? positions : [];\n entity.polyline!.positions = new CallbackProperty(() => cache, false);\n return {\n entities: [entity],\n };\n },\n});\n","import * as turf from '@turf/turf';\n\nimport { CallbackProperty, Color, Entity } from 'cesium';\n\nimport { toCartesian3, toCoord } from 'vesium';\nimport { control, intervalNonclosed, moved } from '../skeleton';\n/**\n * polyline-Curve\n */\nimport { PlotScheme } from '../usePlot';\n\nexport const PlotSchemePolylineCurve = new PlotScheme({\n type: 'PolylineCurve',\n allowManualComplete: packable => packable.positions!.length > 1,\n skeletons: [\n moved,\n control,\n intervalNonclosed,\n ],\n initRender() {\n return {\n entities: [new Entity({ polyline: { material: Color.RED, width: 2 } })],\n };\n },\n render(context) {\n const entity = context.previous.entities![0]!;\n\n const positions = [...context.packable.positions];\n const mouse = context.mouse;\n mouse && positions.push(mouse.clone());\n if (positions.length < 2) {\n entity.polyline!.positions = undefined;\n return context.previous;\n }\n\n const coords = positions.map(position => toCoord(position)!);\n const { geometry: { coordinates } } = turf.bezierSpline(turf.lineString(coords));\n\n entity.polyline!.positions = new CallbackProperty(() => coordinates.map(toCartesian3), false);\n return {\n entities: [entity],\n };\n },\n});\n","import { CallbackProperty, Entity, Rectangle } from 'cesium';\n\nimport { control, moved } from '../skeleton';\n/**\n * rectangle\n */\nimport { PlotScheme } from '../usePlot';\n\nexport const PlotSchemeRectangle = new PlotScheme({\n type: 'Rectangle',\n complete: packable => packable.positions!.length >= 2,\n skeletons: [\n moved,\n control,\n ],\n initRender() {\n return {\n entities: [new Entity({ rectangle: {} })],\n };\n },\n render(context) {\n const entity = context.previous.entities![0]!;\n const positions = [...context.packable.positions];\n const mouse = context.mouse;\n mouse && positions.push(mouse.clone());\n if (positions.length < 2) {\n entity.rectangle!.coordinates = undefined;\n return context.previous;\n }\n const coordinates = Rectangle.fromCartesianArray(positions ?? []);\n entity.rectangle!.coordinates = new Callback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