update method

void update(
  1. double speed
)

Implementation

void update(double speed) {
  z -= speed;
  if (z < 1) {
    z = width;
    x = random.nextDouble() * width * 2 - width;
    y = random.nextDouble() * height * 2 - height;
    pz = z;
  }
}