{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/graphics/corridor/index.ts"],"sourcesContent":["/*\n * @Author: zouyaoji@https://github.com/zouyaoji\n * @Date: 2021-09-16 09:28:13\n * @LastEditTime: 2022-04-08 11:33:34\n * @LastEditors: zouyaoji\n * @Description:\n * @FilePath: \\vue-cesium@next\\packages\\components\\graphics\\corridor\\index.ts\n */\nimport { createCommentVNode, defineComponent, getCurrentInstance } from 'vue'\nimport type {\n  VcCallbackPropertyFunction,\n  VcCartesian3Array,\n  VcColor,\n  VcComponentInternalInstance,\n  VcComponentPublicInstance,\n  VcDistanceDisplayCondition,\n  VcMaterial,\n  VcReadyObject\n} from '@vue-cesium/utils/types'\nimport { useGraphics } from '@vue-cesium/composables'\nimport {\n  show,\n  positions,\n  width,\n  height,\n  heightReference,\n  extrudedHeight,\n  extrudedHeightReference,\n  cornerType,\n  granularity,\n  fill,\n  material,\n  outline,\n  outlineColor,\n  outlineWidth,\n  shadows,\n  distanceDisplayCondition,\n  classificationType,\n  zIndex\n} from '@vue-cesium/utils/cesium-props'\nimport { kebabCase } from '@vue-cesium/utils/util'\nimport { graphicsEmits } from '@vue-cesium/utils/emits'\nconst corridorGraphicsProps = {\n  ...show,\n  ...positions,\n  ...width,\n  ...height,\n  ...heightReference,\n  ...extrudedHeight,\n  ...extrudedHeightReference,\n  ...cornerType,\n  ...granularity,\n  ...fill,\n  ...material,\n  ...outline,\n  ...outlineColor,\n  ...outlineWidth,\n  ...shadows,\n  ...distanceDisplayCondition,\n  ...classificationType,\n  ...zIndex\n}\nexport default defineComponent({\n  name: 'VcGraphicsCorridor',\n  props: corridorGraphicsProps,\n  emits: graphicsEmits,\n  setup(props, ctx) {\n    // state\n    const instance = getCurrentInstance() as VcComponentInternalInstance\n    instance.cesiumClass = 'CorridorGraphics'\n    useGraphics(props, ctx, instance)\n    return () => createCommentVNode(kebabCase(instance.proxy?.$options.name || 'v-if'))\n  }\n})\n\nexport type VcGraphicsCorridorProps = {\n  /**\n   * A boolean Property specifying the visibility of the corridor.\n   */\n  show?: boolean | Cesium.CallbackProperty | VcCallbackPropertyFunction<boolean>\n  /**\n   * A Property specifying the array of VcCartesian3Array positions that define the centerline of the corridor.\n   */\n  positions?: VcCartesian3Array\n  /**\n   * A numeric Property specifying the distance between the edges of the corridor.\n   */\n  width?: number | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n  /**\n   * A numeric Property specifying the altitude of the corridor relative to the ellipsoid surface.\n   */\n  height?: number | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n  /**\n   * A Property specifying what the height is relative to.\n   */\n  heightReference?: number | Cesium.HeightReference | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n  /**\n   * A numeric Property specifying the altitude of the corridor's extruded face relative to the ellipsoid surface.\n   */\n  extrudedHeight?: number | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n  /**\n   * A Property specifying what the extrudedHeight is relative to.\n   */\n  extrudedHeightReference?: number | Cesium.HeightReference | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n  /**\n   * A CornerType Property specifying the style of the corners.\n   */\n  cornerType?: number | Cesium.CornerType | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n  /**\n   * A numeric Property specifying the distance between each latitude and longitude.\n   */\n  granularity?: number | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n  /**\n   * A boolean Property specifying whether the corridor is filled with the provided material.\n   * Default value: true\n   */\n  fill?: boolean | Cesium.CallbackProperty | VcCallbackPropertyFunction<boolean>\n  /**\n   * A Property specifying the material used to fill the corridor.\n   * Default value: white\n   */\n  material?: VcMaterial\n  /**\n   * A boolean Property specifying whether the corridor is outlined.\n   * Default value: false\n   */\n  outline?: boolean | Cesium.CallbackProperty | VcCallbackPropertyFunction<boolean>\n  /**\n   * A Property specifying the Color of the outline.\n   * Default value: black\n   */\n  outlineColor?: VcColor\n  /**\n   * A numeric Property specifying the width of the outline.\n   * Default value: 1.0\n   */\n  outlineWidth?: number | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n  /**\n   * An enum Property specifying whether the corridor casts or receives shadows from light sources.\n   * Default value: Cesium.ShadowMode.DISABLED\n   */\n  shadows?: number | Cesium.ShadowMode | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n  /**\n   * A Property specifying at what distance from the camera that this corridor will be displayed.\n   */\n  distanceDisplayCondition?: VcDistanceDisplayCondition\n  /**\n   * An enum Property specifying whether this corridor will classify terrain, 3D Tiles, or both when on the ground.\n   * Deault value: Cesium.ClassificationType.BOTH\n   */\n  classificationType?: number | Cesium.ShadowMode | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n  /**\n   * A Property specifying the zIndex of the corridor, used for ordering. Only has an effect if height and extrudedHeight are undefined, and if the corridor is static.\n   */\n  zIndex?: number\n  /**\n   * Triggers before the VcGraphicsCorridor is loaded.\n   */\n  onBeforeLoad?: (instance: VcComponentInternalInstance) => void\n  /**\n   * Triggers when the VcGraphicsCorridor 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 VcGraphicsCorridor is destroyed.\n   */\n  onDestroyed?: (instance: VcComponentInternalInstance) => void\n  /**\n   * Triggers when a property or sub-property is changed or modified.\n   */\n  onDefinitionChanged?: (property: Cesium.Property) => void\n}\n\nexport type VcGraphicsCorridorRef = VcComponentPublicInstance<VcGraphicsCorridorProps>\n"],"names":[],"mappings":";;;;;;;;AA0CA,MAAM,qBAAwB,GAAA;AAAA,EAC5B,GAAG,IAAA;AAAA,EACH,GAAG,SAAA;AAAA,EACH,GAAG,KAAA;AAAA,EACH,GAAG,MAAA;AAAA,EACH,GAAG,eAAA;AAAA,EACH,GAAG,cAAA;AAAA,EACH,GAAG,uBAAA;AAAA,EACH,GAAG,UAAA;AAAA,EACH,GAAG,WAAA;AAAA,EACH,GAAG,IAAA;AAAA,EACH,GAAG,QAAA;AAAA,EACH,GAAG,OAAA;AAAA,EACH,GAAG,YAAA;AAAA,EACH,GAAG,YAAA;AAAA,EACH,GAAG,OAAA;AAAA,EACH,GAAG,wBAAA;AAAA,EACH,GAAG,kBAAA;AAAA,EACH,GAAG,MAAA;AACL,CAAA,CAAA;AACA,uBAAe,eAAgB,CAAA;AAAA,EAC7B,IAAM,EAAA,oBAAA;AAAA,EACN,KAAO,EAAA,qBAAA;AAAA,EACP,KAAO,EAAA,aAAA;AAAA,EACP,KAAA,CAAM,OAAO,GAAK,EAAA;AAEhB,IAAA,MAAM,WAAW,kBAAmB,EAAA,CAAA;AACpC,IAAA,QAAA,CAAS,WAAc,GAAA,kBAAA,CAAA;AACvB,IAAY,WAAA,CAAA,KAAA,EAAO,KAAK,QAAQ,CAAA,CAAA;AAChC,IAAA,OAAO,MAAG;AAvEd,MAAA,IAAA,EAAA,CAAA;AAuEiB,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;;;;"}