https://www.w3schools.com/colors/colors_picker.asp

Answers

  • PImage img; 
    XML[] titleXMLElements ;
    
    int startLoop=0; 
    int endLoop=10; 
    int maxLoop=1000;
    
    float z = 0.0 ;
    
    boolean done = false;
    
    void setup() { 
      size(1000, 1000, P3D); 
      textMode(MODEL); 
      String url = "http://feeds.feedburner.com/ChampionshipFootballNews"; 
      XML rss = loadXML(url); 
      titleXMLElements = rss.getChildren("channel/item/title"); 
      for (int i = 0; i < titleXMLElements.length; i++) { 
        String title = titleXMLElements[i].getContent(); 
        println(i + ": " + title);
      }   
      maxLoop=titleXMLElements.length;
    }
    
    
    void draw() {
    
      background(64, 64, 64);
    
      lights();
    
      pushMatrix(); 
      translate(width/2, 500, -80); 
      rotateX(z);
    
      // fill(255, 255, 255); 
      fill(255, 2, 2); 
      stroke(0); 
      box(800, 800, 10);
    
      translate(-400, -350, 6); 
      fill(1); 
      textSize(15);
    
      int lineCounter=0; 
      for (int i = startLoop; i < endLoop; i++) { 
        String title = titleXMLElements[i].getContent(); 
        text( title, 5, lineCounter * 19 );
        lineCounter++;
      } 
    
      z = (z + .01)%TWO_PI;
    
      if (round(z)==2.0&&!done) {
        println ("Here 1"); 
        startLoop+=10; 
        endLoop+=10;
        done = true; 
        if (endLoop>=maxLoop) { 
          endLoop=maxLoop-10;
          startLoop=endLoop-10;
        }
      } else if (round(z)==6.0&&done) {
        done = false;
      }
    
      popMatrix();
      text(z, 22, 22);
    }
    
Sign In or Register to comment.