mirror of
https://gitee.com/ice-gl/icegl-three-vue-tres.git
synced 2025-04-05 06:22:43 +08:00
2 lines
1.3 KiB
JavaScript
2 lines
1.3 KiB
JavaScript
import{Y as v,j as n,a3 as m,a2 as h,o as g,c as C,a,B as p,a5 as x,I as s,a6 as R,C as S,a0 as w,a1 as y,at as I,au as k,U as e,av as B,aw as V,as as N,ax as T,_ as b}from"./vendor-76c85ed2.js";const c=l=>(I("data-v-3a9657c1"),l=l(),k(),l),j=c(()=>e("TresPerspectiveCamera",{position:[0,2,5]},null,-1)),z=c(()=>e("TresGridHelper",{args:[10,10]},null,-1)),E=c(()=>e("main",null,[e("section",null,[e("h1",null,"First section")]),e("section",null,[e("h2",null,"Second section")])],-1)),F=v({__name:"scrollControls",setup(l){const u=n(),i=n(),t=n(),o=n(0);m(()=>{console.log("jaime ~ progress:",o.value)});const _={clearColor:"#333",alpha:!0,outputColorSpace:w,toneMapping:y},{onLoop:d}=h();return d(()=>{t.value&&(t.value.value.rotation.x=o.value*10,t.value.value.rotation.y=o.value*2)}),(G,r)=>(g(),C(S,null,[a(s(R),x(_,{"window-size":"",class:"canvas-class"}),{default:p(()=>[j,a(s(B),{radius:1}),z,a(s(V),{ref_key:"scRef",ref:u,modelValue:o.value,"onUpdate:modelValue":r[0]||(r[0]=f=>o.value=f),distance:10,"smooth-scroll":.1,"html-scroll":""},{default:p(()=>[a(s(N),{ref_key:"sphereRef",ref:i,scale:.1,position:[1,2,0]},null,512),a(s(T),{ref_key:"boxRef",ref:t,scale:.5,color:16711935,position:[-1,1,0]},null,512)]),_:1},8,["modelValue"])]),_:1},16),E],64))}});const P=b(F,[["__scopeId","data-v-3a9657c1"]]);export{P as default};
|