
旋转过程中看着会有缩小的一个过程再回到正常,请问是我的写法有问题吗,那正确的写法应该是怎样的呢,求大佬指点,谢谢。
自己先顶起来
有木有人呀。。
顶顶顶顶顶顶
旋转需求是什么,直接转欧拉角可以吗
转盘的指针 先慢再快再慢
试试 by ?
函数效果演示: 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;
}
不知道有没有你要的效果。
你试试操作的属性不用rotation用eulrangle
要用四元数做差值的话,使用tween的话,自定义progress吧
记得用 slerp 不是 lerp