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

Tween RepeatCount property does not mirror Roblox behaviour #172

Closed
quantix-dev opened this issue Jun 12, 2022 · 1 comment
Closed

Tween RepeatCount property does not mirror Roblox behaviour #172

quantix-dev opened this issue Jun 12, 2022 · 1 comment
Labels
broken Something isn't right ready to work on Enhancements/changes ready to be made

Comments

@quantix-dev
Copy link
Contributor

The RepeatCount property of TweenInfo.new() does not fully mirror the Roblox behaviour because in-order to fully tween an instance the RepeatCount property needs to be set to 1 or above.

This is likely due to the Tween duration being calculated as:

tweenDuration *= self._tweenInfo.RepeatCount

This however was fixed in the repository by adding 1 to the repeat count:

tweenDuration *= self._tweenInfo.RepeatCount + 1

As a result of this fix however, when the RepeatCount is set to -1 the Tween will not play at all because -1 + 1 = 0 and when multiplied with the time duration for the tween it will be 0. This differs from Roblox behaviour as having a RepeatCount of -1 should lead to an infinitely looping tween as suggested by the documentation
image

@quantix-dev quantix-dev added broken Something isn't right not ready - evaluating Currently gauging feedback labels Jun 12, 2022
@dphfox dphfox added ready to work on Enhancements/changes ready to be made area: animation and removed not ready - evaluating Currently gauging feedback labels Jun 14, 2022
@dphfox dphfox closed this as completed Dec 7, 2022
@Hexcede
Copy link

Hexcede commented Feb 20, 2023

Hey @Elttob, this fix seems to be missing from 0.2 and seems to not be present in the latest version of main either. It is present in the Fusion 0.2 docs that a repeat count of -1 should repeat infinitely, which suggests that it is intended for this to be in still. Was it reverted? I can't actually seem to find it in the commit history either, so I am very confused, since it appears to have been merged. Did an evil rebase eat it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
broken Something isn't right ready to work on Enhancements/changes ready to be made
Projects
None yet
Development

No branches or pull requests

3 participants