-
Notifications
You must be signed in to change notification settings - Fork 162
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
theater.stop() to instantly stop a scene #50
Comments
No problem, you're not bothering me at all, I'm always glad to get in touch with people using TheaterJS ;) Back then, when I first added Since I released the first version of TheaterJS, I've seen a lot of people using it by disabling the mistakes feature, setting a high and constant typing speed with just one actor. For such case, I think this library is an over-kill as implementing a typing/erasing animation in JavaScript is really easy. That's why I am currently writing a minimalist version with a lot of comments and the features that you are the most interested in. I'll make sure to add a stop function and let you know when I'm done (which should be in a few days) :) |
I finally had some time, so here is the "minimalist version". I've also added a note in the documentation. I'd be curious to know if it actually fits your needs? |
Okay, thanks for your detailed explanation ! Your comments in the fiddle are also really useful ! |
Glad you like it, that's actually the whole purpose of TheaterJS :) |
Hi again !
Actually, when you send theater.stop() , the JS wait until the sentence is finished before stopping.
A great enhancement could be to add a parameter to choose if the sentence must be finished or not :
I see a lot of uses for that feature, my try is to pause writing when the webpage isn't visible (= window minimized or user in another tab), and resume when it's visible so the user won't miss the text.
With the current theater.stop() it is impossible to correctly achieve, since the sentence finishes before stopping. You can see that concept here, try to switch tabs for more than 2 seconds :) https://jsfiddle.net/AmineIzumi/zy118txu/
Thanks in advance for your help ! 👍
The text was updated successfully, but these errors were encountered: