(num)
| 73 | } |
| 74 | |
| 75 | function initParticles(num) { |
| 76 | for (let i = 0; i < num; i++) { |
| 77 | particles.push(new Particle(Math.random() * canvas.width, Math.random() * canvas.height)); |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | function animate() { |
| 82 | ctx.clearRect(0, 0, canvas.width, canvas.height); |