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:
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)
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue