(English version is down below.)
多小球蹒跚跟随鼠标移动。
此项目改编自 /~https://github.com/chenglou/react-motion#staggeredmotion-
示例网页 预览效果:http://practice.hollowman.ml/🔵⚪🔴%20Staggered%20Mouse%20Balls/StaggeredMouse/
观看在我的主页上的应用效果:https://hollowman6.github.io/
请参考示例网页来将Staggered-Mouse-Balls.js嵌入到你的网战中。
这里另外提供经过压缩后的js:Staggered-Mouse-Balls.min.js
-
安装依赖:执行
npm install
-
热编译(慢):执行
npm start
然后在浏览器中直接访问 http://127.0.0.1:3000 查看实时编译效果。
- 直接编译:执行
npm run build
然后在StaggeredMouse
目录下会另外生成一个StaggeredMouse
文件夹,里面存放着编译好的Staggered-Mouse-Balls.js
文件。这时你可以直接用浏览器打开StaggeredMouse/index.html
查看效果。
Staggered balls that follow mouse moves.
This project is derived from /~https://github.com/chenglou/react-motion#staggeredmotion-
Example Page real-time watching: http://practice.hollowman.ml/🔵⚪🔴%20Staggered%20Mouse%20Balls/StaggeredMouse/
Watch the effect on my Home Page: https://hollowman6.github.io/
Please refer to the Example Page to insert Staggered-Mouse-Balls.js into your website.
Here I provide the js that has been deflated:Staggered-Mouse-Balls.min.js
-
Install Dependencies: run
npm install
-
Hot reloading (slow): run
npm start
Then visit http://127.0.0.1:3000 to check hot reloading result.
- Direct Compile(faster): run
npm run build
Then a StaggeredMouse
folder will be produced under StaggeredMouse
directory, where the successfully compiled Staggered-Mouse-Balls.js
will be stored. Then you can open StaggeredMouse/index.html
to check the result.