sudolim Posted June 4, 2014 Share Posted June 4, 2014 newbie here. was wondering if it is possible to make the game.stage.background alpha so that the player can see through the phaser canvas to the background colour of the browser window? i.e. you can still see the buttons, and actors but the background of the game is transparent. I'm using leap.js to change the background colour of the browser window everytime the player gestures. thanks! - JW Link to comment Share on other sites More sharing options...
Loopeex Posted June 5, 2014 Share Posted June 5, 2014 Don't think you can set a transparent background for the stage (game.stage.backgroundColor accepts hex strings).Try changing Phaser stage accordingly to the window background, using game.stage.backgroundColor. Link to comment Share on other sites More sharing options...
sudolim Posted June 6, 2014 Author Share Posted June 6, 2014 thanks for the tip! Link to comment Share on other sites More sharing options...
ninjascript Posted June 6, 2014 Share Posted June 6, 2014 You can absolutely set the background color to transparent. The 6th argument in the Phaser.Game constructor is a boolean value that determines if the background should be transparent. By default it's set to false. Check out the docs here: http://docs.phaser.io/Phaser.Game.html Tilde 1 Link to comment Share on other sites More sharing options...
rich Posted June 6, 2014 Share Posted June 6, 2014 ninjascript tells it like it is it's a game constructor parameter, it can't be toggled at run-time. Tilde 1 Link to comment Share on other sites More sharing options...
Recommended Posts