diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2024-03-14 17:02:57 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2024-03-14 17:02:57 +0800 |
| commit | 013bd778765f8d19e52fb113e178cbde79ccc804 (patch) | |
| tree | dced5a80067ba05e2a7b60207320f5aedc12ed94 /public/js/mouseblob.js | |
| parent | 5c5d507d38ce39ffda66a571916371b4d2bc9f4c (diff) | |
updates
Diffstat (limited to 'public/js/mouseblob.js')
| -rw-r--r-- | public/js/mouseblob.js | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/public/js/mouseblob.js b/public/js/mouseblob.js index 65e7b79e..ae41fee9 100644 --- a/public/js/mouseblob.js +++ b/public/js/mouseblob.js @@ -1,24 +1 @@ -"use strict"; - -window.onpointermove = function (event) { - var pageX = event.pageX, - pageY = event.pageY; - var momentumX = pageX + pageX - blob.offsetLeft; - var momentumY = pageY + pageY - blob.offsetTop; - blob.animate({ - left: "".concat(momentumX, "px"), - top: "".concat(momentumY, "px") - }, { - duration: 1000, - fill: "forwards" - }); - blob.animate({ - left: "".concat(pageX, "px"), - top: "".concat(pageY, "px") - }, { - duration: 500, - fill: "forwards" - }); - blob.style.left = "".concat(pageX, "px"); - blob.style.top = "".concat(pageY, "px"); -};
\ No newline at end of file +"use strict";window.onpointermove=function(event){var pageX=event.pageX,pageY=event.pageY,momentumX=pageX+pageX-blob.offsetLeft,momentumY=pageY+pageY-blob.offsetTop;blob.animate({left:"".concat(momentumX,"px"),top:"".concat(momentumY,"px")},{duration:1e3,fill:"forwards"}),blob.animate({left:"".concat(pageX,"px"),top:"".concat(pageY,"px")},{duration:500,fill:"forwards"}),blob.style.left="".concat(pageX,"px"),blob.style.top="".concat(pageY,"px")};
\ No newline at end of file |
