diff options
Diffstat (limited to 'public/js/2dtilt.js')
| -rw-r--r-- | public/js/2dtilt.js | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/public/js/2dtilt.js b/public/js/2dtilt.js deleted file mode 100644 index d5c2a597..00000000 --- a/public/js/2dtilt.js +++ /dev/null @@ -1 +0,0 @@ -var target=document.querySelectorAll(".tilt")[0];try{var tiltFullPageListening=target.dataset.tiltFullPageListening}catch(TypeError){var tiltFullPageListening}var centerX,centerY,mouseX,mouseY,isMouseOver=!1;function resetStyle(){target.style.transform="",target.style.height="0px"}function tiltEffect(){isMouseOver=!0;var rect=target.getBoundingClientRect();centerX=rect.left+rect.width/2,centerY=rect.top+rect.height/2,target.style.transform="translate(".concat((mouseX-centerX)/50,"px, ").concat((mouseY-centerY)/50,"px)"),requestAnimationFrame(tiltEffect)}navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/BlackBerry/i)||navigator.userAgent.match(/Windows Phone/i)||1<window.orientation||(target.addEventListener("mouseleave",function(){isMouseOver=!1,target.style.transform=""}),tiltFullPageListening===void 0?target.addEventListener("mousemove",function(event){mouseX=event.clientX,mouseY=event.clientY}):document.addEventListener("mousemove",function(event){mouseX=event.clientX,mouseY=event.clientY}),requestAnimationFrame(tiltEffect));
\ No newline at end of file |
