//Firefly Pet by Connor Gilhuly void setup() { size(400, 400); //Wait, there's a framerate function? 60FPS PLEASE! frameRate(60); } void draw() { background(0,-mouseY/2+170,-mouseY/2+250); //Tree noStroke(); fill(-mouseY/2+200, -mouseY/2+100, 0); quad(70+(mouseX/20), mouseY/4+150, 90+(mouseX/20), mouseY/4+150, 85+(mouseX/20), mouseY/4+145, 75+(mouseX/20), mouseY/4+145); quad(85+(mouseX/20), mouseY/4+145, 75+(mouseX/20), mouseY/4+145, 70+(mouseX/20), mouseY/4+120, 80+(mouseX/20), mouseY/4+120); quad(80+(mouseX/20), mouseY/4+140, 95+(mouseX/20), mouseY/4+120, 90+(mouseX/20), mouseY/4+120, 75+(mouseX/20), mouseY/4+140); fill(0,-mouseY/2+200,0); ellipse(81+(mouseX/20), mouseY/4+113, 42, 25); //Ground/Horizen rect(0, mouseY/4+150, 400, 400); //Flowers (Because a barren grassy landscape decorated with only a single tree is boring.) fill(-mouseY/2+250,-mouseY/2+250,-mouseY/2+250); ellipse(58+(mouseX-200)/19, mouseY/4+167, 18, 10); ellipse(145+(mouseX-200)/19, mouseY/4+165, 18, 10); ellipse(20+(mouseX-200)/18, mouseY/4+175, 18, 10); ellipse(205+(mouseX-200)/18, mouseY/4+172, 18, 10); ellipse(245+(mouseX-200)/18, mouseY/4+175, 18, 10); ellipse(305+(mouseX-200)/18, mouseY/4+170, 18, 10); ellipse(375+(mouseX-200)/18, mouseY/4+170, 18, 10); ellipse(95+(mouseX-200)/17, mouseY/4+178, 18, 10); ellipse(50+(mouseX-200)/16, mouseY/4+195, 18, 10); ellipse(125+(mouseX-200)/16, mouseY/4+195, 18, 10); ellipse(160+(mouseX-200)/16, mouseY/4+190, 18, 10); ellipse(220+(mouseX-200)/16, mouseY/4+190, 18, 10); ellipse(270+(mouseX-200)/16, mouseY/4+195, 18, 10); ellipse(322+(mouseX-200)/16, mouseY/4+190, 18, 10); ellipse(380+(mouseX-200)/15, mouseY/4+200, 18, 10); fill(-mouseY/2+250,-mouseY/2+250,0); ellipse(58+(mouseX-200)/19, mouseY/4+167, 9, 5); ellipse(145+(mouseX-200)/19, mouseY/4+165, 9, 5); ellipse(20+(mouseX-200)/18, mouseY/4+175, 9, 5); ellipse(205+(mouseX-200)/18, mouseY/4+172, 9, 5); ellipse(245+(mouseX-200)/18, mouseY/4+175, 9, 5); ellipse(305+(mouseX-200)/18, mouseY/4+170, 9, 5); ellipse(375+(mouseX-200)/18, mouseY/4+170, 9, 5); ellipse(95+(mouseX-200)/17, mouseY/4+178, 9, 5); ellipse(50+(mouseX-200)/16, mouseY/4+195, 9, 5); ellipse(125+(mouseX-200)/16, mouseY/4+195, 9, 5); ellipse(160+(mouseX-200)/16, mouseY/4+190, 9, 5); ellipse(220+(mouseX-200)/16, mouseY/4+190, 9, 5); ellipse(270+(mouseX-200)/16, mouseY/4+195, 9, 5); ellipse(322+(mouseX-200)/16, mouseY/4+190, 9, 5); ellipse(380+(mouseX-200)/15, mouseY/4+200, 9, 5); //Glow (from Glowy Tail) fill(255,255,0, (mouseY/2+10)); ellipseMode(CENTER); ellipse((200-mouseX)*1.1+200, (200-mouseY)*0.9+200, mouseY/2+10, mouseY/2+10); //Glowy tail fill(255,255,0); ellipse((200-mouseX)*1.1+200, (200-mouseY)*0.9+200, 40, 40); //Midsection fill(0,255,255); ellipse((200-mouseX)*1.05+200, (200-mouseY)*0.95+200, 40, 40); //Wings (These were REALLY annoying to figure out.) ellipseMode(CORNERS); fill(255,255,255,200); ellipse((200-mouseX)*1.05+200, (200-mouseY)*0.95+190, -(mouseY/8.0)/50.0*100+(200-mouseX)*1.1+190, -100+(mouseY/8.0)/50.0*100+(200-mouseY)*0.95+180); ellipse((200-mouseX)*1.05+200, (200-mouseY)*0.95+190, (mouseY/8.0)/50.0*100+(200-mouseX)*1.1+210, -100+(mouseY/8.0)/50.0*100+(200-mouseY)*0.95+180); //Antanae stroke(0); line(400-mouseX, 400-mouseY, 420-mouseX, 370-mouseY); line(420-mouseX, 370-mouseY, 425-mouseX, 380-mouseY); line(400-mouseX, 400-mouseY, 380-mouseX, 370-mouseY); line(380-mouseX, 370-mouseY, 375-mouseX, 380-mouseY); //Arms noFill();//otherwise, the curve function will act as if it's drawing part of an ellipse curve(370-mouseX, 400-mouseY, 415-mouseX, 410-mouseY, 410-mouseX, 440-mouseY, 370-mouseX, 430-mouseY); curve(430-mouseX, 400-mouseY, 385-mouseX, 410-mouseY, 390-mouseX, 440-mouseY, 430-mouseX, 430-mouseY); fill(0); ellipseMode(CENTER); ellipse(410-mouseX, 440-mouseY, 10, 10); ellipse(390-mouseX, 440-mouseY, 10, 10); //Head noStroke(); fill(0, 255, 255); ellipse(400-mouseX, 400-mouseY, 40, 40); //Eyes fill(255, 255, 0); ellipse((mouseX-200)/20 + (407-mouseX), (mouseY-200)/20 + (400-mouseY), 7, 12); ellipse((mouseX-200)/20 + (393-mouseX), (mouseY-200)/20 + (400-mouseY), 7, 12); }