Skip to content

Preserve authored team-door animation transitions and lifecycle - #269

Merged
Hona merged 13 commits into
mainfrom
work/tf2-team-door-animation
Sep 1, 2026
Merged

Preserve authored team-door animation transitions and lifecycle#269
Hona merged 13 commits into
mainfrom
work/tf2-team-door-animation

Conversation

@Hona

@Hona Hona commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Changes

  • Keep the authored positive playback, bone/quaternion basis, camera and materials; no angle-sign workaround.
  • Port entity-panel sequence cross-fades with authored fade times, three-bit reset parity and interrupted-transition ordering in Rust, isolated from other model-panel playback.
  • Sample terminal and idle poses, restart repeated animation commands, reject superseded pose results and reset reopened panels.
  • Restore disabled-door hover timing and focus enter/leave behavior; refresh visible local team rules.
  • Keep exact, unchanged template poses on their existing static GPU pipeline until actual deformation, and retain stable panel animation identities across visibility changes.

Verification

Integrated current main at db3a0cac5c68f17a2ef5a3d35d901cf2adbf0f0a for the approved post-v0.1.0 draft closeout. Focused checks pass: 47 browser/UI/pose/skinning tests (330 assertions), 44 studio-model Rust tests, the TF2 WASM crate check, and 10 WASM model tests (3 configured unrelated cases ignored). After main's particle packet change, 26 shared packet/model/playback tests also passed (198 assertions). Required CI passed on final reviewed head 95e86b33de901617cc6b45c7686cea95a65570fe. Team-state, playback/template retention and Rust transition-owner source files remain byte-identical to the verified motion candidate.

The configured models author hoveropen at 65 fps / 31 frames and hoverclose at 35 fps / 21 frames, with 0.2-second sequence fades. Their rotation direction is retained rather than inverted. Deterministic tests cover rotation sign through the bone hierarchy and entity transform, transition ordering, reset parity/wrap, terminal sampling, short-sequence fade completion, disabled hover and reopen.

Actual headed RED, BLU and auto motion was captured, including interrupted RED enter/leave. Before: 9.034 seconds / 135 compositor captures. After: 9.136 seconds / 132 captures, with all three doors settling at cycle 1. Clips below use only reviewed application pixels; no desktop captures or generated media are committed.

Before:

before.mp4

After:

after.mp4

In the matched first five seconds, model-panel submissions were 163.0 → 164.8 per second; median submission cost 1.005 → 0.985 ms, p95 1.895 → 1.920 ms, maximum 11.955 → 4.415 ms. These are HUD submission timings, not gameplay or display FPS. Instrumented heap observations include retained diagnostic records and do not establish a retained-memory improvement.

Coverage follow-up

The approved closeout reuses the verified before/after motion rather than requiring a new Windows profiling campaign as a merge gate. Additional device coverage for disabled-door/focus/reopen/live-roster scenarios and retained-memory measurements remains a stated follow-up; deterministic lifecycle coverage passes. The previous pending remote preparation task and its unverified teardown are preserved, and no remote probe or relaunch was performed for this closeout. No production change, deployment or asset publication.

@Hona
Hona force-pushed the work/tf2-team-door-animation branch 3 times, most recently from d3b8d61 to 1cb34f7 Compare September 1, 2026 02:25
@Hona
Hona marked this pull request as ready for review September 1, 2026 02:25
Copilot AI lite review requested due to automatic review settings September 1, 2026 02:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Reopen initialization can leave disabled-door animations in an incorrect state because disabled-state tracking is not reset before tick-based updates.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR restores authored TF2 team-door animation playback semantics end-to-end (browser → web app scheduling → WASM pose requests → Rust studio-model blending), and adds dedicated profiling coverage for real-time door motion and lifecycle edge cases (disabled hover, focus enter/leave, reopen).

Changes:

  • Introduce a Rust SequenceTransitioner to preserve authored sequence cross-fades (fade timing, interruption ordering, parity reset behavior) and surface “transitioning” status back to the browser.
  • Add entity-model-panel pose-request wiring so team-door panels can transition independently from other model panels while keeping stable per-panel identities across visibility changes.
  • Add targeted browser/web tests plus Playwright profiling configs and a new team-door profiling scenario.
File summaries
File Description
tools/playsrc/src/profile-runner.ts Adds new team-door profile entries (enabled + disabled variants).
tools/playsrc/profile/team-door.profile.ts New Playwright-driven profile capturing team-door motion, disabled lifecycle, focus navigation, and reopen behavior with CDP screencast artifacts.
playwright.team-door.config.ts New headed profile config for team-door motion on jump_beef.
playwright.team-door-lifecycle.config.ts New headed profile config for team-door lifecycle on pl_upward.
packages/formats/studio-model/rust/src/sequence_transition.rs New authored sequence cross-fade/transition queue implementation for studio models.
packages/formats/studio-model/rust/src/presentation.rs Adds Rust tests validating rotation-sign preservation, transition ordering, terminal-paint timing, and parity wrap behavior.
packages/formats/studio-model/rust/src/lib.rs Exposes the new sequence_transition module publicly.
games/tf2/wasm/src/lib.rs Adds entity-model-panel request kind and uses SequenceTransitioner to generate blend layers + “transitioning” output bit.
games/tf2/browser/tests/team-selection/runtime.test.ts Extends team-selection runtime tests for reopen reset, disabled delayed hover, focus enter/leave, and stable panel IDs.
games/tf2/browser/tests/team-selection/pose-request.test.ts New test verifying entity-panel pose-request encoding is distinct from other model panels.
games/tf2/browser/src/team-selection/runtime.ts Adds stable panelId, animation/model revisions, disabled hover timing, and focus enter/leave sequencing.
games/tf2/browser/src/team-selection/model.ts Adjusts focus/hover availability rules so disabled doors can still be hovered/focused while remaining unselectable.
games/tf2/browser/src/presentation.ts Extends pose request encoding/decoding for entity-model-panel kind and adds “transitioning” timing flag to outputs.
apps/web/tf2/tests/team-model-playback.test.ts New tests for terminal sampling, restart behavior, transition-owner completion, and template-pixel retention behavior.
apps/web/tf2/src/team-model-playback.ts New scheduling + “template unchanged until deformation” tracking for team-door playback.
apps/web/tf2/src/runtime.ts Integrates entity-model-panel requests for team doors, rejects superseded pose results, polls team rules while visible, and captures profiling frames.
Review details
  • Files reviewed: 16/16 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +290 to +295
if (state.visible && !previous.visible) {
this.#modelRevision += 1
this.#entered.clear()
this.#hoverDeadlines.clear()
for (const name of MODEL_NAMES) this.#setAnimation(name, "idle_enabled")
}
@Hona
Hona force-pushed the work/tf2-team-door-animation branch from 1cb34f7 to 95e86b3 Compare September 1, 2026 02:34
@Hona
Hona merged commit 8c71e29 into main Sep 1, 2026
1 check passed
@Hona
Hona deleted the work/tf2-team-door-animation branch September 1, 2026 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants