Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

Suresh

Members
  • Content Count

    10
  • Joined

  • Last visited

Community Reputation

3 Newbie

About Suresh

  • Rank
    Member
  1. Thanks a lot for going into such detail, Carl. You're awesome, in case you didn't already know! I think I understand the behavior a lot better now. I didn't imagine I would hit against an optimization trick, but what you said definitely makes sense. 1. BTW, is this the only way to force an update? I'm asking because I'm actually trying to build a timeline based application. So, let's say the code is progress(0).progress(currentTime) Now, if the user tries to modify the box's position at time 0, currentTime will be 0, so we're essentially doing progress(0).progress(0) - which won
  2. Carl, I've got a follow up question on this. Let's say I'm trying to add 2 tweens to a timeline one after the other - one for x position and one for y position (I'm keeping them as separate tweens coz I'll need to update each one individually). Now, here's what's happening: If I update the timeline after each tween is inserted, then, it behaves like the second update was never called. ie, - create tween for x & add to timeline - set the timeline to the current time again so it can update (the t1.time(duration) bit) - create tween for y & add to timeline - set
  3. Hi Carl, Thanks for the super detailed explanation! I didn't get it the first time, but after taking a nap and coming back to it, it makes sense This line was what I was missing: Keep in mind the timeline had a tween in it but the playhead was paused at the beginning. Thanks again! I'm constantly amazed by how awesome your support is. Glad you liked the codepen.
  4. I'm trying to build a timeline based application and I'm seeing some behavior that I don't quite understand. I've created a codepen along with steps for 3 scenarios to recreate this: http://codepen.io/anon/pen/tlFDc From those 3 scenarios, 1 and 3 work as expected, but scenario 2 doesn't - the rectangle in there just jumps back to its original position. (Sorry if this doesn't make sense on its own, but it'll be clear in the codepen). In scenario 3, if I somehow "reset" the GSAP timeline, then everything starts to work fine again. Why is this happening? Any ideas?
  5. Hmm.. I think I'm beginning to understand. I'll try to wrap my head around that invalidate() bit, but thanks for the modified codepen. That solves it! I somehow imagined that the GSAP timeline would be tracking my local JS variable, but now that I think about it... yeah, architecturally that makes no sense at all Is there any difference between doing kill() and remove()? Any reason you choose to use kill() instead of remove() in this case? BTW, you guys are awesome. Such quick and specific help! Keep rocking!
  6. I'm trying to understand how a tween's invalidate() function works. According to the docs, if you invalidate() and restart() a tween, the timeline will take the new parameters of the tween, right? I tried to build a simple example to understand this behavior, but what ends up happening is really confusing. Here's what I have. (I'm using KineticJS) var t1 = new TimelineMax({paused:true, onUpdate:stageUpdate, onUpdateScope:stage}); var tweenX = TweenMax.fromTo(rect, 1, {setX:100}, {setX:500}); var tweenY = TweenMax.fromTo(rect, 1, {setY:100}, {setY:0}); t1.add(tweenX,0); t1.add(tw
  7. Wait.. there was a plugin all along?! I mean.. uh.. yeah, I knew there was a plugin. I just wanted to do it the hard way. For some man points. Anyway, now that I've earned my man points, I'll use the plugin. Thanks Jack, thanks for clarifying that. I think between all the answers in this post, I now understand the behavior better.
  8. You, my friend, are an absolute genius! Thank you! That did it. I added a getter and renamed the functions and it works now. Thank you!! I've updated the JSBin for anyone else who stumbles across this post. http://jsbin.com/afixoc/5/edit
  9. I'm using GSAP's TimelineMax with Kinetic JS. I got them to work together, but I'm having trouble when I try to pass my own custom functions to the timeline. I've included a jsbin to show the issue. http://jsbin.com/afixoc/4/edit The first part of the animation uses a standard Kinetic JS command and this plays fine. tl.to(rect, 1, {setX:300}); The second part of the animation uses a custom function that I am adding to 'rect' and this is failing. tl.to(rect, 1, {customSetX:100}); I tried to track this by publishing the value to the console and the issue is very strange - the
×