如何在 android java 中使用插值获得类似的 tweenmax 效果?
我有一个连续跟随用户触摸坐标的对象。我想让该对象具有缓动效果。
我的意思是,该对象有一个起点,当用户触摸屏幕时,该对象将移动到用户触摸坐标。它已经这样做了,但它跳转到坐标。我想要从 A 点到 B 点的受控过渡。
如果用户拖动或滑动触摸坐标,则需要在每一帧上发生这种缓动或补间效果。
我一直在阅读有关 android sdk 的插值和动画影响的内容,但我并不真正了解如何在对象而不是视图上实现它们。或连续地也是如此。
任何方向都会很棒。谢谢你!
I have an object that continuously follows the users touch coordinates. I would like to make it so the object has an easing effect.
by which i mean, the object has a start point and when the user touches the screen, said object would move to the users touch coordinates. which it already does but it jumps to the coordinates. i want a controlled transistion from point A to point B.
this easing or tween affect would need to happen on every frame if the user dragged or swipped their touch coordinates.
i have been reading about interpolation and animation affects for the android sdk but i dont really understand how to implement them on an object and not a view. or continuously as well.
any direction would be great. thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我为 Java 构建了一个完整的补间引擎。它不会动态分配任何内容,因此对于 Android 来说是完全安全的(我主要是为了在 Android 上开发游戏)。
http://code.google.com/p/java-universal-tween -engine/
你的补间看起来像:
我使用了与 TweenMax 引擎类似的语法,所以你不应该迷失太久:)
I built a complete tweening engine for Java. It doesn't allocate anything dynamically so it's totally safe for Android (I made it primarily to develop games on Android).
http://code.google.com/p/java-universal-tween-engine/
Your tween would look like:
I used a similar syntax as the TweenMax engine, so you shouldn't be lost too long :)