Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

烟花特效 #67

Closed
Dream4ever opened this issue May 8, 2019 · 0 comments
Closed

烟花特效 #67

Dream4ever opened this issue May 8, 2019 · 0 comments

Comments

@Dream4ever
Copy link
Owner

Dream4ever commented May 8, 2019

参考资料

HTML5 canvas and javascript fireworks tutorial

代码调整

上面 CodePen 的代码已经非常好了,根据自己的需求,对其中几处代码进行了调整。

  // 烟花发射的时间间隔,单位为毫秒,默认为80,时间有点长,改成40,效果就比较嗨了
  timerTotal = 40,

  // 烟花轨迹的长度,由默认的3改为6,更好看一些
  this.coordinateCount = 6;

  // 将下面两处代码注释掉,就不会显示烟花爆炸位置了
  this.targetRadius = 0;

  // // cycle the circle target indicator radius
  // if (this.targetRadius < 8) {
  //   this.targetRadius += 0.3;
  // } else {
  //   this.targetRadius = 1;
  // }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant