-
sine wave driving RGBA value trouble
//generate wave red = Math.sin(time*10); //normalise to 0 - 155 rednorm = linear(red,-1,1,0,255); //rgba array [rednorm,255,255,255];
Hi,
Im having a little trouble with getting the RGBA values of a ‘fill’ effect to be controlled by a sine wave..I was hoping for the R value to peridically ramp from 0 to 255 smoothly, creating a smooth change in colour over time. (see my code below).
Instead my fill colour stays white and flickers on cyan for a split second then goes straight back to white, with no smooth graduation in colour.
Can’t get my head around why this shouldn’t work, but I am a newb to expressions so please excuse me!