admin管理员组文章数量:1277885
I'm trying to create a simple timelineMax with GSAP and scrollMagic, I'm getting the following error. Everything looks right to me so I'm not understanding this error.
Uncaught TypeError: Cannot read property 'repeat' of undefined
d.to @ TweenMax.min.js:14
(anonymous function) @ app.js:12
Line 12 is .to("#parallax1 > div", {y: "80%", ease: Linear.easeNone});
below.
Here's the code:
// init controller
var controller = new ScrollMagic.Controller({globalSceneOptions: {triggerHook: "onEnter", duration: "200%"}});
// build scenes
// build tween1
var tween1 = new TimelineMax();
tween1.to("#parallax1 > div", {y: "80%", ease: Linear.easeNone});
var scene = new ScrollMagic.Scene({triggerElement: "#parallax1"})
.setTween(tween1)
.addIndicators()
.addTo(controller);
(I know there's no duration param in that tween, but if you look at .html you can see that there's no duration parameter on their setTween and it works just fine).
I'm trying to create a simple timelineMax with GSAP and scrollMagic, I'm getting the following error. Everything looks right to me so I'm not understanding this error.
Uncaught TypeError: Cannot read property 'repeat' of undefined
d.to @ TweenMax.min.js:14
(anonymous function) @ app.js:12
Line 12 is .to("#parallax1 > div", {y: "80%", ease: Linear.easeNone});
below.
Here's the code:
// init controller
var controller = new ScrollMagic.Controller({globalSceneOptions: {triggerHook: "onEnter", duration: "200%"}});
// build scenes
// build tween1
var tween1 = new TimelineMax();
tween1.to("#parallax1 > div", {y: "80%", ease: Linear.easeNone});
var scene = new ScrollMagic.Scene({triggerElement: "#parallax1"})
.setTween(tween1)
.addIndicators()
.addTo(controller);
(I know there's no duration param in that tween, but if you look at http://janpaepke.github.io/ScrollMagic/examples/advanced/parallax_sections.html you can see that there's no duration parameter on their setTween and it works just fine).
Share Improve this question edited Jun 10, 2015 at 23:20 Agent Zebra asked Jun 10, 2015 at 1:40 Agent ZebraAgent Zebra 4,5506 gold badges36 silver badges70 bronze badges1 Answer
Reset to default 12You are missing the duration parameter:
TweenMax.to(element, duration, {property: value});
.
本文标签: javascriptGSAP timelineMax errorcannot read property 39repeat39 of undefinedStack Overflow
版权声明:本文标题:javascript - GSAP timelineMax error, cannot read property 'repeat' of undefined - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741243321a2364404.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论