0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-11-30 10:20:52 -05:00

fix Render.grid

This commit is contained in:
liabru 2016-11-28 00:42:56 +00:00
parent 86c4a61279
commit dd83386e0f

View file

@ -1048,9 +1048,9 @@ var Vector = require('../geometry/Vector');
if (grid.buckets[bucketId].length < 2)
continue;
var region = bucketId.split(',');
c.rect(0.5 + parseInt(region[0], 10) * grid.bucketWidth,
0.5 + parseInt(region[1], 10) * grid.bucketHeight,
var region = bucketId.split(/C|R/);
c.rect(0.5 + parseInt(region[1], 10) * grid.bucketWidth,
0.5 + parseInt(region[2], 10) * grid.bucketHeight,
grid.bucketWidth,
grid.bucketHeight);
}