Yehuda Katz Posted September 13, 2018 Share Posted September 13, 2018 Hello, Is there any way to force Phase to update texture without a delay? Shortly said, I have issue with Phaser.Group.generateTexture() method: 1) Lets say you have group, which fade out to alpha = 0. 2) Later you want set group back to alpha = 1 and 3) generate sprite this.game.add.sprite(0, 0, group.generateTexture()) RESULT: you will get empty sprite... However, if I do lets say 100ms delay, everything works as expected... If I fade out group to 0.1 instead of 0, I am getting texture with 0.1 transparency, which means that PIXI needs time (one tick?) to actually update alpha. QUESTION: Is there any way to fix this problem? Thanks Link to comment Share on other sites More sharing options...
samme Posted September 13, 2018 Share Posted September 13, 2018 It may be that the sprites' worldAlpha hasn't been updated yet (because that would happen during the next render). So you could try group.updateTransform(). Yehuda Katz 1 Link to comment Share on other sites More sharing options...
Yehuda Katz Posted September 14, 2018 Author Share Posted September 14, 2018 Thanks, that's exactly what I was looking for ? Link to comment Share on other sites More sharing options...
Recommended Posts