{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/primitives/ground-polyline/index.ts"],"sourcesContent":["/*\n * @Author: zouyaoji@https://github.com/zouyaoji\n * @Date: 2021-09-16 09:28:13\n * @LastEditTime: 2022-01-25 11:38:38\n * @LastEditors: zouyaoji\n * @Description:\n * @FilePath: \\vue-cesium@next\\packages\\components\\primitives\\ground-polyline\\index.ts\n */\n// import type { ExtractPropTypes } from 'vue'\nimport { createCommentVNode, defineComponent, getCurrentInstance, h } from 'vue'\nimport type { VcAppearance, VcComponentInternalInstance, VcPickEvent, VcReadyObject } from '@vue-cesium/utils/types'\nimport { usePrimitives } from '@vue-cesium/composables'\nimport {\n  geometryInstances,\n  appearance,\n  show,\n  interleave,\n  compressVertices,\n  releaseGeometryInstances,\n  allowPicking,\n  asynchronous,\n  classificationType,\n  debugShowBoundingVolume,\n  debugShowShadowVolume,\n  enableMouseEvent\n} from '@vue-cesium/utils/cesium-props'\nimport { kebabCase } from '@vue-cesium/utils/util'\nimport { hSlot } from '@vue-cesium/utils/private/render'\nimport { primitiveEmits } from '@vue-cesium/utils/emits'\n\nexport const groundPolylinePrimitiveProps = {\n  ...geometryInstances,\n  ...appearance,\n  ...show,\n  ...interleave,\n  ...compressVertices,\n  ...releaseGeometryInstances,\n  ...allowPicking,\n  ...asynchronous,\n  ...classificationType,\n  ...debugShowBoundingVolume,\n  ...debugShowShadowVolume,\n  ...enableMouseEvent\n}\nexport default defineComponent({\n  name: 'VcPrimitiveGroundPolyline',\n  props: groundPolylinePrimitiveProps,\n  emits: primitiveEmits,\n  setup(props, ctx) {\n    // state\n    const instance = getCurrentInstance() as VcComponentInternalInstance\n    instance.cesiumClass = 'GroundPolylinePrimitive'\n    usePrimitives(props, ctx, instance)\n\n    const name = instance.proxy?.$options.name || ''\n    return () =>\n      ctx.slots.default\n        ? h(\n            'i',\n            {\n              class: kebabCase(name),\n              style: { display: 'none !important' }\n            },\n            hSlot(ctx.slots.default)\n          )\n        : createCommentVNode(kebabCase(name))\n  }\n})\n\n// export type VcPrimitiveGroundPolylineProps = ExtractPropTypes<typeof groundPolylinePrimitiveProps>\nexport type VcPrimitiveGroundPolylineProps = {\n  /**\n   * GeometryInstances containing GroundPolylineGeometry\n   */\n  geometryInstances?: Cesium.GeometryInstance | Array<Cesium.GeometryInstance>\n  /**\n   * The Appearance used to render the polyline. Defaults to a white color Material on a PolylineMaterialAppearance.\n   */\n  appearance?: VcAppearance\n  /**\n   * Determines if this primitive will be shown.\n   * Default value: true\n   */\n  show?: boolean\n  /**\n   * When true, geometry vertex attributes are interleaved, which can slightly improve rendering performance but increases load time.\n   * Default value: false\n   */\n  interleave?: boolean\n  /**\n   * When true, the primitive does not keep a reference to the input geometryInstances to save memory.\n   * Default value: true\n   */\n  releaseGeometryInstances?: boolean\n  /**\n   * When true, each geometry instance will only be pickable with Scene#pick. When false, GPU memory is saved.\n   * Default value: true\n   */\n  allowPicking?: boolean\n  /**\n   * Determines if the primitive will be created asynchronously or block until ready.\n   * Default value: true\n   */\n  asynchronous?: boolean\n  /**\n   * Determines whether terrain, 3D Tiles or both will be classified.\n   * Default value: ClassificationType.BOTH(2)\n   */\n  classificationType?: number\n  /**\n   * For debugging only. Determines if this primitive's commands' bounding spheres are shown.\n   * Default value: false\n   */\n  debugShowBoundingVolume?: boolean\n  /**\n   * For debugging only. Determines if the shadow volume for each geometry in the primitive is drawn. Must be true on creation to have effect.\n   * Default value: false\n   */\n  debugShowShadowVolume?: boolean\n  /**\n   * Specifies whether to respond to mouse pick events.\n   * Default Value: true\n   */\n  enableMouseEvent?: boolean\n  /**\n   * Triggers before the component is loaded.\n   */\n  onBeforeLoad?: (instance: VcComponentInternalInstance) => void\n  /**\n   * Triggers when the component is successfully loaded.\n   */\n  onReady?: (readyObject: VcReadyObject) => void\n  /**\n   * Triggers when the component is destroyed.\n   */\n  onDestroyed?: (instance: VcComponentInternalInstance) => void\n  /**\n   * Triggers when the mouse is pressed on this primitive.\n   */\n  mousedown?: (evt: VcPickEvent) => void\n  /**\n   * Triggers when the mouse bounces up on this primitive.\n   */\n  mouseup?: (evt: VcPickEvent) => void\n  /**\n   * Triggers when the mouse clicks on this primitive.\n   */\n  click?: (evt: VcPickEvent) => void\n  /**\n   * Triggers when the mouse clicks outside this primitive.\n   */\n  clickout?: (evt: VcPickEvent) => void\n  /**\n   * Triggers when the left mouse button double-clicks this primitive.\n   */\n  dblclick?: (evt: VcPickEvent) => void\n  /**\n   * Triggers when the mouse moves on this primitive.\n   */\n  mousemove?: (evt: VcPickEvent) => void\n  /**\n   * Triggers when the mouse moves over to this primitive.\n   */\n  mouseover?: (evt: VcPickEvent) => void\n  /**\n   * \tTriggers when the mouse moves out of this primitive.\n   */\n  mouseout?: (evt: VcPickEvent) => void\n}\n"],"names":[],"mappings":";;;;;;;;AAmBY,MAAC,4BAA4B,GAAG;AAC5C,EAAE,GAAG,iBAAiB;AACtB,EAAE,GAAG,UAAU;AACf,EAAE,GAAG,IAAI;AACT,EAAE,GAAG,UAAU;AACf,EAAE,GAAG,gBAAgB;AACrB,EAAE,GAAG,wBAAwB;AAC7B,EAAE,GAAG,YAAY;AACjB,EAAE,GAAG,YAAY;AACjB,EAAE,GAAG,kBAAkB;AACvB,EAAE,GAAG,uBAAuB;AAC5B,EAAE,GAAG,qBAAqB;AAC1B,EAAE,GAAG,gBAAgB;AACrB,EAAE;AACF,8BAAe,eAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,2BAA2B;AACnC,EAAE,KAAK,EAAE,4BAA4B;AACrC,EAAE,KAAK,EAAE,cAAc;AACvB,EAAE,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE;AACpB,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,MAAM,QAAQ,GAAG,kBAAkB,EAAE,CAAC;AAC1C,IAAI,QAAQ,CAAC,WAAW,GAAG,yBAAyB,CAAC;AACrD,IAAI,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC;AACxC,IAAI,MAAM,IAAI,GA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