This commit is contained in:
gauthiier
2015-03-04 13:26:26 +01:00
parent effe06d9f5
commit d79fe1f91e
8 changed files with 176 additions and 7 deletions
@@ -13,8 +13,6 @@ Spring spring;
Creature t;
Creature c;
ArrayList<Creature> creatures = new ArrayList<Creature>();
void setup() {
size(CANVAS_WIDTH, CANVAS_HEIGHT);
background(23, 68, 250);
@@ -25,7 +23,7 @@ void setup() {
// create a global drag
ViscousDrag drag = new ViscousDrag();
drag.coefficient = 0.25f;
physics.add(drag);
//physics.add(drag);
t = new TriangleCreature((int)random(width), (int)random(height), 20);
c = new CircleCreature((int)random(width), (int)random(height), 20);
@@ -33,6 +31,7 @@ void setup() {
physics.add(t); physics.add(c);
spring = physics.makeSpring(t, c);
spring.restlength(20);
}