import{_ as C}from"./index-M_JNBppB.js";import"./el-collapse-item-l0sNRNKZ.js";/* empty css                     *//* empty css                 *//* empty css                        *//* empty css                              *//* empty css                  *//* empty css               *//* empty css                  *//* empty css                     *//* empty css                  *//* empty css                  */import{ax as U,aA as S,y as p,z as r,F as a,O as o,D as c,B as b,I,K as _,M as y,a7 as N,L as O}from"./vue-BJk78QHK.js";import{a as A,b as M,r as j,f as D,d as L,e as P,s as K,n as T,u as $}from"./element-3_pOinej.js";import"./threejs-BafxXW5-.js";import"./utils-YI6ye1sf.js";import"./vxe-Dx3zSILm.js";const h={class:"preset-container"},q={__name:"FogAttr",props:{propValue:{},propValueModifiers:{}},emits:["update:propValue"],setup(V){const v=["#ff4500","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","rgba(255, 69, 0, 0.68)","rgb(255, 120, 0)","rgb(51, 100, 98)","rgb(120, 40, 94, 0.5)","hsl(181, 100%, 37%)","hsla(209, 100%, 56%, 0.73)","rgba(255, 0, 0, 1)"];U();const e=S(V,"propValue"),s={enabled:!1,type:"FogExp2",color:"#ffffff",density:.006,near:15,far:160,syncBackground:!1},k={默认:{...s},晨雾:{...s,enabled:!0,type:"FogExp2",color:"rgba(224, 247, 250, 0.85)",density:.015,syncBackground:!0},战场硝烟:{...s,enabled:!0,type:"Fog",color:"rgba(102, 102, 102, 0.7)",near:5,far:30,syncBackground:!1},仙境:{...s,enabled:!0,type:"FogExp2",color:"rgba(187, 222, 251, 0.8)",density:.008,syncBackground:!0},黄昏:{...s,enabled:!0,type:"Fog",color:"rgba(255, 140, 0, 0.3)",near:15,far:80,syncBackground:!0}};function F(){Object.assign(e.value.fog,s)}function E(d){const l=e.value.fog.enabled;Object.assign(e.value.fog,d),e.value.fog.enabled=l}return(d,l)=>{const i=j,m=D,n=M,f=P,x=L,B=K,u=T,z=A,w=$;return r(),p(w,{title:"雾效果",name:"fog"},{default:a(()=>[o(z,{class:"more-form","label-position":"left","label-width":"110px"},{default:a(()=>[o(n,{label:"启用雾效果:"},{default:a(()=>[o(i,{size:"small",modelValue:e.value.fog.enabled,"onUpdate:modelValue":l[0]||(l[0]=t=>e.value.fog.enabled=t)},null,8,["modelValue"]),e.value.fog.enabled?(r(),p(m,{key:0,type:"primary",link:"",size:"small",onClick:F,style:{"margin-left":"20px"}},{default:a(()=>l[7]||(l[7]=[_(" 重置 ")])),_:1})):I("",!0)]),_:1}),l[8]||(l[8]=c("div",{class:"attr-group-title"}," 雾效预设 ",-1)),c("div",h,[(r(),b(y,null,N(k,(t,g)=>o(m,{key:g,size:"small",onClick:G=>E(t)},{default:a(()=>[_(O(g),1)]),_:2},1032,["onClick"])),64))]),o(n,{label:"雾类型:"},{default:a(()=>[o(x,{size:"small",modelValue:e.value.fog.type,"onUpdate:modelValue":l[1]||(l[1]=t=>e.value.fog.type=t),placeholder:"请选择雾类型",style:{width:"100%"}},{default:a(()=>[o(f,{label:"指数雾 (FogExp2)",value:"FogExp2"}),o(f,{label:"线性雾 (Fog)",value:"Fog"})]),_:1},8,["modelValue"])]),_:1}),o(n,{label:"雾颜色:"},{default:a(()=>[o(B,{size:"small",modelValue:e.value.fog.color,"onUpdate:modelValue":l[2]||(l[2]=t=>e.value.fog.color=t),"show-alpha":"",predefine:v},null,8,["modelValue"])]),_:1}),e.value.fog.type==="FogExp2"?(r(),p(n,{key:0,label:"密度:"},{default:a(()=>[o(u,{size:"small",modelValue:e.value.fog.density,"onUpdate:modelValue":l[3]||(l[3]=t=>e.value.fog.density=t),min:.001,max:.1,step:.001,"controls-position":"right",style:{width:"100%"}},null,8,["modelValue"])]),_:1})):(r(),b(y,{key:1},[o(n,{label:"起始距离:"},{default:a(()=>[o(u,{size:"small",modelValue:e.value.fog.near,"onUpdate:modelValue":l[4]||(l[4]=t=>e.value.fog.near=t),min:0,step:1,"controls-position":"right",style:{width:"100%"}},null,8,["modelValue"])]),_:1}),o(n,{label:"结束距离:"},{default:a(()=>[o(u,{size:"small",modelValue:e.value.fog.far,"onUpdate:modelValue":l[5]||(l[5]=t=>e.value.fog.far=t),min:0,step:1,"controls-position":"right",style:{width:"100%"}},null,8,["modelValue"])]),_:1})],64)),o(n,{label:"同步背景色:"},{default:a(()=>[o(i,{size:"small",modelValue:e.value.fog.syncBackground,"onUpdate:modelValue":l[6]||(l[6]=t=>e.value.fog.syncBackground=t)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})}}},pe=C(q,[["__scopeId","data-v-bc874d5c"]]);export{pe as default};
