Animatable库api
属性
- animation (val:string) 动画形式
-
iterationCount (val:number) 重复次数 infinite为无限重复
animate only
-
direction (val:string) 重复形式 默认是正向动画
normal
,reverse反向动画
,alternate正反
,alternate-reverse反正
animate only
-
easing (val:string) 动画缓动函数 "ease-out"出的动画加速 "ease-in" 进的动画加速
linear
,ease
,ease-in
,ease-out
,ease-in-out
,ease-in-cubic
,ease-out-cubic
,ease-in-out-cubic
,ease-in-circ
,ease-out-circ
,ease-in-out-circ
,ease-in-expo
,ease-out-expo
,ease-in-out-expo
,ease-in-quad
,ease-out-quad
,ease-in-out-quad
,ease-in-quart
,ease-out-quart
,ease-in-out-quart
,ease-in-quint
,ease-out-quint
,ease-in-out-quint
,ease-in-sine
,ease-out-sine
,ease-in-out-sine
,ease-in-back
,ease-out-back
,ease-in-out-back
- transition (val:string|:array) 指定一个样式属性(传递数组则将用于多个属性上) 当样式属性发生变化时 使用动画过渡
- duration 动画持续时间
- delay 动画延迟时间
- onAnimationBegin 动画开启时调用
- onAnimationEnd 动画结束时调用 接收一个参数 表明动画是否完成
- useNativeDriver 是否使用本地或JavaScript动画驱动程序。本机驱动程序可以帮助提高性能,但无法处理所有类型的样式,并且需要您在iOS上集成该模块。
当前该库 更新自定义组件样式时出现重复渲染BUG