{"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 'casc-cesium-utils/types'\nimport { defineComponent, getCurrentInstance, createCommentVNode } from 'vue'\nimport { useGeometries } from 'casc-cesium-composables'\nimport { kebabCase } from 'casc-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 'casc-cesium-utils/cesium-props'\nimport { commonEmits } from 'casc-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":";;;;;;;AAiBY,MAAC,oBAAoB,GAAG;AACpC,EAAE,GAAG,gBAAgB;AACrB,EAAE,GAAG,MAAM;AACX,EAAE,GAAG,cAAc;AACnB,EAAE,GAAG,YAAY;AACjB,EAAE,GAAG,UAAU;AACf,EAAE,GAAG,SAAS;AACd,EAAE,GAAG,WAAW;AAChB,EAAE,GAAG,iBAAiB;AACtB,EAAE,GAAG,QAAQ;AACb,EAAE,GAAG,WAAW;AAChB,EAAE,GAAG,OAAO;AACZ,EAAE;AACF,sBAAe,eAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,mBAAmB;AAC3B,EAAE,KAAK,EAAE,oBAAoB;AAC7B,EAAE,KAAK,EAAE,WAAW;AACpB,EAAE,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE;AACpB,IAAI,MAAM,QAAQ,GAAG,kBAAkB,EAAE,CAAC;AAC1C,IAAI,QAAQ,CAAC,WAAW,GAAG,iBAAiB,CAAC;AAC7C,IAAI,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC;AACxC,IAAI,OAAO,MAAM;AACjB,MAAM,IAAI,EAAE,CAAC;AACb,MAAM,OAAO,kBAAkB,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC;AAClH,KAAK,CAAC;AACN,GAAG;AACH,CAAC,CAAC;;;;"}