‹ Topluluğa Dön
JS
⬇ 1.210
Parçacık Yıldız Efekti
Canvas üzerinde hareket eden parlayan yıldızlar. Arka plan için mükemmel!
// canvas · parçacık yıldız efekti
const yildizlar = [];
for (let i = 0; i < 90; i++)
yildizlar.push({ x: Math.random() * 300, y: Math.random() * 300, h: Math.random() * 0.6 + 0.2 });
function ciz(ctx) {
ctx.fillStyle = '#050418'; ctx.fillRect(0, 0, 300, 300);
for (const s of yildizlar) {
ctx.fillStyle = 'rgba(34,224,255,' + s.h + ')';
ctx.fillRect(s.x, s.y, 2, 2);
s.y = (s.y + s.h) % 300;
}
}
❤️ 4
⬇ İNDİR (.js)
💬 Yorumlar (2)
👤 Mert
12 Tem 2026 20:17
Bunu oyunumun arka planında kullandım, harika duruyor! ⭐
👤 Ada
12 Tem 2026 20:17
Renkleri değiştirince neon yağmuru gibi oldu 😍