import{ag as h,a9 as n,n as p,i as s,ah as m,S as o}from"./index-b54f5418.js";import{o as d}from"./objectCollapse-cbde9167.js";import{e as a}from"./index-cf27e902.js";import"./three-dc46505d.js";class g extends h{constructor({config:e,helper:i,store:r,engine:c}){super(),this.config=e,this.helper=i,this.$store=r,this.engine=c}next(){const e=n(this.config.type,this.config),i=n(this.helper.type,this.helper);this.$store.commit("camera/add",e),this.$store.getters["scene/currentScene"].children.push(this.config.vid),this.$store.commit("helper/add",i)}prev(){const e=this.$store.getters["scene/currentScene"];e.children.splice(e.children.indexOf(this.config.vid),1),this.$store.commit("camera/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:"camera-container"},t._l(t.list,function(r,c){return i("object-collapse",{key:c,attrs:{"data-list":r.list,"click-hanlder":r.click,icon:r.icon,label:r.label}})}),1)},f=[];const v={components:{objectCollapse:d},data(){return{list:[{icon:"#iconxiangji",label:"相机",list:[{icon:"#icontoushixiangji",label:"透视相机",camera:s.PERSPECTIVECAMERA},{icon:"#iconzhengjiaoxiangji",label:"正交相机",camera:s.ORTHOGRAPHICCAMERA}],click(t){const e=n(t.camera,{vid:m()},{observer:!1});e.icon=t.icon,e.name=`${t.label}${e.vid.slice(-2)}`;const i=n(s.OBJECTHELPER,{target:e.vid,shape:!0},{observer:!1});VIS.history.apply(new g({config:e,helper:i,store:this.$store,engine:VIS.engine}),!0)}},{icon:"#iconic_shuiliu",label:"水域",list:[{icon:"#iconic_shuiliu",label:"深水",type:s.DEEPWATER}],click(t){const e=n(s.PLANEGEOMETRY,{width:200,height:200});this.$store.commit("geometry/add",e);const i=n(t.type,{geometry:e.vid,rotation:{x:-Math.PI/2}});i.name=`${t.label}-${i.vid.slice(-2)}`,this.$store.commit("water/add",i),this.$store.getters["scene/currentScene"].children.push(i.vid);const r=n(s.SCRIPTANIMATION,{target:i.vid,attribute:".material.uniforms.time.value",script:o.generateConfig("linearTime")},{strict:!1});a.applyConfig(r)}},{icon:"#iconpitaya-YSguanli",label:"粒子",list:[{icon:"#iconpitaya-YSguanli",label:"漂浮粒子",type:s.FLOATPARTICLE}],click(t){const e=n(t.type,{amount:1e3});e.name=`${t.label}-${e.vid.slice(-2)}`,this.$store.commit("particle/add",e),this.$store.getters["scene/currentScene"].children.push(e.vid);const i=n(s.SCRIPTANIMATION,{target:e.vid,attribute:".material.uniforms.time.value",script:o.generateConfig("linearTime")},{strict:!1});a.applyConfig(i)}}]}},methods:{}},l={};var b=p(v,u,f,!1,_,null,null,null);function _(t){for(let e in l)this[e]=l[e]}const E=function(){return b.exports}();export{E as default};
