0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-11-27 09:50: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) if (grid.buckets[bucketId].length < 2)
continue; continue;
var region = bucketId.split(','); var region = bucketId.split(/C|R/);
c.rect(0.5 + parseInt(region[0], 10) * grid.bucketWidth, c.rect(0.5 + parseInt(region[1], 10) * grid.bucketWidth,
0.5 + parseInt(region[1], 10) * grid.bucketHeight, 0.5 + parseInt(region[2], 10) * grid.bucketHeight,
grid.bucketWidth, grid.bucketWidth,
grid.bucketHeight); grid.bucketHeight);
} }