Using SpriteData.fromImage repeatedly with a large texture, although setting the SpriteData to null, increases memory & slows the game to a halt.
This is demonstrated in a JSFiddle. Each frame, 4 707x707 black images are fed into SpriteData.fromImage and used as a sprite for 4 tiles. After just a few seconds, the frame rate suddenly drops with the page following suit. All relevant code is contained there & commented.
500 Replit cycles to whoever can get a fix/alternative!
Using SpriteData.fromImage repeatedly with a large texture, although setting the SpriteData to null, increases memory & slows the game to a halt.
This is demonstrated in a JSFiddle. Each frame, 4 707x707 black images are fed into SpriteData.fromImage and used as a sprite for 4 tiles. After just a few seconds, the frame rate suddenly drops with the page following suit. All relevant code is contained there & commented.
500 Replit cycles to whoever can get a fix/alternative!