Liquid Fire
- 授权协议: MIT
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: https://github.com/ef4/liquid-fire
- 软件文档: http://ef4.github.io/liquid-fire/
软件介绍
Liquid Fire 为 Ember 应用提供了完整的动画支持。
示例代码:
import { animate, stop } from "vendor/liquid-fire";
export function crossFade(oldView, insertNewView, opts) {
stop(oldView);
return insertNewView().then(function(newView) {
return Promise.all([
animate(oldView, {opacity: 0}, opts),
animate(newView, {opacity: [1, 0]}, opts)
]);
});
});
export function fade(oldView, insertNewView) {
stop(oldView);
return animate(oldView, {opacity: 0})
.then(insertNewView)
.then(function(newView){
return animate(newView, {opacity: [1, 0]});
});
});
