More work.

This commit is contained in:
2020-01-19 15:21:19 +01:00
parent a15c0ce995
commit 8a09e4832b
7 changed files with 330 additions and 186 deletions

17
js/hero.js Normal file
View File

@@ -0,0 +1,17 @@
var x = window.screen.width > 512 ? 160 : 80;
var controller = new ScrollMagic.Controller();
var hero = new TweenMax.from("#hero", 1, {
x: this.x,
ease: Power1.easeOut
});
var heroScene = new ScrollMagic.Scene({
triggerElement: "#start",
triggerHook: 0,
duration: 320
})
.setTween(hero)
.addTo(controller);