refactor(animation): extract live PartArray presenter

Move final live part composition, exact-incarnation schedule handoff, MotionDone binding, and presentation diagnostics out of GameWindow while preserving the retail frame order. Reject stale schedule and completion ABA at the new owner boundary.

Co-Authored-By: OpenAI Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-21 09:37:02 +02:00
parent 9760ff5a8d
commit f004ac5562
14 changed files with 963 additions and 438 deletions

View file

@ -0,0 +1,21 @@
namespace AcDream.App.Rendering;
/// <summary>Startup-resolved diagnostic gates for final PartArray presentation.</summary>
internal sealed record AnimationPresentationDiagnostics(
bool RemoteVelocityEnabled,
bool DumpMotionEnabled,
Func<double> Now)
{
public static AnimationPresentationDiagnostics FromEnvironment() => new(
RemoteVelocityEnabled:
Environment.GetEnvironmentVariable("ACDREAM_REMOTE_VEL_DIAG") == "1",
DumpMotionEnabled:
Environment.GetEnvironmentVariable("ACDREAM_DUMP_MOTION") == "1",
Now: static () =>
(DateTime.UtcNow - DateTime.UnixEpoch).TotalSeconds);
public static AnimationPresentationDiagnostics Disabled { get; } = new(
false,
false,
static () => 0d);
}