acdream/src/AcDream.App/Rendering/AnimationPresentationDiagnostics.cs
Erik f004ac5562 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>
2026-07-21 09:37:02 +02:00

21 lines
788 B
C#

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);
}