UNPKG

casc-cesium

Version:

Vue 3.x components for CesiumJS.

1 lines 3.95 kB
{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/geometries/rectangle/index.ts"],"sourcesContent":["/*\n * @Author: zouyaoji@https://github.com/zouyaoji\n * @Date: 2021-09-16 09:28:13\n * @LastEditTime: 2022-04-20 09:36:52\n * @LastEditors: zouyaoji\n * @Description:\n * @FilePath: \\vue-cesium@next\\packages\\components\\geometries\\rectangle\\index.ts\n */\nimport { VcComponentInternalInstance, VcComponentPublicInstance, VcReadyObject, VcRectangle } from 'casc-cesium-utils/types'\nimport { defineComponent, getCurrentInstance, createCommentVNode } from 'vue'\nimport { useGeometries } from 'casc-cesium-composables'\nimport { kebabCase } from 'casc-cesium-utils/util'\nimport { rectangle, vertexFormat, ellipsoid, granularity, height, rotation, stRotation, extrudedHeight } from 'casc-cesium-utils/cesium-props'\nimport { commonEmits } from 'casc-cesium-utils/emits'\nexport const rectangleGeometryProps = {\n ...rectangle,\n ...vertexFormat,\n ...ellipsoid,\n ...granularity,\n ...height,\n ...rotation,\n ...stRotation,\n ...extrudedHeight\n}\nexport default defineComponent({\n name: 'VcGeometryRectangle',\n props: rectangleGeometryProps,\n emits: commonEmits,\n setup(props, ctx) {\n // state\n const instance = getCurrentInstance() as VcComponentInternalInstance\n instance.cesiumClass = 'RectangleGeometry'\n useGeometries(props, ctx, instance)\n\n return () => createCommentVNode(kebabCase(instance.proxy?.$options.name || 'v-if'))\n }\n})\n\nexport type VcGeometryRectangleProps = {\n /**\n * A cartographic rectangle with north, south, east and west properties in radians.\n */\n rectangle: VcRectangle\n /**\n * The vertex attributes to be computed.\n */\n vertexFormat?: Cesium.VertexFormat\n /**\n * The ellipsoid on which the rectangle lies.\n */\n ellipsoid?: Cesium.Ellipsoid\n /**\n * The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.\n */\n granularity?: number\n /**\n * The distance in meters between the rectangle and the ellipsoid surface.\n */\n height?: number\n /**\n * The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.\n * Default value: 0.0\n */\n rotation?: number\n /**\n * The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.\n * Default value: 0.0\n */\n stRotation?: number\n /**\n * The distance in meters between the rectangle's extruded face and the ellipsoid surface.\n */\n extrudedHeight?: number\n /**\n * Triggers before the VcGeometryRectangle is loaded\n */\n onBeforeLoad?: (instance: VcComponentInternalInstance) => void\n /**\n * Triggers when the VcGeometryRectangle 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 VcGeometryRectangle is destroyed\n */\n onDestroyed?: (instance: VcComponentInternalInstance) => void\n}\n\nexport type VcGeometryRectangleRef = VcComponentPublicInstance<VcGeometryRectangleProps>\n"],"names":[],"mappings":";;;;;;;AAKY,MAAC,sBAAsB,GAAG;AACtC,EAAE,GAAG,SAAS;AACd,EAAE,GAAG,YAAY;AACjB,EAAE,GAAG,SAAS;AACd,EAAE,GAAG,WAAW;AAChB,EAAE,GAAG,MAAM;AACX,EAAE,GAAG,QAAQ;AACb,EAAE,GAAG,UAAU;AACf,EAAE,GAAG,cAAc;AACnB,EAAE;AACF,wBAAe,eAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,qBAAqB;AAC7B,EAAE,KAAK,EAAE,sBAAsB;AAC/B,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,mBAAmB,CAAC;AAC/C,IAAI,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC;AACxC,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;;;;"}