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

update/set tween progress programatically #113

Open
HannesGitH opened this issue Sep 30, 2022 · 8 comments
Open

update/set tween progress programatically #113

HannesGitH opened this issue Sep 30, 2022 · 8 comments

Comments

@HannesGitH
Copy link

i want to set the progress programatically but the update method doesn't work like i expected

see example on codepen

is this an issue with kute itself or am i doing something wrong?
if the latter please update the docs on how to use the update method / set progress programatically

PS: yes, i've seen the official way with binding to a slider, but in my actual scenario i dont want a slider (yes i could probably build a workaround with a hidden slider whose mouseevents i trigger programatically, but that would be bad)

@HannesGitH
Copy link
Author

and even better would be setting the progress of combined tweens (commented in the codepen)

@thednp
Copy link
Owner

thednp commented Oct 1, 2022

Yes, because KUTE was developed different from it's parents (tween.js, raphael, etc). We may have to revisit this at some point in time. I'm thinking on ways to make the tween object even smaller, a bit more flexible, and disconnect a DOM node from it, so you should be able to use it with any UI framework there is.

@thednp
Copy link
Owner

thednp commented Oct 1, 2022

Perhaps this will help.

https://thednp.github.io/kute.js/progress.html

@HannesGitH
Copy link
Author

Perhaps this will help.

https://thednp.github.io/kute.js/progress.html

yep this is the one i meant

PS: yes, i've seen the official way with binding to a slider, but in my actual scenario i dont want a slider (yes i could probably build a workaround with a hidden slider whose mouseevents i trigger programatically, but that would be bad)

but as you guessed correctly, i want to use it with svelte and have the animationProgress coupled to some state

@thednp
Copy link
Owner

thednp commented Oct 1, 2022

The best I can do right now is to link you the actual ProgressBar, perhaps you can find a way to adapt to your Svelte app.

@HannesGitH
Copy link
Author

HannesGitH commented Oct 1, 2022

thats where im coming from and

this.tween.update(progress);

gave me the idea for my codepen linked above.

but thanks for your help :)
(imma switch to flubber2 for now tho)

@b2hinkle
Copy link

b2hinkle commented Oct 5, 2022

Was hoping this would be possible. Any eta on a feature like this or no?

@thednp
Copy link
Owner

thednp commented Oct 5, 2022

This feature would be nice indeed, however we would have to rework the entire thing, decouple the target HTMLElement from the tween object. I believe this should be achievable but hard to find time for it these days.

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

3 participants