//PIXEL CLASS class Px { float _px, _py, _pw, _ph; float _r,_g,_b; float _incR, _incG, _incB; int _inx; Px(float mx, float my, float mw, float mh, float[] mc, int inx) { _px = mx; _py = my; _pw = mw; _ph = mh; _r = mc[0]; _g = mc[1]; _b = mc[2]; _incR = _incG = _incB = 0; _inx = inx; } void update() { _r += (_incR)*changeInc; _g += (_incG)*changeInc; _b += (_incB)*changeInc; //if (_inx == num){ // print (_r + " "); // if ( ( _r >= targValues[0]) && ( _g >= targValues[1]) && (_b >= targValues[2]) ){ // println ("HOLD"); // } //} } void draw() { fill(color(_r,_g,_b)); rect(_px,_py,_pw,_ph); } }