-
Notifications
You must be signed in to change notification settings - Fork 6
烟花特效 #67
Copy link
Copy link
Closed
Description
参考资料
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;
// }Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels