ternimal - 向终端显示动画生命
时间:2020-03-05 15:29:53 来源:igfitidea点击:
最近,我们在终端上有一篇关于10个较小的Linux乐趣的文章在终端上显示了一些疯狂的输出。
在终端上显示生活形式怎么样?
在这篇文章中,将介绍我们为终端带来生命的"Terninal"。
什么是ternimal?
当我们实际读取时,Ternimal(可能是终端+动物的组合)是使用Unicode块符号在终端中绘制动画Lifeform的程序。
它在大多数终端仿真器和大多数单间字体上工作。
这项官方Github项目由Philipp Emanuel Weidmann(P-E-W)编写,根据GNU通用公共许可证3版第3版。
Ternimal可以被认为用于乐趣,并且它不需要许多资源来运行。
它没有与RUST标准库分开的依赖关系,该库必须是版本> = 1.20。
我们可以克隆以下项目:
# git clone https://github.com/p-e-w/ternimal.git Cloning into 'ternimal'... remote: Counting objects: 18, done. remote: Compressing objects: 100% (10/10), done. remote: Total 18 (delta 7), reused 18 (delta 7), pack-reused 0 Unpacking objects: 100% (18/18), done. Checking connectivity... done.
我们可以检查文件夹的内容:
# ls ternimal/ README.md ternimal.rs
正如我们之前所说的那样,我们必须安装RustC以便具有功能性三核。
# curl https://sh.rustup.rs -sSf | sh info: downloading installer Welcome to Rust! This will download and install the official compiler for the Rust programming
现在我们可以继续Ternimal进程
# cd ternimal/&& rustc -O ternimal.rs
使用ternimal来模拟Lifeform
Ternimal可以通过终端中提供的一些参数使用.RS可以根据需求操纵它。
通过Ternimal可以模拟一些Lifeform
Black hole
我们可以在终端上模拟块孔,如下所示:
# ./ternimal speed=10 length=100 segments=5 thickness=13 gradient=0.5:#000000,0.8:#ffffff,1:#000000
我们可以通过使用终端中的值编辑参数。
该输出是低分段数,宽距离场,并且适当选择的梯度的组合。
Swarn
你可以拥有另一种形式如下
# ./ternimal length=2 segments=30 thickness=1,4,19,30
Anaconda
我们可以使用波浪在终端上创建蛇
./ternimal length=100 segments=50 thickness=1,4,1,0 radius=6,12 gradient=0:#666600,0.5:#fefd30,1:#003300
我们可以尝试编辑参数以具有另一种形式,如下所示
# ./ternimal length=200 segments=100 thickness=33,4,19,4
希望你喜欢这个工具,让我们知道你是否找到了任何其他类似的工具。
祝我们美好的一天,享受浏览其他文章:-)