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