I am trying to implement scrollmagic to a web component. when i tried adding the rotate animation, the event is triggered on load of page instead of on scroll. below is the code i have used in js. Please help to resolve this. Thanks in advance.
Also when am trying to add indicators for the debug , the animationis not working at all.
$(function() {
var scrollMagicController = new ScrollMagic.Controller();
var tween = TweenMax.to(".scroll4", 2, {rotation: 360});
var scene = new ScrollScene.Scene({
triggerElement: ".scroll4",
I am trying to implement scrollmagic to a web component. when i tried adding the rotate animation, the event is triggered on load of page instead of on scroll. below is the code i have used in js. Please help to resolve this. Thanks in advance.
Also when am trying to add indicators for the debug , the animationis not working at all.
$(function() {
var scrollMagicController = new ScrollMagic.Controller();
var tween = TweenMax.to(".scroll4", 2, {rotation: 360});
var scene = new ScrollScene.Scene({ triggerElement: ".scroll4",
}) .setTween(tween) .addTo(scrollMagicController);
// Add debug indicators fixed on right side scene.addIndicators();
});