-
Make a Layer Grow at each Marker
I’d like to make a layer grow at each marker. Thanks to other posts in this forum, I’ve come as far as the attached expression. However, the layer resets to the default scale at each marker instead of building on the current scale. I thought that grabbing the scale using valueAtTime() and plugging in the time of the marker would provide the solution, but it’s not happening. Any ideas?
var growSpeed = 10;
var growPeriod = 0.1;if (marker.numKeys > 0){
n = marker.nearestKey(time).index;
if (marker.key(n).time > time) {
n--;
}if (n > 0) {
t1 = marker.key(n).time;
t2 = t1 + growPeriod;
startScale = scale.valueAtTime(t1)[0];
temp = linear(time, t1, t2, startScale, (startScale + growSpeed));
[temp,temp];
} else {
// do nothing
value;
}
}