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

theater.restart() to instantly replay the scenario from scratch #61

Open
bender2601 opened this issue Jun 16, 2016 · 3 comments
Open

theater.restart() to instantly replay the scenario from scratch #61

bender2601 opened this issue Jun 16, 2016 · 3 comments

Comments

@bender2601
Copy link

Hi, I really like your plugin - great work and easy to use.
As far as I understand, theater.replay() restarts the scenario as soon as it reaches its end - but I wonder if there's a way to instantly restart or otherwise reinitialize the whole scenario e.g. at the click of a button.
Thanks in advance!

@zhouzi
Copy link
Owner

zhouzi commented Jun 21, 2016

Hey @bender2601, thank you for the kind words and sorry for the delay. Sadly, due to the way the internal state of each scene is handled, it's impossible to instant stop a scene (related to #59 #50). It'd involve quite some work to implement with probably a lot of breaking changes :/

@bender2601
Copy link
Author

Thanks for the reply anyway - no worries for the delay. I read these related topics before - but I thought to completely "destroy" and then re-initializing the current scenario would be technically different and easier than pausing/stopping the current animation.

@zhouzi
Copy link
Owner

zhouzi commented Jun 21, 2016

I'll look into it and see if you could get it working by "destroying" the instance but I'm afraid that the timeouts will remain and lead to a memory leak :/

@zhouzi zhouzi changed the title Instant restart or reinitialization of scenario? theater.restart() to instantly replay the scenario from scratch Feb 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants