vue-cesium-jyt
Version:
Vue 3.x components for CesiumJS.
1 lines • 3.96 kB
Source Map (JSON)
{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/geometries/polyline/index.ts"],"sourcesContent":["/*\n * @Author: zouyaoji@https://github.com/zouyaoji\n * @Date: 2021-09-16 09:28:13\n * @LastEditTime: 2022-01-20 22:48:35\n * @LastEditors: zouyaoji\n * @Description:\n * @FilePath: \\vue-cesium@next\\packages\\components\\geometries\\polyline\\index.ts\n */\nimport { VcCartesian3Array, VcColor, VcComponentInternalInstance, VcReadyObject } from '@vue-cesium/utils/types'\nimport { defineComponent, getCurrentInstance, createCommentVNode } from 'vue'\nimport type { ExtractPropTypes } from 'vue'\nimport { useGeometries } from '@vue-cesium/composables'\nimport { kebabCase } from '@vue-cesium/utils/util'\nimport { positions, width, colors, arcType, granularity, vertexFormat, ellipsoid } from '@vue-cesium/utils/cesium-props'\nimport { commonEmits } from '@vue-cesium/utils/emits'\nexport const polylineGeometryProps = {\n ...positions,\n ...width,\n ...colors,\n colorsPerVertex: {\n type: Boolean,\n default: false\n },\n ...arcType,\n ...granularity,\n ...vertexFormat,\n ...ellipsoid\n}\nexport default defineComponent({\n name: 'VcGeometryPolyline',\n props: polylineGeometryProps,\n emits: commonEmits,\n setup(props, ctx) {\n // state\n const instance = getCurrentInstance() as VcComponentInternalInstance\n instance.cesiumClass = 'PolylineGeometry'\n useGeometries(props, ctx, instance)\n\n return () => createCommentVNode(kebabCase(instance.proxy?.$options.name || 'v-if'))\n }\n})\n\n// export type VcGeometryPolylineProps = ExtractPropTypes<typeof polylineGeometryProps>\nexport type VcGeometryPolylineProps = {\n /**\n * An array of VcCartesian3Array defining the positions in the polyline as a line strip\n */\n positions?: VcCartesian3Array\n /**\n * The width in pixels\n * Default value: 1.0\n */\n width?: number\n /**\n * An Array of VcColor defining the per vertex or per segment colors\n */\n colors?: Array<VcColor>\n /**\n * A boolean that determines whether the colors will be flat across each segment of the line or interpolated across the vertices\n * Default value: false\n */\n colorsPerVertex?: boolean\n /**\n * The type of line the polyline segments must follow\n * Default value: 1 - Cesium.ArcType.GEODESIC\n */\n arcType?: Cesium.ArcType | number\n /**\n * The distance, in radians, between each latitude and longitude if options.arcType is not ArcType.NONE. Determines the number of positions in the buffer\n */\n granularity?: number\n /**\n * The vertex attributes to be computed.\n */\n vertexFormat?: Cesium.VertexFormat\n /**\n * The ellipsoid to be used as a reference.\n */\n ellipsoid?: Cesium.Ellipsoid\n /**\n * Triggers before the VcPoint is loaded\n */\n onBeforeLoad?: (instance: VcComponentInternalInstance) => void\n /**\n * Triggers when the VcPoint is successfully loaded\n */\n onReady?: (readyObject: VcReadyObject) => void\n /**\n * Triggers when the VcPoint is destroyed\n */\n onDestroyed?: (instance: VcComponentInternalInstance) => void\n}\n"],"names":[],"mappings":";;;;;;;AAKY,MAAC,qBAAqB,GAAG;AACrC,EAAE,GAAG,SAAS;AACd,EAAE,GAAG,KAAK;AACV,EAAE,GAAG,MAAM;AACX,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,GAAG,OAAO;AACZ,EAAE,GAAG,WAAW;AAChB,EAAE,GAAG,YAAY;AACjB,EAAE,GAAG,SAAS;AACd,EAAE;AACF,uBAAe,eAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,oBAAoB;AAC5B,EAAE,KAAK,EAAE,qBAAqB;AAC9B,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,kBAAkB,CAAC;AAC9C,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;;;;"}