public void update(float db) { // we can use the db value here to change the speed of the particles loc.add(vel.mult(vel, map(db, -100, 100, .05f, 5))); if (loc.x < 0 || loc.x > width) { vel.x *= -1; } if (loc.y < 0 || loc.y > height) { vel.y *= -1; } radius = constrain(db, 2, 100); }