mirror of
https://github.com/Kugelschieber/schnittfest.git
synced 2026-01-18 10:20:27 +00:00
More work.
This commit is contained in:
17
js/hero.js
Normal file
17
js/hero.js
Normal 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);
|
||||
|
||||
Reference in New Issue
Block a user