24 lines, 5 of them comments ยท 271 tokens, written in 7 seconds for $0.0003


 1  // A simple p5.js script that creates a moving circle
 2  
 3  function setup() {
 4    createCanvas(400, 400);
 5    background(220);
 6  }
 7  
 8  function draw() {
 9    background(220); // Clear canvas each frame
10    
11    // Draw a circle that follows the mouse
12    fill(255, 100, 100, 150);
13    noStroke();
14    ellipse(mouseX, mouseY, 50, 50);
15    
16    // Draw a static circle in the center
17    fill(100, 100, 255, 150);
18    ellipse(width/2, height/2, 80, 80);
19    
20    // Show coordinates
21    fill(0);
22    textSize(16);
23    text("Mouse X: " + mouseX + " Y: " + mouseY, 20, 30);
24  }