Simple Loading Bar Made in Processing


Here is another simple example that shows how easy and powerful the Processing is. Adjust frameRate (frames per second) to make the animation faster or slower).

loading Simple Loading Bar Made in Processing animation beginner code images drawing implementation Processing and ProcessingJS

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// https://helloacm.com/processing/
int per = 0;
final int SX = 500;
final int SY = 400;
 
void setup() {
  size(SX, SY);  
  frameRate(10);
}
 
void draw() {
  per = (per + 1) % 100;
  background(0, 0, 0); // black 
  textSize(30);
  text("Loading ... " + per + " %", SX / 4, SY / 2.5);
  rect(SX / 4, SY / 2, per * 2, 20, 7);
}
// https://helloacm.com/processing/
int per = 0;
final int SX = 500;
final int SY = 400;

void setup() {
  size(SX, SY);  
  frameRate(10);
}

void draw() {
  per = (per + 1) % 100;
  background(0, 0, 0); // black 
  textSize(30);
  text("Loading ... " + per + " %", SX / 4, SY / 2.5);
  rect(SX / 4, SY / 2, per * 2, 20, 7);
}

You can view the demo [here] using any modern browser that supports Javascript (ProcessingJS).

–EOF (The Ultimate Computing & Technology Blog) —

GD Star Rating
loading...
185 words
Last Post: How to Match Word Boundary using SQL?
Next Post: Send Keystrokes to the Active Window using SendKeys (WSH)

The Permanent URL is: Simple Loading Bar Made in Processing

Leave a Reply