Advertisement
dams2007

Simple class

Feb 16th, 2022
1,747
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.48 KB | None | 0 0
  1. Particle[] particles_a;
  2. int nums = 300;
  3. int noiseScale = 900;
  4.  
  5. void settings() {
  6.   size(1920, 1080);
  7. }
  8.  
  9.  
  10. void setup(){
  11.   frameRate(60);
  12.  
  13.   background(25, 8, 50);
  14.   for(int i = 0; i < nums; ++i){
  15.     particles_a[i] = new Particle(5.0, 6.0);
  16.   }
  17. }
  18.  
  19. class Particle {
  20.  
  21.   PVector dir;
  22.   PVector vel;
  23.   PVector pos;
  24.   float speed;
  25.  
  26.   Particle (float x, float y) {
  27.  
  28.   dir = new PVector(0,0);
  29.   vel = new PVector(0,0);
  30.   pos = new PVector(x,y);
  31.   speed = 0.5;
  32.   }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement