-
Random change to specific color (over random time)
I found this script in another post which is exactly what I’m in need of.
The only change I have made is that I want to randomize the “easeTime” and “segDur” so that the colorchanges don’t happen at the same time.But this doesn’t seem to work because now I’m getting color changes every frame.
Can this script be modified so that the color changes are random as well?
Regards,
Craigcolors = [[253,184,19,255]/255,
[237,2,129,255]/255,
[0,171,189,255]/255,
[92,46,145,255]/255];
easeTime = random(0.2,0.8);
segDur = random(1,4);curSeg = Math.floor(time/segDur);
t = time%segDur;
seedRandom(curSeg,true);
idx1 = Math.floor(random(colors.length));
seedRandom(curSeg-1,true);
idx0 = Math.floor(random(colors.length));
ease(t,0,easeTime,colors[idx0],colors[idx1])