0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-11-23 09:26:51 -05:00

Make background:'transparent' work like canvas renderer

This commit is contained in:
Mr Speaker 2014-06-12 22:00:18 -04:00
parent e95e328a04
commit f9123f9e05

View file

@ -41,10 +41,11 @@ var RenderPixi = {};
} }
}; };
var render = Common.extend(defaults, options); var render = Common.extend(defaults, options),
transparent = !render.options.wireframes && render.options.background === 'transparent';
// init pixi // init pixi
render.context = new PIXI.WebGLRenderer(render.options.width, render.options.height, render.canvas, false, true); render.context = new PIXI.WebGLRenderer(render.options.width, render.options.height, render.canvas, transparent, true);
render.canvas = render.context.view; render.canvas = render.context.view;
render.stage = new PIXI.Stage(); render.stage = new PIXI.Stage();