官方文档:使用缓动系统 · Cocos Creator

效果图地址:https://easings.net/

/** !#enThis class provide easing methods for {{#crossLink "tween"}}{{/crossLink}} class.<br>Demonstratio: https://easings.net/!#zh缓动函数类,为 {{#crossLink "Tween"}}{{/crossLink}} 提供缓动效果函数。<br>函数效果演示: https://easings.net/ */export class Easing {      /**!#en Easing in with quadratic formula. From slow to fast.!#zh 平方曲线缓入函数。运动由慢到快。@param t The current time as a percentage of the total time. */quadIn(t: number): number;     /**!#en Easing out with quadratic formula. From fast to slow.!#zh 平方曲线缓出函数。运动由快到慢。@param t The current time as a percentage of the total time. */quadOut(t: number): number;       /**!#en Easing in and out with quadratic formula. From slow to fast, then back to slow.!#zh 平方曲线缓入缓出函数。运动由慢到快再到慢。@param t The current time as a percentage of the total time. */quadInOut(t: number): number;      /**!#en Easing in with cubic formula. From slow to fast.!#zh 立方曲线缓入函数。运动由慢到快。@param t The current time as a percentage of the total time. */cubicIn(t: number): number;        /**!#en Easing out with cubic formula. From slow to fast.!#zh 立方曲线缓出函数。运动由快到慢。@param t The current time as a percentage of the total time. */cubicOut(t: number): number;      /**!#en Easing in and out with cubic formula. From slow to fast, then back to slow.!#zh 立方曲线缓入缓出函数。运动由慢到快再到慢。@param t The current time as a percentage of the total time. */cubicInOut(t: number): number;     /**!#en Easing in with quartic formula. From slow to fast.!#zh 四次方曲线缓入函数。运动由慢到快。@param t The current time as a percentage of the total time. */quartIn(t: number): number;     /**!#en Easing out with quartic formula. From fast to slow.!#zh 四次方曲线缓出函数。运动由快到慢。@param t The current time as a percentage of the total time. */quartOut(t: number): number;       /**!#en Easing in and out with quartic formula. From slow to fast, then back to slow.!#zh 四次方曲线缓入缓出函数。运动由慢到快再到慢。@param t The current time as a percentage of the total time. */quartInOut(t: number): number;      /**!#en Easing in with quintic formula. From slow to fast.!#zh 五次方曲线缓入函数。运动由慢到快。@param t The current time as a percentage of the total time. */quintIn(t: number): number;     /**!#en Easing out with quintic formula. From fast to slow.!#zh 五次方曲线缓出函数。运动由快到慢。@param t The current time as a percentage of the total time. */quintOut(t: number): number;       /**!#en Easing in and out with quintic formula. From slow to fast, then back to slow.!#zh 五次方曲线缓入缓出函数。运动由慢到快再到慢。@param t The current time as a percentage of the total time. */quintInOut(t: number): number;      /**!#en Easing in and out with sine formula. From slow to fast.!#zh 正弦曲线缓入函数。运动由慢到快。@param t The current time as a percentage of the total time. */sineIn(t: number): number;      /**!#en Easing in and out with sine formula. From fast to slow.!#zh 正弦曲线缓出函数。运动由快到慢。@param t The current time as a percentage of the total time. */sineOut(t: number): number;     /**!#en Easing in and out with sine formula. From slow to fast, then back to slow.!#zh 正弦曲线缓入缓出函数。运动由慢到快再到慢。@param t The current time as a percentage of the total time. */sineInOut(t: number): number;       /**!#en Easing in and out with exponential formula. From slow to fast.!#zh 指数曲线缓入函数。运动由慢到快。@param t The current time as a percentage of the total time. */expoIn(t: number): number;       /**!#en Easing in and out with exponential formula. From fast to slow.!#zh 指数曲线缓出函数。运动由快到慢。@param t The current time as a percentage of the total time. */expoOut(t: number): number;      /**!#en Easing in and out with exponential formula. From slow to fast.!#zh 指数曲线缓入和缓出函数。运动由慢到很快再到慢。@param t The current time as a percentage of the total time, then back to slow. */expoInOut(t: number): number;      /**!#en Easing in and out with circular formula. From slow to fast.!#zh 循环公式缓入函数。运动由慢到快。@param t The current time as a percentage of the total time. */circIn(t: number): number;      /**!#en Easing in and out with circular formula. From fast to slow.!#zh 循环公式缓出函数。运动由快到慢。@param t The current time as a percentage of the total time. */circOut(t: number): number;     /**!#en Easing in and out with circular formula. From slow to fast.!#zh 指数曲线缓入缓出函数。运动由慢到很快再到慢。@param t The current time as a percentage of the total time, then back to slow. */circInOut(t: number): number;      /**!#en Easing in action with a spring oscillating effect.!#zh 弹簧回震效果的缓入函数。@param t The current time as a percentage of the total time. */elasticIn(t: number): number;        /**!#en Easing out action with a spring oscillating effect.!#zh 弹簧回震效果的缓出函数。@param t The current time as a percentage of the total time. */elasticOut(t: number): number;      /**!#en Easing in and out action with a spring oscillating effect.!#zh 弹簧回震效果的缓入缓出函数。@param t The current time as a percentage of the total time. */elasticInOut(t: number): number;       /**!#en Easing in action with "back up" behavior.!#zh 回退效果的缓入函数。@param t The current time as a percentage of the total time. */backIn(t: number): number;        /**!#en Easing out action with "back up" behavior.!#zh 回退效果的缓出函数。@param t The current time as a percentage of the total time. */backOut(t: number): number;      /**!#en Easing in and out action with "back up" behavior.!#zh 回退效果的缓入缓出函数。@param t The current time as a percentage of the total time. */backInOut(t: number): number;       /**!#en Easing in action with bouncing effect.!#zh 弹跳效果的缓入函数。@param t The current time as a percentage of the total time. */bounceIn(t: number): number;       /**!#en Easing out action with bouncing effect.!#zh 弹跳效果的缓出函数。@param t The current time as a percentage of the total time. */bounceOut(t: number): number;     /**!#en Easing in and out action with bouncing effect.!#zh 弹跳效果的缓入缓出函数。@param t The current time as a percentage of the total time. */bounceInOut(t: number): number;      /**!#en Target will run action with smooth effect.!#zh 平滑效果函数。@param t The current time as a percentage of the total time. */smooth(t: number): number;        /**!#en Target will run action with fade effect.!#zh 渐褪效果函数。@param t The current time as a percentage of the total time. */fade(t: number): number;    }

