{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/primitives/voxel/index.ts"],"sourcesContent":["import { createCommentVNode, defineComponent, getCurrentInstance, PropType } from 'vue'\nimport type { VcComponentInternalInstance, VcComponentPublicInstance, VcPickEvent, VcReadyObject } from '@vue-cesium/utils/types'\nimport { usePrimitives } from '@vue-cesium/composables'\nimport { modelMatrix, customShader, clock, enableMouseEvent } from '@vue-cesium/utils/cesium-props'\nimport { kebabCase } from '@vue-cesium/utils/util'\nimport { primitiveEmits } from '@vue-cesium/utils/emits'\n\nexport const voxelPromitiveProps = {\n  provider: {\n    type: Object as PropType<Cesium.VoxelProvider>\n  },\n  ...modelMatrix,\n  ...customShader,\n  ...clock,\n  ...enableMouseEvent\n}\nexport default defineComponent({\n  name: 'VcPrimitiveVoxel',\n  props: voxelPromitiveProps,\n  emits: primitiveEmits,\n  setup(props, ctx) {\n    // state\n    const instance = getCurrentInstance() as VcComponentInternalInstance\n    instance.cesiumClass = 'VoxelPrimitive'\n    usePrimitives(props, ctx, instance)\n    return () => createCommentVNode(kebabCase(instance.proxy?.$options.name || ''))\n  }\n})\n\nexport type VcPrimitiveVoxelProps = {\n  /**\n   * The voxel provider that supplies the primitive with tile data.\n   */\n  provider?: Cesium.VoxelProvider\n  /**\n   * The model matrix used to transform the primitive.\n   */\n  modelMatrix?: Cesium.Matrix4\n  /**\n   * The custom shader used to style the primitive.\n   */\n  customShader?: Cesium.CustomShader\n  /**\n   * The clock used to control time dynamic behavior.\n   */\n  clock?: Cesium.Clock\n  /**\n   * Specifies whether to respond to mouse pick events.\n   * Default Value: true\n   */\n  enableMouseEvent?: boolean\n  /**\n   * Triggers before the component is loaded.\n   */\n  onBeforeLoad?: (instance: VcComponentInternalInstance) => void\n  /**\n   * Triggers when the component 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 component is destroyed.\n   */\n  onDestroyed?: (instance: VcComponentInternalInstance) => void\n  /**\n   * Triggers when the mouse is pressed on this primitive.\n   */\n  onMousedown?: (evt: VcPickEvent) => void\n  /**\n   * Triggers when the mouse bounces up on this primitive.\n   */\n  onMouseup?: (evt: VcPickEvent) => void\n  /**\n   * Triggers when the mouse clicks on this primitive.\n   */\n  onClick?: (evt: VcPickEvent) => void\n  /**\n   * Triggers when the mouse clicks outside this primitive.\n   */\n  onClickout?: (evt: VcPickEvent) => void\n  /**\n   * Triggers when the left mouse button double-clicks this primitive.\n   */\n  onDblclick?: (evt: VcPickEvent) => void\n  /**\n   * Triggers when the mouse moves on this primitive.\n   */\n  onMousemove?: (evt: VcPickEvent) => void\n  /**\n   * Triggers when the mouse moves over to this primitive.\n   */\n  onMouseover?: (evt: VcPickEvent) => void\n  /**\n   * Triggers when the mouse moves out of this primitive.\n   */\n  onMouseout?: (evt: VcPickEvent) => void\n  /**\n   * Triggers when the primitive is ready to render.\n   */\n  onReadyPromise?: (primitive: Cesium.Primitive, viewer: Cesium.Viewer, instance: VcComponentPublicInstance) => void\n}\n\nexport type VcPrimitiveVoxelPropsRef = VcComponentPublicInstance<VcPrimitiveVoxelProps>\n"],"names":[],"mappings":";;;;;;;;AAOO,MAAM,mBAAsB,GAAA;AAAA,EACjC,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,MAAA;AAAA,GACR;AAAA,EACA,GAAG,WAAA;AAAA,EACH,GAAG,YAAA;AAAA,EACH,GAAG,KAAA;AAAA,EACH,GAAG,gBAAA;AACL,EAAA;AACA,qBAAe,eAAgB,CAAA;AAAA,EAC7B,IAAM,EAAA,kBAAA;AAAA,EACN,KAAO,EAAA,mBAAA;AAAA,EACP,KAAO,EAAA,cAAA;AAAA,EACP,KAAA,CAAM,OAAO,GAAK,EAAA;AAEhB,IAAA,MAAM,WAAW,kBAAmB,EAAA,CAAA;AACpC,IAAA,QAAA,CAAS,WAAc,GAAA,gBAAA,CAAA;AACvB,IAAc,aAAA,CAAA,KAAA,EAAO,KAAK,QAAQ,CAAA,CAAA;AAClC,IAAA,OAAO,MAAG;AAzBd,MAAA,IAAA,EAAA,CAAA;AAyBiB,MAAA,OAAA,kBAAA,CAAmB,YAAU,EAAS,GAAA,QAAA,CAAA,KAAA,KAAT,mBAAgB,QAAS,CAAA,IAAA,KAAQ,EAAE,CAAC,CAAA,CAAA;AAAA,KAAA,CAAA;AAAA,GAChF;AACF,CAAC,CAAA;;;;"}