{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/graphics/point/index.ts"],"sourcesContent":["/*\n * @Author: zouyaoji@https://github.com/zouyaoji\n * @Date: 2021-09-16 09:28:13\n * @LastEditTime: 2022-04-06 11:38:31\n * @LastEditors: zouyaoji\n * @Description:\n * @FilePath: \\vue-cesium@next\\packages\\components\\graphics\\point\\index.ts\n */\nimport { createCommentVNode, defineComponent, getCurrentInstance } from 'vue'\nimport type {\n  VcCallbackPropertyFunction,\n  VcColor,\n  VcComponentInternalInstance,\n  VcComponentPublicInstance,\n  VcDistanceDisplayCondition,\n  VcNearFarScalar,\n  VcReadyObject\n} from 'casc-cesium-utils/types'\nimport { useGraphics } from 'casc-cesium-composables'\nimport {\n  show,\n  pixelSize,\n  heightReference,\n  color,\n  outlineColor,\n  outlineWidth,\n  scaleByDistance,\n  translucencyByDistance,\n  distanceDisplayCondition,\n  disableDepthTestDistance\n} from 'casc-cesium-utils/cesium-props'\nimport { kebabCase } from 'casc-cesium-utils/util'\nimport { commonEmits } from 'casc-cesium-utils/emits'\nexport const pointGraphicsProps = {\n  ...show,\n  ...pixelSize,\n  ...heightReference,\n  ...color,\n  ...outlineColor,\n  ...outlineWidth,\n  ...scaleByDistance,\n  ...translucencyByDistance,\n  ...distanceDisplayCondition,\n  ...disableDepthTestDistance\n}\nexport default defineComponent({\n  name: 'VcGraphicsPoint',\n  props: pointGraphicsProps,\n  emits: commonEmits,\n  setup(props, ctx) {\n    // state\n    const instance = getCurrentInstance() as VcComponentInternalInstance\n    instance.cesiumClass = 'PointGraphics'\n    useGraphics(props, ctx, instance)\n\n    return () => createCommentVNode(kebabCase(instance.proxy?.$options.name || 'v-if'))\n  }\n})\n\nexport type VcGraphicsPointProps = {\n  /**\n   * A boolean Property specifying the visibility of the point.\n   * Default value: true\n   */\n  show?: boolean | Cesium.CallbackProperty | VcCallbackPropertyFunction<boolean>\n  /**\n   * A numeric Property specifying the size in pixels.\n   * Default value: 1\n   */\n  pixelSize?: number | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n  /**\n   * A Property specifying what the height is relative to.\n   * Default value: Cesium.HeightReference.NONE\n   */\n  heightReference?: number | Cesium.HeightReference | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n  /**\n   * A Property specifying the VcColor of the point.\n   * Default value: white\n   */\n  color?: VcColor\n  /**\n   * A Property specifying the VcColor of the outline.\n   * Default value: black\n   */\n  outlineColor?: VcColor\n  /**\n   * A numeric Property specifying the the outline width in pixels.\n   * Default value: 1.0\n   */\n  outlineWidth?: number | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n  /**\n   * A VcNearFarScalar Property used to scale the point based on distance.\n   */\n  scaleByDistance?: VcNearFarScalar\n  /**\n   * A VcNearFarScalar Property used to set translucency based on distance from the camera.\n   */\n  translucencyByDistance?: VcNearFarScalar\n  /**\n   * A Property specifying at what distance from the camera that this point will be displayed.\n   */\n  distanceDisplayCondition?: VcDistanceDisplayCondition\n  /**\n   * A Property specifying the distance from the camera at which to disable the depth test to.\n   */\n  disableDepthTestDistance?: number | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n  /**\n   * Triggers before the VcGraphicsPoint is loaded.\n   */\n  onBeforeLoad?: (instance: VcComponentInternalInstance) => void\n  /**\n   * Triggers when the VcGraphicsPoint 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 VcGraphicsPoint 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 VcGraphicsPointRef = VcComponentPublicInstance<VcGraphicsPointProps>\n"],"names":[],"mappings":";;;;;;;AAgBY,MAAC,kBAAkB,GAAG;AAClC,EAAE,GAAG,IAAI;AACT,EAAE,GAAG,SAAS;AACd,EAAE,GAAG,eAAe;AACpB,EAAE,GAAG,KAAK;AACV,EAAE,GAAG,YAAY;AACjB,EAAE,GAAG,YAAY;AACjB,EAAE,GAAG,eAAe;AACpB,EAAE,GAAG,sBAAsB;AAC3B,EAAE,GAAG,wBAAwB;AAC7B,EAAE,GAAG,wBAAwB;AAC7B,EAAE;AACF,oBAAe,eAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,iBAAiB;AACzB,EAAE,KAAK,EAAE,kBAAkB;AAC3B,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,eAAe,CAAC;AAC3C,IAAI,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC;AACtC,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;;;;"}