(distance, pointIndex, totalPoints)
| 18 | |
| 19 | const noise = (n = 1) => n / 2 - Math.random() * n; |
| 20 | const getXY = (distance, pointIndex, totalPoints) => { |
| 21 | const angle = ((360 + noise(8)) / totalPoints) * pointIndex * (Math.PI / 180); |
| 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 { |
no test coverage detected