Animate One React Element
预览地址: https://tween-one-git-3x.react-component.vercel.app/
currentRef
, hooks 如果 component 是组件,ref 返回为组件的 ref;delay
;reverseDelay
;repeatDelay
;attr
改为 boolean
类型;onChange
和回调,cb: { moment, targets, index, mode, ratio, vars, index, repeat }onChangeTimeline
, cb: { mode, targets, vars, moment, totalTime, repeat }onStart
、onUpdate
、onComplete
等的 cb 的 target 全部更新为 targets;BezierPlugin
,合进 PathMotionPlugin;;PathMotionPlugin
更改用法,使用 PathMotion: { path, center, x, y, rotate }
, 详细参考 pathMotion demo;SvgMorph
依赖更改为使用 flubber
;import { Plugins } from 'rc-tween-one'; Plugins.push()
, 保留 TweenOne.plugins.push()
;TweenOne.easing.path(path)
使用,直接用 ease: 'M0,0L100,100'
;regionStartTime
, regionEndTime
;backgroundImage: 'linear-gradient(to left, #000fff 0%, red 20%, #fff000 100%)'
https://github.com/react-component/tween-one/compare/2.7.3...v3.0.0-beta.1
currentRef
, hooks 如果 component 是组件,ref 返回为组件的 ref;reverseDelay
;repeatDelay
;attr
改为 boolean
类型;onChange
回调,cb: { moment, targets, index, mode, ratio, vars, index, repeat }onChangeTimeline
, cb: { mode, targets, vars, moment, totalTime, repeat }BezierPlugin
,合进 PathMotionPlugin;;PathMotionPlugin
更改用法,使用 PathMotion: { path, center, x, y, rotate }
, 详细参考 pathMotion demo;SvgMorph
依赖更改为使用 flubber
;import { Plugins } from 'rc-tween-one'; Plugins.push()
, 保留 TweenOne.plugins.push()
;TweenOne.easing.path(path)
使用,直接用 ease: 'M0,0L100,100'
;删除了 willChange...
更新回调接口,在动画开始的第一帧回调,不管时间流逝。。
component 可以空。空时直接返回 child 做动画。。
更新 path ease 节点数量;
修复每次动画开始 getComputedStyle。
更新 group 子级可为组件形式。