Skip to content

rust终端烟花

🕒 Published at:
gif

使用如下项目

https://github.com/Wayoung7/firework-rs

一款跨平台的终端ASCII art firework

1.安装rust

此项目依赖rust,需要安装rust。

Linux安装

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Win安装 https://www.rust-lang.org/tools/install

2.安装firework

安装方式1(推荐)

git clone https://github.com/Wayoung7/firework-rs.git

运行 cd firework-rs

cargo run --release -- -d 0

安装方式2(全局安装)

cargo install firework-rs

运行 firework -d 0

此时你就可以看到烟花了,

退出按ESC

3.用法

启用渐变的无限烟花表演:

firework -g

启用循环和渐变的演示 1:

firework -l -g -d 1

默认是有5个演示的即 0-4

firework -l -g -d 0

firework -l -g -d 2

firework -l -g -d 3

firework -l -g -d 4

当然作者还在examples/ 目录提供了几个示例,

切换目录到examples/

cd examples/

运行示例 cargo run --example fountain

作者提供了3个示例fountainvortexheart

可以自行体验