datvm Posted May 9, 2015 Share Posted May 9, 2015 Now that we no longer use Stage, is there a quick way to set the game background color other than drawing a `Graphics`? Quote Link to comment Share on other sites More sharing options...
datvm Posted May 9, 2015 Author Share Posted May 9, 2015 Sorry, please nevermind, just went full retard. Anyway, here is the code in case anyone meet this in the future:renderer.backgroundColor = 0xFFFFFF; Quote Link to comment Share on other sites More sharing options...
d13 Posted May 11, 2015 Share Posted May 11, 2015 renderer.backgroundColor = 0xFFFFFF;There doesn't seem to be a `backgroundColor` property on the Canvas or WebGL renderer object. (There is a private `_backgroundColor` property but setting it doesn't seem to do anything.) Quote Link to comment Share on other sites More sharing options...
d13 Posted May 12, 2015 Share Posted May 12, 2015 There doesn't seem to be a `backgroundColor` property on the Canvas or WebGL renderer object. (There is a private `_backgroundColor` property but setting it doesn't seem to do anything.)... If anyone else is having this problem, here's the solution: https://github.com/GoodBoyDigital/pixi.js/issues/1777#issuecomment-101028129 Quote Link to comment Share on other sites More sharing options...
xerver Posted May 13, 2015 Share Posted May 13, 2015 There doesn't seem to be a `backgroundColor` property on the Canvas or WebGL renderer object. (There is a private `_backgroundColor` property but setting it doesn't seem to do anything.) There definitely is! https://github.com/GoodBoyDigital/pixi.js/blob/master/src/core/renderers/SystemRenderer.js#L166-L186 Quote Link to comment Share on other sites More sharing options...
aeauseth Posted December 30, 2015 Share Posted December 30, 2015 I stumbled into this problem as well. Turns out I had set my renderer options to transparent = true. Setting transparent=false and the backgroundColor property works just fine. Quote Link to comment Share on other sites More sharing options...
caymanbruce Posted December 11, 2016 Share Posted December 11, 2016 I was about to ask how to make the background color look like a mixed of colors, such as gradient color or some kind of background color like that of Circle Push Game. Then I fiddled with my code and I found if I set the renderer's backgroundColor to any color I can now use a gradient color in the background, weird. I am still curious how to make the background like that of Circle Push Game though. Hope someone can shed some light for me. 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.