0
0
Fork 0
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:
liabru 2015-12-05 17:12:50 +00:00
commit 2510cdfa12

View file

@ -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 = {};