// Welcome to Visual Coding! 🎨 let x = 100; let y = 200; let speedX = 7; let speedY = 2; let ballSize = 50; function setup() { createCanvas(450, 500); } function draw() { // Create trail effect by drawing a semi-transparent background background(50, 50, 50, 25); // Update position x += speedX; y += speedY; // Bounce off edges if (x > width - ballSize/2 || x < ballSize/2) { speedX *= -1; } if (y > height - ballSize/2 || y < ballSize/2) { speedY *= -1; } // Draw bouncing ball fill(random(100, 255), random(100, 255), random(100, 255)); circle(x, y, ballSize); // Add some sparkles for (let i = 0; i < 3; i++) { fill(255, 255, 255, 150); circle(x + random(-30, 30), y + random(-30, 30), random(3, 8)); } }