Skip to content

Restore rotateAnim loop behavior and keep reverse semantics#338

Merged
tracygardner merged 2 commits intomainfrom
codex/fix-continuous-spinning-of-box1
Mar 5, 2026
Merged

Restore rotateAnim loop behavior and keep reverse semantics#338
tracygardner merged 2 commits intomainfrom
codex/fix-continuous-spinning-of-box1

Conversation

@tracygardner
Copy link
Contributor

Summary

  • restored rotateAnim loop behavior so loop: true spins continuously forward again
  • kept reverse: true behavior as a forward-then-return animation
  • ensured reverse: true + loop: true runs as repeated animate-then-reverse
  • added an animation test that verifies reverse returns to the starting rotation

Implementation details

  • api/animate.js
    • loop mode selection now distinguishes reverse (YOYO) from non-reverse loop (CYCLE)
    • keyframe construction now depends on whether this is a looping spin vs a one-shot reverse
    • animation end frame now uses double duration only for one-shot reverse
    • final rotation assignment on completion now restores start rotation for reverse mode
  • tests/animate.test.js
    • added coverage for rotateAnim(..., { reverse: true }) ensuring it returns to initial orientation

Validation

  • attempted to run: npm run test:api animate
  • blocked by missing Playwright browser binary in environment
  • attempted install: npx playwright install chromium
  • blocked by upstream CDN 403 responses in this environment

Codex Task

@tracygardner tracygardner merged commit 2cc7d01 into main Mar 5, 2026
5 checks passed
@tracygardner tracygardner deleted the codex/fix-continuous-spinning-of-box1 branch March 5, 2026 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant