CameraTilt初步

This commit is contained in:
SoulliesOfficial
2025-05-31 00:48:35 -04:00
parent 5032b342fa
commit e7f7230846
13 changed files with 16905 additions and 18033 deletions

View File

@@ -24,5 +24,22 @@ namespace Ichni
keys[2] = new Keyframe(totalTime, startValue, 0, 0);
return new AnimationCurve(keys);
}
/// <summary>
/// 自定义峰值点位置的抛物线曲线,在指定时间点达到最大值,两端为起始值
/// </summary>
/// <param name="totalTime">总时间</param>
/// <param name="startValue">起始(和结束)值</param>
/// <param name="peakValue">最大值</param>
/// <param name="peakTimePercent">最大值的比例点</param>
/// <returns></returns>
public static AnimationCurve CustomPeakTimeParabolic(float totalTime, float startValue, float peakValue, float peakTimePercent)
{
Keyframe[] keys = new Keyframe[3];
keys[0] = new Keyframe(0, startValue, 0, 0);
keys[1] = new Keyframe(totalTime * peakTimePercent, peakValue, 0, 0);
keys[2] = new Keyframe(totalTime, startValue, 0, 0);
return new AnimationCurve(keys);
}
}
}