添加弹窗动画
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import BezierEasing from "bezier-easing"
|
||||
import { config } from "../constants/config"
|
||||
|
||||
export function Utility_ConvertSecondToString(seconds: number) {
|
||||
@@ -31,3 +32,15 @@ export function Utility_CalculateScore(difficulty: string, second: number): numb
|
||||
// console.log("计算积分 >>>>>", difficulty, second, score)
|
||||
return score
|
||||
}
|
||||
|
||||
const bezier_ease_out = BezierEasing(0.2, 0.8, 0.5, 1)
|
||||
export function Utility_EaseOut(t: number, b: number, c: number, d: number) {
|
||||
const p = bezier_ease_out(t / d)
|
||||
return c * p + b
|
||||
}
|
||||
|
||||
const bezier_ease_out_2 = BezierEasing(0.25, 0.1, 0.3, 1)
|
||||
export function Utility_EaseOut_2(t: number, b: number, c: number, d: number) {
|
||||
const p = bezier_ease_out_2(t / d)
|
||||
return c * p + b
|
||||
}
|
||||
Reference in New Issue
Block a user