import{ag as a,af as s,a9 as o,n as h,i as n,aj as g}from"./index-b54f5418.js";import{o as d}from"./objectCollapse-cbde9167.js";import"./three-dc46505d.js";class p extends a{constructor({config:e,helper:i,store:r,engine:l}){super(),this.config=s.clone(e),this.helper=s.clone(i),this.$store=r,this.engine=l}next(){const e=o(this.config.type,this.config),i=o(this.helper.type,this.helper);this.$store.commit("light/add",e),this.$store.commit("helper/add",i),this.$store.getters["scene/currentScene"].children.push(e.vid)}prev(){const e=this.$store.getters["scene/currentScene"];e.children.splice(e.children.indexOf(this.config.vid),1),this.$store.commit("light/remove",this.config.vid),this.$store.commit("helper/remove",this.helper.vid)}}var u=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"light-container"},[i("object-collapse",{attrs:{"data-list":t.light,"click-hanlder":t.addLight,icon:"#icondengpao",label:"灯光"}})],1)},m=[];const v={components:{objectCollapse:d},data(){return{light:[{icon:"#iconhuanjingguang",label:"环境光",light:n.AMBIENTLIGHT},{icon:"#icondengpao",label:"点光",light:n.POINTLIGHT},{icon:"#iconjuguang",label:"聚光",light:n.SPOTLIGHT},{icon:"#iconpinghangguang",label:"平行光",light:n.DIRECTIONALLIGHT},{icon:"#iconbanqiuguang",label:"半球光",light:n.HEMISPHERELIGHT},{icon:"#iconpingmianguang",label:"平面光",light:n.RECTAREALIGHT}]}},methods:{addLight(t){const e=o(t.light,{vid:g()});e.name=`${t.label}-${e.vid.slice(-2)}`;const i=o(n.OBJECTHELPER,{target:e.vid,shape:!0});VIS.history.apply(new p({config:e,helper:i,store:this.$store,engine:VIS.engine}),!0)}}},c={};var f=h(v,u,m,!1,_,null,null,null);function _(t){for(let e in c)this[e]=c[e]}const E=function(){return f.exports}();export{E as default};
