import{a as u}from"./aniScriptLibrary-75c9e81e.js";import{e as m}from"./index-cf27e902.js";import{n as p}from"./index-b54f5418.js";import"./three-dc46505d.js";var f=function(){var t=this,i=t.$createElement,a=t._self._c||i;return a("div",{ref:"animationTrack",staticClass:"animationTrack-container"},t._l(t.animationMap,function(o,c){return a("div",{key:c,staticClass:"animationTrack-item-box"},[a("div",{staticClass:"animationTrack-objectTrack",style:{backgroundColor:o.trackColor,width:`${o.duration/t.totalDuration*100}%`}}),t._l(t.animationTrack[c].load,function(e,s){return a("div",{directives:[{name:"show",rawName:"v-show",value:o.open,expression:"item.open"}],key:s,staticClass:"animationTrack-attributeTrack"},[t.actionMap[e]?a("div",{staticClass:"attributeTrack-load"},[a("de-controller-switch",{attrs:{keyframe:!1,label:"使用"},model:{value:t.actionMap[e].enabled,callback:function(r){t.$set(t.actionMap[e],"enabled",r)},expression:"actionMap[tracksItem].enabled"}}),a("de-controller-number",{attrs:{keyframe:!1,label:"权重",step:.1,"drag-multply":2,min:0},model:{value:t.actionMap[e].weight,callback:function(r){t.$set(t.actionMap[e],"weight",r)},expression:"actionMap[tracksItem].weight"}}),a("de-controller-number",{attrs:{keyframe:!1,label:"时间缩放",step:.1,"drag-multply":2,min:0},model:{value:t.actionMap[e].timeScale,callback:function(r){t.$set(t.actionMap[e],"timeScale",r)},expression:"actionMap[tracksItem].timeScale"}})],1):t._e()])}),t._l(t.animationTrack[c].script,function(e,s){return a("div",{directives:[{name:"show",rawName:"v-show",value:o.open,expression:"item.open"}],key:s,staticClass:"animationTrack-attributeTrack"},[a("div",{staticClass:"attributeTrack-script"},t._l(t.getControllers(e.script.name),function(r){return a(r.component,t._b({key:r.key,tag:"component",attrs:{keyframe:!1,label:r.label},model:{value:t.getConfigure(e.script.vid).script[r.key],callback:function(n){t.$set(t.getConfigure(e.script.vid).script,r.key,n)},expression:"getConfigure(tracksItem.script.vid).script[item.key]"}},"component",r.props,!1))}),1)])}),t._l(t.animationTrack[c].keyframe,function(e,s){return a("div",{directives:[{name:"show",rawName:"v-show",value:o.open,expression:"item.open"}],key:s,staticClass:"animationTrack-attributeTrack"},t._l(e.keyframe,function(r,n){return a("div",{key:n,staticClass:"attributeTrack-keyframe",class:{active:t.currentFrame===n*1},style:{left:`${n/t.totalFrame*100}%`},on:{click:function(){t.$store.commit("animation/currentFrame",Number(n))}}},[a("vis-icon",{attrs:{code:"#iconlingxing"}})],1)}),0)})],2)}),0)},k=[];const d={props:{scrollTop:{type:Number,default:0}},data(){return{}},computed:{animationMap(){return this.$store.getters["animation/editorMap"]},actionMap(){return this.$store.getters["animationAction/get"]},animationTrack(){return this.$store.getters["animationTrack/get"]},totalDuration(){return this.$store.getters["animation/totalDuration"]},totalFrame(){return this.$store.getters["animation/totalFrame"]},currentFrame(){return this.$store.getters["animation/currentFrame"]}},watch:{scrollTop(t,i){this.$refs.animationTrack.scrollTop=t}},methods:{getControllers(t){return t?u[t].controllers:[]},getConfigure(t){return m.getConfigBySymbol(t)},getAnimationAction(t){return this.actionMap[t]}}},l={};var v=p(d,f,k,!1,_,"20aa649b",null,null);function _(t){for(let i in l)this[i]=l[i]}const h=function(){return v.exports}();export{h as default};
