///Class Particle////

class Particle
{
init ()
{
   this.titre= loadImage('assets/secondone.jpg')
   this.flare= loadImage('assets/flare.PNG')
}
FX()
{
  let t = (millis() /1)-13300
  randomSeed(154)
  
  for (let i = 0; i <= 300; i++){ 
    
  let Xd= random(-1,1)
  let Yd= random(-1,1)
  let Zd= random(-1,1)
  let size = random (8,15)
  let alpha = random (255,255)
  let cx = random(150, 250);
  let cy = random(40, 129);
  let cz = random(150, 250);
  let s = 10
  push();  
  //blendMode(SCREEN)
    
  
if (t*50>i)
  {
  push();
  translate((t*Xd)/s,(t*Yd)/s,(t*Zd)/s)
  fill(cx,cy,cz,alpha)
  noStroke()
  sphere(size,4,4)
  pop()
     }
  pop();
      }
  noStroke();
  texture(this.titre);
  blendMode(SCREEN)
  plane(600,500)
  
  push()
  texture(this.flare);
  blendMode(SCREEN)
  plane(100*t/20)
  pop()
  
    }
  } 