Jump to content
Search Community

sauldraws

Members
  • Posts

    6
  • Joined

  • Last visited

sauldraws's Achievements

2

Reputation

  1. Okay this makes sense to me the function calls itself, and each time it creates a new timeline instance, but doesn't that timeline reference only exists within that function?, suppose we wanted to be able to stop/pause/reverse it via some external event?
  2. all great answers actually.. I learned something from all three of you
  3. Howdy; I've been pouring through the forums and a few of the examples and I have a question, from the point of view of ease of learning and efficient code (and yes I know those two things often fight each other) given code like this spinningWheels = new TimelineMax().add(spin()); function spin() { var tl = new TimelineMax() .add("begin-spin") .to(gear, 4, {transformOrigin:"50% 50%", rotation:360, repeat:-1, ease: Linear.easeNone}, "begin-spin") .to(cog, 2, {transformOrigin:"50% 50%", rotation:360, repeat:-1, ease: Linear.easeNone}, "begin-spin + .125") .to(eight_cog, 3, {transformOrigin:"50% 50%", rotation:360, repeat:-1, ease: Linear.easeNone}, "begin-spin + .125") .to(wheels, 2, {transformOrigin:"50% 50%", rotation:360, repeat:-1, ease: Linear.easeNone}, "begin-spin") return tl; } initially when look at the redundant vars object in each to line, I think, 'I should break that out', I haven't actually tried it, now that I sit typing this - I'm not sure it's valid thinking, thoughts? I realize it's kind of a benign topic, but I'm procrastinating this morning
  4. thanks @OSUblake that seems like a pretty solid solution
  5. Hi; I searched a bit (but not exhaustively) looking for the answer to this, and bear with me because I'm BRAND NEW (after decades of doing non-moving art) I have a number of items within a SVG I want to animate to their natural position from a point beyond the viewbox in scaling (responsive) SVG right now I have a js object that is basically var viewBox = {'x':500, 'y':500}; which mimics the natural dimensions of my SVG (unscaled) - but given how extensive Greensock is, is there a best practice for positioning a starting point that's outside the viewbox without using hardcoded values? I see that xPercent and yPercent exist but when I use them on specific elements within a SVG they seem to be using the physical dimensions of that element rather than the dimensions of the overall parent SVG. TIA Saul
×
×
  • Create New...