fadeOut class
in
Programming Questions
•
3 years ago
i try do make a simple fadeOut Class, but with my sketch it goes to fast!
how i can add a fade-speed-parameter to my class to control the fadeSpeed?
- FadeOut spot;
- void setup() {
- size(500,500);
- background(2);
- spot = new FadeOut();
- frameRate(1);
- }
- class FadeOut {
- FadeOut() {
- background(120, 0);
- for(int i=255;i>0;i--) {
- fill(255, 255, 255, i);
- print(i);
- }
- rect(125, 125, 250,250);
- }
- }
1