Would changing the scene serve to "flush" the textures? I'm displaying 30 sprites at a time, then set each of them to a texture based on whether or not a skill is learned or not, so they become 1 of 3 images, and the images update each time you learn a skill.
I've also tried removing the render multiple times. Hasn't worked..
In the worst case press f12 for dev tools, they should display if there are errors.
The only thing that catches my eye is, I don't know what Skills[index] is in your code. Do you have the skills etc. defined properly?
Also, no, changing thr scenes does not flush textures. They need to be flushed manually or reused.
Skills[index] is just an array filled with a bunch of components that setup positions and functions for each button/sprite.
for (var x = 0; x < Skills.length; x++) {
this.createSkillButton(x);
}
Index refers to the index of Skills and the respective Button]
There's also no errors. Just nothing appears. For your cat video, how did you setup the stage/app?
I did not set it up at all, I used default MV's. I just planted the three functions there as a plugin and used the SceneManager._scene.
Well, I did not have problems with it as I don't use any plugins, so in my window it's smaller and doesn't really cause any troubles.
But aliasing the createErrorPrinter should do the trick, that's true.
Back to earlier's topic about removing the sprites? I was under the assumption that moving to a new scene cleared it all out, so that's how I was doing it even previously with Sprite_Buttons. Does this.removeChild(); work? Would be pretty e design wise if it just caused a big memory leak.
It's not about the sprites, but about the textures. Sprites get dealt with through Javascript's garbage collector as they're saved in RAM, but textures don't and need to be flushed manually as they're saved in GPU, where Javascript doesn't have access to (as they're manipulated via WebGL).
texture.on('dispose', this.destroyTexture, this);
this.destroyTexture(texture);
this.removeAll();
do you know how to dispose of them or would one of these work?
edit: think I got it.. thingiwanttodelete.destroy(); ?
Alrighty, thanks again for all your help with learning Pixi! 😍
I think I've got a better understanding of it now!