These are chat archives for pixijs/pixi.js

Sep 2017
Sep 19 2017 09:49
Hey, I have some memory issues with graphics. Basically a game I'm working on consists of multiple rounds, after each round the server sends the collision to the client and I create circles for each collision body for 3 seconds. However, after many rounds the memort increases a lot and it keeps on creating textures. I also create labels for some of them. I've tried several options for destroying them but I can't get the memory leak fixed.
Could someone look at this code and see how it could be fixed?
Sep 19 2017 12:27
how to remove texture cache of spriteFrame json only
Sep 19 2017 12:32

I have loaded spriteSheetFrame using json.

const loader = new PIXI.loaders.Loader();
loader.add('bunny', 'data/bunny.png')
      .add('spaceship', 'assets/spritesheet.json');
loader.load((loader, resources) => {


I want to remove all the TextureCache which was loaded using this spritesheet.json only.

I have tried.


But in PIXI.TextureCache names of all the spriteFrame were included there. And still i am able to use image form frame. Using this.

var bgSprite2 = PIXI.Sprite.fromFrame("ship1");
bgSprite2.anchor.set(0.5, 0.5);
var pos = {x: 300, y: 200};
bgSprite2.position.set(pos.x, pos.y);

I want to remove all the entries of spriteFrame in TextureCache and i want to load new set of spriteFrame.

I am doing this because i have spritesheet animations of two diffrent spaceship but the individual symbol name of both spaceship are same.

Sep 19 2017 13:52
hey everyone! I'm extremely new to using pixi. I was hoping to migrate this version ( of perlin light rays to v4. I feel like I'm almost there but I think I'm running into trouble with the godRayChunk, specifically converting the vTextureCoord. The migration guide says you have to "use mappedMatrix to convert textureCoord to mapCoord, all because of paddings and pow2."