Motion#4
-Typewriter
+Typewriter Effect
@@ -167,7 +167,7 @@ Making web motions with
Motion#5
- Mouse follow
+ Mouse Follow
diff --git a/script.js b/script.js
index 04eda3a..d9a16c9 100644
--- a/script.js
+++ b/script.js
@@ -155,6 +155,7 @@ const activateMagnet = (event) => {
/*
dngr.innerHTML = 'cursorX ' + event.clientX + '
boxleft: ' + Math.ceil(boundBox.left) + '
cursorInsideButton: ' + Math.ceil(event.clientX - boundBox.left) + '
relativeToTotalWidth: ' + ((event.clientX - boundBox.left)/magnet.offsetWidth).toFixed(2) + '
shifted: ' + ((event.clientX - boundBox.left)/magnet.offsetWidth - 0.5).toFixed(2)
*/
+
//move button to its new position
gsap.to(magnet, {
duration: 1,
@@ -172,9 +173,8 @@ const activateMagnet = (event) => {
ease: Power4.easeOut
})
-
-
}
+
//mouse leave stuff
const resetMagnet = (event) => {
//move button to its default position
Motion#5
-Mouse follow
+