UNPKG

@vuemap/vue-amap-extra

Version:

@vuemap/vue-amap扩展库,包含threejs相关图层

64 lines (59 loc) 1.63 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var vue = require('vue'); var vueAmap = require('@vuemap/vue-amap'); var ThreeLightDirectional = require('./ThreeLightDirectional.js'); var script = /* @__PURE__ */ vue.defineComponent({ ...{ name: "ElAmapThreeLightDirectional", inheritAttrs: false }, __name: "ThreeLightDirectional", props: vueAmap.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 } = vueAmap.useRegister((options, parentComponent) => { return new Promise((resolve) => { $amapComponent = new ThreeLightDirectional.default(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 vue.openBlock(), vue.createElementBlock("div"); }; } }); exports.default = script; //# sourceMappingURL=ThreeLightDirectional.vue2.js.map