问题标签 [rotateanimation]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
android - RotateAnimation 获取当前角度
获得 RotateAnimation 当前角度的任何技巧?我有一个使用 RotateAnimation 旋转的 imageview,imageview.getRotation() 始终为 0.0。也许这是获得旋转角度的技巧?塔克斯
android - Android Wear 旋转动画
我正在尝试在 Android Wear 上做一个 RotationAnimation(一个 ImageView)。
我在 Android 平板电脑上测试了一个示例,它运行良好,但 ImageView 在 Android Wear 上消失了。
我怎样才能在 android Wear 上做到这一点?
这是布局:
这是旋转动画 xml:
最后这是活动代码:
谢谢。
android - 旋转 ListView 中的刷新按钮
最近我写了一个函数。它是关于每个列表项中的刷新按钮。我想要的是单击按钮或列表项,刷新按钮开始旋转。请求完成时停止。我使用动画如下:
和一些源代码在这里:
当请求完成时,我调用 notifyDataSetChanged() 来刷新 LiseView。
问题是按钮确实在旋转。但是当我第二次点击它时。它在旋转,但有点模糊。像这样:
有什么建议么?多谢。
java - java中的360度移动示例
是否可以在没有任何游戏引擎的情况下在 java(swing) 中简单地进行 360 度移动?我所拥有的就是这个尝试:
如下图所示,我不知道如何处理运动旋转,这是输出:
java - Universal Tween Engine / LibGDX: models losing transform and rotation between tweens in sequence
I'm working on a 3d game and trying to get character movement set up correctly. The interaction is simple, there's a single model on the screen, a user clicks a point on the screen, the model rotates to face the point clicked (right now the model is a little ghost with eyes, so the eyes turn to face the clicked point), and, once facing the point, the model will move there.
I had this working with some code I'd written myself, but the animations weren't smooth and the model would often overshoot/undershoot the destination and then be jerked backward or forward into place. I'd only worked with the Universal Tween engine on 2d animations before, but decided to give it a try. It solved the jerkiness problems, and rotate and transform both work fine on their own, but I'm unable to have them work together in a sequence.
If I only enable the code that rotates the model, it works fine (well, almost fine, something gets weird w/ determining clockwise or counter-clockwise rotation at certain angles, but that's another issue for later): I click a location, the model rotates to face it and retains the new rotation until the next click, then it turns to face that location. Same with translate only enabled: I click a spot, the model moves to it and retains it's new translation until I click again, then it moves to that location, etc.
When translate and rotate are both enabled, I run into issues. The model will first rotate to face the clicked point, then set back to it's initial rotation, then move to the clicked point. On subsequent clicks, the model will first go back to its initial translation, then rotate to face the clicked point (really the location of the clicked point relative to the re-initialized location), then move to the clicked point.
I've tried rearranging code, using callbacks, caching the new translation and rotation to members of the game model class and then using set()
with their values before beginning the tween, but nothing has worked.
Here is the relevant code from my TweenAccessor
:
And here is the code that starts the timeline and tweens (it's in this file):
Can anyone point me toward a solution?
EDIT:
It seems that the transforms being set by the completion of each tween are reset to 0 after another tween completes. These are logs of those values from the getValues
and setValues
functions in the TweenAccessor
:
getValues
is being called twice for each type of tween (translation and rotation) before the tweening begins. At this point, the values for translation are still what they had been set to at the end of the last translation tween. The value for rotation has been set back to 0 though (I'm guessing as a result of the next bunch of calls to setValues
for rotation).
setValues
is then called several times for rotation, until it reaches the target rotation. This is (aside from resetting rotation ) working as I'd expect and hope. After the getRotation
calls though, the translation is set back to 0,0,0, but not by a call to setValues
(there's no log of it). The translation is then animated to the target with several setValues
calls.
After this the cycle restarts on another click and getValues
is called twice again for rotation and translation. Translation has the values that were set at the last call to setValues
in the last Timeline
, but only until the rotation (which is back at 0) runs through its tween.
The 4 calls to getValues
could be something. I'm not sure what in my setup would cause Timeline
would grab the values of the translation before its tween begins, if they're supposed to be run sequentially as they're pushed in the Timeline
. I'm also not sure why getValues
is called twice for each tween, but it's not infeasible that the Tween Engine would call it twice in the course of a tween.
I'm pretty sure the translation/rotation functions from LibGDX that I'm using are fine, they 'stick' to the models and I used the same for translation as I did with my non-Tween-Engine version. Rotation is similar, but not the same function.
The changing Y values during the second translation are something to look into though.
android - android什么应该是枢轴点以围绕其基础中心旋转图像
请在标记重复或关闭之前仔细阅读整个问题
我想围绕其基础中心点旋转图像(特别是箭头图像)。
例如,在开始时,我的图像将像 9 上的时钟中的秒针。假设我将该图像旋转 30 度,它应该看起来像 10 上的时钟秒针,如果 120 度,则时钟秒针在 1 上。
所以我想围绕它的中心(沿x轴)旋转该图像。
那么如果我第一次编码,我应该将什么作为 pivot(X & Y) 传递
或第二个代码
或第三个代码
或第四个代码
添加了一个图像以便更好地理解它顺时针旋转了 90 度。
我希望将来谷歌会添加更多关于枢轴点的清晰文档。
提前致谢。
android - Android - 用两张图片制作半圆形进度动画
我需要制作这样的动画:
http://youtu.be/LC6wptkt2Wk?t=27s
为此,我有这三个图像: http: //postimg.org/image/yhcs4svrz/
s13.postimg.org/u02s9rwvb/daily_goal_ring_blur.png s28.postimg.org/b8iaoiga5/bg_global_blue_gradient.png
我尝试制作一些旋转动画,但我没有得到它。任何人都可以给我一个提示吗?
谢谢
html - 通过 CSS3 悬停时旋转的背景变化效果
我是一名网络开发人员。对于我客户的网站,我需要对悬停特定 div 产生影响,如本网站所示。当我将鼠标悬停在 div 上时,背景应该通过旋转来改变。我怎样才能做到这一点。我只能使用 css3 过渡来缓解背景变化的效果。有没有办法在不使用 jquery 的情况下做同样的事情?
看截图
jquery - jQuery旋转最大计数
我已经阅读了无数的 SO 帖子并进行了无数次尝试,但是一整个下午后我仍然卡住了。
我的代码与我正在使用的 jquery 插件相结合,可以在这个 jsfiddle上看到
我想做什么?
对于这个项目,我正在调用 iTunes API,它为我提供了一个指定艺术家的歌曲列表。然后,我将这些 mp4a 文件(一个示例)存储在一个数组中,每次单击记录图像(参见 jsfiddle)时,都会播放数组中的下一首歌曲/项目。这些片段中的每一个都是 30 秒。这工作正常。
jQuery 问题
我正在使用 jquery 动画插件将记录图像旋转 30 秒,因为这是每首歌曲的长度。如果我单击记录一次并且只播放一首歌曲,这适用于下面的代码/jsfiddle。但是,如果我单击记录播放下一首歌曲,则每次单击都会添加新的 30 秒。同样,如果我等到一首歌曲结束,这没有问题,但是如果我点击三下,动画长度突然增加了 90 秒。
有没有人可以帮助我确保计数不能大于 30?我尝试了各种 if/else 语句,但令人失望的是无法破解它。另外,我用细齿梳浏览了 jquery rotate 插件代码,并尝试更改其中的一些代码,但也无济于事。
目前我的jquery代码如下,结合插件代码:
HTML
android - 带有文本的球形动画,用于在 android 应用程序中使用标签云 [新闻共和国]
我想在我的 android 应用程序中创建类似于News Republic应用程序中 的球形动画。
到目前为止,我已经尝试创建一个球体,但任何人都可以指导我如何继续在 android 中开发这样的动画。
我们是否必须仅使用 opengl 或者我们可以使用其他替代选项来实现它。
此外,当单击文本时,它会在不同的屏幕中打开相关新闻。
编辑
我终于找到了一些解决方案,可以在这个包下找到。
但是,动画不够流畅。
让我知道是否有人可以帮助我平滑动画?