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:
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
|
// 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();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue