Skip to content

[BUG] Laggy Animation at 240hz #3265

@amadeus

Description

@amadeus

1. Read the FAQs 👇

2. Describe the bug

On a windows PC running at around 240hz refresh rate, the follow spring demo here:

https://examples.motion.dev/react/follow-pointer-with-spring?utm_source=homepage-header

is quite laggy anytime the mouse moves. I've made a video of it here:

I took a JS profile of it which I've also attached:

Trace-20250619T235122.zip

(it doesn't look like the JS thread is locking up, there's ample time between frames)

It very much feels like the spring stopped and restarted during this mouse movement, instead of the forces applying dynamically as the position of the mouse changes.

3. IMPORTANT: Provide a CodeSandbox reproduction of the bug

https://examples.motion.dev/react/follow-pointer-with-spring?utm_source=homepage-header

4. Steps to reproduce

Steps to reproduce the behavior:

  1. Go to https://examples.motion.dev/react/follow-pointer-with-spring?utm_source=homepage-header
  2. Be on a 240hz monitor
  3. Move mouse rapidly
  4. Notice spring animation is laggy until the mouse stops moving

5. Expected behavior

Pink circle should follow the mouse around at the constant spring rate that it does on a 60hz (or probably 120hz) monitor

6. Video or screenshots

https://www.youtube.com/watch?v=hQgduxVwtFM

7. Environment details

Windows 11, Chrome 137.0.7151.104

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions