Skip to content

Commit 1380af6

Browse files
committed
Added render visible flag.
1 parent 6da5409 commit 1380af6

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

v3/src/physics/matter-js/World.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,12 @@ var World = new Class({
283283

284284
for (var i = 0; i < bodies.length; i++)
285285
{
286-
body = bodies[i];
286+
var body = bodies[i];
287+
288+
if (!body.render.visible)
289+
{
290+
continue;
291+
}
287292

288293
var vertices = body.vertices;
289294

@@ -297,11 +302,6 @@ var World = new Class({
297302
graphics.lineTo(vertices[0].x, vertices[0].y);
298303

299304
graphics.strokePath();
300-
301-
// if (body.willDrawDebug())
302-
// {
303-
// body.drawDebug(graphics);
304-
// }
305305
}
306306
}
307307
},

0 commit comments

Comments
 (0)