Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/schahriar/matter-js into …
Browse files Browse the repository at this point in the history
…schahriar-master
  • Loading branch information
liabru committed Dec 5, 2015
2 parents d1b8705 + 0b51dd6 commit 2510cdf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/render/Render.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {};
Expand Down

0 comments on commit 2510cdf

Please sign in to comment.