These are chat archives for pixijs/pixi.js

Feb 2017
Dave Moore
Feb 19 2017 14:33
@enriko-riba - The way your own AnimatedSprite is setup should mean that one animated sprite does not effect the other. All an animated sprite does is set which texture to use at any time. If spriteA is using textureX, and spriteB is using textureX, then setting spriteA.texture = textureY shouldn't effect spriteB still using textureX
if it does, then your AnimatedSprite class is setup incorrectly
Ignoring that... only the Base Texture counts in texture batching. Think of the Texture class as a wrapper containing data of how to use it's Base Texture
Enriko Riba
Feb 19 2017 15:07
The issue was not in assigning different textures, it was about using same textures for multiple sprites and each one setting a different frame. This ended badly by all sprites playing the same animation. What I am doing now is:
let tempTexure : PIXI.Texture = PIXI.utils.TextureCache[textureAtlasName];
this.textureAtlas = new PIXI.Texture(tempTexure.baseTexture);
Enriko Riba
Feb 19 2017 15:12
But thanks, you answered what I wanted to know!
Enriko Riba
Feb 19 2017 16:42
I have another set of questions. How do you guys deal with TilingSprite regarding texture clamping and seems? I tried to optimize my platforms by using several adjacent TilingSprites (eg. left column, mid part and right column). I have two issues as shown on this image : alt
  1. the borders have an artifact, probably due to GL_REPEAT (I marked them with red rectangles)
  2. the adjacent sprites show seems depending on the position (marked with blue rectangles)