{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/geometries/simple-polyline/index.ts"],"sourcesContent":["/*\n * @Author: zouyaoji@https://github.com/zouyaoji\n * @Date: 2021-09-16 09:28:13\n * @LastEditTime: 2022-03-30 13:16:28\n * @LastEditors: zouyaoji\n * @Description:\n * @FilePath: \\vue-cesium@next\\packages\\components\\geometries\\simple-polyline\\index.ts\n */\nimport { VcCartesian3Array, VcColor, VcComponentInternalInstance, VcComponentPublicInstance, VcReadyObject } from '@vue-cesium/utils/types'\nimport { defineComponent, getCurrentInstance, createCommentVNode } from 'vue'\nimport { useGeometries } from '@vue-cesium/composables'\nimport { kebabCase } from '@vue-cesium/utils/util'\nimport { positions, colors, arcType, granularity, ellipsoid } from '@vue-cesium/utils/cesium-props'\nimport { commonEmits } from '@vue-cesium/utils/emits'\nexport const simplePolylineGeometryProps = {\n  ...positions,\n  ...colors,\n  colorsPerVertex: {\n    type: Boolean,\n    default: false\n  },\n  ...arcType,\n  ...granularity,\n  ...ellipsoid\n}\nexport default defineComponent({\n  name: 'VcGeometrySimplePolyline',\n  props: simplePolylineGeometryProps,\n  emits: commonEmits,\n  setup(props, ctx) {\n    // state\n    const instance = getCurrentInstance() as VcComponentInternalInstance\n    instance.cesiumClass = 'SimplePolylineGeometry'\n    useGeometries(props, ctx, instance)\n\n    return () => createCommentVNode(kebabCase(instance.proxy?.$options.name || 'v-if'))\n  }\n})\n\nexport type VcGeometrySimplePolylineProps = {\n  /**\n   * An array of VcCartesian3Array defining the positions in the polyline as a line strip.\n   */\n  positions: VcCartesian3Array\n  /**\n   * An Array of VcColor defining the per vertex or per segment colors.\n   */\n  colors?: Array<VcColor>\n  /**\n   * A boolean that determines whether the colors will be flat across each segment of the line or interpolated across the vertices.\n   * Default value: false\n   */\n  colorsPerVertex?: boolean\n  /**\n   * The type of line the polyline segments must follow.\n   */\n  arcType?: number\n  /**\n   * The distance, in radians, between each latitude and longitude if options.arcType is not ArcType.NONE. Determines the number of positions in the buffer.\n   */\n  granularity?: number\n  /**\n   * The ellipsoid to be used as a reference.\n   */\n  ellipsoid?: Cesium.Ellipsoid\n  /**\n   * Triggers before the VcGeometrySimplePolyline is loaded\n   */\n  onBeforeLoad?: (instance: VcComponentInternalInstance) => void\n  /**\n   * Triggers when the VcGeometrySimplePolyline is successfully loaded\n   */\n  onReady?: (readyObject: VcReadyObject) => void\n  /**\n   * Triggers when the component load failed.\n   */\n  onUnready?: (e: any) => void\n  /**\n   * Triggers when the VcGeometrySimplePolyline is destroyed\n   */\n  onDestroyed?: (instance: VcComponentInternalInstance) => void\n}\n\nexport type VcGeometrySimplePolylineRef = VcComponentPublicInstance<VcGeometrySimplePolylineProps>\n"],"names":[],"mappings":";;;;;;;;AAcO,MAAM,2BAA8B,GAAA;AAAA,EACzC,GAAG,SAAA;AAAA,EACH,GAAG,MAAA;AAAA,EACH,eAAiB,EAAA;AAAA,IACf,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACX;AAAA,EACA,GAAG,OAAA;AAAA,EACH,GAAG,WAAA;AAAA,EACH,GAAG,SAAA;AACL,EAAA;AACA,6BAAe,eAAgB,CAAA;AAAA,EAC7B,IAAM,EAAA,0BAAA;AAAA,EACN,KAAO,EAAA,2BAAA;AAAA,EACP,KAAO,EAAA,WAAA;AAAA,EACP,KAAA,CAAM,OAAO,GAAK,EAAA;AAEhB,IAAA,MAAM,WAAW,kBAAmB,EAAA,CAAA;AACpC,IAAA,QAAA,CAAS,WAAc,GAAA,wBAAA,CAAA;AACvB,IAAc,aAAA,CAAA,KAAA,EAAO,KAAK,QAAQ,CAAA,CAAA;AAElC,IAAA,OAAO,MAAG;AAnCd,MAAA,IAAA,EAAA,CAAA;AAmCiB,MAAA,OAAA,kBAAA,CAAmB,YAAU,EAAS,GAAA,QAAA,CAAA,KAAA,KAAT,mBAAgB,QAAS,CAAA,IAAA,KAAQ,MAAM,CAAC,CAAA,CAAA;AAAA,KAAA,CAAA;AAAA,GACpF;AACF,CAAC,CAAA;;;;"}