mirror of
https://github.com/liabru/matter-js.git
synced 2025-03-14 00:38:41 -04:00
Merge b5db500807
into acb99b6f87
This commit is contained in:
commit
a3ffcfef59
1 changed files with 15 additions and 0 deletions
|
@ -308,6 +308,21 @@ var Vector = require('../geometry/Vector');
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if(parts.length==0)
|
||||
{
|
||||
for (v = 0; v < vertexSets.length; v += 1) {
|
||||
vertices = vertexSets[v];
|
||||
|
||||
vertices = Vertices.hull(vertices);
|
||||
|
||||
parts.push({
|
||||
position: { x: x, y: y },
|
||||
vertices: vertices
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// create body parts
|
||||
for (i = 0; i < parts.length; i++) {
|
||||
parts[i] = Body.create(Common.extend(parts[i], options));
|
||||
|
|
Loading…
Add table
Reference in a new issue