Logo ETI Quitter la lecture facile

for (let star of stars) star.z -= 5; if (star.z < 1) star.z = width; star.x = random(-width, width); star.y = random(-height, height);

ellipse(sx, sy, r, r);

function updatePosition()

function resizeCanvas() width = window.innerWidth; height = window.innerHeight; canvas.width = width; canvas.height = height; // Reset ball position to center on resize x = width / 2; y = height / 2;

function drawBall() ctx.clearRect(0, 0, width, height); // Gradient ball const gradient = ctx.createRadialGradient(x - 10, y - 10, 5, x, y, radius); gradient.addColorStop(0, '#ff6b6b'); gradient.addColorStop(1, '#c0392b'); ctx.beginPath(); ctx.arc(x, y, radius, 0, Math.PI * 2); ctx.fillStyle = gradient; ctx.fill(); ctx.shadowBlur = 15; ctx.shadowColor = "white";

INSCRIVEZ-VOUS
AUX NEWSLETTERS GRATUITES !

screensaver examples