Hey guys! I have an app where I need to replace mesh texture with another one created on the fly.
I could simply do it by:
const newTexture = PIXI.RenderTexture.create({ width: newTextureWidth, height: newTextureHeight })
renderer.render(somePixiContainerToRender, newTexture)
slot.currentMesh.texture = newTexture
But the thing is that new texture is larger than original, so after replace the mesh looks visually smaller, probably because it keep using the old UVs... I also tried the:
const newTexture = PIXI.RenderTexture.create({ width: newTextureWidth, height: newTextureHeight })
renderer.render(somePixiContainerToRender, newTexture)
spine.hackTextureBySlotName(slotName, newTexture, newTexture.orig);
It gives the same result as previous - image looks smaller and seems that it ignores the 3rd argument with the size.
Can anyone help me with this?