Problems using Turbowarp packager in a SPA #863
Replies: 2 comments
-
I am not familiar with that library but I can say that vm.runtime.stopAll(); // stops scripts
vm.runtime.stop(); // stops the frame loop
vm.runtime.dispose(); // remove all sprites; frees up memory Should completely stop the project, including sounds |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for the answer, but even stopping everything when I go back to the same page it shows an empty canvas and plays 2 instances of the same Scratch project. Nothing is shown, but audios are played in background and in duplicate. I'll try other workarounds and see if I can solve it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I'm developing a SPA with Astro with view transitions. When I set up the Turbowarp packager in one page and I transition to another page in the website, the scratch game keeps playing in background and when I go back to the page of the scratch game it sets up a new instance plus plays the previous instance. Is there a way to completely clean the state of Turbowarp packager without reloading the entire page? I tried the following (astro:before-swap is a lifecycle event that is fired before swapping contents of origin page with the destination page) but it didn't work at all.
Beta Was this translation helpful? Give feedback.
All reactions