UNPKG

casc-cesium

Version:

Vue 3.x components for CesiumJS.

1 lines 4.26 kB
{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/geometries/ellipsoid/index.ts"],"sourcesContent":["/*\n * @Author: zouyaoji@https://github.com/zouyaoji\n * @Date: 2021-09-16 09:28:13\n * @LastEditTime: 2022-03-30 10:37:27\n * @LastEditors: zouyaoji\n * @Description:\n * @FilePath: \\vue-cesium@next\\packages\\components\\geometries\\ellipsoid\\index.ts\n */\nimport { VcComponentInternalInstance, VcComponentPublicInstance, VcPosition, VcReadyObject } 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 {\n radii,\n innerRadii,\n minimumClock,\n maximumClock,\n minimumCone,\n maximumCone,\n stackPartitions,\n slicePartitions,\n vertexFormat\n} from 'casc-cesium-utils/cesium-props'\nimport { commonEmits } from 'casc-cesium-utils/emits'\nexport const ellipsoidGeometryProps = {\n ...radii,\n ...innerRadii,\n ...minimumClock,\n ...maximumClock,\n ...minimumCone,\n ...maximumCone,\n ...stackPartitions,\n ...slicePartitions,\n ...vertexFormat\n}\nexport default defineComponent({\n name: 'VcGeometryEllipsoid',\n props: ellipsoidGeometryProps,\n emits: commonEmits,\n setup(props, ctx) {\n // state\n const instance = getCurrentInstance() as VcComponentInternalInstance\n instance.cesiumClass = 'EllipsoidGeometry'\n useGeometries(props, ctx, instance)\n\n return () => createCommentVNode(kebabCase(instance.proxy?.$options.name || 'v-if'))\n }\n})\n\nexport type VcGeometryEllipsoidProps = {\n /**\n * The radii of the ellipsoid in the x, y, and z directions.\n */\n radii?: VcPosition\n /**\n * The inner radii of the ellipsoid in the x, y, and z directions.\n */\n innerRadii?: VcPosition\n /**\n * The minimum angle lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.\n * Default value: 0.0\n */\n minimumClock?: number\n /**\n * The maximum angle lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.\n * Default value: 2*PI\n */\n maximumClock?: number\n /**\n * The minimum angle measured from the positive z-axis and toward the negative z-axis.\n * Default value: 0.0\n */\n minimumCone?: number\n /**\n * The maximum angle measured from the positive z-axis and toward the negative z-axis.\n * Default value: PI\n */\n maximumCone?: number\n /**\n * The number of times to partition the ellipsoid into stacks.\n * Default value: 64\n */\n stackPartitions?: number\n /**\n * The number of times to partition the ellipsoid into radial slices.\n * Default value: 64\n */\n slicePartitions?: number\n /**\n * The vertex attributes to be computed.\n */\n vertexFormat?: Cesium.VertexFormat\n /**\n * Triggers before the VcGeometryEllipsoid is loaded.\n */\n onBeforeLoad?: (instance: VcComponentInternalInstance) => void\n /**\n * Triggers when the VcGeometryEllipsoid 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 VcGeometryEllipsoid is destroyed.\n */\n onDestroyed?: (instance: VcComponentInternalInstance) => void\n}\n\nexport type VcGeometryEllipsoidRef = VcComponentPublicInstance<VcGeometryEllipsoidProps>\n"],"names":[],"mappings":";;;;;;;AAeY,MAAC,sBAAsB,GAAG;AACtC,EAAE,GAAG,KAAK;AACV,EAAE,GAAG,UAAU;AACf,EAAE,GAAG,YAAY;AACjB,EAAE,GAAG,YAAY;AACjB,EAAE,GAAG,WAAW;AAChB,EAAE,GAAG,WAAW;AAChB,EAAE,GAAG,eAAe;AACpB,EAAE,GAAG,eAAe;AACpB,EAAE,GAAG,YAAY;AACjB,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;;;;"}