TurboWarp / extensions

User-contributed unsandboxed extension gallery for TurboWarp
https://extensions.turbowarp.org/
MIT License
107 stars 217 forks source link

Animated Text Slows Permanently the Project #1553

Open Cacte-TM opened 1 week ago

Cacte-TM commented 1 week ago

When a clone or a normal sprite runs a Animated Text block, it slows down the project permanently, even if the clone is deleted or the "show sprite" block used. FPS gets lower and lower, until I reopen the project. Please fix this because it's really annoying :( Thanks !

I'm not sure, but maybe, the text souldn't be hidden, but instead deleted :


vm.runtime.on("PROJECT_START", () => {
        this._hideAllText();

vm.runtime.on("PROJECT_STOP_ALL", () => {
        this._hideAllText();

I'm not a very good coder but something like that could give you the idea...

_deleteState(target) {
    if (this._hasState(target)) {
        delete this._state[target.id];
    }
}

Even if you don't fix the problem, please let me know that you saw my report !

Edit : I don't know if it's related, but when you use the "show sprite" block, you can still used the "displayed text" block, which will give you the old displayed text, before the "show sprite" block was used.