{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/geometries/polygon/index.ts"],"sourcesContent":["/*\n * @Author: zouyaoji@https://github.com/zouyaoji\n * @Date: 2021-09-16 09:28:13\n * @LastEditTime: 2022-03-30 11:34:30\n * @LastEditors: zouyaoji\n * @Description:\n * @FilePath: \\vue-cesium@next\\packages\\components\\geometries\\polygon\\index.ts\n */\nimport { VcComponentInternalInstance, VcComponentPublicInstance, VcPolygonHierarchy, 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 {\n  polygonHierarchy,\n  height,\n  extrudedHeight,\n  vertexFormat,\n  stRotation,\n  ellipsoid,\n  granularity,\n  perPositionHeight,\n  closeTop,\n  closeBottom,\n  arcType\n} from '@vue-cesium/utils/cesium-props'\nimport { commonEmits } from '@vue-cesium/utils/emits'\nexport const polygonGeometryProps = {\n  ...polygonHierarchy,\n  ...height,\n  ...extrudedHeight,\n  ...vertexFormat,\n  ...stRotation,\n  ...ellipsoid,\n  ...granularity,\n  ...perPositionHeight,\n  ...closeTop,\n  ...closeBottom,\n  ...arcType\n}\nexport default defineComponent({\n  name: 'VcGeometryPolygon',\n  props: polygonGeometryProps,\n  emits: commonEmits,\n  setup(props, ctx) {\n    // state\n    const instance = getCurrentInstance() as VcComponentInternalInstance\n    instance.cesiumClass = 'PolygonGeometry'\n    useGeometries(props, ctx, instance)\n\n    return () => createCommentVNode(kebabCase(instance.proxy?.$options.name || 'v-if'))\n  }\n})\n\nexport type VcGeometryPolygonProps = {\n  /**\n   * A polygon hierarchy that can include holes.\n   */\n  polygonHierarchy: VcPolygonHierarchy\n  /**\n   * The distance in meters between the polygon and the ellipsoid surface.\n   */\n  height?: number\n  /**\n   * The distance in meters between the polygon's extruded face and the ellipsoid surface.\n   */\n  extrudedHeight?: number\n  /**\n   * The vertex attributes to be computed.\n   */\n  vertexFormat?: Cesium.VertexFormat\n  /**\n   * The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.\n   * Default value: 0.0\n   */\n  stRotation?: number\n  /**\n   * The ellipsoid to be used as a reference.\n   */\n  ellipsoid?: Cesium.Ellipsoid\n  /**\n   * The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.\n   */\n  granularity?: number\n  /**\n   * Use the height of options.positions for each position instead of using options.height to determine the height.\n   * Default value: false\n   */\n  perPositionHeight?: boolean\n  /**\n   * When false, leaves off the top of an extruded polygon open.\n   * Default value: true\n   */\n  closeTop?: boolean\n  /**\n   * When false, leaves off the bottom of an extruded polygon open.\n   * Default value: true\n   */\n  closeBottom?: boolean\n  /**\n   * The type of line the polygon edges must follow. Valid options are ArcType.GEODESIC and ArcType.RHUMB.\n   */\n  arcType?: number | Cesium.ArcType\n  /**\n   * Triggers before the VcGeometryPolygon is loaded.\n   */\n  onBeforeLoad?: (instance: VcComponentInternalInstance) => void\n  /**\n   * Triggers when the VcGeometryPolygon 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 VcGeometryPolygon is destroyed.\n   */\n  onDestroyed?: (instance: VcComponentInternalInstance) => void\n}\n\nexport type VcGeometryPolygonRef = VcComponentPublicInstance<VcGeometryPolygonProps>\n"],"names":[],"mappings":";;;;;;;;AA0BO,MAAM,oBAAuB,GAAA;AAAA,EAClC,GAAG,gBAAA;AAAA,EACH,GAAG,MAAA;AAAA,EACH,GAAG,cAAA;AAAA,EACH,GAAG,YAAA;AAAA,EACH,GAAG,UAAA;AAAA,EACH,GAAG,SAAA;AAAA,EACH,GAAG,WAAA;AAAA,EACH,GAAG,iBAAA;AAAA,EACH,GAAG,QAAA;AAAA,EACH,GAAG,WAAA;AAAA,EACH,GAAG,OAAA;AACL,EAAA;AACA,sBAAe,eAAgB,CAAA;AAAA,EAC7B,IAAM,EAAA,mBAAA;AAAA,EACN,KAAO,EAAA,oBAAA;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,iBAAA,CAAA;AACvB,IAAc,aAAA,CAAA,KAAA,EAAO,KAAK,QAAQ,CAAA,CAAA;AAElC,IAAA,OAAO,MAAG;AAjDd,MAAA,IAAA,EAAA,CAAA;AAiDiB,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;;;;"}