Skip to content

Backwards animation does not work anymore since model-viewer 4.1.0 release #5026

Closed

Description

@Frank3K

Description

Since the upgrade to model-viewer 4.1.0, animations with a negative timeScale (playing in reverse) no longer function correctly. This worked properly in version 4.0.0.

Expected Behavior

The animation should play in reverse (from end to start).

Actual Behavior

The animation does not play when timeScale is negative.

Reproduction

I've created a JSFiddle that demonstrates the issue: https://jsfiddle.net/d8r2bmqL/. You can change the model-viewer version from 4.1.0 to 4.0.0 to see that backwards animation worked correctly in the previous version.

The demo uses the RobotExpressive.glb model with the "Death" animation. When clicking the play button, it should alternate between playing forward and backward.

Possible Cause

I believe the issue may be related to the following code:

// Reset animationAction timeScale
if (action.timeScale != this.element.timeScale) {
action.timeScale = this.element.timeScale;
}

Commenting out this code makes the backwards animation work again. I'm not entirely sure why this code was implemented in the first place, but it appears to be causing the reverse animation functionality to break in version 4.1.0.

@mohammadbaghaei - Since you worked on the animation code for 4.1.0. Would you have time to take a look at this issue? Your expertise would be appreciated in understanding why this behavior changed and how we can restore the backward animation functionality.

Environment

  • model-viewer version: 4.1.0
  • Browser: Firefox 137.0.1 (also reproduced on Chrome)
  • Operating System: macOS (also reproduced on Windows)

Activity

  1. added a commit that references this issue on Nov 8, 2025
    3eaee54
  2. stephanedemotte commented on Feb 19, 2026

    @stephanedemotte

    Hello @mohammadbaghaei any news on this please ?

  3. mohammadbaghaei commented on Feb 22, 2026

    @mohammadbaghaei
    Contributor

    Hello @stephanedemotte, thanks for checking in.
    I submitted a PR for this issue a few months ago. It was recently reviewed and some changes were requested. I’ve applied the requested updates, and it’s now ready for re-review.

    We’re currently waiting for feedback on the latest changes.

  4. added a commit that references this issue on Feb 27, 2026
    305e07c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions