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:
parent
86c4a61279
commit
dd83386e0f
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue