0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2025-01-20 17:10:11 -05:00

add triangles to mixed bodies example

This commit is contained in:
liabru 2021-12-12 13:20:15 +00:00
parent bc07f56a94
commit b116f64225
2 changed files with 0 additions and 6 deletions

View file

@ -36,9 +36,6 @@ Example.gyro = function() {
var stack = Composites.stack(20, 20, 10, 5, 0, 0, function(x, y) { var stack = Composites.stack(20, 20, 10, 5, 0, 0, function(x, y) {
var sides = Math.round(Common.random(1, 8)); var sides = Math.round(Common.random(1, 8));
// triangles can be a little unstable, so avoid until fixed
sides = (sides === 3) ? 4 : sides;
// round the edges of some bodies // round the edges of some bodies
var chamfer = null; var chamfer = null;
if (sides > 2 && Common.random() > 0.7) { if (sides > 2 && Common.random() > 0.7) {

View file

@ -36,9 +36,6 @@ Example.mixed = function() {
var stack = Composites.stack(20, 20, 10, 5, 0, 0, function(x, y) { var stack = Composites.stack(20, 20, 10, 5, 0, 0, function(x, y) {
var sides = Math.round(Common.random(1, 8)); var sides = Math.round(Common.random(1, 8));
// triangles can be a little unstable, so avoid until fixed
sides = (sides === 3) ? 4 : sides;
// round the edges of some bodies // round the edges of some bodies
var chamfer = null; var chamfer = null;
if (sides > 2 && Common.random() > 0.7) { if (sides > 2 && Common.random() > 0.7) {