Expression Library

Random Scale

Randomly changes the scale value for a layer at random speeds.

Code Sample

Hover over the code and click the copy button.

				
					tMin = .25; //minimum segment duration
tMax = 1.0; //maximum segment duration
minVal = 75;
maxVal = 150;

end = 0;
j = 0;
while (time >= end){
  j ++;
  seedRandom(j,true);
  start = end;
  end += random(tMin,tMax);
}
s = random(minVal,maxVal);
endVal = [s,s];
seedRandom(j-1,true);
dummy = random(); //this is a throw-away value
s = random(minVal,maxVal);
startVal = [s,s]
ease(time,start,end,startVal,endVal)