UNPKG

vue-cesium-jyt

Version:
1 lines 6.22 kB
{"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-01-29 10:15:27\n * @LastEditors: zouyaoji\n * @Description:\n * @FilePath: \\vue-cesium@next\\packages\\components\\primitive-collections\\cloud\\index.ts\n */\nimport type { ExtractPropTypes, PropType } from 'vue'\nimport { createCommentVNode, defineComponent, getCurrentInstance } from 'vue'\nimport type { VcPickEvent, VcCartesian2, VcColor, VcComponentInternalInstance, VcPosition, VcReadyObject } 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 // ...enableMouseEvent\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 // * Specify whether to respond to mouse pick events.\n // * Default Value: true\n // */\n // enableMouseEvent?: boolean\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 VcCumulusCloud is destroyed.\n */\n onDestroyed?: (instance: VcComponentInternalInstance) => void\n // /**\n // * Triggers when the mouse is pressed on this cumulusCloud.\n // */\n // mousedown?: (evt: VcPickEvent) => void\n // /**\n // * Triggers when the mouse bounces up on this cumulusCloud.\n // */\n // mouseup?: (evt: VcPickEvent) => void\n // /**\n // * Triggers when the mouse clicks on this cumulusCloud.\n // */\n // click?: (evt: VcPickEvent) => void\n // /**\n // * Triggers when the mouse clicks outside this cumulusCloud.\n // */\n // clickout?: (evt: VcPickEvent) => void\n // /**\n // * Triggers when the left mouse button double-clicks this cumulusCloud.\n // */\n // dblclick?: (evt: VcPickEvent) => void\n // /**\n // * Triggers when the mouse moves on this cumulusCloud.\n // */\n // mousemove?: (evt: VcPickEvent) => void\n // /**\n // * Triggers when the mouse moves over to this cumulusCloud.\n // */\n // mouseover?: (evt: VcPickEvent) => void\n // /**\n // * \tTriggers when the mouse moves out of this cumulusCloud.\n // */\n // mouseout?: (evt: VcPickEvent) => void\n}\n"],"names":[],"mappings":";;;;;;;;AAMY,MAAC,iBAAiB,GAAG;AACjC,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,GAAG,KAAK;AACV,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,cAAc,EAAE;AACpB,MAAM,mBAAmB,EAAE,cAAc;AACzC,KAAK;AACL,GAAG;AACH,EAAE,GAAG,QAAQ;AACb,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,cAAc,EAAE;AACpB,MAAM,mBAAmB,EAAE,cAAc;AACzC,KAAK;AACL,GAAG;AACH,EAAE,GAAG,IAAI;AACT,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC,CAAC;AACf,GAAG;AACH,EAAE;AACF,mBAAe,eAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,gBAAgB;AACxB,EAAE,KAAK,EAAE,iBAAiB;AAC1B,EAAE,KAAK,EAAE,wBAAwB;AACjC,EAAE,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE;AACpB,IAAI,MAAM,QAAQ,GAAG,kBAAkB,EAAE,CAAC;AAC1C,IAAI,QAAQ,CAAC,WAAW,GAAG,cAAc,CAAC;AAC1C,IAAI,2BAA2B,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC;AACtD,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,EAAE,CAAC,CAAC,CAAC;AAC9G,KAAK,CAAC;AACN,GAAG;AACH,CAAC,CAAC;;;;"}