Loading...
Logo
Processing Forum
Is there a simple code to apply to a svg to fade? 
thanks!

Code below if it helps!

PShape logo;
float angle;
float jitter;

void setup() {
size(800,250);
logo = loadShape("logo.svg");

smooth();
frameRate(50);
shapeMode(CENTER);
}

void draw() {
background(255,255,255);

// during even-numbered seconds (0, 2, 4, 6...)
if (millis() >= 7000){ 
jitter = 2.5;
}
angle = angle + jitter;


pushMatrix();
float c = cos(angle);


translate(width/6, height/2);
rotate(angle*TWO_PI/360);
shape(logo, 0, 0, 200, 200);
popMatrix();
}


Replies(3)

Use shape.disableStyle() and draw it with a fill color with transparency?
how would that look in my coding?
It would look good, for sure!