TurboWarp/extensions

Animated Text Slows Permanently the Project

Cacte-TM opened this issue · 1 comments

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.

If I had to guess it's like this to maintain support for the scratch lab