Molunerfinn / hexo-theme-melody

:musical_keyboard:A simple & beautiful & fast theme for Hexo.
https://molunerfinn.com
Other
1.59k stars 212 forks source link

Request to update animejs major version and accordingly fix fireworks effect #322

Closed myl7 closed 3 years ago

myl7 commented 3 years ago

I want to create a new issue

Melody Information

Melody Version:

commit 7b4993f2525a2e8e9494d6402c89c1a10f51a5a1

Platform:

Linux

Browser:

Chrome

Expected behavior

Fireworks effect of source/js/fireworks.js. It works fine with the animejs.min.js in the repo.

Actual behavior

But breaks with the latest animejs.

The latest animejs major version is 3, and between major version 2 and 3, timeline api has changed. The changelog is here. What's important in it is:

Timeline offset property has been replaced by timelineOffset #229
Timeline offset can be set as a second argument inside .add()

So with the latest animejs, fireworks effect breaks with a time mismatch of particules and red circle. There is some seconds between the two effects, but they are expected to appear together.

To fix that is simple, which is just use the new timeline api. Like https://github.com/Molunerfinn/hexo-theme-melody/pull/321

Steps to reproduce the behavior

Just replace animejs.min.js with latest animejs 3.2.1.

Feature Request

I would like to say thanks to you and this project. Though not using hexo, I fall in love with the fireworks effect and have applied it into my own blog https://github.com/myl7/mylmoe . Thanks for this wonderful present.