ulovliglogning.dk/assets/js/main.js

48 lines
1.7 KiB
JavaScript

// var controllerPanes = new ScrollMagic.Controller({
// globalSceneOptions: {
// triggerHook: 'onLeave'
// }
// });
// var controllerAnimations = new ScrollMagic.Controller({
// globalSceneOptions: {
// //triggerHook: 'onLeave'
// }
// });
// // get all sections
// var sections = document.querySelectorAll("section");
// var sectionCount = sections.length;
// var sectionDurations = [];
// var wipeAnimation = new TimelineLite()
// for (var i = 0; i < sections.length; i++) {
// sectionDurations.push(sections[i].offsetHeight/300);
// wipeAnimation = wipeAnimation.fromTo(sections[i], sectionDurations[i], {
// y: "0",
// }, {
// y: i == sections.length - 1 ? "0" : "-100%",
// })
// }
// // create scene for every slide
// //for (var i = 0; i < sections.length - 1; i++) {
// new ScrollMagic.Scene({
// triggerElement: document.getElementsByClassName("container")[0],
// triggerHook: "onLeave",
// })
// .setPin(document.getElementsByClassName("container")[0])
// .setTween(wipeAnimation)
// .addIndicators() // add indicators (requires plugin)
// .addTo(controllerPanes);
// //}
// // for (var i = 0; i < sections.length; i++) {
// // new ScrollMagic.Scene({
// // triggerElement: sections[i]
// // })
// // .setClassToggle(sections[i], "appear")
// // .addIndicators({name: "1 - add a class"}) // add indicators (requires plugin)
// // .addTo(controllerAnimations);
// // }