icegl-three-vue-tres/dist/static/transformControls-c2346085.js
hawk86104 cc7a5a656a Merge branch 'master' into online
# Conflicts:
#	.fes.js
2023-12-04 19:58:17 +08:00

2 lines
2.0 KiB
JavaScript

import{Y as f,j as o,Z as m,al as b,o as c,s as p,B as w,a5 as v,I as r,a6 as B,$ as g,a0 as Y,a1 as Z,a as X,a9 as C,U as a,ay as T,V as M}from"./vendor-76c85ed2.js";const k=a("TresPerspectiveCamera",{position:[3,3,3]},null,-1),y=a("TresBoxGeometry",null,null,-1),S=a("TresMeshNormalMaterial",null,null,-1),N=[y,S],R=a("TresSphereGeometry",null,null,-1),j=a("TresMeshNormalMaterial",null,null,-1),G=[R,j],V=a("TresAmbientLight",{intensity:1},null,-1),z=a("TresGridHelper",null,null,-1),A=f({__name:"transformControls",setup($){const h={clearColor:"#82DBC5",shadows:!0,alpha:!1,shadowMapType:g,outputColorSpace:Y,toneMapping:Z},i=o(),d=o(),n=o();function u(s){n.value=s}const _=o(),e=m({mode:"translate",enabled:!0,space:"world",axis:"XYZ",size:1,showX:!0,showY:!0,showZ:!0}),{pane:t}=b();return t.addBlade({view:"list",label:"模式",options:[{text:"移动",value:"translate"},{text:"旋转",value:"rotate"},{text:"缩放",value:"scale"}],value:e.mode}).on("change",s=>{e.mode=s.value}),t.addBinding(e,"enabled",{label:"开启"}),t.addBlade({view:"list",label:"Space",options:[{text:"世界坐标",value:"world"},{text:"本地坐标",value:"local"}],value:e.space}).on("change",s=>{e.space=s.value}),t.addBlade({view:"list",label:"轴",options:[{text:"X",value:"X"},{text:"Y",value:"Y"},{text:"Z",value:"Z"},{text:"XY",value:"XY"},{text:"YZ",value:"YZ"},{text:"XZ",value:"XZ"},{text:"XYZ",value:"XYZ"}],value:e.axis}),t.addBinding(e,"size",{label:"大小",step:.01,min:0,max:10}),t.addBinding(e,"showX",{label:"显示X轴"}),t.addBinding(e,"showY",{label:"显示Y轴"}),t.addBinding(e,"showZ",{label:"显示Z轴"}),(s,l)=>(c(),p(r(B),v(h,{ref_key:"context",ref:_,"window-size":""}),{default:w(()=>[k,X(r(C),{"make-default":""}),a("TresMesh",{ref_key:"boxRef",ref:i,position:[-2,1,0],onClick:l[0]||(l[0]=x=>u(i.value))},N,512),n.value?(c(),p(r(T),v({key:0,object:n.value},e),null,16,["object"])):M("",!0),a("TresMesh",{ref_key:"sphereRef",ref:d,position:[2,1,0],onClick:l[1]||(l[1]=x=>u(d.value))},G,512),V,z]),_:1},16))}});export{A as default};