CocosCreator之缓动函数类 Easing相关推荐

  1. 缓动函数 Easing Functions

    缓动函数 Easing Functions 缓动函数 自定义参数随时间变化的速率. 常见效果 Linear:无缓动效果: Quadratic:二次方的缓动(t^2): Sinusoidal:正弦曲线的 ...

  2. Easing 缓动函数收集

    Easing 缓动函数收集 缓动函数 ECharts图表 jquery easing 插件 Java 参考资料 之前收集了不少链接,结果久了都404了.还是得复制一份代码过来才放心. 缓动函数 ECh ...

  3. 用缓动函数模拟物理动画

    1.缓动函数简介 <1>缓动函数的动画效果是建立在CALayer层级的关键帧动画基础之上 也就是说用普通的UIView的Animation是无法直接实现缓动函数 <2>缓动函数 ...

  4. WPF中的动画——(四)缓动函数

    缓动函数可以通过一系列公式模拟一些物理效果,如实地弹跳或其行为如同在弹簧上一样.它们一般应用在From/To/By动画上,可以使得其动画更加平滑. var widthAnimation = new D ...

  5. JS实现动画特效2(缓动函数封装、导航栏筋斗云效果)

    JS实现的动画特效:手风琴特效展示图片.筋斗云动画 一.小知识 1.浏览器的offsetLeft是就近取整,要实现向上取整或向下取整,可以调用Math.ceil()或Math.floor() 2.想要 ...

  6. Dotween SetEase Ease缓动函数

    例如 :cameraTrans.DOLocalMove(pos, time).SetEase(Ease.OutExpo); Ease.InQuad 不知道Quad代表什么意思    Ease.InQu ...

  7. DOTween-Ease缓动函数

    Ease.InQuad 不知道Quad代表什么意思    Ease.InQuart 有1/4的时间是没有缓动.    Ease.InQuint, 是1/5时间没有缓动.    Ease.InExpo ...

  8. greensock缓动类包之TweenLite

    http://hi.baidu.com/gklchocolate/blog/item/2c174b08ece754de3ac76371.html 1~了解TweenLite类 TweenLite为Gr ...

  9. cocos2dx 圆盘抽奖_easing--缓动函数--贝塞尔函数--圆盘转动抽奖应用

    一.transition 和 animation css上面两个属性允许你指定缓动函数. 不幸的是,他们不支持所有的缓动函数,所以你必须指定贝赛尔曲线实现缓动函数. 选取缓动函数以显示贝赛尔曲线. d ...

最新文章

  1. SAP MM VL32N和MIGO对内向交货单做收货,都会更新其‘总体货物移动状态‘
  2. python处理流程-python的处理流程
  3. 面试的算法1(C语言)(整理)(组合数 字符串倒置 最大公共串)
  4. 数据分析入门(第一课)
  5. 12 款 Linux 终端推荐
  6. mysql的SQL_NO_CACHE(在查询时不使用缓存)和sql_cache用法
  7. mysql 修改自增字段起始值不生效_Mysql数据库基本介绍
  8. python后端技术栈_Python后端技术栈(三)--设计模式
  9. 【工具】FTP软件FileZilla下载和连接服务器
  10. idea普通java项目引入lombok_IDEA中Lombok的使用
  11. 返回固定页面的web服务器
  12. Android踩内存工具,Android之内存分析工具
  13. Introduction to Computer Networking学习笔记(六):TCP连接断开实例;TCP与UDP特点
  14. R语言 openair 做后向轨迹
  15. 00002__失恋卖茶女
  16. Fortran common
  17. 蓝字冲销是什么意思_什么叫红冲蓝补?
  18. beyondcompare ubuntu revoked问题
  19. 迷途Emlog模板全站好看的透明变色模板+源码
  20. win10检查更新后,蓝牙没了,卸载usb也没有用,蓝牙 未知usb设备 设备描述符请求失败

热门文章

  1. 微服务从零到一 什么是限流、熔断和降级
  2. java-php-net-python-校园后勤计算机毕业设计程序
  3. 杰奇后台乱码,安装杰奇程序后后台出现很多问号
  4. 乐视盒子服务器怎么没有响应,乐视盒子连不上网怎么办
  5. 易桌面打印室打印文件资料一般多久能到
  6. 2022年-中国科学技术大学研究生期末考试(复习资料最新更新)
  7. 51单片机 驱动步进电机 C语言 lcd,基于51单片机的步进电机驱动程序
  8. MAYLAND HOME官网上线 | LTD家居家装行业案例分享
  9. 直播--如何搭建rtmp推流服务器
  10. JAVA毕业设计Web医学院校大学生就业信息管理系统计算机源码+lw文档+系统+调试部署+数据库