From 9fc058e7a0af1faed1aa6b3d38d1ed34ce371c0c Mon Sep 17 00:00:00 2001 From: Habbatul Date: Thu, 11 Jul 2024 03:44:54 +0000 Subject: [PATCH] deploy: 562968cd3e860442cd13708d3b931fba9384e25d --- assets/{index-VojMr4w6.js => index-D9Cy6TBB.js} | 2 +- index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename assets/{index-VojMr4w6.js => index-D9Cy6TBB.js} (99%) diff --git a/assets/index-VojMr4w6.js b/assets/index-D9Cy6TBB.js similarity index 99% rename from assets/index-VojMr4w6.js rename to assets/index-D9Cy6TBB.js index a8c0c39..407f28a 100644 --- a/assets/index-VojMr4w6.js +++ b/assets/index-D9Cy6TBB.js @@ -3877,4 +3877,4 @@ void main() { gl_FragColor = vec4(col, 1.0); } - `};var mo=new Fn({uniforms:jl.clone(La.uniforms),vertexShader:La.vertexShader,fragmentShader:La.fragmentShader});mo.uniforms.tDiffuse.value=Ls.texture;var G0=new ur(5,4),ks=new Tt(G0,mo);ks.position.set(400,3.4,-4.56);ks.scale.set(3.5,3,1);ks.rotation.set(-.139,0,0);ut.add(ks);const Sn=new P0(Ot,Un.domElement);Sn.enableDamping=!0;Sn.dampingFactor=.25;Sn.enableZoom=!0;Sn.enablePan=!1;Sn.target.set(0,0,-25);Sn.minDistance=20;Sn.maxDistance=120;fu.load("gltf/SeabedLamp3D.glb",function(i){const e=i.scene;e.position.set(0,-8,-25),e.scale.set(30,30,30),e.name="uhuy",$i.add(e)},void 0,function(i){console.error(i)});var Is=new V_,Ft=new ve(-2,-2);function W0(i){const e=or.getBoundingClientRect();Ft.x=(i.clientX-e.left)/e.width*2-1,Ft.y=-((i.clientY-e.top)/e.height)*2+1}window.addEventListener("mousemove",W0,!1);function X0(i){const e=or.getBoundingClientRect();Ft.x=(i.touches[0].clientX-e.left)/e.width*2-1,Ft.y=-((i.touches[0].clientY-e.top)/e.height)*2+1}window.addEventListener("touchmove",X0,!1);function q0(){if(Br){const i=new C(400,-9,4),e=new C(400,0,-8),t=new C(400,0,0),n=30,r=1.5+Math.min(Math.max(Ft.x,-.5),.5)*(Math.PI/4),s=Math.min(Math.max(-Ft.y+1,.5),10)*(Math.PI/4),a=i.x+n*Math.cos(r),o=i.y+n*Math.sin(s),c=t.z+n*Math.sin(r);new Nn(st.position).to({x:a,y:o,z:c},1e3).easing(Gt.Quadratic.Out).start(),st.lookAt(e)}}var lt=0,Ds=!1;Xt.element.addEventListener("click",function(i){vn||(Xt.element.style.opacity="0",ut.add(Jt),lt=2,Xt.element.addEventListener("transitionend",function(e){lt==2&&(console.log("step dua dijalankan"),ut.remove(Xt),Jt.element.style.opacity="1")}))});Xt.element.addEventListener("mouseover",function(i){Xt.element.style.cursor="pointer"});Jt.element.addEventListener("click",function(i){vn||(Jt.element.style.opacity="0",ut.add(Qt),lt=3,Jt.element.addEventListener("transitionend",function(e){lt==3&&(console.log("step tiga dijalankan"),ut.remove(Jt),Qt.element.style.opacity="1")}))});Jt.element.addEventListener("mouseover",function(i){Jt.element.style.cursor="pointer"});Qt.element.addEventListener("click",function(i){vn||(Qt.element.style.opacity="0",ut.add(Ct),lt=4,Qt.element.addEventListener("transitionend",function(e){lt==4&&(console.log("step empat dijalankan"),ut.remove(Qt),Ct.element.style.opacity="1")}))});Qt.element.addEventListener("mouseover",function(i){Qt.element.style.cursor="pointer"});Ct.element.querySelector("#button2").addEventListener("click",function(i){vn||(lt=3,Ct.element.style.opacity="0",Ct.element.addEventListener("transitionend",function(e){lt==3&&(ut.remove(Ct),console.log("tutup step kembali ke step 0"),lt=0,Ds=!0,jt.style.pointerEvents="none",ut.add(si),Ft.set(-2,-2),mr=!0)}))});si.element.querySelector("#button2").addEventListener("click",function(i){si.element.style.opacity="0",console.log("tutup step kembali ke step 0"),lt=0,jt.style.pointerEvents="none",Ft.set(-2,-2),mr=!0});function j0(i){Is.setFromCamera(Ft,st);var e=Is.intersectObjects([Wt],!0);e.length>0&&(mr=!1,!Ds&<===0?(Wt.material.color.set(16711680),lt=1,Xt.element.style.opacity="1",Xt.element.addEventListener("transitionend",function(t){console.log("step pertama dijalankan"),jt.style.pointerEvents="auto"})):Ds&<===0&&(Wt.material.color.set(16711680),lt=5,si.element.style.opacity="1",jt.style.pointerEvents="auto"))}document.addEventListener("click",j0,!1);function Y0(){Is.setFromCamera(Ft,st);var i=Is.intersectObjects([Wt],!0);i.length>0?lt==0?(or.style.cursor="pointer",Wt.material.color.set(16711680)):(jt.style.pointerEvents="auto",lt===0&&Wt.material.color.set(65280)):(or.style.cursor="auto",lt===0&&Wt.material.color.set(65280))}var hn=new C(0,-8,-25),qa=new C().copy(Ot.position),K0=qa.distanceTo(hn),Z0=0,gu,ja,Hs=!1,pr=!1;function _u(i,e){gu=new Nn(Ot.position).to({x:hn.x+i*Math.cos(e),y:qa.y,z:hn.z+i*Math.sin(e)},500).onComplete(()=>{ja=new Nn({angle:e}).to({angle:e+Math.PI*2},4e3).onUpdate(t=>{var n=t.angle,r=hn.x+i*Math.cos(n),s=hn.z+i*Math.sin(n);Ot.position.set(r,qa.y,s),Ot.lookAt(hn)}).repeat(1/0).start()}).start()}_u(K0,Z0);function vu(i,e){return Math.atan2(i.z-e.z,i.x-e.x)}function xu(i,e){!Hs&&!pr&&_u(i,e)}function Mu(){(Hs||pr)&&(gu.stop(),ja&&ja.stop())}function yu(i){Hs=!0,Mu()}function Su(i){Hs=!1,xu(new C().copy(Ot.position).distanceTo(hn),vu(new C().copy(Ot.position),hn))}document.addEventListener("mousedown",yu,!1);document.addEventListener("mouseup",Su,!1);document.addEventListener("touchstart",function(i){pr||i.touches.length>2&&yu(i.touches[0])},!1);document.addEventListener("touchend",function(i){pr||i.changedTouches.length>2&&Su(i.changedTouches[0])},!1);Sn.addEventListener("start",function(){pr=!0,Mu()});Sn.addEventListener("end",function(){pr=!1,xu(new C().copy(Ot.position).distanceTo(hn),vu(new C().copy(Ot.position),hn))});const $0=document.getElementById("buttonx"),qi=document.getElementById("container-buttonx");var Ns=!0;$0.addEventListener("click",function(i){Br=!1,new Nn(st.position).to({x:0,y:0,z:30},1e3).easing(Gt.Quadratic.InOut).onComplete(()=>{mr=!0}).start(),new Nn(st.rotation).to({x:0,y:0,z:0},1e3).easing(Gt.Quadratic.InOut).start(),qi.style.opacity="0",qi.addEventListener("transitionend",function e(t){qi.classList.add("hidden"),qi.removeEventListener("transitionend",e),Ns=!0})});function J0(){Br==!0&&Ns&&(qi.classList.remove("hidden"),setTimeout(()=>{qi.style.opacity="1"},10),Ns=!1)}const Vi=document.getElementById("container-objective");var mr=!0;function Q0(){mr?(Vi.style.opacity="1",Vi.classList.remove("hidden")):(Vi.style.opacity="0",Vi.addEventListener("transitionend",function i(e){Vi.classList.add("hidden"),Vi.removeEventListener("transitionend",i),Ns=!0}))}function Eu(){requestAnimationFrame(Eu),Wt&&(Wt.rotation.x+=.01,Wt.rotation.y+=.01,Y0()),Ot.rotation.y+=.01,J0(),Q0(),R0(),mo.uniforms.time.value+=.01,q0(),Sn.update(),Un.setRenderTarget(Ls),Un.render($i,Ot),Un.setRenderTarget(null),Un.render(ut,st),ho.render(ut,st)}Eu(); + `};var mo=new Fn({uniforms:jl.clone(La.uniforms),vertexShader:La.vertexShader,fragmentShader:La.fragmentShader});mo.uniforms.tDiffuse.value=Ls.texture;var G0=new ur(5,4),ks=new Tt(G0,mo);ks.position.set(400,3.4,-4.56);ks.scale.set(3.5,3,1);ks.rotation.set(-.139,0,0);ut.add(ks);const Sn=new P0(Ot,Un.domElement);Sn.enableDamping=!0;Sn.dampingFactor=.25;Sn.enableZoom=!0;Sn.enablePan=!1;Sn.target.set(0,0,-25);Sn.minDistance=24;Sn.maxDistance=120;fu.load("gltf/SeabedLamp3D.glb",function(i){const e=i.scene;e.position.set(0,-8,-25),e.scale.set(30,30,30),e.name="uhuy",$i.add(e)},void 0,function(i){console.error(i)});var Is=new V_,Ft=new ve(-2,-2);function W0(i){const e=or.getBoundingClientRect();Ft.x=(i.clientX-e.left)/e.width*2-1,Ft.y=-((i.clientY-e.top)/e.height)*2+1}window.addEventListener("mousemove",W0,!1);function X0(i){const e=or.getBoundingClientRect();Ft.x=(i.touches[0].clientX-e.left)/e.width*2-1,Ft.y=-((i.touches[0].clientY-e.top)/e.height)*2+1}window.addEventListener("touchmove",X0,!1);function q0(){if(Br){const i=new C(400,-9,4),e=new C(400,0,-8),t=new C(400,0,0),n=30,r=1.5+Math.min(Math.max(Ft.x,-.5),.5)*(Math.PI/4),s=Math.min(Math.max(-Ft.y+1,.5),10)*(Math.PI/4),a=i.x+n*Math.cos(r),o=i.y+n*Math.sin(s),c=t.z+n*Math.sin(r);new Nn(st.position).to({x:a,y:o,z:c},1e3).easing(Gt.Quadratic.Out).start(),st.lookAt(e)}}var lt=0,Ds=!1;Xt.element.addEventListener("click",function(i){vn||(Xt.element.style.opacity="0",ut.add(Jt),lt=2,Xt.element.addEventListener("transitionend",function(e){lt==2&&(console.log("step dua dijalankan"),ut.remove(Xt),Jt.element.style.opacity="1")}))});Xt.element.addEventListener("mouseover",function(i){Xt.element.style.cursor="pointer"});Jt.element.addEventListener("click",function(i){vn||(Jt.element.style.opacity="0",ut.add(Qt),lt=3,Jt.element.addEventListener("transitionend",function(e){lt==3&&(console.log("step tiga dijalankan"),ut.remove(Jt),Qt.element.style.opacity="1")}))});Jt.element.addEventListener("mouseover",function(i){Jt.element.style.cursor="pointer"});Qt.element.addEventListener("click",function(i){vn||(Qt.element.style.opacity="0",ut.add(Ct),lt=4,Qt.element.addEventListener("transitionend",function(e){lt==4&&(console.log("step empat dijalankan"),ut.remove(Qt),Ct.element.style.opacity="1")}))});Qt.element.addEventListener("mouseover",function(i){Qt.element.style.cursor="pointer"});Ct.element.querySelector("#button2").addEventListener("click",function(i){vn||(lt=3,Ct.element.style.opacity="0",Ct.element.addEventListener("transitionend",function(e){lt==3&&(ut.remove(Ct),console.log("tutup step kembali ke step 0"),lt=0,Ds=!0,jt.style.pointerEvents="none",ut.add(si),Ft.set(-2,-2),mr=!0)}))});si.element.querySelector("#button2").addEventListener("click",function(i){si.element.style.opacity="0",console.log("tutup step kembali ke step 0"),lt=0,jt.style.pointerEvents="none",Ft.set(-2,-2),mr=!0});function j0(i){Is.setFromCamera(Ft,st);var e=Is.intersectObjects([Wt],!0);e.length>0&&(mr=!1,!Ds&<===0?(Wt.material.color.set(16711680),lt=1,Xt.element.style.opacity="1",Xt.element.addEventListener("transitionend",function(t){console.log("step pertama dijalankan"),jt.style.pointerEvents="auto"})):Ds&<===0&&(Wt.material.color.set(16711680),lt=5,si.element.style.opacity="1",jt.style.pointerEvents="auto"))}document.addEventListener("click",j0,!1);function Y0(){Is.setFromCamera(Ft,st);var i=Is.intersectObjects([Wt],!0);i.length>0?lt==0?(or.style.cursor="pointer",Wt.material.color.set(16711680)):(jt.style.pointerEvents="auto",lt===0&&Wt.material.color.set(65280)):(or.style.cursor="auto",lt===0&&Wt.material.color.set(65280))}var hn=new C(0,-8,-25),qa=new C().copy(Ot.position),K0=qa.distanceTo(hn),Z0=0,gu,ja,Hs=!1,pr=!1;function _u(i,e){gu=new Nn(Ot.position).to({x:hn.x+i*Math.cos(e),y:qa.y,z:hn.z+i*Math.sin(e)},500).onComplete(()=>{ja=new Nn({angle:e}).to({angle:e+Math.PI*2},4e3).onUpdate(t=>{var n=t.angle,r=hn.x+i*Math.cos(n),s=hn.z+i*Math.sin(n);Ot.position.set(r,qa.y,s),Ot.lookAt(hn)}).repeat(1/0).start()}).start()}_u(K0,Z0);function vu(i,e){return Math.atan2(i.z-e.z,i.x-e.x)}function xu(i,e){!Hs&&!pr&&_u(i,e)}function Mu(){(Hs||pr)&&(gu.stop(),ja&&ja.stop())}function yu(i){Hs=!0,Mu()}function Su(i){Hs=!1,xu(new C().copy(Ot.position).distanceTo(hn),vu(new C().copy(Ot.position),hn))}document.addEventListener("mousedown",yu,!1);document.addEventListener("mouseup",Su,!1);document.addEventListener("touchstart",function(i){pr||i.touches.length>2&&yu(i.touches[0])},!1);document.addEventListener("touchend",function(i){pr||i.changedTouches.length>2&&Su(i.changedTouches[0])},!1);Sn.addEventListener("start",function(){pr=!0,Mu()});Sn.addEventListener("end",function(){pr=!1,xu(new C().copy(Ot.position).distanceTo(hn),vu(new C().copy(Ot.position),hn))});const $0=document.getElementById("buttonx"),qi=document.getElementById("container-buttonx");var Ns=!0;$0.addEventListener("click",function(i){Br=!1,new Nn(st.position).to({x:0,y:0,z:30},1e3).easing(Gt.Quadratic.InOut).onComplete(()=>{mr=!0}).start(),new Nn(st.rotation).to({x:0,y:0,z:0},1e3).easing(Gt.Quadratic.InOut).start(),qi.style.opacity="0",qi.addEventListener("transitionend",function e(t){qi.classList.add("hidden"),qi.removeEventListener("transitionend",e),Ns=!0})});function J0(){Br==!0&&Ns&&(qi.classList.remove("hidden"),setTimeout(()=>{qi.style.opacity="1"},10),Ns=!1)}const Vi=document.getElementById("container-objective");var mr=!0;function Q0(){mr?(Vi.style.opacity="1",Vi.classList.remove("hidden")):(Vi.style.opacity="0",Vi.addEventListener("transitionend",function i(e){Vi.classList.add("hidden"),Vi.removeEventListener("transitionend",i),Ns=!0}))}function Eu(){requestAnimationFrame(Eu),Wt&&(Wt.rotation.x+=.01,Wt.rotation.y+=.01,Y0()),Ot.rotation.y+=.01,J0(),Q0(),R0(),mo.uniforms.time.value+=.01,q0(),Sn.update(),Un.setRenderTarget(Ls),Un.render($i,Ot),Un.setRenderTarget(null),Un.render(ut,st),ho.render(ut,st)}Eu(); diff --git a/index.html b/index.html index 67b073b..c4a2545 100644 --- a/index.html +++ b/index.html @@ -36,7 +36,7 @@ font-style: normal; } - +