Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switching tweened to Tween produces different behaviour #14849

Open
TheSpeedM opened this issue Dec 28, 2024 · 1 comment
Open

Switching tweened to Tween produces different behaviour #14849

TheSpeedM opened this issue Dec 28, 2024 · 1 comment

Comments

@TheSpeedM
Copy link

TheSpeedM commented Dec 28, 2024

Describe the bug

When switching from tweened to Tween, because tweened is now deprecated, the behavior doesn't seem to be the same. The difference seems to mainly be when tweening objects and updating the target multiple times per second.

Reproduction

Using the deprecated tweened

https://svelte.dev/playground/5243f9ee07484a3486d8f76eaa8762ff?version=5.16.0

Notice how the text seems to follow the mouse smoothly.

Using Tween and the set-method

https://svelte.dev/playground/bfff977c6b9441ceb2fe28583ee842ef?version=5.16.0

Now the text isn't following the mouse smoothly at all and seems to just start the transition when the movement has ended.

Using Tween and setting .target

https://svelte.dev/playground/f6a82d6b41d64573a4ae8e810642c162?version=5.16.0

This seems to produce the same result as using Tween and .set.

Logs

No response

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (12) x64 AMD Ryzen 5 5500U with Radeon Graphics
    Memory: 6.63 GB / 15.33 GB
  Binaries:
    Node: 20.18.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.8.2 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.12.2 - C:\Program Files\nodejs\pnpm.CMD
    bun: 1.1.21 - ~\.bun\bin\bun.EXE
  Browsers:
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    svelte: ^5.16.0 => 5.16.0

Severity

annoyance

@TheSpeedM
Copy link
Author

Comparing the implementation of tweened and Tween I've noticed a difference in the aborting of the previous tween and started work on a fix (TheSpeedM@aa4d472), I will make a PR once I've tested this.

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

No branches or pull requests

1 participant