casc-cesium
Version:
Vue 3.x components for CesiumJS.
1 lines • 5.68 kB
Source Map (JSON)
{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/graphics/polylineVolume/index.ts"],"sourcesContent":["/*\n * @Author: zouyaoji@https://github.com/zouyaoji\n * @Date: 2021-09-16 09:28:13\n * @LastEditTime: 2022-04-06 13:37:54\n * @LastEditors: zouyaoji\n * @Description:\n * @FilePath: \\vue-cesium@next\\packages\\components\\graphics\\polylineVolume\\index.ts\n */\nimport { createCommentVNode, defineComponent, getCurrentInstance } from 'vue'\nimport type {\n VcCallbackPropertyFunction,\n VcCartesian2Array,\n VcCartesian3Array,\n VcColor,\n VcComponentInternalInstance,\n VcComponentPublicInstance,\n VcDistanceDisplayCondition,\n VcMaterial,\n VcReadyObject\n} from 'casc-cesium-utils/types'\nimport { useGraphics } from 'casc-cesium-composables'\nimport {\n show,\n positions,\n shape,\n cornerType,\n granularity,\n fill,\n material,\n outline,\n outlineColor,\n outlineWidth,\n shadows,\n distanceDisplayCondition\n} from 'casc-cesium-utils/cesium-props'\nimport { kebabCase } from 'casc-cesium-utils/util'\nimport { commonEmits } from 'casc-cesium-utils/emits'\n\nexport const polylineVolumeGraphicsProps = {\n ...show,\n ...positions,\n ...shape,\n ...cornerType,\n ...granularity,\n ...fill,\n ...material,\n ...outline,\n ...outlineColor,\n ...outlineWidth,\n ...shadows,\n ...distanceDisplayCondition\n}\nexport default defineComponent({\n name: 'VcGraphicsPolylineVolume',\n props: polylineVolumeGraphicsProps,\n emits: commonEmits,\n setup(props, ctx) {\n // state\n const instance = getCurrentInstance() as VcComponentInternalInstance\n instance.cesiumClass = 'PolylineVolumeGraphics'\n useGraphics(props, ctx, instance)\n\n return () => createCommentVNode(kebabCase(instance.proxy?.$options.name || 'v-if'))\n }\n})\n\nexport type VcGraphicsPolylineVolumeProps = {\n /**\n * A boolean Property specifying the visibility of the volume.\n * Default value: true\n */\n show?: boolean | Cesium.CallbackProperty | VcCallbackPropertyFunction<boolean>\n /**\n * A Property specifying the array of VcCartesian3Array positions which define the line strip.\n */\n positions?: VcCartesian3Array\n /**\n * A Property specifying the array of Cartesian2 positions which define the shape to be extruded.\n */\n shape?: VcCartesian2Array\n /**\n * A CornerType Property specifying the style of the corners.\n * Default value: Cesium.CornerType.ROUNDED\n */\n cornerType?: number | Cesium.CornerType | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n /**\n * A numeric Property specifying the angular distance between each latitude and longitude point.\n */\n granularity?: number | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n /**\n * A boolean Property specifying whether the volume 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 volume.\n * Default value: white\n */\n material?: VcMaterial\n /**\n * A boolean Property specifying whether the volume 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 the outline width in pixels.\n * Default value: 1.0\n */\n outlineWidth?: number | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n /**\n * An enum Property specifying whether the volume 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 volume will be displayed.\n */\n distanceDisplayCondition?: VcDistanceDisplayCondition\n /**\n * Triggers before the VcGraphicsPolylineVolume is loaded.\n */\n onBeforeLoad?: (instance: VcComponentInternalInstance) => void\n /**\n * Triggers when the VcGraphicsPolylineVolume 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 VcGraphicsPolylineVolume 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 VcGraphicsPolylineVolumeRef = VcComponentPublicInstance<VcGraphicsPolylineVolumeProps>\n"],"names":[],"mappings":";;;;;;;AAkBY,MAAC,2BAA2B,GAAG;AAC3C,EAAE,GAAG,IAAI;AACT,EAAE,GAAG,SAAS;AACd,EAAE,GAAG,KAAK;AACV,EAAE,GAAG,UAAU;AACf,EAAE,GAAG,WAAW;AAChB,EAAE,GAAG,IAAI;AACT,EAAE,GAAG,QAAQ;AACb,EAAE,GAAG,OAAO;AACZ,EAAE,GAAG,YAAY;AACjB,EAAE,GAAG,YAAY;AACjB,EAAE,GAAG,OAAO;AACZ,EAAE,GAAG,wBAAwB;AAC7B,EAAE;AACF,6BAAe,eAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,0BAA0B;AAClC,EAAE,KAAK,EAAE,2BAA2B;AACpC,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,wBAAwB,CAAC;AACpD,IAAI,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC;AACtC,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;;;;"}