mirror of
https://github.com/liabru/matter-js.git
synced 2024-12-26 13:49:01 -05:00
Make background:'transparent' work like canvas renderer
This commit is contained in:
parent
e95e328a04
commit
f9123f9e05
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
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.stage = new PIXI.Stage();
|
||||
|
||||
|
|
Loading…
Reference in a new issue