vue-cesium
Version:
Vue 3.x components for CesiumJS.
1 lines • 5.13 kB
Source Map (JSON)
{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/primitive-collections/cloud/index.ts"],"sourcesContent":["/*\n * @Author: zouyaoji@https://github.com/zouyaoji\n * @Date: 2022-01-28 11:13:56\n * @LastEditTime: 2022-03-11 10:46:42\n * @LastEditors: zouyaoji\n * @Description:\n * @FilePath: \\vue-cesium@next\\packages\\components\\primitive-collections\\cloud\\index.ts\n */\nimport type { PropType } from 'vue'\nimport { createCommentVNode, defineComponent, getCurrentInstance } from 'vue'\nimport type {\n VcCartesian2,\n VcColor,\n VcComponentInternalInstance,\n VcComponentPublicInstance,\n VcPosition,\n VcReadyObject\n} from '@vue-cesium/utils/types'\nimport { usePrimitiveCollectionItems } from '@vue-cesium/composables'\nimport { color, position, show, enableMouseEvent } from '@vue-cesium/utils/cesium-props'\nimport { kebabCase } from '@vue-cesium/utils/util'\nimport { primitiveCollectionEmits } from '@vue-cesium/utils/emits'\nimport { makeCartesian2, makeCartesian3 } from '@vue-cesium/utils/cesium-helpers'\n\nexport const cumulusCloudProps = {\n brightness: {\n type: Number,\n default: 1.0\n },\n ...color,\n maximumSize: {\n type: Object as PropType<VcPosition>,\n watcherOptions: {\n cesiumObjectBuilder: makeCartesian3\n }\n },\n ...position,\n scale: {\n type: Object as PropType<VcCartesian2>,\n watcherOptions: {\n cesiumObjectBuilder: makeCartesian2\n }\n },\n ...show,\n slice: {\n type: Number,\n default: -1.0\n }\n}\nexport default defineComponent({\n name: 'VcCumulusCloud',\n props: cumulusCloudProps,\n emits: primitiveCollectionEmits,\n setup(props, ctx) {\n // state\n const instance = getCurrentInstance() as VcComponentInternalInstance\n instance.cesiumClass = 'CumulusCloud'\n usePrimitiveCollectionItems(props, ctx, instance)\n\n return () => createCommentVNode(kebabCase(instance.proxy?.$options.name || ''))\n }\n})\n\n// export type VcCumulusCloudProps = ExtractPropTypes<typeof cumulusCloudProps>\nexport type VcCumulusCloudProps = {\n /**\n * Specify the brightness of the cloud. This can be used to give clouds a darker, grayer appearance.\n */\n brightness?: number\n /**\n * Specify the color of the cloud.\n * Default Value: white\n */\n color?: VcColor\n /**\n * Specify the maximum size of the cumulus cloud rendered on the billboard. This defines a maximum ellipsoid volume that the cloud can appear in. Rather than guaranteeing a specific size, this specifies a boundary for the cloud to appear in, and changing it can affect the shape of the cloud.\n */\n maximumSize?: VcPosition\n /**\n * Specify the Cartesian position of this cumulus cloud.\n */\n position?: VcPosition\n /**\n * Specify the scale of the cumulus cloud billboard in meters. The scale property will affect the size of the billboard, but not the cloud's actual appearance.\n */\n scale?: VcCartesian2\n /**\n * Determines if this cumulus cloud will be shown. Use this to hide or show a cloud, instead of removing it and re-adding it to the collection.\n * Default Value: true\n */\n show?: boolean\n /**\n * If slice is set to a negative number, the cloud will not render a cross-section. Instead, it will render the outside of the ellipsoid that is visible. For clouds with small values of `maximumSize.z`, this can produce good-looking results, but for larger clouds, this can result in a cloud that is undesirably warped to the ellipsoid volume.\n * Default Value: -1.0\n */\n slice?: number\n /**\n * Triggers before the VcCumulusCloud is loaded.\n */\n onBeforeLoad?: (instance: VcComponentInternalInstance) => void\n /**\n * Triggers when the VcCumulusCloud 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 VcCumulusCloud is destroyed.\n */\n onDestroyed?: (instance: VcComponentInternalInstance) => void\n}\n\nexport type VcCumulusCloudRef = VcComponentPublicInstance<VcCumulusCloudProps>\n"],"names":[],"mappings":";;;;;;;;;AAwBO,MAAM,iBAAoB,GAAA;AAAA,EAC/B,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,CAAA;AAAA,GACX;AAAA,EACA,GAAG,KAAA;AAAA,EACH,WAAa,EAAA;AAAA,IACX,IAAM,EAAA,MAAA;AAAA,IACN,cAAgB,EAAA;AAAA,MACd,mBAAqB,EAAA,cAAA;AAAA,KACvB;AAAA,GACF;AAAA,EACA,GAAG,QAAA;AAAA,EACH,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,IACN,cAAgB,EAAA;AAAA,MACd,mBAAqB,EAAA,cAAA;AAAA,KACvB;AAAA,GACF;AAAA,EACA,GAAG,IAAA;AAAA,EACH,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,CAAA,CAAA;AAAA,GACX;AACF,EAAA;AACA,mBAAe,eAAgB,CAAA;AAAA,EAC7B,IAAM,EAAA,gBAAA;AAAA,EACN,KAAO,EAAA,iBAAA;AAAA,EACP,KAAO,EAAA,wBAAA;AAAA,EACP,KAAA,CAAM,OAAO,GAAK,EAAA;AAEhB,IAAA,MAAM,WAAW,kBAAmB,EAAA,CAAA;AACpC,IAAA,QAAA,CAAS,WAAc,GAAA,cAAA,CAAA;AACvB,IAA4B,2BAAA,CAAA,KAAA,EAAO,KAAK,QAAQ,CAAA,CAAA;AAEhD,IAAA,OAAO,MAAG;AA3Dd,MAAA,IAAA,EAAA,CAAA;AA2DiB,MAAA,OAAA,kBAAA,CAAmB,YAAU,EAAS,GAAA,QAAA,CAAA,KAAA,KAAT,mBAAgB,QAAS,CAAA,IAAA,KAAQ,EAAE,CAAC,CAAA,CAAA;AAAA,KAAA,CAAA;AAAA,GAChF;AACF,CAAC,CAAA;;;;"}