fix(dreamdoor): 优化终端变形顿挫并提高跳字速度

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-25 21:26:08 +08:00
co-authored by Cursor
parent 0e1604d18b
commit d81c1ea76d
2 changed files with 13 additions and 11 deletions
@@ -145,7 +145,8 @@ namespace AibisDream.UI
public float MorphProgress
{
get => morphProgress;
set => morphProgress = Mathf.Clamp01(value);
// 允许略超 1,配合 OutBack 过冲;收束时由门系统写回 1。
set => morphProgress = Mathf.Clamp(value, 0f, 1.35f);
}
#endregion
@@ -254,8 +255,7 @@ namespace AibisDream.UI
public Vector2 EvaluateFrameSize(float progress)
{
float frameProgress = Mathf.SmoothStep(0f, 1f, Mathf.Clamp01(progress));
return Vector2.Lerp(morphStartSize, terminalSize, frameProgress);
return Vector2.LerpUnclamped(morphStartSize, terminalSize, progress);
}
[ContextMenu("Preview/Frame Only")]
@@ -299,9 +299,10 @@ namespace AibisDream.UI
if (Alpha <= 0.01f) return;
float frameProgress = Mathf.SmoothStep(0f, 1f, MorphProgress);
// 不用 SmoothStep 二次柔化;允许 >1 以保留 OutBack 过冲顿挫。
float frameProgress = MorphProgress;
float textReveal = frameProgress >= 0.999f ? 1f : 0f;
Vector2 currentSize = Vector2.Lerp(morphStartSize, terminalSize, frameProgress);
Vector2 currentSize = Vector2.LerpUnclamped(morphStartSize, terminalSize, frameProgress);
using (Draw.Command(cam))
{
@@ -1007,9 +1008,9 @@ namespace AibisDream.UI
private void DrawEditorScenePreview()
{
float frameProgress = Mathf.SmoothStep(0f, 1f, MorphProgress);
float frameProgress = MorphProgress;
float textReveal = frameProgress >= 0.999f ? 1f : 0f;
Vector2 currentSize = Vector2.Lerp(morphStartSize, terminalSize, frameProgress);
Vector2 currentSize = Vector2.LerpUnclamped(morphStartSize, terminalSize, frameProgress);
Matrix4x4 previousMatrix = Handles.matrix;
Color previousColor = Handles.color;