UNPKG

vue-cesium-jyt

Version:
1 lines 4.63 kB
{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/graphics/box/index.ts"],"sourcesContent":["/*\n * @Author: zouyaoji@https://github.com/zouyaoji\n * @Date: 2021-09-16 09:28:13\n * @LastEditTime: 2022-02-16 09:20:32\n * @LastEditors: Please set LastEditors\n * @Description:\n * @FilePath: \\vue-cesium@next\\packages\\components\\graphics\\box\\index.ts\n */\nimport { createCommentVNode, defineComponent, getCurrentInstance } from 'vue'\nimport type { ExtractPropTypes } from 'vue'\nimport type { VcComponentInternalInstance } from '@vue-cesium/utils/types'\nimport { useGraphics } from '@vue-cesium/composables'\nimport {\n show,\n dimensions,\n heightReference,\n fill,\n material,\n outline,\n outlineColor,\n outlineWidth,\n shadows,\n distanceDisplayCondition\n} from '@vue-cesium/utils/cesium-props'\nimport { VcPosition, VcCallbackPropertyFunction, VcMaterial, VcColor, VcDistanceDisplayCondition } from '@vue-cesium/utils/types'\nimport { kebabCase } from '@vue-cesium/utils/util'\nimport { commonEmits } from '@vue-cesium/utils/emits'\nexport const boxGraphicsProps = {\n ...show,\n ...dimensions,\n ...heightReference,\n ...fill,\n ...material,\n ...outline,\n ...outlineColor,\n ...outlineWidth,\n ...shadows,\n ...distanceDisplayCondition\n}\nexport default defineComponent({\n name: 'VcGraphicsBox',\n props: boxGraphicsProps,\n emits: commonEmits,\n setup(props, ctx) {\n // state\n const instance = getCurrentInstance() as VcComponentInternalInstance\n instance.cesiumClass = 'BoxGraphics'\n useGraphics(props, ctx, instance)\n return () => createCommentVNode(kebabCase(instance.proxy?.$options.name || 'v-if'))\n }\n})\n\n// export type VcGraphicsBoxProps = ExtractPropTypes<typeof boxGraphicsProps>\nexport type VcGraphicsBoxProps = {\n /**\n * A boolean Property specifying the visibility of the billboard.\n * Default value: true\n */\n show?: boolean\n /**\n * Gets or sets Cartesian3 Property property specifying the length, width, and height of the box.\n */\n dimensions?: VcPosition\n /**\n * Gets or sets the Property specifying the HeightReference.\n * Default Value: HeightReference.NONE\n */\n heightReference?: number | Cesium.HeightReference | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n /**\n *Gets or sets the boolean Property specifying whether the box is filled with the provided material.\n *Default Value: true\n */\n fill?: boolean | Cesium.CallbackProperty | VcCallbackPropertyFunction<boolean>\n /**\n * Gets or sets the material used to fill the box.\n * Default Value: Color.WHITE\n */\n material?: VcMaterial\n /**\n * Gets or sets the Property specifying whether the box is outlined.\n * Default Value: false\n */\n outline?: boolean | Cesium.CallbackProperty | VcCallbackPropertyFunction<boolean>\n /**\n * Gets or sets the Property specifying the Color of the outline.\n * Default Value: Color.BLACK\n */\n outlineColor?: VcColor\n /**\n * Gets or sets the numeric Property specifying the width of the outline.\n * Note: This property will be ignored on all major browsers on Windows platforms. For details, see (@link https://github.com/CesiumGS/cesium/issues/40}.\n * Default Value: 1.0\n */\n outlineWidth?: number | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n /**\n * Get or sets the enum Property specifying whether the box casts or receives shadows from light sources.\n * Default Value: ShadowMode.DISABLED\n */\n shadows?: number | Cesium.ShadowMode | VcCallbackPropertyFunction<number>\n /**\n * Gets or sets the DistanceDisplayCondition Property specifying at what distance from the camera that this box will be displayed.\n */\n distanceDisplayCondition?: VcDistanceDisplayCondition\n}\n"],"names":[],"mappings":";;;;;;;AAgBY,MAAC,gBAAgB,GAAG;AAChC,EAAE,GAAG,IAAI;AACT,EAAE,GAAG,UAAU;AACf,EAAE,GAAG,eAAe;AACpB,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,kBAAe,eAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,eAAe;AACvB,EAAE,KAAK,EAAE,gBAAgB;AACzB,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,aAAa,CAAC;AACzC,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;;;;"}