Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- parallax: function () {
- if (this.parallaxSwitch) {
- event = event || window.event;
- let moveX = ((event.clientX / (document.getElementById('homepage').clientWidth / 2)) - 1) * this.movementStrength,
- moveY = ((event.clientY / (document.getElementById('homepage').clientHeight / 2)) - 1) * this.movementStrength;
- TweenMax.to(diamondAnimate.wrapper, 0.2, {transform: "translate(" + moveX + "px, " + moveY + "px)"})
- TweenMax.to(diamondAnimate.rightSectionPattern, 0.2, {backgroundPosition: ((moveX + (moveY / 3)) * 2) + "px " + ((moveY - (moveX / 3)) * 2) + "px"})
- TweenMax.to(diamondAnimate.navItemProjects, 0.85, {transform: "translate(" + (-(moveX * 4 / 5)) + "px, " + (-(moveY * 4 / 5)) + "px)"})
- }
- },
Advertisement
Add Comment
Please, Sign In to add comment