博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
react可视化_如何使用React和Popmotion.io可视化煎饼算法
阅读量:2521 次
发布时间:2019-05-11

本文共 2206 字,大约阅读时间需要 7 分钟。

react可视化

What you are going to see below was supposed to be part of my solution to an exercise given in a coding challenge. It was several months ago, and I had signed in for it. Due to unforeseen factors, I hadn't finished it. Now, after that time and the challenge is finished, I can share it here.This is not going to be a step-by-step tutorial. Rather, it'll be a quick review of how can we use frameworks like React and Popmotion.io along with an algorithm. And then create a nice visualization of that very same algorithm. Somehow it feels nice! 🤓The so called is a famous (or not?) sorting algorithm that you can read more about on the internet, if you're interested. Its nature is out of the scope of this article. Here we only see it in action with nice animations, thanks to Popmotion.io.Here is the you can play with. There are two text inputs and two buttons. In the first input you enter the time interval which will be used for each animation round, that is how fast each pancake will be sorted. It's in milliseconds, which means if you enter the value 1000, the animation will execute for roughly 1 second.

您将在下面看到的内容应该是我对编码挑战中给出的练习的解决方案的一部分。 几个月前,我已经签了字。 由于不可预见的因素,我尚未完成。 现在,在那之后,挑战完成了,我可以在这里分享它。这不会是一个分步教程。 而是快速回顾一下如何使用React和Popmotion.io等框架以及算法。 然后创建一个与该算法完全相同的可视化效果。 不知何故感觉不错! cake所谓的是一种著名的(或不是?)排序算法,如果您有兴趣的话,可以在Internet上阅读更多信息。 它的性质超出了本文的范围。 感谢Popmotion.io,在这里我们只能看到带有精美动画的动作,这里是您可以播放的 。 有两个文本输入和两个按钮。 在第一个输入中,输入将用于每个动画回合的时间间隔,即每个煎饼的分类速度。 以毫秒为单位,这表示如果输入值1000,动画将执行大约1秒钟。

The second input is used to define how many pancakes you want to see sorting. The value there must be between 2 and 50. The buttons are self-explanatory enough. One is for starting the sorting animation, the other one is for resetting it. And is where you can find the source code for the demo app. Feel free to check it out and take a closer look. You might try to amend the animations I did. I would be more than interested to see your versions. :)That was all. Nice and short, perfect for the summer! ☀️ 🏖🔥 Thanks for reading! 🔥

第二个输入用于定义要查看的煎饼数量。 该值必须在2到50之间。这些按钮很容易解释。 一种用于启动排序动画,另一种用于重置动画。 ,您可以找到演示应用程序的源代码。 随时检查一下并仔细查看。 您可以尝试修改我所做的动画。 我将非常有兴趣查看您的版本。 :)这就是全部了。 短暂而美好,非常适合夏天! ☀️🏖🔥感谢您的阅读! 🔥

翻译自:

react可视化

转载地址:http://zvhwd.baihongyu.com/

你可能感兴趣的文章
查看端口被占用情况
查看>>
浅谈css(块级元素、行级元素、盒子模型)
查看>>
Ubuntu菜鸟入门(五)—— 一些编程相关工具
查看>>
PHP开源搜索引擎
查看>>
12-FileZilla-响应:550 Permission denied
查看>>
ASP.NET MVC 3 扩展生成 HTML 的 Input 元素
查看>>
LeetCode 234. Palindrome Linked List
查看>>
编译HBase1.0.0-cdh5.4.2版本
查看>>
结构体指针
查看>>
迭代器
查看>>
Food HDU - 4292 (结点容量 拆点) Dinic
查看>>
Ubuntu安装Sun JDK及如何设置默认java JDK
查看>>
[经典算法] 排列组合-N元素集合的M元素子集
查看>>
Codeforces 279D The Minimum Number of Variables 状压dp
查看>>
打分排序系统漫谈2 - 点赞量?点赞率?! 置信区间!
查看>>
valgrind检测linux程序内存泄露
查看>>
MSP430(F149)学习笔记——红外接收
查看>>
cef3的各个接口你知道几个
查看>>
Hadoop以及组件介绍
查看>>
1020 Tree Traversals (25)(25 point(s))
查看>>