本章节主要介绍一下对象如何做基础的动画,如移动,旋转,缩放,贝塞尔曲线运动等。
ANTAnimation3D类包含有以下方法。
- (void)moveTo:(ANTBaseObject *)object Time:(float)time PosX:(float)x posY:(float)y posZ:(float)z finishBlock:(didFinishBlock)block;
- (void)moveBy:(ANTBaseObject *)object Time:(float)time PosX:(float)x posY:(float)y posZ:(float)z finishBlock:(didFinishBlock)block;
- (void)scaleTo:(ANTBaseObject *)object Time:(float)time scaleX:(float)x scaleY:(float)y scaleZ:(float)z finishBlock:(didFinishBlock)block;
- (void)scaleBy:(ANTBaseObject *)object Time:(float)time scaleX:(float)x scaleY:(float)y scaleZ:(float)z finishBlock:(didFinishBlock)block;
- (void)rotateTo:(ANTBaseObject *)object Time:(float)time radians:(float)radians rotateX:(float)x roteateY:(float)y rotateZ:(float)z finishBlock:(didFinishBlock)block;
// 贝塞尔曲线轨迹点
// 三次
- (void)bezierTo:(ANTBaseObject *)object Time:(float)time PointEnd:(Point3D)pointEnd ControlPoint1:(Point3D)point1 ControlPoint2:(Point3D)point2 finishBlock:(didFinishBlock)block;
// 二次
- (void)bezierTo:(ANTBaseObject *)object Time:(float)time PointEnd:(Point3D)pointEnd ControlPoint1:(Point3D)point1 finishBlock:(didFinishBlock)block;
具体的这些使用方法在第二章介绍过了,具体看第二章,或者提供的ANT_Animation3DDemo。
效果图:
Paste_Image.png
网友评论