mirror of
https://github.com/liabru/matter-js.git
synced 2024-12-26 13:49:01 -05:00
Merge branch 'master' of https://github.com/schahriar/matter-js into schahriar-master
This commit is contained in:
commit
2510cdfa12
1 changed files with 4 additions and 0 deletions
|
@ -67,6 +67,10 @@ var Vector = require('../geometry/Vector');
|
|||
|
||||
var render = Common.extend(defaults, options);
|
||||
|
||||
if(render.canvas) {
|
||||
render.canvas.width = render.options.width || render.canvas.width;
|
||||
render.canvas.height = render.options.height || render.canvas.height;
|
||||
}
|
||||
render.canvas = render.canvas || _createCanvas(render.options.width, render.options.height);
|
||||
render.context = render.canvas.getContext('2d');
|
||||
render.textures = {};
|
||||
|
|
Loading…
Reference in a new issue