Swift 矢量动画框架 ShapeAnimation-Swift

码农软件 · 软件分类 · 动画(Animation) · 2019-07-05 19:43:42

软件介绍

iOS上使用Swift实现的矢量图形动画框架,可动画绘图。

特点是可写少量代码实现常见的CoreAnimation层动画,利用闭包定制动画特性。

目前已支持下列动画函数:

  • opacityAnimation, flashAnimation 透明度、闪烁

  • scaleAnimation 放缩

  • rotate360Degrees, rotationAnimation 旋转

  • shakeAnimation 左右摇晃

  • moveAnimation, moveOnPathAnimation 沿路径移动

  • slideToRight 向右滑动

  • strokeEndAnimation 沿线描绘

    strokeColorAnimation, lineWidthAnimation, dashPhaseAnimation 线条颜色、线宽动画,虚线动画可用于亮显选择

  • switchPathAnimation 切换图形

  • animationGroup 一个层多个动画同时进行

  • applyAnimations 多个层同步动画

Move on PathRadar Circles滚动六边形

该框架还在不断更新中,欢迎Fork、点赞,欢迎动手和提建议。

代码示例:

let layer1 = addLinesLayer(view, points:[(10.0,20.0),(150.0,40.0),(120.0,320.0)])
layer1.strokeEndAnimation().apply() {
    layer1.shakeAnimation().apply()
}
let la2 = self.addLinesLayer(view, points:points2, color: UIColor.blueColor())
lla2.scaleAnimation(from:1, to:1.1, repeatCount:3).apply(duration:0.3)
let la3 = self.addLinesLayer(view, points:points3, color: UIColor.greenColor())
la3.flashAnimation(repeatCount:6).apply()
let la4 = addLinesLayer(view, points:[(10.0,20.0), (150.0,40.0), (120.0,120.0)])
let a1 = la4.moveOnPathAnimation(path).set {$0.duration=1.6}
let a2 = la4.rotate360Degrees().set {$0.repeatCount=2}
animationGroup([a1, a2]).set {$0.autoreverses=true}.apply()


本文地址:https://codercto.com/soft/d/9491.html

CSS 3实战

CSS 3实战

成林 / 机械工业出版社 / 2011-5 / 69.00元

全书一共分为9章,首先从宏观上介绍了CSS 3技术的最新发展现状、新特性,以及现有的主流浏览器对这些新特性的支持情况;然后详细讲解了CSS 3的选择器、文本特性、颜色特性、弹性布局、边框和背景特性、盒模型、UI设计、多列布局、圆角和阴影、渐变、变形、转换、动画、投影、开放字体、设备类型、语音样式等重要的理论知识,这部分内容是本书的基础和核心。不仅每个知识点都配有丰富的、精心设计的实战案例,而且详细......一起来看看 《CSS 3实战》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具