一些用Flash写的缓动函数
来源:互联网 发布:企业网络推广 编辑:程序博客网 时间:2024/05/20 07:57
Math.linearTween = function(t, b, c, d) {
return c*t/d+b;
};
//线性运动函数
Math.easeInQuad = function(t, b, c, d) {
return c*(t /= d)*t+b;
};
//二次缓入函数
Math.easeOutQuad = function(t, b, c, d) {
return -c*(t /= d)*(t-2)+b;
};
//二次缓出函数
Math.easeINOutQuad = function(t, b, c, d) {
if ((t /= d/2)<1) {
return c/2*t*t+b;
}
return -c/2*((--t)*(t-2)-1)+b;
};
//二次缓入缓出函数
Math.easeInCubic = function(t, b, c, d) {
return c*Math.pow(t/d, 3)+b;
};
//三次缓入函数
Math.easeOutCubic = function(t, b, c, d) {
return c*(Math.pow(t/d-1, 3)+1)+b;
};
//三次缓出函数
Math.easeINOutCubic = function(t, b, c, d) {
if ((t /= d/2)<1) {
return c/2*Math.pow(t, 3)+b;
}
return c/2*(Math.pow(t-2, 3)+2)+b;
};
//三次缓入缓出函数
Math.easeInQuart = function(t, b, c, d) {
return c*Math.pow(t/d, 4)+b;
};
//四次缓入函数
Math.easeOutQuart = function(t, b, c, d) {
return -c*(Math.pow(t/d-1, 4)-1)+b;
};
//四次缓出函数
Math.easeINOutQuart = function(t, b, c, d) {
if ((t /= d/2)<1) {
return c/2*Math.pow(t, 4)+b;
}
return -c/2*(Math.pow(t-2, 4)-2)+b;
};
//四次缓入缓出函数
Math.easeInQuint = function(t, b, c, d) {
return c*Math.pow(t/d, 5)+b;
};
//五次缓入函数
Math.easeOutQuint = function(t, b, c, d) {
return c*(Math.pow(t/d-1, 5)+1)+b;
};
//五次缓出函数
Math.easeINOutQuint = function(t, b, c, d) {
if ((t /= d/2)<1) {
return c/2*Math.pow(t, 5)+b;
}
return c/2*(Math.pow(t-2, 5)+2)+b;
};
//五次缓入缓出函数
Math.easeInSine = function(t, b, c, d) {
return c*(1-Math.cos(t/d*(Math.PI/2)))+b;
};
//正弦缓出函数
Math.easeOutSine = function(t, b, c, d) {
return c*Math.sin(t/d*(Math.PI/2))+b;
};
//正弦缓出函数
Math.easeINOutSine = function(t, b, c, d) {
return c/2*(1-Math.cos(Math.PI*t/d))+b;
};
//正弦缓入缓出函数
Math.easeInExpo = function(t, b, c, d) {
return c*Math.pow(2, 10*(t/d-1))+b;
};
//指数缓入函数
Math.easeOutExpo = function(t, b, c, d) {
return c*(-Math.pow(2, -10*t/d)+1)+b;
};
//指数缓出函数
Math.easeINOutExpo = function(t, b, c, d) {
if ((t /= d/2)<1) {
return c/2*Math.pow(2, 10*(t-1))+b;
}
return c/2*(-Math.pow(2, -10*--t)+2)+b;
};
//指数缓入缓出函数
Math.easeInCirc = function(t, b, c, d) {
return c*(1-Math.sqrt(1-(t /= d)*t))+b;
};
//圆形缓入函数
Math.easeOutCirc = function(t, b, c, d) {
return c*Math.sqrt(1-(t=t/d-1)*t)+b;
};
//圆形缓出函数
Math.easeINOutCirc = function(t, b, c, d) {
if ((t /= d/2)<1) {
return c/2*(1-Math.sqrt(1-t*t))+b;
}
return c/2*(Math.sqrt(1-(t -= 2)*t)+1)+b;
};
//圆形缓入缓出函数
- 一些用Flash写的缓动函数
- Flash的简单缓动
- 用JavaScript模拟Flash效果写的炫光波动特效
- Flash 缓动公式
- 汇编写的一些函数
- 瞎写的一些函数
- 关于写makefile时常用的一些函数的总结
- 用perl写的一些常用功能函数
- 用 python 写一些常见的数学函数
- Unity的Lerp函数实现缓动
- lua的缓动函数列表
- 自己写的一些Delphi常用函数
- 写ASP采集的一些函数
- 自己写的一些Delphi常用函数
- 自己写的一些Delphi常用函数
- 写ASP采集的一些函数
- python 写函数的一些小细节
- 缓动函数详解
- SendMessage、PostMessage原理
- JAVA正则表达式高级用法(分组与捕获)
- Save could not be completed. Eclipse国际化的问题解决
- 贝塞尔曲线生成算法
- grails中多重查询及其显示方法
- 一些用Flash写的缓动函数
- 用 YUI Compressor 压缩和混淆 JS 和 CSS
- vi 命令 用法
- C#接口事件的实现解析
- SQL Server中的Image数据类型的操作
- js动态添加和删除一行
- js校验常用方法
- QT model-view架构
- 发挥飞过海