void setup(){ size( 300, 200 ); background( 0, 0, 0 ); } void draw(){ float f = (float)mouseX/width; color c = color( 100+155*f, 100+155*f, 200+55*f ); loadPixels(); for( int y = 0; y < height; y++ ){ pixels[y*width] = c; } for( int y = 0; y < height; y++ ){ for( int x = width-1; x >= 1; x-- ){ pixels[x+y*width] = pixels[x-1+y*width]; } } updatePixels(); }