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

Update:更新readme文件 #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 27 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
# fireworks
HTML5+Canvas漂亮的3D烟花动画生日特效,节日特效,烟花

![image](http://upload-images.jianshu.io/upload_images/6411787-aaf971906d6a5922?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![image](http://upload-images.jianshu.io/upload_images/6411787-fb4a6506ca1bf129?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![image](http://upload-images.jianshu.io/upload_images/6411787-fc45fd483ca986dc?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![image](http://upload-images.jianshu.io/upload_images/6411787-e8fda7078860c7d1?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
https://github.com/louislivi/fireworks
> HTML5+Canvas漂亮的3D烟花动画生日特效,节日特效,烟花

动态效果

![](assets/2025-01-01-14-03-32-image.png)

静态效果

![](assets/2025-01-01-14-02-37-image.png)

### 如何自定义内容?

修改js/index.js,中第27行代码

```js
S.UI.simulate('|#countdown 3|xxx|yyy|祝|你|生|日|快|乐|zzz');
```

1)`xxx`和`yyy`可以改为具体的姓名,也可以增加内容,但是一定要用`|`分割

2)最后一直显示的内容为`zzz`,可以自定义一个内容

比如:

```js
S.UI.simulate('|#countdown 3|闫|同|学|祝|你|新|年|快|乐|wx:扯编程的淡');
```
Binary file added assets/2025-01-01-14-02-37-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/2025-01-01-14-03-32-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var S = {
if (i !== -1) {
S.UI.simulate(decodeURI(action).substring(i + 3));
} else {
S.UI.simulate('|#countdown 3||某|某|祝|你|生|日|快|乐|#rectangle|');
S.UI.simulate('|#countdown 3|闫|同|学|祝|你|新|年|快|乐|wx:扯编程的淡');
}

S.Drawing.loop(function () {
Expand Down Expand Up @@ -697,7 +697,7 @@ S.Shape = (function () {
dots[i].move(new S.Point({
x: Math.random() * a.w,
y: Math.random() * a.h,
a: 0.3, //.4
a: 0.4, //.4
z: Math.random() * 4,
h: 0
}));
Expand Down