UNPKG

casc-cesium

Version:

Vue 3.x components for CesiumJS.

1 lines 3.66 kB
{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/geometries/circle-outline/index.ts"],"sourcesContent":["/*\n * @Author: zouyaoji@https://github.com/zouyaoji\n * @Date: 2021-09-16 09:28:13\n * @LastEditTime: 2022-03-30 10:32:22\n * @LastEditors: zouyaoji\n * @Description:\n * @FilePath: \\vue-cesium@next\\packages\\components\\geometries\\circle-outline\\index.ts\n */\nimport { VcComponentInternalInstance, VcComponentPublicInstance, VcPosition, VcReadyObject } from 'casc-cesium-utils/types'\nimport { defineComponent, getCurrentInstance, createCommentVNode } from 'vue'\nimport { useGeometries } from 'casc-cesium-composables'\nimport { kebabCase } from 'casc-cesium-utils/util'\nimport { center, radius, ellipsoid, height, granularity, extrudedHeight, numberOfVerticalLines } from 'casc-cesium-utils/cesium-props'\nimport { commonEmits } from 'casc-cesium-utils/emits'\nexport const circleOutlineGeometryProps = {\n ...center,\n ...radius,\n ...ellipsoid,\n ...height,\n ...granularity,\n ...extrudedHeight,\n ...numberOfVerticalLines\n}\nexport default defineComponent({\n name: 'VcGeometryCircleOutline',\n props: circleOutlineGeometryProps,\n emits: commonEmits,\n setup(props, ctx) {\n // state\n const instance = getCurrentInstance() as VcComponentInternalInstance\n instance.cesiumClass = 'CircleOutlineGeometry'\n useGeometries(props, ctx, instance)\n\n return () => createCommentVNode(kebabCase(instance.proxy?.$options.name || 'v-if'))\n }\n})\n\nexport type VcGeometryCircleOutlineProps = {\n /**\n * The circle's center point in the fixed frame.\n */\n center: VcPosition\n /**\n * The radius in meters.\n */\n radius?: number\n /**\n * The ellipsoid the circle will be on.\n */\n ellipsoid?: Cesium.Ellipsoid\n /**\n * The distance in meters between the circle and the ellipsoid surface.\n */\n height?: number\n /**\n * The angular distance between points on the circle in radians.\n */\n granularity?: number\n /**\n * The distance in meters between the circle's extruded face and the ellipsoid surface.\n */\n extrudedHeight?: number\n /**\n * Number of lines to draw between the top and bottom of an extruded circle.\n * Default value: 16\n */\n numberOfVerticalLines?: number\n /**\n * Triggers before the VcGeometryCircleOutline is loaded.\n */\n onBeforeLoad?: (instance: VcComponentInternalInstance) => void\n /**\n * Triggers when the VcGeometryCircleOutline 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 VcGeometryCircleOutline is destroyed.\n */\n onDestroyed?: (instance: VcComponentInternalInstance) => void\n}\n\nexport type VcGeometryCircleOutlineRef = VcComponentPublicInstance<VcGeometryCircleOutlineProps>\n"],"names":[],"mappings":";;;;;;;AAKY,MAAC,0BAA0B,GAAG;AAC1C,EAAE,GAAG,MAAM;AACX,EAAE,GAAG,MAAM;AACX,EAAE,GAAG,SAAS;AACd,EAAE,GAAG,MAAM;AACX,EAAE,GAAG,WAAW;AAChB,EAAE,GAAG,cAAc;AACnB,EAAE,GAAG,qBAAqB;AAC1B,EAAE;AACF,4BAAe,eAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,yBAAyB;AACjC,EAAE,KAAK,EAAE,0BAA0B;AACnC,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,uBAAuB,CAAC;AACnD,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;;;;"}