- Joined
- Jul 31, 2017
- Messages
- 500
Hello everyone!
I was just experimenting a bit and I wanted to have a transparent canvas. Turns out it is possible:
When the webgl context is requested, CX - per default - doesn't request the alpha channel. Presumably due to performance reasons. You'll find this in
targets/html5/modules/native/html5game.js
in
function BBHtml5Game( canvas ){
there's
That's the culprit. I think it would be cool to have this configurable via app config, e.g. HTML5_CANVAS_ALPHA, which would default to false (for compatibility and - if what MDN says about using alpha and performance is true - performance).
What do you think?
I was just experimenting a bit and I wanted to have a transparent canvas. Turns out it is possible:
When the webgl context is requested, CX - per default - doesn't request the alpha channel. Presumably due to performance reasons. You'll find this in
targets/html5/modules/native/html5game.js
in
function BBHtml5Game( canvas ){
there's
Code:
var attrs={ alpha:false };
That's the culprit. I think it would be cool to have this configurable via app config, e.g. HTML5_CANVAS_ALPHA, which would default to false (for compatibility and - if what MDN says about using alpha and performance is true - performance).
What do you think?