Currently it starts at the beginning of the comp, even if the layer begins later in the comp.
Code: Select all
veloc = 7;
amplitude = 80;
decay = .7;
amplitude*Math.sin(veloc*time)/Math.exp(decay*time)
Code: Select all
veloc = 7;
amplitude = 80;
decay = .7;
amplitude*Math.sin(veloc*time)/Math.exp(decay*time)
Code: Select all
my_times = [1, 5, 9.5];
veloc = 7;
amplitude = 80;
decay = .7;
inTime = -500;
for (i=0; i<my_times.length; i++){
if (time>=my_times[i])
inTime = my_times[i];
}
t = time - inTime;
amplitude*Math.sin(veloc*t)/Math.exp(decay*t);
Code: Select all
my_times = [1, 5, 9.5];
my_amp = [80, 40, 60];
veloc = 7;
//amplitude = 80;
decay = .7;
inTime = -500;
for (i=0; i<my_times.length; i++){
if (time>=my_times[i]){
inTime = my_times[i];
amplitude = my_amp[i];
}
}
t = time - inTime;
amplitude*Math.sin(veloc*t)/Math.exp(decay*t);
Code: Select all
my_times = [1, 5, 9.5];
my_amp  = [80, 40, 60];
veloc = 7;
amplitude = my_amp[0];
decay = .7;
inTime = -500;
for (i=0; i<my_times.length; i++){
  if (time>=my_times[i]){
   inTime = my_times[i];
   amplitude = my_amp[i];
  }
}
t = time - inTime;
amplitude*Math.sin(veloc*t)/Math.exp(decay*t);