(i, t, d, r)
| 22 | return [distance * Math.cos(angle), distance * Math.sin(angle)]; |
| 23 | }; |
| 24 | const createParticle = (i, t, d, r) => { |
| 25 | let rotate = noise(r / 10); |
| 26 | return { |
| 27 | start: getXY(d[0], particleCount - i, particleCount), |
| 28 | end: getXY(d[1] + noise(7), particleCount - i, particleCount), |
| 29 | time: t, |
| 30 | scale: 1 + noise(0.2), |
| 31 | color: colors[Math.floor(Math.random() * colors.length)], |
| 32 | rotate: rotate > 0 ? (rotate + r / 20) * 10 : (rotate - r / 20) * 10 |
| 33 | }; |
| 34 | }; |
| 35 | const makeParticles = element => { |
| 36 | const d = particleDistances; |
| 37 | const r = particleR; |
no test coverage detected