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
+5 -4
View File
@@ -726,18 +726,19 @@ MonoBehaviour:
terminalShapeReference: {fileID: 1847534534}
seaCollapseScale: {x: 0.9, y: 0.84, z: 1}
doorSnapScale: {x: 2.68, y: 1.06, z: 1}
morphEase: 10
morphEase: 27
frameHidePhase: 2
doorSnapDuration: 0.2
backgroundCutDelay: 0.04
preMorphHoldDuration: 0.16
postMorphBootDelay: 0.12
preMorphHoldDuration: 0.22
postMorphBootDelay: 0.06
referenceSnapMorphProgress: 0.08
referenceSnapPadding: {x: 0.18, y: 0.18}
blackoutAlpha: 1
blackoutFadeInDuration: 0.08
blackoutFadeOutDuration: 0.12
morphStartTimelineName: "\u59D0\u59D0/\u5934\u75DB"
morphDuration: 0.45
hideOnTerminal:
- {fileID: 1420961917}
--- !u!1 &450371654
@@ -1584,7 +1585,7 @@ MonoBehaviour:
promptString: '> bit seaExists = '
onCompleteNode: "\u82CF\u9192"
typewriterCharDelay: 0.025
bootSpeedMultiplier: 4
bootSpeedMultiplier: 20
bootSequence:
- text: root@sys:~$ dream.render --stop --session 0742
style: 3
@@ -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;