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

2 lines
2.2 KiB
JavaScript

import{Y as d,Z as i,$ as _,a0 as m,a1 as f,j as l,aa as T,a2 as M,a3 as g,a4 as w,o as P,s as v,B as y,a5 as S,I as c,a6 as R,a as x,a7 as D,a8 as b,a9 as k,U as e}from"./vendor-76c85ed2.js";const A=e("TresPerspectiveCamera",{position:[15,15,15],fov:45,near:.1,far:1e3,"look-at":[0,0,0]},null,-1),B=e("TresAmbientLight",{intensity:.5},null,-1),L=e("TresSphereGeometry",{args:[2,32,32]},null,-1),z=e("TresMeshToonMaterial",{color:"#006060"},null,-1),C=[L,z],G=e("TresSphereGeometry",{args:[2,32,32]},null,-1),I=e("TresMeshToonMaterial",{color:"#006060"},null,-1),F=[G,I],Z=["rotation"],N=e("TresPlaneGeometry",{args:[20,20,20,20]},null,-1),j=e("TresMeshToonMaterial",null,null,-1),E=[N,j],V=e("TresDirectionalLight",{position:[10,2,4],intensity:1,"cast-shadow":""},null,-1),H=e("TresGridHelper",null,null,-1),q=d({__name:"theBasic",setup(U){const h=i({clearColor:"#201919",shadows:!0,alpha:!1,shadowMapType:_,outputColorSpace:m,toneMapping:f}),u=i({enableDamping:!0,dampingFactor:.05,enableZoom:!0,autoRotate:!1,autoRotateSpeed:2,maxPolarAngle:Math.PI,minPolarAngle:0,maxAzimuthAngle:Math.PI,minAzimuthAngle:-Math.PI,enablePan:!0,keyPanSpeed:7,maxDistance:100,minDistance:0,minZoom:0,maxZoom:100,zoomSpeed:1,enableRotate:!0,rotateSpeed:1}),t=l(),s=l(),o=T(),{onLoop:p}=M();p(({elapsed:a})=>{t.value&&(t.value.position.y+=Math.sin(a)*.01,s.value.position.y+=Math.sin(a)*.01)});function n(a){a&&a.object.material.color.set("#DFFF45")}function r(a){a&&a.material.color.set("#006060")}return g(()=>{o.value&&(o.value.shadow.mapSize.set(1e3,1e3),o.value.shadow.camera.near=.5,o.value.shadow.camera.top=20,o.value.shadow.camera.right=20,o.value.shadow.camera.left=-20,o.value.shadow.camera.bottom=-20)}),w(()=>{}),(a,Y)=>(P(),v(c(R),S(h,{"window-size":""}),{default:y(()=>[A,x(c(k),D(b(u)),null,16),B,e("TresMesh",{ref_key:"sphereRef",ref:t,position:[0,4,0],"cast-shadow":"",onPointerEnter:n,onPointerLeave:r},C,544),e("TresMesh",{ref_key:"sphereRef2",ref:s,position:[4,4,0],"cast-shadow":"",onPointerEnter:n,onPointerLeave:r},F,544),e("TresMesh",{rotation:[-Math.PI/2,0,0],"receive-shadow":""},E,8,Z),e("TresDirectionalLight",{ref_key:"TDirectionalLight",ref:o,position:[10,8,4],intensity:1,"cast-shadow":""},null,512),V,H]),_:1},16))}});export{q as default};