DefiantExtropia1 Posted March 10, 2023 Share Posted March 10, 2023 I can only set background during initialization like this: new Application({ background: 0x000000 }). I can't figure out how to dynamically update the background color after that. renderer.backgroundColor property seems to be deprecated in v7. Quote Link to comment Share on other sites More sharing options...
DungeonDame Posted March 17, 2023 Share Posted March 17, 2023 This works for me fine in v7. When I view renderer in the console, I don't see any backgroundColor property, but nonetheless this works on PixiJS 7.1.2 to change the bg color as many times as I want. app.renderer.backgroundColor = 0xf0f000; RussiSunni and DefiantExtropia1 2 Quote Link to comment Share on other sites More sharing options...
DefiantExtropia1 Posted March 20, 2023 Author Share Posted March 20, 2023 Thank you very much for the clue. I am using typescript, so it was a bit tricky to get working. But it indeed works when I use @ts-ignore flag to ignore type error as the type definition for Renderer class doesn't have backgroundColor property defined. Quote Link to comment Share on other sites More sharing options...
jasonsturges Posted July 2, 2023 Share Posted July 2, 2023 In v7, it's: app.renderer.background.color 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.