Skip to content

Commit 2ac906b

Browse files
committed
.
1 parent 02e83a2 commit 2ac906b

6 files changed

Lines changed: 407 additions & 31 deletions

examples/testbed/box2d_BrickWall.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ public void createWall(int numx, int numy, float dimx, float dimy, float tx, flo
219219
fixture_def.shape = brick_shape;
220220
fixture_def.density = 30;
221221
fixture_def.friction = 0.50f;
222-
fixture_def.restitution = 0.5f;
222+
fixture_def.restitution = 0.05f;
223223

224224
BodyDef body_def = new BodyDef();
225225
body_def.type = BodyType.DYNAMIC;

examples/testbed/box2d_CircleStressTest.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public void draw(){
8686

8787

8888
PGraphics2D canvas = (PGraphics2D) this.g;
89-
canvas.background(255);
89+
canvas.background(32);
9090
canvas.pushMatrix();
9191
world.applyTransform(canvas);
9292
world.drawBulletSpawnTrack(canvas);
@@ -103,7 +103,7 @@ public void draw(){
103103
int ty = 16;
104104
int gy = 14;
105105
textFont(font);
106-
fill(0);
106+
fill(220);
107107
text("'0-9' motor speed", tx, ty+=gy);
108108
text("'r' reset" , tx, ty+=gy);
109109
text("'t' pause" , tx, ty+=gy);
@@ -197,15 +197,16 @@ public void initScene() {
197197
fd.friction = 1.0f;
198198
bwall_T.createFixture(fd);
199199

200+
int col = color(220);
200201

201-
world.bodies.add(bwall_L, true, color(32), true, color(0), 1f);
202-
world.bodies.add(bwall_R, true, color(32), true, color(0), 1f);
202+
world.bodies.add(bwall_L, true, col, true, color(0), 1f);
203+
world.bodies.add(bwall_R, true, col, true, color(0), 1f);
203204

204-
world.bodies.add(bwall_B, true, color(32), true, color(0), 1f);
205-
world.bodies.add(bwall_T, true, color(32), true, color(0), 1f);
205+
world.bodies.add(bwall_B, true, col, true, color(0), 1f);
206+
world.bodies.add(bwall_T, true, col, true, color(0), 1f);
206207

207-
world.bodies.add(bchamfer_L, true, color(32), true, color(0), 1f);
208-
world.bodies.add(bchamfer_R, true, color(32), true, color(0), 1f);
208+
world.bodies.add(bchamfer_L, true, col, true, color(0), 1f);
209+
world.bodies.add(bchamfer_R, true, col, true, color(0), 1f);
209210
}
210211

211212
CircleShape cd;
@@ -263,7 +264,7 @@ public void initScene() {
263264
Body myBody = world.createBody(bod);
264265
myBody.createFixture(fd2);
265266

266-
world.bodies.add(myBody, true, color(32,128,255,180), false, color(0), 1f);
267+
world.bodies.add(myBody, true, color(32,170,255, 220), false, color(0), 1f);
267268

268269
}
269270
}

examples/testbed/box2d_PistonStressTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public void draw(){
7878
}
7979

8080
PGraphics2D canvas = (PGraphics2D) this.g;
81-
canvas.background(255);
81+
canvas.background(32);
8282
canvas.pushMatrix();
8383
world.applyTransform(canvas);
8484
world.drawBulletSpawnTrack(canvas);
@@ -152,7 +152,7 @@ public void initScene() {
152152
shape.setAsBox(5.0f, 100.0f, new Vec2(+10.15f, 50.0f), 0);
153153
bsides.createFixture(sides);
154154

155-
world.bodies.add(bsides, true, color(32), true, color(0), 1f);
155+
world.bodies.add(bsides, true, color(0), true, color(0), 1f);
156156
}
157157

158158
// turney

0 commit comments

Comments
 (0)