[英]JavaFX - Animation around border
I'm trying to get an animation around a Node
somewhat like the following: 我正在尝试围绕
Node
制作一个类似于以下内容的动画:
Notice how the border is making a circling effect around the image -- this is the effect that I want to get on my JavaFX Node
. 请注意边框如何在图像周围产生圆形效果-这是我想在JavaFX
Node
上获得的效果。 How could something like this be done? 这样的事情怎么办?
I )First method: 我 )第一种方法:
You can do that with 1 Node as following : 您可以使用1个节点执行以下操作:
1 -For shapes : 1-对于形状:
Use a Path
which contains six ArcTo
to form your three circles (4/2 for small circles) and (2 for the big one). 使用包含六个
ArcTo
的Path
来形成三个圆( ArcTo
为4/2),大圆为2。 but it will be difficult ( but possible ) to calculate the position of the two circle each time Using trigonometry. 但每次(使用三角函数)都很难( 但可能 )计算两个圆的位置。
2 -For the effect : 2-效果:
You can use the Bloom effect to perform that. 您可以使用Bloom效果执行该操作。
3 -for the animation : 3-对于动画:
As said before some knowledge in trigonometry are required to create the rotation of your two circles relying on the JavaFX animation system . 如前所述,依靠JavaFX动画系统,需要一些三角学知识来创建两个圆的旋转。
II )Second method : II )第二种方法:
You can ignore the 1st step of the 1st method and create basically 3 circles directly and continue with the same process as the remaining two. 您可以忽略第一种方法的第一步,基本上直接创建3个圆,并继续执行与其余两个相同的过程。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.