UNPKG

vue-cesium

Version:
1 lines 3.5 kB
{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/geometries/ground-polyline/index.ts"],"sourcesContent":["/*\n * @Author: zouyaoji@https://github.com/zouyaoji\n * @Date: 2021-09-16 09:28:13\n * @LastEditTime: 2022-03-30 11:00:34\n * @LastEditors: zouyaoji\n * @Description:\n * @FilePath: \\vue-cesium@next\\packages\\components\\geometries\\ground-polyline\\index.ts\n */\nimport { VcCartesian3Array, VcComponentInternalInstance, VcComponentPublicInstance, 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 { positions, width, granularity, loop, arcType } from '@vue-cesium/utils/cesium-props'\nimport { commonEmits } from '@vue-cesium/utils/emits'\nexport const groundPolylineGeometryProps = {\n ...positions,\n ...width,\n ...granularity,\n ...loop,\n ...arcType\n}\nexport default defineComponent({\n name: 'VcGeometryGroundPolyline',\n props: groundPolylineGeometryProps,\n emits: commonEmits,\n setup(props, ctx) {\n // state\n const instance = getCurrentInstance() as VcComponentInternalInstance\n instance.cesiumClass = 'GroundPolylineGeometry'\n useGeometries(props, ctx, instance)\n\n return () => createCommentVNode(kebabCase(instance.proxy?.$options.name || 'v-if'))\n }\n})\n\nexport type VcGeometryGroundPolylineProps = {\n /**\n * An array of Cartesian3 defining the polyline's points. Heights above the ellipsoid will be ignored.\n */\n positions: VcCartesian3Array\n /**\n * The screen space width in pixels.\n */\n width?: number\n /**\n * The distance interval in meters used for interpolating options.points. Defaults to 9999.0 meters. Zero indicates no interpolation.\n */\n granularity?: number\n /**\n * Whether during geometry creation a line segment will be added between the last and first line positions to make this Polyline a loop.\n * Defalut value: false\n */\n loop?: boolean\n /**\n * The type of line the polyline segments must follow. Valid options are ArcType.GEODESIC and ArcType.RHUMB.\n */\n arcType?: number | Cesium.ArcType\n /**\n * Triggers before the VcGeometryGroundPolyline is loaded.\n */\n onBeforeLoad?: (instance: VcComponentInternalInstance) => void\n /**\n * Triggers when the VcGeometryGroundPolyline 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 VcGeometryGroundPolyline is destroyed.\n */\n onDestroyed?: (instance: VcComponentInternalInstance) => void\n}\n\nexport type VcGeometryGroundPolylineRef = VcComponentPublicInstance<VcGeometryGroundPolylineProps>\n"],"names":[],"mappings":";;;;;;;;AAcO,MAAM,2BAA8B,GAAA;AAAA,EACzC,GAAG,SAAA;AAAA,EACH,GAAG,KAAA;AAAA,EACH,GAAG,WAAA;AAAA,EACH,GAAG,IAAA;AAAA,EACH,GAAG,OAAA;AACL,EAAA;AACA,6BAAe,eAAgB,CAAA;AAAA,EAC7B,IAAM,EAAA,0BAAA;AAAA,EACN,KAAO,EAAA,2BAAA;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,wBAAA,CAAA;AACvB,IAAc,aAAA,CAAA,KAAA,EAAO,KAAK,QAAQ,CAAA,CAAA;AAElC,IAAA,OAAO,MAAG;AA/Bd,MAAA,IAAA,EAAA,CAAA;AA+BiB,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;;;;"}