Skip to content

Fix animation blending jitter by stopping outgoing animations#602

Closed
tracygardner wants to merge 3 commits intomainfrom
claude/review-animation-blending-HoqGN
Closed

Fix animation blending jitter by stopping outgoing animations#602
tracygardner wants to merge 3 commits intomainfrom
claude/review-animation-blending-HoqGN

Conversation

@tracygardner
Copy link
Copy Markdown
Contributor

Summary

This change fixes animation blending jitter by ensuring outgoing animations are immediately stopped and frozen as snapshots during blend transitions, rather than continuing to play while their weight fades.

Key Changes

  • Always stop outgoing animations: Modified both flockAnimate blend transition points to immediately call stop() on the outgoing animation group before creating a snapshot pose
  • Unconditional snapshot creation: Changed logic to always create a snapshot of the current pose (when available) rather than only creating one if no outgoing group exists
  • Consistent behavior across blend functions: Applied the same fix pattern to both animation blending locations in the codebase

Implementation Details

The issue was that live animations (e.g., oscillating antennae) would continue to drive bone transformations during the weight fade-out phase of a blend, causing visible jitter. By stopping the outgoing animation immediately and capturing its final pose as a frozen snapshot, the blend now smoothly transitions between the snapshot and the incoming animation without any bone movement artifacts.

The changes maintain the same snapshot initialization pattern (_isSnapshot = true, weight set to 1.0) while ensuring the outgoing animation is halted before the blend begins.

https://claude.ai/code/session_01Favw2jmtKuFNJ2K8kDAnoE

claude added 2 commits May 4, 2026 07:26
…shot

Previously, a playing outgoing animation (e.g. walk) continued to drive
bones during the weight fade, causing oscillating secondary bones like
antennae to jitter. Now the outgoing animation is stopped immediately and
its current pose is frozen as a snapshot for the blend-out source.

https://claude.ai/code/session_01Favw2jmtKuFNJ2K8kDAnoE
Same fix as the previous commit but for the model animation path: stop
the outgoing animation immediately and use a frozen pose snapshot rather
than letting the live animation continue to drive bones during the blend.

https://claude.ai/code/session_01Favw2jmtKuFNJ2K8kDAnoE
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 4, 2026

Warning

Rate limit exceeded

@tracygardner has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 26 minutes before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 39daee3c-ebb0-44e4-907d-99301cc42650

📥 Commits

Reviewing files that changed from the base of the PR and between 3eb7b38 and 12f86bb.

📒 Files selected for processing (1)
  • api/animate.js
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/review-animation-blending-HoqGN

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 26 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

reset() calls goToFrame(0) which synchronously writes the incoming
animation's frame 0 values to all bone transforms, including antennae.
This overwrites the frozen snapshot pose before any render, causing a
visible pop and oscillation in the blend.

stop() then start() is sufficient — start() schedules evaluation from
frame 0 on the next render tick without touching bone transforms directly.

https://claude.ai/code/session_01Favw2jmtKuFNJ2K8kDAnoE
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying flockxr with  Cloudflare Pages  Cloudflare Pages

Latest commit: 12f86bb
Status: ✅  Deploy successful!
Preview URL: https://1e6a4270.flockxr.pages.dev
Branch Preview URL: https://claude-review-animation-blen.flockxr.pages.dev

View logs

@tracygardner tracygardner deleted the claude/review-animation-blending-HoqGN branch May 6, 2026 07:15
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