React 弹性动画库 React Motion
- 授权协议: MIT
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: https://github.com/chenglou/react-motion
- 软件文档: https://github.com/chenglou/react-motion
- 官方下载: https://github.com/chenglou/react-motion
软件介绍
React Motion 是一个 React 弹性动画库,使用 0-10 的弹性参数进行动画处理:
import {Motion, spring} from 'react-motion';
// In your render...
<Motion defaultStyle={{x: 0}} style={{x: spring(10)}}>
{value => <div>{value.x}</div>}
</Motion>这个库解决了什么问题?
对于 95% 的动画组件使用案例,我们没有必要用硬编码(把配置写死)式的缓冲曲线和时间过渡来重排序。只需要给你的 UI 设置一个刚度系数和阻尼系数,接下来让神奇的物理原理处理即可。用这种方式,根本无需担心如中断动画等小问题。它也极大的简化了 API 。
该库还为 React 的 TransitionGroup(React 自带的 CSS 动画组件)提供了一个更强大的替代 API :
springMotionStaggeredMotionTransitionMotionpresets
Demos
C++ Primer Plus
Stephen Prata / Addison Wesley / 2011-10-18 / GBP 39.99
C++ Primer Plus, Sixth Edition New C++11 Coverage C++ Primer Plus is a carefully crafted, complete tutorial on one of the most significant and widely used programming languages today. An accessible an......一起来看看 《C++ Primer Plus》 这本书的介绍吧!
