//// class tunnel///

class tunnel
{
FX()
{
  let t = (millis() / 1000)
  let rotate = sin(millis() / 400)
  let r = 1000
  
  rotateZ (rotate)
  translate(r-150,0,0)
  rotateY(t)
  
  let count = 50  
  
  for (let i=0; i<count; i++)
  {
    push()
      
    let c = i * (2*PI / count)
    let x = sin(c) * r;
    let z = cos(c) * r;

    translate(x,0,z)
    fill(200,40,90)
    noStroke()
    rotateY( c + PI/2)
    rotateZ(i*2)
    torus(190,50,4,4)
    fill(69,212,217)
    torus(280,75,4,4)
    fill(18,171,150)
    torus(150,rotate*20,4,6)
        
    pop();
      }
     }
  }
