UNPKG

vue-cesium

Version:
1 lines 7.51 kB
{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/graphics/ellipsoid/index.ts"],"sourcesContent":["/*\n * @Author: zouyaoji@https://github.com/zouyaoji\n * @Date: 2021-09-16 09:28:13\n * @LastEditTime: 2022-04-04 22:25:05\n * @LastEditors: zouyaoji\n * @Description:\n * @FilePath: \\vue-cesium@next\\packages\\components\\graphics\\ellipsoid\\index.ts\n */\nimport { createCommentVNode, defineComponent, getCurrentInstance } from 'vue'\nimport type {\n VcCallbackPropertyFunction,\n VcColor,\n VcComponentInternalInstance,\n VcComponentPublicInstance,\n VcDistanceDisplayCondition,\n VcMaterial,\n VcPosition,\n VcReadyObject\n} from '@vue-cesium/utils/types'\nimport { useGraphics } from '@vue-cesium/composables'\nimport {\n show,\n radii,\n innerRadii,\n minimumClock,\n maximumClock,\n minimumCone,\n maximumCone,\n heightReference,\n fill,\n material,\n outline,\n outlineColor,\n outlineWidth,\n stackPartitions,\n slicePartitions,\n subdivisions,\n shadows,\n distanceDisplayCondition\n} from '@vue-cesium/utils/cesium-props'\nimport { kebabCase } from '@vue-cesium/utils/util'\nimport { commonEmits } from '@vue-cesium/utils/emits'\nexport const ellipsoidGraphicsProps = {\n ...show,\n ...radii,\n ...innerRadii,\n ...minimumClock,\n ...maximumClock,\n ...minimumCone,\n ...maximumCone,\n ...heightReference,\n ...fill,\n ...material,\n ...outline,\n ...outlineColor,\n ...outlineWidth,\n ...stackPartitions,\n ...slicePartitions,\n ...subdivisions,\n ...shadows,\n ...distanceDisplayCondition\n}\nexport default defineComponent({\n name: 'VcGraphicsEllipsoid',\n props: ellipsoidGraphicsProps,\n emits: commonEmits,\n setup(props, ctx) {\n // state\n const instance = getCurrentInstance() as VcComponentInternalInstance\n instance.cesiumClass = 'EllipsoidGraphics'\n useGraphics(props, ctx, instance)\n\n return () => createCommentVNode(kebabCase(instance.proxy?.$options.name || 'v-if'))\n }\n})\n\nexport type VcGraphicsEllipsoidProps = {\n /**\n * A boolean Property specifying the visibility of the ellipsoid.\n * Default value: truec\n */\n show?: boolean | Cesium.CallbackProperty | VcCallbackPropertyFunction<boolean>\n /**\n * A VcPosition Property specifying the radii of the ellipsoid.\n */\n radii?: VcPosition\n /**\n * A VcPosition Property specifying the inner radii of the ellipsoid.\n */\n innerRadii?: VcPosition\n /**\n * A Property specifying the minimum clock angle of the ellipsoid.\n * Default value: 0.0\n */\n minimumClock?: number | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n /**\n * A Property specifying the maximum clock angle of the ellipsoid.\n * Default value: 2*PI\n */\n maximumClock?: number | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n /**\n * A Property specifying the minimum cone angle of the ellipsoid.\n * Default value: 0.0\n */\n minimumCone?: number | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n /**\n * A Property specifying the maximum cone angle of the ellipsoid.\n * Default value: PI\n */\n maximumCone?: number | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n /**\n * A Property specifying what the height from the entity position is relative to.\n * Default value: HeightReference.NONE\n */\n heightReference?: number | Cesium.HeightReference | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n /**\n * \tA numeric Property specifying the altitude of the ellipse's extruded face relative to the ellipsoid surface.\n */\n extrudedHeight?: number | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n /**\n * A Property specifying what the extrudedHeight is relative to.\n * Default value: HeightReference.NONE\n */\n extrudedHeightReference?: number | Cesium.HeightReference | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n /**\n * A boolean Property specifying whether the ellipsoid is filled with the provided material.\n * Default value: true\n */\n fill?: boolean | Cesium.CallbackProperty | VcCallbackPropertyFunction<boolean>\n /**\n * A Property specifying the material used to fill the ellipse.\n * Default value: white\n */\n material?: VcMaterial\n /**\n * A boolean Property specifying whether the ellipsoid is outlined.\n * Default value: false\n */\n outline?: boolean | Cesium.CallbackProperty | VcCallbackPropertyFunction<boolean>\n /**\n * A Property specifying the Color of the outline.\n * Default value: black\n */\n outlineColor?: VcColor\n /**\n * A numeric Property specifying the width of the outline.\n * Default value: 1.0\n */\n outlineWidth?: number | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n /**\n * A Property specifying the number of stacks.\n * Default value: 64\n */\n stackPartitions?: number | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n /**\n * A Property specifying the number of radial slices.\n * Default value: 64\n */\n slicePartitions?: number | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n /**\n * A Property specifying the number of samples per outline ring, determining the granularity of the curvature.\n * Default value: 128\n */\n subdivisions?: number | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n /**\n * An enum Property specifying whether the ellipsoid casts or receives shadows from light sources.\n * Default value: Cesium.ShadowMode.DISABLED\n */\n shadows?: number | Cesium.ShadowMode | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n /**\n * A Property specifying at what distance from the camera that this ellipsoid will be displayed.\n */\n distanceDisplayCondition?: VcDistanceDisplayCondition\n /**\n * Triggers before the VcGraphicsEllipsoid is loaded.\n */\n onBeforeLoad?: (instance: VcComponentInternalInstance) => void\n /**\n * Triggers when the VcGraphicsEllipsoid 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 VcGraphicsEllipsoid 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 VcGraphicsEllipsoidRef = VcComponentPublicInstance<VcGraphicsEllipsoidProps>\n"],"names":[],"mappings":";;;;;;;;AA0CO,MAAM,sBAAyB,GAAA;AAAA,EACpC,GAAG,IAAA;AAAA,EACH,GAAG,KAAA;AAAA,EACH,GAAG,UAAA;AAAA,EACH,GAAG,YAAA;AAAA,EACH,GAAG,YAAA;AAAA,EACH,GAAG,WAAA;AAAA,EACH,GAAG,WAAA;AAAA,EACH,GAAG,eAAA;AAAA,EACH,GAAG,IAAA;AAAA,EACH,GAAG,QAAA;AAAA,EACH,GAAG,OAAA;AAAA,EACH,GAAG,YAAA;AAAA,EACH,GAAG,YAAA;AAAA,EACH,GAAG,eAAA;AAAA,EACH,GAAG,eAAA;AAAA,EACH,GAAG,YAAA;AAAA,EACH,GAAG,OAAA;AAAA,EACH,GAAG,wBAAA;AACL,EAAA;AACA,wBAAe,eAAgB,CAAA;AAAA,EAC7B,IAAM,EAAA,qBAAA;AAAA,EACN,KAAO,EAAA,sBAAA;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,mBAAA,CAAA;AACvB,IAAY,WAAA,CAAA,KAAA,EAAO,KAAK,QAAQ,CAAA,CAAA;AAEhC,IAAA,OAAO,MAAG;AAxEd,MAAA,IAAA,EAAA,CAAA;AAwEiB,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;;;;"}