dmg

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?
dmg
  • Postovi: 2

Mario

I'm afraid I'm not that familiar with pixi-spinez as it is a runtime maintained by a third party. You could post this question on their issue tracker on GitHub.
Avatar
Mario

Mario
  • Postovi: 2827

dmg

Yeah, good point, thx!
dmg
  • Postovi: 2


Natrag na Runtimes