(star)
| 1636 | // Crackle pops into a small cloud of golden sparks. |
| 1637 | //噼里啪啦的一声,迸出一小团金色的火花。 |
| 1638 | function crackleEffect(star) { |
| 1639 | const count = isHighQuality ? 32 : 16; |
| 1640 | createParticleArc(0, PI_2, count, 1.8, (angle) => { |
| 1641 | Spark.add( |
| 1642 | star.x, |
| 1643 | star.y, |
| 1644 | COLOR.Gold, |
| 1645 | angle, |
| 1646 | // apply near cubic falloff to speed (places more particles towards outside) |
| 1647 | Math.pow(Math.random(), 0.45) * 2.4, |
| 1648 | 300 + Math.random() * 200 |
| 1649 | ); |
| 1650 | }); |
| 1651 | } |
| 1652 | |
| 1653 | /** |
| 1654 | * 烟花可以用以下选项构建: |
no test coverage detected