@vuemap/vue-amap-extra
Version:
@vuemap/vue-amap扩展库,包含threejs相关图层
60 lines (57 loc) • 1.57 kB
JavaScript
import { defineComponent, openBlock, createElementBlock } from 'vue';
import { buildProps, useRegister } from '@vuemap/vue-amap';
import ThreeLightDirectional from './ThreeLightDirectional.mjs';
var script = /* @__PURE__ */ defineComponent({
...{
name: "ElAmapThreeLightDirectional",
inheritAttrs: false
},
__name: "ThreeLightDirectional",
props: buildProps({
color: {
type: String,
default: "#ffffff"
},
intensity: {
type: Number,
default: 1
},
position: {
type: Object,
default: () => ({ x: 0, y: 0, z: 1 })
},
target: {
type: Object
}
}),
emits: ["init"],
setup(__props, { expose: __expose, emit: __emit }) {
const emits = __emit;
let $amapComponent;
const { $$getInstance, parentInstance } = useRegister((options, parentComponent) => {
return new Promise((resolve) => {
$amapComponent = new ThreeLightDirectional(parentComponent, options);
resolve($amapComponent);
});
}, {
emits,
destroyComponent() {
if ($amapComponent && (parentInstance == null ? void 0 : parentInstance.$amapComponent)) {
if (!parentInstance.isDestroy) {
$amapComponent.remove();
}
$amapComponent.destroy();
$amapComponent = null;
}
}
});
__expose({
$$getInstance
});
return (_ctx, _cache) => {
return openBlock(), createElementBlock("div");
};
}
});
export { script as default };
//# sourceMappingURL=ThreeLightDirectional.vue2.mjs.map