Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var punto = {
- x: 100,
- y: 50
- };
- var colore = {
- r: 255,
- g: 0,
- b: 0
- };
- function setup() {
- createCanvas(600, 400);
- background(0);
- }
- function draw() {
- punto.x = random(0, width);
- punto.y = random(0, height);
- colore.r = random(100, 255);
- colore.g = 0;
- colore.b = random(100, 190);
- noStroke();
- fill(colore.r, colore.g, colore.b, 100);
- ellipse(punto.x, punto.y, 24, 24);
- }
- function mousePressed(){
- background(0);
- }
Add Comment
Please, Sign In to add comment