Kelsey Posted September 22, 2020 Share Posted September 22, 2020 Hi, is anyone seeing this problem in Safari 14 where a pixi sprite texture.update() call is not updating when the canvas the texture is sourced from has been updated? Thanks! Kelsey Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted September 22, 2020 Share Posted September 22, 2020 Strangely, we have that problem for texts on iOS, but when texture is resized: https://github.com/pixijs/pixi.js/issues/6898 Quote Link to comment Share on other sites More sharing options...
Kelsey Posted September 22, 2020 Author Share Posted September 22, 2020 Hi Ivan, I'm seeing the issue of canvas texture.update() call on Safari 14 in both iOS and Mac. The canvas size is not changed. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted September 22, 2020 Share Posted September 22, 2020 I can test it on my mac tomorrow, care to make minimal example on pixi-playground that shows that bug? I know its 5 minutes work but it'll help me to distinguish this from other issues guys want me to work on Quote Link to comment Share on other sites More sharing options...
Kelsey Posted September 23, 2020 Author Share Posted September 23, 2020 (edited) Hi Ivan, Thank you for your help. I do really appreciate it. In the example here, I'm trying to update the canvas with a square of random pixels on every frame using context.putImageData() and texture.update(). In Safari 14, only the 1st frame update is registered and subsequent updates are not performed. https://www.pixiplayground.com/#/edit/Zkvg2uaJK-La5QKs4NrpG Thanks! Kelsey Edited September 23, 2020 by Kelsey Quote Link to comment Share on other sites More sharing options...
Kelsey Posted September 24, 2020 Author Share Posted September 24, 2020 Hi Ivan, wonder if you have had a chance to take a look at the example. The texture update works fine in other browsers other than Safari 14. I would love to hear your comment. Thanks. Kelsey Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted September 24, 2020 Share Posted September 24, 2020 Confirmed. They broke it. What The Heck? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted September 24, 2020 Share Posted September 24, 2020 (edited) Actually, workaround is obvious: call clearRect() instead of your fillRect(), it should be fast and fix it at the same time. Probably putImageData does not call invalidations Edited September 24, 2020 by ivan.popelyshev Quote Link to comment Share on other sites More sharing options...
Kelsey Posted September 24, 2020 Author Share Posted September 24, 2020 That did it! Thank you! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.