vue-cesium
Version:
Vue 3.x components for CesiumJS.
1 lines • 3.1 kB
Source Map (JSON)
{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/graphics/tileset/index.ts"],"sourcesContent":["/*\n * @Author: zouyaoji@https://github.com/zouyaoji\n * @Date: 2021-09-16 09:28:13\n * @LastEditTime: 2022-04-06 13:53:50\n * @LastEditors: zouyaoji\n * @Description:\n * @FilePath: \\vue-cesium@next\\packages\\components\\graphics\\tileset\\index.ts\n */\nimport { createCommentVNode, defineComponent, getCurrentInstance } from 'vue'\nimport type { VcCallbackPropertyFunction, VcComponentInternalInstance, VcComponentPublicInstance, VcReadyObject } from '@vue-cesium/utils/types'\nimport { useGraphics } from '@vue-cesium/composables'\nimport { show, uri, maximumScreenSpaceError } from '@vue-cesium/utils/cesium-props'\nimport { kebabCase } from '@vue-cesium/utils/util'\nimport { commonEmits } from '@vue-cesium/utils/emits'\n\nexport const tilesetGraphicsProps = {\n ...show,\n ...uri,\n ...maximumScreenSpaceError\n}\nexport default defineComponent({\n name: 'VcGraphicsTileset',\n props: tilesetGraphicsProps,\n emits: commonEmits,\n setup(props, ctx) {\n // state\n const instance = getCurrentInstance() as VcComponentInternalInstance\n instance.cesiumClass = 'Cesium3DTilesetGraphics'\n useGraphics(props, ctx, instance)\n\n return () => createCommentVNode(kebabCase(instance.proxy?.$options.name || 'v-if'))\n }\n})\n\nexport type VcGraphicsTilesetProps = {\n /**\n * A boolean Property specifying the visibility of the tileset.\n * Default value: true\n */\n show?: boolean | Cesium.CallbackProperty | VcCallbackPropertyFunction<boolean>\n /**\n * A string or Resource Property specifying the URI of the tileset.\n */\n uri?: number | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n /**\n * Triggers before the VcGraphicsTileset is loaded.\n */\n onBeforeLoad?: (instance: VcComponentInternalInstance) => void\n /**\n * Triggers when the VcGraphicsTileset 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 VcGraphicsTileset 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 VcGraphicsTilesetRef = VcComponentPublicInstance<VcGraphicsTilesetProps>\n"],"names":[],"mappings":";;;;;;;;AAeO,MAAM,oBAAuB,GAAA;AAAA,EAClC,GAAG,IAAA;AAAA,EACH,GAAG,GAAA;AAAA,EACH,GAAG,uBAAA;AACL,EAAA;AACA,sBAAe,eAAgB,CAAA;AAAA,EAC7B,IAAM,EAAA,mBAAA;AAAA,EACN,KAAO,EAAA,oBAAA;AAAA,EACP,KAAO,EAAA,WAAA;AAAA,EACP,KAAA,CAAM,OAAO,GAAK,EAAA;AAEhB,IAAA,MAAM,WAAW,kBAAmB,EAAA,CAAA;AACpC,IAAA,QAAA,CAAS,WAAc,GAAA,yBAAA,CAAA;AACvB,IAAY,WAAA,CAAA,KAAA,EAAO,KAAK,QAAQ,CAAA,CAAA;AAEhC,IAAA,OAAO,MAAG;AA9Bd,MAAA,IAAA,EAAA,CAAA;AA8BiB,MAAA,OAAA,kBAAA,CAAmB,YAAU,EAAS,GAAA,QAAA,CAAA,KAAA,KAAT,mBAAgB,QAAS,CAAA,IAAA,KAAQ,MAAM,CAAC,CAAA,CAAA;AAAA,KAAA,CAAA;AAAA,GACpF;AACF,CAAC,CAAA;;;;"}