在 iPad 上轻松实现帧图像动画效果
让我向您展示示例(360 度 3D 对象旋转器):
演示:http://activeden.net/item/interactive-renders-360-deg-3d-object-rotator/39718?ref=mixDesign
如您所见,有一个相机在鼠标事件上进行 3D 旋转。实际上,它是根据鼠标事件逐帧动画的图像(帧)集合。
我想使用滑动手势通过objective - c实现此动画(或者也许我应该使用其他手势?)。这样我就可以用手指进行旋转,向左、右(我想要具有平滑缓动效果的动画,具体取决于滑动速度速度)。
注意:我已经为每一帧准备好了图像。
示例代码、在线教程对我很有帮助。
<强>!我应该使用一些外部图形库来保持性能吗?我有数百张图像 (PNG),每张大小为 300kb
预先感谢您,我真的需要您的帮助!
Let me show you example (360 Deg 3D Object Rotator):
Demo: http://activeden.net/item/interactive-renders-360-deg-3d-object-rotator/39718?ref=mixDesign
As you see, there is a camera 3D rotating on mouse event. Actually, it is a collection of images (frames) animating frame by frame depending on mouse event.
I want to implement this animation with objective - c using swipe gesture (or maybe I should use another gesture?). So that I can make rotation by my finger, to the left, to the right (I want animation with smooth ease effect, depending on swipe speed velocity).
Note: I have ready images for each frame.
Sample codes, online tutorials doing this will really help me.
! Should I use some external graphics library, in order to keep performance? I have hundreds of images (PNG), each with size of 300kb
Thank you in advance, I really need your help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许在这里使用
touchesBegan:
、touchesMoved:
和touchesEnded:
会更容易?这将使您能够非常快速地对速度和方向的变化做出反应。更新:示例可以在此处找到。
Maybe it will be easier to go with
touchesBegan:
,touchesMoved:
, andtouchesEnded:
here? This will allow you to react to velocity and direction changes very fast.Update: example can be found here.
我认为你不应该在这里使用滑动手势。我推荐您使用较短的最小按压持续时间的 LongPressGesture。
让我展示示例代码:
I don't think you should use swipe gesture here. I recommend you LongPressGesture with short minimumPressDuration.
Let me show example code: