-
Expression Meaning
Hello,
I’m kind of new to writing expressions, and I want to know what this expression “means”;
cnt = thisComp.layer("Controls").effect("Count")(1);
indexOffset = thisComp.layer("Controls").effect("Start Index")(1) - 1;
idx = index - indexOffset;
if (idx > cnt || idx <= 0) [0,0,0] else {
tunLength = thisComp.layer("Controls").effect("Tunnel Length")(1);
spd = thisComp.layer("Controls").effect("Tunnel Flythrough (s)")(1);
tunFrames = timeToFrames(spd);
fps = 1.0 / thisComp.frameDuration;
zOffset = tunLength / tunFrames;
if (idx > tunFrames) [0,0,0] else {
z = - zOffset * ((timeToFrames(time) % tunFrames + spd * (fps / cnt) * (idx - 1)) % tunFrames);
transform.position + [0, 0, z];
}
}
It’s applied to the position on a layer and moves it back when it reaches a certain point – but how? I do know the really basic stuff likethisComp.layer("Controls").effect("Start Index" )(1)
but not more, I appreciate the help.Ole