pixijs: Gradient PIXI.Text doesn't update in Safari (iOS,OSX) and Chrome (iOS)
Check out this sample code: http://codepen.io/hendrysadrak/full/yaYxxg/ Works fine in Chrome (OSX) In Safari (iOS,OSX) the text updates only when texts width is different from which it was before (example: “short text” -> “longggggg text”)
My workaround for this right now is setting the text to something much longer before setting text to right value:
var text = new PIXI.Text('10', {
fill: [0xf1c40f,0x2ecc71]
});
// text.text === '10'
// ugly fix
text.text = 'aaaaaaaaaaaaaaaaaaaaaa';
text.updateTransform();
text.updateText();
text.updateTexture();
// update text
text.text = '11';
Would help fixing this but don’t know where to start.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 24 (7 by maintainers)
I’ve created a separate PR for that issue 😃